@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,311 @@
1
+ # gxpm V0 合同
2
+
3
+ ## 北极星
4
+
5
+ gxpm 是替代 PMC 和 gstack 的二代代理项目管理控制面。它把 Linear issue、阶段状态、执行代理、验证证据、浏览器 QA、评审、发布收口、上下文恢复和自学习整合到同一个原生系统里。
6
+
7
+ ## 非目标
8
+
9
+ - 不做 PMC/gstack 的薄封装。
10
+ - 不保留“PMC 管项目、gstack 管工程流”的长期双轨。
11
+ - 不把历史 skill 目录直接 vendoring 成 gxpm。
12
+ - 不在 V0 一次性实现全部替代能力;V0 要形成最小可运行替代闭环。
13
+
14
+ ## 核心对象
15
+
16
+ ### Project
17
+
18
+ 一个 gxpm 管理的代码项目或产品项目。Project 需要声明:
19
+
20
+ - issue provider:默认 Linear。
21
+ - state root:默认 `.gxpm/issues/<issue-id>/`。
22
+ - artifact root:默认同 state root。
23
+ - capability bindings:不同阶段调用哪些 gxpm 原生能力。
24
+
25
+ ### Issue
26
+
27
+ Issue 是状态机实例。Issue 的本地真值必须在文件系统中存在,Linear 只是前门和同步面。
28
+
29
+ V0 已实现的本地目录:
30
+
31
+ ```text
32
+ .gxpm/issues/<issue-id>/
33
+ state.json
34
+ graph.json
35
+ events.jsonl
36
+ artifacts/
37
+ index.json
38
+ acceptance-check.json
39
+ acceptance-contract.json
40
+ autopilot-grant.json
41
+ dispatch-handoff.json
42
+ implementation-plan.json
43
+ issue-intake.json
44
+ land-findings.json
45
+ local-verify.json
46
+ pr-check.json
47
+ qa-findings.json
48
+ self-review.json
49
+ ship-readiness.json
50
+ triage-report.json
51
+ verify-findings.json
52
+ reports/
53
+ evidence/
54
+ command-logs/
55
+ browser-snapshots/
56
+ browser-screenshots/
57
+ browser-console/
58
+ browser-errors/
59
+ investigations/
60
+ review/
61
+ release/
62
+ screenshots/
63
+ memory/
64
+ resume-packet.json
65
+ checkpoints/
66
+ 20260427-044500-handoff.md
67
+ runs/
68
+ run-20260428123000-1a2b3c4d.json
69
+ ```
70
+
71
+ V0 已支持 JSON artifact store。当前 artifact type:
72
+
73
+ - `issue-intake`
74
+ - `triage-report`
75
+ - `autopilot-grant`
76
+ - `acceptance-contract`
77
+ - `implementation-plan`
78
+ - `dispatch-handoff`
79
+ - `behavior-spec`
80
+ - `wiki-context`
81
+ - `local-verify`
82
+ - `acceptance-check`
83
+ - `self-review`
84
+ - `review-report`
85
+ - `cleanup-report`
86
+ - `ship-readiness`
87
+ - `ship-audit-report`
88
+ - `pr-check`
89
+ - `verify-findings`
90
+ - `qa-findings`
91
+ - `land-findings`
92
+ - `feedback-description`
93
+
94
+ V0 只写 JSON artifact,不渲染 markdown report。
95
+
96
+ ### Autopilot Grant
97
+
98
+ Autopilot Grant 是 issue-local 的自动驾驶授权 artifact:`artifacts/autopilot-grant.json`。它不是新的 phase,也不绕过 phase gate;它只把用户对“无需逐步确认”的授权、profile、允许动作、hard stop 和生命周期状态持久化,让 hook 与 agent 在后续回合可恢复同一授权边界。
99
+
100
+ V0 profile 只有 `full-delivery`:授权代理在同一 issue 内自主完成 triage、plan、dispatch、implement、local verification、review、PR、merge/land 和 cleanup。hard stop 包括用户显式停止、需要密钥/付费外部 API、生产数据或破坏性数据迁移、不可恢复冲突或验证失败、以及策略/权限边界。
101
+
102
+ ### Evidence Store
103
+
104
+ V0 的 issue-local evidence 统一由 `core/evidence.ts` 分配路径和写入。调用方必须提供 issue id、evidence kind、安全文件名、媒体类型和 payload;helper 负责复用 `core/state.ts` 的 issue id 校验、确认 issue state 存在、创建目标 evidence 子目录,并阻止文件名穿越 issue 目录。
105
+
106
+ 当前 evidence kind 覆盖 command logs、browser snapshots/screenshots/console/errors、investigations、review 和 release。`screenshots` 保留给已有 `gxpm-investigate` 证据路径以维持兼容;新的 browser runtime 证据优先使用更具体的 `browser-*` kind。
107
+
108
+ Evidence Store 只管理 issue-local files,不替代 phase artifact store;阶段结论仍写入 `artifacts/*.json`,原始截图、console、review 或命令日志写入 `evidence/`。
109
+
110
+ ### Resume Packet / Checkpoint
111
+
112
+ V0 的上下文恢复入口是 issue-local memory,而不是聊天历史或 gstack runtime:
113
+
114
+ - `gxpm issue checkpoint <issue-id> --title <title> --stdin`:读取 JSON payload,写入 append-only markdown checkpoint,并更新 `memory/resume-packet.json`。
115
+ - `gxpm issue resume <issue-id>`:读取 `resume-packet.json`,打印 phase、checkpoint path、summary、remaining work 和 notes,供新对话恢复上下文。
116
+
117
+ checkpoint payload 至少包含 `summary`,可选 `decisions`、`remainingWork`、`notes`、`filesModified`、`status`、`sessionDurationSeconds`。`memory/resume-packet.json` 是恢复流程的机器可读入口,markdown checkpoint 是人类可读交接文档。
118
+
119
+ ### Run Ledger / Workspace Runtime
120
+
121
+ V0 的执行运行时先提供可审计原语,不启动长驻 daemon:
122
+
123
+ - run ledger 保存在 `.gxpm/issues/<issue-id>/runs/`,每条 run 记录包含 `runId`、`attempt`、`status`、`sessionId`、`workspacePath`、失败原因和事件序列。
124
+ - workspace runtime 负责把 issue 映射到安全的 per-issue workspace 路径,默认根目录来自 `workspace.root`(默认 `.gxpm/local/workspaces`),并提供 plan / ensure / cleanup 三个动作。
125
+ - orchestrator dry-run tick 只读本地 `.gxpm` issue state,报告哪些 issue 可派发、哪些被 phase/artifact 阻塞;它不 claim、不启动 agent、不写 phase state。
126
+
127
+ 这些运行时原语属于 Capability Runtime 的 execution 层,但不改变 phase 顺序,也不替代 phase artifact gate。
128
+
129
+ ### Phase
130
+
131
+ V0 phase 集合:
132
+
133
+ - `triage`
134
+ - `plan`
135
+ - `dispatch`
136
+ - `specify`
137
+ - `implement`
138
+ - `local-verify`
139
+ - `ac-check`
140
+ - `self-review`
141
+ - `cleanup`
142
+ - `ship`
143
+ - `pr-check`
144
+ - `verify`
145
+ - `qa`
146
+ - `land`
147
+
148
+ V0 可以导入 PMC/gstack 的语义,但最终 phase 是 gxpm 原生状态,不以 `.omc` 或 `.gstack` 作为长期真值。
149
+
150
+ V0 phase transition 采用严格顺序:只能从当前 phase 进入列表中的下一个 phase。
151
+
152
+ `triage -> plan` 额外要求存在 `acceptance-contract` artifact。缺失时 transition 必须失败,并提示先运行 `gxpm triage init <issue-id>`。
153
+
154
+ `plan -> dispatch` 额外要求存在 `implementation-plan` artifact。缺失时 transition 必须失败,并提示先运行 `gxpm plan init <issue-id>`。
155
+
156
+ `dispatch -> specify` 额外要求存在 `dispatch-handoff` artifact。缺失时 transition 必须失败,并提示先运行 `gxpm dispatch init <issue-id>`。
157
+
158
+ `specify -> implement` 额外要求存在 `behavior-spec` artifact。缺失时 transition 必须失败,并提示先运行 `gxpm specify init <issue-id>`。
159
+
160
+ `implement -> local-verify` 额外要求存在 `local-verify` artifact。缺失时 transition 必须失败,并提示先运行 `gxpm implement verify <issue-id>`。
161
+
162
+ `local-verify -> ac-check` 额外要求存在 `acceptance-check` artifact。缺失时 transition 必须失败,并提示先运行 `gxpm local-verify ac-check <issue-id>`。
163
+
164
+ `ac-check -> self-review` 额外要求存在 `self-review` artifact。缺失时 transition 必须失败,并提示先运行 `gxpm ac-check self-review <issue-id>`。
165
+
166
+ `self-review -> cleanup` 额外要求存在 `cleanup-report` artifact。缺失时 transition 必须失败,并提示先运行 `gxpm self-review cleanup <issue-id>`。
167
+
168
+ `cleanup -> ship` 额外要求存在 `ship-readiness` artifact。缺失时 transition 必须失败,并提示先运行 `gxpm cleanup ship <issue-id>`。
169
+
170
+ `ship -> pr-check` 额外要求存在 `pr-check` artifact。缺失时 transition 必须失败,并提示先运行 `gxpm ship pr-check <issue-id>`。
171
+
172
+ `pr-check -> verify` 额外要求存在 `verify-findings` artifact。缺失时 transition 必须失败,并提示先运行 `gxpm pr-check verify <issue-id>`。
173
+
174
+ `verify -> qa` 额外要求存在 `qa-findings` artifact。缺失时 transition 必须失败,并提示先运行 `gxpm verify qa <issue-id>`。
175
+
176
+ `qa -> land` 额外要求存在 `land-findings` artifact。缺失时 transition 必须失败,并提示先运行 `gxpm qa land <issue-id>`。
177
+
178
+ ## Source of Truth
179
+
180
+ 真值优先级:
181
+
182
+ 1. phase JSON artifacts
183
+ 2. `state.json`
184
+ 3. `resume-packet.json`
185
+ 4. rendered markdown reports
186
+ 5. Linear comments / PR body / chat history
187
+
188
+ 任何恢复流程都必须先读本地 phase/state,而不是从聊天上下文猜。
189
+
190
+ ## Ability Adapter
191
+
192
+ gxpm 用 capability runtime 统一所有能力。V0 可以先用 adapter 接入现有能力,但 adapter 是迁移脚手架,不是最终产品边界:
193
+
194
+ - `issueRuntime`:Linear read/write/sync 与 issue graph。
195
+ - `executionRuntime`:worker dispatch、worktree、task claim、local verification。
196
+ - `reviewRuntime`:代码评审、specialist review、adversarial review。
197
+ - `browserRuntime`:浏览器 QA、截图、console/network evidence。
198
+ - `releaseRuntime`:PR、版本、changelog、merge/deploy handoff。
199
+ - `memoryRuntime`:timeline、learn、context restore。
200
+ - `skillRuntime`:skill discovery、routing、preamble、模板生成。
201
+
202
+ 每个 runtime/capability 必须声明:
203
+
204
+ - input contract
205
+ - output artifact
206
+ - failure mode
207
+ - idempotency rule
208
+ - 是否允许 mutation
209
+
210
+ V0 的 first-party capability contract 由 `core/capabilities.ts` 维护,并可通过只读命令 `gxpm capability list` / `gxpm capability show <capability-id>` 检查。registry 只描述合同和证据要求,不负责动态加载、执行插件或绕过 phase/artifact gate。
211
+
212
+ `verification.issue-evidence-store` 是 V0 的共享 evidence 写入能力。它只能在目标 issue 的 `evidence/` 目录内创建或覆盖文件,不能隐式推进 phase、写 phase artifact、claim issue 或调用外部 provider。
213
+
214
+ ## 与 PMC 的关系
215
+
216
+ PMC 是 gxpm 的上游能力来源和迁移对象,不是长期依赖。
217
+
218
+ gxpm 应吸收 PMC 的优秀部分:
219
+
220
+ - phase gating
221
+ - checkpoint
222
+ - Linear team key/source discipline
223
+ - acceptance/local-verify/verify/qa artifact contracts
224
+ - execution continuity
225
+
226
+ gxpm 应替换 PMC 的不足:
227
+
228
+ - QA 只停留在合同层。
229
+ - skill routing 与能力发现不够系统。
230
+ - 对 review/ship/design/devex/security/canary 的能力聚合不完整。
231
+
232
+ ## 与 gstack 的关系
233
+
234
+ gstack 是 gxpm 的上游能力来源和迁移对象,不是长期依赖。
235
+
236
+ gxpm 应吸收 gstack 的优秀部分:
237
+
238
+ - preamble/config/session/timeline/learn 模式。
239
+ - template-generated skill docs。
240
+ - browser daemon 的设计原则。
241
+ - `/review`、`/qa`、`/investigate`、`/ship` 的证据和循环机制。
242
+ - team install 与 host abstraction 的思路。
243
+
244
+ gxpm 应替换 gstack 的不足:
245
+
246
+ - Claude-only 假设。
247
+ - 自动 ship/PR 的所有语义。
248
+ - 对项目目录写入 vendored gstack 的模式。
249
+
250
+ ## V0 Stop Rules
251
+
252
+ V0 阶段如果出现以下情况,应停止并生成 report,而不是继续推进:
253
+
254
+ - 无法确定 issue/state 的真实阶段。
255
+ - Linear 与本地 state 冲突且无法安全补偿。
256
+ - adapter 的 mutation 行为不明确。
257
+ - QA/browser evidence 无法获得,但 acceptance 依赖浏览器行为。
258
+ - land/merge 需要不可逆操作但用户尚未确认。
259
+
260
+ ## 成功信号
261
+
262
+ - 新会话可以只靠 `.gxpm/issues/<issue-id>/state.json` 和 artifacts 恢复。
263
+ - 每个 phase 都有明确的 required output。
264
+ - 每个能力都有 gxpm 原生 contract。
265
+ - 失败时能降级为本地报告,而不是把状态写坏。
266
+ - 一个 issue 可以在 gxpm 内完成从 intake 到 QA/land 的最小闭环,不必同时加载 PMC 和 gstack。
267
+
268
+ ## V0 本地命令
269
+
270
+ ```bash
271
+ gxpm issue create <issue-id>
272
+ gxpm issue status <issue-id>
273
+ gxpm issue transition <issue-id> <phase>
274
+ gxpm issue checkpoint <issue-id> --title "handoff" --stdin
275
+ gxpm issue resume <issue-id>
276
+ gxpm issue ready
277
+ gxpm issue claim <issue-id>
278
+ gxpm issue release <issue-id>
279
+ gxpm issue reconcile-claim <issue-id>
280
+ gxpm capability list
281
+ gxpm capability show <capability-id>
282
+ gxpm run start <issue-id> [--claim]
283
+ gxpm run list <issue-id>
284
+ gxpm run status <issue-id> <run-id>
285
+ gxpm run event <issue-id> <run-id> --type <event>
286
+ gxpm workspace plan <issue-id>
287
+ gxpm workspace ensure <issue-id>
288
+ gxpm workspace cleanup <issue-id>
289
+ gxpm orchestrator tick --dry-run
290
+ gxpm autopilot start <issue-id>|--auto-id
291
+ gxpm autopilot status <issue-id>
292
+ gxpm autopilot list
293
+ gxpm autopilot stop <issue-id>
294
+ gxpm artifact list <issue-id>
295
+ gxpm artifact read <issue-id> <type>
296
+ gxpm triage init <issue-id>
297
+ gxpm plan init <issue-id>
298
+ gxpm dispatch init <issue-id>
299
+ gxpm specify init <issue-id>
300
+ gxpm implement verify <issue-id>
301
+ gxpm local-verify ac-check <issue-id>
302
+ gxpm ac-check self-review <issue-id>
303
+ gxpm self-review cleanup <issue-id>
304
+ gxpm cleanup ship <issue-id>
305
+ gxpm ship pr-check <issue-id>
306
+ gxpm pr-check verify <issue-id>
307
+ gxpm verify qa <issue-id>
308
+ gxpm qa land <issue-id>
309
+ ```
310
+
311
+ `gxpm issue create` 默认进入 `triage`。`gxpm issue transition` 不支持跳 phase 或 force。`gxpm triage init` 会生成 draft `acceptance-contract`,用于解锁 `triage -> plan`。`gxpm plan init` 会生成 draft `implementation-plan`,用于解锁 `plan -> dispatch`。`gxpm dispatch init` 会生成 draft `dispatch-handoff`,用于解锁 `dispatch -> specify`。`gxpm specify init` 会生成 draft `behavior-spec`,用于解锁 `specify -> implement`。`gxpm implement verify` 会生成 draft `local-verify`,用于解锁 `implement -> local-verify`。`gxpm local-verify ac-check` 会生成 draft `acceptance-check`,用于解锁 `local-verify -> ac-check`。`gxpm ac-check self-review` 会生成 draft `self-review`,用于解锁 `ac-check -> self-review`。`gxpm self-review cleanup` 会生成 draft `cleanup-report`,用于解锁 `self-review -> cleanup`。`gxpm cleanup ship` 会生成 draft `ship-readiness`,用于解锁 `cleanup -> ship`。`gxpm ship pr-check` 会生成 draft `pr-check`,用于解锁 `ship -> pr-check`。`gxpm pr-check verify` 会生成 draft `verify-findings`,用于解锁 `pr-check -> verify`。`gxpm verify qa` 会生成 draft `qa-findings`,用于解锁 `verify -> qa`。`gxpm qa land` 会生成 draft `land-findings`,用于解锁 `qa -> land`。
@@ -0,0 +1,193 @@
1
+ # Layered Workflow Boundaries
2
+
3
+ 日期:2026-05-10
4
+
5
+ ## 目的
6
+
7
+ 本文件把 `ZeroZ-lab/unified-skills` 的完整工程实践,转译为 gxpm 的长期分层合同。
8
+
9
+ 它回答五个边界问题:
10
+
11
+ - Command 负责什么?
12
+ - Agent 负责什么?
13
+ - Skill 负责什么?
14
+ - Artifact 负责什么?
15
+ - Hook / Validate 负责什么?
16
+
17
+ gxpm 的目标不是复制 unified-skills 的目录,而是吸收它的分层原则:入口清晰、职责单一、证据可追溯、运行前后都有守卫。
18
+
19
+ ## 上游研究证据
20
+
21
+ 研究对象:
22
+
23
+ - 本地路径:`/Users/x/Desktop/Project/github/unified-skills`
24
+ - 上游仓库:`https://github.com/ZeroZ-lab/unified-skills`
25
+ - 研究时 HEAD:`f4e6dde`
26
+
27
+ 关键工程实践:
28
+
29
+ - `CANON.md` 定义不可破坏的系统规则,约束 command、agent、skill、hook 的协作方式。
30
+ - `commands/*.md` 把用户意图收敛为可执行流程,例如 `refine`、`plan`、`build`、`review`、`ship`。
31
+ - `agents/*.md` 把执行者拆成明确责任视角,例如 spec compliance auditor、code quality auditor、task planner、software engineer。
32
+ - `skills-index.json` 和 `load-manifest.json` 把 skill 变成可发现、可加载、可校验的能力目录。
33
+ - `hooks/*.sh` 与 `hooks/hooks.json` 在 SessionStart、UserPromptSubmit、工具使用前后注入运行守卫。
34
+ - `validate` 把目录、索引、manifest、hook 和命名约定变成可重复执行的检查。
35
+
36
+ 这套实践的核心不是文件格式,而是分层闭环:
37
+
38
+ ```text
39
+ Command 选择流程
40
+ Agent 承担责任视角
41
+ Skill 提供可加载方法
42
+ Artifact 保存事实和证据
43
+ Hook / Validate 阻止边界漂移
44
+ ```
45
+
46
+ ## gxpm 分层定义
47
+
48
+ ### Command
49
+
50
+ Command 是用户和 agent 进入 state graph 的入口。
51
+
52
+ 在 gxpm 中,Command 由 CLI 和 phase gate 表达:
53
+
54
+ - `scripts/gxpm.ts`
55
+ - `scripts/phase-artifact-commands.ts`
56
+ - `core/phase-gates.ts`
57
+
58
+ Command 只回答:
59
+
60
+ - 当前 phase 允许什么动作?
61
+ - 需要哪个输入 artifact?
62
+ - 会生成哪个输出 artifact?
63
+ - 是否可以 transition?
64
+
65
+ Command 不应该承载长期业务真值。业务真值必须写入 `.gxpm/issues/<id>/`。
66
+
67
+ ### Agent
68
+
69
+ Agent 是责任视角,不是人格模板。
70
+
71
+ 在 gxpm 中,Agent 当前主要体现在 phase 责任里:
72
+
73
+ - triage owner 澄清范围和验收合同。
74
+ - planner owner 输出实现计划和验证策略。
75
+ - implementer owner 修改代码并记录 local verification。
76
+ - reviewer owner 检查 acceptance、self-review、ship readiness。
77
+ - QA owner 记录 browser/runtime 证据。
78
+ - land owner 记录 merge plan 和 release risks。
79
+
80
+ GXPM-120 的研究结论是:Agent 层还没有成为第一类 registry。短期先通过 capability contract 覆盖每个 phase gate,长期再设计 Agent Runtime,把 role、input、output、stop rule 和 handoff 做成可查询契约。
81
+
82
+ ### Skill
83
+
84
+ Skill 是 host 发现和加载 gxpm 方法的表面,不是真值层。
85
+
86
+ 在 gxpm 中,Skill Surface 包括:
87
+
88
+ - `skills/gxpm/SKILL.md.tmpl`
89
+ - `scripts/gen-skill-docs.ts`
90
+ - 生成后的 host-facing `SKILL.md`
91
+ - host config 和 skill naming checks
92
+
93
+ Skill 可以解释如何运行 gxpm,但不能替代:
94
+
95
+ - state graph
96
+ - artifact store
97
+ - capability registry
98
+ - phase gate rules
99
+
100
+ 因此修改 skill 时必须改模板和生成器,不把生成物当真值手修。
101
+
102
+ ### Artifact
103
+
104
+ Artifact 是 phase 结论、验收状态和可恢复事实。
105
+
106
+ 在 gxpm 中,Artifact 的位置是:
107
+
108
+ ```text
109
+ .gxpm/issues/<issue-id>/artifacts/*.json
110
+ ```
111
+
112
+ Artifact 必须承载:
113
+
114
+ - 当前 phase 的输入摘要
115
+ - 输出结论
116
+ - 验收状态
117
+ - 风险和失败模式
118
+ - 后续 phase 可恢复的最小事实
119
+
120
+ 原始证据不应该塞进 artifact。截图、console、命令输出、review 原文和调查过程属于 `evidence/`,artifact 只引用它们并总结结论。
121
+
122
+ ### Hook / Validate
123
+
124
+ Hook 和 Validate 是防漂移层。
125
+
126
+ 在 gxpm 中,对应能力包括:
127
+
128
+ - git hooks 和 `gxpm gate`
129
+ - `bun run check`
130
+ - `scripts/scaffold-check.ts`
131
+ - `scripts/governance-check.ts`
132
+ - `core/artifact-validator.ts`
133
+ - phase gate tests
134
+
135
+ Hook / Validate 不应该替 agent 做业务判断;它们只负责阻止明显违反合同的状态进入仓库。
136
+
137
+ ## 四个缺口
138
+
139
+ ### 1. Agent 层不是第一类对象
140
+
141
+ 问题:gxpm 有 phase 和 capability,但没有像 unified-skills `agents/*.md` 那样可查询的责任视角目录。
142
+
143
+ 本次落地:先把每个 phase gate artifact 映射到 capability contract,确保执行责任至少有清楚的输入、输出、证据、失败模式和 mutation policy。
144
+
145
+ 后续方向:新增 Agent Runtime 或 agent registry,把 reviewer、QA、implementer、planner 等责任视角显式建模。
146
+
147
+ ### 2. Capability Registry 没覆盖所有 phase gate artifact
148
+
149
+ 问题:部分 gate artifact 只存在于 phase initializer 和 tests 中,没有 capability contract。这样 agent 不知道某个 artifact 对应的能力边界。
150
+
151
+ 本次落地:`core/capabilities.ts` 补齐 gate artifact 覆盖,并用测试证明所有 `PHASE_GATE_RULES.requiredArtifact` 都能被 capability 输出。
152
+
153
+ ### 3. Artifact Validator 仍停留在旧 artifact 名称
154
+
155
+ 问题:validator 还在校验早期 `spec`、`plan`、`tasks`,而 gxpm 当前 artifact 已经演化为 `acceptance-contract`、`implementation-plan`、`dispatch-handoff` 等。
156
+
157
+ 本次落地:`core/artifact-validator.ts` 改为基于 `ARTIFACT_TYPES` 的 gxpm artifact schema,并让 CLI artifact write 使用统一 validator。
158
+
159
+ ### 4. Validate 层没有检查分层边界漂移
160
+
161
+ 问题:`bun run check` 主要验证 host config、governance、version、skill naming,不能发现 phase gate、capability output、artifact validator 三者不一致。
162
+
163
+ 本次落地:`scripts/scaffold-check.ts` 增加 layered workflow contract check,检查:
164
+
165
+ - 每个 phase gate artifact 都有 capability output。
166
+ - 每个 artifact type 都被 artifact validator 覆盖。
167
+ - capability output 不引用未知 artifact。
168
+
169
+ ## 边界矩阵
170
+
171
+ | Layer | gxpm 真值 | 允许写入 | 不允许承担 |
172
+ | --- | --- | --- | --- |
173
+ | Command | `core/phase-gates.ts`、CLI command handlers | phase transition、artifact initialization | 长期业务事实 |
174
+ | Agent | phase owner / future agent registry | handoff、review、QA、land 责任结论 | 绕过 phase gate |
175
+ | Skill | `*.tmpl`、生成器、host config | host-facing guidance | state truth、artifact truth |
176
+ | Artifact | `.gxpm/issues/<id>/artifacts/*.json` | phase 结论、验收状态、风险 | 原始日志和截图 |
177
+ | Hook / Validate | `gxpm gate`、`bun run check`、scaffold checks | 阻止合同漂移 | 替代人工判断或业务验收 |
178
+
179
+ ## 非目标
180
+
181
+ - 不引入 unified-skills 运行时依赖。
182
+ - 不把 gxpm 写成 unified-skills、PMC 或 gstack 的兼容壳。
183
+ - 不在本次实现完整 Agent Runtime。
184
+ - 不把所有 evidence schema 一次性收紧;本次只校准 phase gate artifact 的结构边界。
185
+
186
+ ## 设计原则
187
+
188
+ 1. Command 只路由,不沉淀事实。
189
+ 2. Agent 是责任,不是聊天人格。
190
+ 3. Skill 是入口,不是真值。
191
+ 4. Artifact 是恢复和验收的最小事实。
192
+ 5. Hook / Validate 是防漂移,不替代判断。
193
+ 6. 每个 capability 必须声明输入、输出、证据、失败模式和 mutation policy。
@@ -0,0 +1,126 @@
1
+ # Preset System Architecture
2
+
3
+ > Override > Preset > Core three-layer resolution for gxpm templates and skills.
4
+
5
+ ## Overview
6
+
7
+ The preset system allows projects to customize gxpm-generated artifacts (skills, templates, commands) without forking the core repository. It implements a subset of Spec Kit's four-layer extensibility stack:
8
+
9
+ | Layer | Path | Priority | Purpose |
10
+ |-------|------|----------|---------|
11
+ | Override | `.gxpm/overrides/` | Highest | One-off local adjustments (full replacement) |
12
+ | Preset | `.gxpm/presets/<id>/` | Middle | Shareable, stackable template/command overrides |
13
+ | Core | `skills/`, `templates/` | Lowest | Built-in defaults |
14
+
15
+ Extension and hooks are deferred to future iterations (MVP: Override + Preset + Core only).
16
+
17
+ ## Directory Layout
18
+
19
+ ```
20
+ .gxpm/
21
+ ├── overrides/ # Override layer (mirrors project root structure)
22
+ │ └── skills/
23
+ │ └── gxpm/
24
+ │ └── SKILL.md # Full replacement of generated skill
25
+ ├── presets/
26
+ │ ├── .registry # Active preset IDs (JSON)
27
+ │ ├── default/
28
+ │ │ ├── manifest.json # Preset manifest
29
+ │ │ └── skill.md # Source file for replace rule
30
+ │ └── team-alpha/
31
+ │ ├── manifest.json
32
+ │ └── header.md
33
+ ```
34
+
35
+ ## Registry Format
36
+
37
+ `.gxpm/presets/.registry`:
38
+
39
+ ```json
40
+ {
41
+ "active": ["team-alpha", "default"]
42
+ }
43
+ ```
44
+
45
+ - `active` is ordered by priority (first = highest).
46
+ - Presets not in `active` are loaded but not applied.
47
+
48
+ ## Manifest Schema
49
+
50
+ `manifest.json`:
51
+
52
+ ```json
53
+ {
54
+ "id": "default",
55
+ "name": "Default Preset",
56
+ "version": "1.0.0",
57
+ "description": "Optional description",
58
+ "extends": ["base-preset"],
59
+ "rules": [
60
+ {
61
+ "target": "skills/gxpm/SKILL.md",
62
+ "strategy": "replace",
63
+ "source": "skill.md"
64
+ },
65
+ {
66
+ "target": "skills/*/SKILL.md",
67
+ "strategy": "append",
68
+ "source": "notice.md"
69
+ }
70
+ ]
71
+ }
72
+ ```
73
+
74
+ ### Fields
75
+
76
+ - `id` — unique preset identifier (matches directory name)
77
+ - `name` — human-readable name
78
+ - `version` — semver string
79
+ - `description` — optional description
80
+ - `extends` — IDs of lower-priority presets to inherit (not yet implemented in MVP)
81
+ - `rules` — composition rules
82
+
83
+ ### Rule Fields
84
+
85
+ - `target` — file path relative to project root; supports `*` wildcard
86
+ - `strategy` — `replace` | `prepend` | `append` | `wrap`
87
+ - `source` — file path relative to preset directory
88
+ - `anchor` — optional marker for positioning (prepend/append/wrap)
89
+
90
+ ## Composition Strategies
91
+
92
+ | Strategy | Behavior |
93
+ |----------|----------|
94
+ | `replace` | Full replacement with source content |
95
+ | `prepend` | Insert source before target (or before `anchor`) |
96
+ | `append` | Insert source after target (or after `anchor`) |
97
+ | `wrap` | Wrap target with source (or replace `anchor` with source) |
98
+
99
+ ## Integration with gen:skill-docs
100
+
101
+ `scripts/gen-skill-docs.ts` integrates `PresetResolver` after template rendering:
102
+
103
+ 1. Render `.tmpl` → base content
104
+ 2. Call `PresetResolver.resolve(outputPath, baseContent)`
105
+ 3. Write resolved content to disk
106
+
107
+ This means presets can override:
108
+ - Template variables (by replacing the entire generated file)
109
+ - Specific sections (by append/prepend/wrap with anchors)
110
+ - Static skills (by targeting their output path)
111
+
112
+ ## CLI Commands
113
+
114
+ ```bash
115
+ gxpm preset list # List all presets and active status
116
+ gxpm preset add <id> # Activate a preset
117
+ gxpm preset remove <id> # Deactivate a preset
118
+ gxpm preset show <id> # Show preset manifest and rules
119
+ gxpm preset init <id> # Create a new preset directory
120
+ ```
121
+
122
+ ## Backward Compatibility
123
+
124
+ - No `.gxpm/presets/` directory → `PresetResolver` returns core content unchanged
125
+ - No `.gxpm/overrides/` directory → override layer is skipped
126
+ - Existing `gen:skill-docs` behavior is preserved when no presets are active
@@ -0,0 +1,23 @@
1
+ # gxpm 脚手架北极星
2
+
3
+ gxpm 把 gstack 当作脚手架北极星,而不是运行时依赖。需要保留的是它的产品化形态:
4
+
5
+ - 用模板定义可安装的 agent-facing surface。
6
+ - 用 host adapter 显式描述每个代理运行时。
7
+ - 用生成器从模板产出可检查的 skill 文档。
8
+ - 用本地检查在生成产物漂移时 fail fast。
9
+ - 用 CLI 入口把项目做成可安装、可升级、可团队化的产品。
10
+
11
+ ## V0 合同
12
+
13
+ 初始脚手架刻意保持小而完整:
14
+
15
+ - `hosts/` 把 Codex 和 Claude Code 注册成一等 host adapter。
16
+ - `scripts/discover-skills.ts` 发现 `SKILL.md.tmpl`,同时跳过生成目录、隐藏目录和构建产物。
17
+ - `scripts/gen-skill-docs.ts` 用 host-aware preamble 渲染模板。
18
+ - `scripts/gxpm-check.ts` 校验 host 合同和生成文档。
19
+ - `bin/` 暴露稳定命令名,为后续 install/update/team-init 流程留入口。
20
+ - `docs/governance/` 把开发规范拆成渐进加载的执行合同。
21
+
22
+ 这会先给 gxpm 建立产品脊柱,再继续生长 PM state graph。下一层可以补 `.gxpm`
23
+ 状态、capability 执行、browser evidence 和 Linear sync,而不需要重写安装面。