devflow-kit 3.10.0 → 3.12.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 +74 -0
- package/dist/agents/architect.md +87 -0
- package/dist/agents/code.md +21 -25
- package/dist/agents/debug.md +21 -49
- package/dist/agents/design.md +9 -43
- package/dist/agents/fix.md +15 -29
- package/dist/agents/git.md +19 -22
- package/dist/agents/harden.md +14 -19
- package/dist/agents/knowledge.md +11 -19
- package/dist/agents/refactor.md +9 -14
- package/dist/agents/research.md +11 -34
- package/dist/agents/review.md +22 -52
- package/dist/agents/skim.md +7 -17
- package/dist/agents/triage.md +7 -14
- package/dist/cli/commands/backup-session.js +131 -0
- package/dist/cli/commands/compliance.js +16 -3
- package/dist/cli/commands/curation.js +12 -4
- package/dist/cli/commands/init.js +36 -55
- package/dist/cli/commands/install-report.js +95 -0
- package/dist/cli/commands/legacy-sweep.js +140 -45
- package/dist/cli/commands/rules.js +50 -13
- package/dist/cli/commands/uninstall.js +62 -24
- package/dist/commands/bug-analysis.md +31 -62
- package/dist/commands/code-review.md +38 -87
- package/dist/commands/debug.md +32 -82
- package/dist/commands/dynamic-build.md +155 -211
- package/dist/commands/dynamic-plan.md +71 -93
- package/dist/commands/dynamic-profile.md +7 -155
- package/dist/commands/dynamic-tickets.md +65 -186
- package/dist/commands/explore.md +27 -70
- package/dist/commands/implement.md +98 -186
- package/dist/commands/plan.md +60 -107
- package/dist/commands/release.md +25 -91
- package/dist/commands/research.md +34 -103
- package/dist/commands/resolve.md +64 -128
- package/dist/commands/self-review.md +35 -99
- package/dist/compliance-off/agents/git.md +15 -18
- package/dist/compliance-off/agents/triage.md +7 -14
- package/dist/compliance-off/commands/bug-analysis.md +31 -62
- package/dist/compliance-off/commands/code-review.md +34 -82
- package/dist/compliance-off/commands/dynamic-build.md +149 -205
- package/dist/compliance-off/commands/dynamic-tickets.md +65 -186
- package/dist/compliance-off/commands/implement.md +94 -180
- package/dist/compliance-off/commands/plan.md +60 -107
- package/dist/compliance-off/commands/release.md +25 -90
- package/dist/compliance-off/commands/resolve.md +54 -128
- package/dist/compliance-off/skills/git/references/tracker/github/ensure-pr-ready.md +3 -3
- package/dist/compliance-off/skills/git/references/tracker/jira/ensure-pr-ready.md +3 -3
- package/dist/compliance-off/skills/git/references/tracker/linear/ensure-pr-ready.md +3 -3
- package/dist/core/compliance.js +14 -0
- package/dist/core/fs-atomic.js +5 -1
- package/dist/core/orphan-sweep.js +20 -2
- package/dist/core/path-set.js +15 -0
- package/dist/core/plugins.js +6 -5
- package/dist/core/reference-sweep.js +42 -25
- package/dist/core/retired-shipped-names.js +278 -0
- package/dist/curation-compliance-off/agents/triage.md +7 -13
- package/dist/curation-compliance-off/commands/bug-analysis.md +21 -41
- package/dist/curation-compliance-off/commands/code-review.md +25 -62
- package/dist/curation-compliance-off/commands/dynamic-build.md +142 -194
- package/dist/curation-compliance-off/commands/dynamic-tickets.md +54 -173
- package/dist/curation-compliance-off/commands/implement.md +86 -161
- package/dist/curation-compliance-off/commands/plan.md +51 -86
- package/dist/curation-compliance-off/commands/release.md +17 -78
- package/dist/curation-compliance-off/commands/resolve.md +45 -108
- package/dist/curation-off/agents/architect.md +81 -0
- package/dist/curation-off/agents/code.md +20 -23
- package/dist/curation-off/agents/debug.md +19 -47
- package/dist/curation-off/agents/design.md +8 -41
- package/dist/curation-off/agents/fix.md +14 -27
- package/dist/curation-off/agents/harden.md +13 -18
- package/dist/curation-off/agents/knowledge.md +9 -17
- package/dist/curation-off/agents/refactor.md +8 -12
- package/dist/curation-off/agents/research.md +9 -32
- package/dist/curation-off/agents/review.md +11 -40
- package/dist/curation-off/agents/skim.md +7 -17
- package/dist/curation-off/agents/triage.md +7 -13
- package/dist/curation-off/commands/bug-analysis.md +21 -41
- package/dist/curation-off/commands/code-review.md +29 -67
- package/dist/curation-off/commands/debug.md +24 -63
- package/dist/curation-off/commands/dynamic-build.md +148 -200
- package/dist/curation-off/commands/dynamic-plan.md +60 -80
- package/dist/curation-off/commands/dynamic-tickets.md +54 -173
- package/dist/curation-off/commands/explore.md +18 -50
- package/dist/curation-off/commands/implement.md +90 -167
- package/dist/curation-off/commands/plan.md +51 -86
- package/dist/curation-off/commands/release.md +17 -79
- package/dist/curation-off/commands/research.md +23 -81
- package/dist/curation-off/commands/resolve.md +55 -108
- package/dist/curation-off/commands/self-review.md +26 -78
- package/dist/skills/git/references/pr/update-pr-evidence.md +2 -1
- package/dist/skills/git/references/tracker/github/ensure-pr-ready.md +3 -3
- package/dist/skills/git/references/tracker/jira/ensure-pr-ready.md +3 -3
- package/dist/skills/git/references/tracker/linear/ensure-pr-ready.md +3 -3
- package/dist/targets/claude-code/compliance-install.js +38 -13
- package/dist/targets/claude-code/compliance-off-files.js +5 -1
- package/dist/targets/claude-code/curation-install.js +77 -32
- package/dist/targets/claude-code/folder-swap.js +142 -0
- package/dist/targets/claude-code/install-backup.js +780 -0
- package/dist/targets/claude-code/installer.js +383 -192
- package/dist/targets/claude-code/legacy-skill-hashes.js +170 -0
- package/dist/targets/claude-code/linked-folder.js +5 -11
- package/dist/targets/claude-code/reference-converge.js +15 -2
- package/dist/targets/claude-code/rules-folder.js +34 -0
- package/dist/targets/claude-code/shipped-set.js +160 -0
- package/dist/targets/claude-code/workflow-folder-install.js +32 -12
- package/dist/variant-axes.json +5 -1
- package/package.json +1 -1
- package/src/assets/agents/_partials/_code.mds +3 -5
- package/src/assets/agents/_partials/_design.mds +86 -0
- package/src/assets/agents/architect.mds +41 -0
- package/src/assets/agents/code.mds +18 -20
- package/src/assets/agents/curate.md +26 -35
- package/src/assets/agents/debug.mds +21 -49
- package/src/assets/agents/design.mds +11 -114
- package/src/assets/agents/evaluate.md +6 -16
- package/src/assets/agents/explore.md +1 -2
- package/src/assets/agents/fix.mds +12 -24
- package/src/assets/agents/git.mds +20 -23
- package/src/assets/agents/harden.mds +14 -19
- package/src/assets/agents/knowledge.mds +10 -38
- package/src/assets/agents/polish.md +13 -39
- package/src/assets/agents/refactor.mds +6 -9
- package/src/assets/agents/research.mds +11 -34
- package/src/assets/agents/review.mds +12 -84
- package/src/assets/agents/skim.mds +7 -17
- package/src/assets/agents/synthesize.md +3 -21
- package/src/assets/agents/test.md +31 -32
- package/src/assets/agents/tracker.md +116 -229
- package/src/assets/agents/triage.mds +7 -26
- package/src/assets/agents/validate.md +1 -3
- package/src/assets/commands/_partials/_compliance.mds +2 -2
- package/src/assets/commands/_partials/_decisions.mds +17 -24
- package/src/assets/commands/_partials/_docs_root.mds +31 -10
- package/src/assets/commands/_partials/_engine.mds +34 -56
- package/src/assets/commands/_partials/_evidence_policy.mds +1 -1
- package/src/assets/commands/_partials/_factory.mds +10 -104
- package/src/assets/commands/_partials/_knowledge.mds +47 -51
- package/src/assets/commands/_partials/_plan_contract.mds +2 -2
- package/src/assets/commands/_partials/_preamble.mds +21 -21
- package/src/assets/commands/_partials/_publication.mds +3 -3
- package/src/assets/commands/_partials/_roster.mds +12 -13
- package/src/assets/commands/_partials/_settings.mds +6 -3
- package/src/assets/commands/_partials/_ticket_template.mds +3 -7
- package/src/assets/commands/_partials/_tracker.mds +10 -5
- package/src/assets/commands/_partials/_wave.mds +23 -32
- package/src/assets/commands/bug-analysis.mds +3 -7
- package/src/assets/commands/code-review.mds +12 -33
- package/src/assets/commands/debug.mds +5 -47
- package/src/assets/commands/dynamic-build.mds +48 -70
- package/src/assets/commands/dynamic-plan.mds +23 -42
- package/src/assets/commands/dynamic-profile.mds +7 -57
- package/src/assets/commands/dynamic-tickets.mds +9 -29
- package/src/assets/commands/explore.mds +5 -44
- package/src/assets/commands/implement.mds +75 -117
- package/src/assets/commands/plan.mds +27 -57
- package/src/assets/commands/release.mds +4 -62
- package/src/assets/commands/research.mds +7 -53
- package/src/assets/commands/resolve.mds +40 -87
- package/src/assets/commands/self-review.mds +5 -45
- package/src/assets/mds/git/_ops_pr.mds +1 -0
- package/src/assets/mds/git/_ops_steps.mds +4 -4
- package/src/assets/mds/git/_pr.mds +1 -1
- package/src/assets/rules/engineering.md +1 -1
- package/src/assets/rules/quality.md +2 -2
- package/src/assets/scripts/ci-wait.cjs +150 -18
- package/src/assets/scripts/hooks/assets/orchestrator-charter.md +3 -3
- package/src/assets/scripts/hooks/preamble +2 -3
- package/src/assets/scripts/pr-evidence.cjs +1 -0
- package/src/assets/scripts/resolve-evidence-policy.cjs +14 -13
- package/src/assets/scripts/resolve-root.cjs +186 -0
- package/src/assets/scripts/resolve-settings.cjs +14 -9
- package/src/assets/scripts/verify-evidence.cjs +355 -22
- package/src/assets/skills/accessibility/SKILL.md +28 -95
- package/src/assets/skills/agent-references/SKILL.md +2 -4
- package/src/assets/skills/agent-references/references/commands/implement-evidence-asks.md +1 -1
- package/src/assets/skills/agent-references/references/commands/implement-levels.md +4 -7
- package/src/assets/skills/agent-references/references/commands/implement-revalidate.md +1 -1
- package/src/assets/skills/agent-references/references/commands/plan-levels.md +2 -2
- package/src/assets/skills/apply-decisions/SKILL.md +5 -6
- package/src/assets/skills/apply-feature-knowledge/SKILL.md +3 -13
- package/src/assets/skills/architecture/SKILL.md +29 -105
- package/src/assets/skills/boundary-validation/SKILL.md +27 -78
- package/src/assets/skills/complexity/SKILL.md +8 -104
- package/src/assets/skills/compliance/SKILL.md +9 -67
- package/src/assets/skills/consistency/SKILL.md +7 -107
- package/src/assets/skills/database/SKILL.md +7 -72
- package/src/assets/skills/dependencies/SKILL.md +9 -109
- package/src/assets/skills/dependencies/references/detection.md +10 -0
- package/src/assets/skills/dependency-research/SKILL.md +9 -63
- package/src/assets/skills/design-review/SKILL.md +1 -35
- package/src/assets/skills/docs-framework/SKILL.md +4 -47
- package/src/assets/skills/documentation/SKILL.md +7 -71
- package/src/assets/skills/documentation/references/patterns.md +1 -1
- package/src/assets/skills/documentation/references/violations.md +1 -1
- package/src/assets/skills/feature-knowledge/SKILL.md +19 -222
- package/src/assets/skills/feature-knowledge/references/new-kb.md +128 -0
- package/src/assets/skills/gap-analysis/SKILL.md +1 -31
- package/src/assets/skills/git/SKILL.md +2 -22
- package/src/assets/skills/go/SKILL.md +24 -113
- package/src/assets/skills/java/SKILL.md +12 -98
- package/src/assets/skills/patterns/SKILL.md +8 -93
- package/src/assets/skills/performance/SKILL.md +29 -88
- package/src/assets/skills/python/SKILL.md +22 -120
- package/src/assets/skills/qa/SKILL.md +16 -54
- package/src/assets/skills/qa/references/browser-testing.md +0 -24
- package/src/assets/skills/qa/references/sources.md +2 -2
- package/src/assets/skills/quality-gates/SKILL.md +13 -100
- package/src/assets/skills/react/SKILL.md +33 -95
- package/src/assets/skills/regression/SKILL.md +8 -73
- package/src/assets/skills/reliability/SKILL.md +11 -120
- package/src/assets/skills/research-codebase/SKILL.md +7 -49
- package/src/assets/skills/research-competitor/SKILL.md +4 -39
- package/src/assets/skills/research-external/SKILL.md +5 -43
- package/src/assets/skills/research-market/SKILL.md +5 -43
- package/src/assets/skills/research-technology/SKILL.md +8 -68
- package/src/assets/skills/review-methodology/SKILL.md +10 -56
- package/src/assets/skills/rust/SKILL.md +19 -109
- package/src/assets/skills/security/SKILL.md +39 -66
- package/src/assets/skills/software-design/SKILL.md +20 -105
- package/src/assets/skills/software-design/references/patterns.md +84 -2
- package/src/assets/skills/software-design/references/violations.md +1 -1
- package/src/assets/skills/test-driven-development/SKILL.md +32 -107
- package/src/assets/skills/test-driven-development/references/rationalization-prevention.md +33 -1
- package/src/assets/skills/testing/SKILL.md +35 -53
- package/src/assets/skills/typescript/SKILL.md +23 -102
- package/src/assets/skills/ui-design/SKILL.md +26 -74
- package/src/assets/skills/worktree-support/SKILL.md +4 -10
- package/dist/curation-off/commands/dynamic-profile.md +0 -214
|
@@ -3,7 +3,7 @@ output-dir: dist/agents
|
|
|
3
3
|
---
|
|
4
4
|
---
|
|
5
5
|
name: Triage
|
|
6
|
-
description:
|
|
6
|
+
description: Assigns one blast-radius disposition verdict to each review issue. Never edits code.
|
|
7
7
|
model: opus
|
|
8
8
|
effort: high
|
|
9
9
|
skills:
|
|
@@ -22,7 +22,7 @@ omitClaudeMd: true
|
|
|
22
22
|
|
|
23
23
|
# Triage Agent
|
|
24
24
|
|
|
25
|
-
You
|
|
25
|
+
You validate every review issue and assign exactly one disposition from the blast-radius matrix. You judge only (see Boundaries).
|
|
26
26
|
|
|
27
27
|
## Input Context
|
|
28
28
|
|
|
@@ -40,25 +40,13 @@ You receive from orchestrator:
|
|
|
40
40
|
|
|
41
41
|
## Responsibilities
|
|
42
42
|
|
|
43
|
-
1. **Read context per issue**:
|
|
43
|
+
1. **Read context per issue**: Read 30 lines around each reported file:line. Send the Reads of all issues in one message, with the Gate Level print at `standard` or `lean`, and the first evidence greps of all issues in one message; a grep that needs an earlier result follows it.
|
|
44
44
|
<!-- curation:on -->
|
|
45
45
|
2. **Apply Decisions**: Scan the DECISIONS_CONTEXT index to identify relevant ADR and PF entries. Read full bodies on demand. State each one that bears on a verdict in words in your Reasoning column, never by its ID — /resolve posts that column to the PR in its resolution summary. Skip when DECISIONS_CONTEXT is empty or `(none)`. Rely only on entries whose verbatim ID is in the index — do not fabricate.
|
|
46
|
-
<!-- curation:end -->
|
|
47
|
-
<!-- curation:on -->
|
|
48
46
|
3. **Assign disposition**: Run the duplicate grouping pre-pass, then apply the blast-radius matrix to each group's primary. Every issue gets exactly one verdict (DUPLICATE included) — none may vanish.
|
|
49
47
|
<!-- curation:off -->
|
|
50
48
|
2. **Assign disposition**: Run the duplicate grouping pre-pass, then apply the blast-radius matrix to each group's primary. Every issue gets exactly one verdict (DUPLICATE included) — none may vanish.
|
|
51
49
|
<!-- curation:end -->
|
|
52
|
-
<!-- curation:on -->
|
|
53
|
-
4. **Document evidence**: FALSE_POSITIVE requires cited grep/file:line. BY_DESIGN requires a recorded decision, stated in words, or an inline comment/doc citation.
|
|
54
|
-
<!-- curation:off -->
|
|
55
|
-
3. **Document evidence**: FALSE_POSITIVE requires cited grep/file:line. BY_DESIGN requires a recorded decision, stated in words, or an inline comment/doc citation.
|
|
56
|
-
<!-- curation:end -->
|
|
57
|
-
<!-- curation:on -->
|
|
58
|
-
5. **Assign risk tier**: For every FIX_NOW issue, annotate Standard or Careful.
|
|
59
|
-
<!-- curation:off -->
|
|
60
|
-
4. **Assign risk tier**: For every FIX_NOW issue, annotate Standard or Careful.
|
|
61
|
-
<!-- curation:end -->
|
|
62
50
|
|
|
63
51
|
## Duplicate Grouping Pre-Pass
|
|
64
52
|
|
|
@@ -94,7 +82,7 @@ REQUIRES: a comment/doc in the code itself that explicitly documents the intent.
|
|
|
94
82
|
- The affected file is in DIFF_FILES (touched in this branch)
|
|
95
83
|
- The fix is isolated (Standard-risk) anywhere in the codebase
|
|
96
84
|
- Security or correctness issue in any code path touched by this branch
|
|
97
|
-
Annotate
|
|
85
|
+
Annotate every FIX_NOW verdict, from any clause, Standard or Careful (Risk Tier Definitions).
|
|
98
86
|
|
|
99
87
|
**4. FIX_SEPARATE** — valid but exceeds diff blast radius:
|
|
100
88
|
- Unrelated files not in DIFF_FILES that require wide refactor
|
|
@@ -104,7 +92,7 @@ Annotate risk tier: **Standard** (isolated, low blast radius) or **Careful** (pu
|
|
|
104
92
|
MUST become a tracked manage-debt ticket. Never report-only.
|
|
105
93
|
<!-- compliance:end -->
|
|
106
94
|
|
|
107
|
-
**5. TECH_DEBT** — LAST RESORT: only
|
|
95
|
+
**5. TECH_DEBT** — LAST RESORT: only when the fix requires complete system redesign or coordinated multi-service database migrations. "Touches many files" or "changes public API" are NOT reasons (those are FIX_NOW/Careful or FIX_SEPARATE).
|
|
108
96
|
|
|
109
97
|
**Terminal catch-all (no clause matched):** Any valid issue that did not match clauses 3–5: assess blast radius — if the fix scope is contained within the branch's purpose, assign **FIX_NOW** at the appropriate risk tier (Standard or Careful); if the fix scope clearly exceeds the branch's purpose, assign **FIX_SEPARATE**.
|
|
110
98
|
|
|
@@ -120,7 +108,7 @@ MUST become a tracked manage-debt ticket. Never report-only.
|
|
|
120
108
|
- Adding tests or improving logging
|
|
121
109
|
- Security fixes in isolated scope
|
|
122
110
|
|
|
123
|
-
**Careful** (Code agent
|
|
111
|
+
**Careful** (Code agent works test-first):
|
|
124
112
|
- Public API or function signature changes
|
|
125
113
|
- Shared state or data model modifications
|
|
126
114
|
- Changes touching more than 3 files
|
|
@@ -196,14 +184,7 @@ Report cap: final message at most about 1,500 tokens; longer material goes to a
|
|
|
196
184
|
|
|
197
185
|
## Boundaries
|
|
198
186
|
|
|
199
|
-
|
|
200
|
-
- Read files for 30-line context around each issue
|
|
201
|
-
- Run grep/Read for FALSE_POSITIVE evidence
|
|
202
|
-
<!-- curation:on -->
|
|
203
|
-
- Read ADR/PF bodies through the decisions index
|
|
204
|
-
<!-- curation:end -->
|
|
205
|
-
|
|
206
|
-
**Never:**
|
|
187
|
+
You read and judge, and never write. **Never:**
|
|
207
188
|
- Edit any file
|
|
208
189
|
- Run builds, tests, or lint
|
|
209
190
|
- Create commits or branches
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: Validate
|
|
3
|
-
description: Runs build, typecheck, lint and test; reports pass or fail with
|
|
3
|
+
description: Runs build, typecheck, lint and test; reports pass or fail with details; never fixes.
|
|
4
4
|
model: haiku
|
|
5
5
|
effort: medium
|
|
6
6
|
skills:
|
|
@@ -23,8 +23,6 @@ You run the project's validation commands and report the results; never fix code
|
|
|
23
23
|
- **VALIDATION_SCOPE**: `full` | `changed-only` (a test-filter hint)
|
|
24
24
|
- **GATE_LEVEL**, **BASE_SHA** (optional): see Lint pack.
|
|
25
25
|
|
|
26
|
-
**Worktree Support**: with `WORKTREE_PATH`, follow the `devflow:worktree-support` skill.
|
|
27
|
-
|
|
28
26
|
## Validation Order
|
|
29
27
|
|
|
30
28
|
Run the commands of package.json, Makefile, Cargo.toml or similar in this order, skipping any that do not exist and stopping on first failure:
|
|
@@ -18,7 +18,7 @@ cannot restore one.
|
|
|
18
18
|
@end
|
|
19
19
|
|
|
20
20
|
@define compliance_lens():
|
|
21
|
-
**Resolve the compliance lens** for each worktree root, from its settings line — the line resolved above for that root, by the settings block when this run has not yet resolved it (
|
|
21
|
+
**Resolve the compliance lens** for each worktree root, from its settings line — the line resolved above for that root, by the settings block when this run has not yet resolved it (no file check decides it).
|
|
22
22
|
|
|
23
23
|
**Set the compliance lens** from that line: {{compliance_frameworks()}}
|
|
24
24
|
@end
|
|
@@ -42,7 +42,7 @@ For this compliance focus, {{compliance_load(ids)}}
|
|
|
42
42
|
@end
|
|
43
43
|
|
|
44
44
|
@define compliance_inject():
|
|
45
|
-
**Set the compliance directive** from `COMPLIANCE_FRAMEWORKS`. `COMPLIANCE_DIRECTIVE` is empty when `COMPLIANCE_FRAMEWORKS` is `off`: a spawn line that holds only `{COMPLIANCE_DIRECTIVE}` is then left out
|
|
45
|
+
**Set the compliance directive** from `COMPLIANCE_FRAMEWORKS`. `COMPLIANCE_DIRECTIVE` is empty when `COMPLIANCE_FRAMEWORKS` is `off`: a spawn line that holds only `{COMPLIANCE_DIRECTIVE}` is then left out. Otherwise `COMPLIANCE_DIRECTIVE` is this one line, with `<ids>` replaced by the value of `COMPLIANCE_FRAMEWORKS`:
|
|
46
46
|
|
|
47
47
|
> {{compliance_directive("<ids>")}}
|
|
48
48
|
@end
|
|
@@ -1,14 +1,24 @@
|
|
|
1
|
+
@import { root_paths } from "./_docs_root.mds"
|
|
2
|
+
|
|
1
3
|
A partial: the decisions-index steps the knowledge-workflow commands and the
|
|
2
4
|
dynamic commands share.
|
|
3
5
|
|
|
6
|
+
`decisions_locate()` names where the ledger belongs and expands
|
|
7
|
+
the shared `root_paths()` step of `_docs_root.mds`. One `resolve-root.cjs` call, run once per
|
|
8
|
+
run, prints `LEDGER=`: the main worktree when the checkout is a linked worktree whose main
|
|
9
|
+
worktree holds a `.devflow/` folder that is not the home directory, else the toplevel, else
|
|
10
|
+
the start directory. That is the rule the curation hooks apply, so a command reads the index
|
|
11
|
+
the Curate agent writes. The import is selective and takes `root_paths` alone: that define has
|
|
12
|
+
no imports of its own, so it adds one node to the scope of each define here.
|
|
13
|
+
|
|
4
14
|
D-DECISIONS-LEARNING-GATE: a decisions load is gated on the settings line's
|
|
5
15
|
`CURATION`. Curation can be narrowed by the repository or the machine, and neither
|
|
6
16
|
can turn it back on (D-FEATURES-NARROW-ONLY). The settings line also reads
|
|
7
17
|
`CURATION=off` while git tracks the curation folders, or does not answer for them:
|
|
8
18
|
the files there are the repository's own content, and devflow reads nothing in a
|
|
9
19
|
folder it cannot tell is its own. So `decisions_gate()` is the one sentence every
|
|
10
|
-
decisions host carries: with `CURATION=off` the step is skipped before it
|
|
11
|
-
ledger
|
|
20
|
+
decisions host carries: with `CURATION=off` the step is skipped before it reads an index (the shared
|
|
21
|
+
root step may already have named the ledger folder, but reads no file in it). An unresolvable settings line reads `CURATION=off`, as the
|
|
12
22
|
fail-closed line does, because a failed resolution cannot show what git tracks. The
|
|
13
23
|
gate reads the line the host's settings block resolved above; this partial imports
|
|
14
24
|
nothing from `_settings.mds`. In a multi-worktree run the line is the start root's:
|
|
@@ -33,23 +43,13 @@ the gate and the locator, reached only from inside a curation-on arm, so a curat
|
|
|
33
43
|
none of the rule (D-LEARNING-VARIANTS).
|
|
34
44
|
|
|
35
45
|
@define decisions_gate():
|
|
36
|
-
When the settings line says `CURATION=off`, set `DECISIONS_CONTEXT` to `(none)` and skip this step,
|
|
46
|
+
When the settings line says `CURATION=off`, set `DECISIONS_CONTEXT` to `(none)` and skip this step, reading no index.
|
|
37
47
|
@end
|
|
38
48
|
|
|
39
49
|
@define decisions_locate():
|
|
40
|
-
The decisions ledger belongs to the repository, not to one checkout: a linked worktree reads the main worktree's copy
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
git -C "{start}" rev-parse --path-format=absolute --show-toplevel --git-common-dir
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
Line 1 is the checkout's toplevel, line 2 the common git directory. A git older than 2.31 echoes `--path-format=absolute` back as a line of its own first. `{ledger}` is the first that applies:
|
|
50
|
+
The decisions ledger belongs to the repository, not to one checkout: a linked worktree reads the main worktree's copy.
|
|
47
51
|
|
|
48
|
-
|
|
49
|
-
2. **The toplevel** — line 1, or on an older git the line after the echoed flag.
|
|
50
|
-
3. **The start directory itself** — when the command failed or printed no absolute toplevel (outside a git repository).
|
|
51
|
-
|
|
52
|
-
This is the rule the curation hooks apply, so you read the index the Curate agent writes.
|
|
52
|
+
{{root_paths()}}
|
|
53
53
|
@end
|
|
54
54
|
|
|
55
55
|
@define decisions_slice():
|
|
@@ -64,14 +64,9 @@ Hand each agent that takes `DECISIONS_CONTEXT` a slice, not the whole index: the
|
|
|
64
64
|
|
|
65
65
|
{{decisions_locate()}}
|
|
66
66
|
|
|
67
|
-
**Step 1 — Read the pre-rendered index
|
|
68
|
-
|
|
69
|
-
Attempt to read `{ledger}/.devflow/curation/index.md`.
|
|
67
|
+
**Step 1 — Read the pre-rendered index** `{ledger}/.devflow/curation/index.md`. Its content is `DECISIONS_CONTEXT`; if it is absent or empty, `DECISIONS_CONTEXT` is `(none)`.
|
|
70
68
|
|
|
71
|
-
|
|
72
|
-
- If the file is absent or empty: set `DECISIONS_CONTEXT` to `(none)`.
|
|
73
|
-
|
|
74
|
-
The index is one direct file read, written at render time by `render-decisions.cjs` — no `.cjs` script runs here.
|
|
69
|
+
The index is one direct file read.
|
|
75
70
|
|
|
76
71
|
**Step 2 — Slice the index, then hand it on:**
|
|
77
72
|
|
|
@@ -79,8 +74,6 @@ When `DECISIONS_CONTEXT` is not `(none)`, hand it only to the agents whose contr
|
|
|
79
74
|
|
|
80
75
|
{{decisions_slice()}}
|
|
81
76
|
|
|
82
|
-
Those agents follow `devflow:apply-decisions`. A host that uses the index in its own thread says so in its own step.
|
|
83
|
-
|
|
84
77
|
<!-- curation:end -->
|
|
85
78
|
@end
|
|
86
79
|
|
|
@@ -1,4 +1,18 @@
|
|
|
1
|
-
A partial: where a command's `.devflow/docs/` artifacts live (D-DOCS-ROOT, #406).
|
|
1
|
+
A partial: where a command's roots are, and where its `.devflow/docs/` artifacts live (D-DOCS-ROOT, #406).
|
|
2
|
+
|
|
3
|
+
`root_paths()` is the one step that resolves both roots a command works from. One call
|
|
4
|
+
of `resolve-root.cjs` prints `WORKTREE=` (the checkout's toplevel, else the start
|
|
5
|
+
directory) and `LEDGER=` (the decisions ledger's root: the main worktree when the
|
|
6
|
+
checkout is a linked worktree and the main worktree holds a `.devflow/` folder, else the
|
|
7
|
+
toplevel). The script holds no judgment: it takes the git call and the ledger rule from
|
|
8
|
+
`resolve-settings.cjs`, the rule the curation hooks apply. The step runs once per start
|
|
9
|
+
directory, so a run over several worktrees resolves each one.
|
|
10
|
+
`docs_root()` here, `knowledge_root()` in `_knowledge.mds` and `decisions_locate()` in
|
|
11
|
+
`_decisions.mds` each expand it, so no host needs to know which of its steps comes
|
|
12
|
+
first: the first one to run calls the script and the others reuse the answer. Each of the
|
|
13
|
+
three adds only the facts its own host needs after the step. When the script fails, both
|
|
14
|
+
roots are the start directory. A curation-off build also carries the `LEDGER=` line: the
|
|
15
|
+
script only names that folder and reads no file in it.
|
|
2
16
|
|
|
3
17
|
D-DOCS-ROOT extends D-PROMPT-ROOT from the decisions and knowledge loaders to
|
|
4
18
|
every docs artifact a command reads or writes — design documents, research
|
|
@@ -6,9 +20,8 @@ output, bug-analysis and wave directories, ticket sets, and `/implement`'s
|
|
|
6
20
|
handoff and evidence files. They belong to the checkout, not to the directory
|
|
7
21
|
the session started in: a relative `.devflow/docs/…` path written from
|
|
8
22
|
`packages/app` scattered a second `.devflow/docs/` tree there, which no later
|
|
9
|
-
run found. The
|
|
10
|
-
|
|
11
|
-
per repository like the decisions ledger.
|
|
23
|
+
run found. The root is `WORKTREE`, because docs artifacts are per checkout like
|
|
24
|
+
knowledge bases, not per repository like the decisions ledger.
|
|
12
25
|
|
|
13
26
|
A path handed to an agent in repo-relative form (the fields the Git agent's
|
|
14
27
|
operations print into a PR or issue comment, where an absolute path would leak
|
|
@@ -18,18 +31,26 @@ relative to, which the receiving agent resolves it under.
|
|
|
18
31
|
forms; `tests/commands/partials-root.test.ts` runs the resolution command below
|
|
19
32
|
from a root, a subdirectory and a worktree.
|
|
20
33
|
|
|
21
|
-
|
|
34
|
+
Two defines, no imports of their own: MDS deep-clones a module's whole scope into
|
|
22
35
|
every define, so a selective import's capture cost is paid over the importer's
|
|
23
|
-
scope
|
|
36
|
+
scope. The hosts import `docs_root` alone, and `_knowledge.mds` and `_decisions.mds`
|
|
37
|
+
import `root_paths` alone; each adds one node to the importer's scope.
|
|
24
38
|
|
|
25
|
-
@define
|
|
26
|
-
|
|
39
|
+
@define root_paths():
|
|
40
|
+
Once per start directory (`WORKTREE_PATH` if provided, otherwise cwd), run from it:
|
|
27
41
|
|
|
28
42
|
```bash
|
|
29
|
-
|
|
43
|
+
node "$HOME/.devflow/scripts/resolve-root.cjs" "{start}"; echo "exit=$?"
|
|
30
44
|
```
|
|
31
45
|
|
|
32
|
-
|
|
46
|
+
Accept only the three lines `WORKTREE=<absolute path>`, `LEDGER=<absolute path>` and `exit=0`, which set `{worktree}` and `{ledger}`. Otherwise both are the start directory.
|
|
47
|
+
@end
|
|
48
|
+
|
|
49
|
+
@define docs_root():
|
|
50
|
+
**Docs root (D-DOCS-ROOT).** Every `.devflow/docs/` path is `{worktree}/.devflow/docs/…`. A repo-relative docs path handed to an agent travels with a `WORKTREE_PATH` naming its checkout.
|
|
51
|
+
|
|
52
|
+
{{root_paths()}}
|
|
33
53
|
@end
|
|
34
54
|
|
|
55
|
+
@export root_paths
|
|
35
56
|
@export docs_root
|
|
@@ -1,37 +1,30 @@
|
|
|
1
1
|
@define gate1_postcode():
|
|
2
|
-
### GATE 1 — Post-code pipeline
|
|
2
|
+
### GATE 1 — Post-code pipeline
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
Run in this order:
|
|
5
5
|
|
|
6
6
|
1. **Polish agent** — reduce complexity, remove duplication
|
|
7
7
|
2. **Harden agent** — 9-pillar self-review (deep structural analysis); returns `{"status": "PASS" | "FIXED" | "BLOCKED"}`
|
|
8
8
|
- BLOCKED (a P0 issue cannot be fixed in scope), or a missing or unrecognised status, which counts as BLOCKED → stop the pass and escalate as `harden-blocked`; Validate does not run on code Harden could not accept
|
|
9
|
-
3. **Validate agent** — build / typecheck / lint / test; returns `{"verdict": "PASS" | "FAIL", "details": "..."}`. It runs
|
|
10
|
-
- Build/test commands follow `build_execution_doctrine()`: the Validate agent's Running commands block, foreground under an explicit Bash timeout.
|
|
9
|
+
3. **Validate agent** — build / typecheck / lint / test; returns `{"verdict": "PASS" | "FAIL", "details": "..."}`. It runs last and unconditionally: one full run over the HEAD that Polish and Harden left, so it covers their commits whether or not Harden changed code
|
|
11
10
|
- FAIL → Fix agent fix (max 2 retries), each followed by a Validate agent re-run
|
|
12
|
-
- If still FAIL after 2 retries → escalate as `validation-exhausted`
|
|
11
|
+
- If still FAIL after 2 retries → escalate as `validation-exhausted`
|
|
13
12
|
|
|
14
13
|
**Gate 1 contains NO Evaluate agent and NO Test agent.** Those are Gate 2 only.
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
**Cadence — Gate 1 runs at exactly TWO points per ticket:**
|
|
15
|
+
**Cadence — Gate 1 runs at exactly two points per ticket:**
|
|
19
16
|
1. **Gate 1 #1** — immediately after the initial Code agent implementation (inside `implement_bundle()`). An escalated result — Validate exhausted, or Harden BLOCKED — returns early: the ticket's engine returns `ESCALATED` with one escalation, and Gate 2 and the review pass never run on a broken or unfinished build.
|
|
20
|
-
2. **Gate 1 #2** — the
|
|
21
|
-
|
|
22
|
-
It does NOT run inside the review pass, nor after each individual Gate-2 / review / QA fix. At those points the fixing Code agent self-verifies its OWN build compiles (see `review_pass()` and the Code agent's Running commands block). The final Gate 1 #2 is the invariant that all written code passes before merge.
|
|
17
|
+
2. **Gate 1 #2** — the final gate, after all Gate-2 fixes and the entire review pass have completed. Harden BLOCKED here is `ESCALATED` as well.
|
|
23
18
|
@end
|
|
24
19
|
|
|
25
20
|
@define gate2_acceptance():
|
|
26
|
-
### GATE 2 — Acceptance gate (per ticket, plan-scoped
|
|
21
|
+
### GATE 2 — Acceptance gate (per ticket, plan-scoped)
|
|
27
22
|
|
|
28
|
-
Gate 2 fires
|
|
29
|
-
|
|
30
|
-
Gate 2 inputs are produced by `/devflow:dynamic-plan`'s plan-challenge step — the acceptance criteria and test plan written for the Evaluate agent and Test agent.
|
|
23
|
+
Gate 2 fires once: after the implement-bundle and before the review pass. It does not re-run after review-fixes (those get Gate 1 only).
|
|
31
24
|
|
|
32
25
|
**Evaluate agent** (only if a plan exists):
|
|
33
|
-
- Run `evaluator_panel()`
|
|
34
|
-
- If the Evaluate agent returns FAIL (either lens failed): fix-and-continue —
|
|
26
|
+
- Run `evaluator_panel()`
|
|
27
|
+
- If the Evaluate agent returns FAIL (either lens failed): fix-and-continue — a Fix agent applies the demanded fixes and self-verifies its own build (batched as in the review pass if numerous). The recorded verdict becomes `FAIL-FIXED` (fixes applied, not re-evaluated); Gate 2 then proceeds. In SINGLE mode the run reports it as `UNVERIFIED`, never PASS.
|
|
35
28
|
|
|
36
29
|
**Test agent** (only if acceptance criteria or a test plan exist):
|
|
37
30
|
- Scenario-based acceptance tests covering functionality, API contracts, performance
|
|
@@ -41,24 +34,18 @@ Gate 2 inputs are produced by `/devflow:dynamic-plan`'s plan-challenge step —
|
|
|
41
34
|
**When Gate 2 inputs are absent:**
|
|
42
35
|
- No plan → skip the Evaluate agent silently (note in output: "Gate 2 Evaluate agent skipped — no plan available")
|
|
43
36
|
- No acceptance criteria and no test plan → skip Test agent silently (note in output: "Gate 2 Test agent skipped — no criteria available")
|
|
44
|
-
- Build proceeds Gate-1-only. Never refuse to build; never force-generate fake criteria. Trust the user.
|
|
45
37
|
@end
|
|
46
38
|
|
|
47
39
|
@define evaluator_panel():
|
|
48
40
|
### Evaluate agent spawn (one agent, two lenses)
|
|
49
41
|
|
|
50
|
-
Run
|
|
51
|
-
|
|
52
|
-
1. **Acceptance criteria** — "Does the implementation satisfy each numbered acceptance criterion, INCLUDING the negative criteria (what it must NOT do)?"
|
|
53
|
-
2. **Scope / intent drift** — "Did the Code agent smuggle in unplanned changes, deviate from the plan's intent, or introduce anti-features?"
|
|
54
|
-
|
|
55
|
-
It returns `{"verdict": "PASS" | "FAIL", "rationale": "..."}`: FAIL when either lens fails, the rationale naming the failing criterion or the drift. A FAIL on either lens blocks acceptance. A wave ticket runs this same skeleton through `runSingleTicketEngine`, so it gets the same single spawn.
|
|
42
|
+
Run one Evaluate agent whose prompt names both lenses, as the SINGLE skeleton's Gate 2 prompt words them: acceptance criteria (negative criteria included) and scope or intent drift. FAIL when either lens fails.
|
|
56
43
|
@end
|
|
57
44
|
|
|
58
45
|
@define implement_bundle():
|
|
59
46
|
### Implement bundle
|
|
60
47
|
|
|
61
|
-
|
|
48
|
+
Run in order:
|
|
62
49
|
|
|
63
50
|
```
|
|
64
51
|
<!-- curation:on -->
|
|
@@ -75,8 +62,6 @@ Every Code-family agent prompt opens with `OPERATION: <mode>` as its first line:
|
|
|
75
62
|
<!-- curation:off -->
|
|
76
63
|
Every Code-family agent prompt opens with `OPERATION: <mode>` as its first line: `implement` and `issue-fix` go to `agentType:"Code"`, `validation-fix`, `alignment-fix` and `qa-fix` go to `agentType:"Fix"`. It must include: task description, implementation plan (if one exists), the compliance directive (`COMPLIANCE_DIRECTIVE` — every Code prompt carries it when it is not empty, fix prompts included), and any PRIOR_PHASE_SUMMARY / HANDOFF_FILE for sequential multi-phase tickets.
|
|
77
64
|
<!-- curation:end -->
|
|
78
|
-
|
|
79
|
-
Gate 2 runs at implementation acceptance — this matches devflow's deliberate placement: "evaluation is part of implementation acceptance, not post-review" (§6.1).
|
|
80
65
|
@end
|
|
81
66
|
|
|
82
67
|
@define review_pass():
|
|
@@ -93,7 +78,7 @@ Core Review agents (always, 8 total): security, architecture, performance, compl
|
|
|
93
78
|
Conditional by file type detected in the diff (add these when relevant):
|
|
94
79
|
- `.ts` / `.tsx` → typescript
|
|
95
80
|
- `.tsx` / `.jsx` → react, accessibility, ui-design
|
|
96
|
-
- `.
|
|
81
|
+
- `.css` / `.scss` → ui-design
|
|
97
82
|
- `.go` → go
|
|
98
83
|
- `.java` → java
|
|
99
84
|
- `.py` → python
|
|
@@ -102,18 +87,13 @@ Conditional by file type detected in the diff (add these when relevant):
|
|
|
102
87
|
- `package.json` / `go.mod` / `Cargo.toml` / etc. → dependencies
|
|
103
88
|
- Markdown / doc files → documentation
|
|
104
89
|
|
|
105
|
-
**Spawn pacing:** launch Review agents in staggered chunks of 4–6 (sequential groups of parallel spawns)
|
|
90
|
+
**Spawn pacing:** launch Review agents in staggered chunks of 4–6 (sequential groups of parallel spawns).
|
|
106
91
|
|
|
107
|
-
**Review agent result contract:** every Review agent
|
|
108
|
-
|
|
109
|
-
Each Review agent gets `agentType: "Review"` with its focus baked into the prompt. Total: 8–19 Review agents per pass.
|
|
92
|
+
**Review agent result contract:** every Review agent must return a structured result with fields `focus`, `reviewed: true`, `filesExamined`, and `findings`. Each item in `findings` must carry: `file` (path of the primary file the finding relates to, or `null` if scope is unknown), `description` (one-sentence issue statement), and `severity` (`critical | high | medium | low`). A result is DEAD if: the agent returned null, threw, returned a guard string, or `reviewed !== true`. A DEAD Review agent is never treated as a clean reviewer. Retry once sequentially. If still dead after retry: record the focus in `coverageGaps`. A pass with any coverage gaps can never early-exit as clean, and the run verdict can never be PASS; escalate with message "review coverage incomplete: <focus>".
|
|
110
93
|
|
|
111
94
|
**Step 2 — Adversarial finding verification**
|
|
112
95
|
|
|
113
|
-
Before any fix, verify findings with
|
|
114
|
-
- "Does this finding actually reproduce given the current code?"
|
|
115
|
-
- "Is this a real issue or a false positive in context?"
|
|
116
|
-
- "Does the cited rule/principle actually apply here?"
|
|
96
|
+
Before any fix, verify findings with 2–3 agents, one per lens of the skeleton's verification panel.
|
|
117
97
|
|
|
118
98
|
Majority-survives: a finding needs >50% of verification lenses to confirm it. Strip unconfirmed findings.
|
|
119
99
|
|
|
@@ -121,27 +101,27 @@ Majority-survives: a finding needs >50% of verification lenses to confirm it. St
|
|
|
121
101
|
|
|
122
102
|
If no surviving findings: return early (no fixes needed). Any coverageGaps are carried in the return — they block a PASS verdict downstream, not the early exit.
|
|
123
103
|
|
|
124
|
-
If survivors remain: batch the confirmed findings for fixing: group findings by file — one file per set of sub-batches, chunked at max 5 findings per sub-batch; never mix two files in one batch. A finding with no `file` field is its own singleton batch. Sub-batches for the
|
|
104
|
+
If survivors remain: batch the confirmed findings for fixing: group findings by file — one file per set of sub-batches, chunked at max 5 findings per sub-batch; never mix two files in one batch. A finding with no `file` field is its own singleton batch. Sub-batches for the same file run sequentially (never two Code agents editing the same file concurrently); sub-batches for distinct files run via `parallel()` in staggered chunks of ~5. Each Code agent's prompt pins a return contract: `{"status": "fixed"|"blocked", "commitShas": [...], "unresolved": [...]}` — a chunk is FIXED only when `result.status === "fixed"` AND `commitShas` is non-empty AND `result.unresolved` is empty; never decide disposition from status alone. A non-empty `unresolved` list means the agent named work it could not complete — carry the whole chunk into `survivingFindings` rather than guessing which findings the strings map to. `survivingFindings` = findings not addressed: fix Code agent dead/failed/blocked/deferred or committed but left work named in `unresolved`. The fixing Code agent **self-verifies its own fix builds** (build/typecheck per the Code agent's Running commands block, once over its whole batch). Do not run Gate 1 or Gate 2 inside the pass (no Validate, Polish, Harden, Evaluate or Test agent).
|
|
125
105
|
@end
|
|
126
106
|
|
|
127
107
|
@define concurrency_doctrine():
|
|
128
|
-
### Code agent concurrency doctrine
|
|
108
|
+
### Code agent concurrency doctrine
|
|
129
109
|
|
|
130
110
|
**DEFAULT: SEQUENTIAL.** Parallelism is the rare, tightly-gated exception.
|
|
131
111
|
|
|
132
|
-
- **Same task → sequential Code agents with handoff.
|
|
133
|
-
- **Different tasks
|
|
112
|
+
- **Same task → sequential Code agents with handoff. Never parallel.**
|
|
113
|
+
- **Different tasks may parallelize, but only when all three bars hold:**
|
|
134
114
|
1. Completely different areas of the code — different files/modules, no imports between them, no shared contracts/interfaces
|
|
135
115
|
2. Different feature logic — they do not touch the same feature's logic or cooperate on a single outcome
|
|
136
116
|
3. Different goals — they are not two steps converging on the same end state
|
|
137
|
-
-
|
|
138
|
-
- **When in doubt, sequential.** Parallel must be affirmatively justified against all three bars.
|
|
117
|
+
- "They look independent" is not sufficient. If two tasks are somewhat related — they touch the same feature, one's completion makes the other meaningful, or they march toward a shared goal — run them sequentially.
|
|
118
|
+
- **When in doubt, sequential.** Parallel must be affirmatively justified against all three bars.
|
|
139
119
|
|
|
140
|
-
This applies to both: multiple Code agents working on a single ticket
|
|
120
|
+
This applies to both: multiple Code agents working on a single ticket and multi-ticket scheduling in a wave.
|
|
141
121
|
@end
|
|
142
122
|
|
|
143
123
|
@define build_execution_doctrine():
|
|
144
|
-
### Build execution doctrine — the Running commands block
|
|
124
|
+
### Build execution doctrine — the Running commands block
|
|
145
125
|
|
|
146
126
|
The Code, Fix, Refactor, Validate and Test agents each carry this `## Running commands` block in their bodies, so each prompt in this engine names the block ("your Running commands block") instead of copying it:
|
|
147
127
|
|
|
@@ -156,17 +136,15 @@ Run builds, typechecks, lints and tests in the foreground, each with an explicit
|
|
|
156
136
|
- Never wrap a build or test command in `sh -c`, `bash -c`, `python3 -c` or `node -e`: permission rules deny wrapped commands they allow directly.
|
|
157
137
|
- The same rules hold inside a dynamic Workflow sub-agent.
|
|
158
138
|
|
|
159
|
-
**Cheapest-sufficient validation:** iterate with the fastest check that proves the change — `tsc --noEmit`, `cargo check`, `go vet`, a single test file
|
|
160
|
-
|
|
161
|
-
**One build gate per phase:** batch related fixes, validate once. A fix-pass Code agent runs ONE light check over its whole batch — never several invocations per small fix. Do NOT validate after every individual mutation; validate once after the batch is complete.
|
|
139
|
+
**Cheapest-sufficient validation:** iterate with the fastest check that proves the change — `tsc --noEmit`, `cargo check`, `go vet`, a single test file. Reserve full builds and whole-suite runs for the final gates.
|
|
162
140
|
|
|
163
|
-
**
|
|
141
|
+
**One build gate per phase:** batch related fixes, validate once. A fix-pass Code agent runs one light check over its whole batch, never one per fix. After the wave, the full-workspace regression is the human's job.
|
|
164
142
|
@end
|
|
165
143
|
|
|
166
144
|
@define engine_output_schema():
|
|
167
145
|
### Engine output schema
|
|
168
146
|
|
|
169
|
-
Each ticket engine run returns a structured result. The
|
|
147
|
+
Each ticket engine run returns a structured result. The engine fills `verdict`: the SINGLE skeleton's `overallVerdict`, or `ESCALATED` from the ticket-link or branch stop. The wave merges `PASS` and `UNVERIFIED` and quarantines every other value, or none.
|
|
170
148
|
|
|
171
149
|
```json
|
|
172
150
|
{
|
|
@@ -214,15 +192,15 @@ Each ticket engine run returns a structured result. The Synthesize agent or the
|
|
|
214
192
|
@end
|
|
215
193
|
|
|
216
194
|
@define engine_invariants():
|
|
217
|
-
### Engine invariants
|
|
195
|
+
### Engine invariants
|
|
218
196
|
|
|
219
|
-
1. **Code is written
|
|
220
|
-
2. **Findings are verified before any fix is written.**
|
|
221
|
-
3. **All written code passes Gate 1.** No code merge, commit, or handoff before Polish agent + Harden agent + Validate agent (in that order
|
|
222
|
-
4. **Gate 2 runs once, at implementation acceptance.**
|
|
223
|
-
5. **NEVER auto-merge to main or master.** All merges target the integration branch.
|
|
197
|
+
1. **Code is written only by the Code family (Code, Fix).** No other agent type writes code.
|
|
198
|
+
2. **Findings are verified before any fix is written.** Unverified findings are not passed to the Code agent.
|
|
199
|
+
3. **All written code passes Gate 1.** No code merge, commit, or handoff before Polish agent + Harden agent + Validate agent (in that order).
|
|
200
|
+
4. **Gate 2 runs once, at implementation acceptance.**
|
|
201
|
+
5. **NEVER auto-merge to main or master.** All merges target the integration branch.
|
|
224
202
|
6. **No unauthorized tracker or remote side-effects.** Sub-agents NEVER create issues/PRs on the tracker, comment on them, or push beyond the ticket-authorized branch unless the ticket, plan, or user explicitly authorizes that exact action. This applies to whatever tracker is resolved, not to one vendor. Proposed follow-ups go in the run report.
|
|
225
|
-
7. **The review pass runs exactly ONCE per ticket.** Never author additional cycles or a delta re-review of fix commits.
|
|
203
|
+
7. **The review pass runs exactly ONCE per ticket.** Never author additional cycles or a delta re-review of fix commits.
|
|
226
204
|
@end
|
|
227
205
|
|
|
228
206
|
@export gate1_postcode
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
node "$HOME/.devflow/scripts/resolve-evidence-policy.cjs" 2>/dev/null; echo "exit=$?"
|
|
6
6
|
```
|
|
7
7
|
|
|
8
|
-
Accept the output only when it is exactly two lines: `exit=0` last and, before it, one line of the form `EVIDENCE_POLICY=<required|standard> SOURCE=<file|worktree|default|invalid|error> REF=<branch|none>[ WARN=<remote-unavailable|invalid-file|raised-by-compliance|pr-changes-policy>[,…]] ISSUE_REQUIRED=<true|false> APPLY_CONVENTIONS=<true|false> REQUIRE_NON_AUTHOR_APPROVAL=<true|false>` — these fields, in this order, nothing else, where `<branch>` is a branch name
|
|
8
|
+
Accept the output only when it is exactly two lines: `exit=0` last and, before it, one line of the form `EVIDENCE_POLICY=<required|standard> SOURCE=<file|worktree|default|invalid|error> REF=<branch|none>[ WARN=<remote-unavailable|invalid-file|raised-by-compliance|pr-changes-policy>[,…]] ISSUE_REQUIRED=<true|false> APPLY_CONVENTIONS=<true|false> REQUIRE_NON_AUTHOR_APPROVAL=<true|false>` — these fields, in this order, nothing else, where `<branch>` is a branch name. **Anything else** (including a script that cannot run) ⇒ use `EVIDENCE_POLICY=required SOURCE=error REF=none ISSUE_REQUIRED=true APPLY_CONVENTIONS=true REQUIRE_NON_AUTHOR_APPROVAL=true` instead.
|
|
9
9
|
|
|
10
10
|
Set `EVIDENCE_POLICY`, `ISSUE_REQUIRED`, `APPLY_CONVENTIONS` and `REQUIRE_NON_AUTHOR_APPROVAL` from the accepted line. Pass agents only the three mechanism inputs, never `EVIDENCE_POLICY`. Report `Evidence policy: {EVIDENCE_POLICY} (source: {SOURCE})`, plus any `WARN` tokens as advisory, once in the final report.
|
|
11
11
|
@end
|