devflow-kit 3.9.0 → 3.10.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 (157) hide show
  1. package/CHANGELOG.md +111 -0
  2. package/README.md +1 -1
  3. package/dist/agents/code.md +6 -6
  4. package/dist/agents/fix.md +6 -6
  5. package/dist/agents/harden.md +7 -6
  6. package/dist/agents/refactor.md +6 -6
  7. package/dist/cli/commands/ambient.js +10 -2
  8. package/dist/cli/commands/compliance-prompts.js +9 -4
  9. package/dist/cli/commands/compliance.js +171 -24
  10. package/dist/cli/commands/curation.js +12 -7
  11. package/dist/cli/commands/gate-level-prompts.js +39 -25
  12. package/dist/cli/commands/gates.js +5 -7
  13. package/dist/cli/commands/init.js +142 -138
  14. package/dist/cli/commands/install-report.js +34 -0
  15. package/dist/cli/commands/legacy-sweep.js +64 -0
  16. package/dist/cli/commands/proxy.js +6 -1
  17. package/dist/cli/commands/rules.js +29 -12
  18. package/dist/cli/commands/skills.js +42 -9
  19. package/dist/cli/commands/tracker.js +9 -3
  20. package/dist/cli/commands/uninstall.js +277 -51
  21. package/dist/commands/bug-analysis.md +69 -120
  22. package/dist/commands/dynamic-build.md +23 -23
  23. package/dist/commands/implement.md +46 -32
  24. package/dist/commands/release.md +1 -1
  25. package/dist/commands/resolve.md +35 -31
  26. package/dist/commands/self-review.md +8 -7
  27. package/dist/compliance-off/agents/git.md +120 -0
  28. package/dist/compliance-off/agents/triage.md +180 -0
  29. package/dist/compliance-off/commands/bug-analysis.md +398 -0
  30. package/dist/compliance-off/commands/code-review.md +520 -0
  31. package/dist/compliance-off/commands/dynamic-build.md +1251 -0
  32. package/dist/compliance-off/commands/dynamic-tickets.md +676 -0
  33. package/dist/compliance-off/commands/implement.md +736 -0
  34. package/dist/compliance-off/commands/plan.md +671 -0
  35. package/dist/compliance-off/commands/release.md +309 -0
  36. package/dist/compliance-off/commands/resolve.md +742 -0
  37. package/dist/compliance-off/skills/git/references/decision-markers.md +17 -0
  38. package/dist/compliance-off/skills/git/references/learn-conventions.md +80 -0
  39. package/dist/compliance-off/skills/git/references/pr/check-ci-status.md +33 -0
  40. package/dist/compliance-off/skills/git/references/pr/check-merge-readiness.md +49 -0
  41. package/dist/compliance-off/skills/git/references/pr/fetch-review-threads.md +52 -0
  42. package/dist/compliance-off/skills/git/references/pr/validate-branch.md +47 -0
  43. package/dist/compliance-off/skills/git/references/tracker/_contract.md +33 -0
  44. package/dist/compliance-off/skills/git/references/tracker/_mcp.md +153 -0
  45. package/dist/compliance-off/skills/git/references/tracker/github/create-release.md +35 -0
  46. package/dist/compliance-off/skills/git/references/tracker/github/ensure-pr-ready.md +100 -0
  47. package/dist/compliance-off/skills/git/references/tracker/github/ensure-traceable-issue.md +74 -0
  48. package/dist/compliance-off/skills/git/references/tracker/github/fetch-issue.md +69 -0
  49. package/dist/compliance-off/skills/git/references/tracker/github/fetch-issues-batch.md +65 -0
  50. package/dist/compliance-off/skills/git/references/tracker/github/gather-release-evidence.md +48 -0
  51. package/dist/compliance-off/skills/git/references/tracker/github/setup-task.md +77 -0
  52. package/dist/compliance-off/skills/git/references/tracker/jira/create-release.md +35 -0
  53. package/dist/compliance-off/skills/git/references/tracker/jira/ensure-pr-ready.md +100 -0
  54. package/dist/compliance-off/skills/git/references/tracker/jira/ensure-traceable-issue.md +61 -0
  55. package/dist/compliance-off/skills/git/references/tracker/jira/fetch-issue.md +51 -0
  56. package/dist/compliance-off/skills/git/references/tracker/jira/fetch-issues-batch.md +63 -0
  57. package/dist/compliance-off/skills/git/references/tracker/jira/gather-release-evidence.md +47 -0
  58. package/dist/compliance-off/skills/git/references/tracker/jira/setup-task.md +82 -0
  59. package/dist/compliance-off/skills/git/references/tracker/linear/create-release.md +35 -0
  60. package/dist/compliance-off/skills/git/references/tracker/linear/ensure-pr-ready.md +100 -0
  61. package/dist/compliance-off/skills/git/references/tracker/linear/ensure-traceable-issue.md +61 -0
  62. package/dist/compliance-off/skills/git/references/tracker/linear/fetch-issue.md +51 -0
  63. package/dist/compliance-off/skills/git/references/tracker/linear/fetch-issues-batch.md +63 -0
  64. package/dist/compliance-off/skills/git/references/tracker/linear/gather-release-evidence.md +47 -0
  65. package/dist/compliance-off/skills/git/references/tracker/linear/setup-task.md +83 -0
  66. package/dist/compliance-off/skills/git/references/trust-rule.md +7 -0
  67. package/dist/core/agent-models.js +19 -4
  68. package/dist/core/assets.js +126 -17
  69. package/dist/core/compliance-off-files.js +27 -0
  70. package/dist/core/curation-variants.js +460 -112
  71. package/dist/core/flags.js +2 -2
  72. package/dist/core/installed-variants.js +63 -0
  73. package/dist/core/manifest.js +48 -5
  74. package/dist/core/mds-variants.js +700 -3
  75. package/dist/core/orphan-sweep.js +11 -2
  76. package/dist/core/plugins.js +65 -8
  77. package/dist/curation-compliance-off/agents/triage.md +176 -0
  78. package/dist/curation-compliance-off/commands/bug-analysis.md +349 -0
  79. package/dist/curation-compliance-off/commands/code-review.md +481 -0
  80. package/dist/curation-compliance-off/commands/dynamic-build.md +1211 -0
  81. package/dist/curation-compliance-off/commands/dynamic-tickets.md +634 -0
  82. package/dist/curation-compliance-off/commands/implement.md +689 -0
  83. package/dist/curation-compliance-off/commands/plan.md +631 -0
  84. package/dist/curation-compliance-off/commands/release.md +279 -0
  85. package/dist/curation-compliance-off/commands/resolve.md +692 -0
  86. package/dist/curation-off/agents/code.md +6 -6
  87. package/dist/curation-off/agents/fix.md +6 -6
  88. package/dist/curation-off/agents/harden.md +7 -6
  89. package/dist/curation-off/agents/refactor.md +6 -6
  90. package/dist/curation-off/commands/bug-analysis.md +69 -119
  91. package/dist/curation-off/commands/dynamic-build.md +23 -23
  92. package/dist/curation-off/commands/implement.md +46 -32
  93. package/dist/curation-off/commands/release.md +1 -1
  94. package/dist/curation-off/commands/resolve.md +35 -31
  95. package/dist/curation-off/commands/self-review.md +8 -7
  96. package/dist/skills/git/references/pr/resolve-review-threads.md +1 -1
  97. package/dist/targets/claude-code/behavior-install.js +23 -9
  98. package/dist/targets/claude-code/charter-render.js +374 -0
  99. package/dist/targets/claude-code/compliance-install.js +32 -12
  100. package/dist/targets/claude-code/compliance-off-files.js +245 -0
  101. package/dist/targets/claude-code/curation-install.js +570 -100
  102. package/dist/targets/claude-code/installer.js +467 -62
  103. package/dist/targets/claude-code/language-stamp.js +6 -0
  104. package/dist/targets/claude-code/linked-folder.js +182 -0
  105. package/dist/targets/claude-code/reference-converge.js +118 -0
  106. package/dist/targets/claude-code/tracker-install.js +21 -8
  107. package/dist/targets/claude-code/tracker-servers.js +20 -6
  108. package/dist/targets/claude-code/workflow-folder-install.js +231 -0
  109. package/dist/variant-axes.json +109 -0
  110. package/package.json +1 -1
  111. package/src/assets/agents/_partials/_code.mds +6 -6
  112. package/src/assets/agents/evaluate.md +1 -1
  113. package/src/assets/agents/git.mds +32 -0
  114. package/src/assets/agents/harden.mds +7 -6
  115. package/src/assets/agents/test.md +21 -12
  116. package/src/assets/agents/triage.mds +2 -0
  117. package/src/assets/agents/validate.md +10 -10
  118. package/src/assets/commands/_partials/_compliance.mds +5 -3
  119. package/src/assets/commands/_partials/_engine.mds +9 -8
  120. package/src/assets/commands/_partials/_publication.mds +10 -1
  121. package/src/assets/commands/bug-analysis.mds +80 -126
  122. package/src/assets/commands/code-review.mds +43 -0
  123. package/src/assets/commands/dynamic-build.mds +109 -15
  124. package/src/assets/commands/dynamic-tickets.mds +13 -0
  125. package/src/assets/commands/implement.mds +145 -33
  126. package/src/assets/commands/plan.mds +19 -0
  127. package/src/assets/commands/release.mds +50 -1
  128. package/src/assets/commands/resolve.mds +217 -32
  129. package/src/assets/commands/self-review.mds +8 -7
  130. package/src/assets/mds/git/_ops.mds +23 -0
  131. package/src/assets/mds/git/_ops_steps.mds +17 -0
  132. package/src/assets/mds/git/_pr.mds +1 -1
  133. package/src/assets/mds/git/_references.mds +6 -0
  134. package/src/assets/mds/tracker/_common.mds +4 -0
  135. package/src/assets/mds/tracker/_github.mds +42 -0
  136. package/src/assets/mds/tracker/_jira.mds +43 -0
  137. package/src/assets/mds/tracker/_linear.mds +43 -0
  138. package/src/assets/rules/quality.md +2 -0
  139. package/src/assets/scripts/ci-wait.cjs +204 -126
  140. package/src/assets/scripts/hooks/assets/implement-installed +1 -0
  141. package/src/assets/scripts/hooks/assets/orchestrator-charter.md +13 -11
  142. package/src/assets/scripts/hooks/preamble +18 -8
  143. package/src/assets/scripts/hooks/session-start-orchestrator +4 -2
  144. package/src/assets/scripts/pr-evidence.cjs +41 -2
  145. package/src/assets/scripts/verify-evidence.cjs +408 -56
  146. package/src/assets/skills/agent-references/references/commands/implement-revalidate.md +3 -3
  147. package/src/assets/skills/agent-references/references/commands/plan-levels.md +1 -1
  148. package/src/assets/skills/agent-references/references/synthesize/bug-analysis.md +6 -2
  149. package/src/assets/skills/agent-references/references/validate/passed-alone.md +7 -7
  150. package/src/assets/skills/docs-framework/SKILL.md +5 -2
  151. package/src/assets/skills/git/SKILL.md +3 -3
  152. package/src/assets/skills/git/references/github-api.md +2 -139
  153. package/src/assets/skills/git/references/github-posting.md +158 -0
  154. package/src/assets/skills/review-methodology/SKILL.md +1 -1
  155. package/src/assets/skills/review-methodology/references/patterns.md +1 -1
  156. package/src/assets/skills/review-methodology/references/report-template.md +1 -2
  157. package/src/assets/skills/testing/SKILL.md +2 -4
