@geminix/gxpm 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 (299) hide show
  1. package/AGENTS.md +148 -0
  2. package/CANON.md +53 -0
  3. package/CLAUDE.md +60 -0
  4. package/CONTEXT.md +49 -0
  5. package/DEBUG.md +59 -0
  6. package/ISSUE_CONTEXT.md +25 -0
  7. package/README.md +143 -0
  8. package/VERSION +1 -0
  9. package/agents/cleanup-auditor/cleanup-auditor.md +56 -0
  10. package/agents/grill-master.md +26 -0
  11. package/agents/implementer.md +32 -0
  12. package/agents/review-army/accessibility-reviewer.md +54 -0
  13. package/agents/review-army/code-quality-reviewer.md +54 -0
  14. package/agents/review-army/security-reviewer.md +56 -0
  15. package/agents/review-army/spec-compliance-reviewer.md +51 -0
  16. package/agents/review-army/test-reviewer.md +55 -0
  17. package/agents/reviewer.md +59 -0
  18. package/agents/ship-audit-army/docs-auditor.md +53 -0
  19. package/agents/ship-audit-army/performance-auditor.md +52 -0
  20. package/agents/ship-audit-army/security-auditor.md +52 -0
  21. package/agents/specifier.md +55 -0
  22. package/agents/triage-officer.md +27 -0
  23. package/bin/gxpm +17 -0
  24. package/bin/gxpm-browser +17 -0
  25. package/bin/gxpm-config +15 -0
  26. package/bin/gxpm-eval +13 -0
  27. package/bin/gxpm-global-discover +15 -0
  28. package/bin/gxpm-init +38 -0
  29. package/bin/gxpm-investigate +194 -0
  30. package/bin/gxpm-uninstall +15 -0
  31. package/bin/gxpm-update-check +165 -0
  32. package/commands/build.md +40 -0
  33. package/commands/help.md +53 -0
  34. package/commands/plan.md +34 -0
  35. package/commands/refine.md +46 -0
  36. package/commands/review.md +34 -0
  37. package/commands/ship.md +37 -0
  38. package/core/ac-check.ts +20 -0
  39. package/core/agent-runtime.ts +363 -0
  40. package/core/artifact-validator.ts +151 -0
  41. package/core/artifacts.ts +313 -0
  42. package/core/autopilot.ts +250 -0
  43. package/core/capabilities.ts +779 -0
  44. package/core/checkpoint.ts +370 -0
  45. package/core/cleanup.ts +32 -0
  46. package/core/command-probe.ts +82 -0
  47. package/core/config.ts +533 -0
  48. package/core/contracts/behavior-spec.schema.ts +38 -0
  49. package/core/contracts/converter.ts +61 -0
  50. package/core/contracts/host.ts +43 -0
  51. package/core/converters/converter.ts +93 -0
  52. package/core/converters/index.ts +8 -0
  53. package/core/converters/managed-artifact.ts +119 -0
  54. package/core/converters/parser.ts +159 -0
  55. package/core/converters/template-renderer.ts +35 -0
  56. package/core/converters/writer.ts +61 -0
  57. package/core/dag-executor.ts +426 -0
  58. package/core/dag-loader.ts +292 -0
  59. package/core/dag-schemas.ts +150 -0
  60. package/core/dispatch.ts +125 -0
  61. package/core/evidence.ts +148 -0
  62. package/core/gate.ts +269 -0
  63. package/core/hook-engine.ts +566 -0
  64. package/core/host-probe.ts +64 -0
  65. package/core/implement.ts +16 -0
  66. package/core/isolation-errors.ts +174 -0
  67. package/core/isolation-resolver.ts +921 -0
  68. package/core/issue-context.ts +381 -0
  69. package/core/issue-readiness.ts +457 -0
  70. package/core/issue-sync.ts +427 -0
  71. package/core/issues.ts +132 -0
  72. package/core/land.ts +108 -0
  73. package/core/orchestrator.ts +54 -0
  74. package/core/phase-artifact.ts +32 -0
  75. package/core/phase-gates.ts +130 -0
  76. package/core/phase-rewind.ts +94 -0
  77. package/core/plan-lint.ts +61 -0
  78. package/core/plan.ts +77 -0
  79. package/core/port-allocation.ts +50 -0
  80. package/core/pr-check.ts +15 -0
  81. package/core/preset-system/preset-resolver.ts +221 -0
  82. package/core/project-init-status.ts +127 -0
  83. package/core/qa.ts +15 -0
  84. package/core/resilience.ts +165 -0
  85. package/core/runs.ts +288 -0
  86. package/core/safe-path.test.ts +80 -0
  87. package/core/safe-path.ts +60 -0
  88. package/core/sdd-gate.test.ts +98 -0
  89. package/core/sdd-gate.ts +134 -0
  90. package/core/self-review.ts +62 -0
  91. package/core/session.ts +70 -0
  92. package/core/ship.ts +86 -0
  93. package/core/specify.ts +173 -0
  94. package/core/state.ts +1002 -0
  95. package/core/template-engine.ts +152 -0
  96. package/core/template-resolver.test.ts +70 -0
  97. package/core/template-resolver.ts +156 -0
  98. package/core/triage.ts +26 -0
  99. package/core/verify.ts +15 -0
  100. package/core/wiki-native.ts +2423 -0
  101. package/core/wiki.ts +27 -0
  102. package/core/workflow-event-emitter.ts +163 -0
  103. package/core/workflows/engine.ts +273 -0
  104. package/core/workflows/expressions.ts +76 -0
  105. package/core/workflows/index.ts +38 -0
  106. package/core/workflows/steps/command.ts +43 -0
  107. package/core/workflows/steps/gate.ts +47 -0
  108. package/core/workflows/steps/gxpm.ts +44 -0
  109. package/core/workflows/steps/linear.ts +31 -0
  110. package/core/workflows/steps/shell.ts +65 -0
  111. package/core/workflows/types.ts +62 -0
  112. package/core/workspace-runtime.ts +227 -0
  113. package/core/worktree-init-steps.ts +647 -0
  114. package/core/worktree-init.ts +330 -0
  115. package/core/worktree-owner.ts +143 -0
  116. package/docs/GXPM_VERIFY.md +98 -0
  117. package/docs/INSTALL_FOR_AGENTS.md +113 -0
  118. package/docs/README.md +57 -0
  119. package/docs/adr/adr-005-multi-platform-skill-converter.md +72 -0
  120. package/docs/agents/domain.md +30 -0
  121. package/docs/agents/issue-tracker.md +30 -0
  122. package/docs/agents/triage-labels.md +32 -0
  123. package/docs/architecture/gxpm-architecture-diagram.md +265 -0
  124. package/docs/architecture/gxpm-current-architecture.md +175 -0
  125. package/docs/architecture/gxpm-current-flow.md +278 -0
  126. package/docs/architecture/gxpm-replacement-architecture.md +211 -0
  127. package/docs/architecture/gxpm-target-architecture.md +449 -0
  128. package/docs/architecture/gxpm-v0-contract.md +311 -0
  129. package/docs/architecture/layered-workflow-boundaries.md +193 -0
  130. package/docs/architecture/preset-system.md +126 -0
  131. package/docs/architecture/scaffold-northstar.md +23 -0
  132. package/docs/brainstorms/2026-05-14-bdd-then-tdd-design.md +320 -0
  133. package/docs/brainstorms/README.md +22 -0
  134. package/docs/brainstorms/docs-knowledge-system-requirements.md +29 -0
  135. package/docs/governance/beta-skill-promotion.md +39 -0
  136. package/docs/governance/development-contract.md +144 -0
  137. package/docs/governance/gherkin-style.md +90 -0
  138. package/docs/governance/host-adapter.md +56 -0
  139. package/docs/governance/skill-authoring.md +87 -0
  140. package/docs/governance/skill-testing.md +356 -0
  141. package/docs/governance/template-authoring.md +53 -0
  142. package/docs/migrations/v0.2.md +51 -0
  143. package/docs/plans/README.md +23 -0
  144. package/docs/plans/bdd-then-tdd-plan.md +1767 -0
  145. package/docs/plans/docs-knowledge-system-plan.md +31 -0
  146. package/docs/plans/spec-kit-sdd-adoption-plan.md +305 -0
  147. package/docs/research/agents-md-best-practices.md +207 -0
  148. package/docs/research/archon-study.md +351 -0
  149. package/docs/research/claude-hooks-study.md +440 -0
  150. package/docs/research/codex-hooks-study.md +624 -0
  151. package/docs/research/everything-claude-code-study.md +252 -0
  152. package/docs/research/from-skills-to-layered-workflow.md +322 -0
  153. package/docs/research/gsd-study.md +69 -0
  154. package/docs/research/kimi-hooks-study.md +274 -0
  155. package/docs/research/mattpocock-skills-comparison.md +429 -0
  156. package/docs/research/mattpocock-skills-study.md +275 -0
  157. package/docs/research/oh-my-codex-study.md +279 -0
  158. package/docs/research/perplexity-agent-skills-design.md +168 -0
  159. package/docs/research/pmc-gstack-skill-study.md +122 -0
  160. package/docs/research/spec-kit-study.md +224 -0
  161. package/docs/research/superpowers-study.md +209 -0
  162. package/docs/roadmap/initial-roadmap.md +53 -0
  163. package/docs/solutions/README.md +45 -0
  164. package/docs/solutions/artifact-nesting-recovery.md +58 -0
  165. package/docs/solutions/session-context-restore-practice.md +67 -0
  166. package/docs/solutions/workflow/version-drift-recovery.md +49 -0
  167. package/docs/solutions/worktree-gate-recovery.md +62 -0
  168. package/docs/specs/README.md +28 -0
  169. package/docs/specs/claude.md +45 -0
  170. package/docs/specs/codex.md +44 -0
  171. package/docs/specs/cursor.md +44 -0
  172. package/hosts/adapters/claude.ts +29 -0
  173. package/hosts/adapters/codex.ts +27 -0
  174. package/hosts/adapters/cursor.ts +27 -0
  175. package/hosts/adapters/kimi.ts +27 -0
  176. package/hosts/claude.ts +23 -0
  177. package/hosts/codex.ts +26 -0
  178. package/hosts/cursor.ts +19 -0
  179. package/hosts/index.ts +33 -0
  180. package/hosts/registry.test.ts +52 -0
  181. package/hosts/registry.ts +57 -0
  182. package/hosts/schema.ts +58 -0
  183. package/package.json +52 -0
  184. package/scripts/browser.ts +185 -0
  185. package/scripts/cleanup.ts +142 -0
  186. package/scripts/commands/artifact.ts +115 -0
  187. package/scripts/commands/autopilot.ts +143 -0
  188. package/scripts/commands/capability.ts +57 -0
  189. package/scripts/commands/config.ts +69 -0
  190. package/scripts/commands/dag.ts +126 -0
  191. package/scripts/commands/feedback.ts +123 -0
  192. package/scripts/commands/gate.ts +291 -0
  193. package/scripts/commands/helpers.ts +126 -0
  194. package/scripts/commands/hook.ts +66 -0
  195. package/scripts/commands/init.ts +515 -0
  196. package/scripts/commands/issue.ts +825 -0
  197. package/scripts/commands/phase.ts +61 -0
  198. package/scripts/commands/preset.ts +159 -0
  199. package/scripts/commands/runtime.ts +199 -0
  200. package/scripts/commands/specify.ts +71 -0
  201. package/scripts/commands/upgrade.ts +243 -0
  202. package/scripts/commands/verify.ts +183 -0
  203. package/scripts/commands/wiki.ts +242 -0
  204. package/scripts/commands/workflow.ts +131 -0
  205. package/scripts/dev-skill.ts +55 -0
  206. package/scripts/discover-skills.ts +116 -0
  207. package/scripts/doctor.ts +410 -0
  208. package/scripts/dogfood-check.ts +125 -0
  209. package/scripts/eval-functional.ts +218 -0
  210. package/scripts/eval.ts +246 -0
  211. package/scripts/gen-skill-docs.ts +201 -0
  212. package/scripts/global-discover.ts +217 -0
  213. package/scripts/governance-check.ts +75 -0
  214. package/scripts/gxpm-check.ts +12 -0
  215. package/scripts/gxpm.ts +216 -0
  216. package/scripts/host-config.ts +62 -0
  217. package/scripts/install-claude-hooks.ts +138 -0
  218. package/scripts/install-codex-hooks.ts +271 -0
  219. package/scripts/install-hooks.ts +128 -0
  220. package/scripts/install-kimi-hooks.ts +92 -0
  221. package/scripts/install-skill.ts +184 -0
  222. package/scripts/phase-artifact-commands.ts +100 -0
  223. package/scripts/post-land-sync.ts +46 -0
  224. package/scripts/scaffold-check.ts +85 -0
  225. package/scripts/skill-naming-check.ts +78 -0
  226. package/scripts/skill-structure-check.ts +157 -0
  227. package/scripts/skills-lock-check.ts +60 -0
  228. package/scripts/sync-markdown-artifacts.ts +172 -0
  229. package/scripts/uninstall.ts +162 -0
  230. package/scripts/version.ts +47 -0
  231. package/scripts/wait-pr-ready.ts +407 -0
  232. package/skills/gxpm/SKILL.md +485 -0
  233. package/skills/gxpm/SKILL.md.tmpl +422 -0
  234. package/skills/gxpm/references/CANON.md +53 -0
  235. package/skills/gxpm/references/key-rules.md +130 -0
  236. package/skills/gxpm-architecture/SKILL.md +106 -0
  237. package/skills/gxpm-architecture/references/DEEPENING.md +37 -0
  238. package/skills/gxpm-architecture/references/INTERFACE-DESIGN.md +44 -0
  239. package/skills/gxpm-autopilot/SKILL.md +116 -0
  240. package/skills/gxpm-autopilot/SKILL.md.tmpl +107 -0
  241. package/skills/gxpm-browser/SKILL.md +105 -0
  242. package/skills/gxpm-browser/SKILL.md.tmpl +41 -0
  243. package/skills/gxpm-browser/references/commands.md +43 -0
  244. package/skills/gxpm-browser/references/evidence-path.md +20 -0
  245. package/skills/gxpm-build/SKILL.md +78 -0
  246. package/skills/gxpm-cleanup/SKILL.md +76 -0
  247. package/skills/gxpm-debug-issue/SKILL.md +39 -0
  248. package/skills/gxpm-diagnose/SKILL.md +220 -0
  249. package/skills/gxpm-diagnose/SKILL.md.tmpl +31 -0
  250. package/skills/gxpm-diagnose/references/feedback-loop.md +34 -0
  251. package/skills/gxpm-diagnose/references/feedback-loops.md +43 -0
  252. package/skills/gxpm-diagnose/references/phases.md +60 -0
  253. package/skills/gxpm-eval/SKILL.md +78 -0
  254. package/skills/gxpm-explore-codebase/SKILL.md +36 -0
  255. package/skills/gxpm-explore-codebase/scripts/summarize-communities.ts +51 -0
  256. package/skills/gxpm-feedback/SKILL.md +122 -0
  257. package/skills/gxpm-grill/SKILL.md +159 -0
  258. package/skills/gxpm-grill/SKILL.md.tmpl +77 -0
  259. package/skills/gxpm-grill/references/documentation-templates.md +56 -0
  260. package/skills/gxpm-grill/references/process.md +25 -0
  261. package/skills/gxpm-handoff/SKILL.md +112 -0
  262. package/skills/gxpm-hygiene/SKILL.md +69 -0
  263. package/skills/gxpm-implementer/SKILL.md +142 -0
  264. package/skills/gxpm-implementer/SKILL.md.tmpl +141 -0
  265. package/skills/gxpm-linear/SKILL.md +282 -0
  266. package/skills/gxpm-linear/SKILL.md.tmpl +86 -0
  267. package/skills/gxpm-linear/references/commands.md +75 -0
  268. package/skills/gxpm-linear/references/workflows.md +120 -0
  269. package/skills/gxpm-planning/SKILL.md +134 -0
  270. package/skills/gxpm-prototype/SKILL.md +64 -0
  271. package/skills/gxpm-refactor-safely/SKILL.md +62 -0
  272. package/skills/gxpm-review-army/SKILL.md +117 -0
  273. package/skills/gxpm-review-changes/SKILL.md +36 -0
  274. package/skills/gxpm-setup/SKILL.md +101 -0
  275. package/skills/gxpm-specifier/SKILL.md +135 -0
  276. package/skills/gxpm-tdd/SKILL.md +187 -0
  277. package/skills/gxpm-tdd/references/interface-design.md +23 -0
  278. package/skills/gxpm-tdd/references/mocking.md +27 -0
  279. package/skills/gxpm-tdd/references/red-green-refactor.md +61 -0
  280. package/skills/gxpm-tdd/references/troubleshooting.md +28 -0
  281. package/skills/gxpm-tdd/references/workflow.md +50 -0
  282. package/skills/gxpm-tdd/testing-anti-patterns.tmpl +304 -0
  283. package/skills/gxpm-triage/SKILL.md +160 -0
  284. package/skills/gxpm-verify/SKILL.md +107 -0
  285. package/skills/gxpm-write-skill/SKILL.md +131 -0
  286. package/skills/gxpm-zoom-out/SKILL.md +69 -0
  287. package/skills/maintain-hygiene-skills-lock/SKILL.md +54 -0
  288. package/skills/maintain-hygiene-skills-lock/SKILL.md.tmpl +53 -0
  289. package/templates/constitution-template.md +63 -0
  290. package/templates/hooks/gxpm-commit-msg +16 -0
  291. package/templates/hooks/gxpm-post-checkout +19 -0
  292. package/templates/hooks/gxpm-post-commit +7 -0
  293. package/templates/hooks/gxpm-post-merge +29 -0
  294. package/templates/hooks/gxpm-pre-commit +39 -0
  295. package/templates/hooks/gxpm-pre-push +33 -0
  296. package/templates/plan-template.md.tmpl +46 -0
  297. package/templates/spec-template.md.tmpl +63 -0
  298. package/templates/specify-stub.tmpl +22 -0
  299. package/templates/tasks-template.md.tmpl +32 -0
