openone-workflow-kit 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/CODE_OF_CONDUCT.md +25 -0
  3. package/CONTRIBUTING.md +51 -0
  4. package/INIT.md +81 -0
  5. package/LICENSE +201 -0
  6. package/NOTICE +6 -0
  7. package/README.md +195 -0
  8. package/SECURITY.md +39 -0
  9. package/bin/check-contract.cjs +137 -0
  10. package/bin/check-sanitized.cjs +93 -0
  11. package/bin/init-workspace.cjs +966 -0
  12. package/docs/assets/PROVENANCE.md +20 -0
  13. package/docs/assets/architecture.svg +112 -0
  14. package/docs/assets/hero.svg +83 -0
  15. package/docs/assets/quick-demo.svg +74 -0
  16. package/docs/assets/social-preview.svg +57 -0
  17. package/docs/assets/visual-manifest.json +52 -0
  18. package/docs/definition-of-done.md +80 -0
  19. package/docs/dual-track-workflow.md +90 -0
  20. package/docs/local-merge-notes.md +21 -0
  21. package/docs/maintainer-handoff.md +150 -0
  22. package/docs/manual-publish.md +119 -0
  23. package/docs/private-denylist.example.txt +11 -0
  24. package/docs/publication-decisions.md +36 -0
  25. package/docs/release-checklist.md +72 -0
  26. package/docs/releases/v0.1.0.md +70 -0
  27. package/docs/shareable-install.md +51 -0
  28. package/docs/tool-install-recipes.md +103 -0
  29. package/examples/ecommerce/team-profile.example.yaml +141 -0
  30. package/examples/education/team-profile.example.yaml +143 -0
  31. package/examples/saas-to-b/team-profile.example.yaml +130 -0
  32. package/examples/team-profile.example.yaml +69 -0
  33. package/install.sh +27 -0
  34. package/package.json +65 -0
  35. package/scripts/build-release.cjs +141 -0
  36. package/scripts/release-source-state.cjs +38 -0
  37. package/templates/AGENTS.template.md +26 -0
  38. package/test/release-readiness.cjs +214 -0
  39. package/test/smoke.cjs +272 -0
  40. package/workflow/adapters/README.md +16 -0
  41. package/workflow/core/README.md +38 -0
  42. package/workflow/core/capabilities/README.md +61 -0
  43. package/workflow/core/capabilities/acceptance-oracle-tracker.md +45 -0
  44. package/workflow/core/capabilities/branch-gatekeeper.md +57 -0
  45. package/workflow/core/capabilities/channel-experiment-tracker.md +32 -0
  46. package/workflow/core/capabilities/ci-cd-automation-governor.md +123 -0
  47. package/workflow/core/capabilities/contract-tracer.md +53 -0
  48. package/workflow/core/capabilities/data-change-safety-checker.md +52 -0
  49. package/workflow/core/capabilities/definition-lint.md +81 -0
  50. package/workflow/core/capabilities/deployment-readiness-checker.md +57 -0
  51. package/workflow/core/capabilities/impact-scope-analyzer.md +50 -0
  52. package/workflow/core/capabilities/knowledge-capture-maintainer.md +32 -0
  53. package/workflow/core/capabilities/market-evidence-grader.md +33 -0
  54. package/workflow/core/capabilities/memory-curator.md +48 -0
  55. package/workflow/core/capabilities/personal-git-operator.md +41 -0
  56. package/workflow/core/capabilities/personal-release-checklist.md +49 -0
  57. package/workflow/core/capabilities/prd-code-diff-checker.md +53 -0
  58. package/workflow/core/capabilities/protocol-state-machine-checker.md +57 -0
  59. package/workflow/core/capabilities/release-safety-checker.md +61 -0
  60. package/workflow/core/capabilities/repo-baseline-scanner.md +48 -0
  61. package/workflow/core/capabilities/rule-extractor.md +48 -0
  62. package/workflow/core/capabilities/runtime-evidence-triage.md +53 -0
  63. package/workflow/core/capabilities/security-reviewer.md +48 -0
  64. package/workflow/core/capabilities/test-evidence-reviewer.md +50 -0
  65. package/workflow/core/capabilities/ui-baseline-reviewer.md +50 -0
  66. package/workflow/core/capabilities/verify-app.md +51 -0
  67. package/workflow/core/capabilities/worktree-isolator.md +53 -0
  68. package/workflow/core/commands/01-/351/234/200/346/261/202/350/256/250/350/256/272.md +36 -0
  69. package/workflow/core/commands/02-/344/272/247/345/223/201/346/226/207/346/241/243.md +35 -0
  70. package/workflow/core/commands/02B-UI/350/256/276/350/256/241.md +75 -0
  71. package/workflow/core/commands/03-06-/347/240/224/345/217/221/345/207/206/345/244/207.md +30 -0
  72. package/workflow/core/commands/03-/346/212/200/346/234/257/346/236/266/346/236/204.md +32 -0
  73. package/workflow/core/commands/04-/344/273/243/347/240/201/345/256/236/347/216/260.md +32 -0
  74. package/workflow/core/commands/04A-/345/211/215/347/253/257/344/273/243/347/240/201/345/256/236/347/216/260.md +36 -0
  75. package/workflow/core/commands/04B-/345/220/216/347/253/257/344/273/243/347/240/201/345/256/236/347/216/260.md +31 -0
  76. package/workflow/core/commands/05-/344/273/243/347/240/201/345/256/241/346/237/245.md +31 -0
  77. package/workflow/core/commands/06-/346/265/213/350/257/225/347/224/250/344/276/213.md +34 -0
  78. package/workflow/core/commands/07-/346/265/213/350/257/225/346/211/247/350/241/214.md +33 -0
  79. package/workflow/core/commands/08-/345/217/221/345/270/203/345/207/206/345/244/207.md +44 -0
  80. package/workflow/core/commands/09-/345/217/221/345/270/203/346/211/247/350/241/214.md +39 -0
  81. package/workflow/core/commands/10-/345/244/215/347/233/230/346/200/273/347/273/223.md +41 -0
  82. package/workflow/core/commands/B1-B8-/345/225/206/344/270/232/345/214/226/345/207/206/345/244/207.md +30 -0
  83. package/workflow/core/commands/B1-/344/270/232/345/212/241/345/256/232/344/275/215.md +38 -0
  84. package/workflow/core/commands/B2-/345/225/206/344/270/232/346/250/241/345/274/217.md +38 -0
  85. package/workflow/core/commands/B3-PMF/344/270/216/345/256/242/346/210/267/347/224/273/345/203/217.md +39 -0
  86. package/workflow/core/commands/B4-/345/234/272/346/231/257/344/270/216/350/264/255/344/271/260/346/227/205/347/250/213.md +37 -0
  87. package/workflow/core/commands/B5-/346/270/240/351/201/223/346/274/217/346/226/227/346/230/240/345/260/204.md +39 -0
  88. package/workflow/core/commands/B6-/350/220/245/351/224/200/350/216/267/345/256/242/347/255/226/347/225/245.md +38 -0
  89. package/workflow/core/commands/B7-/350/220/245/351/224/200/351/242/204/347/256/227.md +36 -0
  90. package/workflow/core/commands/B8-/346/270/240/351/201/223/346/211/247/350/241/214/347/255/226/347/225/245.md +39 -0
  91. package/workflow/core/commands/B9-/347/255/226/347/225/245/345/244/215/347/233/230.md +38 -0
  92. package/workflow/core/commands/README.md +56 -0
  93. package/workflow/core/commands/init-workspace.md +29 -0
  94. package/workflow/core/commands/new-feature.md +33 -0
  95. package/workflow/core/commands/new-product.md +28 -0
  96. package/workflow/core/commands/workflow-status.md +30 -0
  97. package/workflow/core/commands//344/270/200/350/207/264/346/200/247/346/243/200/346/237/245.md +35 -0
  98. package/workflow/core/commands//344/272/244/344/273/230/350/207/263/345/256/214/346/210/220.md +40 -0
  99. package/workflow/core/commands//345/256/232/344/271/211/345/256/214/346/210/220.md +41 -0
  100. package/workflow/core/commands//346/276/204/346/270/205.md +31 -0
  101. package/workflow/core/templates/00-business-status.md +43 -0
  102. package/workflow/core/templates/00-workflow-status.md +50 -0
  103. package/workflow/core/templates/README.md +12 -0
  104. package/workflow/core/templates/business-stage-document.md +49 -0
  105. package/workflow/core/templates/completion-contract.md +114 -0
  106. package/workflow/core/templates/constitution.template.md +50 -0
  107. package/workflow/core/templates/living-spec.md +35 -0
  108. package/workflow/core/templates/stage-document.md +42 -0
  109. package/workflow/core/templates/team-profile.template.yaml +104 -0