@@ -0,0 +1,279 @@
1
+ ---
2
+ description: Release project using adaptive learned configuration
3
+ ---
4
+
5
+ # Release Command
6
+
7
+ Release the project using adaptive learned configuration. On first run, scans the codebase to detect the release process and stores it in `.release/RELEASE-FLOW.md`. Subsequent releases use the stored config, skipping discovery.
8
+
9
+ ## Usage
10
+
11
+ ```
12
+ /release v1.2.3 (explicit version)
13
+ /release patch (bump type: patch | minor | major)
14
+ /release --dry-run (simulate release, show plan without executing)
15
+ /release (interactive: ask for version)
16
+ ```
17
+
18
+ ## Input
19
+
20
+ What follows `/release` is bound once, here. Every later step names it `COMMAND_INPUT` and never restates it:
21
+
22
+ <command-input>
23
+ $ARGUMENTS
24
+ </command-input>
25
+
26
+ `COMMAND_INPUT` is one of:
27
+ - Explicit version: `v1.2.3` or `1.2.3`
28
+ - Bump type: `patch`, `minor`, `major`
29
+ - Flag: `--dry-run`
30
+ - Empty: interactive mode (will ask for version)
31
+
32
+ Parse from `COMMAND_INPUT`:
33
+ - `VERSION`: explicit version string if present (strip leading `v`)
34
+ - `BUMP_TYPE`: `patch | minor | major` if bump type provided
35
+ - `DRY_RUN`: true if `--dry-run` present, false otherwise
36
+
37
+ ## Phases
38
+
39
+ ### Phase 1: Load Config
40
+
41
+ **Produces:** RELEASE_CONFIG, CONFIG_STATE (`learned` | `fresh`)
42
+
43
+ **Continuation detection**: Check `.release/.progress.json`. If exists, an interrupted release is in progress. Offer user:
44
+ - **Resume**: continue from last checkpoint (skip phases already completed)
45
+ - **Restart**: clean start (delete `.release/.progress.json` and begin from Phase 1)
46
+
47
+ Read `.release/RELEASE-FLOW.md`:
48
+ - If exists → parse as structured config, set CONFIG_STATE = learned, skip to Phase 4
49
+ - If missing → set CONFIG_STATE = fresh, continue to Phase 2
50
+
51
+ ### Phase 1b: Load Context
52
+
53
+ **Produces:** FEATURE_KNOWLEDGE, FEATURE_KNOWLEDGE_RULES
54
+
55
+ ### Load Feature Knowledge
56
+
57
+ Resolve `{worktree}` as the checkout's toplevel, because feature knowledge bases are committed with the branch (D-PROMPT-ROOT): from the start directory — `WORKTREE_PATH` if provided, otherwise cwd (`devflow:worktree-support`) — run
58
+
59
+ ```bash
60
+ git -C "{start}" rev-parse --show-toplevel
61
+ ```
62
+
63
+ and use its one-line output. If the command fails (outside a git repository), `{worktree}` is the start directory itself. All paths below are relative to `{worktree}`.
64
+
65
+ **Step 1 — Read the index cache:**
66
+
67
+ Attempt to read `{worktree}/.devflow/features/index.md`. Each line follows the format:
68
+
69
+ ```
70
+ - **{slug}** — {areas} — {Use-when description}
71
+ ```
72
+
73
+ If `index.md` exists and contains at least one entry line, use it for relevance matching.
74
+
75
+ **Step 2 — Fallback: glob frontmatter (if `index.md` is absent or empty):**
76
+
77
+ Glob `{worktree}/.devflow/features/*/KNOWLEDGE.md`. For each file found, read only its YAML frontmatter block (between the opening and closing `---` delimiters).
78
+
79
+ **Step 3 — Pick relevant KBs:**
80
+
81
+ Match the current task area and description against each index line (or frontmatter `description` + `directories` on fallback). Select entries whose documented area overlaps the current task. This is a relevance judgment — prefer specificity over breadth.
82
+
83
+ **Step 4 — Read each selected KB's Rules:**
84
+
85
+ For each selected entry, `{kb}` is `{worktree}/.devflow/features/{slug}/KNOWLEDGE.md`:
86
+
87
+ 1. List its `##` headings with line numbers through Bash: `command grep -n '^## ' "{kb}"`. This only locates sections; the text of a KB comes from the Read view alone.
88
+ 2. Read the `## Rules` range (its line to the next heading) with the Read tool, using `offset` and `limit`, and choose the one to three bullets most relevant to the current task. The choice is yours, made per KB.
89
+ 3. If the KB has no `## Rules` section, choose one to three entries from its `## Anti-Patterns` or `## Gotchas` range the same way, and label them by that section's name instead of an ID.
90
+
91
+ When a KB contradicts the code you observe, **trust the code** — the code is the freshness mechanism; the KB may lag behind. A missing Rules section, a missing heading list and `(none)` are legitimate states, not errors.
92
+
93
+ **Step 5 — Set FEATURE_KNOWLEDGE and FEATURE_KNOWLEDGE_RULES:**
94
+
95
+ Write one block per selected KB. Paste each bullet verbatim from the Read view, never from a shell view. The path is relative to the checkout root; an agent resolves it under `WORKTREE_PATH` when one is provided.
96
+
97
+ ```
98
+ --- Feature knowledge: {slug} ---
99
+ KB: .devflow/features/{slug}/KNOWLEDGE.md
100
+ Rules:
101
+ - **KB-AP-2** {bullet text, verbatim}
102
+ - **KB-INV-1** {bullet text, verbatim}
103
+ Headings: L5 Rules · L40 Overview · L62 Anti-Patterns · L118 Key Files
104
+ ```
105
+
106
+ A KB with no Rules section labels its entries `Rules ({section name}):` and gives them no ID. `FEATURE_KNOWLEDGE` is these blocks; `FEATURE_KNOWLEDGE_RULES` is the same blocks without the `Headings:` line. Both come from this one selection, and each spawn names the variable its recipient takes. If no KBs exist, no KBs are relevant, or `.devflow/features/` is absent, set both to `(none)`.
107
+
108
+ **One git call, then direct reads — no `.cjs` script.**
109
+
110
+ Pass `FEATURE_KNOWLEDGE` only to agents whose contract declares it; the Validate and Git agents this command spawns do not.
111
+
112
+ ### Phase 1c: Resolve the Evidence Policy
113
+
114
+ **Produces:** EVIDENCE_POLICY, ISSUE_REQUIRED, APPLY_CONVENTIONS, REQUIRE_NON_AUTHOR_APPROVAL
115
+
116
+ **Resolve the evidence policy once per run**, from the repository root, before any step reads the values:
117
+
118
+ ```bash
119
+ node "$HOME/.devflow/scripts/resolve-evidence-policy.cjs" 2>/dev/null; echo "exit=$?"
120
+ ```
121
+
122
+ Accept the output only when it is exactly two lines: `exit=0` last and, before it, one line of the form `EVIDENCE_POLICY=<required|standard> SOURCE=<file|worktree|default|invalid|error> REF=<branch|none>[ WARN=<remote-unavailable|invalid-file|raised-by-compliance|pr-changes-policy>[,…]] ISSUE_REQUIRED=<true|false> APPLY_CONVENTIONS=<true|false> REQUIRE_NON_AUTHOR_APPROVAL=<true|false>` — these fields, in this order, nothing else, where `<branch>` is a branch name such as `main`. **Anything else** (a non-zero exit, no line, extra text, or a missing, reordered or unlisted field or value) ⇒ use `EVIDENCE_POLICY=required SOURCE=error REF=none ISSUE_REQUIRED=true APPLY_CONVENTIONS=true REQUIRE_NON_AUTHOR_APPROVAL=true` instead.
123
+
124
+ Set `EVIDENCE_POLICY`, `ISSUE_REQUIRED`, `APPLY_CONVENTIONS` and `REQUIRE_NON_AUTHOR_APPROVAL` from the accepted line. Pass agents only the three mechanism inputs, never `EVIDENCE_POLICY`. Report `Evidence policy: {EVIDENCE_POLICY} (source: {SOURCE})`, plus any `WARN` tokens as advisory, once in the final report.
125
+
126
+ Reuse this result for all subsequent phases: it decides whether a real release gathers its commit list (Phase 4) and passes it to the release notes (step 4).
127
+ When `EVIDENCE_POLICY` is `required`, record `TRACEABILITY: DEGRADED (compliance off on this machine; the repository requires evidence)` once, for the completion report.
128
+
129
+ ### Phase 2: Detect Release Process (First Run Only)
130
+
131
+ **Produces:** RELEASE_SIGNALS
132
+ **Requires:** CONFIG_STATE = fresh
133
+
134
+ Tiered codebase scan to detect the project's release process:
135
+
136
+ **Tier 1** — Read these if they exist: `package.json`, `pyproject.toml`, `Cargo.toml`, `go.mod`, `Dockerfile`, `.github/workflows/*.yml`, `CHANGELOG.md`
137
+
138
+ **Tier 2** — Broaden: monorepo indicators (`lerna.json`, `pnpm-workspace.yaml`, `turbo.json`), release tool configs (`.releaserc`, `.changeset/`, `release-please-config.json`)
139
+
140
+ **Tier 3** — Git history: `git tag -l` for tag format, `git log --oneline -20` for conventions
141
+
142
+ Skip credential files (`.env*`, `*credentials*`, `*secret*`, `*.key`). Max 20 files total.
143
+
144
+ ### Phase 3: Build Config (First Run Only)
145
+
146
+ **Produces:** RELEASE_CONFIG (written to disk)
147
+ **Requires:** RELEASE_SIGNALS
148
+
149
+ Map RELEASE_SIGNALS to `.release/RELEASE-FLOW.md` with sections: Packages, Pre-release Checks, Changelog, Build & Test, Publish, Post-release.
150
+
151
+ **Conventions naming:** Consult `.devflow/conventions.md` (the naming authority written by the Git `learn-conventions` operation) for version/tag/version-PR title conventions. When the branching model uses version PRs, follow the Version PR Titles convention recorded there; compliance defaults when the file is absent. When the repo uses a main+integration branching model, ship via a version PR per the recorded convention. Re-learn by deleting `.devflow/conventions.md` — the next Git `learn-conventions` call rewrites it.
152
+
153
+ Use AskUserQuestion for any gaps that cannot be inferred.
154
+
155
+ Lazy-init `.release/` directory. Create `.release/.gitignore` with `.progress.json` and `.lock/`.
156
+
157
+ ### Phase 4: Pre-release Checks
158
+
159
+ **Produces:** PRE_RELEASE_RESULT, VERSION, RELEASE_EVIDENCE
160
+ **Requires:** RELEASE_CONFIG, EVIDENCE_POLICY
161
+
162
+ **Version determination** (in order):
163
+ 1. Explicit version from args → use directly
164
+ 2. Bump type from args → compute from current version
165
+ 3. `semver-auto` strategy → analyze commits since the last release tag: the tag that `node "$HOME/.devflow/scripts/release-trace.cjs" last-tag`, run from the repository root, prints as `LAST_TAG <tag>` (`LAST_TAG none` ⇒ the initial commit) — never `git describe`, which can return a local marker tag
166
+ 4. None → use AskUserQuestion
167
+
168
+ Pre-release checks:
169
+ - Clean working directory (`git status --porcelain`)
170
+ - Tag does not already exist
171
+ - Custom checks from RELEASE_CONFIG
172
+
173
+ Spawn `Agent(subagent_type="Validate")` for build + test.
174
+
175
+ **Gather the commit list** — under either policy when `DRY_RUN` is true, otherwise only when `EVIDENCE_POLICY` is `required`: spawn `Agent(subagent_type="Git")` with `gather-release-evidence` operation; pass `WORKTREE_PATH` if provided. Keep `COMMIT_LIST` alone as RELEASE_EVIDENCE. The Git agent applies its own bounds and degrades gracefully per D4.
176
+
177
+ Unless `DRY_RUN` is true, write `.release/.progress.json` checkpoint, with RELEASE_EVIDENCE when it was gathered — a dry run leaves nothing to resume.
178
+
179
+ `--dry-run`: report what would happen and, when the commit list was gathered, that list — never asking — then **halt after this phase**.
180
+
181
+ ### Phase 5: Build Release Plan
182
+
183
+ **Produces:** RELEASE_PLAN
184
+ **Requires:** PRE_RELEASE_RESULT, RELEASE_CONFIG, VERSION, RELEASE_EVIDENCE
185
+
186
+ Build ordered execution plan from RELEASE_CONFIG. For monorepo: respect dependency ordering, present package selection to user.
187
+
188
+ Confirm with user via AskUserQuestion before executing:
189
+ "Ready to release v{VERSION}. Plan: {steps summary}. Proceed?"
190
+
191
+ `--dry-run`: should already be halted from Phase 4.
192
+
193
+ ### Phase 6: Execute Release
194
+
195
+ **Produces:** RELEASE_RESULT
196
+ **Requires:** RELEASE_PLAN, VERSION, EVIDENCE_POLICY, RELEASE_EVIDENCE
197
+
198
+ Sequential execution with progress checkpoints:
199
+ 1. **Version bumps** — write new version to configured files
200
+ 2. **Changelog update** — move Unreleased section to versioned entry (if configured)
201
+
202
+ **Load Companion Skills** (D-RELEASE-GIT-LOAD-LATE) — Load via Skill tool: `devflow:git`, here and not earlier: steps 1–2 only write files and `--dry-run` halts after Phase 4, so neither carries the skill. A resume that skips step 3 loads it before its next main-thread git write. If a skill fails to load, continue without it.
203
+
204
+ 3. **Release commit** — `chore(release): v{VERSION}` (conventional commit)
205
+ 4. **Tag and GitHub Release** — spawn `Agent(subagent_type="Git")` with `create-release` operation (the agent reads `.devflow/conventions.md` for tag format and release title conventions; compliance defaults when absent); only when `EVIDENCE_POLICY` is `required`, also pass `COMMIT_LIST` from RELEASE_EVIDENCE as an input so the agent includes it in the release notes body.
206
+ 5. **Publish** — CI-driven (report) or manual (provide instructions)
207
+ 6. **Post-release steps** — version bump to next dev
208
+
209
+ **Resume:** a checkpoint missing the RELEASE_EVIDENCE its Phase 4 gate called for is gathered again only before step 4; after step 4, report `evidence lost on resume` and continue — never block.
210
+
211
+ Delete `.release/.progress.json` on success.
212
+
213
+ ### Phase 7: Suggest Improvements
214
+
215
+ **Requires:** RELEASE_RESULT
216
+
217
+ Post-release analysis for improvement opportunities. Present as suggested diffs to RELEASE-FLOW.md. Never auto-apply. Fire-and-forget.
218
+
219
+ ## Worktree Support
220
+
221
+ If the orchestrator receives a `WORKTREE_PATH` context, pass it through to all spawned agents. Each agent's "Worktree Support" section handles path resolution.
222
+
223
+ ## Output
224
+
225
+ On completion:
226
+ - Git tag created: `v{VERSION}` (or configured tag format)
227
+ - GitHub Release created with release notes
228
+ - Changelog updated (if configured)
229
+ - Version files bumped
230
+ - `.release/RELEASE-FLOW.md` created (first run only)
231
+
232
+ ## Architecture
233
+
234
+ ```
235
+ /release (orchestrator)
236
+ │
237
+ ├─ Phase 1: Load Config
238
+ │ └─ Read .release/RELEASE-FLOW.md (learned) or proceed to detect (fresh)
239
+ │
240
+ ├─ Phase 1b: Load Context
241
+ │ └─ Load FEATURE_KNOWLEDGE for the agents that declare it
242
+ │
243
+ ├─ Phase 2: Detect Release Process (first run only)
244
+ │ └─ Tiered scan: package.json, CI workflows, git history
245
+ │
246
+ ├─ Phase 3: Build Config (first run only)
247
+ │ └─ Write .release/RELEASE-FLOW.md
248
+ │
249
+ ├─ Phase 4: Pre-release Checks
250
+ │ ├─ Validate agent (build + test)
251
+ │ ├─ Git agent: gather the commit list (dry run, or evidence policy required)
252
+ │ └─ Write progress checkpoint
253
+ │
254
+ ├─ Phase 5: Build Release Plan
255
+ │ └─ Confirm with user before executing
256
+ │
257
+ ├─ Phase 6: Execute Release
258
+ │ ├─ Version bumps → Changelog → Commit → Git agent (tag + release) → Publish → Post-release
259
+ │ └─ Progress checkpoints between each step
260
+ │
261
+ └─ Phase 7: Suggest Improvements
262
+ └─ Suggested diffs to RELEASE-FLOW.md (never auto-applied)
263
+ ```
264
+
265
+ ## Principles
266
+
267
+ 1. **Learn once, reuse always** — discovery happens on first run; subsequent releases skip it
268
+ 2. **Config is data, not code** — structured config fields map to pre-defined operations, never raw shell commands
269
+ 3. **Checkpoint-resume** — progress file enables safe resume of interrupted releases
270
+ 4. **User confirms before execution** — release plan is presented for approval before any tags or commits
271
+
272
+ ## Error Handling
273
+
274
+ - Validate agent reports no PASS: halt, report failures, do not proceed
275
+ - User declines release plan: halt gracefully
276
+ - Git agent reports DEGRADED while gathering: warn and continue — never halt the release
277
+ - Git agent fails (tag/release): halt, report error, suggest manual steps
278
+ - Mid-release failure: progress checkpoint enables resume on next run
279
+ - Version file not found: halt, report which file is missing, ask user to update RELEASE-FLOW.md