@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,779 @@
|
|
|
1
|
+
import { type ArtifactType } from "./artifacts";
|
|
2
|
+
import { type ErrorType } from "./resilience";
|
|
3
|
+
|
|
4
|
+
export const CAPABILITY_STATUSES = ["active", "planned"] as const;
|
|
5
|
+
export type CapabilityStatus = (typeof CAPABILITY_STATUSES)[number];
|
|
6
|
+
|
|
7
|
+
export const CAPABILITY_RUNTIMES = [
|
|
8
|
+
"issue",
|
|
9
|
+
"planning",
|
|
10
|
+
"execution",
|
|
11
|
+
"verification",
|
|
12
|
+
"review",
|
|
13
|
+
"browser",
|
|
14
|
+
"release",
|
|
15
|
+
"memory",
|
|
16
|
+
"knowledge",
|
|
17
|
+
"skill",
|
|
18
|
+
] as const;
|
|
19
|
+
export type CapabilityRuntime = (typeof CAPABILITY_RUNTIMES)[number];
|
|
20
|
+
|
|
21
|
+
export const CAPABILITY_MUTATION_SCOPES = [
|
|
22
|
+
"none",
|
|
23
|
+
"issue-state",
|
|
24
|
+
"issue-local-files",
|
|
25
|
+
"workspace-files",
|
|
26
|
+
"external-provider",
|
|
27
|
+
] as const;
|
|
28
|
+
export type CapabilityMutationScope = (typeof CAPABILITY_MUTATION_SCOPES)[number];
|
|
29
|
+
|
|
30
|
+
export type CapabilityFailureMode =
|
|
31
|
+
| string
|
|
32
|
+
| { description: string; defaultType?: ErrorType };
|
|
33
|
+
|
|
34
|
+
export interface CapabilityContract {
|
|
35
|
+
id: string;
|
|
36
|
+
title: string;
|
|
37
|
+
summary: string;
|
|
38
|
+
runtime: CapabilityRuntime;
|
|
39
|
+
status: CapabilityStatus;
|
|
40
|
+
inputContract: string;
|
|
41
|
+
outputContract: {
|
|
42
|
+
description: string;
|
|
43
|
+
artifacts: ArtifactType[];
|
|
44
|
+
evidence: string[];
|
|
45
|
+
};
|
|
46
|
+
mutationPolicy: {
|
|
47
|
+
scope: CapabilityMutationScope;
|
|
48
|
+
description: string;
|
|
49
|
+
};
|
|
50
|
+
idempotency: string;
|
|
51
|
+
failureModes: CapabilityFailureMode[];
|
|
52
|
+
commands: string[];
|
|
53
|
+
sourceFiles: string[];
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export const CAPABILITY_REGISTRY = [
|
|
57
|
+
{
|
|
58
|
+
id: "issue.readiness",
|
|
59
|
+
title: "Issue Readiness",
|
|
60
|
+
summary: "Reports dispatchable, blocked, ignored, claimed, released, and stale issue states.",
|
|
61
|
+
runtime: "issue",
|
|
62
|
+
status: "active",
|
|
63
|
+
inputContract: "Reads .gxpm issue state, phase, issue type, archive flag, and claim lifecycle metadata.",
|
|
64
|
+
outputContract: {
|
|
65
|
+
description: "Read-only readiness decisions for one or more issues.",
|
|
66
|
+
artifacts: [],
|
|
67
|
+
evidence: ["stdout table", "JSON readiness report"],
|
|
68
|
+
},
|
|
69
|
+
mutationPolicy: {
|
|
70
|
+
scope: "none",
|
|
71
|
+
description: "Read-only; must not write artifacts, claims, runs, or phase state.",
|
|
72
|
+
},
|
|
73
|
+
idempotency: "Repeated reads at the same state produce the same decision set.",
|
|
74
|
+
failureModes: [
|
|
75
|
+
{ description: "Missing or malformed issue state", defaultType: "FATAL" },
|
|
76
|
+
{ description: "Unreadable .gxpm issue directory", defaultType: "TRANSIENT" },
|
|
77
|
+
],
|
|
78
|
+
commands: ["gxpm issue ready [--all] [--json]"],
|
|
79
|
+
sourceFiles: ["core/issue-readiness.ts", "scripts/commands/issue.ts"],
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
id: "issue.claim-lifecycle",
|
|
83
|
+
title: "Issue Claim Lifecycle",
|
|
84
|
+
summary: "Claims, releases, and reconciles issue-local execution ownership.",
|
|
85
|
+
runtime: "issue",
|
|
86
|
+
status: "active",
|
|
87
|
+
inputContract: "Issue id, current session id, optional actor/run id, release reason, and stale threshold.",
|
|
88
|
+
outputContract: {
|
|
89
|
+
description: "Issue claim state plus issue.claimed/released/stale timeline events.",
|
|
90
|
+
artifacts: [],
|
|
91
|
+
evidence: ["state.json claim field", "events.jsonl claim events", "JSON claim response"],
|
|
92
|
+
},
|
|
93
|
+
mutationPolicy: {
|
|
94
|
+
scope: "issue-state",
|
|
95
|
+
description: "May update only the target issue claim metadata and timeline events under .gxpm.",
|
|
96
|
+
},
|
|
97
|
+
idempotency: "Same-session claim is idempotent; release/reconcile only changes state when the claim is active or stale.",
|
|
98
|
+
failureModes: [
|
|
99
|
+
{ description: "Issue already claimed by another session", defaultType: "FATAL" },
|
|
100
|
+
{ description: "Missing release reason", defaultType: "FATAL" },
|
|
101
|
+
{ description: "Invalid stale threshold", defaultType: "FATAL" },
|
|
102
|
+
],
|
|
103
|
+
commands: [
|
|
104
|
+
"gxpm issue claim <issue-id>",
|
|
105
|
+
"gxpm issue release <issue-id>",
|
|
106
|
+
"gxpm issue reconcile-claim <issue-id>",
|
|
107
|
+
],
|
|
108
|
+
sourceFiles: ["core/issue-readiness.ts", "scripts/commands/issue.ts"],
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
id: "planning.acceptance-contract",
|
|
112
|
+
title: "Acceptance Contract",
|
|
113
|
+
summary: "Initializes and records the triage contract that defines scope, criteria, risks, and affected capabilities.",
|
|
114
|
+
runtime: "planning",
|
|
115
|
+
status: "active",
|
|
116
|
+
inputContract: "Issue id, triage findings, success criteria, non-goals, risks, and capability impact notes.",
|
|
117
|
+
outputContract: {
|
|
118
|
+
description: "acceptance-contract phase artifact and artifact timeline event.",
|
|
119
|
+
artifacts: ["acceptance-contract"],
|
|
120
|
+
evidence: ["artifacts/acceptance-contract.json", "events.jsonl artifact.written"],
|
|
121
|
+
},
|
|
122
|
+
mutationPolicy: {
|
|
123
|
+
scope: "issue-local-files",
|
|
124
|
+
description: "Writes only the target issue acceptance-contract artifact through the artifact store.",
|
|
125
|
+
},
|
|
126
|
+
idempotency: "Repeated initialization rewrites the same issue artifact without mutating unrelated state.",
|
|
127
|
+
failureModes: [
|
|
128
|
+
{ description: "Current issue cannot enter plan because acceptance criteria are missing", defaultType: "FATAL" },
|
|
129
|
+
{ description: "Invalid acceptance-contract payload", defaultType: "FATAL" },
|
|
130
|
+
{ description: "Artifact store write failure", defaultType: "TRANSIENT" },
|
|
131
|
+
],
|
|
132
|
+
commands: [
|
|
133
|
+
"gxpm triage init <issue-id>",
|
|
134
|
+
"gxpm artifact write <issue-id> acceptance-contract --json <json>",
|
|
135
|
+
],
|
|
136
|
+
sourceFiles: [
|
|
137
|
+
"core/triage.ts",
|
|
138
|
+
"core/phase-gates.ts",
|
|
139
|
+
"core/artifacts.ts",
|
|
140
|
+
"scripts/phase-artifact-commands.ts",
|
|
141
|
+
"scripts/commands/artifact.ts",
|
|
142
|
+
],
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
id: "planning.implementation-plan",
|
|
146
|
+
title: "Implementation Plan",
|
|
147
|
+
summary: "Records the plan artifact that turns the acceptance contract into scoped implementation slices and validation.",
|
|
148
|
+
runtime: "planning",
|
|
149
|
+
status: "active",
|
|
150
|
+
inputContract: "Issue id, acceptance-contract artifact, chosen approach, implementation steps, risks, and validation plan.",
|
|
151
|
+
outputContract: {
|
|
152
|
+
description: "implementation-plan phase artifact and artifact timeline event.",
|
|
153
|
+
artifacts: ["implementation-plan"],
|
|
154
|
+
evidence: ["artifacts/implementation-plan.json", "events.jsonl artifact.written"],
|
|
155
|
+
},
|
|
156
|
+
mutationPolicy: {
|
|
157
|
+
scope: "issue-local-files",
|
|
158
|
+
description: "Writes only the target issue implementation-plan artifact through the artifact store.",
|
|
159
|
+
},
|
|
160
|
+
idempotency: "Repeated initialization refreshes the same plan artifact for the current issue and phase.",
|
|
161
|
+
failureModes: [
|
|
162
|
+
{ description: "Current phase is not plan", defaultType: "FATAL" },
|
|
163
|
+
{ description: "Plan lacks approach or validation contract", defaultType: "FATAL" },
|
|
164
|
+
{ description: "Artifact store write failure", defaultType: "TRANSIENT" },
|
|
165
|
+
],
|
|
166
|
+
commands: [
|
|
167
|
+
"gxpm plan init <issue-id>",
|
|
168
|
+
"gxpm artifact write <issue-id> implementation-plan --json <json>",
|
|
169
|
+
],
|
|
170
|
+
sourceFiles: [
|
|
171
|
+
"core/plan.ts",
|
|
172
|
+
"core/phase-gates.ts",
|
|
173
|
+
"core/artifacts.ts",
|
|
174
|
+
"scripts/phase-artifact-commands.ts",
|
|
175
|
+
"scripts/commands/artifact.ts",
|
|
176
|
+
],
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
id: "execution.run-ledger",
|
|
180
|
+
title: "Run Ledger",
|
|
181
|
+
summary: "Records issue-local execution attempts and append-only run events.",
|
|
182
|
+
runtime: "execution",
|
|
183
|
+
status: "active",
|
|
184
|
+
inputContract: "Issue id, optional attempt/status/workspace/message, run id, event type, and optional claim actor.",
|
|
185
|
+
outputContract: {
|
|
186
|
+
description: "Run records stored under the issue runs directory.",
|
|
187
|
+
artifacts: [],
|
|
188
|
+
evidence: ["runs/run-*.json", "JSON run response", "stdout run status"],
|
|
189
|
+
},
|
|
190
|
+
mutationPolicy: {
|
|
191
|
+
scope: "issue-local-files",
|
|
192
|
+
description: "May create, update, or remove run ledger files for the target issue only.",
|
|
193
|
+
},
|
|
194
|
+
idempotency: "Run status/list reads are stable; run start creates one new attempt unless rolled back by failed --claim.",
|
|
195
|
+
failureModes: [
|
|
196
|
+
{ description: "Unknown run id", defaultType: "FATAL" },
|
|
197
|
+
{ description: "Invalid run status", defaultType: "FATAL" },
|
|
198
|
+
{ description: "Claim refusal during --claim start", defaultType: "FATAL" },
|
|
199
|
+
],
|
|
200
|
+
commands: [
|
|
201
|
+
"gxpm run start <issue-id> [--claim]",
|
|
202
|
+
"gxpm run list <issue-id>",
|
|
203
|
+
"gxpm run status <issue-id> <run-id>",
|
|
204
|
+
"gxpm run event <issue-id> <run-id> --type <event>",
|
|
205
|
+
],
|
|
206
|
+
sourceFiles: ["core/runs.ts", "scripts/commands/runtime.ts"],
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
id: "execution.workspace-runtime",
|
|
210
|
+
title: "Workspace Runtime",
|
|
211
|
+
summary: "Plans, creates, reuses, or removes issue-scoped filesystem workspaces.",
|
|
212
|
+
runtime: "execution",
|
|
213
|
+
status: "active",
|
|
214
|
+
inputContract: "Issue id and optional workspace root, with path key derived from the issue identifier.",
|
|
215
|
+
outputContract: {
|
|
216
|
+
description: "Workspace path plan or mutation result.",
|
|
217
|
+
artifacts: [],
|
|
218
|
+
evidence: ["stdout workspace report", "JSON workspace report", "issue-scoped workspace directory"],
|
|
219
|
+
},
|
|
220
|
+
mutationPolicy: {
|
|
221
|
+
scope: "workspace-files",
|
|
222
|
+
description: "plan is read-only; ensure/cleanup may create or remove only the issue-derived workspace path.",
|
|
223
|
+
},
|
|
224
|
+
idempotency: "plan is pure; ensure reuses existing workspace; cleanup is a no-op when the workspace is absent.",
|
|
225
|
+
failureModes: [
|
|
226
|
+
{ description: "Unsafe issue id for path derivation", defaultType: "FATAL" },
|
|
227
|
+
{ description: "Workspace path escapes configured root", defaultType: "FATAL" },
|
|
228
|
+
{ description: "Filesystem permission failure", defaultType: "TRANSIENT" },
|
|
229
|
+
],
|
|
230
|
+
commands: [
|
|
231
|
+
"gxpm workspace plan <issue-id>",
|
|
232
|
+
"gxpm workspace ensure <issue-id>",
|
|
233
|
+
"gxpm workspace cleanup <issue-id>",
|
|
234
|
+
],
|
|
235
|
+
sourceFiles: ["core/workspace-runtime.ts", "scripts/commands/runtime.ts"],
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
id: "execution.orchestrator-dry-run",
|
|
239
|
+
title: "Orchestrator Dry Run",
|
|
240
|
+
summary: "Reports dispatchability without claiming, creating workspaces, launching agents, or writing artifacts.",
|
|
241
|
+
runtime: "execution",
|
|
242
|
+
status: "active",
|
|
243
|
+
inputContract: "Local issue state graph plus optional --include-all flag.",
|
|
244
|
+
outputContract: {
|
|
245
|
+
description: "Dispatchability summary and per-issue blocker reasons.",
|
|
246
|
+
artifacts: [],
|
|
247
|
+
evidence: ["stdout dry-run report", "JSON dry-run report"],
|
|
248
|
+
},
|
|
249
|
+
mutationPolicy: {
|
|
250
|
+
scope: "none",
|
|
251
|
+
description: "Strictly read-only; must not mutate issue state, artifacts, runs, claims, or workspaces.",
|
|
252
|
+
},
|
|
253
|
+
idempotency: "Repeated dry-runs at the same state produce the same report.",
|
|
254
|
+
failureModes: [
|
|
255
|
+
{ description: "Malformed issue state", defaultType: "FATAL" },
|
|
256
|
+
{ description: "Unreadable issue directory", defaultType: "TRANSIENT" },
|
|
257
|
+
],
|
|
258
|
+
commands: ["gxpm orchestrator tick --dry-run [--json] [--include-all]"],
|
|
259
|
+
sourceFiles: ["core/orchestrator.ts", "scripts/commands/runtime.ts"],
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
id: "execution.dispatch-handoff",
|
|
263
|
+
title: "Dispatch Handoff",
|
|
264
|
+
summary: "Converts the plan into worker tasks, validation expectations, stop rules, and worktree handoff metadata.",
|
|
265
|
+
runtime: "execution",
|
|
266
|
+
status: "active",
|
|
267
|
+
inputContract: "Issue id plus acceptance-contract and implementation-plan artifacts.",
|
|
268
|
+
outputContract: {
|
|
269
|
+
description: "dispatch-handoff phase artifact and artifact timeline event.",
|
|
270
|
+
artifacts: ["dispatch-handoff"],
|
|
271
|
+
evidence: ["artifacts/dispatch-handoff.json", "events.jsonl artifact.written"],
|
|
272
|
+
},
|
|
273
|
+
mutationPolicy: {
|
|
274
|
+
scope: "issue-local-files",
|
|
275
|
+
description: "Writes only the target issue dispatch-handoff artifact through the artifact store.",
|
|
276
|
+
},
|
|
277
|
+
idempotency: "Repeated initialization derives the same handoff shape from the current plan artifacts.",
|
|
278
|
+
failureModes: [
|
|
279
|
+
{ description: "Current phase is not dispatch", defaultType: "FATAL" },
|
|
280
|
+
{ description: "Plan artifact missing or incomplete", defaultType: "FATAL" },
|
|
281
|
+
{ description: "Artifact store write failure", defaultType: "TRANSIENT" },
|
|
282
|
+
],
|
|
283
|
+
commands: [
|
|
284
|
+
"gxpm dispatch init <issue-id>",
|
|
285
|
+
"gxpm artifact write <issue-id> dispatch-handoff --json <json>",
|
|
286
|
+
],
|
|
287
|
+
sourceFiles: [
|
|
288
|
+
"core/dispatch.ts",
|
|
289
|
+
"core/phase-gates.ts",
|
|
290
|
+
"core/artifacts.ts",
|
|
291
|
+
"scripts/phase-artifact-commands.ts",
|
|
292
|
+
"scripts/commands/artifact.ts",
|
|
293
|
+
],
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
id: "execution.behavior-spec",
|
|
297
|
+
title: "Behavior Specification",
|
|
298
|
+
summary: "Initializes and confirms the BDD-style behavior spec that gates the specify-to-implement transition.",
|
|
299
|
+
runtime: "execution",
|
|
300
|
+
status: "active",
|
|
301
|
+
inputContract: "Issue id in specify phase; dispatch-handoff artifact must already exist.",
|
|
302
|
+
outputContract: {
|
|
303
|
+
description: "behavior-spec phase artifact with confirmedAt set, and artifact timeline event.",
|
|
304
|
+
artifacts: ["behavior-spec"],
|
|
305
|
+
evidence: ["artifacts/behavior-spec.json", "events.jsonl artifact.written"],
|
|
306
|
+
},
|
|
307
|
+
mutationPolicy: {
|
|
308
|
+
scope: "issue-local-files",
|
|
309
|
+
description: "Writes and confirms only the target issue behavior-spec artifact through the artifact store.",
|
|
310
|
+
},
|
|
311
|
+
idempotency: "Repeated initialization recreates the draft spec; confirm is idempotent once confirmed.",
|
|
312
|
+
failureModes: [
|
|
313
|
+
{ description: "Current phase is not specify", defaultType: "FATAL" },
|
|
314
|
+
{ description: "Placeholder sentinels remain unfilled", defaultType: "FATAL" },
|
|
315
|
+
{ description: "Stub file referenced in scenario is missing", defaultType: "FATAL" },
|
|
316
|
+
{ description: "Artifact store write failure", defaultType: "TRANSIENT" },
|
|
317
|
+
],
|
|
318
|
+
commands: [
|
|
319
|
+
"gxpm specify init <issue-id>",
|
|
320
|
+
"gxpm specify confirm <issue-id>",
|
|
321
|
+
],
|
|
322
|
+
sourceFiles: [
|
|
323
|
+
"core/specify.ts",
|
|
324
|
+
"core/phase-gates.ts",
|
|
325
|
+
"core/artifacts.ts",
|
|
326
|
+
"scripts/phase-artifact-commands.ts",
|
|
327
|
+
"scripts/commands/specify.ts",
|
|
328
|
+
],
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
id: "verification.issue-evidence-store",
|
|
332
|
+
title: "Issue Evidence Store",
|
|
333
|
+
summary: "Allocates and writes issue-local command, browser, review, release, and investigation evidence.",
|
|
334
|
+
runtime: "verification",
|
|
335
|
+
status: "active",
|
|
336
|
+
inputContract: "Issue id, evidence kind, safe filename, media type, and JSON/text/binary payload.",
|
|
337
|
+
outputContract: {
|
|
338
|
+
description: "Evidence records stored under the target issue evidence directory.",
|
|
339
|
+
artifacts: [],
|
|
340
|
+
evidence: [
|
|
341
|
+
"evidence/command-logs/*",
|
|
342
|
+
"evidence/browser-snapshots/*",
|
|
343
|
+
"evidence/browser-screenshots/*",
|
|
344
|
+
"evidence/investigations/*",
|
|
345
|
+
"JSON evidence write record",
|
|
346
|
+
],
|
|
347
|
+
},
|
|
348
|
+
mutationPolicy: {
|
|
349
|
+
scope: "issue-local-files",
|
|
350
|
+
description: "May create or overwrite files only under the target issue evidence directory.",
|
|
351
|
+
},
|
|
352
|
+
idempotency: "Path allocation is deterministic for the same filename; repeated writes replace only that evidence file.",
|
|
353
|
+
failureModes: [
|
|
354
|
+
{ description: "Invalid issue id", defaultType: "FATAL" },
|
|
355
|
+
{ description: "Unknown evidence kind", defaultType: "FATAL" },
|
|
356
|
+
{ description: "Unsafe evidence filename", defaultType: "FATAL" },
|
|
357
|
+
{ description: "Filesystem write failure", defaultType: "TRANSIENT" },
|
|
358
|
+
],
|
|
359
|
+
commands: ["gxpm-investigate <issue-id> [--label <text>]"],
|
|
360
|
+
sourceFiles: ["core/evidence.ts", "bin/gxpm-investigate"],
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
id: "knowledge.wiki-context",
|
|
364
|
+
title: "Optional Human Wiki",
|
|
365
|
+
summary: "Generates optional first-party project docs for human onboarding and review; agents should use GitNexus for code intelligence.",
|
|
366
|
+
runtime: "knowledge",
|
|
367
|
+
status: "active",
|
|
368
|
+
inputContract: "Repository git-tracked text files, optional wiki state, query text or issue id, phase, and limit.",
|
|
369
|
+
outputContract: {
|
|
370
|
+
description: "Human-readable wiki status/query/context results and optional issue wiki-context artifact.",
|
|
371
|
+
artifacts: ["wiki-context"],
|
|
372
|
+
evidence: [".gxpm/wiki/index/files.json", ".gxpm/wiki/index/graph.json", ".gxpm/wiki/content/*.md"],
|
|
373
|
+
},
|
|
374
|
+
mutationPolicy: {
|
|
375
|
+
scope: "issue-local-files",
|
|
376
|
+
description: "Manual init/update mutate .gxpm/wiki; context --write-artifact writes only the target issue wiki-context artifact.",
|
|
377
|
+
},
|
|
378
|
+
idempotency: "Manual index/update are deterministic for the same git tree; context selection is deterministic for the same query and index.",
|
|
379
|
+
failureModes: [
|
|
380
|
+
{ description: "Missing native wiki state", defaultType: "FATAL" },
|
|
381
|
+
{ description: "Stale wiki index", defaultType: "TRANSIENT" },
|
|
382
|
+
{ description: "Unsupported binary or ignored files", defaultType: "FATAL" },
|
|
383
|
+
],
|
|
384
|
+
commands: [
|
|
385
|
+
"gxpm wiki init",
|
|
386
|
+
"gxpm wiki update",
|
|
387
|
+
"gxpm wiki status",
|
|
388
|
+
"gxpm wiki query <text>",
|
|
389
|
+
"gxpm wiki context <issue-id>",
|
|
390
|
+
],
|
|
391
|
+
sourceFiles: ["core/wiki.ts", "scripts/commands/wiki.ts"],
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
id: "verification.local-artifact",
|
|
395
|
+
title: "Local Verification Artifact",
|
|
396
|
+
summary: "Captures agent-owned local validation evidence before acceptance checking.",
|
|
397
|
+
runtime: "verification",
|
|
398
|
+
status: "active",
|
|
399
|
+
inputContract: "Issue id plus JSON local verification payload produced after focused and broad checks.",
|
|
400
|
+
outputContract: {
|
|
401
|
+
description: "local-verify phase artifact and artifact timeline event.",
|
|
402
|
+
artifacts: ["local-verify"],
|
|
403
|
+
evidence: ["artifacts/local-verify.json", "events.jsonl artifact.written"],
|
|
404
|
+
},
|
|
405
|
+
mutationPolicy: {
|
|
406
|
+
scope: "issue-local-files",
|
|
407
|
+
description: "Writes only the target issue local-verify artifact through the artifact store.",
|
|
408
|
+
},
|
|
409
|
+
idempotency: "Repeated writes replace the local-verify artifact with the newest evidence while preserving timeline history.",
|
|
410
|
+
failureModes: [
|
|
411
|
+
{ description: "Current phase cannot initialize local-verify", defaultType: "FATAL" },
|
|
412
|
+
{ description: "Invalid artifact payload", defaultType: "FATAL" },
|
|
413
|
+
{ description: "Command evidence missing", defaultType: "FATAL" },
|
|
414
|
+
],
|
|
415
|
+
commands: ["gxpm implement verify <issue-id>", "gxpm artifact write <issue-id> local-verify --json <json>"],
|
|
416
|
+
sourceFiles: ["core/implement.ts", "core/artifacts.ts"],
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
id: "verification.acceptance-check",
|
|
420
|
+
title: "Acceptance Check",
|
|
421
|
+
summary: "Checks local verification against the acceptance contract before self-review.",
|
|
422
|
+
runtime: "verification",
|
|
423
|
+
status: "active",
|
|
424
|
+
inputContract: "Issue id plus acceptance-contract, implementation-plan, and local-verify artifacts.",
|
|
425
|
+
outputContract: {
|
|
426
|
+
description: "acceptance-check phase artifact and artifact timeline event.",
|
|
427
|
+
artifacts: ["acceptance-check"],
|
|
428
|
+
evidence: ["artifacts/acceptance-check.json", "artifacts/local-verify.json", "events.jsonl artifact.written"],
|
|
429
|
+
},
|
|
430
|
+
mutationPolicy: {
|
|
431
|
+
scope: "issue-local-files",
|
|
432
|
+
description: "Writes only the target issue acceptance-check artifact through the artifact store.",
|
|
433
|
+
},
|
|
434
|
+
idempotency: "Repeated initialization refreshes draft check structure without changing the phase until transition.",
|
|
435
|
+
failureModes: [
|
|
436
|
+
{ description: "Current phase is not local-verify", defaultType: "FATAL" },
|
|
437
|
+
{ description: "Acceptance criteria or local verification evidence missing", defaultType: "FATAL" },
|
|
438
|
+
{ description: "Artifact store write failure", defaultType: "TRANSIENT" },
|
|
439
|
+
],
|
|
440
|
+
commands: [
|
|
441
|
+
"gxpm local-verify ac-check <issue-id>",
|
|
442
|
+
"gxpm artifact write <issue-id> acceptance-check --json <json>",
|
|
443
|
+
],
|
|
444
|
+
sourceFiles: [
|
|
445
|
+
"core/ac-check.ts",
|
|
446
|
+
"core/phase-gates.ts",
|
|
447
|
+
"core/artifacts.ts",
|
|
448
|
+
"scripts/phase-artifact-commands.ts",
|
|
449
|
+
"scripts/commands/artifact.ts",
|
|
450
|
+
],
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
id: "review.self-review",
|
|
454
|
+
title: "Self Review",
|
|
455
|
+
summary: "Records the implementer self-review, residual risks, and plan-lint findings after acceptance checking.",
|
|
456
|
+
runtime: "review",
|
|
457
|
+
status: "active",
|
|
458
|
+
inputContract: "Issue id plus acceptance-check and local-verify artifacts.",
|
|
459
|
+
outputContract: {
|
|
460
|
+
description: "self-review phase artifact and artifact timeline event.",
|
|
461
|
+
artifacts: ["self-review"],
|
|
462
|
+
evidence: ["artifacts/self-review.json", "artifacts/acceptance-check.json", "events.jsonl artifact.written"],
|
|
463
|
+
},
|
|
464
|
+
mutationPolicy: {
|
|
465
|
+
scope: "issue-local-files",
|
|
466
|
+
description: "Writes only the target issue self-review artifact through the artifact store.",
|
|
467
|
+
},
|
|
468
|
+
idempotency: "Repeated initialization reruns plan lint and replaces only the issue self-review artifact.",
|
|
469
|
+
failureModes: [
|
|
470
|
+
{ description: "Current phase is not ac-check", defaultType: "FATAL" },
|
|
471
|
+
{ description: "Acceptance-check artifact missing or unresolved", defaultType: "FATAL" },
|
|
472
|
+
{ description: "Artifact store write failure", defaultType: "TRANSIENT" },
|
|
473
|
+
],
|
|
474
|
+
commands: [
|
|
475
|
+
"gxpm ac-check self-review <issue-id>",
|
|
476
|
+
"gxpm artifact write <issue-id> self-review --json <json>",
|
|
477
|
+
],
|
|
478
|
+
sourceFiles: [
|
|
479
|
+
"core/self-review.ts",
|
|
480
|
+
"core/phase-gates.ts",
|
|
481
|
+
"core/artifacts.ts",
|
|
482
|
+
"scripts/phase-artifact-commands.ts",
|
|
483
|
+
"scripts/commands/artifact.ts",
|
|
484
|
+
],
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
id: "review.cleanup",
|
|
488
|
+
title: "Cleanup",
|
|
489
|
+
summary: "Records cross-issue code cleanup findings including duplicates, naming inconsistencies, interface misalignments, and dead code removals.",
|
|
490
|
+
runtime: "review",
|
|
491
|
+
status: "active",
|
|
492
|
+
inputContract: "Issue id plus self-review artifact and worktree context with multiple issue changes.",
|
|
493
|
+
outputContract: {
|
|
494
|
+
description: "cleanup-report phase artifact and artifact timeline event.",
|
|
495
|
+
artifacts: ["cleanup-report"],
|
|
496
|
+
evidence: ["artifacts/cleanup-report.json", "artifacts/self-review.json", "events.jsonl artifact.written"],
|
|
497
|
+
},
|
|
498
|
+
mutationPolicy: {
|
|
499
|
+
scope: "issue-local-files",
|
|
500
|
+
description: "Writes only the target issue cleanup-report artifact through the artifact store.",
|
|
501
|
+
},
|
|
502
|
+
idempotency: "Repeated initialization replaces only the cleanup-report artifact.",
|
|
503
|
+
failureModes: [
|
|
504
|
+
{ description: "Current phase is not self-review", defaultType: "FATAL" },
|
|
505
|
+
{ description: "Self-review artifact missing", defaultType: "FATAL" },
|
|
506
|
+
{ description: "Artifact store write failure", defaultType: "TRANSIENT" },
|
|
507
|
+
],
|
|
508
|
+
commands: [
|
|
509
|
+
"gxpm self-review cleanup <issue-id>",
|
|
510
|
+
"gxpm artifact write <issue-id> cleanup-report --json <json>",
|
|
511
|
+
],
|
|
512
|
+
sourceFiles: [
|
|
513
|
+
"core/cleanup.ts",
|
|
514
|
+
"core/phase-gates.ts",
|
|
515
|
+
"core/artifacts.ts",
|
|
516
|
+
"scripts/phase-artifact-commands.ts",
|
|
517
|
+
"scripts/commands/artifact.ts",
|
|
518
|
+
],
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
id: "release.ship-readiness",
|
|
522
|
+
title: "Ship Readiness",
|
|
523
|
+
summary: "Records release readiness, rollback plan, compatibility notes, and human verification expectations.",
|
|
524
|
+
runtime: "release",
|
|
525
|
+
status: "active",
|
|
526
|
+
inputContract: "Issue id plus cleanup-report, self-review, acceptance-check, and release readiness findings.",
|
|
527
|
+
outputContract: {
|
|
528
|
+
description: "ship-readiness phase artifact and artifact timeline event.",
|
|
529
|
+
artifacts: ["ship-readiness"],
|
|
530
|
+
evidence: ["artifacts/ship-readiness.json", "artifacts/cleanup-report.json", "artifacts/self-review.json", "events.jsonl artifact.written"],
|
|
531
|
+
},
|
|
532
|
+
mutationPolicy: {
|
|
533
|
+
scope: "issue-local-files",
|
|
534
|
+
description: "Writes only the target issue ship-readiness artifact through the artifact store.",
|
|
535
|
+
},
|
|
536
|
+
idempotency: "Repeated initialization refreshes release readiness fields without mutating remote providers.",
|
|
537
|
+
failureModes: [
|
|
538
|
+
{ description: "Current phase is not cleanup", defaultType: "FATAL" },
|
|
539
|
+
{ description: "Rollback plan or checklist missing", defaultType: "FATAL" },
|
|
540
|
+
{ description: "Artifact store write failure", defaultType: "TRANSIENT" },
|
|
541
|
+
],
|
|
542
|
+
commands: [
|
|
543
|
+
"gxpm cleanup ship <issue-id>",
|
|
544
|
+
"gxpm artifact write <issue-id> ship-readiness --json <json>",
|
|
545
|
+
],
|
|
546
|
+
sourceFiles: [
|
|
547
|
+
"core/ship.ts",
|
|
548
|
+
"core/phase-gates.ts",
|
|
549
|
+
"core/artifacts.ts",
|
|
550
|
+
"scripts/phase-artifact-commands.ts",
|
|
551
|
+
"scripts/commands/artifact.ts",
|
|
552
|
+
],
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
id: "release.pr-check",
|
|
556
|
+
title: "PR Check Artifact",
|
|
557
|
+
summary: "Captures PR, review, and release-readiness evidence before independent verification.",
|
|
558
|
+
runtime: "release",
|
|
559
|
+
status: "active",
|
|
560
|
+
inputContract: "Issue id plus PR/check/review evidence gathered from local git and external providers.",
|
|
561
|
+
outputContract: {
|
|
562
|
+
description: "pr-check phase artifact and release gate evidence.",
|
|
563
|
+
artifacts: ["pr-check"],
|
|
564
|
+
evidence: ["artifacts/pr-check.json", "GitHub PR status", "CodeRabbit review status"],
|
|
565
|
+
},
|
|
566
|
+
mutationPolicy: {
|
|
567
|
+
scope: "external-provider",
|
|
568
|
+
description: "Artifact writes are local; external PR reads must not merge or mutate remote state.",
|
|
569
|
+
},
|
|
570
|
+
idempotency: "Repeated reads and artifact rewrites refresh evidence without changing phase unless transition is explicit.",
|
|
571
|
+
failureModes: [
|
|
572
|
+
{ description: "PR unavailable", defaultType: "TRANSIENT" },
|
|
573
|
+
{ description: "Review pending or failed", defaultType: "FATAL" },
|
|
574
|
+
{ description: "Mergeability unknown", defaultType: "TRANSIENT" },
|
|
575
|
+
{ description: "Invalid artifact payload", defaultType: "FATAL" },
|
|
576
|
+
],
|
|
577
|
+
commands: ["gxpm ship pr-check <issue-id>", "gxpm artifact write <issue-id> pr-check --json <json>"],
|
|
578
|
+
sourceFiles: ["core/pr-check.ts", "scripts/commands/artifact.ts"],
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
id: "verification.verify-findings",
|
|
582
|
+
title: "Independent Verify Findings",
|
|
583
|
+
summary: "Records post-PR independent verification findings and residual risks before browser QA.",
|
|
584
|
+
runtime: "verification",
|
|
585
|
+
status: "active",
|
|
586
|
+
inputContract: "Issue id plus pr-check, acceptance-contract, local verification, and independent verification results.",
|
|
587
|
+
outputContract: {
|
|
588
|
+
description: "verify-findings phase artifact and artifact timeline event.",
|
|
589
|
+
artifacts: ["verify-findings"],
|
|
590
|
+
evidence: ["artifacts/verify-findings.json", "artifacts/pr-check.json", "events.jsonl artifact.written"],
|
|
591
|
+
},
|
|
592
|
+
mutationPolicy: {
|
|
593
|
+
scope: "issue-local-files",
|
|
594
|
+
description: "Writes only the target issue verify-findings artifact through the artifact store.",
|
|
595
|
+
},
|
|
596
|
+
idempotency: "Repeated initialization preserves the same verification artifact path and requires explicit transition for phase changes.",
|
|
597
|
+
failureModes: [
|
|
598
|
+
{ description: "Current phase is not pr-check", defaultType: "FATAL" },
|
|
599
|
+
{ description: "PR check or verification evidence missing", defaultType: "FATAL" },
|
|
600
|
+
{ description: "Artifact store write failure", defaultType: "TRANSIENT" },
|
|
601
|
+
],
|
|
602
|
+
commands: [
|
|
603
|
+
"gxpm pr-check verify <issue-id>",
|
|
604
|
+
"gxpm artifact write <issue-id> verify-findings --json <json>",
|
|
605
|
+
],
|
|
606
|
+
sourceFiles: [
|
|
607
|
+
"core/verify.ts",
|
|
608
|
+
"core/phase-gates.ts",
|
|
609
|
+
"core/artifacts.ts",
|
|
610
|
+
"scripts/phase-artifact-commands.ts",
|
|
611
|
+
"scripts/commands/artifact.ts",
|
|
612
|
+
],
|
|
613
|
+
},
|
|
614
|
+
{
|
|
615
|
+
id: "browser.qa-findings",
|
|
616
|
+
title: "Browser QA Findings",
|
|
617
|
+
summary: "Records browser QA evidence, findings, and risks before land readiness.",
|
|
618
|
+
runtime: "browser",
|
|
619
|
+
status: "active",
|
|
620
|
+
inputContract: "Issue id plus verify-findings and browser or manual QA evidence references.",
|
|
621
|
+
outputContract: {
|
|
622
|
+
description: "qa-findings phase artifact and browser evidence references.",
|
|
623
|
+
artifacts: ["qa-findings"],
|
|
624
|
+
evidence: [
|
|
625
|
+
"artifacts/qa-findings.json",
|
|
626
|
+
"evidence/browser-snapshots/*",
|
|
627
|
+
"evidence/browser-screenshots/*",
|
|
628
|
+
"events.jsonl artifact.written",
|
|
629
|
+
],
|
|
630
|
+
},
|
|
631
|
+
mutationPolicy: {
|
|
632
|
+
scope: "issue-local-files",
|
|
633
|
+
description: "Writes only the target issue qa-findings artifact and references issue-local browser evidence.",
|
|
634
|
+
},
|
|
635
|
+
idempotency: "Repeated initialization writes the same QA artifact path; raw browser evidence remains separately addressable.",
|
|
636
|
+
failureModes: [
|
|
637
|
+
{ description: "Current phase is not verify", defaultType: "FATAL" },
|
|
638
|
+
{ description: "Required browser evidence is missing for a browser-facing acceptance criterion", defaultType: "FATAL" },
|
|
639
|
+
{ description: "Artifact store write failure", defaultType: "TRANSIENT" },
|
|
640
|
+
],
|
|
641
|
+
commands: [
|
|
642
|
+
"gxpm verify qa <issue-id>",
|
|
643
|
+
"gxpm artifact write <issue-id> qa-findings --json <json>",
|
|
644
|
+
],
|
|
645
|
+
sourceFiles: [
|
|
646
|
+
"core/qa.ts",
|
|
647
|
+
"core/phase-gates.ts",
|
|
648
|
+
"core/artifacts.ts",
|
|
649
|
+
"scripts/phase-artifact-commands.ts",
|
|
650
|
+
"scripts/commands/artifact.ts",
|
|
651
|
+
],
|
|
652
|
+
},
|
|
653
|
+
{
|
|
654
|
+
id: "release.land-findings",
|
|
655
|
+
title: "Land Findings",
|
|
656
|
+
summary: "Records land readiness, merge plan, release risks, and post-merge reconciliation metadata.",
|
|
657
|
+
runtime: "release",
|
|
658
|
+
status: "active",
|
|
659
|
+
inputContract: "Issue id plus qa-findings, release risks, merge plan, and optional post-merge SHA.",
|
|
660
|
+
outputContract: {
|
|
661
|
+
description: "land-findings phase artifact and optional reconcile event after a successful merge.",
|
|
662
|
+
artifacts: ["land-findings"],
|
|
663
|
+
evidence: ["artifacts/land-findings.json", "events.jsonl artifact.written", "events.jsonl artifact.reconciled"],
|
|
664
|
+
},
|
|
665
|
+
mutationPolicy: {
|
|
666
|
+
scope: "issue-local-files",
|
|
667
|
+
description: "Writes only the target issue land-findings artifact; reconcile may archive the same issue after merge evidence.",
|
|
668
|
+
},
|
|
669
|
+
idempotency: "Initialization is repeatable; reconcile is idempotent for the same merged SHA.",
|
|
670
|
+
failureModes: [
|
|
671
|
+
{ description: "Current phase is not qa or land for the requested action", defaultType: "FATAL" },
|
|
672
|
+
{ description: "QA findings or merge plan missing", defaultType: "FATAL" },
|
|
673
|
+
{ description: "Invalid merge SHA during reconcile", defaultType: "FATAL" },
|
|
674
|
+
{ description: "Artifact store write failure", defaultType: "TRANSIENT" },
|
|
675
|
+
],
|
|
676
|
+
commands: [
|
|
677
|
+
"gxpm qa land <issue-id>",
|
|
678
|
+
"gxpm artifact write <issue-id> land-findings --json <json>",
|
|
679
|
+
],
|
|
680
|
+
sourceFiles: [
|
|
681
|
+
"core/land.ts",
|
|
682
|
+
"core/phase-gates.ts",
|
|
683
|
+
"core/artifacts.ts",
|
|
684
|
+
"scripts/phase-artifact-commands.ts",
|
|
685
|
+
"scripts/commands/artifact.ts",
|
|
686
|
+
],
|
|
687
|
+
},
|
|
688
|
+
{
|
|
689
|
+
id: "execution.workflow-events",
|
|
690
|
+
title: "Workflow Events",
|
|
691
|
+
summary: "Typed event bus for gxpm execution observability with fire-and-forget semantics.",
|
|
692
|
+
runtime: "execution",
|
|
693
|
+
status: "active",
|
|
694
|
+
inputContract: "Event listener functions or issue-scoped filters.",
|
|
695
|
+
outputContract: {
|
|
696
|
+
description: "Subscription handles and side-effect-free event emission.",
|
|
697
|
+
artifacts: [],
|
|
698
|
+
evidence: ["stderr event logs when --verbose-events is enabled"],
|
|
699
|
+
},
|
|
700
|
+
mutationPolicy: {
|
|
701
|
+
scope: "none",
|
|
702
|
+
description: "Emit is side-effect-free for listeners; subscribe is read-only on the emitter.",
|
|
703
|
+
},
|
|
704
|
+
idempotency: "Emitting the same event multiple times delivers to all active listeners each time.",
|
|
705
|
+
failureModes: [
|
|
706
|
+
{ description: "Listener throws", defaultType: "FATAL" },
|
|
707
|
+
{ description: "Memory leak from uncleared subscriptions", defaultType: "FATAL" },
|
|
708
|
+
],
|
|
709
|
+
commands: ["gxpm --verbose-events <command>"],
|
|
710
|
+
sourceFiles: ["core/workflow-event-emitter.ts"],
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
id: "execution.dag-run",
|
|
714
|
+
title: "DAG Run",
|
|
715
|
+
summary: "Execute a DAG workflow with topological ordering, concurrent layers, trigger rules, and when conditions.",
|
|
716
|
+
runtime: "execution",
|
|
717
|
+
status: "active",
|
|
718
|
+
inputContract: "A validated WorkflowDefinition with DagNode array and an executor function.",
|
|
719
|
+
outputContract: {
|
|
720
|
+
description: "DagExecutionResult with success flag, node outputs map, and duration.",
|
|
721
|
+
artifacts: [],
|
|
722
|
+
evidence: ["stdout execution trace", "node output map"],
|
|
723
|
+
},
|
|
724
|
+
mutationPolicy: {
|
|
725
|
+
scope: "none",
|
|
726
|
+
description: "Execution is side-effect-free except for user-provided executor callbacks.",
|
|
727
|
+
},
|
|
728
|
+
idempotency: "Same inputs produce same topological ordering; executor side-effects are caller-responsible.",
|
|
729
|
+
failureModes: [
|
|
730
|
+
{ description: "Cycle detected at runtime", defaultType: "FATAL" },
|
|
731
|
+
{ description: "Node executor throws", defaultType: "FATAL" },
|
|
732
|
+
{ description: "Abort signal triggered", defaultType: "TRANSIENT" },
|
|
733
|
+
],
|
|
734
|
+
commands: ["gxpm dag run <workflow-file>"],
|
|
735
|
+
sourceFiles: ["core/dag-executor.ts", "core/dag-loader.ts", "core/dag-schemas.ts"],
|
|
736
|
+
},
|
|
737
|
+
{
|
|
738
|
+
id: "execution.dag-validate",
|
|
739
|
+
title: "DAG Validate",
|
|
740
|
+
summary: "Validate a workflow definition for structural correctness: unique IDs, dependency existence, cycle detection, and output reference integrity.",
|
|
741
|
+
runtime: "execution",
|
|
742
|
+
status: "active",
|
|
743
|
+
inputContract: "A raw workflow object or YAML string.",
|
|
744
|
+
outputContract: {
|
|
745
|
+
description: "Parsed WorkflowDefinition or WorkflowLoadError with detailed message.",
|
|
746
|
+
artifacts: [],
|
|
747
|
+
evidence: ["stdout validation result"],
|
|
748
|
+
},
|
|
749
|
+
mutationPolicy: {
|
|
750
|
+
scope: "none",
|
|
751
|
+
description: "Read-only validation; no mutations.",
|
|
752
|
+
},
|
|
753
|
+
idempotency: "Repeated validation of the same input produces the same result.",
|
|
754
|
+
failureModes: [
|
|
755
|
+
{ description: "Parse error", defaultType: "FATAL" },
|
|
756
|
+
{ description: "Validation error", defaultType: "FATAL" },
|
|
757
|
+
],
|
|
758
|
+
commands: ["gxpm dag validate <workflow-file>"],
|
|
759
|
+
sourceFiles: ["core/dag-loader.ts", "core/dag-schemas.ts"],
|
|
760
|
+
},
|
|
761
|
+
] as const satisfies readonly CapabilityContract[];
|
|
762
|
+
|
|
763
|
+
export type CapabilityId = (typeof CAPABILITY_REGISTRY)[number]["id"];
|
|
764
|
+
|
|
765
|
+
export function listCapabilities() {
|
|
766
|
+
return [...CAPABILITY_REGISTRY];
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
export function getCapability(id: string) {
|
|
770
|
+
return CAPABILITY_REGISTRY.find((capability) => capability.id === id) ?? null;
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
export function requireCapability(id: string) {
|
|
774
|
+
const capability = getCapability(id);
|
|
775
|
+
if (!capability) {
|
|
776
|
+
throw new Error(`Unknown capability: ${id}`);
|
|
777
|
+
}
|
|
778
|
+
return capability;
|
|
779
|
+
}
|