@@ -0,0 +1,53 @@
1
+ # Capability: contract-tracer
2
+
3
+ - **Tier**: essential
4
+ - **Stage**: `/03`, `/05`
5
+ - **Purpose**: 追踪跨服务、跨层或前后端契约,防止只看 DTO、方法签名或兼容注解就结束审查。
6
+
7
+ ## 为什么需要
8
+
9
+ 字段、状态、金额、身份、权限等契约可能在入口层看似兼容,但在下游过滤、默认值、持久化或页面展示处发生偏移。关键契约必须从入口追到真实终点。
10
+
11
+ ## 输入
12
+
13
+ - PRD 和技术方案
14
+ - 真实 Git diff
15
+ - 受影响模块的调用链、引用关系或静态分析结果
16
+ - team-profile 中登记的跨仓、前后端或外部接口边界
17
+
18
+ ## 输出
19
+
20
+ ```yaml
21
+ result: PASS | WARN | BLOCK
22
+ contracts:
23
+ - name: "<contract>"
24
+ upstream_entry: "<file:line>"
25
+ downstream_terminals:
26
+ - "<file:line>"
27
+ predicates:
28
+ - "<file:line applies rule>"
29
+ verdict: pass | drift | block
30
+ missing_traces:
31
+ - "<无法追到终点的契约>"
32
+ ```
33
+
34
+ ## 阻断规则
35
+
36
+ - 涉及金额、身份、权限、订单、状态等关键字段但无法追到终点时阻断。
37
+ - 两个入口声称兼容但下游过滤、默认值或错误语义不同步时阻断。
38
+ - 追踪停止在第三方库或黑盒能力时,必须记录缺口并降级为 WARN。
39
+
40
+ ## Adapter 示例
41
+
42
+ - **L0**: 规定关键契约不能只看 DTO。
43
+ - **L1**: prompt 要求贴出入口到终点的调用链。
44
+ - **L2**: slash command 生成契约追踪表。
45
+ - **L3**: 静态分析 hook 暴露引用链。
46
+ - **L4**: subagent 跨文件追踪终点并给出结论。
47
+
48
+ ## 反模式
49
+
50
+ - 停在 DTO 或方法签名。
51
+ - 相信“兼容”字样而不查两条路径。
52
+ - 默认数据层过滤与入口层一致。
53
+ - 用单测通过替代端到端契约追踪。
@@ -0,0 +1,52 @@
1
+ # Capability: data-change-safety-checker
2
+
3
+ - **Tier**: recommended
4
+ - **Stage**: `/03`, `/05`, `/07`
5
+ - **Purpose**: 管理 DDL、DML、数据修复和迁移脚本的交付位置、预检查、后检查、幂等性和回滚口径。
6
+
7
+ ## 为什么需要
8
+
9
+ 数据变更一旦混在业务源码目录或缺少执行前后校验,容易在发布时丢失、重复执行或影响错误数据。工作流需要把数据变更当作独立交付资产管理,而不是临时 SQL 片段。
10
+
11
+ ## 输入
12
+
13
+ - 需求的数据影响说明
14
+ - 数据库 / 表 / 字段 / 索引 / 初始化数据变更清单
15
+ - 目标项目定义的 release artifact 目录或数据库变更流程
16
+ - 执行前查询、执行后校验和回滚策略
17
+
18
+ ## 输出
19
+
20
+ ```yaml
21
+ result: PASS | WARN | BLOCK
22
+ data_changes:
23
+ - type: DDL | DML | migration | repair
24
+ asset_path: "<交付脚本路径>"
25
+ target_scope: "<目标库表或数据范围>"
26
+ precheck: "<执行前检查>"
27
+ postcheck: "<执行后验证>"
28
+ idempotency: "<可重复执行风险>"
29
+ rollback: "<回滚口径>"
30
+ ```
31
+
32
+ ## 阻断规则
33
+
34
+ - 数据脚本放在业务源码目录且 team-profile 未授权该位置时,阻断交付。
35
+ - 缺少执行前范围确认、执行后验证或回滚说明时,阻断上线结论。
36
+ - DML / 数据修复只依据估算行数时,必须补同条件 `COUNT` 或等价核查;否则降级为 WARN 或 BLOCK。
37
+ - 只检查数据库列类型、不检查应用实体 / 映射类型时,不能关闭类型兼容风险。
38
+
39
+ ## Adapter 示例
40
+
41
+ - **L0**: 在架构和审查模板中固定数据变更表。
42
+ - **L1**: prompt 要求补齐 precheck、postcheck、rollback。
43
+ - **L2**: slash command 扫描 diff 中的 SQL / migration 文件并生成清单。
44
+ - **L3**: hook 阻止未登记的数据脚本进入完成状态。
45
+ - **L4**: subagent 专门做数据变更安全审查。
46
+
47
+ ## 反模式
48
+
49
+ - 把 SQL 临时放进业务仓根目录。
50
+ - 没有目标范围就执行数据修复。
51
+ - 只写“可回滚”,没有回滚 SQL 或业务口径。
52
+ - 用构建通过替代数据兼容验证。
@@ -0,0 +1,81 @@
1
+ # Definition Lint
2
+
3
+ ## Purpose
4
+
5
+ Gate contract freezing on an eight-dimension completeness check, and compensate for a solo developer's knowledge blind spots with a per-project-type "definition interview" question bank. A contract that has not passed this lint (or received explicit user waivers) must not be frozen, and implementation must not start on it.
6
+
7
+ ## Sources
8
+
9
+ - `features/{feature}/00-完成合同.md` draft and its upstream stage documents
10
+ - `workflow/constitution.md`, `workflow/standards/`, workspace-level `specs/`
11
+ - `workflow/core/templates/completion-contract.md`
12
+
13
+ ## The Eight Dimensions
14
+
15
+ | # | 维度 | 通过标准 |
16
+ | --- | --- | --- |
17
+ | 1 | 数据流确定性 | 写清数据来源、去向、唯一真相源;关键实体有状态机与不变量;无"数据大概存一下"式描述 |
18
+ | 2 | 失败路径闭环 | 失败路径表覆盖弱网/超时重试与幂等、并发冲突、进程中断、配额耗尽、非法输入、依赖故障;不适用项写明理由 |
19
+ | 3 | 质量预算 | 性能/资源/成本/依赖/安全至少各有一条硬数字或显式"无约束+理由";无"性能要好"式描述 |
20
+ | 4 | Oracle 可复现 | 每条目标 ≥1 条 Oracle 覆盖;每条 Oracle 有可复现验证方法;auto 优先;≥1 条 blocking;manual 带步骤与判定标准 |
21
+ | 5 | 歧义消融 | 模糊词(快/流畅/稳定/好用/优雅/高性能/健壮/无缝/及时/大量)全部绑定数字或可观察行为;术语表覆盖有歧义风险的词;无未解决 `[待澄清]` |
22
+ | 6 | 体验质量线 | 有 UI 的需求:三态(空/错/载)、感知性能、可访问性最低线有可检查表述,且保留 ≥1 条 manual 体验 Oracle(S 档或纯后端可豁免) |
23
+ | 7 | 北极星挂钩 | 存在 `business/{product}/` 基线时,写明预期移动的漏斗指标;无基线时记录缺口而非编造 |
24
+ | 8 | 影响边界 | 允许改/禁止碰清单明确;引用 constitution 与 standards 适用条款;受影响契约对照 `specs/` 列出 |
25
+
26
+ 清单可扩展:项目发现新维度时,在合同 Lint 表追加行并在复盘时提议回流本能力文件。
27
+
28
+ ## Definition Interview(按项目类型的拷问清单)
29
+
30
+ 逐题回答"已定义 / 不适用+理由 / 待澄清",不允许跳过。目的:开发者不懂重试、幂等、内存模型没关系——问题清单逼着把它们变成合同条款或显式假设。
31
+
32
+ **通用(所有类型必问)**
33
+ - 最大输入是什么(大小/数量/长度)?超过时发生什么?
34
+ - 操作可以被安全地重复执行吗(幂等)?重复会造成什么?
35
+ - 进程/页面在操作中途被杀,重启后状态是什么?
36
+ - 哪些数据丢了无法恢复?备份/导出口径是什么?
37
+ - 单用户/单请求的成本上限是多少?被滥用时怎么止损?
38
+
39
+ **Web 应用 / API 服务**
40
+ - 弱网与超时:客户端重试吗?服务端如何去重?
41
+ - 并发写同一资源:最后写赢、锁、还是合并?用户看到什么?
42
+ - 鉴权失效瞬间正在进行的操作如何收场?
43
+ - P95 延迟与首屏目标是多少?在什么设备/网络下测?
44
+
45
+ **CLI 工具**
46
+ - 非交互环境(CI、管道)下行为如何?退出码约定?
47
+ - 中断(Ctrl+C)后留下什么状态?能续跑吗?
48
+ - 破坏性操作有没有 dry-run 和确认?
49
+
50
+ **浏览器扩展**
51
+ - 页面结构变化(选择器失效)时的降级行为?
52
+ - 权限最小集是什么?商店审核红线检查过吗?
53
+ - 存储配额满、跨设备同步冲突怎么办?
54
+
55
+ **移动应用**
56
+ - 离线/弱网下哪些功能可用?数据何时同步、冲突怎么解?
57
+ - 被系统杀进程后恢复到哪一步?推送权限被拒的替代路径?
58
+ - 冷启动时间与包体上限是多少?
59
+
60
+ **MCP / Agent 服务**
61
+ - 工具调用是否幂等?部分成功如何表达?
62
+ - 上游模型/服务超时与限流的重试和退避策略?
63
+ - 长任务的进度、取消与状态查询口径?
64
+
65
+ **静态站点 / 内容**
66
+ - 构建失败或数据源缺失时发布什么?
67
+ - SEO 元数据与结构化数据的验收标准?
68
+
69
+ ## Rules
70
+
71
+ - Lint runs before freezing; every dimension gets an explicit conclusion in the contract's Lint table: 通过 / 未过+缺口 / 豁免+用户确认。
72
+ - A waiver requires the user's explicit confirmation and a recorded risk note; the agent must not self-waive.
73
+ - Interview answers that surface new constraints must be written back into the contract sections, not left in chat.
74
+ - S-tier contracts lint only the ★ sections plus dimension 4 and 5 (oracles and ambiguity are never skippable).
75
+
76
+ ## Failure Modes
77
+
78
+ - Rubber-stamping: marking dimensions 通过 without quoting the contract text that satisfies them.
79
+ - Freezing with unresolved `[待澄清]` items "to save time".
80
+ - Writing quality budgets as aspirations ("尽量快") instead of numbers.
81
+ - Treating the interview as a form to fill instead of constraints to encode into oracles.
@@ -0,0 +1,57 @@
1
+ # Capability: deployment-readiness-checker
2
+
3
+ - **Tier**: recommended
4
+ - **Stage**: `/07`, `/08`, `/09`
5
+ - **Purpose**: 区分构建成功、启动成功、部署生效和路由可达,避免把任一单点成功误写成“已上线可用”。
6
+
7
+ ## 为什么需要
8
+
9
+ 常见误判是:构建通过就认为部署成功,或测试环境无报错就认为新代码已经生效。部署有效性必须拆成至少四层证据:构建产物、进程 / 实例启动、目标环境加载到新版本、代表性入口可达。
10
+
11
+ ## 输入
12
+
13
+ - `workflow/team-profile.yaml#repos[*]`
14
+ - 发布或测试目标环境说明
15
+ - 构建、启动、部署、路由或健康检查命令
16
+ - `/07-测试执行`、`/08-发布准备` 或 `/09-发布执行` 的执行证据
17
+
18
+ ## 输出
19
+
20
+ ```yaml
21
+ result: PASS | WARN | BLOCK
22
+ checks:
23
+ - name: build_artifact
24
+ status: pass | fail | not-run
25
+ evidence: "<命令、日志或产物路径>"
26
+ - name: instance_started
27
+ status: pass | fail | not-run
28
+ evidence: "<启动日志、健康检查或进程证据>"
29
+ - name: deployed_version_effective
30
+ status: pass | fail | not-run
31
+ evidence: "<版本、commit、包名或页面资源证据>"
32
+ - name: representative_route_reachable
33
+ status: pass | fail | not-run
34
+ evidence: "<API、页面、静态资源或探针结果>"
35
+ blocked_reason: "..."
36
+ ```
37
+
38
+ ## 阻断规则
39
+
40
+ - 新接口、新页面或新任务没有任何可达性证据时,阻断上线结论。
41
+ - 构建成功但启动失败、实例未替换、路由未命中或版本无法确认时,不得写“部署已生效”。
42
+ - 只能做人工验证时,必须记录执行人、步骤、时间和观察结果;否则降级为 WARN。
43
+
44
+ ## Adapter 示例
45
+
46
+ - **L0**: 在上线检查清单中固定四层证据。
47
+ - **L1**: prompt 要求用户粘贴构建、启动、版本和可达性结果。
48
+ - **L2**: slash command 根据 team-profile 生成环境检查表。
49
+ - **L3**: hook 阻止缺少可达性证据的上线状态变更。
50
+ - **L4**: subagent 专门整理部署证据并给出 Go / No-Go。
51
+
52
+ ## 反模式
53
+
54
+ - 把 `build success` 写成“部署成功”。
55
+ - 只看旧接口可达,不检查新入口。
56
+ - 404 时只猜测代码问题,不区分未部署、路由未配置、上下文路径错误和权限拦截。
57
+ - 没有版本证据就声称目标环境已加载新代码。
@@ -0,0 +1,50 @@
1
+ # Capability: impact-scope-analyzer
2
+
3
+ - **Tier**: recommended
4
+ - **Stage**: `/03`
5
+ - **Purpose**: 扫描需求影响面,覆盖仓库、API、UI、数据、配置、任务、消息、测试和发布资产。
6
+
7
+ ## 为什么需要
8
+
9
+ 需求遗漏通常不是单点代码问题,而是影响面没画全。架构阶段必须把调用链、仓库边界、数据边界和验证边界列清楚,后续实现和审查才有依据。
10
+
11
+ ## 输入
12
+
13
+ - PRD、需求讨论和技术方案
14
+ - 本地代码、文档和 team-profile 中登记的项目资料
15
+ - 用户补充的影响端、影响仓库或接口说明
16
+
17
+ ## 输出
18
+
19
+ ```yaml
20
+ result: PASS | WARN
21
+ scope:
22
+ repos: ["..."]
23
+ apis: ["..."]
24
+ ui_surfaces: ["..."]
25
+ data_changes: ["..."]
26
+ config_changes: ["..."]
27
+ jobs_or_messages: ["..."]
28
+ tests: ["..."]
29
+ unknowns:
30
+ - "<需确认的影响面>"
31
+ ```
32
+
33
+ ## 阻断规则
34
+
35
+ 本能力通常不直接阻断,但高影响未知项必须在文档中显式记录。若未知项涉及数据写入、鉴权、安全、发布或生产配置,应交给对应高风险能力处理。
36
+
37
+ ## Adapter 示例
38
+
39
+ - **L0**: 在 `/03` 中固定影响面矩阵。
40
+ - **L1**: prompt 按层级提问。
41
+ - **L2**: slash command 结合代码搜索生成草稿。
42
+ - **L3**: hook 检查 04 前是否存在影响面矩阵。
43
+ - **L4**: subagent 跨仓补全影响面。
44
+
45
+ ## 反模式
46
+
47
+ - 只写“改后端”或“改前端”,没有仓库和文件级边界。
48
+ - 架构阶段记录一次后,后续 diff 变化不回看。
49
+ - 忽略配置、数据脚本、定时任务和发布资产。
50
+ - 未知项不写入文档。
@@ -0,0 +1,32 @@
1
+ # Knowledge Capture Maintainer
2
+
3
+ ## Purpose
4
+
5
+ Keep durable knowledge in a maintained Markdown layer instead of scattering high-value lessons across chats and one-off notes.
6
+
7
+ ## Sources
8
+
9
+ - `features/{feature}/10-复盘总结.md`
10
+ - Project README / CHANGELOG / release notes when intended to be public.
11
+ - `llm-wiki-pilot/wiki/` or another user-designated Markdown wiki.
12
+ - Obsidian Vault notes when the user explicitly asks to use that vault.
13
+
14
+ ## Rules
15
+
16
+ - Raw source material remains the source of truth; wiki pages are summaries and decision records.
17
+ - Update index and log files together when the target wiki has that convention.
18
+ - Do not ingest secrets, personal tokens, private URLs, payment details, ticket IDs, QR codes, receipt identifiers, or private chat text.
19
+ - Preserve provenance by linking or naming the local source file that supports each reusable lesson.
20
+ - Keep project docs and workflow docs under `features/<feature>/` unless they are intentionally public code-facing docs.
21
+
22
+ ## Suggested Outputs
23
+
24
+ - A concise "Reusable Rules" section in the retrospective.
25
+ - A wiki page update for stable lessons that will be useful across projects.
26
+ - A follow-up issue or TODO for unstable lessons that need more evidence.
27
+
28
+ ## Failure Modes
29
+
30
+ - Treating a wiki summary as stronger than the source code, tests, or release evidence.
31
+ - Importing raw private content instead of extracting task-relevant lessons.
32
+ - Updating a wiki page without updating its index or maintenance log.
@@ -0,0 +1,33 @@
1
+ # Market Evidence Grader
2
+
3
+ ## Purpose
4
+
5
+ Keep market, competitor, and customer conclusions anchored to graded evidence instead of fabricated or unsourced claims, so solo developers do not build positioning, pricing, or channel plans on invented data.
6
+
7
+ ## Sources
8
+
9
+ - `business/{product}/B1-业务定位.md` through `B9-策略复盘.md` drafts
10
+ - User interviews, support threads, and usage analytics owned by the user
11
+ - Public competitor pages, pricing pages, changelogs, and community discussions
12
+ - Public reports and search or trend data
13
+
14
+ ## Rules
15
+
16
+ - Grade every market claim as first-hand (own interviews or data), second-hand (public sources), or inference; unlabeled claims are treated as inference.
17
+ - Every second-hand claim carries a source name and collection date; every first-hand claim carries sample size and time range.
18
+ - Never fabricate market size, user quotes, competitor prices, reviews, or channel benchmarks; unknown stays unknown and goes to the evidence-gap list.
19
+ - Order-of-magnitude market estimates are allowed only with the estimation method and inputs written out.
20
+ - Downgrade or re-verify conclusions when evidence is stale; check capture dates before reusing claims across stages.
21
+ - PMF, ICP, pricing, and channel decisions must cite the evidence rows they depend on.
22
+
23
+ ## Suggested Outputs
24
+
25
+ - An evidence table (claim, grade, source, date, confidence) inside the stage document.
26
+ - An explicit evidence-gap and unvalidated-assumption list feeding `/B3-PMF与客户画像` and `/B9-策略复盘`.
27
+
28
+ ## Failure Modes
29
+
30
+ - Writing "the market is huge" style conclusions with no source or method.
31
+ - Treating one enthusiastic user quote as PMF evidence.
32
+ - Copying competitor pricing without a capture date, then reusing it after it changed.
33
+ - Backfilling numbers to justify a channel or budget decision that was already made.
@@ -0,0 +1,48 @@
1
+ # Capability: memory-curator
2
+
3
+ - **Tier**: optional
4
+ - **Stage**: `/10`
5
+ - **Purpose**: 从复盘中提取可复用经验,脱敏后沉淀为结构化记忆,避免经验只留在单个项目里。
6
+
7
+ ## 为什么需要
8
+
9
+ 复盘如果只写事件经过,很难复用。可复用记忆应抽象为:现象、根因、防护规则、触发条件和适用边界,并移除公司、客户、仓库、URL、日志、SQL 等私有信息。
10
+
11
+ ## 输入
12
+
13
+ - `10-复盘总结.md`
14
+ - 当前个人项目的记忆索引或知识库
15
+ - 脱敏词表和对外分发边界
16
+
17
+ ## 输出
18
+
19
+ ```yaml
20
+ result: PASS | WARN
21
+ memories:
22
+ - phenomenon: "<现象>"
23
+ root_cause: "<根因>"
24
+ prevention: "<预防规则>"
25
+ trigger: "<何时适用>"
26
+ redaction: "<已脱敏内容>"
27
+ questions:
28
+ - "<需要人工确认是否固化为规则的问题>"
29
+ ```
30
+
31
+ ## 阻断规则
32
+
33
+ 本能力不直接阻断交付。任何记忆写入前都必须完成脱敏检查;是否进入个人规则、项目 wiki 或公开文档由用户确认。
34
+
35
+ ## Adapter 示例
36
+
37
+ - **L0**: 复盘模板固定“可复用经验”章节。
38
+ - **L1**: prompt 输出结构化记忆候选。
39
+ - **L2**: slash command 写入待审记忆文件。
40
+ - **L3**: hook 扫描私有词。
41
+ - **L4**: subagent 专门做复盘抽象和脱敏。
42
+
43
+ ## 反模式
44
+
45
+ - 直接复制事故原文。
46
+ - 记录真实客户、仓库、URL、日志或 SQL。
47
+ - 只写长段感想,没有规则候选。
48
+ - 把一次性特例升级成通用硬规则。
@@ -0,0 +1,41 @@
1
+ # Personal Git Operator
2
+
3
+ ## Purpose
4
+
5
+ Allow agents to handle routine local Git mechanics for personal projects without importing team-scale manual-only constraints.
6
+
7
+ ## Applies When
8
+
9
+ - The target repository is owned and used by the personal developer.
10
+ - The task scope is already recorded in the current workflow stage.
11
+ - The working tree state has been inspected.
12
+ - The operation is local: branch naming/creation, commit, tag, local merge, or worktree creation.
13
+
14
+ ## Agent-Allowed Local Actions
15
+
16
+ - Create a local branch from `prod`, usually `feature/<short-name>`, `fix/<short-name>`, or `chore/<short-name>`.
17
+ - Create an isolated local worktree for same-repo parallel implementation.
18
+ - Stage and commit scoped changes after review and verification.
19
+ - Create local annotated tags such as `vX.Y.Z` after `/08-发布准备` records version evidence.
20
+ - Merge a completed development branch into local `main`, and promote local `main` into local `prod`, when tests and release readiness are recorded.
21
+
22
+ ## Actions Requiring Explicit User Authorization
23
+
24
+ - `git fetch`, `git pull`, `git push`, `git remote add/set-url`, remote branch creation/deletion, remote tag push, GitHub release creation, npm publish, app store submission, deployment, database write, and production config write.
25
+ - Rewriting history, deleting branches, force pushing, or deleting tags.
26
+ - Any operation touching a repo that is not clearly personal.
27
+
28
+ ## Checks
29
+
30
+ 1. Inspect `git status --short --branch`.
31
+ 2. Confirm the current branch and target branch match `workflow/team-profile.yaml#branch_model`.
32
+ 3. Confirm no unrelated user changes would be staged or overwritten.
33
+ 4. Run relevant tests/builds before commit, tag, local merge, or release preparation.
34
+ 5. Record the exact branch/tag/commit in `features/{feature}/`.
35
+
36
+ ## Failure Modes
37
+
38
+ - Treating "personal project" as permission to push or deploy without authorization.
39
+ - Staging unrelated user changes because the working tree was not inspected.
40
+ - Creating tags before version, artifact, and release notes are aligned.
41
+ - Using a `test` branch when `main` is already the personal integration branch.
@@ -0,0 +1,49 @@
1
+ # Personal Release Checklist
2
+
3
+ ## Purpose
4
+
5
+ Capture the independent-developer release discipline migrated from the local gstack guide: local integration, version alignment, tags, artifacts, channel-specific checks, documentation, and rollback.
6
+
7
+ ## Required Evidence
8
+
9
+ - Release scope and excluded changes.
10
+ - Clean or intentionally staged working tree.
11
+ - Release candidate commit.
12
+ - Test/build/lint/browser or platform-specific verification.
13
+ - Version number and tag plan.
14
+ - Artifact path, package path, or deployment target.
15
+ - Rollback point and rollback command.
16
+
17
+ ## Branch And Tag Model
18
+
19
+ - `prod`: production or last-published branch.
20
+ - `main`: integration/testing branch.
21
+ - Development branch: created from `prod`, usually `feature/<short-name>` or `fix/<short-name>`.
22
+ - Tag: annotated `vX.Y.Z`, aligned with package, app, extension, or store version.
23
+
24
+ ## Channel Checks
25
+
26
+ ### Web / SaaS
27
+
28
+ - Build and smoke test the production bundle.
29
+ - Confirm environment variables and secrets are not committed.
30
+ - Record deployment provider, preview URL, production URL, and rollback method.
31
+
32
+ ### Browser Extension
33
+
34
+ - Bump `manifest.json` version.
35
+ - Validate permissions and host permissions.
36
+ - Ensure 16 / 48 / 128 icons exist.
37
+ - Package a zip whose root contains `manifest.json`.
38
+ - Exclude `.git`, `node_modules`, tests, docs, zip files, `.DS_Store`, and private notes.
39
+ - Prepare store listing, screenshots, privacy statement, and "no remote code" answer when true.
40
+
41
+ ### CLI / Desktop / Mobile
42
+
43
+ - Align binary/app version, release notes, and tag.
44
+ - Record packaging command and artifact checksum when practical.
45
+ - Record notarization, signing, app store, or platform-specific pending review state.
46
+
47
+ ## Authorization Boundary
48
+
49
+ Agents may prepare local artifacts and local tags for personal projects. Remote push, release creation, store submission, deployment, and production config writes require explicit user authorization in the current task.
@@ -0,0 +1,53 @@
1
+ # Capability: prd-code-diff-checker
2
+
3
+ - **Tier**: essential
4
+ - **Stage**: `/04`, `/04A`, `/04B`, `/05`
5
+ - **Purpose**: 对比 PRD、技术方案和真实 diff,确保“文档说要做的”和“代码实际改的”一致。
6
+
7
+ ## 为什么需要
8
+
9
+ 只看 diff 容易漏掉产品目标,只看 PRD 又容易忽略实际代码越界。实现结束和审查阶段必须双向核对:需求项是否都有代码落点,代码改动是否都有需求或技术依据。
10
+
11
+ ## 输入
12
+
13
+ - `02-产品文档.md`
14
+ - `03-技术架构.md`
15
+ - `04/04A/04B` 实现记录
16
+ - 真实 Git diff 或用户提供的变更清单
17
+ - 测试和验证结果
18
+
19
+ ## 输出
20
+
21
+ ```yaml
22
+ result: PASS | WARN | BLOCK
23
+ requirements:
24
+ - id: "<PRD item>"
25
+ expected: "<预期行为>"
26
+ implementation: "<file:line 或 diff 摘要>"
27
+ verdict: covered | partial | missing
28
+ extra_diffs:
29
+ - file: "<file>"
30
+ reason: "<为何不在 PRD 范围内>"
31
+ blocked_reason: "..."
32
+ ```
33
+
34
+ ## 阻断规则
35
+
36
+ - P0/P1 需求项没有实现落点且无明确延期说明时阻断。
37
+ - 真实 diff 包含 PRD 和技术方案均未覆盖的业务行为变更时阻断。
38
+ - 测试只覆盖新增代码但不覆盖需求验收口径时降级为 WARN 或 BLOCK。
39
+
40
+ ## Adapter 示例
41
+
42
+ - **L0**: 审查模板固定 PRD-diff 对照表。
43
+ - **L1**: prompt 要求逐项列出需求、文件和验证。
44
+ - **L2**: slash command 生成对照表草稿。
45
+ - **L3**: hook 检查 05 文档是否记录 diff 覆盖结果。
46
+ - **L4**: subagent 独立做 PRD 和 diff 的双向比对。
47
+
48
+ ## 反模式
49
+
50
+ - 只审 diff,不回看 PRD。
51
+ - 只复述 PRD,不读取真实改动。
52
+ - 把“代码能跑”当成“需求已覆盖”。
53
+ - 对额外改动不解释来源。
@@ -0,0 +1,57 @@
1
+ # Capability: protocol-state-machine-checker
2
+
3
+ - **Tier**: recommended
4
+ - **Stage**: `/03`, `/05`, `/07`
5
+ - **Purpose**: 对第三方接口、异步回调、支付 / 账务 / 审批等多步协议建立状态机,明确前置条件、终态语义、幂等和失败处理。
6
+
7
+ ## 为什么需要
8
+
9
+ 多步协议最容易出现“HTTP 成功但业务未完成”“本地字段被当成权威事实”“失败关键字先于幂等成功判断”等问题。状态机能把每一步的输入、输出、可重试性和终态定义清楚。
10
+
11
+ ## 输入
12
+
13
+ - 协议文档、样例报文或真实联调样例
14
+ - 当前实现 diff 和状态字段
15
+ - 本地记录与外部权威记录的关系说明
16
+ - 可执行的单测、模拟器或人工验证证据
17
+
18
+ ## 输出
19
+
20
+ ```yaml
21
+ result: PASS | WARN | BLOCK
22
+ states:
23
+ - name: "<状态>"
24
+ meaning: "<业务含义>"
25
+ terminal: true | false
26
+ retryable: true | false
27
+ transitions:
28
+ - from: "<状态>"
29
+ event: "<事件>"
30
+ to: "<状态>"
31
+ idempotency: "<幂等规则>"
32
+ authority: local | external | mixed
33
+ blocking_gaps:
34
+ - "<缺少样例、终态或幂等说明>"
35
+ ```
36
+
37
+ ## 阻断规则
38
+
39
+ - 没有真实样例或明确协议口径时,不得把关键状态逻辑标记为已验收;只能写待联调或待补证据。
40
+ - HTTP / RPC 成功不能直接等同于业务终态成功。
41
+ - 外部系统是权威账本或权威状态源时,本地错误原因、备注或缓存只能作为展示线索,不能作为修复依据。
42
+ - 幂等成功、重复通知、已处理完成等语义必须先于泛化失败关键字判断。
43
+
44
+ ## Adapter 示例
45
+
46
+ - **L0**: 在 `/03` 固定状态机表格。
47
+ - **L1**: prompt 要求补齐状态、事件、终态、幂等、权威来源。
48
+ - **L2**: slash command 从协议说明和 diff 中生成初始状态机。
49
+ - **L3**: hook 检查关键状态字段是否有测试或人工证据。
50
+ - **L4**: subagent 专门审查协议状态机和异常路径。
51
+
52
+ ## 反模式
53
+
54
+ - 只按字段名猜测业务语义。
55
+ - 把本地失败原因当成外部权威结果。
56
+ - 没有真实样例就写“联调通过”。
57
+ - 只测正常路径,不测重复通知、超时、逆序和部分成功。