devflow-kit 3.2.0 → 3.3.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 +16 -0
- package/README.md +1 -1
- package/dist/cli/commands/learning.js +25 -5
- package/dist/commands/code-review.md +1 -1
- package/dist/commands/debug.md +1 -1
- package/dist/commands/dynamic-build.md +141 -94
- package/dist/commands/dynamic-plan.md +1 -1
- package/dist/commands/explore.md +1 -1
- package/dist/commands/implement.md +133 -133
- package/dist/commands/resolve.md +27 -16
- package/dist/commands/self-review.md +16 -11
- package/dist/core/agent-models.js +10 -7
- package/dist/core/learning-tuning-config.js +8 -0
- package/dist/core/plugins.js +7 -2
- package/dist/skills/git/references/tracker/github/gather-release-evidence.md +1 -1
- package/dist/skills/git/references/tracker/jira/gather-release-evidence.md +1 -1
- package/dist/skills/git/references/tracker/linear/gather-release-evidence.md +1 -1
- package/package.json +1 -1
- package/src/assets/agents/code.md +71 -18
- package/src/assets/agents/design.md +10 -0
- package/src/assets/agents/diagnose.md +16 -11
- package/src/assets/agents/evaluate.md +14 -25
- package/src/assets/agents/knowledge.md +5 -3
- package/src/assets/agents/learning.md +4 -6
- package/src/assets/agents/research.md +19 -0
- package/src/assets/agents/review.md +10 -0
- package/src/assets/agents/scrutinize.md +34 -10
- package/src/assets/agents/simplify.md +20 -0
- package/src/assets/agents/skim.md +4 -2
- package/src/assets/agents/synthesize.md +12 -0
- package/src/assets/agents/test.md +2 -2
- package/src/assets/agents/triage.md +7 -1
- package/src/assets/agents/validate.md +7 -2
- package/src/assets/commands/_partials/_engine.mds +21 -24
- package/src/assets/commands/_partials/_knowledge.mds +1 -1
- package/src/assets/commands/_partials/_plan_contract.mds +1 -1
- package/src/assets/commands/_partials/_wave.mds +8 -6
- package/src/assets/commands/code-review.mds +1 -1
- package/src/assets/commands/dynamic-build.mds +111 -63
- package/src/assets/commands/implement.mds +132 -132
- package/src/assets/commands/resolve.mds +26 -15
- package/src/assets/commands/self-review.mds +15 -10
- package/src/assets/mds/tracker/_common.mds +1 -1
- package/src/assets/scripts/ci-wait.cjs +636 -0
- package/src/assets/scripts/hooks/assets/orchestrator-charter.md +1 -1
- package/src/assets/scripts/hooks/background-memory-update +290 -9
- package/src/assets/scripts/release-trace.cjs +27 -10
- package/src/assets/skills/accessibility/SKILL.md +1 -1
- package/src/assets/skills/apply-decisions/SKILL.md +12 -82
- package/src/assets/skills/apply-feature-knowledge/SKILL.md +8 -42
- package/src/assets/skills/architecture/SKILL.md +1 -1
- package/src/assets/skills/boundary-validation/SKILL.md +1 -1
- package/src/assets/skills/complexity/SKILL.md +1 -1
- package/src/assets/skills/compliance/SKILL.md +1 -1
- package/src/assets/skills/consistency/SKILL.md +1 -1
- package/src/assets/skills/database/SKILL.md +1 -1
- package/src/assets/skills/dependencies/SKILL.md +1 -1
- package/src/assets/skills/dependency-research/SKILL.md +3 -6
- package/src/assets/skills/design-review/SKILL.md +1 -1
- package/src/assets/skills/docs-framework/SKILL.md +1 -1
- package/src/assets/skills/documentation/SKILL.md +1 -1
- package/src/assets/skills/gap-analysis/SKILL.md +1 -1
- package/src/assets/skills/git/SKILL.md +1 -1
- package/src/assets/skills/go/SKILL.md +1 -1
- package/src/assets/skills/java/SKILL.md +1 -1
- package/src/assets/skills/patterns/SKILL.md +1 -1
- package/src/assets/skills/performance/SKILL.md +1 -1
- package/src/assets/skills/python/SKILL.md +1 -1
- package/src/assets/skills/qa/SKILL.md +1 -3
- package/src/assets/skills/quality-gates/SKILL.md +9 -12
- package/src/assets/skills/quality-gates/references/report-template.md +20 -20
- package/src/assets/skills/react/SKILL.md +1 -1
- package/src/assets/skills/regression/SKILL.md +1 -1
- package/src/assets/skills/reliability/SKILL.md +1 -1
- package/src/assets/skills/research-codebase/SKILL.md +1 -1
- package/src/assets/skills/research-competitor/SKILL.md +1 -1
- package/src/assets/skills/research-external/SKILL.md +1 -1
- package/src/assets/skills/research-technology/SKILL.md +1 -1
- package/src/assets/skills/review-methodology/SKILL.md +1 -1
- package/src/assets/skills/rust/SKILL.md +1 -1
- package/src/assets/skills/security/SKILL.md +1 -1
- package/src/assets/skills/software-design/SKILL.md +1 -1
- package/src/assets/skills/test-driven-development/SKILL.md +9 -29
- package/src/assets/skills/testing/SKILL.md +1 -1
- package/src/assets/skills/typescript/SKILL.md +1 -1
- package/src/assets/skills/ui-design/SKILL.md +1 -1
- package/src/assets/skills/worktree-support/SKILL.md +3 -55
- package/src/assets/skills/worktree-support/references/discovery.md +48 -0
- package/src/assets/skills/worktree-support/references/roots.md +2 -2
|
@@ -2,17 +2,37 @@
|
|
|
2
2
|
name: Scrutinize
|
|
3
3
|
description: Self-review agent that evaluates and fixes implementation issues using 9-pillar framework. Runs in fresh context after Code agent completes.
|
|
4
4
|
model: opus
|
|
5
|
+
effort: medium
|
|
5
6
|
skills:
|
|
6
7
|
- devflow:quality-gates
|
|
7
8
|
- devflow:software-design
|
|
8
9
|
- devflow:worktree-support
|
|
9
10
|
- devflow:apply-decisions
|
|
10
11
|
- devflow:apply-feature-knowledge
|
|
12
|
+
disallowedTools:
|
|
13
|
+
- Agent
|
|
14
|
+
- SendMessage
|
|
15
|
+
- NotebookEdit
|
|
16
|
+
- EnterWorktree
|
|
17
|
+
- ExitWorktree
|
|
18
|
+
- ArtifactComments
|
|
19
|
+
- ArtifactData
|
|
20
|
+
- TodoWrite
|
|
21
|
+
- AskUserQuestion
|
|
22
|
+
- TaskOutput
|
|
23
|
+
- ScheduleWakeup
|
|
24
|
+
- CronCreate
|
|
25
|
+
- CronDelete
|
|
26
|
+
- CronList
|
|
27
|
+
- RemoteTrigger
|
|
28
|
+
- PushNotification
|
|
29
|
+
- DesignSync
|
|
30
|
+
- Skill
|
|
11
31
|
---
|
|
12
32
|
|
|
13
33
|
# Scrutinize Agent
|
|
14
34
|
|
|
15
|
-
You are a meticulous self-review specialist. You evaluate implementations against the 9-pillar quality framework and fix issues
|
|
35
|
+
You are a meticulous self-review specialist. You evaluate implementations against the 9-pillar quality framework and fix the issues you find. You run in a fresh context after the Code and Simplify agents complete, ensuring adequate resources for thorough review and fixes.
|
|
16
36
|
|
|
17
37
|
## Input Context
|
|
18
38
|
|
|
@@ -34,15 +54,15 @@ Follow the `devflow:apply-decisions` skill to scan the index, Read full bodies o
|
|
|
34
54
|
|
|
35
55
|
2. **Evaluate P0 pillars** (Design, Functionality, Security): These MUST pass. Fix all issues found.
|
|
36
56
|
|
|
37
|
-
3. **Detect stubs and wiring gaps**: Check for placeholder implementations that compile but don't deliver real functionality. See `references/stub-detection.md` for patterns. Flag as P0-Functionality issues.
|
|
57
|
+
3. **Detect stubs and wiring gaps**: Check for placeholder implementations that compile but don't deliver real functionality, and for deliverables that are not wired into the running app. See `references/stub-detection.md` for patterns. Flag as P0-Functionality issues.
|
|
38
58
|
|
|
39
59
|
4. **Evaluate P1 pillars** (Complexity, Error Handling, Tests): These SHOULD pass. Fix all issues found.
|
|
40
60
|
|
|
41
|
-
5. **Evaluate P2
|
|
61
|
+
5. **Evaluate P2** (Documentation): Fix if straightforward. Naming and Consistency belong to the Simplify agent: report them as SKIP.
|
|
42
62
|
|
|
43
63
|
6. **Commit fixes**: If any changes were made, create a commit with message "fix: address self-review issues".
|
|
44
64
|
|
|
45
|
-
7. **Report status**: Return structured report with pillar evaluations and changes made.
|
|
65
|
+
7. **Report status**: Return structured report with pillar evaluations and changes made. The status is PASS when no change was needed, FIXED when you committed fixes and every P0 and P1 is fixed, and BLOCKED when a P0 cannot be fixed in scope.
|
|
46
66
|
|
|
47
67
|
**Gate ownership:** Run only a test file you added or changed, once. Only Validate runs the full suite.
|
|
48
68
|
|
|
@@ -50,7 +70,7 @@ Follow the `devflow:apply-decisions` skill to scan the index, Read full bodies o
|
|
|
50
70
|
|
|
51
71
|
1. **Fix, don't report** - Self-review means fixing issues, not generating reports
|
|
52
72
|
2. **Fresh context advantage** - Use your full context for thorough evaluation
|
|
53
|
-
3. **Pillar priority** - P0 issues block, P1 issues should be fixed, P2
|
|
73
|
+
3. **Pillar priority** - P0 issues block, P1 issues should be fixed, P2 covers Documentation only
|
|
54
74
|
4. **Minimal changes** - Fix the issue, don't refactor surrounding code
|
|
55
75
|
5. **Honest assessment** - If P0 issue is unfixable, report BLOCKED immediately
|
|
56
76
|
|
|
@@ -61,7 +81,7 @@ Return structured completion status:
|
|
|
61
81
|
```markdown
|
|
62
82
|
## Self-Review Report
|
|
63
83
|
|
|
64
|
-
### Status: PASS | BLOCKED
|
|
84
|
+
### Status: PASS | FIXED | BLOCKED
|
|
65
85
|
|
|
66
86
|
### P0 Pillars
|
|
67
87
|
- Design: PASS | FIXED (description) | BLOCKED (reason)
|
|
@@ -73,8 +93,10 @@ Return structured completion status:
|
|
|
73
93
|
- Error Handling: PASS | FIXED (description)
|
|
74
94
|
- Tests: PASS | FIXED (description)
|
|
75
95
|
|
|
76
|
-
### P2
|
|
77
|
-
-
|
|
96
|
+
### P2 Pillars
|
|
97
|
+
- Naming: SKIP (Simplify agent)
|
|
98
|
+
- Consistency: SKIP (Simplify agent)
|
|
99
|
+
- Documentation: PASS | FIXED (description)
|
|
78
100
|
|
|
79
101
|
### Files Modified
|
|
80
102
|
- {file} ({change description})
|
|
@@ -83,7 +105,9 @@ Return structured completion status:
|
|
|
83
105
|
- {sha} fix: address self-review issues
|
|
84
106
|
```
|
|
85
107
|
|
|
86
|
-
|
|
108
|
+
A workflow spawn pins the return: `{"status": "PASS" | "FIXED" | "BLOCKED"}`.
|
|
109
|
+
|
|
110
|
+
Report cap: final message at most about 1,500 tokens; longer material goes to a `mktemp` file (via Bash or Write) and the message gives its path. Exempt, inline in full: the `### Status` line and the `status` return field (commands and workflows read the status from them). `### Files Modified` and `### Commits Created` are narrative and capped.
|
|
87
111
|
|
|
88
112
|
## Boundaries
|
|
89
113
|
|
|
@@ -94,6 +118,6 @@ Report cap: final message at most about 1,500 tokens; longer material goes to a
|
|
|
94
118
|
|
|
95
119
|
**Handle autonomously:**
|
|
96
120
|
- All fixable P0 and P1 issues
|
|
97
|
-
-
|
|
121
|
+
- Documentation fixes that are straightforward
|
|
98
122
|
- Adding missing tests for new code
|
|
99
123
|
- Fixing error handling gaps
|
|
@@ -2,9 +2,29 @@
|
|
|
2
2
|
name: Simplify
|
|
3
3
|
description: Simplifies and refines code for clarity, consistency, and maintainability while preserving all functionality. Focuses on recently modified code unless instructed otherwise.
|
|
4
4
|
model: sonnet
|
|
5
|
+
effort: medium
|
|
5
6
|
skills:
|
|
6
7
|
- devflow:software-design
|
|
7
8
|
- devflow:worktree-support
|
|
9
|
+
disallowedTools:
|
|
10
|
+
- Agent
|
|
11
|
+
- SendMessage
|
|
12
|
+
- NotebookEdit
|
|
13
|
+
- EnterWorktree
|
|
14
|
+
- ExitWorktree
|
|
15
|
+
- ArtifactComments
|
|
16
|
+
- ArtifactData
|
|
17
|
+
- TodoWrite
|
|
18
|
+
- AskUserQuestion
|
|
19
|
+
- TaskOutput
|
|
20
|
+
- ScheduleWakeup
|
|
21
|
+
- CronCreate
|
|
22
|
+
- CronDelete
|
|
23
|
+
- CronList
|
|
24
|
+
- RemoteTrigger
|
|
25
|
+
- PushNotification
|
|
26
|
+
- DesignSync
|
|
27
|
+
- Skill
|
|
8
28
|
---
|
|
9
29
|
|
|
10
30
|
# Simplify Agent
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: Skim
|
|
3
3
|
description: Codebase orientation using rskim to identify relevant files, functions, and patterns for a feature or task
|
|
4
|
-
model:
|
|
4
|
+
model: haiku
|
|
5
|
+
effort: medium
|
|
5
6
|
tools: ["Bash", "Read"]
|
|
6
7
|
skills:
|
|
7
8
|
- devflow:worktree-support
|
|
9
|
+
omitClaudeMd: true
|
|
8
10
|
---
|
|
9
11
|
|
|
10
12
|
# Skim Agent
|
|
@@ -127,7 +129,7 @@ skim also handles prose/config files (`.md`, `.json`, `.yaml`, `.toml`) — the
|
|
|
127
129
|
{Brief recommendation based on codebase structure}
|
|
128
130
|
```
|
|
129
131
|
|
|
130
|
-
Report cap: final message at most about 1,500 tokens; longer material goes to a `mktemp` file
|
|
132
|
+
Report cap: final message at most about 1,500 tokens; longer material goes to a `mktemp` file via Bash and the message gives its path. Exempt, inline in full: the `### Relevant Files for Task` table.
|
|
131
133
|
|
|
132
134
|
## Principles
|
|
133
135
|
|
|
@@ -2,10 +2,20 @@
|
|
|
2
2
|
name: Synthesize
|
|
3
3
|
description: "Combines outputs from multiple agents into actionable summaries (modes: exploration, planning, review, bug-analysis, design, research)"
|
|
4
4
|
model: haiku
|
|
5
|
+
effort: medium
|
|
5
6
|
skills:
|
|
6
7
|
- devflow:review-methodology
|
|
7
8
|
- devflow:docs-framework
|
|
8
9
|
- devflow:worktree-support
|
|
10
|
+
tools:
|
|
11
|
+
- Read
|
|
12
|
+
- Write
|
|
13
|
+
- Edit
|
|
14
|
+
- Bash
|
|
15
|
+
- Grep
|
|
16
|
+
- Glob
|
|
17
|
+
- StructuredOutput
|
|
18
|
+
omitClaudeMd: true
|
|
9
19
|
---
|
|
10
20
|
|
|
11
21
|
# Synthesize Agent
|
|
@@ -24,6 +34,8 @@ The orchestrator provides:
|
|
|
24
34
|
|
|
25
35
|
**Worktree Support**: If `WORKTREE_PATH` is provided, follow the `devflow:worktree-support` skill for path resolution. If omitted, use cwd.
|
|
26
36
|
|
|
37
|
+
**Decisions and pitfalls in words**: in any text you write, state a decision or pitfall as its rule in words, never by its ledger ID, because your summaries can be posted to a pull request.
|
|
38
|
+
|
|
27
39
|
---
|
|
28
40
|
|
|
29
41
|
## Mode: Exploration
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
name: Test
|
|
3
3
|
description: Scenario-based QA agent. Designs and executes acceptance tests from criteria and implementation. Reports pass/fail with evidence — never fixes code.
|
|
4
4
|
model: sonnet
|
|
5
|
+
effort: medium
|
|
5
6
|
tools: ["Read", "Grep", "Glob", "Bash", "mcp__claude-in-chrome__tabs_context_mcp", "mcp__claude-in-chrome__tabs_create_mcp", "mcp__claude-in-chrome__navigate", "mcp__claude-in-chrome__get_page_text", "mcp__claude-in-chrome__read_page", "mcp__claude-in-chrome__find", "mcp__claude-in-chrome__form_input", "mcp__claude-in-chrome__javascript_tool", "mcp__claude-in-chrome__read_console_messages"]
|
|
6
7
|
skills:
|
|
7
8
|
- devflow:qa
|
|
8
|
-
- devflow:testing
|
|
9
9
|
- devflow:worktree-support
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -148,7 +148,7 @@ One row per TP line, in TP order. PASS only when every scenario covering the TP
|
|
|
148
148
|
{Each command run's `LOG=` path, for traceability}
|
|
149
149
|
```
|
|
150
150
|
|
|
151
|
-
Report cap: final message at most about 1,500 tokens; longer material goes to a `mktemp` file
|
|
151
|
+
Report cap: final message at most about 1,500 tokens; longer material goes to a `mktemp` file via Bash and the message gives its path. Exempt, inline in full: `### Test Plan Evidence` (HEAD line and TP table), the Scenario Results table (`| ID | TP | Type |`) and `### Failed Scenarios`. `### Evidence Log` lists each run's `LOG=` path, never raw output.
|
|
152
152
|
|
|
153
153
|
## Principles
|
|
154
154
|
|
|
@@ -2,11 +2,17 @@
|
|
|
2
2
|
name: Triage
|
|
3
3
|
description: Validates review issues against blast-radius disposition matrix. Assigns one verdict per issue. Never edits code.
|
|
4
4
|
model: opus
|
|
5
|
+
effort: high
|
|
5
6
|
skills:
|
|
6
7
|
- devflow:security
|
|
7
8
|
- devflow:worktree-support
|
|
8
9
|
- devflow:apply-decisions
|
|
9
10
|
- devflow:apply-feature-knowledge
|
|
11
|
+
tools:
|
|
12
|
+
- Read
|
|
13
|
+
- Grep
|
|
14
|
+
- Glob
|
|
15
|
+
- Bash
|
|
10
16
|
---
|
|
11
17
|
|
|
12
18
|
# Triage Agent
|
|
@@ -145,7 +151,7 @@ Return the verdict ledger grouped by disposition:
|
|
|
145
151
|
- DUPLICATE: {n}
|
|
146
152
|
```
|
|
147
153
|
|
|
148
|
-
Report cap: final message at most about 1,500 tokens; longer material goes to a `mktemp` file
|
|
154
|
+
Report cap: final message at most about 1,500 tokens; longer material goes to a `mktemp` file via Bash and the message gives its path. Exempt, inline in full: the whole ledger, since `/resolve` checks that every issue id appears in it.
|
|
149
155
|
|
|
150
156
|
## Boundaries
|
|
151
157
|
|
|
@@ -2,9 +2,14 @@
|
|
|
2
2
|
name: Validate
|
|
3
3
|
description: Dedicated agent for running validation commands (build, typecheck, lint, test). Reports pass/fail with structured failure details - never fixes.
|
|
4
4
|
model: haiku
|
|
5
|
+
effort: medium
|
|
5
6
|
skills:
|
|
6
|
-
- devflow:testing
|
|
7
7
|
- devflow:worktree-support
|
|
8
|
+
tools:
|
|
9
|
+
- Bash
|
|
10
|
+
- Read
|
|
11
|
+
- Grep
|
|
12
|
+
- Glob
|
|
8
13
|
---
|
|
9
14
|
|
|
10
15
|
# Validate Agent
|
|
@@ -94,7 +99,7 @@ src/auth/login.ts:58:3 - error TS2345: Argument of type 'string' is not assignab
|
|
|
94
99
|
{Description of why validation couldn't run - e.g., missing dependencies, broken config}
|
|
95
100
|
```
|
|
96
101
|
|
|
97
|
-
Report cap: final message at most about 1,500 tokens; longer material goes to a `mktemp` file
|
|
102
|
+
Report cap: final message at most about 1,500 tokens; longer material goes to a `mktemp` file via Bash and the message gives its path. Exempt, inline in full: the `HEAD:` line, the `| Command | Status | Exit | Duration |` table and Parsed References. Failure output: at most 30 lines per failing command, then its log path.
|
|
98
103
|
|
|
99
104
|
## Boundaries
|
|
100
105
|
|
|
@@ -3,21 +3,21 @@
|
|
|
3
3
|
|
|
4
4
|
ORDER IS LOAD-BEARING. Run exactly in this sequence:
|
|
5
5
|
|
|
6
|
-
1. **
|
|
6
|
+
1. **Simplify agent** — reduce complexity, remove duplication
|
|
7
|
+
2. **Scrutinize agent** — 9-pillar self-review (deep structural analysis); returns `{"status": "PASS" | "FIXED" | "BLOCKED"}`
|
|
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 `scrutiny-blocked`; Validate does not run on code Scrutinize could not accept
|
|
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 Simplify and Scrutinize left, so it covers their commits whether or not Scrutinize changed code
|
|
7
10
|
- Build/test commands follow `build_execution_doctrine()`: the Validate agent's Running commands block, foreground under an explicit Bash timeout.
|
|
8
|
-
- FAIL → Code agent fix (max 2 retries)
|
|
9
|
-
- If still FAIL after 2 retries → escalate (do not loop endlessly)
|
|
10
|
-
2. **Simplify agent** — reduce complexity, remove duplication
|
|
11
|
-
3. **Scrutinize agent** — 9-pillar self-review (deep structural analysis)
|
|
12
|
-
- If Scrutinize agent changed code → re-run Validate agent (verify the Scrutinize agent's edits compile/pass)
|
|
11
|
+
- FAIL → Code agent fix (max 2 retries), each followed by a Validate agent re-run
|
|
12
|
+
- If still FAIL after 2 retries → escalate as `validation-exhausted` (do not loop endlessly)
|
|
13
13
|
|
|
14
14
|
**Gate 1 contains NO Evaluate agent and NO Test agent.** Those are Gate 2 only.
|
|
15
15
|
|
|
16
16
|
Depth scales to change size + budget: a trivial one-line fix warrants a lighter pass; a multi-file refactor warrants the full depth.
|
|
17
17
|
|
|
18
18
|
**Cadence — Gate 1 runs at exactly TWO points per ticket:**
|
|
19
|
-
1. **Gate 1 #1** — immediately after the initial Code agent implementation (inside `implement_bundle()`).
|
|
20
|
-
2. **Gate 1 #2** — the FINAL gate, after ALL Gate-2 fixes AND the entire review pass have completed.
|
|
19
|
+
1. **Gate 1 #1** — immediately after the initial Code agent implementation (inside `implement_bundle()`). An escalated result — Validate exhausted, or Scrutinize 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 FINAL gate, after ALL Gate-2 fixes AND the entire review pass have completed. Scrutinize BLOCKED here is `ESCALATED` as well.
|
|
21
21
|
|
|
22
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.
|
|
23
23
|
@end
|
|
@@ -29,32 +29,29 @@ Gate 2 fires ONCE: after the implement-bundle and BEFORE the review pass. It doe
|
|
|
29
29
|
|
|
30
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.
|
|
31
31
|
|
|
32
|
-
**Evaluate agent
|
|
33
|
-
- Run `evaluator_panel()` — see that block for the
|
|
34
|
-
- If
|
|
32
|
+
**Evaluate agent** (only if a plan exists):
|
|
33
|
+
- Run `evaluator_panel()` — see that block for the one spawn and the two lenses it names
|
|
34
|
+
- If the Evaluate agent returns FAIL (either lens failed): fix-and-continue — the demanded fixes are applied by a Code agent that self-verifies its own build (batched per the review-pass batching doctrine if numerous). The recorded verdict becomes `FAIL-FIXED` (issues found, fixes applied, not re-evaluated by design); Gate 2 then proceeds. In SINGLE mode the run reports it as `UNVERIFIED`, never PASS.
|
|
35
35
|
|
|
36
36
|
**Test agent** (only if acceptance criteria or a test plan exist):
|
|
37
37
|
- Scenario-based acceptance tests covering functionality, API contracts, performance
|
|
38
38
|
- FAIL → fix-and-continue — a Code agent applies the demanded fixes and self-verifies its own build. The recorded verdict becomes `FAIL-FIXED`; Gate 2 then proceeds. In SINGLE mode the run reports it as `UNVERIFIED`, never PASS.
|
|
39
39
|
|
|
40
40
|
**When Gate 2 inputs are absent:**
|
|
41
|
-
- No plan → skip Evaluate agent
|
|
41
|
+
- No plan → skip the Evaluate agent silently (note in output: "Gate 2 Evaluate agent skipped — no plan available")
|
|
42
42
|
- No acceptance criteria and no test plan → skip Test agent silently (note in output: "Gate 2 Test agent skipped — no criteria available")
|
|
43
43
|
- Build proceeds Gate-1-only. Never refuse to build; never force-generate fake criteria. Trust the user.
|
|
44
44
|
@end
|
|
45
45
|
|
|
46
46
|
@define evaluator_panel():
|
|
47
|
-
### Evaluate agent
|
|
47
|
+
### Evaluate agent spawn (one agent, two lenses)
|
|
48
48
|
|
|
49
|
-
Run
|
|
49
|
+
Run ONE Evaluate agent whose prompt names both lenses, so a ticket pays for one spawn and one read of the plan:
|
|
50
50
|
|
|
51
|
-
1. **Acceptance
|
|
52
|
-
2. **Scope / intent
|
|
53
|
-
3. **Cross-ticket-consistency evaluator** — (wave-only; skip for single-ticket runs) "Does this ticket honor the API contracts and invariants that other wave tickets depend on?"
|
|
51
|
+
1. **Acceptance criteria** — "Does the implementation satisfy each numbered acceptance criterion, INCLUDING the negative criteria (what it must NOT do)?"
|
|
52
|
+
2. **Scope / intent drift** — "Did the Code agent smuggle in unplanned changes, deviate from the plan's intent, or introduce anti-features?"
|
|
54
53
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
Keep the panel to 2–3 agents. Do not spawn redundant agents asking the same question — that is cost with no diversity benefit.
|
|
54
|
+
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.
|
|
58
55
|
@end
|
|
59
56
|
|
|
60
57
|
@define implement_bundle():
|
|
@@ -63,12 +60,12 @@ Keep the panel to 2–3 agents. Do not spawn redundant agents asking the same qu
|
|
|
63
60
|
The standard implementation unit for one ticket. Run in order:
|
|
64
61
|
|
|
65
62
|
```
|
|
66
|
-
Code(agentType:"Code", prompt: full task + plan + DECISIONS_CONTEXT + handoff if sequential)
|
|
63
|
+
Code(agentType:"Code", prompt: "OPERATION: implement" first line, then full task + plan + DECISIONS_CONTEXT + handoff if sequential)
|
|
67
64
|
→ gate1_postcode()
|
|
68
65
|
→ gate2_acceptance() ← Gate 2 runs HERE — before the review pass, not after
|
|
69
66
|
```
|
|
70
67
|
|
|
71
|
-
|
|
68
|
+
Every Code agent prompt opens with `OPERATION: <mode>` as its first line (`implement`, `issue-fix`, `validation-fix`, `alignment-fix` or `qa-fix`). It must include: task description, implementation plan (if one exists), relevant DECISIONS_CONTEXT (the index you loaded before authoring), the compliance lens (`COMPLIANCE_FRAMEWORKS` — every Code prompt carries it, fix prompts included), and any PRIOR_PHASE_SUMMARY / HANDOFF_FILE for sequential multi-phase tickets.
|
|
72
69
|
|
|
73
70
|
Gate 2 runs at implementation acceptance — this matches devflow's deliberate placement: "evaluation is part of implementation acceptance, not post-review" (§6.1).
|
|
74
71
|
@end
|
|
@@ -194,7 +191,7 @@ Each ticket engine run returns a structured result. The Synthesize agent or the
|
|
|
194
191
|
},
|
|
195
192
|
"escalations": [
|
|
196
193
|
{
|
|
197
|
-
"type": "merge-conflict | gate2-fail | validation-exhausted | ambiguous-resolution | review-coverage-incomplete | dependency-blocked | engine-crash | ticket-link-missing | branch-missing",
|
|
194
|
+
"type": "merge-conflict | gate2-fail | validation-exhausted | scrutiny-blocked | ambiguous-resolution | review-coverage-incomplete | dependency-blocked | engine-crash | ticket-link-missing | branch-missing",
|
|
198
195
|
"description": "string"
|
|
199
196
|
}
|
|
200
197
|
],
|
|
@@ -212,7 +209,7 @@ Each ticket engine run returns a structured result. The Synthesize agent or the
|
|
|
212
209
|
|
|
213
210
|
1. **Code is written ONLY by Code agents.** No other agent type writes code — not Review agent, not Evaluate agent.
|
|
214
211
|
2. **Findings are verified before any fix is written.** The adversarial verification step is not optional; unverified findings are not passed to the Code agent.
|
|
215
|
-
3. **All written code passes Gate 1.** No code merge, commit, or handoff before
|
|
212
|
+
3. **All written code passes Gate 1.** No code merge, commit, or handoff before Simplify agent + Scrutinize agent + Validate agent (in that order — Validate last, so its one run covers the commits of the two before it).
|
|
216
213
|
4. **Gate 2 runs once, at implementation acceptance.** It does not re-run after review-fixes.
|
|
217
214
|
5. **NEVER auto-merge to main or master.** All merges target the integration branch. The user merges to main themselves.
|
|
218
215
|
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.
|
|
@@ -69,7 +69,7 @@ If the settings line says `KNOWLEDGE=off`, skip write-back entirely. The machine
|
|
|
69
69
|
**Step 2 — Evaluate whether write-back is warranted:**
|
|
70
70
|
|
|
71
71
|
Only proceed if **at least one** of these is true:
|
|
72
|
-
- This workflow changed files in a directory that is documented by an existing feature knowledge base (a documented area changed).
|
|
72
|
+
- This workflow changed files in a directory that is documented by an existing feature knowledge base (a documented area changed). Knowledge bases are written through at that point, never on a background schedule.
|
|
73
73
|
- This workflow surfaced durable, cross-cutting knowledge about a codebase area that would help future agents working in the same area — patterns, anti-patterns, integration points, gotchas not visible from a single file read.
|
|
74
74
|
|
|
75
75
|
**Never spawn unconditionally.** If neither condition is met, skip write-back silently.
|
|
@@ -46,7 +46,7 @@ Every line of a `## Test Plan` section, or of a PR's test-plan block, follows th
|
|
|
46
46
|
|
|
47
47
|
#### Consumption by Gate 2
|
|
48
48
|
|
|
49
|
-
The Evaluate agent
|
|
49
|
+
The Evaluate agent receives: the per-ticket plan + the numbered acceptance criteria (positive and negative).
|
|
50
50
|
|
|
51
51
|
The Test agent receives: the test plan's TP lines, once `check tp` has admitted them.
|
|
52
52
|
|
|
@@ -40,8 +40,8 @@ For each ready ticket (sequentially by default; parallel only past the §7.1 bar
|
|
|
40
40
|
- Branch setup: the engine's setup-task creates the ticket's branch off integration HEAD at ready-time (so it already contains merged deps); every later phase, and the merge, uses the branch setup-task created, and a setup-task that reports none stops the ticket before implementing
|
|
41
41
|
- Run the single-ticket engine inside a try/catch — one ticket's crash/stall never kills the wave; catch the exception, quarantine that ticket, and continue with the remaining ready set
|
|
42
42
|
- The engine gets the ticket's own reference, the one the pre-fetch printed, as its setup-task input — never the wave's tracking issue
|
|
43
|
-
- On engine PASS or UNVERIFIED: merge to integration branch,
|
|
44
|
-
-
|
|
43
|
+
- On engine PASS or UNVERIFIED: merge to the integration branch locally through Git (no push, no build or test), then the workflow spawns the Validate agent (build + test) over the merge. The merge counts as kept only when that Validate returns PASS
|
|
44
|
+
- Validate FAIL or no PASS (build red after merge): the workflow spawns Git to undo the merge, quarantines the ticket, marks it as escalated, and continues. If the undo is refused, the wave stops taking merges and rounds
|
|
45
45
|
- On any other verdict (PARTIAL, FAIL, ESCALATED) or none: quarantine ticket, do not block independent siblings
|
|
46
46
|
|
|
47
47
|
**Cascade quarantine:** when a ticket is quarantined for any reason (Gate-1 exhausted, engine crash/stall, build-red after merge, review coverage incomplete after retry), the quarantine cascades to its direct and transitive dependents — each is marked blocked with the named reason, naming the blocker by its `{ISSUE_REF}` (e.g. "blocked: depends on {ISSUE_REF} which failed Gate-1"). Independent siblings are never affected. The quarantined list is injected into every subsequent Design agent reader prompt so the reader never schedules dependents of failed tickets.
|
|
@@ -70,7 +70,9 @@ MAX_ROUNDS = LLM judgment based on ticket count (heuristic: ticket_count * 2 + 5
|
|
|
70
70
|
|
|
71
71
|
**Parallel independent tickets:** each gets its own `git worktree add` + durable branch managed by the Git agent. Use explicit `git worktree add` — NOT the Workflow tool's ephemeral `isolation:'worktree'`. The branch must persist across implement → review → resolve → merge stages; ephemeral worktrees are gone when the agent call ends.
|
|
72
72
|
|
|
73
|
-
**Post-merge validation:** after EVERY merge into the integration branch,
|
|
73
|
+
**Post-merge validation:** after EVERY merge into the integration branch, the workflow itself spawns the Validate agent (build + test) over the integration branch; Git runs no build or test. A red build immediately after merge is the cheapest possible conflict detector. It always runs — the merge reports `treeEqual` (whether the merge commit's tree equals the ticket branch head's tree) and the wave row records it, but a true value never skips the Validate.
|
|
74
|
+
|
|
75
|
+
**Undo of a red merge:** on FAIL or no PASS verdict the workflow spawns Git to undo the merge. The undo runs only when no remote branch contains the merge commit and the integration HEAD still equals it, as `git reset --keep {mergeSha}^1` on the integration branch — never `--hard`, never a push. It returns `{"undone": true}` or `{"undone": false, "reason": "..."}`. Undone → the row reads `merged: false` and the ticket is quarantined ("post-merge build red; merge undone"). Not undone → the wave stops taking merges and rounds, and its report names the red integration HEAD.
|
|
74
76
|
|
|
75
77
|
**Commit discipline:** Git agent creates atomic commits per logical change, conventional-commit format, on the ticket branch before merge.
|
|
76
78
|
@end
|
|
@@ -83,13 +85,13 @@ Two parallel sibling tickets can produce real git conflicts. The resolution is *
|
|
|
83
85
|
**Resolution procedure:**
|
|
84
86
|
|
|
85
87
|
1. Git agent detects the conflict and reports the conflicting files + sections
|
|
86
|
-
2. Spawn a Code agent with FULL intent context:
|
|
88
|
+
2. Spawn a Code agent whose prompt opens with `OPERATION: implement` and carries `COMPLIANCE_FRAMEWORKS`, with FULL intent context:
|
|
87
89
|
- Both ticket descriptions and plans
|
|
88
90
|
- The conflicting diff sections (both sides)
|
|
89
91
|
- Relevant ADRs from DECISIONS_CONTEXT (loaded by main model before authoring)
|
|
90
92
|
3. Code agent resolves to PRESERVE BOTH INTENTS — the resolution must honor what both tickets were trying to achieve
|
|
91
93
|
4. If the correct resolution is NOT UNAMBIGUOUS from the intent context: **do NOT guess** → quarantine + escalate
|
|
92
|
-
5. After any resolution: Validate
|
|
94
|
+
5. After any resolution: the post-merge Validate covers it — the workflow spawns it after the merge, and no Validate is requested from Git
|
|
93
95
|
|
|
94
96
|
**Conservative-or-escalate is absolute.** An LLM silently guessing a wrong merge is the highest-danger failure mode in the whole design. When in doubt: quarantine + surface in report. The user re-runs (resume) with the escalated context.
|
|
95
97
|
|
|
@@ -106,7 +108,7 @@ A workflow cannot pause mid-run (F4). "Escalate" means: quarantine-and-continue
|
|
|
106
108
|
- Ticket engine FAIL after max retries (Gate 1 exhausted)
|
|
107
109
|
- Gate 2 FAIL after max retries (Evaluate agent/Test agent not satisfied)
|
|
108
110
|
- Circular dependency detected (all remaining tickets blocked on each other)
|
|
109
|
-
- Build red after merge (Validate agent fails
|
|
111
|
+
- Build red after merge (the post-merge Validate agent fails: the merge is undone and the ticket quarantined; a refused undo halts the wave)
|
|
110
112
|
- Review coverage incomplete after retry (a focus area failed to produce a live Review agent result after the retry)
|
|
111
113
|
- Ticket engine crash/stall (unrecoverable exception or watchdog kill — quarantine cascades to dependents)
|
|
112
114
|
- No ticket link while issues are required (the engine stops before implementing)
|
|
@@ -30,7 +30,7 @@ Run a comprehensive code review of the current branch by spawning parallel revie
|
|
|
30
30
|
|
|
31
31
|
1. **Discover reviewable worktrees** using the `devflow:worktree-support` skill discovery algorithm:
|
|
32
32
|
- Run `git worktree list --porcelain` → parse, filter (skip protected/detached/mid-rebase), dedup by branch, sort by recent commit
|
|
33
|
-
-
|
|
33
|
+
- Invoke the `devflow:worktree-support` skill, then Read its `references/discovery.md` from the skill's base directory for the full 7-step algorithm; the canonical protected branch list stays in the skill
|
|
34
34
|
2. **If `--path` flag provided:** use only that worktree, skip discovery
|
|
35
35
|
**`--path` validation**: Before proceeding, verify the path exists as a directory and appears in `git worktree list` output. If not: report error and stop.
|
|
36
36
|
3. **If only 1 reviewable worktree** (the common case): proceed as single-worktree flow — zero behavior change
|