@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.
- package/AGENTS.md +148 -0
- package/CANON.md +53 -0
- package/CLAUDE.md +60 -0
- package/CONTEXT.md +49 -0
- package/DEBUG.md +59 -0
- package/ISSUE_CONTEXT.md +25 -0
- package/README.md +143 -0
- package/VERSION +1 -0
- package/agents/cleanup-auditor/cleanup-auditor.md +56 -0
- package/agents/grill-master.md +26 -0
- package/agents/implementer.md +32 -0
- package/agents/review-army/accessibility-reviewer.md +54 -0
- package/agents/review-army/code-quality-reviewer.md +54 -0
- package/agents/review-army/security-reviewer.md +56 -0
- package/agents/review-army/spec-compliance-reviewer.md +51 -0
- package/agents/review-army/test-reviewer.md +55 -0
- package/agents/reviewer.md +59 -0
- package/agents/ship-audit-army/docs-auditor.md +53 -0
- package/agents/ship-audit-army/performance-auditor.md +52 -0
- package/agents/ship-audit-army/security-auditor.md +52 -0
- package/agents/specifier.md +55 -0
- package/agents/triage-officer.md +27 -0
- package/bin/gxpm +17 -0
- package/bin/gxpm-browser +17 -0
- package/bin/gxpm-config +15 -0
- package/bin/gxpm-eval +13 -0
- package/bin/gxpm-global-discover +15 -0
- package/bin/gxpm-init +38 -0
- package/bin/gxpm-investigate +194 -0
- package/bin/gxpm-uninstall +15 -0
- package/bin/gxpm-update-check +165 -0
- package/commands/build.md +40 -0
- package/commands/help.md +53 -0
- package/commands/plan.md +34 -0
- package/commands/refine.md +46 -0
- package/commands/review.md +34 -0
- package/commands/ship.md +37 -0
- package/core/ac-check.ts +20 -0
- package/core/agent-runtime.ts +363 -0
- package/core/artifact-validator.ts +151 -0
- package/core/artifacts.ts +313 -0
- package/core/autopilot.ts +250 -0
- package/core/capabilities.ts +779 -0
- package/core/checkpoint.ts +370 -0
- package/core/cleanup.ts +32 -0
- package/core/command-probe.ts +82 -0
- package/core/config.ts +533 -0
- package/core/contracts/behavior-spec.schema.ts +38 -0
- package/core/contracts/converter.ts +61 -0
- package/core/contracts/host.ts +43 -0
- package/core/converters/converter.ts +93 -0
- package/core/converters/index.ts +8 -0
- package/core/converters/managed-artifact.ts +119 -0
- package/core/converters/parser.ts +159 -0
- package/core/converters/template-renderer.ts +35 -0
- package/core/converters/writer.ts +61 -0
- package/core/dag-executor.ts +426 -0
- package/core/dag-loader.ts +292 -0
- package/core/dag-schemas.ts +150 -0
- package/core/dispatch.ts +125 -0
- package/core/evidence.ts +148 -0
- package/core/gate.ts +269 -0
- package/core/hook-engine.ts +566 -0
- package/core/host-probe.ts +64 -0
- package/core/implement.ts +16 -0
- package/core/isolation-errors.ts +174 -0
- package/core/isolation-resolver.ts +921 -0
- package/core/issue-context.ts +381 -0
- package/core/issue-readiness.ts +457 -0
- package/core/issue-sync.ts +427 -0
- package/core/issues.ts +132 -0
- package/core/land.ts +108 -0
- package/core/orchestrator.ts +54 -0
- package/core/phase-artifact.ts +32 -0
- package/core/phase-gates.ts +130 -0
- package/core/phase-rewind.ts +94 -0
- package/core/plan-lint.ts +61 -0
- package/core/plan.ts +77 -0
- package/core/port-allocation.ts +50 -0
- package/core/pr-check.ts +15 -0
- package/core/preset-system/preset-resolver.ts +221 -0
- package/core/project-init-status.ts +127 -0
- package/core/qa.ts +15 -0
- package/core/resilience.ts +165 -0
- package/core/runs.ts +288 -0
- package/core/safe-path.test.ts +80 -0
- package/core/safe-path.ts +60 -0
- package/core/sdd-gate.test.ts +98 -0
- package/core/sdd-gate.ts +134 -0
- package/core/self-review.ts +62 -0
- package/core/session.ts +70 -0
- package/core/ship.ts +86 -0
- package/core/specify.ts +173 -0
- package/core/state.ts +1002 -0
- package/core/template-engine.ts +152 -0
- package/core/template-resolver.test.ts +70 -0
- package/core/template-resolver.ts +156 -0
- package/core/triage.ts +26 -0
- package/core/verify.ts +15 -0
- package/core/wiki-native.ts +2423 -0
- package/core/wiki.ts +27 -0
- package/core/workflow-event-emitter.ts +163 -0
- package/core/workflows/engine.ts +273 -0
- package/core/workflows/expressions.ts +76 -0
- package/core/workflows/index.ts +38 -0
- package/core/workflows/steps/command.ts +43 -0
- package/core/workflows/steps/gate.ts +47 -0
- package/core/workflows/steps/gxpm.ts +44 -0
- package/core/workflows/steps/linear.ts +31 -0
- package/core/workflows/steps/shell.ts +65 -0
- package/core/workflows/types.ts +62 -0
- package/core/workspace-runtime.ts +227 -0
- package/core/worktree-init-steps.ts +647 -0
- package/core/worktree-init.ts +330 -0
- package/core/worktree-owner.ts +143 -0
- package/docs/GXPM_VERIFY.md +98 -0
- package/docs/INSTALL_FOR_AGENTS.md +113 -0
- package/docs/README.md +57 -0
- package/docs/adr/adr-005-multi-platform-skill-converter.md +72 -0
- package/docs/agents/domain.md +30 -0
- package/docs/agents/issue-tracker.md +30 -0
- package/docs/agents/triage-labels.md +32 -0
- package/docs/architecture/gxpm-architecture-diagram.md +265 -0
- package/docs/architecture/gxpm-current-architecture.md +175 -0
- package/docs/architecture/gxpm-current-flow.md +278 -0
- package/docs/architecture/gxpm-replacement-architecture.md +211 -0
- package/docs/architecture/gxpm-target-architecture.md +449 -0
- package/docs/architecture/gxpm-v0-contract.md +311 -0
- package/docs/architecture/layered-workflow-boundaries.md +193 -0
- package/docs/architecture/preset-system.md +126 -0
- package/docs/architecture/scaffold-northstar.md +23 -0
- package/docs/brainstorms/2026-05-14-bdd-then-tdd-design.md +320 -0
- package/docs/brainstorms/README.md +22 -0
- package/docs/brainstorms/docs-knowledge-system-requirements.md +29 -0
- package/docs/governance/beta-skill-promotion.md +39 -0
- package/docs/governance/development-contract.md +144 -0
- package/docs/governance/gherkin-style.md +90 -0
- package/docs/governance/host-adapter.md +56 -0
- package/docs/governance/skill-authoring.md +87 -0
- package/docs/governance/skill-testing.md +356 -0
- package/docs/governance/template-authoring.md +53 -0
- package/docs/migrations/v0.2.md +51 -0
- package/docs/plans/README.md +23 -0
- package/docs/plans/bdd-then-tdd-plan.md +1767 -0
- package/docs/plans/docs-knowledge-system-plan.md +31 -0
- package/docs/plans/spec-kit-sdd-adoption-plan.md +305 -0
- package/docs/research/agents-md-best-practices.md +207 -0
- package/docs/research/archon-study.md +351 -0
- package/docs/research/claude-hooks-study.md +440 -0
- package/docs/research/codex-hooks-study.md +624 -0
- package/docs/research/everything-claude-code-study.md +252 -0
- package/docs/research/from-skills-to-layered-workflow.md +322 -0
- package/docs/research/gsd-study.md +69 -0
- package/docs/research/kimi-hooks-study.md +274 -0
- package/docs/research/mattpocock-skills-comparison.md +429 -0
- package/docs/research/mattpocock-skills-study.md +275 -0
- package/docs/research/oh-my-codex-study.md +279 -0
- package/docs/research/perplexity-agent-skills-design.md +168 -0
- package/docs/research/pmc-gstack-skill-study.md +122 -0
- package/docs/research/spec-kit-study.md +224 -0
- package/docs/research/superpowers-study.md +209 -0
- package/docs/roadmap/initial-roadmap.md +53 -0
- package/docs/solutions/README.md +45 -0
- package/docs/solutions/artifact-nesting-recovery.md +58 -0
- package/docs/solutions/session-context-restore-practice.md +67 -0
- package/docs/solutions/workflow/version-drift-recovery.md +49 -0
- package/docs/solutions/worktree-gate-recovery.md +62 -0
- package/docs/specs/README.md +28 -0
- package/docs/specs/claude.md +45 -0
- package/docs/specs/codex.md +44 -0
- package/docs/specs/cursor.md +44 -0
- package/hosts/adapters/claude.ts +29 -0
- package/hosts/adapters/codex.ts +27 -0
- package/hosts/adapters/cursor.ts +27 -0
- package/hosts/adapters/kimi.ts +27 -0
- package/hosts/claude.ts +23 -0
- package/hosts/codex.ts +26 -0
- package/hosts/cursor.ts +19 -0
- package/hosts/index.ts +33 -0
- package/hosts/registry.test.ts +52 -0
- package/hosts/registry.ts +57 -0
- package/hosts/schema.ts +58 -0
- package/package.json +52 -0
- package/scripts/browser.ts +185 -0
- package/scripts/cleanup.ts +142 -0
- package/scripts/commands/artifact.ts +115 -0
- package/scripts/commands/autopilot.ts +143 -0
- package/scripts/commands/capability.ts +57 -0
- package/scripts/commands/config.ts +69 -0
- package/scripts/commands/dag.ts +126 -0
- package/scripts/commands/feedback.ts +123 -0
- package/scripts/commands/gate.ts +291 -0
- package/scripts/commands/helpers.ts +126 -0
- package/scripts/commands/hook.ts +66 -0
- package/scripts/commands/init.ts +515 -0
- package/scripts/commands/issue.ts +825 -0
- package/scripts/commands/phase.ts +61 -0
- package/scripts/commands/preset.ts +159 -0
- package/scripts/commands/runtime.ts +199 -0
- package/scripts/commands/specify.ts +71 -0
- package/scripts/commands/upgrade.ts +243 -0
- package/scripts/commands/verify.ts +183 -0
- package/scripts/commands/wiki.ts +242 -0
- package/scripts/commands/workflow.ts +131 -0
- package/scripts/dev-skill.ts +55 -0
- package/scripts/discover-skills.ts +116 -0
- package/scripts/doctor.ts +410 -0
- package/scripts/dogfood-check.ts +125 -0
- package/scripts/eval-functional.ts +218 -0
- package/scripts/eval.ts +246 -0
- package/scripts/gen-skill-docs.ts +201 -0
- package/scripts/global-discover.ts +217 -0
- package/scripts/governance-check.ts +75 -0
- package/scripts/gxpm-check.ts +12 -0
- package/scripts/gxpm.ts +216 -0
- package/scripts/host-config.ts +62 -0
- package/scripts/install-claude-hooks.ts +138 -0
- package/scripts/install-codex-hooks.ts +271 -0
- package/scripts/install-hooks.ts +128 -0
- package/scripts/install-kimi-hooks.ts +92 -0
- package/scripts/install-skill.ts +184 -0
- package/scripts/phase-artifact-commands.ts +100 -0
- package/scripts/post-land-sync.ts +46 -0
- package/scripts/scaffold-check.ts +85 -0
- package/scripts/skill-naming-check.ts +78 -0
- package/scripts/skill-structure-check.ts +157 -0
- package/scripts/skills-lock-check.ts +60 -0
- package/scripts/sync-markdown-artifacts.ts +172 -0
- package/scripts/uninstall.ts +162 -0
- package/scripts/version.ts +47 -0
- package/scripts/wait-pr-ready.ts +407 -0
- package/skills/gxpm/SKILL.md +485 -0
- package/skills/gxpm/SKILL.md.tmpl +422 -0
- package/skills/gxpm/references/CANON.md +53 -0
- package/skills/gxpm/references/key-rules.md +130 -0
- package/skills/gxpm-architecture/SKILL.md +106 -0
- package/skills/gxpm-architecture/references/DEEPENING.md +37 -0
- package/skills/gxpm-architecture/references/INTERFACE-DESIGN.md +44 -0
- package/skills/gxpm-autopilot/SKILL.md +116 -0
- package/skills/gxpm-autopilot/SKILL.md.tmpl +107 -0
- package/skills/gxpm-browser/SKILL.md +105 -0
- package/skills/gxpm-browser/SKILL.md.tmpl +41 -0
- package/skills/gxpm-browser/references/commands.md +43 -0
- package/skills/gxpm-browser/references/evidence-path.md +20 -0
- package/skills/gxpm-build/SKILL.md +78 -0
- package/skills/gxpm-cleanup/SKILL.md +76 -0
- package/skills/gxpm-debug-issue/SKILL.md +39 -0
- package/skills/gxpm-diagnose/SKILL.md +220 -0
- package/skills/gxpm-diagnose/SKILL.md.tmpl +31 -0
- package/skills/gxpm-diagnose/references/feedback-loop.md +34 -0
- package/skills/gxpm-diagnose/references/feedback-loops.md +43 -0
- package/skills/gxpm-diagnose/references/phases.md +60 -0
- package/skills/gxpm-eval/SKILL.md +78 -0
- package/skills/gxpm-explore-codebase/SKILL.md +36 -0
- package/skills/gxpm-explore-codebase/scripts/summarize-communities.ts +51 -0
- package/skills/gxpm-feedback/SKILL.md +122 -0
- package/skills/gxpm-grill/SKILL.md +159 -0
- package/skills/gxpm-grill/SKILL.md.tmpl +77 -0
- package/skills/gxpm-grill/references/documentation-templates.md +56 -0
- package/skills/gxpm-grill/references/process.md +25 -0
- package/skills/gxpm-handoff/SKILL.md +112 -0
- package/skills/gxpm-hygiene/SKILL.md +69 -0
- package/skills/gxpm-implementer/SKILL.md +142 -0
- package/skills/gxpm-implementer/SKILL.md.tmpl +141 -0
- package/skills/gxpm-linear/SKILL.md +282 -0
- package/skills/gxpm-linear/SKILL.md.tmpl +86 -0
- package/skills/gxpm-linear/references/commands.md +75 -0
- package/skills/gxpm-linear/references/workflows.md +120 -0
- package/skills/gxpm-planning/SKILL.md +134 -0
- package/skills/gxpm-prototype/SKILL.md +64 -0
- package/skills/gxpm-refactor-safely/SKILL.md +62 -0
- package/skills/gxpm-review-army/SKILL.md +117 -0
- package/skills/gxpm-review-changes/SKILL.md +36 -0
- package/skills/gxpm-setup/SKILL.md +101 -0
- package/skills/gxpm-specifier/SKILL.md +135 -0
- package/skills/gxpm-tdd/SKILL.md +187 -0
- package/skills/gxpm-tdd/references/interface-design.md +23 -0
- package/skills/gxpm-tdd/references/mocking.md +27 -0
- package/skills/gxpm-tdd/references/red-green-refactor.md +61 -0
- package/skills/gxpm-tdd/references/troubleshooting.md +28 -0
- package/skills/gxpm-tdd/references/workflow.md +50 -0
- package/skills/gxpm-tdd/testing-anti-patterns.tmpl +304 -0
- package/skills/gxpm-triage/SKILL.md +160 -0
- package/skills/gxpm-verify/SKILL.md +107 -0
- package/skills/gxpm-write-skill/SKILL.md +131 -0
- package/skills/gxpm-zoom-out/SKILL.md +69 -0
- package/skills/maintain-hygiene-skills-lock/SKILL.md +54 -0
- package/skills/maintain-hygiene-skills-lock/SKILL.md.tmpl +53 -0
- package/templates/constitution-template.md +63 -0
- package/templates/hooks/gxpm-commit-msg +16 -0
- package/templates/hooks/gxpm-post-checkout +19 -0
- package/templates/hooks/gxpm-post-commit +7 -0
- package/templates/hooks/gxpm-post-merge +29 -0
- package/templates/hooks/gxpm-pre-commit +39 -0
- package/templates/hooks/gxpm-pre-push +33 -0
- package/templates/plan-template.md.tmpl +46 -0
- package/templates/spec-template.md.tmpl +63 -0
- package/templates/specify-stub.tmpl +22 -0
- package/templates/tasks-template.md.tmpl +32 -0
|
@@ -0,0 +1,485 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gxpm
|
|
3
|
+
description: Second-generation agent project management runtime. Use when user mentions gxpm, issue phases, worktrees, artifacts, checkpoint recovery, or asks about project management workflow.
|
|
4
|
+
---
|
|
5
|
+
<!-- AUTO-GENERATED from SKILL.md.tmpl - do not edit directly -->
|
|
6
|
+
|
|
7
|
+
## Host Preamble
|
|
8
|
+
|
|
9
|
+
Target host: OpenAI Codex CLI.
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
GXPM_ROOT="${GXPM_ROOT:-$PWD}"
|
|
13
|
+
GXPM_STATE_DIR="${GXPM_STATE_DIR:-$GXPM_ROOT/.gxpm}"
|
|
14
|
+
export GXPM_ROOT GXPM_STATE_DIR
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## CANON(行为宪法)
|
|
18
|
+
|
|
19
|
+
以下纪律内联自 gxpm 源码仓库 `CANON.md`,所有 gxpm 操作前必须遵守:
|
|
20
|
+
|
|
21
|
+
> CANON.md 是 gxpm 的最高行为合同。它不描述某个具体技能怎么做,而是规定所有 Agent 在所有阶段都必须遵守的纪律。
|
|
22
|
+
|
|
23
|
+
## 1. 真值优先
|
|
24
|
+
|
|
25
|
+
先读本仓库真值和相关上游 skill/source,再改文件。来源冲突时,先指出冲突和建议的最小安全路径。
|
|
26
|
+
|
|
27
|
+
## 2. Issue 驱动
|
|
28
|
+
|
|
29
|
+
任何非平凡代码改动开始前,确认有对应 GXPM-N issue 处于正确阶段;否则先 `gxpm issue create --auto-id` 并走完 triage → plan → dispatch。
|
|
30
|
+
|
|
31
|
+
## 3. Phase 不可臆测
|
|
32
|
+
|
|
33
|
+
不从聊天记忆推断 phase 或完成状态。不确定下一步时,统一查 `gxpm issue next <id>`,不要自己拼 CLI。
|
|
34
|
+
|
|
35
|
+
## 4. Artifact 先决
|
|
36
|
+
|
|
37
|
+
Phase 推进前先写完 artifact,再 `gxpm issue transition`。不要直接编辑 `.gxpm/issues/<id>/*.json`,统一通过 `gxpm artifact write` / `gxpm artifact edit`。
|
|
38
|
+
|
|
39
|
+
## 5. 设计落盘
|
|
40
|
+
|
|
41
|
+
方案、取舍、替代选项必须写到对应 artifact(triage-report / implementation-plan / ADR 等),不能只留在聊天里。下一个会话只读 `.gxpm/issues/<id>/` 也能恢复上下文是底线。
|
|
42
|
+
|
|
43
|
+
## 6. 生成物纪律
|
|
44
|
+
|
|
45
|
+
编辑 skill 时改 `*.tmpl`,再运行 `bun run gen:skill-docs`。生成物冲突只能通过模板和生成器解决,再重新生成。不手改生成产物当真值。
|
|
46
|
+
|
|
47
|
+
## 7. Worktree 隔离
|
|
48
|
+
|
|
49
|
+
进入 implement 前 `git status -sb` 检查未追踪文件;如有 3+ 个来源不明文件,默认走独立 worktree 隔离。`git worktree add` 之后必须 `cd` 进新 worktree 才能动代码。
|
|
50
|
+
|
|
51
|
+
## 8. 证据可复核
|
|
52
|
+
|
|
53
|
+
browser/QA/review/ship 相关结论必须落到可复核证据。汇报包含路径、命令和验证证据。
|
|
54
|
+
|
|
55
|
+
## 9. 安全门控
|
|
56
|
+
|
|
57
|
+
destructive cleanup、发布、合并、远端写操作前必须确认。不把 gxpm 写成 PMC/gstack wrapper,不引入 PMC/gstack 运行时依赖。不做 yes-machine。
|
|
58
|
+
|
|
59
|
+
## 10. 失败归因
|
|
60
|
+
|
|
61
|
+
不声称历史失败与本次无关,除非有 base/main 对照证据或仓库已有记录证明该失败是基线噪声。
|
|
62
|
+
|
|
63
|
+
## 约束层级
|
|
64
|
+
|
|
65
|
+
```text
|
|
66
|
+
CANON.md
|
|
67
|
+
├─ 约束 Command:阶段不能跳过必要门控
|
|
68
|
+
├─ 约束 Agent:角色不能越权自证通过
|
|
69
|
+
├─ 约束 Skill:技能只能增加纪律,不能放松宪法
|
|
70
|
+
└─ 约束 Artifact:产物必须留下可审计证据
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
# gxpm
|
|
74
|
+
|
|
75
|
+
gxpm 是面向代理执行的统一项目管理运行时。
|
|
76
|
+
产品目标是替代 PMC 和 gstack,以原生状态图、能力运行时和阶段门控推进 —— 不是包装它们。
|
|
77
|
+
|
|
78
|
+
## 入口条件
|
|
79
|
+
|
|
80
|
+
**何时触发**
|
|
81
|
+
- 用户提到 gxpm、issue phases、worktrees、artifacts、checkpoint recovery。
|
|
82
|
+
- 用户询问项目管理 workflow、阶段推进、或 issue 生命周期。
|
|
83
|
+
- 任何涉及 `.gxpm/issues/<id>/` 状态或 artifact 的操作。
|
|
84
|
+
|
|
85
|
+
**前置条件**
|
|
86
|
+
- [ ] 已阅读本 skill 内嵌的 CANON(行为宪法)章节。
|
|
87
|
+
- 如状态不存在,先创建:`gxpm issue create --auto-id`。
|
|
88
|
+
|
|
89
|
+
**Skill 边界(什么情况下应该加载别的 skill)**
|
|
90
|
+
- 纪律性调试循环 → `/gxpm-diagnose`
|
|
91
|
+
- 对齐会议、术语精炼 → `/gxpm-grill`
|
|
92
|
+
- 垂直切片测试驱动开发 → `/gxpm-tdd`
|
|
93
|
+
- 架构摩擦分析 → `/gxpm-architecture`
|
|
94
|
+
- PRD 合成与垂直切片拆分 → `/gxpm-planning`
|
|
95
|
+
- Issue 状态机管理(分类、标签、路由) → `/gxpm-triage`
|
|
96
|
+
- GitNexus 驱动问题调试 → `/gxpm-debug-issue`
|
|
97
|
+
- GitNexus 驱动代码探索 → `/gxpm-explore-codebase`
|
|
98
|
+
- GitNexus 驱动安全重构 → `/gxpm-refactor-safely`
|
|
99
|
+
- GitNexus 驱动变更审查 → `/gxpm-review-changes`
|
|
100
|
+
- 浏览器证据捕获 → `/gxpm-browser`
|
|
101
|
+
|
|
102
|
+
## 可操作流程
|
|
103
|
+
|
|
104
|
+
### 速查手册
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
gxpm issue status <issue-id> # 读取当前阶段
|
|
108
|
+
gxpm issue next <issue-id> # 推荐下一步命令(创建 issue 后必须首先执行)
|
|
109
|
+
gxpm issue context <issue-id> # 完整上下文 + 恢复新鲜度 + 必读文件 + 代理指令(新会话续做的首选入口)
|
|
110
|
+
gxpm issue context --auto # 自动从当前 worktree 恢复(忘记 issue id 时用)
|
|
111
|
+
gxpm issue list # 活跃 issue
|
|
112
|
+
gxpm issue create --auto-id # 使用下一个空闲 id 创建新 issue
|
|
113
|
+
gxpm phase rewind <issue-id> --to <phase> --reason "..." # 回退到已进入过的历史阶段(需显式理由)
|
|
114
|
+
gxpm autopilot start <issue-id>|--auto-id --profile full-delivery
|
|
115
|
+
gxpm autopilot status <issue-id>
|
|
116
|
+
gxpm doctor # 健康检查
|
|
117
|
+
gxpm version # 已安装版本
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### issue 执行路径(不可绕过)
|
|
121
|
+
|
|
122
|
+
**创建 issue 后的第一步必须是 `gxpm issue next <issue-id>`。**
|
|
123
|
+
|
|
124
|
+
Agent 不得自行拼凑 checkpoint、issue-intake 或其他非标准命令来试探阶段路径。`issue next` 是单一真相源,它会告诉你当前阶段、下一步 transition 命令、以及当前阶段可用的 artifact init 命令。
|
|
125
|
+
|
|
126
|
+
**各阶段 artifact init 映射表:**
|
|
127
|
+
|
|
128
|
+
| 当前阶段 | 初始化命令 | 产出 artifact |
|
|
129
|
+
|----------|-----------|--------------|
|
|
130
|
+
| triage | `gxpm triage init <issue-id>` | acceptance-contract |
|
|
131
|
+
| plan | `gxpm plan init <issue-id>` | implementation-plan |
|
|
132
|
+
| dispatch | `gxpm dispatch init <issue-id>` | dispatch-handoff |
|
|
133
|
+
| specify | `gxpm specify init <issue-id>` | behavior-spec |
|
|
134
|
+
| implement | `gxpm implement verify <issue-id>` | local-verify |
|
|
135
|
+
| local-verify | `gxpm local-verify ac-check <issue-id>` | acceptance-check |
|
|
136
|
+
| ac-check | `gxpm ac-check self-review <issue-id>` | self-review |
|
|
137
|
+
| self-review | `gxpm self-review cleanup <issue-id>` | cleanup-report |
|
|
138
|
+
| cleanup | `gxpm cleanup ship <issue-id>` | ship-readiness |
|
|
139
|
+
| ship | `gxpm ship pr-check <issue-id>` | pr-check |
|
|
140
|
+
| pr-check | `gxpm pr-check verify <issue-id>` | verify-findings |
|
|
141
|
+
| verify | `gxpm verify qa <issue-id>` | qa-findings |
|
|
142
|
+
| qa | `gxpm qa land <issue-id>` | land-findings |
|
|
143
|
+
|
|
144
|
+
**Artifact 写入纪律:**
|
|
145
|
+
|
|
146
|
+
- 所有 artifact 写入必须通过 CLI:`gxpm artifact write <id> <type> --json ...`、`gxpm artifact edit <id> <type> ...`、或各阶段 `init` 命令。
|
|
147
|
+
- **NEVER 直接编辑 `.gxpm/issues/<id>/artifacts/*.json` 文件。** 这违反 CANON 第4条(Artifact 先决)。
|
|
148
|
+
- 当 gxpm CLI 缺少某个需要的命令时,**必须停止并报告缺口**,不得绕过命令层直接写文件系统。
|
|
149
|
+
|
|
150
|
+
### 阶段地图
|
|
151
|
+
|
|
152
|
+
完整状态机(`full` rigor)共 14 阶段:
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
triage → plan → dispatch → specify → implement → local-verify → ac-check → self-review → cleanup → ship → pr-check → verify → qa → land
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
按 `rigorLevel` 自动压缩:
|
|
159
|
+
|
|
160
|
+
| 模式 | 可见阶段数 | 压缩后流程 |
|
|
161
|
+
|---|---|---|
|
|
162
|
+
| `lite`(spike / meta) | 7 | triage → plan → specify → implement → self-review → ship → land |
|
|
163
|
+
| `standard`(默认) | 9 | triage → plan → dispatch → specify → implement → self-review → ship → qa → land |
|
|
164
|
+
| `full`(核心模块) | 14 | 完整流程,不跳过任何阶段 |
|
|
165
|
+
|
|
166
|
+
压缩规则(底层 14 阶段不变,transition 允许跨阶段跳跃):
|
|
167
|
+
- `lite` 跳过:dispatch, local-verify, ac-check, cleanup, pr-check, verify, qa
|
|
168
|
+
- `standard` 跳过:local-verify, ac-check, cleanup, pr-check, verify
|
|
169
|
+
- `full` 不跳过任何阶段
|
|
170
|
+
|
|
171
|
+
被跳过的阶段仍保留在 `phaseHistory` 和 `events.jsonl` 中(审计链完整),只是不作为必经状态节点。CLI 与 UI 通过 `getVisiblePhases(rigorLevel)` 展示压缩后的流程。
|
|
172
|
+
|
|
173
|
+
各阶段含义:
|
|
174
|
+
- `triage`: 澄清 issue、范围、风险、下一阶段。
|
|
175
|
+
- `plan`: 产出已批准的实现和验证计划。
|
|
176
|
+
- `dispatch`: 创建 worktree/交接/契约。
|
|
177
|
+
- `specify`: BDD 行为规约,产出 `behavior-spec`。
|
|
178
|
+
- `implement`: 工作者拥有的实现。
|
|
179
|
+
- `local-verify`: 代理拥有的本地验证证据。
|
|
180
|
+
- `ac-check`: 验收契约履行。
|
|
181
|
+
- `self-review`: PR 前内部审查。
|
|
182
|
+
- `cleanup`: 多 issue worktree 合并前的代码清理与简化。
|
|
183
|
+
- `ship`: PR/发布准备。
|
|
184
|
+
- `pr-check`: 审查评论和 PR 风险。
|
|
185
|
+
- `verify`: 独立验收验证。
|
|
186
|
+
- `qa`: 浏览器/运行时证明(如需要)。
|
|
187
|
+
- `land`: 合并/部署交接门。
|
|
188
|
+
|
|
189
|
+
### Phase 推进标准路径(强制)
|
|
190
|
+
|
|
191
|
+
**创建 issue 后,绝对禁止自行拼凑 CLI 命令试探。统一执行以下路径:**
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
gxpm issue next <issue-id> # 必须先查 next,按输出执行
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
**各阶段 transition 命令映射(issue next 会提示,此表为速查):**
|
|
198
|
+
|
|
199
|
+
| 当前阶段 | Transition 命令 | 产出 artifact |
|
|
200
|
+
|---|---|---|
|
|
201
|
+
| `triage` | `gxpm triage init <id>` | `acceptance-contract` draft |
|
|
202
|
+
| `plan` | `gxpm plan init <id>` | `implementation-plan` draft |
|
|
203
|
+
| `dispatch` | `gxpm dispatch init <id>` | `dispatch-handoff` draft |
|
|
204
|
+
| `specify` | `gxpm specify init <id>` | `behavior-spec` draft |
|
|
205
|
+
| `implement` | `gxpm implement verify <id>` | `local-verify` draft |
|
|
206
|
+
| `local-verify` | `gxpm local-verify ac-check <id>` | `acceptance-check` draft |
|
|
207
|
+
| `ac-check` | `gxpm ac-check self-review <id>` | `self-review` draft |
|
|
208
|
+
| `self-review` | `gxpm self-review cleanup <id>` | `cleanup-report` draft |
|
|
209
|
+
| `cleanup` | `gxpm cleanup ship <id>` | `ship-readiness` draft |
|
|
210
|
+
| `ship` | `gxpm ship pr-check <id>` | `pr-check` draft |
|
|
211
|
+
| `pr-check` | `gxpm pr-check verify <id>` | `verify-findings` draft |
|
|
212
|
+
| `verify` | `gxpm verify qa <id>` | `qa-findings` draft |
|
|
213
|
+
| `qa` | `gxpm qa land <id>` | `land-findings` draft |
|
|
214
|
+
|
|
215
|
+
**写入 artifact 的合法方式只有三种:**
|
|
216
|
+
1. `gxpm <phase> init <id>` 或对应的 phase transition 命令 — 初始化 draft
|
|
217
|
+
2. `gxpm artifact write <id> <type> --json '...'` — 写入完整 payload
|
|
218
|
+
3. `gxpm artifact edit <id> <type> ...` — 编辑已有 artifact
|
|
219
|
+
|
|
220
|
+
**任何其他命令(如 `checkpoint`、`issue-intake`)都不是 artifact 写入入口。**
|
|
221
|
+
|
|
222
|
+
### 状态优先
|
|
223
|
+
|
|
224
|
+
在做阶段工作前,先读取 `gxpm issue status <issue-id>`。
|
|
225
|
+
如果状态不存在,创建它:`gxpm issue create --auto-id`。
|
|
226
|
+
|
|
227
|
+
### 规范状态位置
|
|
228
|
+
|
|
229
|
+
`.gxpm/issues/<id>/` 始终位于**主仓库**中,绝不按 worktree 分布。
|
|
230
|
+
在 worktree 中工作时,从主仓库 cwd 运行 gxpm 命令,在 worktree 中编辑代码。
|
|
231
|
+
不要创建按 worktree 分布的 `.gxpm/` 目录。
|
|
232
|
+
|
|
233
|
+
### CONTEXT.md 纪律
|
|
234
|
+
|
|
235
|
+
`CONTEXT.md` 是领域术语的单一真相源。在 `/gxpm-grill` 会话中术语被解决或精炼时内联更新它。
|
|
236
|
+
惰性创建 —— 仅在第一个术语需要记录时创建。
|
|
237
|
+
|
|
238
|
+
### Artifact 纪律
|
|
239
|
+
|
|
240
|
+
任何非平凡的提议在阶段推进前**必须**写入 artifact。
|
|
241
|
+
Artifact 树是真相源;聊天历史是易失的。
|
|
242
|
+
|
|
243
|
+
**NEVER hand-edit `.gxpm/issues/<id>/artifacts/*.json` 文件。** 所有 artifact 写入必须通过上述三种 CLI 命令完成。若发现 CLI 缺少所需命令,必须停止操作并向用户报告缺口,不得绕过 CLI 直接写文件系统。
|
|
244
|
+
|
|
245
|
+
当 artifact 负载引用具体 CLI 命令时,使用 `--probe-cli`:
|
|
246
|
+
|
|
247
|
+
```bash
|
|
248
|
+
gxpm artifact write <issue-id> <artifact-type> --probe-cli --json '...'
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### Autopilot Grant
|
|
252
|
+
|
|
253
|
+
当用户要求“自动驾驶模式”、选择 gxpm autopilot command prompt,或明确授权代理无需逐步确认完成全流程时,先持久化授权:
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
gxpm autopilot start <issue-id>|--auto-id --profile full-delivery --prompt "<user prompt>"
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
`autopilot-grant` 是 issue-local artifact。active grant 表示用户已授权代理在该 issue 和 profile 范围内自主完成 triage、plan、dispatch、implement、verify、review、PR、merge/land 和 cleanup。不要在这些 allowed actions 内反复询问确认;只在 hard stop 出现时停止,并把阻塞原因写入当前阶段 artifact。
|
|
260
|
+
|
|
261
|
+
常用命令:
|
|
262
|
+
|
|
263
|
+
```bash
|
|
264
|
+
gxpm autopilot status <issue-id>
|
|
265
|
+
gxpm autopilot list
|
|
266
|
+
gxpm autopilot stop <issue-id> --reason "<reason>"
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
### Worktree 策略
|
|
270
|
+
|
|
271
|
+
在代码编辑前查询策略:
|
|
272
|
+
|
|
273
|
+
```bash
|
|
274
|
+
gxpm worktree policy
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
解析链:`config.json` → 用户消息 → `AGENTS.md` → 默认 (required, ask)。
|
|
278
|
+
当 `enforcement = required` 时:始终创建 worktree。当 `forbidden` 时:绝不。
|
|
279
|
+
|
|
280
|
+
在 **dispatch** 阶段,在过渡到 implement 前准备工作空间:
|
|
281
|
+
|
|
282
|
+
```bash
|
|
283
|
+
gxpm workspace ensure <issue-id>
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
- 如果创建了或重用了 git worktree,路径会被打印。编辑代码前先 `cd` 进去。
|
|
287
|
+
- 如果命令返回普通目录(非 git 仓库),直接使用该目录。
|
|
288
|
+
- 当 `enforcement = required` 或 `default = use` 时,将 `gxpm workspace ensure` 视为强制的过渡前步骤。
|
|
289
|
+
- 当从 `dispatch → implement` 过渡时,gxpm 自动调用 `ensureIssueWorkspaceWithResolver` 并用产生的 `worktreePath` 和 `worktreeDecision` 更新 `dispatch-handoff` artifact。
|
|
290
|
+
|
|
291
|
+
### 检查点 / 恢复
|
|
292
|
+
|
|
293
|
+
保存交接状态:
|
|
294
|
+
|
|
295
|
+
```bash
|
|
296
|
+
gxpm issue checkpoint <issue-id> --title "handoff" --stdin
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
在新会话中恢复(读取最新检查点包):
|
|
300
|
+
|
|
301
|
+
```bash
|
|
302
|
+
gxpm issue resume <issue-id>
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
带完整上下文 + 新鲜度检查的新会话续做(首选):
|
|
306
|
+
|
|
307
|
+
```bash
|
|
308
|
+
gxpm issue context <issue-id>
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
此命令返回:
|
|
312
|
+
- `confidence`: `fresh`, `stale_resume`, `missing_resume`, 或 `invalid_resume`
|
|
313
|
+
- `confidenceReasons`: 恢复包可信任或不可信任的原因
|
|
314
|
+
- `requiredReads`: 行动前按顺序读取的文件列表
|
|
315
|
+
- `agentInstructions`: 基于可信度的安全下一步指导
|
|
316
|
+
- `next`: 推荐的阶段推进命令
|
|
317
|
+
|
|
318
|
+
当 prompt 提到 issue id(例如"继续 GXPM-42")时,Codex hook
|
|
319
|
+
自动注入 `gxpm issue context` 输出作为额外上下文。
|
|
320
|
+
|
|
321
|
+
### Session Bootstrap 协议(上下文压缩防御)
|
|
322
|
+
|
|
323
|
+
多轮对话后 AI 代理可能因上下文压缩忘记当前 issue 和 worktree。
|
|
324
|
+
遵循以下被动恢复协议,**不依赖聊天记忆**:
|
|
325
|
+
|
|
326
|
+
1. **如果你不确定当前在哪个 issue 上工作**:
|
|
327
|
+
- 先检查当前目录是否有 `.gxpm-worktree-owner.json`:
|
|
328
|
+
```bash
|
|
329
|
+
cat .gxpm-worktree-owner.json 2>/dev/null || echo "not in a worktree"
|
|
330
|
+
```
|
|
331
|
+
- 或在 worktree 根目录寻找 `ISSUE_CONTEXT.md` 文件并阅读它。
|
|
332
|
+
- 然后运行自动恢复命令:
|
|
333
|
+
```bash
|
|
334
|
+
gxpm issue context --auto
|
|
335
|
+
```
|
|
336
|
+
此命令不需要 issue id,自动从当前目录的 worktree owner 标记中解析。
|
|
337
|
+
|
|
338
|
+
2. **每次 skill 被重新加载后(或你感觉上下文可能已丢失)**:
|
|
339
|
+
- 如果当前目录存在 `.gxpm-worktree-owner.json`,**必须先执行 `gxpm issue context --auto`** 再执行任何代码修改或阶段推进。
|
|
340
|
+
- 不要假设你还记得当前 issue id。
|
|
341
|
+
|
|
342
|
+
3. **如果 `gxpm issue context --auto` 失败**:
|
|
343
|
+
- 说明当前目录不在任何 gxpm worktree 中。
|
|
344
|
+
- 回到主仓库,运行 `gxpm issue list` 查看活跃 issue。
|
|
345
|
+
- 如果需要恢复特定 issue,运行 `gxpm issue context <id>`。
|
|
346
|
+
|
|
347
|
+
### Codex `update_plan` vs gxpm 阶段
|
|
348
|
+
|
|
349
|
+
仅在当前 gxpm 阶段内的子任务使用 Codex `update_plan`。
|
|
350
|
+
顶层进度始终通过 `gxpm issue transition` 推进。
|
|
351
|
+
|
|
352
|
+
### Hook 防御
|
|
353
|
+
|
|
354
|
+
当 skill 内容被卸载时,`gxpm gate` CLI 加上 git hooks 仍然物理上强制执行阶段门。一次性安装:
|
|
355
|
+
|
|
356
|
+
```bash
|
|
357
|
+
gxpm-init --install --target /path/to/repo
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
逃生舱:`GXPM_GATE_DISABLE=1 git commit ...`
|
|
361
|
+
|
|
362
|
+
### PR 等待状态轮询
|
|
363
|
+
|
|
364
|
+
当 `ship`、`pr-check` 或 `verify` 步骤正在等待
|
|
365
|
+
CodeRabbit、GitHub checks 或可合并性,且代理应保持当前 Codex CLI 回合存活时,使用有界轮询脚本。
|
|
366
|
+
|
|
367
|
+
```bash
|
|
368
|
+
bun run scripts/wait-pr-ready.ts <pr-number-or-url> --timeout-sec 900 --interval-sec 60
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
退出码契约:
|
|
372
|
+
|
|
373
|
+
- `0`: 审查、检查和合并状态已就绪。在写发现或采取下一阶段行动前重新读取当前 HEAD PR 状态。
|
|
374
|
+
- `1`: 被失败的检查、冲突或请求的更改阻塞。将阻塞物写入当前阶段 artifact。
|
|
375
|
+
- `124`: 超时或仍在等待。报告最新观察到的状态并干净停止,而不是永远等待。
|
|
376
|
+
|
|
377
|
+
仅在仓库不需要审批审查决定时使用 `--allow-review-required`。
|
|
378
|
+
不要将 hooks 用作唤醒源;hooks 仅在 Codex 生命周期事件后运行。
|
|
379
|
+
除非用户已明确授权不可逆操作,或存在覆盖 merge/land 的 active Autopilot Grant,否则不要从成功的轮询中合并或 land。
|
|
380
|
+
|
|
381
|
+
### Land 后清理
|
|
382
|
+
|
|
383
|
+
默认:`gxpm cleanup land <issue-id> --execute`。
|
|
384
|
+
如果保留 worktree,将 `retainWorktreeReason` 写入 `land-findings`。
|
|
385
|
+
|
|
386
|
+
### 知识边界
|
|
387
|
+
|
|
388
|
+
- 将 GitNexus 用作代理代码智能的默认层,用于代码
|
|
389
|
+
理解、调试、重构影响和 PR 审查。
|
|
390
|
+
- 将 `gxpm wiki` 视为可选的面向人类的文档表面,用于
|
|
391
|
+
入职和阶段/CLI/治理导向。
|
|
392
|
+
- 不要将 wiki 新鲜度用作阶段门。仅在人类请求本地项目文档或刷新这些文档
|
|
393
|
+
本身就是任务时运行 `gxpm wiki init/update/query`。
|
|
394
|
+
- `wiki-context` 是非门控支持 artifact;它不替代
|
|
395
|
+
GitNexus 影响/调试/审查证据。
|
|
396
|
+
|
|
397
|
+
## 红旗清单 / 反模式
|
|
398
|
+
|
|
399
|
+
- **STOP:绝不从聊天记忆推断阶段。** 始终先读 `gxpm issue status`。创建 issue 后必须先执行 `gxpm issue next <id>`。
|
|
400
|
+
- **STOP:绝不跳过 artifact 回写。** 任何非平凡提议在阶段推进前必须写入 artifact。
|
|
401
|
+
- **STOP:绝不让 Linear 替代本地状态。** `.gxpm/issues/<id>/` 是单一真相源。
|
|
402
|
+
- **STOP:NEVER 直接编辑 `.gxpm/issues/<id>/artifacts/*.json` 文件。** 所有 artifact 操作必须通过 CLI 命令(`gxpm artifact write/edit` 或 phase init)。
|
|
403
|
+
- **STOP:当 CLI 存在缺口时,停止并报告,不得绕过命令层直接写文件。**
|
|
404
|
+
- **STOP:绝不自行拼凑 CLI 试探 phase 路径。** 始终先执行 `gxpm issue next <id>`,按输出执行。
|
|
405
|
+
- **STOP:绝不因上下文压缩而盲推。** 如果你不确定当前 issue,先运行 `gxpm issue context --auto` 或阅读 `ISSUE_CONTEXT.md`。
|
|
406
|
+
- **STOP:绝不在忘记当前 issue 的情况下修改代码。** 上下文压缩后必须先恢复,再行动。
|
|
407
|
+
- **STOP:绝不未经用户明确确认或 active Autopilot Grant 授权就执行不可逆的 land 操作。**
|
|
408
|
+
- **STOP:ownership 切换后必须先恢复上下文再写 artifact。** 新 session 接管 issue 时,先运行 `gxpm issue context --auto` 或阅读 `ISSUE_CONTEXT.md`,确认理解 scope 后再操作。
|
|
409
|
+
- **STOP:发现当前 issue 范围外的新问题时,不要直接在当前 worktree 中解决。** 创建子 issue:`gxpm issue create --auto-id --parent <当前issueid>`,让子 issue 复用父 worktree。
|
|
410
|
+
- **STOP:绝不在 worktree 中创建按 worktree 分布的 `.gxpm/` 目录。** 状态始终在主仓库。
|
|
411
|
+
- **STOP:不要将 PMC/gstack 视为最终运行时依赖。** 它们是上游参考;优先使用 gxpm 原生能力。
|
|
412
|
+
- **STOP:不要硬编码主机假设。** 使用 gxpm 原生能力。
|
|
413
|
+
- **STOP:不要将 hooks 用作唤醒源。** Hooks 仅在 Codex 生命周期事件后运行。
|
|
414
|
+
- **STOP:不要从成功的轮询中自动 merge/land(除非用户已授权或存在 active Autopilot Grant)。**
|
|
415
|
+
- **STOP:不要将 wiki 新鲜度用作阶段门。**
|
|
416
|
+
- **危险信号:** `wiki-context` 试图替代 GitNexus 影响/调试/审查证据时拒绝。
|
|
417
|
+
|
|
418
|
+
## 验证清单 / 出口条件
|
|
419
|
+
|
|
420
|
+
**各阶段 artifact 要求**
|
|
421
|
+
- `triage` → `acceptance-contract`
|
|
422
|
+
- `plan` → `implementation-plan`
|
|
423
|
+
- `dispatch` → `dispatch-handoff`(含 worktreePath / worktreeDecision)
|
|
424
|
+
- `implement` → 代码变更 + commit
|
|
425
|
+
- `local-verify` → 测试/构建/浏览器证据 artifact
|
|
426
|
+
- `ac-check` → 验收契约履行记录
|
|
427
|
+
- `self-review` → review findings artifact
|
|
428
|
+
- `ship` → PR / 发布准备 artifact
|
|
429
|
+
- `pr-check` → PR 状态 / 审查评论记录
|
|
430
|
+
- `verify` → 独立验证证据
|
|
431
|
+
- `qa` → 浏览器/运行时证明(如需要)
|
|
432
|
+
- `land` → `land-findings`(含 retainWorktreeReason,如保留 worktree)
|
|
433
|
+
|
|
434
|
+
**失败时路由**
|
|
435
|
+
- 调试困难 → `/gxpm-diagnose`
|
|
436
|
+
- 需求/术语不清 → `/gxpm-grill`
|
|
437
|
+
- 代码问题 → `/gxpm-debug-issue`
|
|
438
|
+
- 架构决策 → `/gxpm-architecture`
|
|
439
|
+
- PR 审查 → `/gxpm-review-changes`
|
|
440
|
+
|
|
441
|
+
## 必需习惯
|
|
442
|
+
|
|
443
|
+
- 绝不从聊天记忆推断阶段。始终先读 `gxpm issue status`。
|
|
444
|
+
- 绝不跳过 artifact 回写。任何非平凡提议在阶段推进前必须写入 artifact。
|
|
445
|
+
- 绝不让 Linear 替代本地状态。`.gxpm/issues/<id>/` 是单一真相源。
|
|
446
|
+
|
|
447
|
+
## 关键规则
|
|
448
|
+
|
|
449
|
+
### 状态优先
|
|
450
|
+
|
|
451
|
+
在做阶段工作前,先读取 `gxpm issue status <issue-id>`。
|
|
452
|
+
如果状态不存在,创建它:`gxpm issue create --auto-id`。
|
|
453
|
+
|
|
454
|
+
### Artifact 纪律
|
|
455
|
+
|
|
456
|
+
任何非平凡的提议在阶段推进前**必须**写入 artifact。
|
|
457
|
+
Artifact 树是真相源;聊天历史是易失的。
|
|
458
|
+
|
|
459
|
+
## 相关 Skills
|
|
460
|
+
|
|
461
|
+
- 纪律性调试循环 → `/gxpm-diagnose`
|
|
462
|
+
- 对齐会议、术语精炼 → `/gxpm-grill`
|
|
463
|
+
- 垂直切片测试驱动开发 → `/gxpm-tdd`
|
|
464
|
+
- 架构摩擦分析 → `/gxpm-architecture`
|
|
465
|
+
- PRD 合成与垂直切片拆分 → `/gxpm-planning`
|
|
466
|
+
- Issue 状态机管理(分类、标签、路由) → `/gxpm-triage`
|
|
467
|
+
|
|
468
|
+
## 常见说辞表
|
|
469
|
+
|
|
470
|
+
| 用户 utterance | 推荐回应 |
|
|
471
|
+
|----------------|----------|
|
|
472
|
+
| "继续 GXPM-42" | 执行 `gxpm issue context GXPM-42`,按 requiredReads 和 agentInstructions 行动。 |
|
|
473
|
+
| "帮我推进这个 issue" | 先 `gxpm issue status <id>`,再 `gxpm issue next <id>`,按输出的推荐步骤执行。禁止自行试探命令。 |
|
|
474
|
+
| "我忘记了当前 issue" / 上下文压缩后 | 先 `cat .gxpm-worktree-owner.json`,然后 `gxpm issue context --auto`,按返回的 requiredReads 恢复上下文。 |
|
|
475
|
+
| "自动驾驶模式" | 执行 `gxpm autopilot start <id>|--auto-id --profile full-delivery --prompt "..."`,然后按 `gxpm issue next` 推进。 |
|
|
476
|
+
| "这是什么阶段?" | `gxpm issue status <id>`,然后解释当前阶段及下一阶段的入口条件。 |
|
|
477
|
+
| "我改了多少?" | 引导到 `gxpm issue context <id>` 或对应阶段的 artifact 审查。 |
|
|
478
|
+
| "可以合并了吗?" | 检查当前阶段是否为 `verify`/`qa` 之后,确认 Autopilot Grant 或显式用户授权,再执行 land 操作。 |
|
|
479
|
+
|
|
480
|
+
## Read Next
|
|
481
|
+
|
|
482
|
+
- `docs/architecture/gxpm-replacement-architecture.md`
|
|
483
|
+
- `docs/architecture/gxpm-v0-contract.md`
|
|
484
|
+
- `docs/governance/development-contract.md`
|
|
485
|
+
- `CONTEXT.md`
|