devflow-kit 3.13.0 → 3.14.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 CHANGED
@@ -5,6 +5,14 @@ All notable changes to Devflow will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [3.14.0] - 2026-11-04
9
+
10
+ ### Changed
11
+
12
+ - **`/implement` gives each Code phase or subtask and the Harden self-review the plan's acceptance criteria and known limits** ([#756](https://github.com/dean0x/devflow/issues/756)). With a sequential or parallel strategy, each phase or subtask plan adds the plan's Acceptance Criteria and Known limits, and its own steps still set its scope; a single Code agent already takes the full plan. The Harden spawn passes the same criteria as Evaluate and Test, and the plan's known limits (else `(none)`). Code builds only to the criteria and not past a stated limit. Harden tests to the criteria, every pillar still applies, and a stated limit is not a finding. A limit or a missing criterion never drops a trust-boundary, data-loss, security or fail-closed check or its test. `/dynamic-build`, `/resolve` and a spawn by hand pass no new input and work as before.
13
+
14
+ ---
15
+
8
16
  ## [3.13.0] - 2026-11-04
9
17
 
10
18
  ### Added
@@ -2454,6 +2462,7 @@ devflow init
2454
2462
  ---
2455
2463
 
2456
2464
  [Unreleased]: https://github.com/dean0x/devflow/compare/v3.8.0...HEAD
2465
+ [3.14.0]: https://github.com/dean0x/devflow/compare/v3.13.0...v3.14.0
2457
2466
  [3.13.0]: https://github.com/dean0x/devflow/compare/v3.12.1...v3.13.0
2458
2467
  [3.12.1]: https://github.com/dean0x/devflow/compare/v3.12.0...v3.12.1
2459
2468
  [3.12.0]: https://github.com/dean0x/devflow/compare/v3.11.0...v3.12.0
@@ -44,22 +44,22 @@ You receive from orchestrator:
44
44
  - **BASE_BRANCH**: Branch this feature branch was created from
45
45
  - **EXECUTION_PLAN**: Plan with steps, files, tests
46
46
  - **PATTERNS**: Codebase patterns to follow
47
- - **OPERATION** (optional): `implement` (default when absent) | `issue-fix` — selects operating mode; every spawn passes it as the first prompt line. Any other value returns BLOCKED, naming it, and changes nothing.
48
- - **ISSUES** (when OPERATION: issue-fix): FIX_NOW issues from the Triage agent
47
+ - **ACCEPTANCE_CRITERIA**, **KNOWN_LIMITS** (optional): Build only to the criteria and not past a stated limit. A limit or a missing criterion never drops a trust-boundary, data-loss, security or fail-closed check or its test.
48
+ - **OPERATION** (optional): `implement` (default when absent) | `issue-fix`; every spawn passes it as the first prompt line. Any other value returns BLOCKED, naming it, and changes nothing.
49
49
  - **SCOPE** (when OPERATION: issue-fix): Blast-radius scope hint (Standard | Careful | `Standard, prose only`) per issue
50
50
  - **FEATURE_KNOWLEDGE** (optional): Per KB, the Rules bullets most relevant to the task (anti-patterns, gotchas, invariants), the KB path and a heading index; sections are read on demand
51
51
 
52
52
  **Worktree Support**: With `WORKTREE_PATH`, resolve paths by the `devflow:worktree-support` skill; without it, use cwd.
53
53
 
54
- **Sequential execution context** (when chaining multiple Code agents):
54
+ **Sequential execution context**:
55
55
  - **PRIOR_PHASE_SUMMARY**: Summary from the previous Code agent (format in Handoff)
56
56
  - **FILES_FROM_PRIOR_PHASE**: Files created that must be read and understood
57
57
  - **HANDOFF_REQUIRED**: true if another Code agent follows this one
58
- - **HANDOFF_FILE** (optional): Path to the branch-scoped handoff file (steps 1 and 6 below)
58
+ - **HANDOFF_FILE** (optional): Path to the handoff file (steps 1 and 6 below)
59
59
 
60
60
  ## Responsibilities
61
61
 
62
- 1. **Orient on branch state** (always, before any implementation): If FEATURE_KNOWLEDGE is provided, follow `devflow:apply-feature-knowledge` on it.
62
+ 1. **Orient on branch state** (always, first): If FEATURE_KNOWLEDGE is provided, follow `devflow:apply-feature-knowledge` on it.
63
63
  - In one Bash call, run `git status`, `git diff --stat`, `git diff --cached --stat` and `git log --oneline --stat -n 10`
64
64
  - Match the changed files against EXECUTION_PLAN, then Read the relevant ones together, by Read once: the interfaces, types, conventions, error handling and test patterns of prior work
65
65
  - If PRIOR_PHASE_SUMMARY is provided, check your understanding against it; the code wins over the summary
@@ -82,7 +82,7 @@ You receive from orchestrator:
82
82
 
83
83
  You fix the issues the Triage agent marked FIX_NOW. Do not re-litigate dispositions.
84
84
 
85
- **Inputs:** `ISSUES`, `SCOPE` (Standard | Careful | `Standard, prose only` per issue; absent means Standard), `PUSH: false` (always for issue-fix; the orchestrator pushes after its final validation gate)
85
+ **Inputs:** `ISSUES`, `SCOPE` (Standard | Careful | `Standard, prose only` per issue; absent means Standard), `PUSH: false` (always for issue-fix)
86
86
 
87
87
  **Protocol:**
88
88
  1. Same-file issues → one commit (never two Code agents editing the same file concurrently)
@@ -40,6 +40,7 @@ You evaluate the implementation against the 9 quality pillars and fix the issues
40
40
  You receive from orchestrator:
41
41
  - **TASK_DESCRIPTION**: What was implemented
42
42
  - **FILES_CHANGED** (optional): The branch diff's file list, with no deleted file or old rename path
43
+ - **ACCEPTANCE_CRITERIA**, **KNOWN_LIMITS** (optional): Test to the criteria; every pillar still applies. A stated limit is not a finding. A limit or a missing criterion never drops a trust-boundary, data-loss, security or fail-closed check or its test.
43
44
  - **DECISIONS_CONTEXT** (optional): Compact index of active ADR/PF entries for this repository (pre-rendered to `.devflow/curation/index.md` in its main worktree). `(none)` when absent. Use `devflow:apply-decisions` to Read full bodies on demand.
44
45
  - **FEATURE_KNOWLEDGE** (optional): Per KB, the Rules bullets and the KB path, with no heading index. Check the implementation against each bullet's anti-pattern, gotcha or invariant. Follow `devflow:apply-feature-knowledge`.
45
46
 
@@ -55,13 +56,13 @@ Follow the `devflow:apply-decisions` skill: check that the implementation is con
55
56
 
56
57
  1. **Gather changes**: Read all files in FILES_CHANGED.
57
58
 
58
- 2. **Evaluate P0 pillars** (Design, Functionality, Security) and fix every issue.
59
+ 2. **Evaluate P0 pillars** and fix every issue.
59
60
 
60
61
  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.
61
62
 
62
- 4. **Evaluate P1 pillars** (Complexity, Error Handling, Tests) and fix every issue.
63
+ 4. **Evaluate P1 pillars** and fix every issue.
63
64
 
64
- 5. **Evaluate P2** (Documentation): Fix if straightforward.
65
+ 5. **Evaluate P2**: Fix if straightforward.
65
66
 
66
67
  6. **Commit fixes**: If any changes were made, create a commit with message "fix: address self-review issues".
67
68
 
@@ -74,8 +75,7 @@ Code-scanning runs in the Code agent; do not scan here.
74
75
  ## Principles
