Loading...
Loading...
Compare original and translation side by side
taskspackage.jsonmelech-buy-vs-buildtaskspackage.jsonmelech-buy-vs-build| Intent | Trigger | Goal |
|---|---|---|
| Intercept | Code, a plan, or a diff exists and may be reinventing something. | Name what was (re)built, find the incumbents, decide adopt vs. keep building. |
| Explore | Open-ended: "what's out there for X", "any new tools for X", "how do people do X now". | Map the space, surface the notable and the recent, arm the user to choose. |
| 意图 | 触发条件 | 目标 |
|---|---|---|
| 拦截 | 已存在代码、计划或差异,可能在重复造轮子。 | 明确被(重新)构建的功能是什么,找到行业内成熟方案,决定是采用现有方案还是继续自研。 |
| 探索 | 开放式问题:“针对X有哪些现成方案?”“有没有针对X的新工具?”“现在大家都是怎么做X的?” | 梳理方案全景,呈现值得关注的近期方案,帮助用户做出选择。 |
"postgres polling table worker"| What the agent built | What to actually search |
|---|---|
| Rows in a table + a polling worker + retry count | job queue, background jobs, durable task execution |
| Custom event bus with handler registry | pub/sub, message broker, event bus |
| Hand-rolled retry-with-jitter wrapper | retry library, resilience/backoff library |
| Bespoke role/permission matcher | authorization / policy engine, RBAC / ReBAC |
Cron-ish | job scheduler, distributed cron, workflow orchestration |
| Diff-and-apply state machine for a wizard | state machine library, workflow engine |
| Custom CSV/Excel export writer | spreadsheet / serialization library |
"postgres polling table worker"| Agent构建的内容 | 实际应搜索的术语 |
|---|---|
| 表行 + 轮询工作器 + 重试次数 | job queue, background jobs, durable task execution |
| 带处理器注册的自定义事件总线 | pub/sub, message broker, event bus |
| 手动实现的带抖动重试包装器 | retry library, resilience/backoff library |
| 定制化角色/权限匹配器 | authorization / policy engine, RBAC / ReBAC |
类Cron的 | job scheduler, distributed cron, workflow orchestration |
| 向导的差异应用状态机 | state machine library, workflow engine |
| 自定义CSV/Excel导出工具 | spreadsheet / serialization library |
1. Name the capability ─► 2. Read the ground truth ─► 3. Fan out lanes ─────────► 4. Reduce ─► 5. Shortlist + verdict ─► 6. Hand off
(canonical vocabulary) (stack, constraints) adopt-vs-rebuild (inward) ┐ (dedupe, kill dead) (ask_question)
outward lanes (web) ┴─ same concurrent batch;
inward hit short-circuits1. 定义能力 ─► 2. 梳理基础事实 ─► 3. 并行调研分支 ─────────► 4. 整合结果 ─► 5. 候选清单 + 结论 ─► 6. 交付执行
(标准术语) (技术栈、约束条件) 复用vs重造(向内) ┐ (去重、淘汰无效项) (发起决策询问)
向外调研分支(网络) ┴─ 同一并发批次;
向内命中则直接终止流程package.jsonrequirements.txtpyproject.tomlgo.modCargo.tomlGemfilepom.xmlpackage.jsonrequirements.txtpyproject.tomlgo.modCargo.tomlGemfilepom.xml| Lane | What it hunts |
|---|---|
| Adopt-vs-rebuild (inward, privileged) | The deep version of the step-2 check: transitive deps, framework/stdlib built-ins, a vendor plan that already covers this, an internal monorepo library. Mostly local work plus targeted doc lookups. Short-circuit authority — see below. |
| Canon | The category's standard name and the 3–8 options every comparison lists. Awesome-lists, category pages, "X vs Y" roundups. |
| Ecosystem | Libraries and OSS in this project's language. Package registries, GitHub, framework-native answers. |
| Commercial | Managed services, dev tools, SaaS, cloud primitives. Includes the boring cloud answer nobody mentions. |
| Verdicts | What practitioners actually say: HN/Reddit threads, "we migrated off X", postmortems, why people regret each option. |
| Counter-case | Why rolling your own is sometimes right here, and the known failure modes of the incumbents. Keeps the shortlist honest. |
references/lanes.md| 分支 | 调研目标 |
|---|---|
| 复用vs重造(向内,优先级最高) | 步骤2的深度检查:传递依赖、框架/标准库内置功能、已覆盖该能力的供应商方案、内部单体库。主要是本地工作加针对性文档查询。直接终止权限——见下文。 |
| 标准方案 | 该品类的标准名称,以及所有对比文章都会列出的3-8个选项。Awesome列表、品类页面、“X vs Y”综合评测。 |
| 生态方案 | 适配当前项目语言的库与开源软件。包注册表、GitHub、框架原生方案。 |
| 商业方案 | 托管服务、开发工具、SaaS、云原生服务。包括没人提及的常规云方案。 |
| 用户反馈 | 从业者的真实评价:HN/Reddit帖子、“我们从X迁移了”、事后复盘、人们后悔选择某方案的原因。 |
| 反向论证 | 何时自行实现才是正确选择,以及成熟方案的已知失败模式。确保候选清单客观。 |
references/lanes.mdreferences/lanes.mdreferences/lanes.mdundefinedundefined| Option | Kind | Why it fits | Cost | What you give up | Adoption effort |
|---|---|---|---|---|---|
| OSS lib | Runs on the Postgres you already have; no new infra. | Free | Throughput ceiling vs. Redis-backed. | ~half a day |
| BullMQ | OSS lib | Mature, huge ecosystem, good observability. | Free + Redis | Requires Redis you don't run today. | ~2 days incl. infra |
| Trigger.dev | SaaS/OSS | Durable workflows + retries + UI out of the box. | Paid tier / self-host | New vendor; violates the stated constraint. | ~1 day hosted |
bullworker.ts:88
Then put the decision to the user with `ask_question`:
1. `Adopt <recommended option> and remove the hand-rolled version`
2. `Adopt, but keep the custom layer for <the part nothing covers>`
3. `Keep the custom implementation (record why)`
4. `Research further — different constraints or more options`
**Never rip out working code on your own initiative.** This skill reports and
recommends the buy-vs-build call. The user rules.| 选项 | 类型 | 适配原因 | 成本 | 取舍点 | 接入工作量 |
|---|---|---|---|---|---|
| 开源库 | 运行在你已有的Postgres上;无需新增基础设施。 | 免费 | 吞吐量上限低于Redis方案。 | 约半天 |
| BullMQ | 开源库 | 成熟、生态庞大、可观测性良好。 | 免费 + Redis | 需要你当前未部署的Redis。 | 约2天(含基础设施部署) |
| Trigger.dev | SaaS/开源 | 开箱即用的持久化工作流 + 重试 + UI。 | 付费版/自托管 | 新增供应商;违反既定约束。 | 约1天(托管版) |
bullworker.ts:88
然后通过`ask_question`让用户做出决策:
1. `采用<recommended option>并移除手动实现的版本`
2. `采用现有方案,但保留自定义层以实现<无方案覆盖的功能>`
3. `保留自定义实现(记录原因)`
4. `进一步调研——调整约束条件或查看更多选项`
**绝不能主动替换可用代码**。该技能仅报告并推荐外购vs自研的决策,最终决定权在用户手中。@vercel/queue-kit@vercel/queue-kit"tasks table with status column"p-retry"tasks table with status column"p-retry