devflow-kit 3.8.0 → 3.10.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 +231 -0
- package/README.md +6 -6
- package/dist/agents/code.md +10 -10
- package/dist/agents/fix.md +7 -7
- package/dist/agents/git.md +2 -2
- package/dist/agents/harden.md +7 -6
- package/dist/agents/refactor.md +6 -6
- package/dist/agents/skim.md +1 -1
- package/dist/agents/triage.md +7 -0
- package/dist/cli/commands/ambient.js +10 -2
- package/dist/cli/commands/compliance-prompts.js +9 -4
- package/dist/cli/commands/compliance.js +171 -24
- package/dist/cli/commands/curation.js +79 -23
- package/dist/cli/commands/gate-level-prompts.js +39 -23
- package/dist/cli/commands/gates.js +6 -7
- package/dist/cli/commands/init.js +150 -145
- package/dist/cli/commands/install-report.js +34 -0
- package/dist/cli/commands/legacy-sweep.js +64 -0
- package/dist/cli/commands/memory.js +59 -12
- package/dist/cli/commands/proxy.js +6 -1
- package/dist/cli/commands/rules.js +29 -12
- package/dist/cli/commands/skills.js +42 -9
- package/dist/cli/commands/tracker.js +9 -3
- package/dist/cli/commands/uninstall.js +354 -60
- package/dist/commands/bug-analysis.md +71 -122
- package/dist/commands/code-review.md +11 -11
- package/dist/commands/debug.md +2 -2
- package/dist/commands/dynamic-build.md +25 -25
- package/dist/commands/dynamic-plan.md +2 -2
- package/dist/commands/dynamic-profile.md +2 -2
- package/dist/commands/dynamic-tickets.md +2 -2
- package/dist/commands/explore.md +2 -2
- package/dist/commands/implement.md +48 -34
- package/dist/commands/plan.md +2 -2
- package/dist/commands/release.md +3 -3
- package/dist/commands/research.md +2 -2
- package/dist/commands/resolve.md +50 -46
- package/dist/commands/self-review.md +10 -9
- package/dist/compliance-off/agents/git.md +120 -0
- package/dist/compliance-off/agents/triage.md +180 -0
- package/dist/compliance-off/commands/bug-analysis.md +398 -0
- package/dist/compliance-off/commands/code-review.md +520 -0
- package/dist/compliance-off/commands/dynamic-build.md +1251 -0
- package/dist/compliance-off/commands/dynamic-tickets.md +676 -0
- package/dist/compliance-off/commands/implement.md +736 -0
- package/dist/compliance-off/commands/plan.md +671 -0
- package/dist/compliance-off/commands/release.md +309 -0
- package/dist/compliance-off/commands/resolve.md +742 -0
- package/dist/compliance-off/skills/git/references/decision-markers.md +17 -0
- package/dist/compliance-off/skills/git/references/learn-conventions.md +80 -0
- package/dist/compliance-off/skills/git/references/pr/check-ci-status.md +33 -0
- package/dist/compliance-off/skills/git/references/pr/check-merge-readiness.md +49 -0
- package/dist/compliance-off/skills/git/references/pr/fetch-review-threads.md +52 -0
- package/dist/compliance-off/skills/git/references/pr/validate-branch.md +47 -0
- package/dist/compliance-off/skills/git/references/tracker/_contract.md +33 -0
- package/dist/compliance-off/skills/git/references/tracker/_mcp.md +153 -0
- package/dist/compliance-off/skills/git/references/tracker/github/create-release.md +35 -0
- package/dist/compliance-off/skills/git/references/tracker/github/ensure-pr-ready.md +100 -0
- package/dist/compliance-off/skills/git/references/tracker/github/ensure-traceable-issue.md +74 -0
- package/dist/compliance-off/skills/git/references/tracker/github/fetch-issue.md +69 -0
- package/dist/compliance-off/skills/git/references/tracker/github/fetch-issues-batch.md +65 -0
- package/dist/compliance-off/skills/git/references/tracker/github/gather-release-evidence.md +48 -0
- package/dist/compliance-off/skills/git/references/tracker/github/setup-task.md +77 -0
- package/dist/compliance-off/skills/git/references/tracker/jira/create-release.md +35 -0
- package/dist/compliance-off/skills/git/references/tracker/jira/ensure-pr-ready.md +100 -0
- package/dist/compliance-off/skills/git/references/tracker/jira/ensure-traceable-issue.md +61 -0
- package/dist/compliance-off/skills/git/references/tracker/jira/fetch-issue.md +51 -0
- package/dist/compliance-off/skills/git/references/tracker/jira/fetch-issues-batch.md +63 -0
- package/dist/compliance-off/skills/git/references/tracker/jira/gather-release-evidence.md +47 -0
- package/dist/compliance-off/skills/git/references/tracker/jira/setup-task.md +82 -0
- package/dist/compliance-off/skills/git/references/tracker/linear/create-release.md +35 -0
- package/dist/compliance-off/skills/git/references/tracker/linear/ensure-pr-ready.md +100 -0
- package/dist/compliance-off/skills/git/references/tracker/linear/ensure-traceable-issue.md +61 -0
- package/dist/compliance-off/skills/git/references/tracker/linear/fetch-issue.md +51 -0
- package/dist/compliance-off/skills/git/references/tracker/linear/fetch-issues-batch.md +63 -0
- package/dist/compliance-off/skills/git/references/tracker/linear/gather-release-evidence.md +47 -0
- package/dist/compliance-off/skills/git/references/tracker/linear/setup-task.md +83 -0
- package/dist/compliance-off/skills/git/references/trust-rule.md +7 -0
- package/dist/core/agent-models.js +19 -4
- package/dist/core/area-pause-notice.js +44 -0
- package/dist/core/assets.js +126 -17
- package/dist/core/compliance-off-files.js +27 -0
- package/dist/core/curation-move-skip.js +4 -5
- package/dist/core/curation-queue-cleanup.js +6 -5
- package/dist/core/curation-store.js +1 -0
- package/dist/core/curation-variants.js +460 -112
- package/dist/core/evidence-policy.js +10 -8
- package/dist/core/flags.js +2 -2
- package/dist/core/installed-variants.js +63 -0
- package/dist/core/manifest.js +48 -5
- package/dist/core/mds-variants.js +700 -3
- package/dist/core/orphan-sweep.js +11 -2
- package/dist/core/plugins.js +69 -12
- package/dist/core/tracked-areas.js +138 -14
- package/dist/curation-compliance-off/agents/triage.md +176 -0
- package/dist/curation-compliance-off/commands/bug-analysis.md +349 -0
- package/dist/curation-compliance-off/commands/code-review.md +481 -0
- package/dist/curation-compliance-off/commands/dynamic-build.md +1211 -0
- package/dist/curation-compliance-off/commands/dynamic-tickets.md +634 -0
- package/dist/curation-compliance-off/commands/implement.md +689 -0
- package/dist/curation-compliance-off/commands/plan.md +631 -0
- package/dist/curation-compliance-off/commands/release.md +279 -0
- package/dist/curation-compliance-off/commands/resolve.md +692 -0
- package/dist/curation-off/agents/code.md +10 -10
- package/dist/curation-off/agents/fix.md +7 -7
- package/dist/curation-off/agents/harden.md +7 -6
- package/dist/curation-off/agents/refactor.md +6 -6
- package/dist/curation-off/agents/triage.md +7 -0
- package/dist/curation-off/commands/bug-analysis.md +69 -119
- package/dist/curation-off/commands/code-review.md +11 -11
- package/dist/curation-off/commands/debug.md +2 -2
- package/dist/curation-off/commands/dynamic-build.md +25 -25
- package/dist/curation-off/commands/explore.md +2 -2
- package/dist/curation-off/commands/implement.md +48 -34
- package/dist/curation-off/commands/plan.md +2 -2
- package/dist/curation-off/commands/release.md +1 -1
- package/dist/curation-off/commands/resolve.md +50 -46
- package/dist/curation-off/commands/self-review.md +10 -9
- package/dist/hud/components/curation-counts.js +27 -0
- package/dist/skills/git/references/pr/post-resolution-summary.md +12 -11
- package/dist/skills/git/references/pr/post-review-summary.md +12 -11
- package/dist/skills/git/references/pr/resolve-review-threads.md +1 -1
- package/dist/skills/git/references/pr/update-pr-evidence.md +2 -2
- package/dist/skills/git/references/publication-gate.md +6 -7
- package/dist/skills/git/references/tracker/github/manage-debt.md +6 -2
- package/dist/skills/git/references/tracker/jira/manage-debt.md +6 -2
- package/dist/skills/git/references/tracker/linear/manage-debt.md +6 -2
- package/dist/targets/claude-code/behavior-install.js +23 -9
- package/dist/targets/claude-code/charter-render.js +374 -0
- package/dist/targets/claude-code/compliance-install.js +32 -12
- package/dist/targets/claude-code/compliance-off-files.js +245 -0
- package/dist/targets/claude-code/curation-install.js +570 -100
- package/dist/targets/claude-code/installer.js +467 -62
- package/dist/targets/claude-code/language-stamp.js +6 -0
- package/dist/targets/claude-code/linked-folder.js +182 -0
- package/dist/targets/claude-code/reference-converge.js +118 -0
- package/dist/targets/claude-code/tracker-install.js +21 -8
- package/dist/targets/claude-code/tracker-servers.js +20 -6
- package/dist/targets/claude-code/workflow-folder-install.js +231 -0
- package/dist/variant-axes.json +109 -0
- package/package.json +1 -1
- package/src/assets/agents/_partials/_code.mds +6 -6
- package/src/assets/agents/code.mds +4 -4
- package/src/assets/agents/evaluate.md +7 -13
- package/src/assets/agents/fix.mds +1 -1
- package/src/assets/agents/git.mds +34 -2
- package/src/assets/agents/harden.mds +7 -6
- package/src/assets/agents/skim.mds +1 -1
- package/src/assets/agents/test.md +21 -12
- package/src/assets/agents/triage.mds +9 -0
- package/src/assets/agents/validate.md +27 -34
- package/src/assets/commands/_partials/_compliance.mds +5 -3
- package/src/assets/commands/_partials/_decisions.mds +10 -8
- package/src/assets/commands/_partials/_engine.mds +9 -8
- package/src/assets/commands/_partials/_publication.mds +10 -1
- package/src/assets/commands/_partials/_settings.mds +2 -2
- package/src/assets/commands/bug-analysis.mds +80 -126
- package/src/assets/commands/code-review.mds +52 -9
- package/src/assets/commands/dynamic-build.mds +109 -15
- package/src/assets/commands/dynamic-tickets.mds +13 -0
- package/src/assets/commands/implement.mds +145 -33
- package/src/assets/commands/plan.mds +19 -0
- package/src/assets/commands/release.mds +50 -1
- package/src/assets/commands/resolve.mds +229 -44
- package/src/assets/commands/self-review.mds +8 -7
- package/src/assets/mds/git/_ops.mds +29 -1
- package/src/assets/mds/git/_ops_pr.mds +20 -10
- package/src/assets/mds/git/_ops_steps.mds +27 -0
- package/src/assets/mds/git/_pr.mds +15 -15
- package/src/assets/mds/git/_references.mds +12 -7
- package/src/assets/mds/tracker/_common.mds +4 -0
- package/src/assets/mds/tracker/_github.mds +43 -4
- package/src/assets/mds/tracker/_jira.mds +44 -4
- package/src/assets/mds/tracker/_linear.mds +44 -4
- package/src/assets/rules/quality.md +2 -0
- package/src/assets/scripts/ci-wait.cjs +493 -118
- package/src/assets/scripts/hooks/assets/implement-installed +1 -0
- package/src/assets/scripts/hooks/assets/orchestrator-charter.md +13 -11
- package/src/assets/scripts/hooks/background-memory-update +79 -1
- package/src/assets/scripts/hooks/json-helper.cjs +44 -2
- package/src/assets/scripts/hooks/lib/curation-store.cjs +82 -20
- package/src/assets/scripts/hooks/lib/render-decisions.cjs +9 -1
- package/src/assets/scripts/hooks/lib/tracked-areas.cjs +226 -33
- package/src/assets/scripts/hooks/memory-permission +10 -2
- package/src/assets/scripts/hooks/memory-worker +11 -0
- package/src/assets/scripts/hooks/pre-compact-memory +11 -0
- package/src/assets/scripts/hooks/preamble +18 -8
- package/src/assets/scripts/hooks/queue-append +218 -1
- package/src/assets/scripts/hooks/session-start-context +89 -37
- package/src/assets/scripts/hooks/session-start-memory +39 -0
- package/src/assets/scripts/hooks/session-start-orchestrator +4 -2
- package/src/assets/scripts/pr-evidence.cjs +46 -4
- package/src/assets/scripts/resolve-settings.cjs +244 -30
- package/src/assets/scripts/verify-evidence.cjs +708 -124
- package/src/assets/skills/agent-references/SKILL.md +7 -1
- package/src/assets/skills/agent-references/references/commands/implement-levels.md +6 -4
- package/src/assets/skills/agent-references/references/commands/implement-revalidate.md +3 -3
- package/src/assets/skills/agent-references/references/commands/plan-levels.md +1 -1
- package/src/assets/skills/agent-references/references/commands/resolve-levels.md +3 -2
- package/src/assets/skills/agent-references/references/synthesize/bug-analysis.md +6 -2
- package/src/assets/skills/agent-references/references/synthesize/review.md +4 -4
- package/src/assets/skills/agent-references/references/triage/severity-tiers.md +43 -0
- package/src/assets/skills/agent-references/references/validate/passed-alone.md +14 -0
- package/src/assets/skills/docs-framework/SKILL.md +5 -2
- package/src/assets/skills/git/SKILL.md +3 -3
- package/src/assets/skills/git/references/github-api.md +2 -139
- package/src/assets/skills/git/references/github-posting.md +158 -0
- package/src/assets/skills/review-methodology/SKILL.md +1 -1
- package/src/assets/skills/review-methodology/references/patterns.md +1 -1
- package/src/assets/skills/review-methodology/references/report-template.md +1 -2
- package/src/assets/skills/testing/SKILL.md +2 -4
|
@@ -77,13 +77,13 @@ When a ticket requires multiple sequential Code agent phases, each Code agent ap
|
|
|
77
77
|
|
|
78
78
|
### Settings line
|
|
79
79
|
|
|
80
|
-
**Resolve the settings line** once per worktree root, reusing a line this run already resolved for the same root. `{root}` is the worktree the values are for — the repository root
|
|
80
|
+
**Resolve the settings line** once per worktree root, reusing a line this run already resolved for the same root. `{root}` is the worktree the values are for — the repository root in a one-worktree run:
|
|
81
81
|
|
|
82
82
|
```bash
|
|
83
83
|
node "$HOME/.devflow/scripts/resolve-settings.cjs" "{root}" 2>/dev/null; echo "exit=$?"
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
Accept the output only when it is exactly two lines: `exit=0` last and, before it, one line of the form `TRACKER=<github|jira|linear> TRACKER_SOURCE=<project|personal|machine|default> TRACKER_WARN=<none|mismatch|invalid> SITE=<none|https://<host>> KEY=<none|<key>> REVIEW_PUBLICATION=<off|auto|full> COMPLIANCE=<off|generic|<id>[,<id>…]> MEMORY=<on|off> CURATION=<on|off> KNOWLEDGE=<on|off> GATE_LEVEL=<full|standard|lean>` — these fields, in this order, nothing else, where `<host>` is a lowercase dotted host name alone, `<key>` is 2–10 of `A-Z`, `0-9` and `_` starting with a letter, and each `<id>` is one of `gdpr`, `hipaa`, `pci-dss`, `soc2`, `iso-27001`, `sox`. **Anything else** (a non-zero exit, no line, extra text, or a missing, reordered or unlisted field or value) ⇒ use `TRACKER=github TRACKER_SOURCE=default TRACKER_WARN=invalid SITE=none KEY=none REVIEW_PUBLICATION=off COMPLIANCE=generic MEMORY=
|
|
86
|
+
Accept the output only when it is exactly two lines: `exit=0` last and, before it, one line of the form `TRACKER=<github|jira|linear> TRACKER_SOURCE=<project|personal|machine|default> TRACKER_WARN=<none|mismatch|invalid> SITE=<none|https://<host>> KEY=<none|<key>> REVIEW_PUBLICATION=<off|auto|full> COMPLIANCE=<off|generic|<id>[,<id>…]> MEMORY=<on|off> CURATION=<on|off> KNOWLEDGE=<on|off> GATE_LEVEL=<full|standard|lean>` — these fields, in this order, nothing else, where `<host>` is a lowercase dotted host name alone, `<key>` is 2–10 of `A-Z`, `0-9` and `_` starting with a letter, and each `<id>` is one of `gdpr`, `hipaa`, `pci-dss`, `soc2`, `iso-27001`, `sox`. **Anything else** (a non-zero exit, no line, extra text, or a missing, reordered or unlisted field or value) ⇒ use `TRACKER=github TRACKER_SOURCE=default TRACKER_WARN=invalid SITE=none KEY=none REVIEW_PUBLICATION=off COMPLIANCE=generic MEMORY=off CURATION=off KNOWLEDGE=off GATE_LEVEL=full` instead.
|
|
87
87
|
|
|
88
88
|
The accepted line is the only source of these values.
|
|
89
89
|
|
|
@@ -131,7 +131,7 @@ The following agentType values are valid. Model tiers are shown for reference
|
|
|
131
131
|
Before authoring, verify:
|
|
132
132
|
|
|
133
133
|
1. **Workflow tool available:** if the `Workflow` tool is not in your available tools, STOP and tell the user: "The Workflow tool is not available in this session. dynamic-build requires Claude Code's dynamic workflow runtime."
|
|
134
|
-
2. **`agentType` support:**
|
|
134
|
+
2. **`agentType` support:** if spawned agents return no results, check that devflow is installed (`devflow init` has been run).
|
|
135
135
|
3. **Tracker paths:** an issue reference or URL in the input is read through the Git agent, which resolves the configured tracker and its access itself and reports `TRACEABILITY: DEGRADED ({reason})` when it cannot read one — then note it and fall back to the issue text the user provided. No tracker CLI is checked here.
|
|
136
136
|
4. **No-remote path:** if the repo has no remote, skip the remote-dependent steps (the wave PR and its evidence) and proceed with local branch operations only; the Git agent reports DEGRADED for any tracker step it cannot reach.
|
|
137
137
|
|
|
@@ -325,7 +325,7 @@ After implementing, commit your changes with a conventional-commit message and r
|
|
|
325
325
|
);
|
|
326
326
|
|
|
327
327
|
// Phase 3: Gate 1 #1 — post-code pipeline: Polish agent → Harden agent → Validate agent.
|
|
328
|
-
// Validate runs last and unconditionally, so its one full run covers every commit the pass made
|
|
328
|
+
// Validate runs last and unconditionally, so its one full run covers every commit the pass made.
|
|
329
329
|
const gate1 = await phase("gate1", async () => {
|
|
330
330
|
await agent(`Polish and reduce complexity of recent changes on branch ${BRANCH}. Commit any improvements.`, { agentType: "Polish" });
|
|
331
331
|
|
|
@@ -383,8 +383,7 @@ Criteria: ${CRITERIA || "see plan"}
|
|
|
383
383
|
Return: {"verdict": "PASS" | "FAIL", "rationale": "..."} — FAIL if either answer is no, naming the failing criterion or the drift.`, { agentType: "Evaluate" });
|
|
384
384
|
evalVerdict = evaluation?.verdict === "PASS" ? "PASS" : "FAIL";
|
|
385
385
|
if (evalVerdict === "FAIL") {
|
|
386
|
-
// fix-and-continue — no re-evaluate, no inline Gate 1.
|
|
387
|
-
// after the review pass is the build gate before the branch is handed back.
|
|
386
|
+
// fix-and-continue — no re-evaluate, no inline Gate 1.
|
|
388
387
|
await agent(`OPERATION: alignment-fix
|
|
389
388
|
Fix the alignment issues identified by the Evaluate agent on branch ${BRANCH}:
|
|
390
389
|
${evaluation?.rationale || "see the Evaluate agent's report"}
|
|
@@ -400,16 +399,18 @@ Self-verify your fix compiles, following your Running commands block. Commit fix
|
|
|
400
399
|
${CRITERIA || "(none)"}
|
|
401
400
|
TEST_PLAN: ${TEST_PLAN || "(none)"}
|
|
402
401
|
Follow your Running commands block for every scenario command.
|
|
403
|
-
Cover: functionality, API contracts, performance, and cover every TEST_PLAN scenario.
|
|
404
|
-
|
|
402
|
+
Cover: functionality, API contracts, performance, and cover every TEST_PLAN scenario.
|
|
403
|
+
Return: {"verdict": "PASS" | "FAIL" | "BLOCKED", "failures": "..."}`, { agentType: "Test" });
|
|
404
|
+
const word = testResult?.verdict?.split?.(/[ (]/)[0];
|
|
405
|
+
testVerdict = ["PASS", "FAIL"].includes(word) ? word : "BLOCKED";
|
|
405
406
|
if (testVerdict === "FAIL") {
|
|
406
407
|
// fix-and-continue — no re-test, no inline Gate 1.
|
|
407
408
|
await agent(`OPERATION: qa-fix
|
|
408
409
|
Fix the failing acceptance test scenarios on branch ${BRANCH}:
|
|
409
|
-
${testResult.failures}
|
|
410
|
+
${testResult.failures || "see the Test agent's report"}
|
|
410
411
|
${COMPLIANCE_DIRECTIVE}
|
|
411
412
|
Self-verify your fix compiles and the scenarios pass, following your Running commands block. Commit fixes.`, { agentType: "Fix" });
|
|
412
|
-
testVerdict = "FAIL-FIXED";
|
|
413
|
+
testVerdict = "FAIL-FIXED";
|
|
413
414
|
}
|
|
414
415
|
}
|
|
415
416
|
|
|
@@ -554,8 +555,6 @@ Return: {"status": "fixed"|"blocked", "commitShas": ["<sha>"], "unresolved": ["<
|
|
|
554
555
|
});
|
|
555
556
|
|
|
556
557
|
// Phase 5.5: Gate 1 #2 — FINAL post-fix gate (Polish agent → Harden agent → full Validate agent, Validate last and unconditional).
|
|
557
|
-
// Runs ONCE, after the review pass. Inside the pass the Code agent self-verified its own fixes;
|
|
558
|
-
// this is the build gate before the branch is handed back. See gate1_postcode() cadence.
|
|
559
558
|
const gate1Final = await phase("gate1-final", async () => {
|
|
560
559
|
await agent(`Polish and reduce complexity of recent changes on branch ${BRANCH}. Commit any improvements.`, { agentType: "Polish" });
|
|
561
560
|
|
|
@@ -589,9 +588,9 @@ Return: {"verdict": "PASS" | "FAIL", "details": "..."}`, { agentType: "Validate"
|
|
|
589
588
|
});
|
|
590
589
|
|
|
591
590
|
// PASS requires survivingFindings.length === 0 && coverageGaps.length === 0 && gate1Final.verdict !== "ESCALATED"
|
|
592
|
-
// and
|
|
591
|
+
// and every Gate 2 verdict PASS or SKIPPED; any other reports UNVERIFIED, never PASS
|
|
593
592
|
const coverageGaps = reviewResult.coverageGaps || [];
|
|
594
|
-
const gate2Unverified = [gate2.evaluateVerdict, gate2.testVerdict].
|
|
593
|
+
const gate2Unverified = ![gate2.evaluateVerdict, gate2.testVerdict].every(v => v === "PASS" || v === "SKIPPED");
|
|
595
594
|
const overallVerdict = (reviewResult.survivingFindings?.length || 0) === 0 && coverageGaps.length === 0 && gate1Final.verdict !== "ESCALATED" ? (gate2Unverified ? "UNVERIFIED" : "PASS") : "PARTIAL";
|
|
596
595
|
|
|
597
596
|
// Phase 6: Report — the phase returns the engine result (engine_output_schema); its verdict is overallVerdict
|
|
@@ -637,17 +636,17 @@ This applies to both: multiple Code agents working on a single ticket AND multi-
|
|
|
637
636
|
|
|
638
637
|
### Build execution doctrine — the Running commands block (LOAD-BEARING)
|
|
639
638
|
|
|
640
|
-
The
|
|
639
|
+
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:
|
|
641
640
|
|
|
642
641
|
Run builds, typechecks, lints and tests in the foreground, each with an explicit Bash `timeout` above its expected run time. The ceiling is 600000 ms, or `BASH_MAX_TIMEOUT_MS` when set (`echo ${BASH_MAX_TIMEOUT_MS:-600000}`).
|
|
643
642
|
|
|
644
|
-
- Capture, then tail, in one Bash call
|
|
645
|
-
- Never background a
|
|
646
|
-
- Prefer the scoped command for the change
|
|
647
|
-
- A run
|
|
648
|
-
- A run expected to exceed the ceiling
|
|
643
|
+
- Capture, then tail, in one Bash call: `LOG=$(mktemp); echo "LOG=$LOG"; <command> >"$LOG" 2>&1; rc=$?; tail -n 40 "$LOG"; printf '\nEXIT=%s\n' "$rc"`. The last `EXIT=` line is the result; never decide one from a grep count.
|
|
644
|
+
- Never background a build or test, and never poll across turns: no `sleep` or `true` turns, no sentinel-file checks, no Monitor.
|
|
645
|
+
- Prefer the scoped command for the change; for the whole set, one workspace command over per-package loops.
|
|
646
|
+
- A run past its timeout moves to the background: no tool call, even a Read, until its end notice, then Read the last `EXIT=` line of the file the move names, not `$LOG`; it alone sets the label, not the notice. With none read it is BLOCKED: report its duration and log path. Report only after the end notice.
|
|
647
|
+
- A run expected to exceed the ceiling may be split into parts, run in sequence.
|
|
649
648
|
- Never re-run a command when nothing it reads has changed.
|
|
650
|
-
- Never wrap a build or test command in `sh -c`, `bash -c`, `python3 -c` or `node -e`: permission rules deny wrapped commands they
|
|
649
|
+
- 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.
|
|
651
650
|
- The same rules hold inside a dynamic Workflow sub-agent.
|
|
652
651
|
|
|
653
652
|
**Cheapest-sufficient validation:** iterate with the fastest check that proves the change — `tsc --noEmit`, `cargo check`, `go vet`, a single test file — the ecosystem's cheapest sufficient signal. Reserve expensive full/optimized builds and whole-suite runs for the final gates only.
|
|
@@ -705,6 +704,7 @@ Gate 2 inputs are produced by `/devflow:dynamic-plan`'s plan-challenge step —
|
|
|
705
704
|
**Test agent** (only if acceptance criteria or a test plan exist):
|
|
706
705
|
- Scenario-based acceptance tests covering functionality, API contracts, performance
|
|
707
706
|
- FAIL → fix-and-continue — a Fix 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.
|
|
707
|
+
- BLOCKED (no result), or any other or missing verdict → no fix, and the run never reports PASS.
|
|
708
708
|
|
|
709
709
|
**When Gate 2 inputs are absent:**
|
|
710
710
|
- No plan → skip the Evaluate agent silently (note in output: "Gate 2 Evaluate agent skipped — no plan available")
|
|
@@ -873,7 +873,7 @@ Each ticket engine run returns a structured result. The Synthesize agent or the
|
|
|
873
873
|
],
|
|
874
874
|
"gate2": {
|
|
875
875
|
"evaluateVerdict": "PASS | FAIL | FAIL-FIXED | SKIPPED",
|
|
876
|
-
"testVerdict": "PASS | FAIL | FAIL-FIXED | SKIPPED",
|
|
876
|
+
"testVerdict": "PASS | FAIL | FAIL-FIXED | SKIPPED | BLOCKED",
|
|
877
877
|
"skipReasons": ["string — why a gate was skipped, if applicable"]
|
|
878
878
|
}
|
|
879
879
|
}
|
|
@@ -1188,12 +1188,12 @@ Agent(subagent_type="Test"):
|
|
|
1188
1188
|
FILES_CHANGED: {the file list that diff printed}
|
|
1189
1189
|
TEST_PLAN: {the TP lines of the wave evidence file's ## Test Plan section}
|
|
1190
1190
|
WORKTREE_PATH: {integration worktree root}
|
|
1191
|
-
Cover every TEST_PLAN line on the integration branch as it stands. Report
|
|
1191
|
+
Cover every TEST_PLAN line on the integration branch as it stands. Report your Status with evidence."
|
|
1192
1192
|
```
|
|
1193
1193
|
|
|
1194
|
-
Nothing is fixed here,
|
|
1194
|
+
Nothing is fixed here, whatever the Status: the wave is done and its PR is open. Report the Test agent's Status.
|
|
1195
1195
|
|
|
1196
|
-
**(b) Claims.** Append its TP claims,
|
|
1196
|
+
**(b) Claims.** Append its TP claims, whatever its Status, to the `## Claims` section of `"{integration worktree root}/.devflow/docs/evidence-wave-{slug}.md"` — the file's last section, created when absent. Append only: never edit or remove a claim. Each line is `/implement`'s TP claim, keyed to the 40-hex `HEAD:` the Test agent's report shows:
|
|
1197
1197
|
|
|
1198
1198
|
```
|
|
1199
1199
|
- TP-<n> <PASS|FAIL|SKIP> sha:<head> by:test exit:<0-255>
|
|
@@ -30,13 +30,13 @@ $ARGUMENTS
|
|
|
30
30
|
|
|
31
31
|
### Phase 1: Resolve Settings
|
|
32
32
|
|
|
33
|
-
**Resolve the settings line** once per worktree root, reusing a line this run already resolved for the same root. `{root}` is the worktree the values are for — the repository root
|
|
33
|
+
**Resolve the settings line** once per worktree root, reusing a line this run already resolved for the same root. `{root}` is the worktree the values are for — the repository root in a one-worktree run:
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
36
|
node "$HOME/.devflow/scripts/resolve-settings.cjs" "{root}" 2>/dev/null; echo "exit=$?"
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
Accept the output only when it is exactly two lines: `exit=0` last and, before it, one line of the form `TRACKER=<github|jira|linear> TRACKER_SOURCE=<project|personal|machine|default> TRACKER_WARN=<none|mismatch|invalid> SITE=<none|https://<host>> KEY=<none|<key>> REVIEW_PUBLICATION=<off|auto|full> COMPLIANCE=<off|generic|<id>[,<id>…]> MEMORY=<on|off> CURATION=<on|off> KNOWLEDGE=<on|off> GATE_LEVEL=<full|standard|lean>` — these fields, in this order, nothing else, where `<host>` is a lowercase dotted host name alone, `<key>` is 2–10 of `A-Z`, `0-9` and `_` starting with a letter, and each `<id>` is one of `gdpr`, `hipaa`, `pci-dss`, `soc2`, `iso-27001`, `sox`. **Anything else** (a non-zero exit, no line, extra text, or a missing, reordered or unlisted field or value) ⇒ use `TRACKER=github TRACKER_SOURCE=default TRACKER_WARN=invalid SITE=none KEY=none REVIEW_PUBLICATION=off COMPLIANCE=generic MEMORY=
|
|
39
|
+
Accept the output only when it is exactly two lines: `exit=0` last and, before it, one line of the form `TRACKER=<github|jira|linear> TRACKER_SOURCE=<project|personal|machine|default> TRACKER_WARN=<none|mismatch|invalid> SITE=<none|https://<host>> KEY=<none|<key>> REVIEW_PUBLICATION=<off|auto|full> COMPLIANCE=<off|generic|<id>[,<id>…]> MEMORY=<on|off> CURATION=<on|off> KNOWLEDGE=<on|off> GATE_LEVEL=<full|standard|lean>` — these fields, in this order, nothing else, where `<host>` is a lowercase dotted host name alone, `<key>` is 2–10 of `A-Z`, `0-9` and `_` starting with a letter, and each `<id>` is one of `gdpr`, `hipaa`, `pci-dss`, `soc2`, `iso-27001`, `sox`. **Anything else** (a non-zero exit, no line, extra text, or a missing, reordered or unlisted field or value) ⇒ use `TRACKER=github TRACKER_SOURCE=default TRACKER_WARN=invalid SITE=none KEY=none REVIEW_PUBLICATION=off COMPLIANCE=generic MEMORY=off CURATION=off KNOWLEDGE=off GATE_LEVEL=full` instead.
|
|
40
40
|
|
|
41
41
|
The accepted line is the only source of these values.
|
|
42
42
|
|
|
@@ -3,7 +3,7 @@ description: Execute a single task through implementation, quality gates, and PR
|
|
|
3
3
|
---
|
|
4
4
|
# Implement Command
|
|
5
5
|
|
|
6
|
-
Orchestrate a single task
|
|
6
|
+
Orchestrate a single task by spawning agents.
|
|
7
7
|
|
|
8
8
|
## Usage
|
|
9
9
|
|
|
@@ -77,7 +77,7 @@ If `PR_DESCRIPTION_GUIDANCE` was not set above (non-plan paths: issue input or t
|
|
|
77
77
|
|
|
78
78
|
**Empty input.** When `COMMAND_INPUT` is empty — a plan handoff arrives this way, with the plan already in the conversation — there is no argument to name the branch from, and the Git agent sees none of this conversation. Write the description yourself: one line, taken from the plan's title or, with no plan, from the conversation. Send it as the setup-task `TASK_DESCRIPTION` below.
|
|
79
79
|
|
|
80
|
-
Spawn Git agent
|
|
80
|
+
Spawn Git agent:
|
|
81
81
|
|
|
82
82
|
```
|
|
83
83
|
Agent(subagent_type="Git"):
|
|
@@ -144,13 +144,13 @@ node "$HOME/.devflow/scripts/verify-evidence.cjs" render --plan "{worktree}/.dev
|
|
|
144
144
|
|
|
145
145
|
- `EVIDENCE_FILE` — `{worktree}/.devflow/docs/evidence-{branch_slug}.md`, its `## Evidence Exceptions` section now a byte copy of `PR_EXCEPTIONS` (absent when that is `(none)`).
|
|
146
146
|
|
|
147
|
-
**Resolve the settings line** once per worktree root, reusing a line this run already resolved for the same root. `{root}` is the worktree the values are for — the repository root
|
|
147
|
+
**Resolve the settings line** once per worktree root, reusing a line this run already resolved for the same root. `{root}` is the worktree the values are for — the repository root in a one-worktree run:
|
|
148
148
|
|
|
149
149
|
```bash
|
|
150
150
|
node "$HOME/.devflow/scripts/resolve-settings.cjs" "{root}" 2>/dev/null; echo "exit=$?"
|
|
151
151
|
```
|
|
152
152
|
|
|
153
|
-
Accept the output only when it is exactly two lines: `exit=0` last and, before it, one line of the form `TRACKER=<github|jira|linear> TRACKER_SOURCE=<project|personal|machine|default> TRACKER_WARN=<none|mismatch|invalid> SITE=<none|https://<host>> KEY=<none|<key>> REVIEW_PUBLICATION=<off|auto|full> COMPLIANCE=<off|generic|<id>[,<id>…]> MEMORY=<on|off> CURATION=<on|off> KNOWLEDGE=<on|off> GATE_LEVEL=<full|standard|lean>` — these fields, in this order, nothing else, where `<host>` is a lowercase dotted host name alone, `<key>` is 2–10 of `A-Z`, `0-9` and `_` starting with a letter, and each `<id>` is one of `gdpr`, `hipaa`, `pci-dss`, `soc2`, `iso-27001`, `sox`. **Anything else** (a non-zero exit, no line, extra text, or a missing, reordered or unlisted field or value) ⇒ use `TRACKER=github TRACKER_SOURCE=default TRACKER_WARN=invalid SITE=none KEY=none REVIEW_PUBLICATION=off COMPLIANCE=generic MEMORY=
|
|
153
|
+
Accept the output only when it is exactly two lines: `exit=0` last and, before it, one line of the form `TRACKER=<github|jira|linear> TRACKER_SOURCE=<project|personal|machine|default> TRACKER_WARN=<none|mismatch|invalid> SITE=<none|https://<host>> KEY=<none|<key>> REVIEW_PUBLICATION=<off|auto|full> COMPLIANCE=<off|generic|<id>[,<id>…]> MEMORY=<on|off> CURATION=<on|off> KNOWLEDGE=<on|off> GATE_LEVEL=<full|standard|lean>` — these fields, in this order, nothing else, where `<host>` is a lowercase dotted host name alone, `<key>` is 2–10 of `A-Z`, `0-9` and `_` starting with a letter, and each `<id>` is one of `gdpr`, `hipaa`, `pci-dss`, `soc2`, `iso-27001`, `sox`. **Anything else** (a non-zero exit, no line, extra text, or a missing, reordered or unlisted field or value) ⇒ use `TRACKER=github TRACKER_SOURCE=default TRACKER_WARN=invalid SITE=none KEY=none REVIEW_PUBLICATION=off COMPLIANCE=generic MEMORY=off CURATION=off KNOWLEDGE=off GATE_LEVEL=full` instead.
|
|
154
154
|
|
|
155
155
|
The accepted line is the only source of these values.
|
|
156
156
|
|
|
@@ -261,7 +261,7 @@ FEATURE_KNOWLEDGE: {feature_knowledge}
|
|
|
261
261
|
|
|
262
262
|
**SEQUENTIAL_CODE_AGENTS**:
|
|
263
263
|
|
|
264
|
-
Spawn Code agents one at a time
|
|
264
|
+
Spawn Code agents one at a time:
|
|
265
265
|
|
|
266
266
|
**Phase 1 Code agent:**
|
|
267
267
|
```
|
|
@@ -338,7 +338,7 @@ FEATURE_KNOWLEDGE: {feature_knowledge}
|
|
|
338
338
|
- If the Read fails, or the file has no `## Phases` heading with the `| Phase | standard | lean |` header, or a row breaks its grammar, apply no row, keep `GATE_LEVEL` and say `level reference unreadable: no level rows applied`.
|
|
339
339
|
- Validate, the CI gate, the evidence claims and the compliance directive run at every level. An enabled compliance lens keeps Harden.
|
|
340
340
|
|
|
341
|
-
After the Code agent completes, spawn Polish agent
|
|
341
|
+
After the Code agent completes, spawn Polish agent. `{branch_diff}` is the output of `git diff --name-only --diff-filter=d {BASE_REF}...HEAD`, run again at each spawn; a non-zero exit stops, and an empty list counts only on exit 0.
|
|
342
342
|
|
|
343
343
|
```
|
|
344
344
|
Agent(subagent_type="Polish"):
|
|
@@ -354,7 +354,7 @@ Commit any improvements with a conventional-commit message."
|
|
|
354
354
|
**Produces:** HARDEN_OUTPUT
|
|
355
355
|
**Requires:** BASE_REF
|
|
356
356
|
|
|
357
|
-
After Phase 3, spawn Harden agent
|
|
357
|
+
After Phase 3, spawn Harden agent:
|
|
358
358
|
|
|
359
359
|
```
|
|
360
360
|
Agent(subagent_type="Harden"):
|
|
@@ -366,12 +366,14 @@ Evaluate 9 pillars, fix P0/P1 issues, report status"
|
|
|
366
366
|
|
|
367
367
|
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.
|
|
368
368
|
|
|
369
|
+
Harden never reviews a deleted file or the old path of a rename; an empty list is no review, and Harden reports `no files reviewed`.
|
|
370
|
+
|
|
369
371
|
### Phase 5: Alignment Check
|
|
370
372
|
|
|
371
373
|
**Produces:** ALIGNMENT_RESULT
|
|
372
374
|
**Requires:** BASE_REF, EXECUTION_PLAN
|
|
373
375
|
|
|
374
|
-
After Harden agent passes, spawn Evaluate agent
|
|
376
|
+
After Harden agent passes, spawn Evaluate agent:
|
|
375
377
|
|
|
376
378
|
```
|
|
377
379
|
Agent(subagent_type="Evaluate"):
|
|
@@ -389,7 +391,7 @@ Validate alignment with request and plan. Report ALIGNED or MISALIGNED with deta
|
|
|
389
391
|
1. Extract misalignment details from Evaluate agent output
|
|
390
392
|
2. Increment `alignment_fix_count`
|
|
391
393
|
3. If `alignment_fix_count <= 2`:
|
|
392
|
-
- Spawn Fix agent
|
|
394
|
+
- Spawn Fix agent:
|
|
393
395
|
```
|
|
394
396
|
Agent(subagent_type="Fix"):
|
|
395
397
|
"OPERATION: alignment-fix
|
|
@@ -407,7 +409,9 @@ Validate alignment with request and plan. Report ALIGNED or MISALIGNED with deta
|
|
|
407
409
|
**Produces:** VALIDATION_RESULT, VALIDATED_HEAD
|
|
408
410
|
**Requires:** BASE_REF, GATE_LEVEL
|
|
409
411
|
|
|
410
|
-
|
|
412
|
+
Alignment-fix commits get no self-review: Phase 6 Validate and `/code-review` check them.
|
|
413
|
+
|
|
414
|
+
After Evaluate agent passes, spawn Validate agent:
|
|
411
415
|
|
|
412
416
|
```
|
|
413
417
|
Agent(subagent_type="Validate"):
|
|
@@ -419,10 +423,9 @@ Run build, typecheck, lint, test. Report pass/fail with failure details."
|
|
|
419
423
|
```
|
|
420
424
|
|
|
421
425
|
**If FAIL:**
|
|
422
|
-
1.
|
|
423
|
-
2.
|
|
424
|
-
|
|
425
|
-
- Spawn Fix agent with fix context:
|
|
426
|
+
1. Increment `validation_retry_count`
|
|
427
|
+
2. If `validation_retry_count <= 2`:
|
|
428
|
+
- Spawn Fix agent:
|
|
426
429
|
```
|
|
427
430
|
Agent(subagent_type="Fix"):
|
|
428
431
|
"OPERATION: validation-fix
|
|
@@ -433,10 +436,14 @@ Run build, typecheck, lint, test. Report pass/fail with failure details."
|
|
|
433
436
|
{COMPLIANCE_DIRECTIVE}"
|
|
434
437
|
```
|
|
435
438
|
- Loop back to Phase 6 (re-validate at the new HEAD, full scope)
|
|
436
|
-
|
|
439
|
+
3. Else report failures to user and halt
|
|
440
|
+
|
|
441
|
+
**If BLOCKED:** report its cause and log path, then halt.
|
|
437
442
|
|
|
438
443
|
**If PASS:** append a `gate:validate` claim, run `git rev-parse HEAD` and record the result as `VALIDATED_HEAD`, then continue to Phase 7.
|
|
439
444
|
|
|
445
|
+
Any other or missing Status: report and halt; never PASS.
|
|
446
|
+
|
|
440
447
|
**Evidence claims** are lines appended to the `## Claims` section of `EVIDENCE_FILE` — the file's last section, created when absent. Append only: never edit or remove a claim; the last valid one per target wins. Each line takes exactly one of these shapes, where `<head>` is the 40-hex `HEAD:` the agent's report shows:
|
|
441
448
|
|
|
442
449
|
```
|
|
@@ -453,7 +460,7 @@ Run build, typecheck, lint, test. Report pass/fail with failure details."
|
|
|
453
460
|
**Produces:** QA_RESULT
|
|
454
461
|
**Requires:** BASE_REF, EXECUTION_PLAN, TEST_PLAN, VALIDATED_HEAD
|
|
455
462
|
|
|
456
|
-
After Phase 6 passes, spawn Test agent
|
|
463
|
+
After Phase 6 passes, spawn Test agent:
|
|
457
464
|
|
|
458
465
|
```
|
|
459
466
|
Agent(subagent_type="Test"):
|
|
@@ -462,18 +469,17 @@ EXECUTION_PLAN: {execution plan from Phase 1}
|
|
|
462
469
|
FILES_CHANGED: {branch_diff}
|
|
463
470
|
ACCEPTANCE_CRITERIA: {extracted criteria if available}
|
|
464
471
|
TEST_PLAN: {the TP lines of the evidence file's ## Test Plan section, or (none)}
|
|
465
|
-
Design and execute scenario-based acceptance tests. Report
|
|
472
|
+
Design and execute scenario-based acceptance tests. Report your Status with evidence."
|
|
466
473
|
```
|
|
467
474
|
|
|
468
|
-
After every Test agent run —
|
|
475
|
+
After every Test agent run — whatever its Status, first run or retry — append its TP claims (Phase 6's **Evidence claims**).
|
|
469
476
|
|
|
470
|
-
**If PASS
|
|
477
|
+
**If PASS** (first word of the Status): Continue to Phase 8
|
|
471
478
|
|
|
472
479
|
**If FAIL:**
|
|
473
|
-
1.
|
|
474
|
-
2.
|
|
475
|
-
|
|
476
|
-
- Spawn Fix agent to fix QA failures:
|
|
480
|
+
1. Increment `qa_retry_count`
|
|
481
|
+
2. If `qa_retry_count <= 2`:
|
|
482
|
+
- Spawn Fix agent:
|
|
477
483
|
```
|
|
478
484
|
Agent(subagent_type="Fix"):
|
|
479
485
|
"OPERATION: qa-fix
|
|
@@ -483,15 +489,17 @@ After every Test agent run — PASS or FAIL, first run or retry — append its T
|
|
|
483
489
|
SCOPE: Fix only the listed failures, no other changes
|
|
484
490
|
{COMPLIANCE_DIRECTIVE}"
|
|
485
491
|
```
|
|
486
|
-
- Loop back to Phase 7
|
|
487
|
-
|
|
492
|
+
- Loop back to Phase 7.
|
|
493
|
+
3. If `qa_retry_count > 2`: Report QA failures to user for decision. The run stops at the report (Phase 12), so Phases 8 to 11 do not run.
|
|
494
|
+
|
|
495
|
+
**If BLOCKED, or any other or missing Status:** report its cause and log path, and stop as in step 3; no Fix agent.
|
|
488
496
|
|
|
489
497
|
### Phase 8: Re-Validate (only if a qa-fix committed)
|
|
490
498
|
|
|
491
499
|
**Produces:** REVALIDATION_RESULT
|
|
492
|
-
**Requires:** QA_RESULT, VALIDATED_HEAD
|
|
500
|
+
**Requires:** QA_RESULT, VALIDATED_HEAD, BASE_REF, GATE_LEVEL
|
|
493
501
|
|
|
494
|
-
Run this phase only if a qa-fix committed (`git rev-parse HEAD` differs from `VALIDATED_HEAD`);
|
|
502
|
+
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:
|
|
495
503
|
|
|
496
504
|
```
|
|
497
505
|
Agent(subagent_type="Validate"):
|
|
@@ -500,10 +508,16 @@ VALIDATION_SCOPE: changed-only
|
|
|
500
508
|
Verify the qa-fix commits did not break anything."
|
|
501
509
|
```
|
|
502
510
|
|
|
511
|
+
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.
|
|
512
|
+
|
|
503
513
|
**If FAIL:** Report the failures to user and halt.
|
|
504
514
|
|
|
515
|
+
**If BLOCKED:** as in Phase 6.
|
|
516
|
+
|
|
505
517
|
**If PASS:** append a `gate:validate` claim (Phase 6's **Evidence claims**), then continue to Phase 9.
|
|
506
518
|
|
|
519
|
+
Any other or missing Status: report and halt; never PASS.
|
|
520
|
+
|
|
507
521
|
### Phase 9: Open PR
|
|
508
522
|
|
|
509
523
|
**Produces:** PR_NUMBER
|
|
@@ -546,13 +560,13 @@ git push origin HEAD; echo "exit=$?"
|
|
|
546
560
|
`exit=0` continues to the gate. Any other result, a rejected non-fast-forward push included, records `TRACEABILITY: DEGRADED (ci push failed)` for the Phase 12 report, reports "CI status unknown — verify manually before merging" and proceeds to Phase 11 without waiting.
|
|
547
561
|
|
|
548
562
|
<!-- PATTERN: ci-status-gate -->
|
|
549
|
-
1. Wait: run `cd {worktree} && HEAD_SHA=$(git rev-parse HEAD) && node "$HOME/.devflow/scripts/ci-wait.cjs" --pr {PR_NUMBER} --head "$HEAD_SHA"` through the Bash tool with `timeout: 600000`. Each run
|
|
563
|
+
1. Wait: run `cd {worktree} && HEAD_SHA=$(git rev-parse HEAD) && node "$HOME/.devflow/scripts/ci-wait.cjs" --pr {PR_NUMBER} --head "$HEAD_SHA"` through the Bash tool with `timeout: 600000`. Each run waits at most 570 seconds and prints one line, `CI <STATUS> pr=… head=… failing=… pending=… waited=…` (INDETERMINATE adds `reason=…`). A missing or unparseable line, an unknown status or a non-zero exit is INDETERMINATE.
|
|
550
564
|
2. **If PASSING** → proceed to Phase 11.
|
|
551
565
|
3. **If NO_PR or NO_CI** → skip: "No PR/CI configured, skipping CI validation." Proceed to Phase 11.
|
|
552
|
-
4. **If PENDING** and fewer than 3 waits have run → wait again
|
|
553
|
-
5. **If INDETERMINATE** and fewer than 3 waits have run → wait again
|
|
566
|
+
4. **If PENDING** and fewer than 3 waits have run → wait again. Otherwise → report "CI still running — verify manually before merging" and proceed.
|
|
567
|
+
5. **If INDETERMINATE** and fewer than 3 waits have run → wait again, unless `waited=570` with `reason=head-mismatch` or `no-workflow-check`. Otherwise → report "CI status unknown — verify manually before merging" and proceed.
|
|
554
568
|
6. **If FAILING** and fewer than 2 fixes have run → report the failing checks from the line. Spawn `Agent(subagent_type="Fix")` whose prompt opens with `OPERATION: ci-fix`, with `COMPLIANCE_DIRECTIVE` (when it is not empty), `CI_FAILURES` and `PUSH: false`; `CI_FAILURES` holds the failing-check names from the line and nothing else, because the Fix agent fetches the full names and reads the logs itself and this command reads none. After a fix, push with the command above and, if a wait remains, wait again (step 1); a failed push records `TRACEABILITY: DEGRADED (ci push failed)`, reports "CI status unknown — verify manually before merging" and stops waiting. After the second fix still FAILING → report the failing checks and proceed.
|
|
555
|
-
7. **Budget**: at most 3 waits and 2 fixes in all. When one is spent, report the
|
|
569
|
+
7. **Budget**: at most 3 waits and 2 fixes in all. When one is spent, report the status and proceed.
|
|
556
570
|
<!-- /PATTERN: ci-status-gate -->
|
|
557
571
|
|
|
558
572
|
### Phase 11: Evidence
|
|
@@ -582,7 +596,7 @@ Drop the `--evidence` pair when that file does not exist or its path does not ma
|
|
|
582
596
|
|
|
583
597
|
**Requires:** VALIDATION_RESULT, ALIGNMENT_RESULT, QA_RESULT, PR_NUMBER, EVIDENCE_RESULT, GATE_LEVEL
|
|
584
598
|
|
|
585
|
-
Display completion summary with phase status, `Gate level: {GATE_LEVEL}` with any level note, Validate's `Lint pack:` line if any, PR info, and next steps.
|
|
599
|
+
Display completion summary with phase status, `Gate level: {GATE_LEVEL}` with any level note, Harden's `no files reviewed` line if any, Validate's `Lint pack:` line if any, PR info, and next steps.
|
|
586
600
|
|
|
587
601
|
Show the test plan's evidence from Phase 11: `Test plan: {VERIFIED-CI + ATTESTED-LOCAL}/{total} verified (VERIFIED-CI {n}, ATTESTED-LOCAL {n})`, read from the `EVIDENCE` line and never inferred, then its `**Body**:` / `**Comment**:` line verbatim. Without an `EVIDENCE` line, show `Test plan: evidence unavailable`; with no test plan, `Test plan: missing`.
|
|
588
602
|
|
|
@@ -647,9 +661,9 @@ When the Knowledge agent reports `KB_COMMIT: skipped (detached HEAD)`, the files
|
|
|
647
661
|
├─ Phase 6: Validate (the one full-suite slot)
|
|
648
662
|
├─ Phase 7: QA Testing
|
|
649
663
|
├─ Phase 8: Re-Validate (only if a qa-fix committed)
|
|
650
|
-
├─ Phase 9: Open PR (every strategy
|
|
664
|
+
├─ Phase 9: Open PR (every strategy)
|
|
651
665
|
├─ Phase 10: CI Status Gate (every strategy)
|
|
652
|
-
├─ Phase 11: Evidence
|
|
666
|
+
├─ Phase 11: Evidence
|
|
653
667
|
├─ Phase 12: Report
|
|
654
668
|
│
|
|
655
669
|
└─ Feature Knowledge Write-Back (Conditional)
|
|
@@ -108,13 +108,13 @@ If the user says "skip" or "just proceed" — skip remaining questions, present
|
|
|
108
108
|
**Produces:** SKIM_CONTEXT, FEATURE_KNOWLEDGE, FEATURE_KNOWLEDGE_RULES, GATE_LEVEL
|
|
109
109
|
**Requires:** CONFIRMED_SCOPE
|
|
110
110
|
|
|
111
|
-
**Resolve the settings line** once per worktree root, reusing a line this run already resolved for the same root. `{root}` is the worktree the values are for — the repository root
|
|
111
|
+
**Resolve the settings line** once per worktree root, reusing a line this run already resolved for the same root. `{root}` is the worktree the values are for — the repository root in a one-worktree run:
|
|
112
112
|
|
|
113
113
|
```bash
|
|
114
114
|
node "$HOME/.devflow/scripts/resolve-settings.cjs" "{root}" 2>/dev/null; echo "exit=$?"
|
|
115
115
|
```
|
|
116
116
|
|
|
117
|
-
Accept the output only when it is exactly two lines: `exit=0` last and, before it, one line of the form `TRACKER=<github|jira|linear> TRACKER_SOURCE=<project|personal|machine|default> TRACKER_WARN=<none|mismatch|invalid> SITE=<none|https://<host>> KEY=<none|<key>> REVIEW_PUBLICATION=<off|auto|full> COMPLIANCE=<off|generic|<id>[,<id>…]> MEMORY=<on|off> CURATION=<on|off> KNOWLEDGE=<on|off> GATE_LEVEL=<full|standard|lean>` — these fields, in this order, nothing else, where `<host>` is a lowercase dotted host name alone, `<key>` is 2–10 of `A-Z`, `0-9` and `_` starting with a letter, and each `<id>` is one of `gdpr`, `hipaa`, `pci-dss`, `soc2`, `iso-27001`, `sox`. **Anything else** (a non-zero exit, no line, extra text, or a missing, reordered or unlisted field or value) ⇒ use `TRACKER=github TRACKER_SOURCE=default TRACKER_WARN=invalid SITE=none KEY=none REVIEW_PUBLICATION=off COMPLIANCE=generic MEMORY=
|
|
117
|
+
Accept the output only when it is exactly two lines: `exit=0` last and, before it, one line of the form `TRACKER=<github|jira|linear> TRACKER_SOURCE=<project|personal|machine|default> TRACKER_WARN=<none|mismatch|invalid> SITE=<none|https://<host>> KEY=<none|<key>> REVIEW_PUBLICATION=<off|auto|full> COMPLIANCE=<off|generic|<id>[,<id>…]> MEMORY=<on|off> CURATION=<on|off> KNOWLEDGE=<on|off> GATE_LEVEL=<full|standard|lean>` — these fields, in this order, nothing else, where `<host>` is a lowercase dotted host name alone, `<key>` is 2–10 of `A-Z`, `0-9` and `_` starting with a letter, and each `<id>` is one of `gdpr`, `hipaa`, `pci-dss`, `soc2`, `iso-27001`, `sox`. **Anything else** (a non-zero exit, no line, extra text, or a missing, reordered or unlisted field or value) ⇒ use `TRACKER=github TRACKER_SOURCE=default TRACKER_WARN=invalid SITE=none KEY=none REVIEW_PUBLICATION=off COMPLIANCE=generic MEMORY=off CURATION=off KNOWLEDGE=off GATE_LEVEL=full` instead.
|
|
118
118
|
|
|
119
119
|
The accepted line is the only source of these values.
|
|
120
120
|
|
|
@@ -304,7 +304,7 @@ On completion:
|
|
|
304
304
|
|
|
305
305
|
## Error Handling
|
|
306
306
|
|
|
307
|
-
- Validate agent
|
|
307
|
+
- Validate agent reports no PASS: halt, report failures, do not proceed
|
|
308
308
|
- User declines release plan: halt gracefully
|
|
309
309
|
- User halts at the traceability question: stop — nothing has been committed, tagged or published
|
|
310
310
|
- Git agent reports DEGRADED while gathering, back-linking or associating: warn and continue — never halt the release
|