75
76
 
76
77
  1. **Minimal changes** - Fix the issue, don't refactor surrounding code
77
- 2. **Honest assessment** - If a P0 issue is unfixable, report BLOCKED immediately
78
- 3. **Fewest turns** - Batch independent reads and lookups in one turn. No Read-back after a successful Edit or Write unless a command changed the file. No narration-only turn
78
+ 2. **Fewest turns** - Batch independent reads and lookups in one turn. No Read-back after a successful Edit or Write unless a command changed the file. No narration-only turn
79
79
 
80
80
  ## Output
81
81
 
@@ -103,12 +103,12 @@ Code-scanning runs in the Code agent; do not scan here.
103
103
  - {file} ({change description})
104
104
 
105
105
  ### Commits Created
106
- - {sha} fix: address self-review issues
106
+ - {sha} {message}
107
107
  ```
108
108
 
109
109
  A workflow spawn pins the return: `{"status": "PASS" | "FIXED" | "BLOCKED"}`.
110
110
 
111
- Report cap: final message at most about 1,500 tokens; longer material goes to a new file in a `mktemp -d` folder 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.
111
+ Report cap: final message at most about 1,500 tokens; longer material goes to a new file in a `mktemp -d` folder 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).
112
112
 
113
113
  ## Boundaries
114
114
 
@@ -3,15 +3,13 @@ description: Execute a single task through implementation, quality gates, and PR
3
3
  ---
4
4
  # Implement Command
5
5
 
6
- Orchestrate a single task by spawning agents.
7
-
8
6
  ## Input
9
7
 
10
8
  <command-input>
11
9
  $ARGUMENTS
12
10
  </command-input>
13
11
 
14
- `COMMAND_INPUT` is the text above: a plan document path, an issue reference, a task description, or empty (use the conversation).
12
+ `COMMAND_INPUT` is the text above: a plan document path, an issue reference, a task description, or empty.
15
13
 
16
14
  **Issue-reference grammar.** Scan `COMMAND_INPUT` for candidate issue references: a `#`-prefixed token or a bare digit run. Collect them in source order as `ISSUE_REFS`, and forward the list to the Git agent verbatim. Do not render, normalise, pad, strip or drop a token. Under `github`, a token that matches `^#?[1-9][0-9]{0,8}$` is a reference, and the Git agent renders it as `#{n}`.
17
15
 
@@ -220,6 +218,8 @@ Setup context is the plan document, issue body or conversation.
220
218
  | **SEQUENTIAL_CODE_AGENTS** | The plan writes >= 10 files or has >= 7 steps |
221
219
  | **PARALLEL_CODE_AGENTS** | True artifact independence (rare) |
222
220
 
221
+ Each phase or subtask `EXECUTION_PLAN` adds the plan's Acceptance Criteria and Known limits; its own steps still set its scope.
222
+
223
223
  ---
224
224
 
225
225
  **SINGLE_CODE_AGENT**:
@@ -336,9 +336,11 @@ After Phase 3, spawn Harden agent:
336
336
  Agent(subagent_type="Harden"):
337
337
  "TASK_DESCRIPTION: {task description}
338
338
  FILES_CHANGED: {branch_diff}
