devflow-kit 3.6.0 → 3.8.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/CHANGELOG.md +438 -1
- package/README.md +15 -11
- package/dist/agents/code.md +9 -15
- package/dist/agents/design.md +1 -1
- package/dist/agents/fix.md +11 -13
- package/dist/agents/git.md +1 -1
- package/dist/agents/harden.md +1 -1
- package/dist/agents/refactor.md +7 -10
- package/dist/agents/review.md +6 -4
- package/dist/agents/skim.md +2 -2
- package/dist/agents/triage.md +2 -2
- package/dist/cli/commands/capture.js +1 -1
- package/dist/cli/commands/curation-move-io.js +102 -0
- package/dist/cli/commands/curation-move-step.js +374 -0
- package/dist/cli/commands/{learning.js → curation.js} +302 -99
- package/dist/cli/commands/gate-level-prompts.js +426 -0
- package/dist/cli/commands/gates.js +299 -0
- package/dist/cli/commands/init-seed.js +16 -5
- package/dist/cli/commands/init.js +263 -54
- package/dist/cli/commands/memory.js +20 -2
- package/dist/cli/commands/prompt-io.js +37 -0
- package/dist/cli/commands/uninstall.js +81 -9
- package/dist/cli.js +4 -2
- package/dist/commands/bug-analysis.md +25 -36
- package/dist/commands/code-review.md +77 -73
- package/dist/commands/debug.md +5 -5
- package/dist/commands/dynamic-build.md +76 -83
- package/dist/commands/dynamic-plan.md +5 -5
- package/dist/commands/dynamic-profile.md +5 -5
- package/dist/commands/dynamic-tickets.md +5 -5
- package/dist/commands/explore.md +6 -6
- package/dist/commands/implement.md +68 -102
- package/dist/commands/plan.md +19 -29
- package/dist/commands/release.md +5 -5
- package/dist/commands/research.md +6 -6
- package/dist/commands/resolve.md +29 -31
- package/dist/commands/self-review.md +5 -13
- package/dist/core/assets.js +20 -20
- package/dist/core/curate-tuning-config.js +5 -6
- package/dist/core/curation-move-notice.js +84 -0
- package/dist/core/curation-move-skip.js +36 -0
- package/dist/core/curation-move.js +35 -0
- package/dist/core/curation-queue-cleanup.js +134 -0
- package/dist/core/curation-store.js +98 -0
- package/dist/core/{learning-variants.js → curation-variants.js} +65 -41
- package/dist/core/echo-value.js +48 -0
- package/dist/core/evidence-policy.js +18 -6
- package/dist/core/feature-switch.js +95 -19
- package/dist/core/fs-atomic.js +1 -1
- package/dist/core/gate-level.js +221 -0
- package/dist/core/git.js +16 -14
- package/dist/core/ledger-root.js +82 -22
- package/dist/core/linked-path.js +4 -4
- package/dist/core/manifest-lock.js +238 -0
- package/dist/core/manifest.js +84 -24
- package/dist/core/migrations.js +1 -13
- package/dist/core/model-discovery.js +7 -1
- package/dist/core/observations.js +2 -2
- package/dist/core/plugins.js +15 -15
- package/dist/core/pool.js +26 -0
- package/dist/core/project-paths.js +103 -34
- package/dist/core/queue-drain.js +2 -2
- package/dist/core/tracked-areas.js +35 -0
- package/dist/core/tracker.js +6 -34
- package/dist/{learning-off → curation-off}/agents/code.md +9 -15
- package/dist/{learning-off → curation-off}/agents/fix.md +11 -13
- package/dist/{learning-off → curation-off}/agents/refactor.md +7 -10
- package/dist/{learning-off → curation-off}/agents/review.md +5 -3
- package/dist/{learning-off → curation-off}/agents/triage.md +1 -1
- package/dist/{learning-off → curation-off}/commands/bug-analysis.md +20 -31
- package/dist/{learning-off → curation-off}/commands/code-review.md +74 -70
- package/dist/{learning-off → curation-off}/commands/debug.md +2 -2
- package/dist/{learning-off → curation-off}/commands/dynamic-build.md +73 -80
- package/dist/{learning-off → curation-off}/commands/explore.md +2 -2
- package/dist/{learning-off → curation-off}/commands/implement.md +65 -99
- package/dist/{learning-off → curation-off}/commands/plan.md +15 -25
- package/dist/{learning-off → curation-off}/commands/resolve.md +26 -28
- package/dist/{learning-off → curation-off}/commands/self-review.md +2 -10
- package/dist/hud/components/{learning-counts.js → curation-counts.js} +36 -17
- package/dist/hud/config.js +1 -1
- package/dist/hud/index.js +6 -6
- package/dist/hud/render.js +3 -3
- package/dist/skills/git/references/pr/validate-branch.md +8 -5
- package/dist/skills/git/references/tracker/github/ensure-pr-ready.md +20 -14
- package/dist/skills/git/references/tracker/jira/ensure-pr-ready.md +20 -20
- package/dist/skills/git/references/tracker/linear/ensure-pr-ready.md +20 -20
- package/dist/targets/claude-code/{learning-install.js → curation-install.js} +99 -67
- package/dist/targets/claude-code/installer.js +15 -15
- package/dist/targets/claude-code/language-stamp.js +5 -5
- package/dist/targets/claude-code/post-install.js +2 -2
- package/dist/targets/claude-code/tracker-servers.js +1 -1
- package/package.json +3 -2
- package/src/assets/agents/_partials/_code.mds +16 -17
- package/src/assets/agents/code.mds +4 -7
- package/src/assets/agents/curate.md +12 -14
- package/src/assets/agents/debug.mds +6 -6
- package/src/assets/agents/design.mds +18 -18
- package/src/assets/agents/fix.mds +6 -5
- package/src/assets/agents/git.mds +1 -1
- package/src/assets/agents/harden.mds +7 -7
- package/src/assets/agents/knowledge.mds +23 -23
- package/src/assets/agents/refactor.mds +2 -2
- package/src/assets/agents/research.mds +15 -15
- package/src/assets/agents/review.mds +45 -43
- package/src/assets/agents/skim.mds +11 -11
- package/src/assets/agents/synthesize.md +2 -2
- package/src/assets/agents/triage.mds +22 -22
- package/src/assets/agents/validate.md +13 -26
- package/src/assets/commands/_partials/_decisions.mds +13 -13
- package/src/assets/commands/_partials/_engine.mds +8 -8
- package/src/assets/commands/_partials/_knowledge.mds +29 -15
- package/src/assets/commands/_partials/_preamble.mds +4 -4
- package/src/assets/commands/_partials/_settings.mds +3 -3
- package/src/assets/commands/_partials/_wave.mds +17 -24
- package/src/assets/commands/bug-analysis.mds +37 -48
- package/src/assets/commands/code-review.mds +90 -86
- package/src/assets/commands/debug.mds +14 -14
- package/src/assets/commands/dynamic-build.mds +78 -78
- package/src/assets/commands/dynamic-plan.mds +22 -22
- package/src/assets/commands/dynamic-profile.mds +2 -2
- package/src/assets/commands/dynamic-tickets.mds +8 -8
- package/src/assets/commands/explore.mds +20 -20
- package/src/assets/commands/implement.mds +92 -118
- package/src/assets/commands/plan.mds +41 -51
- package/src/assets/commands/release.mds +12 -12
- package/src/assets/commands/research.mds +19 -19
- package/src/assets/commands/resolve.mds +56 -50
- package/src/assets/commands/self-review.mds +20 -20
- package/src/assets/mds/git/_ops.mds +3 -1
- package/src/assets/mds/git/_ops_pr.mds +1 -1
- package/src/assets/mds/git/_ops_steps.mds +13 -7
- package/src/assets/mds/git/_pr.mds +7 -4
- package/src/assets/mds/tracker/_common.mds +23 -12
- package/src/assets/mds/tracker/_github.mds +2 -9
- package/src/assets/mds/tracker/_jira.mds +2 -15
- package/src/assets/mds/tracker/_linear.mds +2 -15
- package/src/assets/rules/quality.md +1 -0
- package/src/assets/scripts/ci-wait.cjs +22 -4
- package/src/assets/scripts/claude-md-audit.cjs +66 -51
- package/src/assets/scripts/hooks/background-memory-update +406 -97
- package/src/assets/scripts/hooks/capture-prompt +12 -12
- package/src/assets/scripts/hooks/capture-question +11 -11
- package/src/assets/scripts/hooks/capture-turn +12 -12
- package/src/assets/scripts/hooks/{learning-lock → curation-lock} +2 -2
- package/src/assets/scripts/hooks/curation-move +293 -0
- package/src/assets/scripts/hooks/ensure-devflow-init +45 -13
- package/src/assets/scripts/hooks/ensure-proxy +4 -4
- package/src/assets/scripts/hooks/ensure-root-gitignore +4 -4
- package/src/assets/scripts/hooks/git-marker +81 -0
- package/src/assets/scripts/hooks/json-helper.cjs +145 -51
- package/src/assets/scripts/hooks/json-parse +19 -4
- package/src/assets/scripts/hooks/lib/curation-move.cjs +1582 -0
- package/src/assets/scripts/hooks/lib/{learning-store.cjs → curation-store.cjs} +242 -118
- package/src/assets/scripts/hooks/lib/decisions-format.cjs +3 -3
- package/src/assets/scripts/hooks/lib/mkdir-lock.cjs +24 -7
- package/src/assets/scripts/hooks/lib/project-paths.cjs +132 -39
- package/src/assets/scripts/hooks/lib/render-decisions.cjs +34 -22
- package/src/assets/scripts/hooks/lib/tracked-areas.cjs +259 -0
- package/src/assets/scripts/hooks/memory-permission +358 -0
- package/src/assets/scripts/hooks/memory-worker +1 -1
- package/src/assets/scripts/hooks/pre-compact-memory +6 -16
- package/src/assets/scripts/hooks/queue-append +228 -103
- package/src/assets/scripts/hooks/resolve-project-root +2 -2
- package/src/assets/scripts/hooks/session-start-context +145 -71
- package/src/assets/scripts/hooks/session-start-memory +27 -46
- package/src/assets/scripts/lib/project-config.cjs +31 -9
- package/src/assets/scripts/resolve-base.cjs +1043 -0
- package/src/assets/scripts/resolve-settings.cjs +238 -46
- package/src/assets/skills/agent-references/SKILL.md +9 -2
- package/src/assets/skills/agent-references/references/commands/code-review-levels.md +19 -0
- package/src/assets/skills/agent-references/references/commands/implement-levels.md +27 -0
- package/src/assets/skills/agent-references/references/commands/implement-revalidate.md +6 -4
- package/src/assets/skills/agent-references/references/commands/plan-levels.md +40 -0
- package/src/assets/skills/agent-references/references/commands/resolve-levels.md +24 -0
- package/src/assets/skills/agent-references/references/synthesize/planning.md +9 -22
- package/src/assets/skills/agent-references/references/synthesize/review.md +11 -11
- package/src/assets/skills/apply-decisions/SKILL.md +1 -1
- package/src/assets/skills/docs-framework/SKILL.md +7 -7
- package/src/assets/skills/docs-framework/references/patterns.md +3 -4
- package/src/assets/skills/quality-gates/SKILL.md +1 -1
- package/src/assets/skills/worktree-support/references/roots.md +2 -2
- package/templates/lint-pack/.lint-pack.conf +86 -0
- package/templates/lint-pack/README.md +190 -0
- package/templates/lint-pack/lint-pack.sh +905 -0
- package/dist/core/learning-queue-cleanup.js +0 -27
- package/dist/core/learning-store.js +0 -61
- /package/dist/{learning-off → curation-off}/agents/debug.md +0 -0
- /package/dist/{learning-off → curation-off}/agents/design.md +0 -0
- /package/dist/{learning-off → curation-off}/agents/harden.md +0 -0
- /package/dist/{learning-off → curation-off}/agents/knowledge.md +0 -0
- /package/dist/{learning-off → curation-off}/agents/research.md +0 -0
- /package/dist/{learning-off → curation-off}/agents/skim.md +0 -0
- /package/dist/{learning-off → curation-off}/commands/dynamic-plan.md +0 -0
- /package/dist/{learning-off → curation-off}/commands/dynamic-profile.md +0 -0
- /package/dist/{learning-off → curation-off}/commands/dynamic-tickets.md +0 -0
- /package/dist/{learning-off → curation-off}/commands/release.md +0 -0
- /package/dist/{learning-off → curation-off}/commands/research.md +0 -0
|
@@ -14,8 +14,6 @@ output-dir: dist/commands
|
|
|
14
14
|
|
|
15
15
|
Orchestrate design planning from requirements discovery through gap analysis to implementation design. Produces a machine-readable design artifact consumed by `/implement`.
|
|
16
16
|
|
|
17
|
-
The orchestrator only spawns agents and gates — all analytical work is done by agents.
|
|
18
|
-
|
|
19
17
|
## Usage
|
|
20
18
|
|
|
21
19
|
```
|
|
@@ -43,8 +41,6 @@ $ARGUMENTS
|
|
|
43
41
|
|
|
44
42
|
## Clarification Gates
|
|
45
43
|
|
|
46
|
-
**MANDATORY**: Three gates that must complete before proceeding.
|
|
47
|
-
|
|
48
44
|
| Gate | Phase | Purpose |
|
|
49
45
|
|------|-------|---------|
|
|
50
46
|
| Gate 0 | Phase 1 | Requirements discovery before exploration |
|
|
@@ -108,17 +104,17 @@ If the user says "skip" or "just proceed" — skip remaining questions, present
|
|
|
108
104
|
|
|
109
105
|
**MANDATORY**: Do not spawn any agents until Gate 0 is confirmed — the Step 0 issue fetch (if applicable) is the sole exception; it precedes and informs Gate 0 and must complete before Gate 0 begins.
|
|
110
106
|
|
|
111
|
-
<!--
|
|
107
|
+
<!-- curation:on -->
|
|
112
108
|
#### Phase 2: Orient + Load Decisions
|
|
113
|
-
<!--
|
|
109
|
+
<!-- curation:off -->
|
|
114
110
|
#### Phase 2: Orient
|
|
115
|
-
<!--
|
|
111
|
+
<!-- curation:end -->
|
|
116
112
|
|
|
117
|
-
<!--
|
|
118
|
-
**Produces:** SKIM_CONTEXT, DECISIONS_CONTEXT, FEATURE_KNOWLEDGE, FEATURE_KNOWLEDGE_RULES
|
|
119
|
-
<!--
|
|
120
|
-
**Produces:** SKIM_CONTEXT, FEATURE_KNOWLEDGE, FEATURE_KNOWLEDGE_RULES
|
|
121
|
-
<!--
|
|
113
|
+
<!-- curation:on -->
|
|
114
|
+
**Produces:** SKIM_CONTEXT, DECISIONS_CONTEXT, FEATURE_KNOWLEDGE, FEATURE_KNOWLEDGE_RULES, GATE_LEVEL
|
|
115
|
+
<!-- curation:off -->
|
|
116
|
+
**Produces:** SKIM_CONTEXT, FEATURE_KNOWLEDGE, FEATURE_KNOWLEDGE_RULES, GATE_LEVEL
|
|
117
|
+
<!-- curation:end -->
|
|
122
118
|
**Requires:** CONFIRMED_SCOPE
|
|
123
119
|
|
|
124
120
|
{{settings.settings_resolve()}}
|
|
@@ -128,9 +124,9 @@ Spawn Skim agent for codebase context:
|
|
|
128
124
|
```
|
|
129
125
|
Agent(subagent_type="Skim"):
|
|
130
126
|
"Orient in codebase for design planning: {feature/issues}
|
|
131
|
-
<!--
|
|
132
|
-
|
|
133
|
-
<!--
|
|
127
|
+
<!-- curation:on -->
|
|
128
|
+
CURATION: {CURATION from the settings line}
|
|
129
|
+
<!-- curation:end -->
|
|
134
130
|
Run rskim on source directories (NOT repo root) to identify:
|
|
135
131
|
- Existing patterns and conventions in the affected area
|
|
136
132
|
- File structure and module boundaries
|
|
@@ -142,22 +138,28 @@ Return codebase context for requirements analysis."
|
|
|
142
138
|
{{docs_root()}}
|
|
143
139
|
|
|
144
140
|
{{decisions_load()}}
|
|
145
|
-
<!--
|
|
141
|
+
<!-- curation:on -->
|
|
146
142
|
This produces a compact index of active ADR/PF entries. Pass the Skim agent context to all subsequent agents. Pass `DECISIONS_CONTEXT` to the Design agents of the gap-analysis phase as one shared slice — prior decisions constrain design, known pitfalls inform gap analysis. Design agents use `devflow:apply-decisions` to Read full entry bodies on demand.
|
|
147
143
|
|
|
148
|
-
<!--
|
|
144
|
+
<!-- curation:end -->
|
|
149
145
|
{{knowledge_load()}}
|
|
150
146
|
|
|
151
|
-
<!--
|
|
147
|
+
<!-- curation:on -->
|
|
152
148
|
Pass `FEATURE_KNOWLEDGE` to Explore and Design agents. Pass `DECISIONS_CONTEXT` to Design agents only.
|
|
153
|
-
<!--
|
|
149
|
+
<!-- curation:off -->
|
|
154
150
|
Pass `FEATURE_KNOWLEDGE` to Explore and Design agents.
|
|
155
|
-
<!--
|
|
151
|
+
<!-- curation:end -->
|
|
152
|
+
|
|
153
|
+
**Gate level.** At `standard` or `lean`, once per run, run `d="${CLAUDE_CONFIG_DIR:-}"; case "$d" in /*) ;; *) d="$HOME/.claude" ;; esac; printf '%s\n' "$d"` in Bash and Read `<that directory>/skills/devflow:agent-references/references/commands/plan-levels.md` with the Read tool, and apply it to Phases 3-14.
|
|
154
|
+
|
|
155
|
+
- No row or rule overrides the next two lines.
|
|
156
|
+
- If the Read fails, or a row is missing or malformed, set `GATE_LEVEL` to `full` and say `level reference unreadable: full applied`.
|
|
157
|
+
- Security runs as its own Design spawn, and the design review runs, at every level and on every Revise pass.
|
|
156
158
|
|
|
157
159
|
#### Phase 3: Explore Requirements (Parallel)
|
|
158
160
|
|
|
159
161
|
**Produces:** EXPLORE_OUTPUTS
|
|
160
|
-
**Requires:** SKIM_CONTEXT
|
|
162
|
+
**Requires:** SKIM_CONTEXT, GATE_LEVEL
|
|
161
163
|
|
|
162
164
|
Spawn 4 `Agent(subagent_type="Explore")` agents **in a single message**, each with Skim agent context and `FEATURE_KNOWLEDGE: {feature_knowledge}` (from Phase 2). Include the instruction: "The FEATURE_KNOWLEDGE is a baseline — VALIDATE, EXTEND, and CORRECT it. For anything it already covers, cite its KB IDs (`{slug} KB-AP-n`) instead of restating the text. Focus on areas the feature knowledge doesn't cover and changes since it was last updated." Ask each agent for a final report of at most about 1,500 tokens: findings with file:line references, not file dumps.
|
|
163
165
|
|
|
@@ -173,8 +175,6 @@ Spawn 4 `Agent(subagent_type="Explore")` agents **in a single message**, each wi
|
|
|
173
175
|
**Produces:** EXPLORATION_SYNTHESIS
|
|
174
176
|
**Requires:** EXPLORE_OUTPUTS
|
|
175
177
|
|
|
176
|
-
**WAIT** for Phase 3 to complete.
|
|
177
|
-
|
|
178
178
|
```
|
|
179
179
|
Agent(subagent_type="Synthesize"):
|
|
180
180
|
"Synthesize EXPLORATION outputs for: {feature/issues}
|
|
@@ -190,11 +190,11 @@ Combine into: user needs, similar features, constraints, failure modes"
|
|
|
190
190
|
#### Phase 5: Gap Analysis (Parallel)
|
|
191
191
|
|
|
192
192
|
**Produces:** GAP_OUTPUTS, COMPLIANCE_ACTIVE, COMPLIANCE_FRAMEWORKS
|
|
193
|
-
<!--
|
|
193
|
+
<!-- curation:on -->
|
|
194
194
|
**Requires:** EXPLORATION_SYNTHESIS, SKIM_CONTEXT, DECISIONS_CONTEXT
|
|
195
|
-
<!--
|
|
195
|
+
<!-- curation:off -->
|
|
196
196
|
**Requires:** EXPLORATION_SYNTHESIS, SKIM_CONTEXT
|
|
197
|
-
<!--
|
|
197
|
+
<!-- curation:end -->
|
|
198
198
|
|
|
199
199
|
{{compliance_gate()}}
|
|
200
200
|
|
|
@@ -220,9 +220,9 @@ Each Design agent receives:
|
|
|
220
220
|
- Focus: (their assigned focus from table)
|
|
221
221
|
- Exploration synthesis from Phase 4
|
|
222
222
|
- Skim agent context from Phase 2
|
|
223
|
-
<!--
|
|
223
|
+
<!-- curation:on -->
|
|
224
224
|
- `DECISIONS_CONTEXT` (index from Phase 2)
|
|
225
|
-
<!--
|
|
225
|
+
<!-- curation:end -->
|
|
226
226
|
- `COMPLIANCE_FOCUS_DIRECTIVE` (compliance focus only)
|
|
227
227
|
- Multi-issue: all issue bodies
|
|
228
228
|
|
|
@@ -232,21 +232,21 @@ Each Design agent receives:
|
|
|
232
232
|
Agent(subagent_type="Design"):
|
|
233
233
|
"Mode: gap-analysis
|
|
234
234
|
Focus: {completeness|architecture|security|performance|compliance|consistency|dependencies}
|
|
235
|
-
<!--
|
|
235
|
+
<!-- curation:on -->
|
|
236
236
|
DECISIONS_CONTEXT: {decisions_context}
|
|
237
|
-
<!--
|
|
237
|
+
<!-- curation:end -->
|
|
238
238
|
FEATURE_KNOWLEDGE: {feature_knowledge}
|
|
239
239
|
{COMPLIANCE_FOCUS_DIRECTIVE} (compliance focus only)
|
|
240
|
-
|
|
240
|
+
Run `d="${CLAUDE_CONFIG_DIR:-}"; case "$d" in /*) ;; *) d="$HOME/.claude" ;; esac; printf '%s\n' "$d"` in Bash, then Read `<that directory>/skills/devflow:gap-analysis/references/compliance.md` with the Read tool and apply it as your focus patterns. (compliance focus only)
|
|
241
241
|
Artifacts:
|
|
242
242
|
Feature/Issues: {feature description or issue bodies}
|
|
243
243
|
Exploration synthesis: {Phase 4 output}
|
|
244
244
|
Codebase context: {Phase 2 output}
|
|
245
|
-
<!--
|
|
245
|
+
<!-- curation:on -->
|
|
246
246
|
Analyze only your assigned focus area. Follow devflow:apply-decisions for DECISIONS_CONTEXT.
|
|
247
|
-
<!--
|
|
247
|
+
<!-- curation:off -->
|
|
248
248
|
Analyze only your assigned focus area.
|
|
249
|
-
<!--
|
|
249
|
+
<!-- curation:end -->
|
|
250
250
|
Cite evidence from provided artifacts."
|
|
251
251
|
```
|
|
252
252
|
|
|
@@ -255,8 +255,6 @@ Cite evidence from provided artifacts."
|
|
|
255
255
|
**Produces:** GAP_SYNTHESIS
|
|
256
256
|
**Requires:** GAP_OUTPUTS
|
|
257
257
|
|
|
258
|
-
**WAIT** for Phase 5 to complete.
|
|
259
|
-
|
|
260
258
|
```
|
|
261
259
|
Agent(subagent_type="Synthesize"):
|
|
262
260
|
"Synthesize GAP ANALYSIS outputs for: {feature/issues}
|
|
@@ -317,8 +315,6 @@ Spawn 4 `Agent(subagent_type="Explore")` agents **in a single message**, each wi
|
|
|
317
315
|
**Produces:** IMPL_EXPLORATION_SYNTHESIS
|
|
318
316
|
**Requires:** IMPL_EXPLORE_OUTPUTS
|
|
319
317
|
|
|
320
|
-
**WAIT** for Phase 8 to complete.
|
|
321
|
-
|
|
322
318
|
```
|
|
323
319
|
Agent(subagent_type="Synthesize"):
|
|
324
320
|
"Synthesize IMPLEMENTATION EXPLORATION outputs for: {feature/issues}
|
|
@@ -332,7 +328,7 @@ Combine into: patterns to follow, integration points, reusable code, edge cases"
|
|
|
332
328
|
**Produces:** PLAN_OUTPUTS
|
|
333
329
|
**Requires:** IMPL_EXPLORATION_SYNTHESIS, GAP_SYNTHESIS
|
|
334
330
|
|
|
335
|
-
Spawn 3 Plan agents **in a single message**, each with implementation exploration synthesis. Ask each agent for a final report of at most about 1,500 tokens: the plan itself, not a restatement of the exploration.
|
|
331
|
+
Spawn 3 `Agent(subagent_type="Plan")` agents **in a single message**, each with implementation exploration synthesis. Ask each agent for a final report of at most about 1,500 tokens: the plan itself, not a restatement of the exploration.
|
|
336
332
|
|
|
337
333
|
| Focus | Output |
|
|
338
334
|
|-------|--------|
|
|
@@ -347,8 +343,6 @@ Implementation steps planner: include explicit gap mitigations (from Phase 6) in
|
|
|
347
343
|
**Produces:** PLANNING_SYNTHESIS
|
|
348
344
|
**Requires:** PLAN_OUTPUTS
|
|
349
345
|
|
|
350
|
-
**WAIT** for Phase 10 to complete.
|
|
351
|
-
|
|
352
346
|
```
|
|
353
347
|
Agent(subagent_type="Synthesize"):
|
|
354
348
|
"Synthesize PLANNING outputs for: {feature/issues}
|
|
@@ -536,6 +530,7 @@ Display completion summary:
|
|
|
536
530
|
- Issue URL (if created or enriched) — and any `TRACEABILITY: DEGRADED ({reason})` lines from the Git agent
|
|
537
531
|
- Gap analysis summary (N blocking, M should-address)
|
|
538
532
|
- Design review summary (N anti-patterns found, M mitigated in plan)
|
|
533
|
+
- Gate level: {GATE_LEVEL}, with any level note
|
|
539
534
|
- Suggested next step: `/implement {artifact-path}` or `/implement #{issue-number}`
|
|
540
535
|
|
|
541
536
|
---
|
|
@@ -549,11 +544,11 @@ Display completion summary:
|
|
|
549
544
|
│ ├─ Phase 1: GATE 0 - Requirements Discovery ⛔ MANDATORY
|
|
550
545
|
│ │ ├─ Git agent (fetch-issue / fetch-issues-batch) - issue mode only
|
|
551
546
|
│ │ └─ AskUserQuestion: Validate interpretation
|
|
552
|
-
<!--
|
|
547
|
+
<!-- curation:on -->
|
|
553
548
|
│ ├─ Phase 2: Orient + Load Decisions
|
|
554
|
-
<!--
|
|
549
|
+
<!-- curation:off -->
|
|
555
550
|
│ ├─ Phase 2: Orient
|
|
556
|
-
<!--
|
|
551
|
+
<!-- curation:end -->
|
|
557
552
|
│ ├─ Phase 3: Explore Requirements (PARALLEL)
|
|
558
553
|
│ └─ Phase 4: Synthesize Exploration
|
|
559
554
|
│
|
|
@@ -583,13 +578,8 @@ Display completion summary:
|
|
|
583
578
|
|
|
584
579
|
## Principles
|
|
585
580
|
|
|
586
|
-
1. **
|
|
587
|
-
2. **
|
|
588
|
-
3. **Parallel execution** — Explore phases and gap analysis run in parallel; synthesis phases wait
|
|
589
|
-
4. **Evidence-based gaps** — Every gap cites specific text; no speculation
|
|
590
|
-
5. **Scope ruthlessly** — Small, focused plans ship faster; gate 1 enforces scope discipline
|
|
591
|
-
6. **Strict delegation** — Never synthesize, analyze, or plan in main session; always spawn agents
|
|
592
|
-
7. **Design artifacts are machine-readable** — `/implement` can consume the YAML frontmatter directly
|
|
581
|
+
1. **Scope ruthlessly** — Small, focused plans ship faster; gate 1 enforces scope discipline
|
|
582
|
+
2. **Strict delegation** — Never synthesize, analyze, or plan in main session; always spawn agents
|
|
593
583
|
|
|
594
584
|
## Error Handling
|
|
595
585
|
|
|
@@ -55,31 +55,31 @@ Read `.release/RELEASE-FLOW.md`:
|
|
|
55
55
|
|
|
56
56
|
### Phase 1b: Load Context
|
|
57
57
|
|
|
58
|
-
<!--
|
|
58
|
+
<!-- curation:on -->
|
|
59
59
|
**Produces:** DECISIONS_CONTEXT, FEATURE_KNOWLEDGE, FEATURE_KNOWLEDGE_RULES
|
|
60
|
-
<!--
|
|
60
|
+
<!-- curation:off -->
|
|
61
61
|
**Produces:** FEATURE_KNOWLEDGE, FEATURE_KNOWLEDGE_RULES
|
|
62
|
-
<!--
|
|
62
|
+
<!-- curation:end -->
|
|
63
63
|
|
|
64
|
-
<!--
|
|
64
|
+
<!-- curation:on -->
|
|
65
65
|
{{settings.settings_resolve()}}
|
|
66
66
|
|
|
67
67
|
{{decisions_gate()}}
|
|
68
68
|
|
|
69
69
|
{{decisions_locate()}}
|
|
70
70
|
|
|
71
|
-
Read `{ledger}/.devflow/
|
|
71
|
+
Read `{ledger}/.devflow/curation/index.md`. If the file is absent or empty, set `DECISIONS_CONTEXT` to `(none)`; otherwise use the file content as `DECISIONS_CONTEXT`.
|
|
72
72
|
|
|
73
73
|
{{decisions_slice()}}
|
|
74
74
|
|
|
75
|
-
<!--
|
|
75
|
+
<!-- curation:end -->
|
|
76
76
|
{{knowledge_load()}}
|
|
77
77
|
|
|
78
|
-
<!--
|
|
78
|
+
<!-- curation:on -->
|
|
79
79
|
Pass `DECISIONS_CONTEXT` and `FEATURE_KNOWLEDGE` only to agents whose contract declares them; the Validate and Git agents this command spawns do not.
|
|
80
|
-
<!--
|
|
80
|
+
<!-- curation:off -->
|
|
81
81
|
Pass `FEATURE_KNOWLEDGE` only to agents whose contract declares it; the Validate and Git agents this command spawns do not.
|
|
82
|
-
<!--
|
|
82
|
+
<!-- curation:end -->
|
|
83
83
|
|
|
84
84
|
### Phase 1c: Resolve the Evidence Policy
|
|
85
85
|
|
|
@@ -234,11 +234,11 @@ On completion:
|
|
|
234
234
|
│ └─ Read .release/RELEASE-FLOW.md (learned) or proceed to detect (fresh)
|
|
235
235
|
│
|
|
236
236
|
├─ Phase 1b: Load Context
|
|
237
|
-
<!--
|
|
237
|
+
<!-- curation:on -->
|
|
238
238
|
│ └─ Load DECISIONS_CONTEXT and FEATURE_KNOWLEDGE for the agents that declare them
|
|
239
|
-
<!--
|
|
239
|
+
<!-- curation:off -->
|
|
240
240
|
│ └─ Load FEATURE_KNOWLEDGE for the agents that declare it
|
|
241
|
-
<!--
|
|
241
|
+
<!-- curation:end -->
|
|
242
242
|
│
|
|
243
243
|
├─ Phase 2: Detect Release Process (first run only)
|
|
244
244
|
│ └─ Tiered scan: package.json, CI workflows, git history
|
|
@@ -34,29 +34,29 @@ $ARGUMENTS
|
|
|
34
34
|
|
|
35
35
|
## Phases
|
|
36
36
|
|
|
37
|
-
<!--
|
|
37
|
+
<!-- curation:on -->
|
|
38
38
|
### Phase 1: Load Decisions (Orchestrator-Local)
|
|
39
|
-
<!--
|
|
39
|
+
<!-- curation:off -->
|
|
40
40
|
### Phase 1: Load Context (Orchestrator-Local)
|
|
41
|
-
<!--
|
|
41
|
+
<!-- curation:end -->
|
|
42
42
|
|
|
43
|
-
<!--
|
|
43
|
+
<!-- curation:on -->
|
|
44
44
|
**Produces:** DECISIONS_CONTEXT, FEATURE_KNOWLEDGE, FEATURE_KNOWLEDGE_RULES
|
|
45
|
-
<!--
|
|
45
|
+
<!-- curation:off -->
|
|
46
46
|
**Produces:** FEATURE_KNOWLEDGE, FEATURE_KNOWLEDGE_RULES
|
|
47
|
-
<!--
|
|
47
|
+
<!-- curation:end -->
|
|
48
48
|
|
|
49
49
|
{{docs_root()}}
|
|
50
50
|
|
|
51
|
-
<!--
|
|
51
|
+
<!-- curation:on -->
|
|
52
52
|
{{settings.settings_resolve()}}
|
|
53
53
|
|
|
54
|
-
<!--
|
|
54
|
+
<!-- curation:end -->
|
|
55
55
|
{{decisions_load()}}
|
|
56
|
-
<!--
|
|
56
|
+
<!-- curation:on -->
|
|
57
57
|
Use `DECISIONS_CONTEXT` locally when framing research — prior decisions and pitfalls suggest areas to investigate. Follow `devflow:apply-decisions` to Read full entry bodies on demand. Pass `DECISIONS_CONTEXT` to each Research agent in Phase 4 so their findings can account for relevant decisions.
|
|
58
58
|
|
|
59
|
-
<!--
|
|
59
|
+
<!-- curation:end -->
|
|
60
60
|
{{knowledge_load()}}
|
|
61
61
|
|
|
62
62
|
Use `FEATURE_KNOWLEDGE` **locally** for research framing. Pass to each Research agent in Phase 4.
|
|
@@ -82,11 +82,11 @@ Analyze the research question to infer research types needed (min 2, max 5). For
|
|
|
82
82
|
|
|
83
83
|
Only if `codebase` type is in RESEARCH_PLAN.
|
|
84
84
|
|
|
85
|
-
<!--
|
|
86
|
-
Spawn `Agent(subagent_type="Skim")` with `
|
|
87
|
-
<!--
|
|
85
|
+
<!-- curation:on -->
|
|
86
|
+
Spawn `Agent(subagent_type="Skim")` with `CURATION` from the settings line, targeting codebase areas relevant to the research question.
|
|
87
|
+
<!-- curation:off -->
|
|
88
88
|
Spawn `Agent(subagent_type="Skim")` targeting codebase areas relevant to the research question.
|
|
89
|
-
<!--
|
|
89
|
+
<!-- curation:end -->
|
|
90
90
|
|
|
91
91
|
Skip and set ORIENT_OUTPUT = "(none)" if `codebase` type is not in RESEARCH_PLAN.
|
|
92
92
|
|
|
@@ -99,9 +99,9 @@ Spawn 2-5 `Agent(subagent_type="Research")` agents **in a single message** (para
|
|
|
99
99
|
|
|
100
100
|
Each Research agent receives:
|
|
101
101
|
- `RESEARCH_TYPE`, `RESEARCH_QUESTION`, `OUTPUT_PATH` from RESEARCH_PLAN
|
|
102
|
-
<!--
|
|
102
|
+
<!-- curation:on -->
|
|
103
103
|
- `DECISIONS_CONTEXT`: From Phase 1
|
|
104
|
-
<!--
|
|
104
|
+
<!-- curation:end -->
|
|
105
105
|
- `FEATURE_KNOWLEDGE`: `{feature_knowledge}` from Phase 1
|
|
106
106
|
- `ORIENT_OUTPUT`: Only for `codebase` type
|
|
107
107
|
- `WORKTREE_PATH`: If in a worktree context
|
|
@@ -164,11 +164,11 @@ Research findings saved to `{worktree}/.devflow/docs/research/{topic-slug}/{YYYY
|
|
|
164
164
|
```
|
|
165
165
|
/research (orchestrator)
|
|
166
166
|
│
|
|
167
|
-
<!--
|
|
167
|
+
<!-- curation:on -->
|
|
168
168
|
├─ Phase 1: Load Decisions (Orchestrator-Local)
|
|
169
|
-
<!--
|
|
169
|
+
<!-- curation:off -->
|
|
170
170
|
├─ Phase 1: Load Context (Orchestrator-Local)
|
|
171
|
-
<!--
|
|
171
|
+
<!-- curation:end -->
|
|
172
172
|
│
|
|
173
173
|
├─ Phase 2: Requirements
|
|
174
174
|
│ └─ Infer 2-5 research types from question
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
description: Process review issues - validate with Triage agent, fix with Code agent, verify with Validate agent
|
|
3
3
|
output-dir: dist/commands
|
|
4
4
|
---
|
|
5
|
-
@import { knowledge_load,
|
|
5
|
+
@import { knowledge_load, knowledge_writeback_after_load } from "./_partials/_knowledge.mds"
|
|
6
6
|
@import { decisions_load } from "./_partials/_decisions.mds"
|
|
7
7
|
@import { evidence_policy } from "./_partials/_evidence_policy.mds"
|
|
8
8
|
@import { publication_gate } from "./_partials/_publication.mds"
|
|
@@ -91,25 +91,25 @@ For each worktree:
|
|
|
91
91
|
|
|
92
92
|
Set `TARGET_DIR` to the selected review or bug-analysis directory path, and `TARGET_DIR_REL` to the same directory relative to the worktree root (`.devflow/docs/reviews/…` or `.devflow/docs/bug-analysis/…`) — the only form of it that may reach a PR comment.
|
|
93
93
|
|
|
94
|
-
<!--
|
|
94
|
+
<!-- curation:on -->
|
|
95
95
|
#### Step 0d: Load Project Decisions
|
|
96
|
-
<!--
|
|
96
|
+
<!-- curation:off -->
|
|
97
97
|
#### Step 0d: Load Project Context
|
|
98
|
-
<!--
|
|
98
|
+
<!-- curation:end -->
|
|
99
99
|
|
|
100
|
-
<!--
|
|
101
|
-
**Produces:** DECISIONS_CONTEXT, FEATURE_KNOWLEDGE, FEATURE_KNOWLEDGE_RULES, EVIDENCE_POLICY, ISSUE_REQUIRED, APPLY_CONVENTIONS, REQUIRE_NON_AUTHOR_APPROVAL, REVIEW_PUBLICATION, RESOLUTION_TS
|
|
102
|
-
<!--
|
|
103
|
-
**Produces:** FEATURE_KNOWLEDGE, FEATURE_KNOWLEDGE_RULES, EVIDENCE_POLICY, ISSUE_REQUIRED, APPLY_CONVENTIONS, REQUIRE_NON_AUTHOR_APPROVAL, REVIEW_PUBLICATION, RESOLUTION_TS
|
|
104
|
-
<!--
|
|
100
|
+
<!-- curation:on -->
|
|
101
|
+
**Produces:** DECISIONS_CONTEXT, FEATURE_KNOWLEDGE, FEATURE_KNOWLEDGE_RULES, EVIDENCE_POLICY, ISSUE_REQUIRED, APPLY_CONVENTIONS, REQUIRE_NON_AUTHOR_APPROVAL, REVIEW_PUBLICATION, RESOLUTION_TS, GATE_LEVEL
|
|
102
|
+
<!-- curation:off -->
|
|
103
|
+
**Produces:** FEATURE_KNOWLEDGE, FEATURE_KNOWLEDGE_RULES, EVIDENCE_POLICY, ISSUE_REQUIRED, APPLY_CONVENTIONS, REQUIRE_NON_AUTHOR_APPROVAL, REVIEW_PUBLICATION, RESOLUTION_TS, GATE_LEVEL
|
|
104
|
+
<!-- curation:end -->
|
|
105
105
|
|
|
106
106
|
{{settings.settings_resolve()}}
|
|
107
107
|
|
|
108
108
|
{{decisions_load()}}
|
|
109
|
-
<!--
|
|
109
|
+
<!-- curation:on -->
|
|
110
110
|
This produces a compact index of active ADR/PF entries written at render time — Deprecated/Superseded entries are already stripped. Pass `DECISIONS_CONTEXT` to the Triage agent in Phase 2 and to Code agents in Phase 4.
|
|
111
111
|
|
|
112
|
-
<!--
|
|
112
|
+
<!-- curation:end -->
|
|
113
113
|
{{knowledge_load()}}
|
|
114
114
|
|
|
115
115
|
Pass `FEATURE_KNOWLEDGE` to the Triage agent in Phase 2.
|
|
@@ -124,6 +124,12 @@ Resolve this per worktree — unlike the evidence policy above, the settings lin
|
|
|
124
124
|
|
|
125
125
|
Set it per worktree, from that worktree's lens, and pass that worktree's `COMPLIANCE_DIRECTIVE` to each of its Code and Fix spawns, on a line of its own.
|
|
126
126
|
|
|
127
|
+
**Gate level.** Each worktree keeps its own `GATE_LEVEL`. When any is `standard` or `lean`, once per run, run `d="${CLAUDE_CONFIG_DIR:-}"; case "$d" in /*) ;; *) d="$HOME/.claude" ;; esac; printf '%s\n' "$d"` in Bash and Read `<that directory>/skills/devflow:agent-references/references/commands/resolve-levels.md` with the Read tool, and apply each row to the phase it names, as the reference says.
|
|
128
|
+
|
|
129
|
+
- No row or rule overrides the next two lines.
|
|
130
|
+
- If the Read fails, or the file has no `## Phases` heading with the `| Phase | standard | lean |` header, or a row breaks its grammar, apply no row in any worktree, keep every `GATE_LEVEL` and say `level reference unreadable: no level rows applied`.
|
|
131
|
+
- No level changes the Triage security gate or the ESCALATED route. The Verification Gate, the CI gate and the compliance directive run at every level.
|
|
132
|
+
|
|
127
133
|
**Mint `RESOLUTION_TS` once per run:** `date -u +%Y-%m-%dT%H:%M:%SZ`. Every worktree reuses it — the resolution comment's dedup marker is searched per PR, so one run key keeps a retry of this run deduplicated while the next /resolve on the same PR posts. Phase 5 writes it as the summary's `**Date**:` and Phase 9b-2 passes it, so the local file and the posted marker agree.
|
|
128
134
|
|
|
129
135
|
### Phase 1: Parse Issues
|
|
@@ -176,11 +182,11 @@ Parse `THREAD_MAP` from Git agent output. If Git agent returns `TRACEABILITY: DE
|
|
|
176
182
|
### Phase 2: Global Triage
|
|
177
183
|
|
|
178
184
|
**Produces:** TRIAGE_RESULTS
|
|
179
|
-
<!--
|
|
185
|
+
<!-- curation:on -->
|
|
180
186
|
**Requires:** ISSUES, DIFF_FILES, DECISIONS_CONTEXT, FEATURE_KNOWLEDGE, PR_DESCRIPTION
|
|
181
|
-
<!--
|
|
187
|
+
<!-- curation:off -->
|
|
182
188
|
**Requires:** ISSUES, DIFF_FILES, FEATURE_KNOWLEDGE, PR_DESCRIPTION
|
|
183
|
-
<!--
|
|
189
|
+
<!-- curation:end -->
|
|
184
190
|
|
|
185
191
|
Spawn a single global Triage agent for ALL issues:
|
|
186
192
|
|
|
@@ -189,15 +195,15 @@ Agent(subagent_type="Triage"):
|
|
|
189
195
|
"ISSUES: {all_issues}
|
|
190
196
|
DIFF_FILES: {diff_files}
|
|
191
197
|
WORKTREE_PATH: {worktree_path} (omit if cwd)
|
|
192
|
-
<!--
|
|
198
|
+
<!-- curation:on -->
|
|
193
199
|
DECISIONS_CONTEXT: {decisions_context}
|
|
194
|
-
<!--
|
|
200
|
+
<!-- curation:end -->
|
|
195
201
|
FEATURE_KNOWLEDGE: {feature_knowledge}
|
|
196
202
|
PR_DESCRIPTION: <pr-description>{pr_description}</pr-description>
|
|
197
203
|
Triage every issue: collapse duplicates first, then apply the blast-radius disposition matrix to each group's primary. Assign exactly one verdict per issue.
|
|
198
|
-
<!--
|
|
204
|
+
<!-- curation:on -->
|
|
199
205
|
Follow devflow:apply-decisions to Read full ADR/PF bodies on demand.
|
|
200
|
-
<!--
|
|
206
|
+
<!-- curation:end -->
|
|
201
207
|
Follow devflow:apply-feature-knowledge for FEATURE_KNOWLEDGE."
|
|
202
208
|
```
|
|
203
209
|
|
|
@@ -210,10 +216,10 @@ Wait for Triage agent to complete before proceeding. Parse verdict ledger from T
|
|
|
210
216
|
- **TECH_DEBT**: Architectural overhaul only — LAST RESORT
|
|
211
217
|
- **DUPLICATE**: Collapsed duplicate issue — carries `duplicate_of: <primary-id>` referencing the non-DUPLICATE primary; inherits the primary's outcome
|
|
212
218
|
|
|
213
|
-
<!--
|
|
219
|
+
<!-- curation:on -->
|
|
214
220
|
Collect every decision and pitfall the Triage agent's Reasoning columns state, in its words — the resolution summary is posted, so it never carries an ADR/PF ID.
|
|
215
221
|
|
|
216
|
-
<!--
|
|
222
|
+
<!-- curation:end -->
|
|
217
223
|
**Triage agent completeness assertion:** Verify the parsed ledger against ISSUES before proceeding:
|
|
218
224
|
1. Every issue `id` from ISSUES must appear in exactly one verdict bucket — none may vanish, none may appear in multiple buckets. DUPLICATE is a valid bucket; a valid DUPLICATE entry must name its `duplicate_of` primary (the `Duplicate Of` column of the ledger's DUPLICATE table) and that primary must be a non-DUPLICATE issue id. A missing `duplicate_of` or one that chains to another DUPLICATE is a **Triage agent failure** (retry-then-abort as below).
|
|
219
225
|
2. If the Triage agent output is empty, contains a skill re-entrancy guard string (e.g., contains `already running`), or is missing any issue IDs from ISSUES: treat as a **Triage agent failure**:
|
|
@@ -227,21 +233,21 @@ Collect every decision and pitfall the Triage agent's Reasoning columns state, i
|
|
|
227
233
|
**Produces:** BATCHES
|
|
228
234
|
**Requires:** TRIAGE_RESULTS
|
|
229
235
|
|
|
230
|
-
If FIX_NOW list is empty: skip to Phase 5
|
|
236
|
+
If FIX_NOW list is empty: skip to Phase 5, then run Phases 9, 9b, 9c and 10.
|
|
231
237
|
|
|
232
238
|
Otherwise, batch FIX_NOW issues for Code agent execution. **DUPLICATE issues are never dispatched** — they inherit the primary's outcome:
|
|
233
|
-
- **Same-file issues** → one batch (one Code agent per file
|
|
239
|
+
- **Same-file issues** → one batch (one Code agent per file)
|
|
234
240
|
- **Distinct-file issues** → parallel Code agents
|
|
235
241
|
- **Max 5 issues per batch** — chunk large sets
|
|
236
242
|
|
|
237
243
|
### Phase 4: Fix (Code agent × N)
|
|
238
244
|
|
|
239
245
|
**Produces:** CODE_AGENT_RESULTS
|
|
240
|
-
<!--
|
|
246
|
+
<!-- curation:on -->
|
|
241
247
|
**Requires:** BATCHES, DECISIONS_CONTEXT, FEATURE_KNOWLEDGE
|
|
242
|
-
<!--
|
|
248
|
+
<!-- curation:off -->
|
|
243
249
|
**Requires:** BATCHES, FEATURE_KNOWLEDGE
|
|
244
|
-
<!--
|
|
250
|
+
<!-- curation:end -->
|
|
245
251
|
|
|
246
252
|
For each batch, spawn Code agent with `OPERATION: issue-fix` and `PUSH: false`:
|
|
247
253
|
|
|
@@ -253,9 +259,9 @@ ISSUES: {fix_now_issues_in_batch}
|
|
|
253
259
|
SCOPE: {risk_tier_per_issue}
|
|
254
260
|
PUSH: false
|
|
255
261
|
WORKTREE_PATH: {worktree_path} (omit if cwd)
|
|
256
|
-
<!--
|
|
262
|
+
<!-- curation:on -->
|
|
257
263
|
DECISIONS_CONTEXT: {decisions_context}
|
|
258
|
-
<!--
|
|
264
|
+
<!-- curation:end -->
|
|
259
265
|
FEATURE_KNOWLEDGE: {feature_knowledge}
|
|
260
266
|
{COMPLIANCE_DIRECTIVE}
|
|
261
267
|
Fix only the listed pre-classified FIX_NOW issues. Do not re-litigate dispositions.
|
|
@@ -272,9 +278,9 @@ Collect from each Code agent:
|
|
|
272
278
|
### Phase 5: Write resolution-summary.md
|
|
273
279
|
|
|
274
280
|
**Produces:** RESOLUTION_FILE (early write for compaction safety)
|
|
275
|
-
**Requires:** TRIAGE_RESULTS, CODE_AGENT_RESULTS, TARGET_DIR, TARGET_DIR_REL, BRANCH_INFO, RESOLUTION_TS
|
|
281
|
+
**Requires:** TRIAGE_RESULTS, CODE_AGENT_RESULTS, TARGET_DIR, TARGET_DIR_REL, BRANCH_INFO, RESOLUTION_TS, GATE_LEVEL
|
|
276
282
|
|
|
277
|
-
**Immediately write `resolution-summary.md`** to `{TARGET_DIR}` using the Write tool. Do this now — not in Phase 9 — while results are fresh in context.
|
|
283
|
+
**Immediately write `resolution-summary.md`** to `{TARGET_DIR}` using the Write tool. Do this now — not in Phase 9 — while results are fresh in context.
|
|
278
284
|
|
|
279
285
|
Set `Tracked` for FIX_SEPARATE and TECH_DEBT items to `(pending)` — to be backfilled after Phase 9 manage-debt (or `TRACEABILITY: DEGRADED ({reason})` if manage-debt degrades).
|
|
280
286
|
|
|
@@ -285,7 +291,7 @@ Use the template from the Output Artifact section below.
|
|
|
285
291
|
### Phase 6: Polish
|
|
286
292
|
|
|
287
293
|
**Produces:** POLISH_RESULT
|
|
288
|
-
**Requires:** CODE_AGENT_RESULTS
|
|
294
|
+
**Requires:** CODE_AGENT_RESULTS, GATE_LEVEL
|
|
289
295
|
|
|
290
296
|
If any fixes were made, spawn Polish agent to refine the changed code:
|
|
291
297
|
|
|
@@ -329,9 +335,9 @@ Run build, typecheck, lint, test. Report pass/fail with failure details."
|
|
|
329
335
|
SCOPE: Fix only the listed failures, no other changes
|
|
330
336
|
PUSH: false
|
|
331
337
|
WORKTREE_PATH: {worktree_path} (omit if cwd)
|
|
332
|
-
<!--
|
|
338
|
+
<!-- curation:on -->
|
|
333
339
|
DECISIONS_CONTEXT: {decisions_context}
|
|
334
|
-
<!--
|
|
340
|
+
<!-- curation:end -->
|
|
335
341
|
{COMPLIANCE_DIRECTIVE}"
|
|
336
342
|
```
|
|
337
343
|
- Loop back to re-validate
|
|
@@ -349,7 +355,7 @@ git -C {worktree} push
|
|
|
349
355
|
|
|
350
356
|
**If `fork_no_push` is set:** do not push. Record `Push: skipped — cannot push to fork` under `## Verification`, and skip Phase 8 — no pushed commit exists for CI to check.
|
|
351
357
|
|
|
352
|
-
**Route after push:** VERIFICATION_STATUS = PASS → continue to Phase 8 (CI gate).
|
|
358
|
+
**Route after push:** VERIFICATION_STATUS = PASS → continue to Phase 8 (CI gate). FAILED or SKIPPED → skip Phase 8 and continue with Phase 9 and the later phases in order.
|
|
353
359
|
|
|
354
360
|
### Phase 8: CI Status Gate (Conditional)
|
|
355
361
|
|
|
@@ -380,11 +386,11 @@ Phase 7 has pushed already, so this is a no-op unless the head moved since. `exi
|
|
|
380
386
|
3. **If NO_PR or NO_CI** → skip: "No PR/CI configured, skipping CI validation." Proceed to next phase.
|
|
381
387
|
4. **If PENDING** and fewer than 3 waits have run → wait again (step 1). After the third wait → report "CI still running — verify manually before merging" and proceed.
|
|
382
388
|
5. **If INDETERMINATE** and fewer than 3 waits have run → wait again (step 1). After the third wait → report "CI status unknown — verify manually before merging" and proceed.
|
|
383
|
-
<!--
|
|
389
|
+
<!-- curation:on -->
|
|
384
390
|
6. **If FAILING** and fewer than 2 fixes have run → report the failing checks from the line. Spawn `Agent(subagent_type="Fix")` whose prompt opens with `OPERATION: ci-fix`, with `COMPLIANCE_DIRECTIVE` (when it is not empty), `CI_FAILURES`, `DECISIONS_CONTEXT` and `PUSH: false`; `CI_FAILURES` holds the failing-check names from the line and nothing else, because the Fix agent fetches the full names and reads the logs itself and this command reads none. After a fix, push with the command above and, if a wait remains, wait again (step 1); a failed push records `TRACEABILITY: DEGRADED (ci push failed)`, reports "CI status unknown — verify manually before merging" and stops waiting. After the second fix still FAILING → report the failing checks and proceed.
|
|
385
|
-
<!--
|
|
391
|
+
<!-- curation:off -->
|
|
386
392
|
6. **If FAILING** and fewer than 2 fixes have run → report the failing checks from the line. Spawn `Agent(subagent_type="Fix")` whose prompt opens with `OPERATION: ci-fix`, with `COMPLIANCE_DIRECTIVE` (when it is not empty), `CI_FAILURES` and `PUSH: false`; `CI_FAILURES` holds the failing-check names from the line and nothing else, because the Fix agent fetches the full names and reads the logs itself and this command reads none. After a fix, push with the command above and, if a wait remains, wait again (step 1); a failed push records `TRACEABILITY: DEGRADED (ci push failed)`, reports "CI status unknown — verify manually before merging" and stops waiting. After the second fix still FAILING → report the failing checks and proceed.
|
|
387
|
-
<!--
|
|
393
|
+
<!-- curation:end -->
|
|
388
394
|
7. **Budget**: at most 3 waits and 2 fixes in all, per worktree. When one is spent, report the current status and proceed.
|
|
389
395
|
<!-- /PATTERN: ci-status-gate -->
|
|
390
396
|
|
|
@@ -523,7 +529,7 @@ If the script prints a `TRACEABILITY: DEGRADED` line: warn, proceed to Phase 10.
|
|
|
523
529
|
|
|
524
530
|
### Phase 10: Report
|
|
525
531
|
|
|
526
|
-
**Requires:** BRANCH_INFO, TARGET_DIR, PR_COMMENT, THREAD_RESOLUTION_RESULT
|
|
532
|
+
**Requires:** BRANCH_INFO, TARGET_DIR, PR_COMMENT, THREAD_RESOLUTION_RESULT, GATE_LEVEL
|
|
527
533
|
|
|
528
534
|
The resolution summary was already written to `{TARGET_DIR}/resolution-summary.md` in Phase 5 (updated by Phase 7, Phase 9 and Phase 9b-1). Display results to the user:
|
|
529
535
|
|
|
@@ -533,6 +539,7 @@ The resolution summary was already written to `{TARGET_DIR}/resolution-summary.m
|
|
|
533
539
|
**Branch**: {branch}
|
|
534
540
|
**Reviews Processed**: {n} reports from {TARGET_DIR}
|
|
535
541
|
**Total Issues**: {n}
|
|
542
|
+
**Gate level**: {GATE_LEVEL, with any level note}
|
|
536
543
|
|
|
537
544
|
### Results
|
|
538
545
|
| Outcome | Count |
|
|
@@ -576,7 +583,7 @@ Final gate: {PASS | FAILED after N attempts}
|
|
|
576
583
|
|
|
577
584
|
In multi-worktree mode, report results per worktree with aggregate summary.
|
|
578
585
|
|
|
579
|
-
{{
|
|
586
|
+
{{knowledge_writeback_after_load()}}
|
|
580
587
|
|
|
581
588
|
## Architecture
|
|
582
589
|
|
|
@@ -584,15 +591,15 @@ In multi-worktree mode, report results per worktree with aggregate summary.
|
|
|
584
591
|
/resolve (orchestrator - spawns agents only)
|
|
585
592
|
│
|
|
586
593
|
├─ Phase 0: Worktree Discovery & Pre-flight
|
|
587
|
-
├─ Phase 1: Parse issues from TARGET_DIR
|
|
594
|
+
├─ Phase 1: Parse issues from TARGET_DIR
|
|
588
595
|
├─ Phase 1b: Fetch external threads (evidence policy required)
|
|
589
596
|
├─ Phase 2: Global Triage [Triage agent, opus, single agent]
|
|
590
|
-
├─ Phase 3: Batch FIX_NOW issues
|
|
591
|
-
├─ Phase 4: Fix [Code agent × N
|
|
597
|
+
├─ Phase 3: Batch FIX_NOW issues
|
|
598
|
+
├─ Phase 4: Fix [Code agent × N]
|
|
592
599
|
├─ Phase 5: Write resolution-summary.md (compaction safety; Tracked = "(pending)" or "(pending — TRACEABILITY: DEGRADED)" if manage-debt degrades)
|
|
593
|
-
├─ Phase 6: Polish
|
|
600
|
+
├─ Phase 6: Polish
|
|
594
601
|
├─ Phase 7: Verification Gate [Validate agent, haiku] + push + Fix agent validation-fix loop ≤2
|
|
595
|
-
├─ Phase 8: CI Status Gate (conditional
|
|
602
|
+
├─ Phase 8: CI Status Gate (conditional)
|
|
596
603
|
├─ Phase 9: Git agent (manage-debt) — FIX_SEPARATE + TECH_DEBT → backfill Tracked={ISSUE_REF} (or TRACEABILITY: DEGRADED on failure)
|
|
597
604
|
│
|
|
598
605
|
├─ Phase 9b: Thread resolution + resolution comment
|
|
@@ -611,10 +618,9 @@ In multi-worktree mode, report results per worktree with aggregate summary.
|
|
|
611
618
|
| Case | Handling |
|
|
612
619
|
|------|----------|
|
|
613
620
|
| No reviews exist | Check bug-analysis fallback (Step 0c-5b); if also absent, error and suggest `/code-review` or `/bug-analysis` |
|
|
614
|
-
| All false positives | Normal completion, report shows 0 fixes |
|
|
615
621
|
| Fix attempt fails | Revert changes, mark BLOCKED, continue others |
|
|
616
622
|
| Issue dependencies | Sequential chain, skip dependents if predecessor blocked |
|
|
617
|
-
| No
|
|
623
|
+
| No issues parsed | Report "No issues to resolve" |
|
|
618
624
|
| Latest review already resolved | Check bug-analysis fallback (Step 0c-5b); if also absent, skip worktree and suggest `/code-review` or `/bug-analysis` |
|
|
619
625
|
| `--review {timestamp}` in multi-worktree mode | Not supported — use `--path` + `--review` to target specific worktree + review |
|
|
620
626
|
| gh/GitHub absent | manage-debt degrades (`TRACEABILITY: DEGRADED ({reason})`); Tracked stays `(pending — TRACEABILITY: DEGRADED ({reason}))` — recorded, not dropped |
|
|
@@ -629,9 +635,8 @@ In multi-worktree mode, report results per worktree with aggregate summary.
|
|
|
629
635
|
## Principles
|
|
630
636
|
|
|
631
637
|
1. **Orchestration only** - Command spawns agents, doesn't do git/resolve work itself
|
|
632
|
-
2. **
|
|
633
|
-
3. **
|
|
634
|
-
4. **Traceability-aware** - Policy-gated ops (thread fetch/resolve, merge readiness) are skipped cleanly when the evidence policy does not ask for them; resolution comment (Phase 9b-2) is always-on; test-plan evidence is re-verified (≤1 Test agent) and refreshed only when this run moved the head (Steps 9b-0, 9b-3)
|
|
638
|
+
2. **Git agent for git work** - All git operations go through Git agent; the CI wait, the evidence refresh and the merge-readiness check are inline scripts (plumbing, no model work)
|
|
639
|
+
3. **Traceability-aware** - Policy-gated ops (thread fetch/resolve, merge readiness) are skipped cleanly when the evidence policy does not ask for them; resolution comment (Phase 9b-2) is always-on; test-plan evidence is re-verified (≤1 Test agent) and refreshed only when this run moved the head (Steps 9b-0, 9b-3)
|
|
635
640
|
|
|
636
641
|
## Output Artifact
|
|
637
642
|
|
|
@@ -644,15 +649,16 @@ Written in Phase 5 (Collect Results) to `{TARGET_DIR}/resolution-summary.md`:
|
|
|
644
649
|
**Date**: {RESOLUTION_TS}
|
|
645
650
|
**Review**: {TARGET_DIR_REL}
|
|
646
651
|
**Command**: /resolve
|
|
652
|
+
**Gate level**: {GATE_LEVEL}
|
|
647
653
|
|
|
648
|
-
<!--
|
|
654
|
+
<!-- curation:on -->
|
|
649
655
|
## Decisions Citations
|
|
650
656
|
|
|
651
657
|
- {decision applied or pitfall avoided, stated in words — never its ID} — {batch-id}, {issue-id}
|
|
652
658
|
|
|
653
659
|
(Omit section if no citations were made)
|
|
654
660
|
|
|
655
|
-
<!--
|
|
661
|
+
<!-- curation:end -->
|
|
656
662
|
## Statistics
|
|
657
663
|
| Metric | Value |
|
|
658
664
|
|--------|-------|
|