@@ -0,0 +1,86 @@
1
+ ---
2
+ name: gxpm-linear
3
+ description: Linear CLI integration for gxpm issue lifecycle management. Use when creating, updating, or querying Linear issues, syncing gxpm issues to Linear, or managing issue lifecycle via command line.
4
+ status: stable
5
+ ---
6
+
7
+ # gxpm-linear
8
+
9
+ Linear 协作前门,通过 CLI 与 issue tracker 交互。**不使用 MCP** — 所有操作走 `linear` 命令。
10
+
11
+ ## 入口条件
12
+
13
+ - 需要创建/更新/查询 Linear issue
14
+ - gxpm issue 需要同步到 Linear(`maybeSyncIssue` 的替代路径)
15
+ - Sprint 规划、backlog 分类、批量操作
16
+ - 需要读取 issue 评论获取上下文
17
+
18
+ ### 前置条件
19
+
20
+ ```bash
21
+ # CLI 已安装在
22
+ /opt/homebrew/bin/linear
23
+
24
+ # 如不在 PATH
25
+ export PATH="/opt/homebrew/bin:$PATH"
26
+ ```
27
+
28
+ ### 认证
29
+
30
+ ```bash
31
+ linear auth login # 首次使用或 token 过期
32
+ linear config # 查看默认 team/workspace
33
+ ```
34
+
35
+ > **认证收敛**:gxpm 内置 issue-sync 直接调用 `linear` CLI,**不再单独配置 API key**。
36
+ > 只需确保 `linear auth login` 已完成,gxpm 会自动复用其认证状态。
37
+ > 旧配置 `sync.linearApiKey` 和 `GXPM_LINEAR_API_KEY` 已废弃,可安全移除。
38
+
39
+ ## 可操作流程
40
+
41
+ {{REFERENCE:commands}}
42
+
43
+ {{REFERENCE:workflows}}
44
+
45
+ ### 常用全局参数
46
+
47
+ | Flag | 说明 |
48
+ |------|------|
49
+ | `--json` | 机器可读输出(默认使用) |
50
+ | `--text` | 人类可读输出 |
51
+ | `--dry-run` | 预览不执行 |
52
+ | `--team <KEY>` | 指定 team(如 `GXG`) |
53
+
54
+ ### 操作原则
55
+
56
+ 1. **Issue 是单一真相源** — 所有需求、bug、变更都先落地 Linear issue
57
+ 2. **创建前先查重** — `linear issue list --query "keyword"` 避免重复
58
+ 3. **写操作需确认** — 批量操作先呈现表格,等用户点头再执行
59
+ 4. **状态完整性** — 子 issue 全 Done 才能关父 issue
60
+
61
+ ### Tips
62
+
63
+ - `--json` 优先于 `--text`,方便脚本解析
64
+ - `issue list` 默认只显示分配给当前用户的,加 `-A` 看全部
65
+ - `issue list` 必须加 `--sort`(`manual` 或 `priority`)
66
+ - GraphQL escape hatch: `linear api '{ issues { nodes { id title } } }'`
67
+
68
+ ## 红旗清单 / 反模式
69
+
70
+ - **不使用 MCP** — 所有操作走 `linear` 命令,禁止通过 MCP 操作 Linear
71
+ - 禁止绕过查重直接创建 issue
72
+ - 禁止未确认就执行批量写操作
73
+ - 禁止在子 issue 未完成时关闭父 issue
74
+ - 不要混用旧 API key 认证方式(`sync.linearApiKey`、`GXPM_LINEAR_API_KEY` 已废弃)
75
+
76
+ ## 验证清单 / 出口条件
77
+
78
+ - [ ] issue 创建/更新/查询结果与预期一致
79
+ - [ ] 同步后的 gxpm issue 与 Linear issue 状态一致
80
+ - [ ] 批量操作已获用户确认
81
+ - [ ] `--json` 输出可被脚本正确解析(如需要)
82
+
83
+ ## Read Next
84
+
85
+ - `docs/governance/development-contract.md`
86
+ - Main `/gxpm` skill for phase gate details
@@ -0,0 +1,75 @@
1
+ ## CLI Commands
2
+
3
+ ### Issue Commands
4
+
5
+ | Task | Command |
6
+ |------|---------|
7
+ | List my issues | `linear issue list --team GXG --sort priority --json` |
8
+ | List all issues | `linear issue list --team GXG --all --sort priority --json` |
9
+ | Filter by state | `linear issue list --team GXG --state todo --sort priority -A --json` |
10
+ | Filter by project | `linear issue list --team GXG --project "Name" --sort priority -A --json` |
11
+ | Search by text | `linear issue list --team GXG --query "keyword" --sort priority -A --json` |
12
+ | View issue | `linear issue view GXG-123 --json` |
13
+ | View with children | `linear issue children GXG-123 --json` |
14
+ | Create issue | `linear issue create -t "Title" --team GXG --priority 2 --label feature --json` |
15
+ | Create with parent | `linear issue create -t "Sub-task" --team GXG --parent GXG-123 --json` |
16
+ | Create with desc file | `cat desc.md \| linear issue create -t "Title" --team GXG --json` |
17
+ | Update state | `linear issue update GXG-123 --state "In Progress" --json` |
18
+ | Move (shorthand) | `linear issue move GXG-123 "In Progress"` |
19
+ | Update title | `linear issue update GXG-123 -t "New Title" --json` |
20
+ | Set priority | `linear issue priority GXG-123 2` |
21
+ | Assign | `linear issue assign GXG-123 self` |
22
+ | Set estimate | `linear issue estimate GXG-123 3` |
23
+ | Add comment | `linear issue comment add GXG-123 --body "text" --json` |
24
+ | Batch create | `linear issue create-batch --json < batch.json` |
25
+ | Dry-run preview | `linear issue create -t "Title" --team GXG --dry-run --json` |
26
+
27
+ ### Comment Subcommands
28
+
29
+ | Task | Command |
30
+ |------|---------|
31
+ | Add comment | `linear issue comment add GXG-123 --body "text" --json` |
32
+ | Update comment | `linear issue comment update <commentId> --body "text"` |
33
+ | List/Delete comments | Use `linear api` GraphQL queries/mutations |
34
+
35
+ **Note**: `linear issue comment list` and `linear issue comment delete` were **removed** in CLI v3.2.0. Use `linear api` for comment reads and deletes.
36
+
37
+ ### Issue Relations
38
+
39
+ | Task | Command |
40
+ |------|---------|
41
+ | List relations | `linear issue relation list GXG-123 --json` |
42
+ | Add relation | `linear issue relation add GXG-123 blocked-by GXG-456 --json` |
43
+ | Delete relation | `linear issue relation delete <relationId>` |
44
+
45
+ ### Other Commands
46
+
47
+ | Task | Command |
48
+ |------|---------|
49
+ | List teams | `linear team list --json` |
50
+ | Team members | `linear user list --json` |
51
+ | Workflow states | `linear workflow-state list --json` |
52
+ | Labels | `linear label list --json` |
53
+ | Current cycle | `linear cycle current --json` |
54
+ | Next cycle | `linear cycle next --json` |
55
+ | List cycles | `linear cycle list --json` |
56
+ | List projects | `linear project list --json` |
57
+ | View project | `linear project view <slug> --json` |
58
+ | Create project | `linear project create --name "Name" --json` |
59
+ | List milestones | `linear milestone list --json` |
60
+ | List initiatives | `linear initiative list --json` |
61
+ | List documents | `linear document list --json` |
62
+ | List users | `linear user list --json` |
63
+ | Notifications | `linear notification list --json` |
64
+ | GraphQL escape hatch | `linear api '{ issues { nodes { id title } } }'` |
65
+
66
+ ### Troubleshooting
67
+
68
+ | Problem | Fix |
69
+ |---------|-----|
70
+ | Auth failure | Re-run `linear auth login` |
71
+ | Rate limited | Batch operations, add delays |
72
+ | "No team configured" | Add `--team GXG` or run `linear config` |
73
+ | "Sort must be provided" | Add `--sort priority` to `issue list` |
74
+ | CLI not found | Use full path `/Users/x/.nvm/versions/node/v25.8.0/bin/linear` |
75
+ | Wrong workflow states | Query `linear workflow-state list --json` first |
@@ -0,0 +1,120 @@
1
+ ## Workflows
2
+
3
+ ### Full Context = View + Comments
4
+
5
+ `linear issue view` 只返回标题、描述、状态和元数据。**评论是独立 API 调用。**
6
+
7
+ **规则**:接手 issue 时必须运行:
8
+ ```bash
9
+ linear issue view GXG-123 --json
10
+ ```
11
+ Comments require a GraphQL query via `linear api` (CLI v3.2.0 removed `issue comment list`).
12
+
13
+ 评论中可能包含 scope 定义、设计决策、PoC 结果、review 反馈、跨 agent 交接上下文。仅在批量 list/triage 时可跳过评论阅读。
14
+
15
+ ### Creating an Issue
16
+
17
+ 1. 搜索重复:`linear issue list --team GXG --query "keyword" --all --sort priority --json`
18
+ 2. 检测当前 git branch:`git branch --show-current`
19
+ 3. 起草 issue(标题、描述、标签、项目、团队、负责人、优先级)
20
+ 4. 呈现给用户确认
21
+ 5. 执行:
22
+ ```bash
23
+ linear issue create \
24
+ -t "[Domain] Clear description" \
25
+ --team GXG \
26
+ --priority 2 \
27
+ --label feature --label backend \
28
+ --json
29
+ ```
30
+ 6. 报告 issue identifier 和链接
31
+
32
+ ### Implementing a Linear Issue
33
+
34
+ 1. 获取完整上下文(view + comments)
35
+ 2. 移到 Todo:`linear issue update GXG-123 --state "Todo" --json`
36
+ 3. 读取 acceptance criteria 和依赖
37
+ 4. 创建 feature branch(命名含 issue ID)
38
+ 5. TDD 实现
39
+ 6. 完成后移到 In Review:`linear issue update GXG-123 --state "In Review" --json`
40
+ 7. 添加 completion comment:
41
+ ```bash
42
+ BRANCH=$(git branch --show-current)
43
+ linear issue comment add GXG-123 --body "## Completion Summary
44
+ **Branch:** \`$BRANCH\`
45
+ **PR:** <pr-url-or-pending>
46
+ **Summary:** <what was done>" --json
47
+ ```
48
+
49
+ ### Bulk Operations
50
+
51
+ 3+ issue 的批量操作:
52
+ 1. 收集所有目标 issue
53
+ 2. 以表格呈现:Issue ID、Current State、Proposed Change、Reason
54
+ 3. 加 `--dry-run` 预览
55
+ 4. 等用户确认后执行
56
+ 5. 报告摘要:N succeeded, N failed
57
+
58
+ ### Sub-Issue Management
59
+
60
+ 子 issue 继承父 issue:
61
+ - 相同 project 和 team
62
+ - 相同标签(除非有理由覆盖)
63
+ - 通过 parent 关系链接
64
+
65
+ ```bash
66
+ # 创建子 issue
67
+ linear issue create -t "Sub-task title" --team GXG --parent GXG-123 --json
68
+ # 或给已有 issue 设置 parent
69
+ linear issue update GXG-456 --parent GXG-123 --json
70
+ ```
71
+
72
+ ### Sprint Planning
73
+
74
+ 1. 收集当前状态:
75
+ ```bash
76
+ linear cycle current --json
77
+ linear cycle next --json
78
+ linear issue list --team GXG --state backlog --sort priority -A --json
79
+ linear user list --json
80
+ ```
81
+ 2. 分析:按优先级排序(P0 bugs > blockers > high-value features > tech debt)
82
+ 3. 以表格呈现计划:issue、priority、assignee、estimate、rationale
83
+ 4. 确认后批量分配到 cycle
84
+
85
+ ### Backlog Triage
86
+
87
+ 1. 拉取未分类项:
88
+ ```bash
89
+ linear issue list --team GXG --state triage --sort priority -A --json
90
+ linear issue list --team GXG --state backlog --sort priority -A --json
91
+ ```
92
+ 2. 对每个 issue 推荐:priority、labels、assignee、cycle placement
93
+ 3. 以表格呈现 triage 计划
94
+ 4. 确认后执行
95
+ 5. 标记 stale issue(3+ cycles 无活动)— 先提醒用户 review
96
+
97
+ ### Status Integrity
98
+
99
+ - 永远不要硬编码 state 名称,先查:
100
+ ```bash
101
+ linear workflow-state list --json
102
+ ```
103
+ - 关父 issue 前先查子 issue:
104
+ ```bash
105
+ linear issue children GXG-123 --json
106
+ ```
107
+ - 任何子 issue 未 Done 都不能关父 issue
108
+
109
+ ### Label Taxonomy
110
+
111
+ 应用标签前先确认存在:
112
+ ```bash
113
+ linear label list --json
114
+ ```
115
+
116
+ | Category | Labels | Rule |
117
+ |----------|--------|------|
118
+ | **Type** | `feature`, `bug`, `chore`, `tech-debt`, `spike` | 恰好一个 |
119
+ | **Domain** | `frontend`, `backend`, `infra`, `design`, `security`, `testing` | 1-2 个 |
120
+ | **Workflow** | `blocked`, `in-review`, `needs-design`, `needs-split` | 按需 |
@@ -0,0 +1,134 @@
1
+ ---
2
+ name: gxpm-planning
3
+ description: Break plans into independently-grabbable issues using vertical slices. Use when user wants to convert a plan into issues, create implementation tickets, break down a feature, or turn discussion into a structured PRD.
4
+ ---
5
+
6
+ # Planning
7
+
8
+ Break any plan into independently-grabbable issues using **tracer-bullet vertical slices**.
9
+
10
+ ## 入口条件
11
+
12
+ **何时触发**
13
+ - 用户想将计划转化为 issues。
14
+ - 用户要求创建 implementation tickets。
15
+ - 用户需要拆分 feature 为可执行单元。
16
+ - 用户希望将讨论转化为结构化 PRD。
17
+ - `plan` 阶段中 `implementation-plan` 过大,需要拆分为子 issue。
18
+
19
+ **前置条件**
20
+ - 已有计划、spec、或 PRD;或可从当前对话上下文中合成。
21
+
22
+ **Skill 边界(什么情况下应该加载别的 skill)**
23
+ - 需求或术语尚未澄清 → `/gxpm-grill`
24
+ - 架构决策需要分析 → `/gxpm-architecture`
25
+ - 具体代码实现 → `/gxpm-implementer`
26
+ - Issue 分类与状态路由 → `/gxpm-triage`
27
+
28
+ ## 可操作流程
29
+
30
+ ### 垂直切片规则
31
+
32
+ - Each slice delivers a narrow but **COMPLETE** path through every layer (schema, API, UI, tests).
33
+ - A completed slice is demoable or verifiable on its own.
34
+ - Prefer many thin slices over few thick ones.
35
+
36
+ ### Slices may be HITL or AFK
37
+
38
+ - **HITL** — requires human interaction (architectural decision, design review).
39
+ - **AFK** — can be implemented and merged without human interaction.
40
+ - Prefer AFK over HITL where possible.
41
+
42
+ ### Process
43
+
44
+ 1. **Gather context** — read the plan, spec, or PRD. Fetch from the issue tracker if referenced.
45
+ 2. **Explore codebase** (optional) — understand current state to inform slice titles.
46
+ 3. **Draft vertical slices** — break into end-to-end slices, NOT horizontal layers.
47
+ 4. **Quiz the user** — present as numbered list with:
48
+ - Title
49
+ - Type (HITL / AFK)
50
+ - Blocked by (dependencies)
51
+ - User stories covered
52
+ 5. **Iterate** until user approves granularity and dependencies.
53
+ 6. **Publish** — create issues in dependency order (blockers first). Apply `needs-triage` label.
54
+
55
+ ### Issue body template
56
+
57
+ ```markdown
58
+ ## Parent
59
+ Reference to parent issue (if applicable).
60
+
61
+ ## What to build
62
+ Concise description of this vertical slice. Describe end-to-end behavior, not layer-by-layer implementation.
63
+
64
+ ## Acceptance criteria
65
+ - [ ] Criterion 1
66
+ - [ ] Criterion 2
67
+
68
+ ## Blocked by
69
+ - Reference to blocking ticket, or "None — can start immediately"
70
+ ```
71
+
72
+ ### To PRD: Synthesize from Context
73
+
74
+ Turn the current conversation context into a PRD. Do NOT interview the user — synthesize what you already know.
75
+
76
+ #### PRD Template
77
+
78
+ ```markdown
79
+ ## Problem Statement
80
+ The problem from the user's perspective.
81
+
82
+ ## Solution
83
+ The solution from the user's perspective.
84
+
85
+ ## User Stories
86
+ 1. As an <actor>, I want a <feature>, so that <benefit>
87
+ (Extensive list covering all aspects.)
88
+
89
+ ## Implementation Decisions
90
+ - Modules to build/modify
91
+ - Interfaces to modify
92
+ - Schema changes
93
+ - API contracts
94
+
95
+ ## Testing Decisions
96
+ - What makes a good test (behavior, not implementation)
97
+ - Which modules to test
98
+
99
+ ## Out of Scope
100
+ Explicitly excluded items.
101
+
102
+ ## Further Notes
103
+ Any additional notes.
104
+ ```
105
+
106
+ ### gxpm integration
107
+
108
+ - During `plan`, if the `implementation-plan` is too large, use `/planning` to suggest vertical slices as sub-issues.
109
+ - Each sub-issue should be created with `gxpm issue create --auto-id`.
110
+ - The parent issue's `implementation-plan` should reference child issue IDs.
111
+ - For PRD synthesis, publish the PRD as a new issue with `gxpm issue create --auto-id` and label it `needs-triage`.
112
+
113
+ ## 红旗清单 / 反模式
114
+
115
+ - **STOP:禁止水平层拆分。** 不要按 schema → API → UI → tests 分层拆 issue;必须是端到端垂直切片。
116
+ - **STOP:禁止跳过用户确认直接发布 issue。** 必须在用户批准粒度和依赖后再 publish。
117
+ - **STOP:禁止遗漏 blocked by 依赖声明。** 每个 slice 必须注明依赖或标记为无依赖。
118
+ - **STOP:禁止 thick slice。** 宁要多个薄切片,不要少数厚切片。
119
+ - **危险信号:** Issue body 描述的是层-by-layer 实现而非端到端行为 → 重写为垂直切片描述。
120
+ - **危险信号:** 子 issue 创建后父 issue 未引用子 issue IDs → 补全引用。
121
+
122
+ ## 验证清单 / 出口条件
123
+
124
+ - [ ] 每个 slice 有明确 Title、Type(HITL/AFK)、Blocked by、覆盖的 User Stories。
125
+ - [ ] 用户已批准粒度和依赖关系。
126
+ - [ ] Issues 已按依赖顺序创建(blockers 优先)。
127
+ - [ ] 每个新 issue 已应用 `needs-triage` label。
128
+ - [ ] PRD 包含所有必需章节(Problem Statement、Solution、User Stories、Implementation Decisions、Testing Decisions、Out of Scope)。
129
+ - [ ] 父 issue 的 `implementation-plan` 引用了所有子 issue IDs。
130
+
131
+ **失败时路由**
132
+ - 需求仍不清晰 → `/gxpm-grill`
133
+ - 实现计划仍需进一步拆分 → 重新执行 Planning Process
134
+ - 架构决策受阻 → `/gxpm-architecture`
@@ -0,0 +1,64 @@
1
+ ---
2
+ name: gxpm-prototype
3
+ description: Build a throwaway prototype to validate a design before committing to it. Use when you need to sanity-check a data model, state machine, or UI design before writing behavior-spec.
4
+ ---
5
+
6
+ # Prototype
7
+
8
+ A prototype is **throwaway code that answers a question**. The question decides the shape.
9
+
10
+ ## 入口条件
11
+
12
+ **何时触发**
13
+ - 用户说 "prototype this"、"let me play with it"、"try a few designs"。
14
+ - 在 `specify` 阶段之前,需要快速验证数据模型或状态机设计。
15
+ - 不确定 UI 方向,想先探索几种 radically different 的变体。
16
+ - 业务逻辑分支复杂,难以在纸上推理清楚。
17
+
18
+ **Skill 边界(什么情况下应该加载别的 skill)**
19
+ - 需求/范围尚未澄清 → `/gxpm-grill`
20
+ - 需要正式的 BDD 行为规约 → `/gxpm-specifier`
21
+ - 需要架构层面的模块设计 → `/gxpm-architecture`
22
+ - 已经确认设计,需要实现 → `/gxpm-tdd`
23
+
24
+ ## 可操作流程
25
+
26
+ ### Pick a branch
27
+
28
+ Identify which question is being answered:
29
+
30
+ - **"Does this logic / state model feel right?"** → Logic prototype. Build a tiny interactive terminal app that pushes the state machine through cases hard to reason about on paper.
31
+ - **"What should this look like?"** → UI prototype. Generate several radically different UI variations on a single route, switchable via a URL search param and a floating bottom bar.
32
+
33
+ The two branches produce very different artifacts — getting this wrong wastes the whole prototype. If the question is genuinely ambiguous and the user isn't reachable, default to whichever branch better matches the surrounding code (backend module → logic; page or component → UI) and state the assumption at the top of the prototype.
34
+
35
+ ### Rules that apply to both
36
+
37
+ 1. **Throwaway from day one, and clearly marked as such.** Locate the prototype code close to where it will actually be used so context is obvious — but name it so a casual reader can see it's a prototype, not production.
38
+ 2. **One command to run.** Whatever the project's existing task runner supports — `pnpm <name>`, `python <path>`, `bun <path>`, etc. The user must be able to start it without thinking.
39
+ 3. **No persistence by default.** State lives in memory. Persistence is the thing the prototype is _checking_, not something it should depend on.
40
+ 4. **Skip the polish.** No tests, no error handling beyond what makes the prototype _runnable_, no abstractions. The point is to learn something fast and then delete it.
41
+ 5. **Surface the state.** After every action (logic) or on every variant switch (UI), print or render the full relevant state so the user can see what changed.
42
+ 6. **Delete or absorb when done.** When the prototype has answered its question, either delete it or fold the validated decision into the real code — don't leave it rotting in the repo.
43
+
44
+ ## 红旗清单 / 反模式
45
+
46
+ - **STOP:不要把原型当作生产代码。** 没有测试、没有错误处理、没有抽象 — 这些是故意的,不是 TODO。
47
+ - **STOP:不要在原型中追求完美。** 30 分钟能回答的问题不要花 3 小时。
48
+ - **STOP:不要把原型留在仓库里腐烂。** 回答完问题后要么删除,要么把验证过的决策吸收进正式代码。
49
+ - **STOP:不要为原型写 behavior-spec。** 原型在 specify 之前,不需要 BDD 规约。
50
+ - **危险信号:** 原型代码被 copy-paste 到正式实现 → 这是有意外的技术债务,应重新实现。
51
+ - **危险信号:** 原型运行需要复杂的 setup → 简化它,否则学习成本太高。
52
+
53
+ ## 验证清单 / 出口条件
54
+
55
+ - [ ] 回答了预先定义的 question(logic feel right? or what should it look like?)。
56
+ - [ ] 代码明确标记为 PROTOTYPE / throwaway。
57
+ - [ ] 用户(或代理自己)能够运行并观察状态变化。
58
+ - [ ] 决策已记录(commit message、ADR、issue comment、或 NOTES.md)。
59
+ - [ ] 原型已删除,或关键决策已吸收进正式代码。
60
+
61
+ **失败时路由**
62
+ - 原型验证后需求仍不清晰 → `/gxpm-grill`
63
+ - 原型验证后需要正式规约 → `/gxpm-specifier`
64
+ - 原型暴露架构问题 → `/gxpm-architecture`
@@ -0,0 +1,62 @@
1
+ ---
2
+ name: gxpm-refactor-safely
3
+ description: Plan and execute safe refactoring using dependency analysis. Use when user asks to rename, extract, split, move, or simplify code, or when a code review suggests refactoring.
4
+ ---
5
+
6
+ ## gxpm-refactor-safely
7
+
8
+ ### 入口条件
9
+
10
+ **Skill boundary:**
11
+ - If you do **not yet understand** the target code, load `/gxpm-explore-codebase` first.
12
+ - If you discover a **bug** during refactoring, stop refactoring and load `/gxpm-diagnose` or `/gxpm-debug-issue`.
13
+ - If you need to **rename or move** symbols across the codebase, confirm the `rename` tool is available in your GitNexus MCP; otherwise use manual renaming with `detect_changes` validation.
14
+
15
+ Use GitNexus to plan and execute refactoring with confidence. When simplifying code, follow the scan-checklist-incremental-verify loop below.
16
+
17
+ ### 可操作流程
18
+
19
+ 1. **Understand** — Use `impact` with `direction: "upstream"`, `query`, and `context` to understand the target code, its callers, edge cases, and test coverage before touching it.
20
+ 2. **Scan for simplification opportunities** (checklist):
21
+ - **Deep nesting (>3 levels)** → guard clauses or extracted helpers
22
+ - **Long functions (>50 lines or >1 responsibility)** → split by responsibility
23
+ - **Nested ternaries** → if/else, early-return, or switch
24
+ - **Generic names** (`data`, `tmp`, `x`) → descriptive names
25
+ - **Duplicated logic (same pattern ≥2 times)** → shared function or constant
26
+ - **Dead code** (unused imports, unreachable branches, stale comments) → remove after confirming with `impact`/`context`
27
+ 3. **For renames**, use `rename` with `dry_run: true` to preview all affected locations.
28
+ 4. **Apply each simplification incrementally** — run tests after **every** narrow edit:
29
+ - Use the project's test command (e.g. `bun test`, `npm test`).
30
+ - If tests fail, **revert that change immediately** and reconsider.
31
+ - Only proceed to the next simplification when the current one is green.
32
+ 5. **After all changes**, run `detect_changes` to verify the refactoring impact, ensure the build succeeds, and keep the diff clean.
33
+
34
+ ### 红旗清单 / 反模式
35
+
36
+ **Safety Checks**
37
+ - Always preview before applying (rename mode gives you an edit list).
38
+ - Check `impact` before major refactors.
39
+ - Use `detect_changes` to ensure affected flows are expected.
40
+ - Use `cypher` only for custom graph questions that `query`/`context` cannot answer.
41
+
42
+ **Protected Blocks**
43
+
44
+ Some code must not be simplified even if it looks complex. Respect block-level protection annotations in any language:
45
+
46
+ ```js
47
+ /* gxpm-simplify-ignore-start: perf-critical */
48
+ // manually unrolled XOR — 3x faster than a loop
49
+ result[0] = buf[0] ^ key[0];
50
+ result[1] = buf[1] ^ key[1];
51
+ /* gxpm-simplify-ignore-end */
52
+ ```
53
+
54
+ Supported comment styles: `//`, `/* */`, `#`, `<!-- -->`. The `reason` field is optional but recommended. Never modify, rename, or delete code inside a protected block.
55
+
56
+ - Start with the narrowest GitNexus query or impact target, then expand.
57
+ - Prefer dry-run previews for coordinated renames.
58
+
59
+ ### 验证清单 / 出口条件
60
+
61
+ - run `detect_changes` to verify the refactoring impact, ensure the build succeeds, and keep the diff clean.
62
+ - Target: complete any review/debug/refactor task in ≤5 graph tool calls.
@@ -0,0 +1,117 @@
1
+ ---
2
+ name: gxpm-review-army
3
+ description: Agent Army 并行审查模式的使用指南。在 self-review 和 ship 阶段通过多角色并行扇出提升审查质量。
4
+ status: stable
5
+ ---
6
+
7
+ # gxpm-review-army
8
+
9
+ 在 gxpm 的 `self-review` 和 `ship` 阶段使用 Agent Army 并行审查模式,替代单一 reviewer 视角,显著提升审查覆盖面和问题发现率。
10
+
11
+ ## 入口条件
12
+
13
+ - issue 已进入 `self-review` 或 `ship` 阶段
14
+ - 需要比单一 reviewer 更全面的多维度审查
15
+ - 变更涉及安全敏感、性能敏感或可访问性相关代码
16
+
17
+ ## 可操作流程
18
+
19
+ ### 在 self-review 阶段启用 Review Army
20
+
21
+ ```bash
22
+ gxpm self-review cleanup <issue-id> --army
23
+ ```
24
+
25
+ 这会同时创建:
26
+ - `self-review.json` — 原有单一 reviewer 的审查记录
27
+ - `review-report.json` — Review Army 的并行审查报告(初始为 draft,待各角色填充 findings)
28
+
29
+ ### Review Army 角色构成
30
+
31
+ | 角色 | 职责 | 触发条件 |
32
+ |------|------|----------|
33
+ | **Spec Compliance Reviewer** | 验收标准符合性 | 所有变更 |
34
+ | **Code Quality Reviewer** | 代码质量与可维护性 | 所有变更 |
35
+ | **Security Reviewer** | 安全漏洞与敏感数据 | 涉及外部输入、权限、依赖的变更 |
36
+ | **Test Reviewer** | 测试覆盖与质量 | 所有变更 |
37
+ | **Accessibility Reviewer** | 可访问性 | 涉及 UI 的变更 |
38
+
39
+ ### 在 ship 阶段启用 Ship Audit Army
40
+
41
+ ```bash
42
+ gxpm ship pr-check <issue-id> --army
43
+ ```
44
+
45
+ 这会同时创建:
46
+ - `ship-readiness.json` — 原有 ship readiness 检查清单
47
+ - `ship-audit-report.json` — Ship Audit Army 的专项审计报告
48
+
49
+ ### Ship Audit Army 角色构成
50
+
51
+ | 角色 | 职责 |
52
+ |------|------|
53
+ | **Security Auditor** | 发布前安全专项审计 |
54
+ | **Performance Auditor** | 发布前性能影响评估 |
55
+ | **Docs Auditor** | 文档同步性检查 |
56
+
57
+ ### Review Report 格式
58
+
59
+ ```json
60
+ {
61
+ "army": "review-army",
62
+ "phase": "self-review",
63
+ "findings": [
64
+ {
65
+ "role": "security-reviewer",
66
+ "severity": "blocking",
67
+ "location": "core/auth.ts:42",
68
+ "rationale": "外部输入直接进入文件路径拼接,存在路径遍历风险",
69
+ "recommendation": "使用 path.resolve 并限制在允许目录内,或改用 UUID 映射"
70
+ }
71
+ ]
72
+ }
73
+ ```
74
+
75
+ ### Severity 分级
76
+
77
+ | 级别 | 含义 | 对 gate 的影响 |
78
+ |------|------|----------------|
79
+ | **blocking** | 必须修复后才能进入下一阶段 | 阻止 phase transition |
80
+ | **important** | 强烈建议修复,但可在后续迭代处理 | 不阻止,但需记录 |
81
+ | **suggestion** | 可选改进,供参考 | 不阻止 |
82
+
83
+ ### 与单一 reviewer 的协同
84
+
85
+ - **无 `--army` 标志时**:完全保持原有单一 reviewer 流程,无任何变化
86
+ - **有 `--army` 标志时**:Army 审查与单一 reviewer 并行产出,review-report 作为额外输入
87
+ - 单一 reviewer 负责**综合判断**和**合并建议**,Army 角色提供**专业视角**
88
+
89
+ ## 红旗清单 / HARD-GATE
90
+
91
+ - **Review Army 产出的 blocking finding 未解决就推进到 ship** → 必须 STOP,回到 self-review 修复
92
+ - **在 ship 阶段发现 security auditor 的 blocking 问题** → 必须 STOP,回退到 implement 修复后重新走 review
93
+ - **为赶时间跳过 Accessibility Reviewer** → 可访问性是法律责任,不可跳过
94
+ - **混淆 important 和 blocking 的优先级** → 只有 blocking 会阻止 gate,但 important 需在 ship notes 中说明计划
95
+
96
+ ## 验证清单
97
+
98
+ - [ ] `--army` 标志正确传递,review-report 或 ship-audit-report 已创建
99
+ - [ ] 每个 Army 角色的 findings 已填入报告
100
+ - [ ] blocking 问题数为 0 或已在 ship notes 中说明豁免理由
101
+ - [ ] 所有 finding 包含完整的 location、rationale、recommendation
102
+ - [ ] 单一 reviewer 的 self-review.json 仍正常产出(向后兼容)
103
+
104
+ ## 常见说辞表
105
+
106
+ | 说辞 | 现实 | 正确做法 |
107
+ |------|------|----------|
108
+ | "Army 审查太慢,我直接用单一 reviewer" | 5 个角色并行执行,实际时间不比串行慢 | 使用 `--army`,让专业角色并行工作 |
109
+ | "这些 finding 都是 suggestion,不重要" | suggestion 累计反映设计问题 | 关注 suggestion 的模式,而非单个 |
110
+ | "Security Reviewer 太严格了" | 安全漏洞的修复成本随阶段指数增长 | 在 self-review 阶段解决,不要留到 ship |
111
+ | "Accessibility 可以后续补" | 可访问性缺陷在发布后再修复成本 10x | 在 implement 阶段就通过 Accessibility Reviewer 检查 |
112
+
113
+ ## Read Next
114
+
115
+ - `agents/reviewer.md` — 单一 reviewer 的协同说明
116
+ - `core/agent-runtime.ts` — Agent Runtime 技术细节
117
+ - `docs/governance/gherkin-style.md` — behavior-spec 写作规范