339
+ ACCEPTANCE_CRITERIA: {extracted criteria if available}
340
+ KNOWN_LIMITS: {plan's Known limits, else (none)}
339
341
  DECISIONS_CONTEXT: {decisions_context}
340
342
  FEATURE_KNOWLEDGE: {feature_knowledge_rules}
341
- Evaluate 9 pillars, fix P0/P1 issues, report status"
343
+ Evaluate 9 pillars"
342
344
  ```
343
345
 
344
346
  Harden agent reports `### Status: PASS | FIXED | BLOCKED`. **If BLOCKED:** report to user and halt. **If PASS or FIXED:** continue to Phase 5. A FIXED status commits fixes and starts no Validate of its own: the Phase 6 run covers them.
@@ -429,7 +431,7 @@ Run build, typecheck, lint, test. Report pass/fail with failure details."
429
431
 
430
432
  Any other or missing Status: report and halt; never PASS.
431
433
 
432
- **Evidence claims** come from the evidence script, which owns the claim lines and the `## Claims` section. `<head>` is the report's `HEAD:` value, or `none` if it holds anything but letters and digits (a before/after change too).
434
+ **Evidence claims** come from the evidence script. `<head>` is the report's `HEAD:` value, or `none` if it holds anything but letters and digits (a before/after change too).
433
435
 
434
436
  ```bash
435
437
  cd "{worktree}" && node "$HOME/.devflow/scripts/verify-evidence.cjs" claim --evidence ".devflow/docs/evidence-{branch_slug}.md" --head <head> gate|TP-<n>=<PASS|FAIL|SKIP>[:<exit>] ...
@@ -482,13 +484,13 @@ After every Test agent run — whatever its Status, first run or retry — appen
482
484
  **Produces:** REVALIDATION_RESULT
483
485
  **Requires:** QA_RESULT, VALIDATED_HEAD, BASE_REF, GATE_LEVEL
484
486
 
485
- Run this phase only if a qa-fix committed (`git rev-parse HEAD` differs from `VALIDATED_HEAD`); else skip to Phase 9. Spawn Validate agent:
487
+ Run only if a qa-fix committed (`git rev-parse HEAD` differs from `VALIDATED_HEAD`); else skip to Phase 9. Spawn Validate agent:
486
488
 
487
489
  ```
488
490
  Agent(subagent_type="Validate"):
489
491
  "FILES_CHANGED: {output of `git diff --name-only --diff-filter=d VALIDATED_HEAD..HEAD`}
490
492
  VALIDATION_SCOPE: changed-only
491
- Verify the qa-fix commits did not break anything."
493
+ Verify the qa-fix commits."
492
494
  ```
493
495
 
494
496
  At `lean`, open the prompt with Phase 6's `GATE_LEVEL` and `BASE_SHA` lines; its `Lint pack:` line, or `Lint pack: UNVERIFIED` if it prints none, replaces Phase 6's in VALIDATION_RESULT.
@@ -564,7 +566,7 @@ git push origin HEAD; echo "exit=$?"
564
566
 
565
567
  `exit=0` continues to the script. Any other result, a rejected non-fast-forward push included, does not block: record `TRACEABILITY: DEGRADED (evidence push failed)` for the Phase 12 report and run the script anyway.
566
568
 
567
- **Then refresh, inline.** The refresh is plumbing, so no Git agent runs it: `verify-evidence.cjs publish` is the whole `update-pr-evidence` operation, scrub included, in one call. Use the Bash tool with `timeout: 180000`:
569
+ **Then refresh, inline.** `verify-evidence.cjs publish` is the whole `update-pr-evidence` operation, scrub included, in one call. Use the Bash tool with `timeout: 180000`:
568
570
 
569
571
  ```bash
570
572
  cd "{worktree}" && node "$HOME/.devflow/scripts/verify-evidence.cjs" publish --pr {PR_NUMBER} --evidence ".devflow/docs/evidence-{branch_slug}.md" --publication {REVIEW_PUBLICATION resolved in Phase 1, or auto}; echo "exit=$?"
@@ -3,15 +3,13 @@ description: Execute a single task through implementation, quality gates, and PR
3
3
  ---
4
4
  # Implement Command
5
5
 
6
- Orchestrate a single task by spawning agents.
7
-
8
6
  ## Input
9
7
 
10
8
  <command-input>
11
9
  $ARGUMENTS
12
10
  </command-input>
13
11
 
14
- `COMMAND_INPUT` is the text above: a plan document path, an issue reference, a task description, or empty (use the conversation).
12
+ `COMMAND_INPUT` is the text above: a plan document path, an issue reference, a task description, or empty.
15
13
 
16
14
  **Issue-reference grammar.** Scan `COMMAND_INPUT` for candidate issue references: a `#`-prefixed token or a bare digit run. Collect them in source order as `ISSUE_REFS`, and forward the list to the Git agent verbatim. Do not render, normalise, pad, strip or drop a token. Under `github`, a token that matches `^#?[1-9][0-9]{0,8}$` is a reference, and the Git agent renders it as `#{n}`.
17
15
 
@@ -232,6 +230,8 @@ Setup context is the plan document, issue body or conversation.
232
230
  | **SEQUENTIAL_CODE_AGENTS** | The plan writes >= 10 files or has >= 7 steps |
233
231
  | **PARALLEL_CODE_AGENTS** | True artifact independence (rare) |
234
232
 
233
+ Each phase or subtask `EXECUTION_PLAN` adds the plan's Acceptance Criteria and Known limits; its own steps still set its scope.
234
+
235
235
  ---
236
236
 
237
237
  **SINGLE_CODE_AGENT**:
@@ -348,9 +348,11 @@ After Phase 3, spawn Harden agent:
348
348
  Agent(subagent_type="Harden"):
349
349
  "TASK_DESCRIPTION: {task description}
350
350
  FILES_CHANGED: {branch_diff}
351
+ ACCEPTANCE_CRITERIA: {extracted criteria if available}
352
+ KNOWN_LIMITS: {plan's Known limits, else (none)}
351
353
  DECISIONS_CONTEXT: {decisions_context}
352
354
  FEATURE_KNOWLEDGE: {feature_knowledge_rules}
353
- Evaluate 9 pillars, fix P0/P1 issues, report status"
355
+ Evaluate 9 pillars"
354
356
  ```
355
357
 
356
358
  Harden agent reports `### Status: PASS | FIXED | BLOCKED`. **If BLOCKED:** report to user and halt. **If PASS or FIXED:** continue to Phase 5. A FIXED status commits fixes and starts no Validate of its own: the Phase 6 run covers them.
@@ -441,7 +443,7 @@ Run build, typecheck, lint, test. Report pass/fail with failure details."
441
443
 
442
444
  Any other or missing Status: report and halt; never PASS.
443
445
 
444
- **Evidence claims** come from the evidence script, which owns the claim lines and the `## Claims` section. `<head>` is the report's `HEAD:` value, or `none` if it holds anything but letters and digits (a before/after change too).
446
+ **Evidence claims** come from the evidence script. `<head>` is the report's `HEAD:` value, or `none` if it holds anything but letters and digits (a before/after change too).
445
447
 
446
448
  ```bash
447
449
  cd "{worktree}" && node "$HOME/.devflow/scripts/verify-evidence.cjs" claim --evidence ".devflow/docs/evidence-{branch_slug}.md" --head <head> gate|TP-<n>=<PASS|FAIL|SKIP>[:<exit>] ...
@@ -494,13 +496,13 @@ After every Test agent run — whatever its Status, first run or retry — appen
494
496
  **Produces:** REVALIDATION_RESULT
495
497
  **Requires:** QA_RESULT, VALIDATED_HEAD, BASE_REF, GATE_LEVEL
496
498
 
497
- Run this phase only if a qa-fix committed (`git rev-parse HEAD` differs from `VALIDATED_HEAD`); else skip to Phase 9. Spawn Validate agent:
499
+ Run only if a qa-fix committed (`git rev-parse HEAD` differs from `VALIDATED_HEAD`); else skip to Phase 9. Spawn Validate agent:
498
500
 
499
501
  ```
500
502
  Agent(subagent_type="Validate"):
501
503
  "FILES_CHANGED: {output of `git diff --name-only --diff-filter=d VALIDATED_HEAD..HEAD`}
502
504
  VALIDATION_SCOPE: changed-only
503
- Verify the qa-fix commits did not break anything."
505
+ Verify the qa-fix commits."
504
506
  ```
505
507
 
506
508
  At `lean`, open the prompt with Phase 6's `GATE_LEVEL` and `BASE_SHA` lines; its `Lint pack:` line, or `Lint pack: UNVERIFIED` if it prints none, replaces Phase 6's in VALIDATION_RESULT.
@@ -574,7 +576,7 @@ git push origin HEAD; echo "exit=$?"
574
576
 
575
577
  `exit=0` continues to the script. Any other result, a rejected non-fast-forward push included, does not block: record `TRACEABILITY: DEGRADED (evidence push failed)` for the Phase 12 report and run the script anyway.
576
578
 
577
- **Then verify, inline.** The verify is plumbing, so no Git agent runs it: `verify-evidence.cjs verify` reads the PR and the local evidence file, and writes the local result file. It writes nothing to GitHub:
579
+ **Then verify, inline.** `verify-evidence.cjs verify` reads the PR and the local evidence file, and writes the local result file. It writes nothing to GitHub:
578
580
 
579
581
  ```bash
580
582
  cd "{worktree}" && node "$HOME/.devflow/scripts/verify-evidence.cjs" verify --pr {PR_NUMBER} --evidence ".devflow/docs/evidence-{branch_slug}.md" --comment-out ".devflow/docs/evidence-result-{branch_slug}.md"; echo "exit=$?"
@@ -3,15 +3,13 @@ description: Execute a single task through implementation, quality gates, and PR
3
3
  ---
4
4
  # Implement Command
5
5
 
6
- Orchestrate a single task by spawning agents.
7
-
8
6
  ## Input
9
7
 
10
8
  <command-input>
11
9
  $ARGUMENTS
12
10
  </command-input>
13
11
 
14
- `COMMAND_INPUT` is the text above: a plan document path, an issue reference, a task description, or empty (use the conversation).
12
+ `COMMAND_INPUT` is the text above: a plan document path, an issue reference, a task description, or empty.
15
13
 
16
14
  **Issue-reference grammar.** Scan `COMMAND_INPUT` for candidate issue references: a `#`-prefixed token or a bare digit run. Collect them in source order as `ISSUE_REFS`, and forward the list to the Git agent verbatim. Do not render, normalise, pad, strip or drop a token. Under `github`, a token that matches `^#?[1-9][0-9]{0,8}$` is a reference, and the Git agent renders it as `#{n}`.
17
15
 
@@ -206,6 +204,8 @@ Setup context is the plan document, issue body or conversation.
206
204
  | **SEQUENTIAL_CODE_AGENTS** | The plan writes >= 10 files or has >= 7 steps |
207
205
  | **PARALLEL_CODE_AGENTS** | True artifact independence (rare) |
208
206
 
207
+ Each phase or subtask `EXECUTION_PLAN` adds the plan's Acceptance Criteria and Known limits; its own steps still set its scope.
208
+
209
209
  ---
210
210
 
211
211
  **SINGLE_CODE_AGENT**:
@@ -317,8 +317,10 @@ After Phase 3, spawn Harden agent:
317
317
  Agent(subagent_type="Harden"):
318
318
  "TASK_DESCRIPTION: {task description}
319
319
  FILES_CHANGED: {branch_diff}
320
+ ACCEPTANCE_CRITERIA: {extracted criteria if available}
321
+ KNOWN_LIMITS: {plan's Known limits, else (none)}
320
322
  FEATURE_KNOWLEDGE: {feature_knowledge_rules}
321
- Evaluate 9 pillars, fix P0/P1 issues, report status"
323
+ Evaluate 9 pillars"
322
324
  ```
323
325
 
324
326
  Harden agent reports `### Status: PASS | FIXED | BLOCKED`. **If BLOCKED:** report to user and halt. **If PASS or FIXED:** continue to Phase 5. A FIXED status commits fixes and starts no Validate of its own: the Phase 6 run covers them.
@@ -407,7 +409,7 @@ Run build, typecheck, lint, test. Report pass/fail with failure details."
407
409
 
408
410
  Any other or missing Status: report and halt; never PASS.
409
411
 
410
- **Evidence claims** come from the evidence script, which owns the claim lines and the `## Claims` section. `<head>` is the report's `HEAD:` value, or `none` if it holds anything but letters and digits (a before/after change too).
412
+ **Evidence claims** come from the evidence script. `<head>` is the report's `HEAD:` value, or `none` if it holds anything but letters and digits (a before/after change too).
411
413
 
412
414
  ```bash
413
415
  cd "{worktree}" && node "$HOME/.devflow/scripts/verify-evidence.cjs" claim --evidence ".devflow/docs/evidence-{branch_slug}.md" --head <head> gate|TP-<n>=<PASS|FAIL|SKIP>[:<exit>] ...
@@ -459,13 +461,13 @@ After every Test agent run — whatever its Status, first run or retry — appen
459
461
  **Produces:** REVALIDATION_RESULT
460
462
  **Requires:** QA_RESULT, VALIDATED_HEAD, BASE_REF, GATE_LEVEL
461
463
 
462
- Run this phase only if a qa-fix committed (`git rev-parse HEAD` differs from `VALIDATED_HEAD`); else skip to Phase 9. Spawn Validate agent:
464
+ Run only if a qa-fix committed (`git rev-parse HEAD` differs from `VALIDATED_HEAD`); else skip to Phase 9. Spawn Validate agent:
463
465
 
464
466
  ```
465
467
  Agent(subagent_type="Validate"):
466
468
  "FILES_CHANGED: {output of `git diff --name-only --diff-filter=d VALIDATED_HEAD..HEAD`}
467
469
  VALIDATION_SCOPE: changed-only
468
- Verify the qa-fix commits did not break anything."
470
+ Verify the qa-fix commits."
469
471
  ```
470
472
 
471
473
  At `lean`, open the prompt with Phase 6's `GATE_LEVEL` and `BASE_SHA` lines; its `Lint pack:` line, or `Lint pack: UNVERIFIED` if it prints none, replaces Phase 6's in VALIDATION_RESULT.
@@ -539,7 +541,7 @@ git push origin HEAD; echo "exit=$?"
539
541
 
540
542
  `exit=0` continues to the script. Any other result, a rejected non-fast-forward push included, does not block: record `TRACEABILITY: DEGRADED (evidence push failed)` for the Phase 12 report and run the script anyway.
541
543
 
542
- **Then verify, inline.** The verify is plumbing, so no Git agent runs it: `verify-evidence.cjs verify` reads the PR and the local evidence file, and writes the local result file. It writes nothing to GitHub:
544
+ **Then verify, inline.** `verify-evidence.cjs verify` reads the PR and the local evidence file, and writes the local result file. It writes nothing to GitHub:
543
545
 
544
546
  ```bash
545
547
  cd "{worktree}" && node "$HOME/.devflow/scripts/verify-evidence.cjs" verify --pr {PR_NUMBER} --evidence ".devflow/docs/evidence-{branch_slug}.md" --comment-out ".devflow/docs/evidence-result-{branch_slug}.md"; echo "exit=$?"
@@ -42,22 +42,22 @@ You receive from orchestrator:
42
42
  - **BASE_BRANCH**: Branch this feature branch was created from
43
43
  - **EXECUTION_PLAN**: Plan with steps, files, tests
44
44
  - **PATTERNS**: Codebase patterns to follow
45
- - **OPERATION** (optional): `implement` (default when absent) | `issue-fix` — selects operating mode; every spawn passes it as the first prompt line. Any other value returns BLOCKED, naming it, and changes nothing.
46
- - **ISSUES** (when OPERATION: issue-fix): FIX_NOW issues from the Triage agent
45
+ - **ACCEPTANCE_CRITERIA**, **KNOWN_LIMITS** (optional): Build only to the criteria and not past a stated limit. A limit or a missing criterion never drops a trust-boundary, data-loss, security or fail-closed check or its test.
46
+ - **OPERATION** (optional): `implement` (default when absent) | `issue-fix`; every spawn passes it as the first prompt line. Any other value returns BLOCKED, naming it, and changes nothing.
47
47
  - **SCOPE** (when OPERATION: issue-fix): Blast-radius scope hint (Standard | Careful | `Standard, prose only`) per issue
48
48
  - **FEATURE_KNOWLEDGE** (optional): Per KB, the Rules bullets most relevant to the task (anti-patterns, gotchas, invariants), the KB path and a heading index; sections are read on demand
49
49
 
50
50
  **Worktree Support**: With `WORKTREE_PATH`, resolve paths by the `devflow:worktree-support` skill; without it, use cwd.
51
51
 
52
- **Sequential execution context** (when chaining multiple Code agents):
52
+ **Sequential execution context**:
53
53
  - **PRIOR_PHASE_SUMMARY**: Summary from the previous Code agent (format in Handoff)
54
54
  - **FILES_FROM_PRIOR_PHASE**: Files created that must be read and understood
55
55
  - **HANDOFF_REQUIRED**: true if another Code agent follows this one
56
- - **HANDOFF_FILE** (optional): Path to the branch-scoped handoff file (steps 1 and 6 below)
56
+ - **HANDOFF_FILE** (optional): Path to the handoff file (steps 1 and 6 below)
57
57
 
58
58
  ## Responsibilities
59
59
 
60
- 1. **Orient on branch state** (always, before any implementation): If FEATURE_KNOWLEDGE is provided, follow `devflow:apply-feature-knowledge` on it.
60
+ 1. **Orient on branch state** (always, first): If FEATURE_KNOWLEDGE is provided, follow `devflow:apply-feature-knowledge` on it.
61
61
  - In one Bash call, run `git status`, `git diff --stat`, `git diff --cached --stat` and `git log --oneline --stat -n 10`
62
62
  - Match the changed files against EXECUTION_PLAN, then Read the relevant ones together, by Read once: the interfaces, types, conventions, error handling and test patterns of prior work
63
63
  - If PRIOR_PHASE_SUMMARY is provided, check your understanding against it; the code wins over the summary
@@ -79,7 +79,7 @@ You receive from orchestrator:
79
79
 
80
80
  You fix the issues the Triage agent marked FIX_NOW. Do not re-litigate dispositions.
81
81
 
82
- **Inputs:** `ISSUES`, `SCOPE` (Standard | Careful | `Standard, prose only` per issue; absent means Standard), `PUSH: false` (always for issue-fix; the orchestrator pushes after its final validation gate)
82
+ **Inputs:** `ISSUES`, `SCOPE` (Standard | Careful | `Standard, prose only` per issue; absent means Standard), `PUSH: false` (always for issue-fix)
83
83
 
84
84
  **Protocol:**
85
85
  1. Same-file issues → one commit (never two Code agents editing the same file concurrently)
@@ -39,6 +39,7 @@ You evaluate the implementation against the 9 quality pillars and fix the issues
39
39
  You receive from orchestrator:
40
40
  - **TASK_DESCRIPTION**: What was implemented
41
41
  - **FILES_CHANGED** (optional): The branch diff's file list, with no deleted file or old rename path
42
+ - **ACCEPTANCE_CRITERIA**, **KNOWN_LIMITS** (optional): Test to the criteria; every pillar still applies. A stated limit is not a finding. A limit or a missing criterion never drops a trust-boundary, data-loss, security or fail-closed check or its test.
42
43
  - **FEATURE_KNOWLEDGE** (optional): Per KB, the Rules bullets and the KB path, with no heading index. Check the implementation against each bullet's anti-pattern, gotcha or invariant. Follow `devflow:apply-feature-knowledge`.
43
44
 
44
45
  **Empty FILES_CHANGED**: If the prompt has a `FILES_CHANGED` line that lists no file, report `### Status: PASS` with the line `no files reviewed`, and review nothing; with no `FILES_CHANGED` line, find the branch changes and review them.
@@ -49,13 +50,13 @@ You receive from orchestrator:
49
50
 
50
51
  1. **Gather changes**: Read all files in FILES_CHANGED.
51
52
 
52
- 2. **Evaluate P0 pillars** (Design, Functionality, Security) and fix every issue.
53
+ 2. **Evaluate P0 pillars** and fix every issue.
53
54
 
54
55
  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.
55
56
 
56
- 4. **Evaluate P1 pillars** (Complexity, Error Handling, Tests) and fix every issue.
57
+ 4. **Evaluate P1 pillars** and fix every issue.
57
58
 
58
- 5. **Evaluate P2** (Documentation): Fix if straightforward.
59
+ 5. **Evaluate P2**: Fix if straightforward.
59
60
 
60
61
  6. **Commit fixes**: If any changes were made, create a commit with message "fix: address self-review issues".
61
62
 
@@ -68,8 +69,7 @@ Code-scanning runs in the Code agent; do not scan here.
68
69
  ## Principles
69
70
 
70
71
  1. **Minimal changes** - Fix the issue, don't refactor surrounding code
71
- 2. **Honest assessment** - If a P0 issue is unfixable, report BLOCKED immediately
72
- 3. **Fewest turns** - Batch independent reads and lookups in one turn. No Read-back after a successful Edit or Write unless a command changed the file. No narration-only turn
72
+ 2. **Fewest turns** - Batch independent reads and lookups in one turn. No Read-back after a successful Edit or Write unless a command changed the file. No narration-only turn
73
73
 
74
74
  ## Output
75
75
 
@@ -97,12 +97,12 @@ Code-scanning runs in the Code agent; do not scan here.
97
97
  - {file} ({change description})
98
98
 
99
99
  ### Commits Created
100
- - {sha} fix: address self-review issues
100
+ - {sha} {message}
101
101
  ```
102
102
 
103
103
  A workflow spawn pins the return: `{"status": "PASS" | "FIXED" | "BLOCKED"}`.
104
104
 
105
- Report cap: final message at most about 1,500 tokens; longer material goes to a new file in a `mktemp -d` folder 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.
105
+ Report cap: final message at most about 1,500 tokens; longer material goes to a new file in a `mktemp -d` folder 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).
106
106
 
107
107
  ## Boundaries
108
108
 
@@ -3,15 +3,13 @@ description: Execute a single task through implementation, quality gates, and PR
3
3
  ---
4
4
  # Implement Command
5
5
 
6
- Orchestrate a single task by spawning agents.
7
-
8
6
  ## Input
9
7
 
10
8
  <command-input>
11
9
  $ARGUMENTS
12
10
  </command-input>
13
11
 
14
- `COMMAND_INPUT` is the text above: a plan document path, an issue reference, a task description, or empty (use the conversation).
12
+ `COMMAND_INPUT` is the text above: a plan document path, an issue reference, a task description, or empty.
15
13
 
16
14
  **Issue-reference grammar.** Scan `COMMAND_INPUT` for candidate issue references: a `#`-prefixed token or a bare digit run. Collect them in source order as `ISSUE_REFS`, and forward the list to the Git agent verbatim. Do not render, normalise, pad, strip or drop a token. Under `github`, a token that matches `^#?[1-9][0-9]{0,8}$` is a reference, and the Git agent renders it as `#{n}`.
17
15
 
@@ -194,6 +192,8 @@ Setup context is the plan document, issue body or conversation.
194
192
  | **SEQUENTIAL_CODE_AGENTS** | The plan writes >= 10 files or has >= 7 steps |
195
193
  | **PARALLEL_CODE_AGENTS** | True artifact independence (rare) |
196
194
 
195
+ Each phase or subtask `EXECUTION_PLAN` adds the plan's Acceptance Criteria and Known limits; its own steps still set its scope.
196
+
197
197
  ---
198
198
 
199
199
  **SINGLE_CODE_AGENT**:
@@ -305,8 +305,10 @@ After Phase 3, spawn Harden agent:
305
305
  Agent(subagent_type="Harden"):
306
306
  "TASK_DESCRIPTION: {task description}
307
307
  FILES_CHANGED: {branch_diff}
308
+ ACCEPTANCE_CRITERIA: {extracted criteria if available}
309
+ KNOWN_LIMITS: {plan's Known limits, else (none)}
308
310
  FEATURE_KNOWLEDGE: {feature_knowledge_rules}
309
- Evaluate 9 pillars, fix P0/P1 issues, report status"
311
+ Evaluate 9 pillars"
310
312
  ```
311
313
 
312
314
  Harden agent reports `### Status: PASS | FIXED | BLOCKED`. **If BLOCKED:** report to user and halt. **If PASS or FIXED:** continue to Phase 5. A FIXED status commits fixes and starts no Validate of its own: the Phase 6 run covers them.
@@ -395,7 +397,7 @@ Run build, typecheck, lint, test. Report pass/fail with failure details."
395
397
 
396
398
  Any other or missing Status: report and halt; never PASS.
397
399
 
398
- **Evidence claims** come from the evidence script, which owns the claim lines and the `## Claims` section. `<head>` is the report's `HEAD:` value, or `none` if it holds anything but letters and digits (a before/after change too).
400
+ **Evidence claims** come from the evidence script. `<head>` is the report's `HEAD:` value, or `none` if it holds anything but letters and digits (a before/after change too).
399
401
 
400
402
  ```bash
401
403
  cd "{worktree}" && node "$HOME/.devflow/scripts/verify-evidence.cjs" claim --evidence ".devflow/docs/evidence-{branch_slug}.md" --head <head> gate|TP-<n>=<PASS|FAIL|SKIP>[:<exit>] ...
@@ -447,13 +449,13 @@ After every Test agent run — whatever its Status, first run or retry — appen
447
449
  **Produces:** REVALIDATION_RESULT
448
450
  **Requires:** QA_RESULT, VALIDATED_HEAD, BASE_REF, GATE_LEVEL
449
451
 
450
- Run this phase only if a qa-fix committed (`git rev-parse HEAD` differs from `VALIDATED_HEAD`); else skip to Phase 9. Spawn Validate agent:
452
+ Run only if a qa-fix committed (`git rev-parse HEAD` differs from `VALIDATED_HEAD`); else skip to Phase 9. Spawn Validate agent:
451
453
 
452
454
  ```
453
455
  Agent(subagent_type="Validate"):
454
456
  "FILES_CHANGED: {output of `git diff --name-only --diff-filter=d VALIDATED_HEAD..HEAD`}
455
457
  VALIDATION_SCOPE: changed-only
456
- Verify the qa-fix commits did not break anything."
458
+ Verify the qa-fix commits."
457
459
  ```
458
460
 
459
461
  At `lean`, open the prompt with Phase 6's `GATE_LEVEL` and `BASE_SHA` lines; its `Lint pack:` line, or `Lint pack: UNVERIFIED` if it prints none, replaces Phase 6's in VALIDATION_RESULT.
@@ -529,7 +531,7 @@ git push origin HEAD; echo "exit=$?"
529
531
 
530
532
  `exit=0` continues to the script. Any other result, a rejected non-fast-forward push included, does not block: record `TRACEABILITY: DEGRADED (evidence push failed)` for the Phase 12 report and run the script anyway.
531
533
 
532
- **Then refresh, inline.** The refresh is plumbing, so no Git agent runs it: `verify-evidence.cjs publish` is the whole `update-pr-evidence` operation, scrub included, in one call. Use the Bash tool with `timeout: 180000`:
534
+ **Then refresh, inline.** `verify-evidence.cjs publish` is the whole `update-pr-evidence` operation, scrub included, in one call. Use the Bash tool with `timeout: 180000`:
533
535
 
534
536
  ```bash
535
537
  cd "{worktree}" && node "$HOME/.devflow/scripts/verify-evidence.cjs" publish --pr {PR_NUMBER} --evidence ".devflow/docs/evidence-{branch_slug}.md" --publication {REVIEW_PUBLICATION resolved in Phase 1, or auto}; echo "exit=$?"
@@ -41,22 +41,22 @@ You receive from orchestrator:
41
41
  - **BASE_BRANCH**: Branch this feature branch was created from
42
42
  - **EXECUTION_PLAN**: Plan with steps, files, tests
43
43
  - **PATTERNS**: Codebase patterns to follow
44
- - **OPERATION** (optional): `implement` (default when absent) | `issue-fix` — selects operating mode; every spawn passes it as the first prompt line. Any other value returns BLOCKED, naming it, and changes nothing.
45
- - **ISSUES** (when OPERATION: issue-fix): FIX_NOW issues from the Triage agent
44
+ - **ACCEPTANCE_CRITERIA**, **KNOWN_LIMITS** (optional): Build only to the criteria and not past a stated limit. A limit or a missing criterion never drops a trust-boundary, data-loss, security or fail-closed check or its test.
45
+ - **OPERATION** (optional): `implement` (default when absent) | `issue-fix`; every spawn passes it as the first prompt line. Any other value returns BLOCKED, naming it, and changes nothing.
46
46
  - **SCOPE** (when OPERATION: issue-fix): Blast-radius scope hint (Standard | Careful | `Standard, prose only`) per issue
47
47
  - **FEATURE_KNOWLEDGE** (optional): Per KB, the Rules bullets most relevant to the task (anti-patterns, gotchas, invariants), the KB path and a heading index; sections are read on demand
48
48
 
49
49
  **Worktree Support**: With `WORKTREE_PATH`, resolve paths by the `devflow:worktree-support` skill; without it, use cwd.
50
50
 
51
- **Sequential execution context** (when chaining multiple Code agents):
51
+ **Sequential execution context**:
52
52
  - **PRIOR_PHASE_SUMMARY**: Summary from the previous Code agent (format in Handoff)
53
53
  - **FILES_FROM_PRIOR_PHASE**: Files created that must be read and understood
54
54
  - **HANDOFF_REQUIRED**: true if another Code agent follows this one
55
- - **HANDOFF_FILE** (optional): Path to the branch-scoped handoff file (steps 1 and 6 below)
55
+ - **HANDOFF_FILE** (optional): Path to the handoff file (steps 1 and 6 below)
56
56
 
57
57
  ## Responsibilities
58
58
 
59
- 1. **Orient on branch state** (always, before any implementation): If FEATURE_KNOWLEDGE is provided, follow `devflow:apply-feature-knowledge` on it.
59
+ 1. **Orient on branch state** (always, first): If FEATURE_KNOWLEDGE is provided, follow `devflow:apply-feature-knowledge` on it.
60
60
  - In one Bash call, run `git status`, `git diff --stat`, `git diff --cached --stat` and `git log --oneline --stat -n 10`
61
61
  - Match the changed files against EXECUTION_PLAN, then Read the relevant ones together, by Read once: the interfaces, types, conventions, error handling and test patterns of prior work
62
62
  - If PRIOR_PHASE_SUMMARY is provided, check your understanding against it; the code wins over the summary
@@ -78,7 +78,7 @@ You receive from orchestrator:
78
78
 
79
79
  You fix the issues the Triage agent marked FIX_NOW. Do not re-litigate dispositions.
80
80
 
81
- **Inputs:** `ISSUES`, `SCOPE` (Standard | Careful | `Standard, prose only` per issue; absent means Standard), `PUSH: false` (always for issue-fix; the orchestrator pushes after its final validation gate)
81
+ **Inputs:** `ISSUES`, `SCOPE` (Standard | Careful | `Standard, prose only` per issue; absent means Standard), `PUSH: false` (always for issue-fix)
82
82
 
83
83
  **Protocol:**
84
84
  1. Same-file issues → one commit (never two Code agents editing the same file concurrently)
@@ -43,22 +43,22 @@ You receive from orchestrator:
43
43
  - **BASE_BRANCH**: Branch this feature branch was created from
44
44
  - **EXECUTION_PLAN**: Plan with steps, files, tests
45
45
  - **PATTERNS**: Codebase patterns to follow
46
- - **OPERATION** (optional): `implement` (default when absent) | `issue-fix` — selects operating mode; every spawn passes it as the first prompt line. Any other value returns BLOCKED, naming it, and changes nothing.
47
- - **ISSUES** (when OPERATION: issue-fix): FIX_NOW issues from the Triage agent
46
+ - **ACCEPTANCE_CRITERIA**, **KNOWN_LIMITS** (optional): Build only to the criteria and not past a stated limit. A limit or a missing criterion never drops a trust-boundary, data-loss, security or fail-closed check or its test.
47
+ - **OPERATION** (optional): `implement` (default when absent) | `issue-fix`; every spawn passes it as the first prompt line. Any other value returns BLOCKED, naming it, and changes nothing.
48
48
  - **SCOPE** (when OPERATION: issue-fix): Blast-radius scope hint (Standard | Careful | `Standard, prose only`) per issue
49
49
  - **FEATURE_KNOWLEDGE** (optional): Per KB, the Rules bullets most relevant to the task (anti-patterns, gotchas, invariants), the KB path and a heading index; sections are read on demand
50
50
 
51
51
  **Worktree Support**: With `WORKTREE_PATH`, resolve paths by the `devflow:worktree-support` skill; without it, use cwd.
52
52
 
53
- **Sequential execution context** (when chaining multiple Code agents):
53
+ **Sequential execution context**:
54
54
  - **PRIOR_PHASE_SUMMARY**: Summary from the previous Code agent (format in Handoff)
55
55
  - **FILES_FROM_PRIOR_PHASE**: Files created that must be read and understood
56
56
  - **HANDOFF_REQUIRED**: true if another Code agent follows this one
57
- - **HANDOFF_FILE** (optional): Path to the branch-scoped handoff file (steps 1 and 6 below)
57
+ - **HANDOFF_FILE** (optional): Path to the handoff file (steps 1 and 6 below)
58
58
 
59
59
  ## Responsibilities
60
60
 
61
- 1. **Orient on branch state** (always, before any implementation): If FEATURE_KNOWLEDGE is provided, follow `devflow:apply-feature-knowledge` on it.
61
+ 1. **Orient on branch state** (always, first): If FEATURE_KNOWLEDGE is provided, follow `devflow:apply-feature-knowledge` on it.
62
62
  - In one Bash call, run `git status`, `git diff --stat`, `git diff --cached --stat` and `git log --oneline --stat -n 10`
63
63
  - Match the changed files against EXECUTION_PLAN, then Read the relevant ones together, by Read once: the interfaces, types, conventions, error handling and test patterns of prior work
64
64
  - If PRIOR_PHASE_SUMMARY is provided, check your understanding against it; the code wins over the summary
@@ -81,7 +81,7 @@ You receive from orchestrator:
81
81
 
82
82
  You fix the issues the Triage agent marked FIX_NOW. Do not re-litigate dispositions.
83
83
 
84
- **Inputs:** `ISSUES`, `SCOPE` (Standard | Careful | `Standard, prose only` per issue; absent means Standard), `PUSH: false` (always for issue-fix; the orchestrator pushes after its final validation gate)
84
+ **Inputs:** `ISSUES`, `SCOPE` (Standard | Careful | `Standard, prose only` per issue; absent means Standard), `PUSH: false` (always for issue-fix)
85
85
 
86
86
  **Protocol:**
87
87
  1. Same-file issues → one commit (never two Code agents editing the same file concurrently)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devflow-kit",
3
- "version": "3.13.0",
3
+ "version": "3.14.0",
4
4
  "description": "A meta-harness for Claude Code — turns a single coding agent into an engineering team: orchestration, parallel review, persistent memory, curated decisions, and graph workflows",
5
5
  "type": "module",
6
6
  "bin": {
@@ -57,22 +57,22 @@ You receive from orchestrator:
57
57
  - **BASE_BRANCH**: Branch this feature branch was created from
58
58
  - **EXECUTION_PLAN**: Plan with steps, files, tests
59
59
  - **PATTERNS**: Codebase patterns to follow
60
- - **OPERATION** (optional): `implement` (default when absent) | `issue-fix` — selects operating mode; every spawn passes it as the first prompt line. Any other value returns BLOCKED, naming it, and changes nothing.
61
- - **ISSUES** (when OPERATION: issue-fix): FIX_NOW issues from the Triage agent
60
+ - **ACCEPTANCE_CRITERIA**, **KNOWN_LIMITS** (optional): Build only to the criteria and not past a stated limit. A limit or a missing criterion never drops a trust-boundary, data-loss, security or fail-closed check or its test.
61
+ - **OPERATION** (optional): `implement` (default when absent) | `issue-fix`; every spawn passes it as the first prompt line. Any other value returns BLOCKED, naming it, and changes nothing.
62
62
  - **SCOPE** (when OPERATION: issue-fix): Blast-radius scope hint (Standard | Careful | `Standard, prose only`) per issue
63
63
  - **FEATURE_KNOWLEDGE** (optional): Per KB, the Rules bullets most relevant to the task (anti-patterns, gotchas, invariants), the KB path and a heading index; sections are read on demand
64
64
 
65
65
  **Worktree Support**: With `WORKTREE_PATH`, resolve paths by the `devflow:worktree-support` skill; without it, use cwd.
66
66
 
67
- **Sequential execution context** (when chaining multiple Code agents):
67
+ **Sequential execution context**:
68
68
  - **PRIOR_PHASE_SUMMARY**: Summary from the previous Code agent (format in Handoff)
69
69
  - **FILES_FROM_PRIOR_PHASE**: Files created that must be read and understood
70
70
  - **HANDOFF_REQUIRED**: true if another Code agent follows this one
71
- - **HANDOFF_FILE** (optional): Path to the branch-scoped handoff file (steps 1 and 6 below)
71
+ - **HANDOFF_FILE** (optional): Path to the handoff file (steps 1 and 6 below)
72
72
 
73
73
  ## Responsibilities
74
74
 
75
- 1. **Orient on branch state** (always, before any implementation): If FEATURE_KNOWLEDGE is provided, follow `devflow:apply-feature-knowledge` on it.
75
+ 1. **Orient on branch state** (always, first): If FEATURE_KNOWLEDGE is provided, follow `devflow:apply-feature-knowledge` on it.
76
76
  - In one Bash call, run `git status`, `git diff --stat`, `git diff --cached --stat` and `git log --oneline --stat -n 10`
77
77
  - Match the changed files against EXECUTION_PLAN, then Read the relevant ones together, by Read once: the interfaces, types, conventions, error handling and test patterns of prior work
78
78
  - If PRIOR_PHASE_SUMMARY is provided, check your understanding against it; the code wins over the summary
@@ -102,7 +102,7 @@ You receive from orchestrator:
102
102
 
103
103
  You fix the issues the Triage agent marked FIX_NOW. Do not re-litigate dispositions.
104
104
 
105
- **Inputs:** `ISSUES`, `SCOPE` (Standard | Careful | `Standard, prose only` per issue; absent means Standard), `PUSH: false` (always for issue-fix; the orchestrator pushes after its final validation gate)
105
+ **Inputs:** `ISSUES`, `SCOPE` (Standard | Careful | `Standard, prose only` per issue; absent means Standard), `PUSH: false` (always for issue-fix)
106
106
 
107
107
  **Protocol:**
108
108
  1. Same-file issues → one commit (never two Code agents editing the same file concurrently)
@@ -45,6 +45,7 @@ You evaluate the implementation against the 9 quality pillars and fix the issues
45
45
  You receive from orchestrator:
46
46
  - **TASK_DESCRIPTION**: What was implemented
47
47
  - **FILES_CHANGED** (optional): The branch diff's file list, with no deleted file or old rename path
48
+ - **ACCEPTANCE_CRITERIA**, **KNOWN_LIMITS** (optional): Test to the criteria; every pillar still applies. A stated limit is not a finding. A limit or a missing criterion never drops a trust-boundary, data-loss, security or fail-closed check or its test.
48
49
  <!-- curation:on -->
49
50
  - **DECISIONS_CONTEXT** (optional): Compact index of active ADR/PF entries for this repository (pre-rendered to `.devflow/curation/index.md` in its main worktree). `(none)` when absent. Use `devflow:apply-decisions` to Read full bodies on demand.
50
51
  <!-- curation:end -->
@@ -64,13 +65,13 @@ Follow the `devflow:apply-decisions` skill: check that the implementation is con
64
65
 
65
66
  1. **Gather changes**: Read all files in FILES_CHANGED.
66
67
 
67
- 2. **Evaluate P0 pillars** (Design, Functionality, Security) and fix every issue.
68
+ 2. **Evaluate P0 pillars** and fix every issue.
68
69
 
69
70
  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.
70
71
 
71
- 4. **Evaluate P1 pillars** (Complexity, Error Handling, Tests) and fix every issue.
72
+ 4. **Evaluate P1 pillars** and fix every issue.
72
73
 
73
- 5. **Evaluate P2** (Documentation): Fix if straightforward.
74
+ 5. **Evaluate P2**: Fix if straightforward.
74
75
 
75
76
  6. **Commit fixes**: If any changes were made, create a commit with message "fix: address self-review issues".
76
77
 
@@ -83,8 +84,7 @@ Code-scanning runs in the Code agent; do not scan here.
83
84
  ## Principles
84
85
 
85
86
  1. **Minimal changes** - Fix the issue, don't refactor surrounding code
86
- 2. **Honest assessment** - If a P0 issue is unfixable, report BLOCKED immediately
87
- 3. **Fewest turns** - Batch independent reads and lookups in one turn. No Read-back after a successful Edit or Write unless a command changed the file. No narration-only turn
87
+ 2. **Fewest turns** - Batch independent reads and lookups in one turn. No Read-back after a successful Edit or Write unless a command changed the file. No narration-only turn
88
88
 
89
89
  ## Output
90
90
 
@@ -112,12 +112,12 @@ Code-scanning runs in the Code agent; do not scan here.
112
112
  - {file} ({change description})
113
113
 
114
114
  ### Commits Created
115
- - {sha} fix: address self-review issues
115
+ - {sha} {message}
116
116
  ```
117
117
 
118
118
  A workflow spawn pins the return: `{"status": "PASS" | "FIXED" | "BLOCKED"}`.
119
119
 
120
- Report cap: final message at most about 1,500 tokens; longer material goes to a new file in a `mktemp -d` folder 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.
120
+ Report cap: final message at most about 1,500 tokens; longer material goes to a new file in a `mktemp -d` folder 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).
121
121
 
122
122
  ## Boundaries
123
123
 
@@ -13,15 +13,13 @@ output-dir: dist/commands
13
13
  @import "./_partials/_settings.mds" as settings
14
14
  # Implement Command
15
15
 
16
- Orchestrate a single task by spawning agents.
17
-
18
16
  ## Input
19
17
 
20
18
  <command-input>
21
19
  $ARGUMENTS
22
20
  </command-input>
23
21
 
24
- `COMMAND_INPUT` is the text above: a plan document path, an issue reference, a task description, or empty (use the conversation).
22
+ `COMMAND_INPUT` is the text above: a plan document path, an issue reference, a task description, or empty.
25
23
 
26
24
  {{issue_ref_grammar()}}
27
25
 
@@ -211,6 +209,8 @@ Setup context is the plan document, issue body or conversation.
211
209
  | **SEQUENTIAL_CODE_AGENTS** | The plan writes >= 10 files or has >= 7 steps |
212
210
  | **PARALLEL_CODE_AGENTS** | True artifact independence (rare) |
213
211
 
212
+ Each phase or subtask `EXECUTION_PLAN` adds the plan's Acceptance Criteria and Known limits; its own steps still set its scope.
213
+
214
214
  ---
215
215
 
216
216
  **SINGLE_CODE_AGENT**:
@@ -337,11 +337,13 @@ After Phase 3, spawn Harden agent:
337
337
  Agent(subagent_type="Harden"):
338
338
  "TASK_DESCRIPTION: {task description}
339
339
  FILES_CHANGED: {branch_diff}
340
+ ACCEPTANCE_CRITERIA: {extracted criteria if available}
341
+ KNOWN_LIMITS: {plan's Known limits, else (none)}
340
342
  <!-- curation:on -->
341
343
  DECISIONS_CONTEXT: {decisions_context}
342
344
  <!-- curation:end -->
343
345
  FEATURE_KNOWLEDGE: {feature_knowledge_rules}
344
- Evaluate 9 pillars, fix P0/P1 issues, report status"
346
+ Evaluate 9 pillars"
345
347
  ```
346
348
 
347
349
  Harden agent reports `### Status: PASS | FIXED | BLOCKED`. **If BLOCKED:** report to user and halt. **If PASS or FIXED:** continue to Phase 5. A FIXED status commits fixes and starts no Validate of its own: the Phase 6 run covers them.
@@ -436,7 +438,7 @@ Run build, typecheck, lint, test. Report pass/fail with failure details."
436
438
 
437
439
  Any other or missing Status: report and halt; never PASS.
438
440
 
439
- **Evidence claims** come from the evidence script, which owns the claim lines and the `## Claims` section. `<head>` is the report's `HEAD:` value, or `none` if it holds anything but letters and digits (a before/after change too).
441
+ **Evidence claims** come from the evidence script. `<head>` is the report's `HEAD:` value, or `none` if it holds anything but letters and digits (a before/after change too).
440
442
 
441
443
  ```bash
442
444
  cd "{worktree}" && node "$HOME/.devflow/scripts/verify-evidence.cjs" claim --evidence ".devflow/docs/evidence-{branch_slug}.md" --head <head> gate|TP-<n>=<PASS|FAIL|SKIP>[:<exit>] ...
@@ -491,13 +493,13 @@ After every Test agent run — whatever its Status, first run or retry — appen
491
493
  **Produces:** REVALIDATION_RESULT
492
494
  **Requires:** QA_RESULT, VALIDATED_HEAD, BASE_REF, GATE_LEVEL
493
495
 
494
- Run this phase only if a qa-fix committed (`git rev-parse HEAD` differs from `VALIDATED_HEAD`); else skip to Phase 9. Spawn Validate agent:
496
+ Run only if a qa-fix committed (`git rev-parse HEAD` differs from `VALIDATED_HEAD`); else skip to Phase 9. Spawn Validate agent:
495
497
 
496
498
  ```
497
499
  Agent(subagent_type="Validate"):
498
500
  "FILES_CHANGED: {output of `git diff --name-only --diff-filter=d VALIDATED_HEAD..HEAD`}
499
501
  VALIDATION_SCOPE: changed-only
500
- Verify the qa-fix commits did not break anything."
502
+ Verify the qa-fix commits."
501
503
  ```
502
504
 
503
505
  At `lean`, open the prompt with Phase 6's `GATE_LEVEL` and `BASE_SHA` lines; its `Lint pack:` line, or `Lint pack: UNVERIFIED` if it prints none, replaces Phase 6's in VALIDATION_RESULT.
@@ -594,7 +596,7 @@ git push origin HEAD; echo "exit=$?"
594
596
  `exit=0` continues to the script. Any other result, a rejected non-fast-forward push included, does not block: record `TRACEABILITY: DEGRADED (evidence push failed)` for the Phase 12 report and run the script anyway.
595
597
 
596
598
  <!-- compliance:on -->
597
- **Then refresh, inline.** The refresh is plumbing, so no Git agent runs it: `verify-evidence.cjs publish` is the whole `update-pr-evidence` operation, scrub included, in one call. Use the Bash tool with `timeout: 180000`:
599
+ **Then refresh, inline.** `verify-evidence.cjs publish` is the whole `update-pr-evidence` operation, scrub included, in one call. Use the Bash tool with `timeout: 180000`:
598
600
 
599
601
  ```bash
600
602
  cd "{worktree}" && node "$HOME/.devflow/scripts/verify-evidence.cjs" publish --pr {PR_NUMBER} --evidence ".devflow/docs/evidence-{branch_slug}.md" --publication {REVIEW_PUBLICATION resolved in Phase 1, or auto}; echo "exit=$?"
@@ -602,7 +604,7 @@ cd "{worktree}" && node "$HOME/.devflow/scripts/verify-evidence.cjs" publish --p
602
604
 
603
605
  Drop the `--evidence` pair when that file does not exist or its path does not match `^[A-Za-z0-9._/-]{1,255}$`. `{PR_NUMBER}` is digits only, and the publication value is `auto`, `full`, `off` or `stub`. Capture its stdout as `EVIDENCE_RESULT`; empty stdout, or an exit other than 0 or 2, is `TRACEABILITY: DEGRADED (evidence unavailable)`. It never blocks: whatever it returns, continue to Phase 12.
604
606
  <!-- compliance:off -->
605
- **Then verify, inline.** The verify is plumbing, so no Git agent runs it: `verify-evidence.cjs verify` reads the PR and the local evidence file, and writes the local result file. It writes nothing to GitHub:
607
+ **Then verify, inline.** `verify-evidence.cjs verify` reads the PR and the local evidence file, and writes the local result file. It writes nothing to GitHub:
606
608
 
607
609
  ```bash
608
610
  cd "{worktree}" && node "$HOME/.devflow/scripts/verify-evidence.cjs" verify --pr {PR_NUMBER} --evidence ".devflow/docs/evidence-{branch_slug}.md" --comment-out ".devflow/docs/evidence-result-{branch_slug}.md"; echo "exit=$?"