devflow-kit 3.7.0 → 3.9.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 +479 -1
- package/README.md +15 -15
- package/dist/agents/code.md +6 -8
- package/dist/agents/design.md +1 -1
- package/dist/agents/fix.md +7 -8
- package/dist/agents/git.md +3 -3
- package/dist/agents/harden.md +1 -1
- package/dist/agents/refactor.md +2 -4
- package/dist/agents/review.md +4 -4
- package/dist/agents/skim.md +2 -2
- package/dist/agents/triage.md +9 -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/curation.js +808 -0
- package/dist/cli/commands/gate-level-prompts.js +428 -0
- package/dist/cli/commands/gates.js +35 -11
- package/dist/cli/commands/init-seed.js +11 -8
- package/dist/cli/commands/init.js +244 -57
- package/dist/cli/commands/memory.js +60 -13
- package/dist/cli/commands/prompt-io.js +37 -0
- package/dist/cli/commands/uninstall.js +157 -17
- package/dist/cli.js +2 -2
- package/dist/commands/bug-analysis.md +25 -36
- package/dist/commands/code-review.md +40 -44
- package/dist/commands/debug.md +5 -5
- package/dist/commands/dynamic-build.md +26 -25
- 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 +53 -82
- package/dist/commands/plan.md +6 -6
- package/dist/commands/release.md +5 -5
- package/dist/commands/research.md +6 -6
- package/dist/commands/resolve.md +39 -41
- package/dist/commands/self-review.md +5 -13
- package/dist/core/area-pause-notice.js +44 -0
- 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 +35 -0
- package/dist/core/curation-move.js +35 -0
- package/dist/core/curation-queue-cleanup.js +135 -0
- package/dist/core/curation-store.js +99 -0
- package/dist/core/{learning-variants.js → curation-variants.js} +65 -41
- package/dist/core/echo-value.js +11 -5
- package/dist/core/evidence-policy.js +11 -9
- package/dist/core/feature-switch.js +95 -19
- package/dist/core/fs-atomic.js +1 -1
- package/dist/core/gate-level.js +10 -2
- 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 +58 -14
- package/dist/core/migrations.js +1 -13
- package/dist/core/observations.js +2 -2
- package/dist/core/plugins.js +19 -19
- 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 +159 -0
- package/dist/core/tracker.js +1 -1
- package/dist/{learning-off → curation-off}/agents/code.md +6 -8
- package/dist/{learning-off → curation-off}/agents/fix.md +7 -8
- package/dist/{learning-off → curation-off}/agents/refactor.md +2 -4
- package/dist/{learning-off → curation-off}/agents/review.md +3 -3
- package/dist/{learning-off → curation-off}/agents/triage.md +8 -1
- package/dist/{learning-off → curation-off}/commands/bug-analysis.md +20 -31
- package/dist/{learning-off → curation-off}/commands/code-review.md +37 -41
- package/dist/{learning-off → curation-off}/commands/debug.md +2 -2
- package/dist/{learning-off → curation-off}/commands/dynamic-build.md +23 -22
- package/dist/{learning-off → curation-off}/commands/explore.md +2 -2
- package/dist/{learning-off → curation-off}/commands/implement.md +50 -79
- package/dist/{learning-off → curation-off}/commands/plan.md +2 -2
- package/dist/{learning-off → curation-off}/commands/resolve.md +36 -38
- package/dist/{learning-off → curation-off}/commands/self-review.md +2 -10
- package/dist/hud/components/{learning-counts.js → curation-counts.js} +63 -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/post-resolution-summary.md +12 -11
- package/dist/skills/git/references/pr/post-review-summary.md +12 -11
- package/dist/skills/git/references/pr/update-pr-evidence.md +2 -2
- package/dist/skills/git/references/pr/validate-branch.md +8 -5
- package/dist/skills/git/references/publication-gate.md +6 -7
- package/dist/skills/git/references/tracker/github/ensure-pr-ready.md +13 -5
- package/dist/skills/git/references/tracker/github/manage-debt.md +6 -2
- package/dist/skills/git/references/tracker/jira/ensure-pr-ready.md +13 -5
- package/dist/skills/git/references/tracker/jira/manage-debt.md +6 -2
- package/dist/skills/git/references/tracker/linear/ensure-pr-ready.md +13 -5
- package/dist/skills/git/references/tracker/linear/manage-debt.md +6 -2
- package/dist/targets/claude-code/{learning-install.js → curation-install.js} +85 -65
- 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 +11 -11
- package/src/assets/agents/code.mds +6 -6
- package/src/assets/agents/curate.md +8 -8
- package/src/assets/agents/debug.mds +6 -6
- package/src/assets/agents/design.mds +18 -18
- package/src/assets/agents/evaluate.md +6 -12
- package/src/assets/agents/fix.mds +7 -6
- package/src/assets/agents/git.mds +3 -3
- 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 +43 -43
- package/src/assets/agents/skim.mds +11 -11
- package/src/assets/agents/triage.mds +29 -22
- package/src/assets/agents/validate.md +30 -50
- package/src/assets/commands/_partials/_decisions.mds +22 -20
- 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 +7 -7
- package/src/assets/commands/bug-analysis.mds +37 -48
- package/src/assets/commands/code-review.mds +53 -57
- package/src/assets/commands/debug.mds +14 -14
- package/src/assets/commands/dynamic-build.mds +38 -37
- 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 +77 -98
- package/src/assets/commands/plan.mds +27 -27
- package/src/assets/commands/release.mds +12 -12
- package/src/assets/commands/research.mds +19 -19
- package/src/assets/commands/resolve.mds +66 -60
- package/src/assets/commands/self-review.mds +20 -20
- package/src/assets/mds/git/_ops.mds +9 -2
- package/src/assets/mds/git/_ops_pr.mds +21 -11
- package/src/assets/mds/git/_ops_steps.mds +20 -4
- package/src/assets/mds/git/_pr.mds +21 -18
- package/src/assets/mds/git/_references.mds +6 -7
- package/src/assets/mds/tracker/_github.mds +1 -4
- package/src/assets/mds/tracker/_jira.mds +1 -4
- package/src/assets/mds/tracker/_linear.mds +1 -4
- package/src/assets/rules/quality.md +1 -0
- package/src/assets/scripts/ci-wait.cjs +389 -92
- package/src/assets/scripts/hooks/background-memory-update +81 -3
- 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 +176 -51
- package/src/assets/scripts/hooks/json-parse +1 -1
- package/src/assets/scripts/hooks/lib/curation-move.cjs +1582 -0
- package/src/assets/scripts/hooks/lib/{learning-store.cjs → curation-store.cjs} +308 -122
- 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 +42 -22
- package/src/assets/scripts/hooks/lib/tracked-areas.cjs +452 -0
- package/src/assets/scripts/hooks/memory-permission +10 -2
- package/src/assets/scripts/hooks/memory-worker +12 -1
- package/src/assets/scripts/hooks/pre-compact-memory +17 -16
- package/src/assets/scripts/hooks/queue-append +444 -102
- package/src/assets/scripts/hooks/resolve-project-root +2 -2
- package/src/assets/scripts/hooks/session-start-context +198 -72
- package/src/assets/scripts/hooks/session-start-memory +42 -43
- package/src/assets/scripts/lib/project-config.cjs +12 -5
- package/src/assets/scripts/pr-evidence.cjs +5 -2
- package/src/assets/scripts/resolve-base.cjs +1043 -0
- package/src/assets/scripts/resolve-settings.cjs +283 -45
- package/src/assets/scripts/verify-evidence.cjs +307 -75
- package/src/assets/skills/agent-references/SKILL.md +11 -2
- package/src/assets/skills/agent-references/references/commands/implement-levels.md +29 -0
- package/src/assets/skills/agent-references/references/commands/implement-revalidate.md +6 -4
- package/src/assets/skills/agent-references/references/commands/resolve-levels.md +25 -0
- package/src/assets/skills/agent-references/references/synthesize/review.md +4 -4
- package/src/assets/skills/agent-references/references/triage/severity-tiers.md +43 -0
- package/src/assets/skills/agent-references/references/validate/passed-alone.md +14 -0
- 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/cli/commands/learning.js +0 -554
- 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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
description: Execute a single task through implementation, quality gates, and PR creation - accepts plan documents, issues, or task descriptions
|
|
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 { docs_root } from "./_partials/_docs_root.mds"
|
|
8
8
|
@import { evidence_policy } from "./_partials/_evidence_policy.mds"
|
|
@@ -13,7 +13,7 @@ output-dir: dist/commands
|
|
|
13
13
|
@import "./_partials/_settings.mds" as settings
|
|
14
14
|
# Implement Command
|
|
15
15
|
|
|
16
|
-
Orchestrate a single task through implementation by spawning specialized agents.
|
|
16
|
+
Orchestrate a single task through implementation by spawning specialized agents.
|
|
17
17
|
|
|
18
18
|
## Usage
|
|
19
19
|
|
|
@@ -40,8 +40,6 @@ $ARGUMENTS
|
|
|
40
40
|
|
|
41
41
|
{{issue_ref_grammar()}}
|
|
42
42
|
|
|
43
|
-
> **Tip**: For best results, run `/plan` first to produce a design artifact, then pass it to `/implement`.
|
|
44
|
-
|
|
45
43
|
## Phases
|
|
46
44
|
|
|
47
45
|
### Re-validation Continuation Path
|
|
@@ -50,13 +48,13 @@ When the user explicitly asks to re-validate, re-check, or re-run quality gates
|
|
|
50
48
|
|
|
51
49
|
### Phase 1: Setup
|
|
52
50
|
|
|
53
|
-
<!--
|
|
54
|
-
**Produces:** TASK_ID, BASE_BRANCH, EXECUTION_PLAN, DECISIONS_CONTEXT, FEATURE_KNOWLEDGE, FEATURE_KNOWLEDGE_RULES, PR_DESCRIPTION_GUIDANCE, ISSUE_NUMBER, ISSUE_PR_LINK, EVIDENCE_POLICY, ISSUE_REQUIRED, APPLY_CONVENTIONS, REQUIRE_NON_AUTHOR_APPROVAL, PR_EXCEPTIONS, TEST_PLAN, EVIDENCE_FILE, PR_TEST_PLAN_BLOCK, REVIEW_PUBLICATION
|
|
55
|
-
<!--
|
|
56
|
-
**Produces:** TASK_ID, BASE_BRANCH, EXECUTION_PLAN, FEATURE_KNOWLEDGE, FEATURE_KNOWLEDGE_RULES, PR_DESCRIPTION_GUIDANCE, ISSUE_NUMBER, ISSUE_PR_LINK, EVIDENCE_POLICY, ISSUE_REQUIRED, APPLY_CONVENTIONS, REQUIRE_NON_AUTHOR_APPROVAL, PR_EXCEPTIONS, TEST_PLAN, EVIDENCE_FILE, PR_TEST_PLAN_BLOCK, REVIEW_PUBLICATION
|
|
57
|
-
<!--
|
|
51
|
+
<!-- curation:on -->
|
|
52
|
+
**Produces:** TASK_ID, BASE_BRANCH, BASE_REF, EXECUTION_PLAN, DECISIONS_CONTEXT, FEATURE_KNOWLEDGE, FEATURE_KNOWLEDGE_RULES, PR_DESCRIPTION_GUIDANCE, ISSUE_NUMBER, ISSUE_PR_LINK, EVIDENCE_POLICY, ISSUE_REQUIRED, APPLY_CONVENTIONS, REQUIRE_NON_AUTHOR_APPROVAL, PR_EXCEPTIONS, TEST_PLAN, EVIDENCE_FILE, PR_TEST_PLAN_BLOCK, REVIEW_PUBLICATION, GATE_LEVEL
|
|
53
|
+
<!-- curation:off -->
|
|
54
|
+
**Produces:** TASK_ID, BASE_BRANCH, BASE_REF, EXECUTION_PLAN, FEATURE_KNOWLEDGE, FEATURE_KNOWLEDGE_RULES, PR_DESCRIPTION_GUIDANCE, ISSUE_NUMBER, ISSUE_PR_LINK, EVIDENCE_POLICY, ISSUE_REQUIRED, APPLY_CONVENTIONS, REQUIRE_NON_AUTHOR_APPROVAL, PR_EXCEPTIONS, TEST_PLAN, EVIDENCE_FILE, PR_TEST_PLAN_BLOCK, REVIEW_PUBLICATION, GATE_LEVEL
|
|
55
|
+
<!-- curation:end -->
|
|
58
56
|
|
|
59
|
-
Record the current branch name as `BASE_BRANCH`. Stop the run unless it matches `^[A-Za-z0-9._
|
|
57
|
+
Record the current branch name as `BASE_BRANCH`. Stop the run unless it matches `^(?![-#]|origin\/|(?:@|(?:FETCH_|ORIG_|MERGE_)?HEAD)$)(?!.*\.\.)[A-Za-z0-9._\/+@,#-]{1,200}$` (judge the match by reading; never pass the value to a command), telling the user it allows only ASCII letters, digits and `._/+@,#-`, at most 200; no leading `-` or `#`, no `origin/` prefix, no `..`, not `@` or a HEAD name.
|
|
60
58
|
|
|
61
59
|
{{docs_root()}}
|
|
62
60
|
|
|
@@ -75,7 +73,7 @@ If `PR_DESCRIPTION_GUIDANCE` was not set above (non-plan paths: issue input or t
|
|
|
75
73
|
|
|
76
74
|
**Empty input.** When `COMMAND_INPUT` is empty — a plan handoff arrives this way, with the plan already in the conversation — there is no argument to name the branch from, and the Git agent sees none of this conversation. Write the description yourself: one line, taken from the plan's title or, with no plan, from the conversation. Send it as the setup-task `TASK_DESCRIPTION` below.
|
|
77
75
|
|
|
78
|
-
Spawn Git agent to set up
|
|
76
|
+
Spawn Git agent to set up the task:
|
|
79
77
|
|
|
80
78
|
```
|
|
81
79
|
Agent(subagent_type="Git"):
|
|
@@ -90,33 +88,14 @@ Derive branch name from issue or description, create feature branch, and fetch i
|
|
|
90
88
|
Return the branch setup summary."
|
|
91
89
|
```
|
|
92
90
|
|
|
93
|
-
The issue token is forwarded **unclassified
|
|
94
|
-
SHAPE alone — how many tokens `COMMAND_INPUT` has, and whether it ends in `.md`.
|
|
95
|
-
|
|
96
|
-
`setup-task` is the one step that has resolved a provider, and therefore the only
|
|
97
|
-
one that knows what an issue reference looks like on this machine: `#123`,
|
|
98
|
-
`PROJ-12` and `ENG-12` are three providers' spellings of the same thing. A
|
|
99
|
-
`starts with #` test here would be a github test wearing a neutral name — it
|
|
100
|
-
reclassifies every other provider's reference as a task description, so the
|
|
101
|
-
branch is derived from prose and no issue is ever fetched, with nothing reporting
|
|
102
|
-
a problem. Token COUNT is the gate that stays provider-neutral: every one of
|
|
103
|
-
those spellings is a single token, and no free-text task description is.
|
|
91
|
+
The issue token is forwarded **unclassified**; routing is by SHAPE alone (the token count of `COMMAND_INPUT` and a `.md` ending). Only `setup-task` has resolved a provider, so a `starts with #` test would be a github test that reclassifies `PROJ-12` and `ENG-12` as task descriptions: the branch comes from prose, no issue is fetched and nothing reports it. Token COUNT is provider-neutral: every issue spelling is one token and no free-text description is.
|
|
104
92
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
- **Extension.** A path ending in `.md` is a plan document, never an issue
|
|
108
|
-
reference — it goes to `PLAN_ARTIFACT_PATH` and neither of the other two keys.
|
|
109
|
-
`ISSUE_INPUT` then carries the plan's frontmatter `issue` instead, never the
|
|
110
|
-
path (Plan Document Handling step 4).
|
|
111
|
-
- **Token count.** A single token is an issue reference. Two or more is prose:
|
|
112
|
-
forwarding only its FIRST token would send `/implement fix the login bug` to
|
|
113
|
-
the Git agent as `ISSUE_INPUT: fix` with no description at all, and
|
|
114
|
-
`setup-task` fetches whatever it is handed — so the command would derive a
|
|
115
|
-
branch from a failed lookup and drop the request on the floor.
|
|
93
|
+
- **Extension.** A path ending in `.md` is a plan document, never an issue reference: it goes to `PLAN_ARTIFACT_PATH` only, and `ISSUE_INPUT` carries the plan's frontmatter `issue`, never the path (Plan Document Handling step 4).
|
|
94
|
+
- **Token count.** One token is an issue reference; two or more is prose. Forwarding the FIRST token alone would send `/implement fix the login bug` as `ISSUE_INPUT: fix` with no description, so the request is dropped.
|
|
116
95
|
|
|
117
96
|
**Capture from Git agent output** (used throughout flow):
|
|
118
97
|
- `TASK_ID`: The branch name created by Git agent (use as TASK_ID for rest of flow)
|
|
119
|
-
- `BASE_BRANCH`: Branch this feature was created from (for PR target)
|
|
98
|
+
- `BASE_BRANCH`: Branch this feature was created from (for PR target); stop unless it passes the setup check
|
|
120
99
|
- `ISSUE_NUMBER`: the provider-canonical issue identifier for this task — the same value the Git agent emits as `ISSUE_ID` (if provided, or created by the Git agent's issue-first step in setup-task)
|
|
121
100
|
- `branch_slug`: `TASK_ID` with every `/` replaced by `-`. It names `handoff-{branch_slug}.md` and `evidence-{branch_slug}.md` only when it matches `^[A-Za-z0-9._-]{1,200}$`; any other branch name stops the run here, telling the user it cannot name those files.
|
|
122
101
|
|
|
@@ -162,18 +141,20 @@ Phase 11 passes the resolved value to the evidence script (`publish`), which dec
|
|
|
162
141
|
Pass `COMPLIANCE_DIRECTIVE` to every Code and Fix spawn, on a line of its own.
|
|
163
142
|
|
|
164
143
|
{{decisions_load()}}
|
|
165
|
-
<!--
|
|
144
|
+
<!-- curation:on -->
|
|
166
145
|
Pass `DECISIONS_CONTEXT` to Code agent (Phase 2) and Harden agent (Phase 4).
|
|
167
146
|
|
|
168
|
-
<!--
|
|
147
|
+
<!-- curation:end -->
|
|
169
148
|
{{knowledge_load()}}
|
|
170
149
|
|
|
150
|
+
**Fresh base.** Before Phase 2, write `BASE_BRANCH` with the Write tool to the file that `F="$(mktemp)" && echo "F=$F"` prints, after one Read of it. If the Write tool fails, treat the value as missing; never write it with a shell command. Then run `F="{name file}"; trap 'rm -- "$F"' EXIT; cd "{worktree}" && node "$HOME/.devflow/scripts/resolve-base.cjs" local --name-stdin < "$F"; echo "exit=$?"`. Output other than one `BASE_REF=` line (40 or 64 hex, or `none`) with `exit=0` counts as `NOTE=stop`, `REASON=resolver-unavailable`. Record `BASE_REF`. By `NOTE`: `none` continues; `info` prints one plain line; `degraded` records `TRACEABILITY: DEGRADED (base {REASON}; fix: {fix})`; `stop` (`BASE_REF=none`) stops the run, naming REASON and its fix. Fix by REASON: no-merge-base `git fetch --unshallow`; no-ref or timeout `git fetch origin <base>` (`<base>` stays as written); resolver-unavailable `re-run; if it repeats, run devflow init`; invalid-name the allowed set, never the name; any other REASON none, and `; fix: {fix}` is left out.
|
|
151
|
+
|
|
171
152
|
### Phase 2: Implement
|
|
172
153
|
|
|
173
154
|
**Produces:** CODE_AGENT_OUTPUT, FILES_CHANGED
|
|
174
155
|
**Requires:** TASK_ID, BASE_BRANCH, EXECUTION_PLAN
|
|
175
156
|
|
|
176
|
-
|
|
157
|
+
Setup context is the plan document, issue body or conversation.
|
|
177
158
|
|
|
178
159
|
**Strategy Selection**:
|
|
179
160
|
- If plan document provided: use `execution-strategy` from frontmatter (if absent, use the table below)
|
|
@@ -187,7 +168,7 @@ Based on Setup context (plan document, issue body, or conversation context), use
|
|
|
187
168
|
|
|
188
169
|
---
|
|
189
170
|
|
|
190
|
-
**SINGLE_CODE_AGENT
|
|
171
|
+
**SINGLE_CODE_AGENT**:
|
|
191
172
|
|
|
192
173
|
```
|
|
193
174
|
Agent(subagent_type="Code"):
|
|
@@ -198,15 +179,15 @@ BASE_BRANCH: {base branch}
|
|
|
198
179
|
EXECUTION_PLAN: {full plan from setup context}
|
|
199
180
|
PATTERNS: {patterns from plan document or empty}
|
|
200
181
|
FEATURE_KNOWLEDGE: {feature_knowledge}
|
|
201
|
-
<!--
|
|
182
|
+
<!-- curation:on -->
|
|
202
183
|
DECISIONS_CONTEXT: {decisions_context}
|
|
203
|
-
<!--
|
|
184
|
+
<!-- curation:end -->
|
|
204
185
|
{COMPLIANCE_DIRECTIVE}"
|
|
205
186
|
```
|
|
206
187
|
|
|
207
188
|
---
|
|
208
189
|
|
|
209
|
-
**SEQUENTIAL_CODE_AGENTS
|
|
190
|
+
**SEQUENTIAL_CODE_AGENTS**:
|
|
210
191
|
|
|
211
192
|
Spawn Code agents one at a time. Each appends its own phase section to the handoff file, and the next reads only the section before it:
|
|
212
193
|
|
|
@@ -220,9 +201,9 @@ BASE_BRANCH: {base branch}
|
|
|
220
201
|
EXECUTION_PLAN: {phase 1 steps}
|
|
221
202
|
PATTERNS: {patterns from plan document or empty}
|
|
222
203
|
FEATURE_KNOWLEDGE: {feature_knowledge}
|
|
223
|
-
<!--
|
|
204
|
+
<!-- curation:on -->
|
|
224
205
|
DECISIONS_CONTEXT: {decisions_context}
|
|
225
|
-
<!--
|
|
206
|
+
<!-- curation:end -->
|
|
226
207
|
{COMPLIANCE_DIRECTIVE}
|
|
227
208
|
HANDOFF_REQUIRED: true
|
|
228
209
|
HANDOFF_FILE: {worktree}/.devflow/docs/handoff-{branch_slug}.md"
|
|
@@ -240,19 +221,19 @@ PATTERNS: {patterns from plan document or empty}
|
|
|
240
221
|
PRIOR_PHASE_SUMMARY: {summary from previous Code agent}
|
|
241
222
|
FILES_FROM_PRIOR_PHASE: {list of files created}
|
|
242
223
|
FEATURE_KNOWLEDGE: {feature_knowledge}
|
|
243
|
-
<!--
|
|
224
|
+
<!-- curation:on -->
|
|
244
225
|
DECISIONS_CONTEXT: {decisions_context}
|
|
245
|
-
<!--
|
|
226
|
+
<!-- curation:end -->
|
|
246
227
|
{COMPLIANCE_DIRECTIVE}
|
|
247
228
|
HANDOFF_REQUIRED: {true if not last phase}
|
|
248
229
|
HANDOFF_FILE: {worktree}/.devflow/docs/handoff-{branch_slug}.md"
|
|
249
230
|
```
|
|
250
231
|
|
|
251
|
-
**Handoff Protocol**: Each
|
|
232
|
+
**Handoff Protocol**: Each Code agent with HANDOFF_REQUIRED=true appends its own `## Phase {N} Implementation Summary` section, at most 8,192 bytes, to `{worktree}/.devflow/docs/handoff-{branch_slug}.md`, never rewriting an earlier section and keeping any `## Evidence Exceptions` section byte-identical; the next Code agent reads only the section of the phase immediately before its own through HANDOFF_FILE. The orchestrator writes no phase section. Delete `{worktree}/.devflow/docs/handoff-{branch_slug}.md` once the PR exists — after Phase 9 (cleanup).
|
|
252
233
|
|
|
253
234
|
---
|
|
254
235
|
|
|
255
|
-
**PARALLEL_CODE_AGENTS
|
|
236
|
+
**PARALLEL_CODE_AGENTS**:
|
|
256
237
|
|
|
257
238
|
Spawn multiple Code agents **in a single message**, each with independent subtask:
|
|
258
239
|
|
|
@@ -265,9 +246,9 @@ BASE_BRANCH: {base branch}
|
|
|
265
246
|
EXECUTION_PLAN: {subtask 1 steps}
|
|
266
247
|
PATTERNS: {patterns}
|
|
267
248
|
FEATURE_KNOWLEDGE: {feature_knowledge}
|
|
268
|
-
<!--
|
|
249
|
+
<!-- curation:on -->
|
|
269
250
|
DECISIONS_CONTEXT: {decisions_context}
|
|
270
|
-
<!--
|
|
251
|
+
<!-- curation:end -->
|
|
271
252
|
{COMPLIANCE_DIRECTIVE}"
|
|
272
253
|
|
|
273
254
|
Agent(subagent_type="Code"): # Code agent 2 (same message)
|
|
@@ -278,24 +259,26 @@ BASE_BRANCH: {base branch}
|
|
|
278
259
|
EXECUTION_PLAN: {subtask 2 steps}
|
|
279
260
|
PATTERNS: {patterns}
|
|
280
261
|
FEATURE_KNOWLEDGE: {feature_knowledge}
|
|
281
|
-
<!--
|
|
262
|
+
<!-- curation:on -->
|
|
282
263
|
DECISIONS_CONTEXT: {decisions_context}
|
|
283
|
-
<!--
|
|
264
|
+
<!-- curation:end -->
|
|
284
265
|
{COMPLIANCE_DIRECTIVE}"
|
|
285
266
|
```
|
|
286
267
|
|
|
287
|
-
**Independence criteria** (all must be true for PARALLEL_CODE_AGENTS):
|
|
288
|
-
- No shared contracts or interfaces
|
|
289
|
-
- No integration points between subtasks
|
|
290
|
-
- Different files/modules with no imports between them
|
|
291
|
-
- Each subtask is self-contained
|
|
268
|
+
**Independence criteria** (all must be true for PARALLEL_CODE_AGENTS): no shared contracts, interfaces or integration points between subtasks; different files/modules with no imports between them.
|
|
292
269
|
|
|
293
270
|
### Phase 3: Polish
|
|
294
271
|
|
|
295
272
|
**Produces:** POLISH_OUTPUT
|
|
296
|
-
**Requires:**
|
|
273
|
+
**Requires:** BASE_REF, GATE_LEVEL
|
|
297
274
|
|
|
298
|
-
|
|
275
|
+
**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/implement-levels.md` with the Read tool, and apply each row to the phase it names.
|
|
276
|
+
|
|
277
|
+
- No row or rule overrides the next two lines.
|
|
278
|
+
- 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, keep `GATE_LEVEL` and say `level reference unreadable: no level rows applied`.
|
|
279
|
+
- Validate, the CI gate, the evidence claims and the compliance directive run at every level. An enabled compliance lens keeps Harden.
|
|
280
|
+
|
|
281
|
+
After the Code agent completes, spawn Polish agent to polish the code. The Phase 6 Validate covers its commits. `{branch_diff}` is the output of `git diff --name-only --diff-filter=d {BASE_REF}...HEAD`, run again at each spawn; a non-zero exit stops, and an empty list counts only on exit 0.
|
|
299
282
|
|
|
300
283
|
```
|
|
301
284
|
Agent(subagent_type="Polish"):
|
|
@@ -309,17 +292,17 @@ Commit any improvements with a conventional-commit message."
|
|
|
309
292
|
### Phase 4: Self-Review
|
|
310
293
|
|
|
311
294
|
**Produces:** HARDEN_OUTPUT
|
|
312
|
-
**Requires:**
|
|
295
|
+
**Requires:** BASE_REF
|
|
313
296
|
|
|
314
|
-
After
|
|
297
|
+
After Phase 3, spawn Harden agent as the quality gate:
|
|
315
298
|
|
|
316
299
|
```
|
|
317
300
|
Agent(subagent_type="Harden"):
|
|
318
301
|
"TASK_DESCRIPTION: {task description}
|
|
319
302
|
FILES_CHANGED: {branch_diff}
|
|
320
|
-
<!--
|
|
303
|
+
<!-- curation:on -->
|
|
321
304
|
DECISIONS_CONTEXT: {decisions_context}
|
|
322
|
-
<!--
|
|
305
|
+
<!-- curation:end -->
|
|
323
306
|
FEATURE_KNOWLEDGE: {feature_knowledge_rules}
|
|
324
307
|
Evaluate 9 pillars, fix P0/P1 issues, report status"
|
|
325
308
|
```
|
|
@@ -329,7 +312,7 @@ Harden agent reports `### Status: PASS | FIXED | BLOCKED`. **If BLOCKED:** repor
|
|
|
329
312
|
### Phase 5: Alignment Check
|
|
330
313
|
|
|
331
314
|
**Produces:** ALIGNMENT_RESULT
|
|
332
|
-
**Requires:**
|
|
315
|
+
**Requires:** BASE_REF, EXECUTION_PLAN
|
|
333
316
|
|
|
334
317
|
After Harden agent passes, spawn Evaluate agent to validate alignment. Evaluate agent receives `FEATURE_KNOWLEDGE_RULES` as acceptance context only; pattern and anti-pattern judgments belong to Harden agent:
|
|
335
318
|
|
|
@@ -357,9 +340,9 @@ Validate alignment with request and plan. Report ALIGNED or MISALIGNED with deta
|
|
|
357
340
|
TASK_DESCRIPTION: Fix alignment issues
|
|
358
341
|
MISALIGNMENTS: {structured misalignments from Evaluate agent}
|
|
359
342
|
SCOPE: Fix only the listed misalignments, no other changes
|
|
360
|
-
<!--
|
|
343
|
+
<!-- curation:on -->
|
|
361
344
|
DECISIONS_CONTEXT: {decisions_context}
|
|
362
|
-
<!--
|
|
345
|
+
<!-- curation:end -->
|
|
363
346
|
{COMPLIANCE_DIRECTIVE}"
|
|
364
347
|
```
|
|
365
348
|
- Loop back to Phase 5 (re-check alignment). The fix is not validated here: the Phase 6 run covers it.
|
|
@@ -368,13 +351,15 @@ Validate alignment with request and plan. Report ALIGNED or MISALIGNED with deta
|
|
|
368
351
|
### Phase 6: Validate
|
|
369
352
|
|
|
370
353
|
**Produces:** VALIDATION_RESULT, VALIDATED_HEAD
|
|
371
|
-
**Requires:**
|
|
354
|
+
**Requires:** BASE_REF, GATE_LEVEL
|
|
372
355
|
|
|
373
356
|
Validate takes the one full-suite slot, after every commit it must cover: Code, Polish, Harden and the alignment fixes. After Evaluate agent passes, spawn Validate agent. `FILES_CHANGED` is the branch diff:
|
|
374
357
|
|
|
375
358
|
```
|
|
376
359
|
Agent(subagent_type="Validate"):
|
|
377
|
-
"
|
|
360
|
+
"GATE_LEVEL: {GATE_LEVEL}
|
|
361
|
+
BASE_SHA: {BASE_REF}
|
|
362
|
+
FILES_CHANGED: {branch_diff}
|
|
378
363
|
VALIDATION_SCOPE: full
|
|
379
364
|
Run build, typecheck, lint, test. Report pass/fail with failure details."
|
|
380
365
|
```
|
|
@@ -391,9 +376,9 @@ Run build, typecheck, lint, test. Report pass/fail with failure details."
|
|
|
391
376
|
TASK_DESCRIPTION: Fix validation failures
|
|
392
377
|
VALIDATION_FAILURES: {parsed failures from Validate agent}
|
|
393
378
|
SCOPE: Fix only the listed failures, no other changes
|
|
394
|
-
<!--
|
|
379
|
+
<!-- curation:on -->
|
|
395
380
|
DECISIONS_CONTEXT: {decisions_context}
|
|
396
|
-
<!--
|
|
381
|
+
<!-- curation:end -->
|
|
397
382
|
{COMPLIANCE_DIRECTIVE}"
|
|
398
383
|
```
|
|
399
384
|
- Loop back to Phase 6 (re-validate at the new HEAD, full scope)
|
|
@@ -415,7 +400,7 @@ Run build, typecheck, lint, test. Report pass/fail with failure details."
|
|
|
415
400
|
### Phase 7: QA Testing
|
|
416
401
|
|
|
417
402
|
**Produces:** QA_RESULT
|
|
418
|
-
**Requires:**
|
|
403
|
+
**Requires:** BASE_REF, EXECUTION_PLAN, TEST_PLAN, VALIDATED_HEAD
|
|
419
404
|
|
|
420
405
|
After Phase 6 passes, spawn Test agent for scenario-based acceptance testing:
|
|
421
406
|
|
|
@@ -445,9 +430,9 @@ After every Test agent run — PASS or FAIL, first run or retry — append its T
|
|
|
445
430
|
TASK_DESCRIPTION: Fix QA test failures
|
|
446
431
|
QA_FAILURES: {structured failures from Test agent}
|
|
447
432
|
SCOPE: Fix only the listed failures, no other changes
|
|
448
|
-
<!--
|
|
433
|
+
<!-- curation:on -->
|
|
449
434
|
DECISIONS_CONTEXT: {decisions_context}
|
|
450
|
-
<!--
|
|
435
|
+
<!-- curation:end -->
|
|
451
436
|
{COMPLIANCE_DIRECTIVE}"
|
|
452
437
|
```
|
|
453
438
|
- Loop back to Phase 7 (re-run Test agent). The fix is not validated here: Phase 8 covers it.
|
|
@@ -474,21 +459,22 @@ Verify the qa-fix commits did not break anything."
|
|
|
474
459
|
### Phase 9: Open PR
|
|
475
460
|
|
|
476
461
|
**Produces:** PR_NUMBER
|
|
477
|
-
**Requires:** BASE_BRANCH, TASK_ID, ISSUE_NUMBER, ISSUE_PR_LINK, PR_EXCEPTIONS, PR_TEST_PLAN_BLOCK, PR_DESCRIPTION_GUIDANCE, APPLY_CONVENTIONS, CODE_AGENT_OUTPUT
|
|
462
|
+
**Requires:** BASE_BRANCH, BASE_REF, TASK_ID, ISSUE_NUMBER, ISSUE_PR_LINK, PR_EXCEPTIONS, PR_TEST_PLAN_BLOCK, PR_DESCRIPTION_GUIDANCE, APPLY_CONVENTIONS, CODE_AGENT_OUTPUT
|
|
478
463
|
|
|
479
|
-
Run once, after the gates, under every strategy.
|
|
464
|
+
Run once, after the gates, under every strategy. No Code agent opens a PR: the Git agent does, and it pastes `ISSUE_PR_LINK`, `PR_EXCEPTIONS` and `PR_TEST_PLAN_BLOCK` through their paste gates and scrubs the body (D11) before `gh pr create`. This command renders no link line and creates no PR itself: the Git agent's Phase-1 rendering is the only one, forwarded verbatim.
|
|
480
465
|
|
|
481
466
|
```
|
|
482
467
|
Agent(subagent_type="Git"):
|
|
483
468
|
"OPERATION: ensure-pr-ready
|
|
484
469
|
WORKTREE_PATH: {worktree}
|
|
485
470
|
BASE_BRANCH: {base branch}
|
|
471
|
+
BASE_REF: {BASE_REF}
|
|
486
472
|
TASK_ID: {task-id}
|
|
487
473
|
ISSUE_NUMBER: {ISSUE_ID captured in Phase 1, or (none)}
|
|
488
474
|
ISSUE_PR_LINK: {ISSUE_PR_LINK captured in Phase 1, or (none)}
|
|
489
475
|
PR_EXCEPTIONS: {the ## Evidence Exceptions section of {worktree}/.devflow/docs/handoff-{branch_slug}.md verbatim, or (none)}
|
|
490
476
|
PR_TEST_PLAN_BLOCK: {PR_TEST_PLAN_BLOCK verbatim, or (none)}
|
|
491
|
-
PR_DESCRIPTION_GUIDANCE: {pr_description_guidance from Phase 1 unless it is (none), then the Code agents' reports from CODE_AGENT_OUTPUT in spawn order — Implementation, Commits and Key Decisions, and a sequential agent's ## Phase {N} Implementation Summary}
|
|
477
|
+
PR_DESCRIPTION_GUIDANCE: {pr_description_guidance from Phase 1 unless it is (none), then the Code agents' reports from CODE_AGENT_OUTPUT in spawn order — Implementation, Commits and Key Decisions, and a sequential agent's ## Phase {N} Implementation Summary, then Validate's `Lint pack:` line if UNVERIFIED, for Testing}
|
|
492
478
|
APPLY_CONVENTIONS: {APPLY_CONVENTIONS}
|
|
493
479
|
COMMIT_UNCOMMITTED: false
|
|
494
480
|
Open the pull request for this branch and return the pre-flight summary."
|
|
@@ -517,11 +503,11 @@ git push origin HEAD; echo "exit=$?"
|
|
|
517
503
|
3. **If NO_PR or NO_CI** → skip: "No PR/CI configured, skipping CI validation." Proceed to Phase 11.
|
|
518
504
|
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.
|
|
519
505
|
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.
|
|
520
|
-
<!--
|
|
506
|
+
<!-- curation:on -->
|
|
521
507
|
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.
|
|
522
|
-
<!--
|
|
508
|
+
<!-- curation:off -->
|
|
523
509
|
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.
|
|
524
|
-
<!--
|
|
510
|
+
<!-- curation:end -->
|
|
525
511
|
7. **Budget**: at most 3 waits and 2 fixes in all. When one is spent, report the current status and proceed.
|
|
526
512
|
<!-- /PATTERN: ci-status-gate -->
|
|
527
513
|
|
|
@@ -530,7 +516,7 @@ git push origin HEAD; echo "exit=$?"
|
|
|
530
516
|
**Produces:** EVIDENCE_RESULT
|
|
531
517
|
**Requires:** PR_NUMBER, EVIDENCE_FILE, REVIEW_PUBLICATION
|
|
532
518
|
|
|
533
|
-
Run once, after Phase 10, under every strategy
|
|
519
|
+
Run once, after Phase 10, under every strategy. Skip it only when Phase 9 stopped the run. A `ci` TP reads `INDETERMINATE` only when the CI gate could not tell or did not run.
|
|
534
520
|
|
|
535
521
|
**Push first.** Every claim is keyed to the HEAD an agent reported, and a Harden or Fix agent may have committed without pushing; a claim whose SHA is not in the PR reads `UNVERIFIED`. So push the branch once before the script — never force, and no retry:
|
|
536
522
|
|
|
@@ -550,30 +536,27 @@ Drop the `--evidence` pair when that file does not exist or its path does not ma
|
|
|
550
536
|
|
|
551
537
|
### Phase 12: Report
|
|
552
538
|
|
|
553
|
-
**Requires:** VALIDATION_RESULT, ALIGNMENT_RESULT, QA_RESULT, PR_NUMBER, EVIDENCE_RESULT
|
|
539
|
+
**Requires:** VALIDATION_RESULT, ALIGNMENT_RESULT, QA_RESULT, PR_NUMBER, EVIDENCE_RESULT, GATE_LEVEL
|
|
554
540
|
|
|
555
|
-
Display completion summary with phase status, PR info, and next steps.
|
|
541
|
+
Display completion summary with phase status, `Gate level: {GATE_LEVEL}` with any level note, Validate's `Lint pack:` line if any, PR info, and next steps.
|
|
556
542
|
|
|
557
543
|
Show the test plan's evidence from Phase 11: `Test plan: {VERIFIED-CI + ATTESTED-LOCAL}/{total} verified (VERIFIED-CI {n}, ATTESTED-LOCAL {n})`, read from the `EVIDENCE` line and never inferred, then its `**Body**:` / `**Comment**:` line verbatim. Without an `EVIDENCE` line, show `Test plan: evidence unavailable`; with no test plan, `Test plan: missing`.
|
|
558
544
|
|
|
559
|
-
If any Git agent output emitted `TRACEABILITY: DEGRADED ({reason})` lines during the run, or Phase 10's push, Phase 11's push or Phase 11's script output carried one, surface them verbatim in the report under a `### Traceability` subsection so the user can act on them.
|
|
545
|
+
If any Git agent output emitted `TRACEABILITY: DEGRADED ({reason})` lines during the run, or the fresh base step, Phase 10's push, Phase 11's push or Phase 11's script output carried one, surface them verbatim in the report under a `### Traceability` subsection so the user can act on them.
|
|
560
546
|
|
|
561
547
|
If Phase 9 listed uncommitted files, show them as a `### Uncommitted files` subsection: the user commits them or discards them.
|
|
562
548
|
|
|
563
549
|
If Phase 1 recorded an evidence exception, show its `## Evidence Exceptions` lines in the report.
|
|
564
550
|
|
|
565
|
-
{{
|
|
551
|
+
{{knowledge_writeback_after_load()}}
|
|
566
552
|
|
|
567
553
|
## Architecture
|
|
568
554
|
|
|
569
555
|
```
|
|
570
|
-
/implement
|
|
571
|
-
│
|
|
572
|
-
├─ Re-validation Path (when user says "re-validate"/"re-check"/"re-run gates")
|
|
573
|
-
│ └─ Branch safety → skip Phase 2 → record BASE_BRANCH → Phases 3-8 → Phase 9, 11, 12
|
|
556
|
+
/implement
|
|
574
557
|
│
|
|
575
558
|
├─ Phase 1: Setup
|
|
576
|
-
├─ Phase 2: Implement
|
|
559
|
+
├─ Phase 2: Implement
|
|
577
560
|
├─ Phase 3: Polish
|
|
578
561
|
├─ Phase 4: Self-Review
|
|
579
562
|
├─ Phase 5: Alignment Check
|
|
@@ -582,7 +565,7 @@ If Phase 1 recorded an evidence exception, show its `## Evidence Exceptions` lin
|
|
|
582
565
|
├─ Phase 8: Re-Validate (only if a qa-fix committed)
|
|
583
566
|
├─ Phase 9: Open PR (every strategy, outside the strategy branches)
|
|
584
567
|
├─ Phase 10: CI Status Gate (every strategy)
|
|
585
|
-
├─ Phase 11: Evidence (every strategy
|
|
568
|
+
├─ Phase 11: Evidence (every strategy)
|
|
586
569
|
├─ Phase 12: Report
|
|
587
570
|
│
|
|
588
571
|
└─ Feature Knowledge Write-Back (Conditional)
|
|
@@ -590,15 +573,11 @@ If Phase 1 recorded an evidence exception, show its `## Evidence Exceptions` lin
|
|
|
590
573
|
|
|
591
574
|
## Principles
|
|
592
575
|
|
|
593
|
-
1. **Orchestration only** - Command spawns agents, never does work itself; the inline calls are the bounded plumbing the charter allows: the Phase 10 and
|
|
594
|
-
2. **
|
|
595
|
-
3. **
|
|
596
|
-
4. **
|
|
597
|
-
5. **Validate agent owns validation** - Never run `npm test`, `npm run build`, or similar in main session; always delegate to Validate agent
|
|
598
|
-
6. **Fix agent owns fixes** - Never implement fixes in main session; spawn Fix agent for validation failures and alignment fixes
|
|
599
|
-
7. **Loop limits** - Max 2 validation retries, max 2 alignment fix iterations, max 2 QA retries before escalating to user; the CI gate allows at most 3 waits and 2 fixes
|
|
600
|
-
8. **CI awareness** - CI status is checked before merge under every strategy, once Phase 9 has opened the PR; test-plan evidence (Phase 11) is recorded under every strategy once the PR exists
|
|
576
|
+
1. **Orchestration only** - Command spawns agents, never does work itself (no tests, builds or fixes); "Spawn X" means call the Agent tool; the inline calls are the bounded plumbing the charter allows: the fresh base step's resolver calls (Phase 1, re-validation), the Phase 10 and 11 pushes, the Phase 10 ci-wait call, the Phase 11 evidence publish call and the evidence script checks
|
|
577
|
+
2. **Honest reporting** - Display agent outputs directly
|
|
578
|
+
3. **Loop limits** - Max 2 validation retries, max 2 alignment fix iterations, max 2 QA retries before escalating to user; the CI gate allows at most 3 waits and 2 fixes
|
|
579
|
+
4. **CI awareness** - CI status is checked before merge; test-plan evidence (Phase 11) is recorded under every strategy
|
|
601
580
|
|
|
602
581
|
## Error Handling
|
|
603
582
|
|
|
604
|
-
If any agent fails, report the phase, agent type
|
|
583
|
+
If any agent fails, report the phase, agent type and error. Offer: retry the phase, investigate, or escalate to user.
|
|
@@ -104,17 +104,17 @@ If the user says "skip" or "just proceed" — skip remaining questions, present
|
|
|
104
104
|
|
|
105
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.
|
|
106
106
|
|
|
107
|
-
<!--
|
|
107
|
+
<!-- curation:on -->
|
|
108
108
|
#### Phase 2: Orient + Load Decisions
|
|
109
|
-
<!--
|
|
109
|
+
<!-- curation:off -->
|
|
110
110
|
#### Phase 2: Orient
|
|
111
|
-
<!--
|
|
111
|
+
<!-- curation:end -->
|
|
112
112
|
|
|
113
|
-
<!--
|
|
113
|
+
<!-- curation:on -->
|
|
114
114
|
**Produces:** SKIM_CONTEXT, DECISIONS_CONTEXT, FEATURE_KNOWLEDGE, FEATURE_KNOWLEDGE_RULES, GATE_LEVEL
|
|
115
|
-
<!--
|
|
115
|
+
<!-- curation:off -->
|
|
116
116
|
**Produces:** SKIM_CONTEXT, FEATURE_KNOWLEDGE, FEATURE_KNOWLEDGE_RULES, GATE_LEVEL
|
|
117
|
-
<!--
|
|
117
|
+
<!-- curation:end -->
|
|
118
118
|
**Requires:** CONFIRMED_SCOPE
|
|
119
119
|
|
|
120
120
|
{{settings.settings_resolve()}}
|
|
@@ -124,9 +124,9 @@ Spawn Skim agent for codebase context:
|
|
|
124
124
|
```
|
|
125
125
|
Agent(subagent_type="Skim"):
|
|
126
126
|
"Orient in codebase for design planning: {feature/issues}
|
|
127
|
-
<!--
|
|
128
|
-
|
|
129
|
-
<!--
|
|
127
|
+
<!-- curation:on -->
|
|
128
|
+
CURATION: {CURATION from the settings line}
|
|
129
|
+
<!-- curation:end -->
|
|
130
130
|
Run rskim on source directories (NOT repo root) to identify:
|
|
131
131
|
- Existing patterns and conventions in the affected area
|
|
132
132
|
- File structure and module boundaries
|
|
@@ -138,17 +138,17 @@ Return codebase context for requirements analysis."
|
|
|
138
138
|
{{docs_root()}}
|
|
139
139
|
|
|
140
140
|
{{decisions_load()}}
|
|
141
|
-
<!--
|
|
141
|
+
<!-- curation:on -->
|
|
142
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.
|
|
143
143
|
|
|
144
|
-
<!--
|
|
144
|
+
<!-- curation:end -->
|
|
145
145
|
{{knowledge_load()}}
|
|
146
146
|
|
|
147
|
-
<!--
|
|
147
|
+
<!-- curation:on -->
|
|
148
148
|
Pass `FEATURE_KNOWLEDGE` to Explore and Design agents. Pass `DECISIONS_CONTEXT` to Design agents only.
|
|
149
|
-
<!--
|
|
149
|
+
<!-- curation:off -->
|
|
150
150
|
Pass `FEATURE_KNOWLEDGE` to Explore and Design agents.
|
|
151
|
-
<!--
|
|
151
|
+
<!-- curation:end -->
|
|
152
152
|
|
|
153
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
154
|
|
|
@@ -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,9 +232,9 @@ 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)
|
|
@@ -242,11 +242,11 @@ 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
|
|
|
@@ -544,11 +544,11 @@ Display completion summary:
|
|
|
544
544
|
│ ├─ Phase 1: GATE 0 - Requirements Discovery ⛔ MANDATORY
|
|
545
545
|
│ │ ├─ Git agent (fetch-issue / fetch-issues-batch) - issue mode only
|
|
546
546
|
│ │ └─ AskUserQuestion: Validate interpretation
|
|
547
|
-
<!--
|
|
547
|
+
<!-- curation:on -->
|
|
548
548
|
│ ├─ Phase 2: Orient + Load Decisions
|
|
549
|
-
<!--
|
|
549
|
+
<!-- curation:off -->
|
|
550
550
|
│ ├─ Phase 2: Orient
|
|
551
|
-
<!--
|
|
551
|
+
<!-- curation:end -->
|
|
552
552
|
│ ├─ Phase 3: Explore Requirements (PARALLEL)
|
|
553
553
|
│ └─ Phase 4: Synthesize Exploration
|
|
554
554
|
│
|
|
@@ -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
|