devflow-kit 3.10.0 → 3.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +74 -0
- package/dist/agents/architect.md +87 -0
- package/dist/agents/code.md +21 -25
- package/dist/agents/debug.md +21 -49
- package/dist/agents/design.md +9 -43
- package/dist/agents/fix.md +15 -29
- package/dist/agents/git.md +19 -22
- package/dist/agents/harden.md +14 -19
- package/dist/agents/knowledge.md +11 -19
- package/dist/agents/refactor.md +9 -14
- package/dist/agents/research.md +11 -34
- package/dist/agents/review.md +22 -52
- package/dist/agents/skim.md +7 -17
- package/dist/agents/triage.md +7 -14
- package/dist/cli/commands/backup-session.js +131 -0
- package/dist/cli/commands/compliance.js +16 -3
- package/dist/cli/commands/curation.js +12 -4
- package/dist/cli/commands/init.js +36 -55
- package/dist/cli/commands/install-report.js +95 -0
- package/dist/cli/commands/legacy-sweep.js +140 -45
- package/dist/cli/commands/rules.js +50 -13
- package/dist/cli/commands/uninstall.js +62 -24
- package/dist/commands/bug-analysis.md +31 -62
- package/dist/commands/code-review.md +38 -87
- package/dist/commands/debug.md +32 -82
- package/dist/commands/dynamic-build.md +155 -211
- package/dist/commands/dynamic-plan.md +71 -93
- package/dist/commands/dynamic-profile.md +7 -155
- package/dist/commands/dynamic-tickets.md +65 -186
- package/dist/commands/explore.md +27 -70
- package/dist/commands/implement.md +98 -186
- package/dist/commands/plan.md +60 -107
- package/dist/commands/release.md +25 -91
- package/dist/commands/research.md +34 -103
- package/dist/commands/resolve.md +64 -128
- package/dist/commands/self-review.md +35 -99
- package/dist/compliance-off/agents/git.md +15 -18
- package/dist/compliance-off/agents/triage.md +7 -14
- package/dist/compliance-off/commands/bug-analysis.md +31 -62
- package/dist/compliance-off/commands/code-review.md +34 -82
- package/dist/compliance-off/commands/dynamic-build.md +149 -205
- package/dist/compliance-off/commands/dynamic-tickets.md +65 -186
- package/dist/compliance-off/commands/implement.md +94 -180
- package/dist/compliance-off/commands/plan.md +60 -107
- package/dist/compliance-off/commands/release.md +25 -90
- package/dist/compliance-off/commands/resolve.md +54 -128
- package/dist/compliance-off/skills/git/references/tracker/github/ensure-pr-ready.md +3 -3
- package/dist/compliance-off/skills/git/references/tracker/jira/ensure-pr-ready.md +3 -3
- package/dist/compliance-off/skills/git/references/tracker/linear/ensure-pr-ready.md +3 -3
- package/dist/core/compliance.js +14 -0
- package/dist/core/fs-atomic.js +5 -1
- package/dist/core/orphan-sweep.js +20 -2
- package/dist/core/path-set.js +15 -0
- package/dist/core/plugins.js +6 -5
- package/dist/core/reference-sweep.js +42 -25
- package/dist/core/retired-shipped-names.js +278 -0
- package/dist/curation-compliance-off/agents/triage.md +7 -13
- package/dist/curation-compliance-off/commands/bug-analysis.md +21 -41
- package/dist/curation-compliance-off/commands/code-review.md +25 -62
- package/dist/curation-compliance-off/commands/dynamic-build.md +142 -194
- package/dist/curation-compliance-off/commands/dynamic-tickets.md +54 -173
- package/dist/curation-compliance-off/commands/implement.md +86 -161
- package/dist/curation-compliance-off/commands/plan.md +51 -86
- package/dist/curation-compliance-off/commands/release.md +17 -78
- package/dist/curation-compliance-off/commands/resolve.md +45 -108
- package/dist/curation-off/agents/architect.md +81 -0
- package/dist/curation-off/agents/code.md +20 -23
- package/dist/curation-off/agents/debug.md +19 -47
- package/dist/curation-off/agents/design.md +8 -41
- package/dist/curation-off/agents/fix.md +14 -27
- package/dist/curation-off/agents/harden.md +13 -18
- package/dist/curation-off/agents/knowledge.md +9 -17
- package/dist/curation-off/agents/refactor.md +8 -12
- package/dist/curation-off/agents/research.md +9 -32
- package/dist/curation-off/agents/review.md +11 -40
- package/dist/curation-off/agents/skim.md +7 -17
- package/dist/curation-off/agents/triage.md +7 -13
- package/dist/curation-off/commands/bug-analysis.md +21 -41
- package/dist/curation-off/commands/code-review.md +29 -67
- package/dist/curation-off/commands/debug.md +24 -63
- package/dist/curation-off/commands/dynamic-build.md +148 -200
- package/dist/curation-off/commands/dynamic-plan.md +60 -80
- package/dist/curation-off/commands/dynamic-tickets.md +54 -173
- package/dist/curation-off/commands/explore.md +18 -50
- package/dist/curation-off/commands/implement.md +90 -167
- package/dist/curation-off/commands/plan.md +51 -86
- package/dist/curation-off/commands/release.md +17 -79
- package/dist/curation-off/commands/research.md +23 -81
- package/dist/curation-off/commands/resolve.md +55 -108
- package/dist/curation-off/commands/self-review.md +26 -78
- package/dist/skills/git/references/pr/update-pr-evidence.md +2 -1
- package/dist/skills/git/references/tracker/github/ensure-pr-ready.md +3 -3
- package/dist/skills/git/references/tracker/jira/ensure-pr-ready.md +3 -3
- package/dist/skills/git/references/tracker/linear/ensure-pr-ready.md +3 -3
- package/dist/targets/claude-code/compliance-install.js +38 -13
- package/dist/targets/claude-code/compliance-off-files.js +5 -1
- package/dist/targets/claude-code/curation-install.js +77 -32
- package/dist/targets/claude-code/folder-swap.js +142 -0
- package/dist/targets/claude-code/install-backup.js +780 -0
- package/dist/targets/claude-code/installer.js +383 -192
- package/dist/targets/claude-code/legacy-skill-hashes.js +170 -0
- package/dist/targets/claude-code/linked-folder.js +5 -11
- package/dist/targets/claude-code/reference-converge.js +15 -2
- package/dist/targets/claude-code/rules-folder.js +34 -0
- package/dist/targets/claude-code/shipped-set.js +160 -0
- package/dist/targets/claude-code/workflow-folder-install.js +32 -12
- package/dist/variant-axes.json +5 -1
- package/package.json +1 -1
- package/src/assets/agents/_partials/_code.mds +3 -5
- package/src/assets/agents/_partials/_design.mds +86 -0
- package/src/assets/agents/architect.mds +41 -0
- package/src/assets/agents/code.mds +18 -20
- package/src/assets/agents/curate.md +26 -35
- package/src/assets/agents/debug.mds +21 -49
- package/src/assets/agents/design.mds +11 -114
- package/src/assets/agents/evaluate.md +6 -16
- package/src/assets/agents/explore.md +1 -2
- package/src/assets/agents/fix.mds +12 -24
- package/src/assets/agents/git.mds +20 -23
- package/src/assets/agents/harden.mds +14 -19
- package/src/assets/agents/knowledge.mds +10 -38
- package/src/assets/agents/polish.md +13 -39
- package/src/assets/agents/refactor.mds +6 -9
- package/src/assets/agents/research.mds +11 -34
- package/src/assets/agents/review.mds +12 -84
- package/src/assets/agents/skim.mds +7 -17
- package/src/assets/agents/synthesize.md +3 -21
- package/src/assets/agents/test.md +31 -32
- package/src/assets/agents/tracker.md +116 -229
- package/src/assets/agents/triage.mds +7 -26
- package/src/assets/agents/validate.md +1 -3
- package/src/assets/commands/_partials/_compliance.mds +2 -2
- package/src/assets/commands/_partials/_decisions.mds +17 -24
- package/src/assets/commands/_partials/_docs_root.mds +31 -10
- package/src/assets/commands/_partials/_engine.mds +34 -56
- package/src/assets/commands/_partials/_evidence_policy.mds +1 -1
- package/src/assets/commands/_partials/_factory.mds +10 -104
- package/src/assets/commands/_partials/_knowledge.mds +47 -51
- package/src/assets/commands/_partials/_plan_contract.mds +2 -2
- package/src/assets/commands/_partials/_preamble.mds +21 -21
- package/src/assets/commands/_partials/_publication.mds +3 -3
- package/src/assets/commands/_partials/_roster.mds +12 -13
- package/src/assets/commands/_partials/_settings.mds +6 -3
- package/src/assets/commands/_partials/_ticket_template.mds +3 -7
- package/src/assets/commands/_partials/_tracker.mds +10 -5
- package/src/assets/commands/_partials/_wave.mds +23 -32
- package/src/assets/commands/bug-analysis.mds +3 -7
- package/src/assets/commands/code-review.mds +12 -33
- package/src/assets/commands/debug.mds +5 -47
- package/src/assets/commands/dynamic-build.mds +48 -70
- package/src/assets/commands/dynamic-plan.mds +23 -42
- package/src/assets/commands/dynamic-profile.mds +7 -57
- package/src/assets/commands/dynamic-tickets.mds +9 -29
- package/src/assets/commands/explore.mds +5 -44
- package/src/assets/commands/implement.mds +75 -117
- package/src/assets/commands/plan.mds +27 -57
- package/src/assets/commands/release.mds +4 -62
- package/src/assets/commands/research.mds +7 -53
- package/src/assets/commands/resolve.mds +40 -87
- package/src/assets/commands/self-review.mds +5 -45
- package/src/assets/mds/git/_ops_pr.mds +1 -0
- package/src/assets/mds/git/_ops_steps.mds +4 -4
- package/src/assets/mds/git/_pr.mds +1 -1
- package/src/assets/rules/engineering.md +1 -1
- package/src/assets/rules/quality.md +2 -2
- package/src/assets/scripts/ci-wait.cjs +150 -18
- package/src/assets/scripts/hooks/assets/orchestrator-charter.md +3 -3
- package/src/assets/scripts/hooks/preamble +2 -3
- package/src/assets/scripts/pr-evidence.cjs +1 -0
- package/src/assets/scripts/resolve-evidence-policy.cjs +14 -13
- package/src/assets/scripts/resolve-root.cjs +186 -0
- package/src/assets/scripts/resolve-settings.cjs +14 -9
- package/src/assets/scripts/verify-evidence.cjs +355 -22
- package/src/assets/skills/accessibility/SKILL.md +28 -95
- package/src/assets/skills/agent-references/SKILL.md +2 -4
- package/src/assets/skills/agent-references/references/commands/implement-evidence-asks.md +1 -1
- package/src/assets/skills/agent-references/references/commands/implement-levels.md +4 -7
- package/src/assets/skills/agent-references/references/commands/implement-revalidate.md +1 -1
- package/src/assets/skills/agent-references/references/commands/plan-levels.md +2 -2
- package/src/assets/skills/apply-decisions/SKILL.md +5 -6
- package/src/assets/skills/apply-feature-knowledge/SKILL.md +3 -13
- package/src/assets/skills/architecture/SKILL.md +29 -105
- package/src/assets/skills/boundary-validation/SKILL.md +27 -78
- package/src/assets/skills/complexity/SKILL.md +8 -104
- package/src/assets/skills/compliance/SKILL.md +9 -67
- package/src/assets/skills/consistency/SKILL.md +7 -107
- package/src/assets/skills/database/SKILL.md +7 -72
- package/src/assets/skills/dependencies/SKILL.md +9 -109
- package/src/assets/skills/dependencies/references/detection.md +10 -0
- package/src/assets/skills/dependency-research/SKILL.md +9 -63
- package/src/assets/skills/design-review/SKILL.md +1 -35
- package/src/assets/skills/docs-framework/SKILL.md +4 -47
- package/src/assets/skills/documentation/SKILL.md +7 -71
- package/src/assets/skills/documentation/references/patterns.md +1 -1
- package/src/assets/skills/documentation/references/violations.md +1 -1
- package/src/assets/skills/feature-knowledge/SKILL.md +19 -222
- package/src/assets/skills/feature-knowledge/references/new-kb.md +128 -0
- package/src/assets/skills/gap-analysis/SKILL.md +1 -31
- package/src/assets/skills/git/SKILL.md +2 -22
- package/src/assets/skills/go/SKILL.md +24 -113
- package/src/assets/skills/java/SKILL.md +12 -98
- package/src/assets/skills/patterns/SKILL.md +8 -93
- package/src/assets/skills/performance/SKILL.md +29 -88
- package/src/assets/skills/python/SKILL.md +22 -120
- package/src/assets/skills/qa/SKILL.md +16 -54
- package/src/assets/skills/qa/references/browser-testing.md +0 -24
- package/src/assets/skills/qa/references/sources.md +2 -2
- package/src/assets/skills/quality-gates/SKILL.md +13 -100
- package/src/assets/skills/react/SKILL.md +33 -95
- package/src/assets/skills/regression/SKILL.md +8 -73
- package/src/assets/skills/reliability/SKILL.md +11 -120
- package/src/assets/skills/research-codebase/SKILL.md +7 -49
- package/src/assets/skills/research-competitor/SKILL.md +4 -39
- package/src/assets/skills/research-external/SKILL.md +5 -43
- package/src/assets/skills/research-market/SKILL.md +5 -43
- package/src/assets/skills/research-technology/SKILL.md +8 -68
- package/src/assets/skills/review-methodology/SKILL.md +10 -56
- package/src/assets/skills/rust/SKILL.md +19 -109
- package/src/assets/skills/security/SKILL.md +39 -66
- package/src/assets/skills/software-design/SKILL.md +20 -105
- package/src/assets/skills/software-design/references/patterns.md +84 -2
- package/src/assets/skills/software-design/references/violations.md +1 -1
- package/src/assets/skills/test-driven-development/SKILL.md +32 -107
- package/src/assets/skills/test-driven-development/references/rationalization-prevention.md +33 -1
- package/src/assets/skills/testing/SKILL.md +35 -53
- package/src/assets/skills/typescript/SKILL.md +23 -102
- package/src/assets/skills/ui-design/SKILL.md +26 -74
- package/src/assets/skills/worktree-support/SKILL.md +4 -10
- package/dist/curation-off/commands/dynamic-profile.md +0 -214
|
@@ -1,27 +1,11 @@
|
|
|
1
1
|
@define factory_shape():
|
|
2
2
|
### Ticket-factory pipeline shape (generalized)
|
|
3
3
|
|
|
4
|
-
This is the standard shape for converting an initiative or spec into a reviewed, amended, self-consistent set of tickets plus a tracking issue. It generalises the `l3-ticket-factory` reference (`draft → [2-lens review in parallel] → revise → whole-set critic → per-ticket amend → tracking-issue`).
|
|
5
|
-
|
|
6
|
-
The candidate ticket slate is **proposed by the model** (you, reading the initiative/spec), then **user-editable** before the pipeline runs. Never hardcode ticket identities — let the user confirm the slate first.
|
|
7
|
-
|
|
8
4
|
---
|
|
9
5
|
|
|
10
6
|
#### Stage 1 — Draft (one agent per ticket, parallelisable)
|
|
11
7
|
|
|
12
|
-
Spawn one Design agent or Synthesize agent per candidate ticket:
|
|
13
|
-
|
|
14
|
-
```js
|
|
15
|
-
// Parallel per-ticket drafters — each is fully independent at draft time
|
|
16
|
-
const drafts = await parallel(candidates.map(c => () =>
|
|
17
|
-
agent(`Draft ticket for: ${c.title}\nInitiative: ${initiative}\n${constraints}`, {
|
|
18
|
-
agentType: "Design",
|
|
19
|
-
schema: DRAFT_SCHEMA
|
|
20
|
-
})
|
|
21
|
-
));
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
DRAFT_SCHEMA (in fenced block — braces are raw):
|
|
8
|
+
Spawn one Design agent or Synthesize agent per candidate ticket. DRAFT_SCHEMA:
|
|
25
9
|
|
|
26
10
|
```json
|
|
27
11
|
{
|
|
@@ -45,29 +29,9 @@ DRAFT_SCHEMA (in fenced block — braces are raw):
|
|
|
45
29
|
|
|
46
30
|
#### Stage 2 — Two-lens review (parallel per ticket)
|
|
47
31
|
|
|
48
|
-
For each draft, run
|
|
49
|
-
|
|
50
|
-
**Lens A — Planner-readiness (cold read):** Could a planner build from this ticket alone, with no other context? Hunt: missing information; untestable or missing negative acceptance criteria; ambiguous constraints; scope holes (things the feature obviously needs that neither In nor Out mentions); undefined terms a cold reader cannot resolve. Severity: critical = planner would be blocked or misled; major = planner would guess; minor = polish.
|
|
51
|
-
|
|
52
|
-
**Lens B — Accuracy / scope-discipline audit:** Every claim is sourced from the initiative or spec. No smuggled anti-features (scope items the initiative explicitly excludes). Constraints are honored. Dependency placeholders are consistent with the candidate slate. Severity: critical = invented fact / anti-feature / leak; major = unsourced claim or stance contradiction; minor = citation polish.
|
|
53
|
-
|
|
54
|
-
```js
|
|
55
|
-
// Two Review agents per ticket, parallel across both lens and all tickets
|
|
56
|
-
const reviews = await parallel(drafts.map((draft, i) => () =>
|
|
57
|
-
parallel([
|
|
58
|
-
() => agent(`Planner-readiness cold read of ticket: ${JSON.stringify(draft)}`, {
|
|
59
|
-
agentType: "Review",
|
|
60
|
-
schema: REVIEW_SCHEMA
|
|
61
|
-
}),
|
|
62
|
-
() => agent(`Accuracy/scope-discipline audit of ticket: ${JSON.stringify(draft)}`, {
|
|
63
|
-
agentType: "Review",
|
|
64
|
-
schema: REVIEW_SCHEMA
|
|
65
|
-
}),
|
|
66
|
-
])
|
|
67
|
-
));
|
|
68
|
-
```
|
|
32
|
+
For each draft, run two independent Review agents **in parallel**, one per lens, with the checks and severities the skeleton's review prompts state: Lens A, planner-readiness (a cold read), and Lens B, accuracy and scope discipline. A scope hole is a thing the feature obviously needs that neither In nor Out names. A smuggled anti-feature is a scope item the initiative explicitly excludes.
|
|
69
33
|
|
|
70
|
-
REVIEW_SCHEMA
|
|
34
|
+
REVIEW_SCHEMA:
|
|
71
35
|
|
|
72
36
|
```json
|
|
73
37
|
{
|
|
@@ -92,22 +56,7 @@ REVIEW_SCHEMA (in fenced block — braces are raw):
|
|
|
92
56
|
|
|
93
57
|
#### Stage 3 — Revise (one agent per ticket, per review findings)
|
|
94
58
|
|
|
95
|
-
For each ticket, spawn one Synthesize agent or Design agent to apply review findings:
|
|
96
|
-
|
|
97
|
-
```js
|
|
98
|
-
// Sequential per ticket (shared file state); parallelisable across tickets only if separate files
|
|
99
|
-
const revised = await parallel(drafts.map((draft, i) => () =>
|
|
100
|
-
agent(`Revise ticket per review findings. Fix all critical + major findings; apply minor only where they clarify.
|
|
101
|
-
Ticket: ${JSON.stringify(draft)}
|
|
102
|
-
Reviews: ${JSON.stringify(reviews[i])}
|
|
103
|
-
Rules: if a finding asks for information that does not exist in the source initiative, add it to Open Questions — never invent. If a finding contradicts the stated initiative scope, the initiative wins; note the decline.`, {
|
|
104
|
-
agentType: "Synthesize",
|
|
105
|
-
schema: REVISE_SCHEMA
|
|
106
|
-
})
|
|
107
|
-
));
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
REVISE_SCHEMA (in fenced block — braces are raw):
|
|
59
|
+
For each ticket, spawn one Synthesize agent or Design agent to apply review findings. REVISE_SCHEMA:
|
|
111
60
|
|
|
112
61
|
```json
|
|
113
62
|
{
|
|
@@ -125,25 +74,9 @@ REVISE_SCHEMA (in fenced block — braces are raw):
|
|
|
125
74
|
|
|
126
75
|
#### Stage 4 — Whole-set cross-critic (single agent, sees all revised tickets)
|
|
127
76
|
|
|
128
|
-
One Design agent reviews the
|
|
129
|
-
|
|
130
|
-
1. **Coverage:** does the union of tickets cover every item the initiative mandates? Anything the initiative mandates that no ticket owns?
|
|
131
|
-
2. **Overlaps / contradictions:** same responsibility claimed by two tickets; contradictory constraints between tickets; inconsistent terminology for the same concept.
|
|
132
|
-
3. **Dependency graph:** placeholders used consistently; wave assignment matches stated dependencies; anything that should be a dependency but isn't declared.
|
|
133
|
-
4. **Acceptance-criteria coherence:** no criterion in one ticket contradicts a criterion in another.
|
|
134
|
-
|
|
135
|
-
```js
|
|
136
|
-
const critic = await agent(`Whole-set completeness & coherence audit.
|
|
137
|
-
Revised tickets: ${JSON.stringify(revised)}
|
|
138
|
-
Initiative: ${initiative}
|
|
139
|
-
Audit: coverage · overlaps/contradictions · dependency graph · acceptance-criteria coherence.
|
|
140
|
-
Return: setVerdict + perTicketAmendments + trackingGuidance.`, {
|
|
141
|
-
agentType: "Design",
|
|
142
|
-
schema: CRITIC_SCHEMA
|
|
143
|
-
});
|
|
144
|
-
```
|
|
77
|
+
One Design agent reviews the full revised set for set-level issues, not individual prose quality, on the four axes the skeleton's cross-critic prompt names: coverage, overlaps and contradictions, the dependency graph, and acceptance-criteria coherence. The dependency-graph check also flags a dependency that a ticket needs but does not declare.
|
|
145
78
|
|
|
146
|
-
CRITIC_SCHEMA
|
|
79
|
+
CRITIC_SCHEMA:
|
|
147
80
|
|
|
148
81
|
```json
|
|
149
82
|
{
|
|
@@ -168,48 +101,21 @@ CRITIC_SCHEMA (in fenced block — braces are raw):
|
|
|
168
101
|
|
|
169
102
|
#### Stage 5 — Per-ticket amend (parallel, only tickets with amendments)
|
|
170
103
|
|
|
171
|
-
Apply cross-set amendments to the tickets that need them:
|
|
172
|
-
|
|
173
|
-
```js
|
|
174
|
-
const toAmend = (critic.perTicketAmendments || []).filter(a => a.amendments.length > 0);
|
|
175
|
-
if (toAmend.length) {
|
|
176
|
-
await parallel(toAmend.map(a => () =>
|
|
177
|
-
agent(`Apply cross-set amendments to ticket "${a.title}":
|
|
178
|
-
Amendments: ${JSON.stringify(a.amendments)}
|
|
179
|
-
Rules: same as revise — never invent; unresolvable items go to Open Questions; initiative scope wins over any amendment that contradicts it.`, {
|
|
180
|
-
agentType: "Synthesize"
|
|
181
|
-
})
|
|
182
|
-
));
|
|
183
|
-
}
|
|
184
|
-
```
|
|
185
|
-
|
|
186
104
|
---
|
|
187
105
|
|
|
188
106
|
#### Stage 6 — Assemble tracking issue
|
|
189
107
|
|
|
190
|
-
One Synthesize agent writes the tracking-issue document from the final ticket set + critic guidance
|
|
191
|
-
|
|
192
|
-
```js
|
|
193
|
-
const tracker = await agent(`Write a tracking-issue document for the initiative.
|
|
194
|
-
Guidance from cross-set critic: ${JSON.stringify(critic.trackingGuidance)}
|
|
195
|
-
Final tickets: ${JSON.stringify(revised)}
|
|
196
|
-
Structure: initiative context (1–2 paragraphs) + wave-structured execution checklist + ticket index (one line per ticket, user-facing) + explicitly-excluded items (decisions, not oversights) + invariants that bind every ticket.
|
|
197
|
-
Output: write to the artifact path and return { path, title }.`, {
|
|
198
|
-
agentType: "Synthesize",
|
|
199
|
-
schema: { type: "object", required: ["path", "title"],
|
|
200
|
-
properties: { path: { type: "string" }, title: { type: "string" } } }
|
|
201
|
-
});
|
|
202
|
-
```
|
|
108
|
+
One Synthesize agent writes the tracking-issue document from the final ticket set + critic guidance.
|
|
203
109
|
|
|
204
110
|
---
|
|
205
111
|
|
|
206
|
-
#### Usage notes
|
|
112
|
+
#### Usage notes
|
|
207
113
|
|
|
114
|
+
- Each schema is its stage's return shape, passed as `schema:`: `{ agentType: "Design", schema: DRAFT_SCHEMA }`, `{ agentType: "Review", schema: REVIEW_SCHEMA }`, `{ agentType: "Synthesize", schema: REVISE_SCHEMA }`, `{ agentType: "Design", schema: CRITIC_SCHEMA }`. A field that the host script's `Return:` line adds joins the schema.
|
|
208
115
|
- The `candidates` array is **what the model proposed + user confirmed** — never hardcoded.
|
|
209
116
|
- The `initiative` variable is the raw user input (a description, a spec doc path, or inline text) — read it and distill before passing to agents.
|
|
210
117
|
- The `constraints` variable is optional: any cross-cutting rules (naming discipline, scope filters, authority order) the user supplied.
|
|
211
|
-
-
|
|
212
|
-
- Tracking-issue doc goes to `${ROOT}/.devflow/docs/tickets/{slug}/{ts}/tracking-issue.md`, `ROOT` being the workflow's `root` argument (agents do the writing).
|
|
118
|
+
- Write each ticket's artifact file inside an agent, with the ticket body template above.
|
|
213
119
|
- For large initiatives (more than ~8 tickets), chunk the `parallel(map())` fan-outs into batches (e.g. `for` loop over slices, `await`-ing each batch) so agent concurrency stays bounded and provider rate limits are respected.
|
|
214
120
|
@end
|
|
215
121
|
|
|
@@ -1,68 +1,54 @@
|
|
|
1
|
+
@import { root_paths } from "./_docs_root.mds"
|
|
2
|
+
|
|
1
3
|
A partial: the feature-knowledge load and write-back steps. D-SETTINGS-LINE: it
|
|
2
4
|
imports nothing from `_settings.mds`. Write-back Step 1 takes `KNOWLEDGE` from the
|
|
3
5
|
settings line the host's settings block resolved above, and keeps the
|
|
4
6
|
`KNOWLEDGE=off` skip inside its own step.
|
|
5
7
|
|
|
6
8
|
D-CMD-CONDENSE (#456): a cut here lands in every host, so each one names the line
|
|
7
|
-
that keeps its text in the same context. Load's closing summary restated Steps 1-
|
|
8
|
-
which each name their read, and Step
|
|
9
|
+
that keeps its text in the same context. Load's closing summary restated Steps 1-3,
|
|
10
|
+
which each name their read, and Step 1's closing sentence restated Step 2's fallback
|
|
9
11
|
fields. The Knowledge spawn names what only the caller knows (root, slug, directories,
|
|
10
12
|
files, the two paths, the index line format and its caps); how the agent writes the
|
|
11
13
|
index, writes the two files directly and commits them is held by its own body
|
|
12
14
|
(knowledge.mds steps 6-8, Direct Write Protocol, Commit Protocol), so the spawn no
|
|
13
15
|
longer restates it.
|
|
14
16
|
|
|
15
|
-
The checkout-root block lives once, in `knowledge_root()
|
|
17
|
+
The checkout-root block lives once, in `knowledge_root()`, which expands the shared
|
|
18
|
+
`root_paths()` step of `_docs_root.mds` (one `resolve-root.cjs` call, run once per run) and
|
|
19
|
+
adds the knowledge fact. `knowledge_load()` carries it,
|
|
16
20
|
and so does `knowledge_writeback()`, which a host with no load step uses. A host that renders
|
|
17
21
|
`knowledge_load()` earlier in the same command calls `knowledge_writeback_after_load()`, whose
|
|
18
22
|
Step 1 and Step 3 take the `{worktree}` that the load step resolved.
|
|
19
23
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
git -C "{start}" rev-parse --show-toplevel
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
and use its one-line output. If the command fails (outside a git repository), `{worktree}` is the start directory itself. All paths below are relative to `{worktree}`.
|
|
28
|
-
@end
|
|
29
|
-
|
|
30
|
-
@define knowledge_load():
|
|
31
|
-
### Load Feature Knowledge
|
|
32
|
-
|
|
33
|
-
{{knowledge_root()}}
|
|
34
|
-
|
|
35
|
-
**Step 1 — Read the index cache:**
|
|
36
|
-
|
|
37
|
-
Attempt to read `{worktree}/.devflow/features/index.md`. Each line follows the format:
|
|
38
|
-
|
|
39
|
-
```
|
|
40
|
-
- **{slug}** — {areas} — {Use-when description}
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
If `index.md` exists and contains at least one entry line, use it for relevance matching.
|
|
24
|
+
A host that resolves `{worktree}` earlier with `docs_root()` can call `knowledge_load_after_root()`
|
|
25
|
+
(implement does), which carries the load steps without a second root block. A host that calls it
|
|
26
|
+
then calls `knowledge_writeback_after_load()` too, and the `{worktree}` that the docs-root step
|
|
27
|
+
resolved serves the write-back.
|
|
44
28
|
|
|
45
|
-
|
|
29
|
+
The import is selective and takes `root_paths` alone: that define has no imports of its own, so
|
|
30
|
+
it adds one node to the scope of each define here.
|
|
46
31
|
|
|
47
|
-
|
|
32
|
+
@define knowledge_root():
|
|
33
|
+
{{root_paths()}}
|
|
48
34
|
|
|
49
|
-
|
|
35
|
+
All paths below are relative to `{worktree}`.
|
|
36
|
+
@end
|
|
50
37
|
|
|
51
|
-
|
|
38
|
+
@define knowledge_load_steps():
|
|
39
|
+
**Step 1 — Read the index cache** `{worktree}/.devflow/features/index.md`. Each line has the form `- **{slug}** — {areas} — {Use-when description}`. If `index.md` is absent or has no entry line, glob `{worktree}/.devflow/features/*/KNOWLEDGE.md` and read only the YAML frontmatter of each file, in one turn.
|
|
52
40
|
|
|
53
|
-
**Step
|
|
41
|
+
**Step 2 — Pick relevant KBs:** select the entries whose documented area overlaps the current task (index line, or frontmatter `description` and `directories` on fallback).
|
|
54
42
|
|
|
55
|
-
|
|
43
|
+
**Step 3 — Read each selected KB's Rules.** `{kb}` is `{worktree}/.devflow/features/{slug}/KNOWLEDGE.md`:
|
|
56
44
|
|
|
57
|
-
1. List
|
|
58
|
-
2. Read the `## Rules` range (its line to the next heading) with the Read tool, using `offset` and `limit`, and choose the one to three bullets most relevant to the
|
|
45
|
+
1. List the `##` headings with line numbers of all selected KBs in one Bash call: `command grep -n '^## ' "{kb}" …`. With two or more paths, each line starts with its `{kb}:` path. This only locates sections; the text of a KB comes from the Read view alone.
|
|
46
|
+
2. Read the `## Rules` range (its line to the next heading) with the Read tool, using `offset` and `limit`, all selected KBs in one turn, and choose the one to three bullets most relevant to the task.
|
|
59
47
|
3. If the KB has no `## Rules` section, choose one to three entries from its `## Anti-Patterns` or `## Gotchas` range the same way, and label them by that section's name instead of an ID.
|
|
60
48
|
|
|
61
|
-
When a KB contradicts the code you observe, **trust the code
|
|
62
|
-
|
|
63
|
-
**Step 5 — Set FEATURE_KNOWLEDGE and FEATURE_KNOWLEDGE_RULES:**
|
|
49
|
+
When a KB contradicts the code you observe, **trust the code**.
|
|
64
50
|
|
|
65
|
-
Write one block per selected KB. Paste each bullet verbatim from the Read view, never from a shell view. The path is relative to the checkout root; an agent resolves it under `WORKTREE_PATH` when one is provided.
|
|
51
|
+
**Step 4 — Set FEATURE_KNOWLEDGE and FEATURE_KNOWLEDGE_RULES.** Write one block per selected KB. Paste each bullet verbatim from the Read view, never from a shell view. The path is relative to the checkout root; an agent resolves it under `WORKTREE_PATH` when one is provided.
|
|
66
52
|
|
|
67
53
|
```
|
|
68
54
|
--- Feature knowledge: {slug} ---
|
|
@@ -73,31 +59,41 @@ Rules:
|
|
|
73
59
|
Headings: L5 Rules · L40 Overview · L62 Anti-Patterns · L118 Key Files
|
|
74
60
|
```
|
|
75
61
|
|
|
76
|
-
A KB with no Rules section labels its entries `Rules ({section name}):` and gives them no ID. `FEATURE_KNOWLEDGE` is these blocks; `FEATURE_KNOWLEDGE_RULES` is the same blocks without the `Headings:` line.
|
|
62
|
+
A KB with no Rules section labels its entries `Rules ({section name}):` and gives them no ID. `FEATURE_KNOWLEDGE` is these blocks; `FEATURE_KNOWLEDGE_RULES` is the same blocks without the `Headings:` line. Each spawn names the variable its recipient takes. If no KBs exist, no KBs are relevant, or `.devflow/features/` is absent, set both to `(none)`.
|
|
63
|
+
@end
|
|
64
|
+
|
|
65
|
+
@define knowledge_load():
|
|
66
|
+
### Load Feature Knowledge
|
|
67
|
+
|
|
68
|
+
{{knowledge_root()}}
|
|
69
|
+
|
|
70
|
+
{{knowledge_load_steps()}}
|
|
71
|
+
@end
|
|
72
|
+
|
|
73
|
+
@define knowledge_load_after_root():
|
|
74
|
+
### Load Feature Knowledge
|
|
77
75
|
|
|
78
|
-
|
|
76
|
+
{{knowledge_load_steps()}}
|
|
79
77
|
@end
|
|
80
78
|
|
|
81
79
|
@export knowledge_load
|
|
80
|
+
@export knowledge_load_after_root
|
|
82
81
|
|
|
83
82
|
@define knowledge_writeback_steps():
|
|
84
83
|
**Step 1 — Check the opt-out gate, with `{root}` = `{worktree}`:** take the settings line resolved above for that root, resolving it with the settings block when this run has not yet.
|
|
85
84
|
|
|
86
|
-
If the settings line says `KNOWLEDGE=off`, skip write-back entirely. The
|
|
85
|
+
If the settings line says `KNOWLEDGE=off`, skip write-back entirely. The fail-closed line says `KNOWLEDGE=off` too.
|
|
87
86
|
|
|
88
|
-
**Step 2 —
|
|
89
|
-
|
|
90
|
-
Only proceed if **at least one** of these is true:
|
|
87
|
+
**Step 2 — Write back only if at least one is true:**
|
|
91
88
|
- This workflow changed files in a directory that is documented by an existing feature knowledge base (a documented area changed). Knowledge bases are written through at that point, never on a background schedule.
|
|
92
|
-
- This workflow
|
|
89
|
+
- This workflow found durable, cross-cutting knowledge about a codebase area that future agents in that area need: patterns, anti-patterns, integration points, gotchas that a single file read does not show.
|
|
93
90
|
|
|
94
|
-
|
|
91
|
+
Otherwise skip write-back silently.
|
|
95
92
|
|
|
96
93
|
**Step 3 — Spawn the Knowledge agent:**
|
|
97
94
|
|
|
98
|
-
Spawn `Agent(subagent_type="Knowledge")` with the following context:
|
|
99
|
-
|
|
100
95
|
```
|
|
96
|
+
Agent(subagent_type="Knowledge"):
|
|
101
97
|
"WORKTREE_PATH: {worktree root}
|
|
102
98
|
FEATURE_SLUG: {slug derived from primary changed directory, kebab-case}
|
|
103
99
|
FEATURE_NAME: {human-readable name}
|
|
@@ -120,9 +116,9 @@ Then commit the two files as your Commit Protocol directs."
|
|
|
120
116
|
|
|
121
117
|
**Step 4 — Surface an uncommitted knowledge base:**
|
|
122
118
|
|
|
123
|
-
When the Knowledge agent reports `KB_COMMIT: skipped (detached HEAD)`,
|
|
119
|
+
When the Knowledge agent reports `KB_COMMIT: skipped (detached HEAD)`, tell the user in the workflow's final report, in one line, that the knowledge base was written but not committed, and name the uncommitted paths the agent listed, so they can commit them on a branch. Never commit them yourself.
|
|
124
120
|
|
|
125
|
-
|
|
121
|
+
Non-blocking: if the Knowledge agent fails, log the failure and continue.
|
|
126
122
|
@end
|
|
127
123
|
|
|
128
124
|
@define knowledge_writeback():
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
@define acceptance_criteria_contract():
|
|
11
11
|
### Acceptance criteria + test plan contract
|
|
12
12
|
|
|
13
|
-
This is the shared shape produced by `/devflow:dynamic-plan`'s plan-challenge step (§5.1) and consumed by `/devflow:dynamic-build`'s Gate 2 (§7.2).
|
|
13
|
+
This is the shared shape produced by `/devflow:dynamic-plan`'s plan-challenge step (§5.1) and consumed by `/devflow:dynamic-build`'s Gate 2 (§7.2).
|
|
14
14
|
|
|
15
15
|
#### What the plan-challenge step MUST produce (per ticket)
|
|
16
16
|
|
|
@@ -38,7 +38,7 @@ The test plan IS TP lines: at least one per acceptance criterion, numbered from
|
|
|
38
38
|
|
|
39
39
|
A scenario's setup and expected outcome are not part of its line. They go under a `## Test Scenarios` section after `## Test Plan`, one `TP-<n>:` entry per TP. `## Test Plan` holds TP lines only, so `check tp` can parse it.
|
|
40
40
|
|
|
41
|
-
The test plan must be executable by the Test agent without further clarification
|
|
41
|
+
The test plan must be executable by the Test agent without further clarification.
|
|
42
42
|
|
|
43
43
|
Every line of a `## Test Plan` section, or of a PR's test-plan block, follows this contract:
|
|
44
44
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
@import "./_decisions.mds" as decisions
|
|
2
2
|
|
|
3
|
-
A partial: the Workflow-authoring preamble the
|
|
4
|
-
|
|
3
|
+
A partial: the Workflow-authoring preamble that the three Workflow hosts
|
|
4
|
+
(dynamic-build, dynamic-plan and dynamic-tickets) share, and the decisions step
|
|
5
|
+
that precedes authoring.
|
|
5
6
|
|
|
6
7
|
D-DECISIONS-AUTHORING-STEP: the "DECISIONS_CONTEXT — obtain BEFORE authoring" step
|
|
7
|
-
is its own define, `authoring_decisions()`, expanded by the hosts
|
|
8
|
-
decisions (dynamic-build, dynamic-plan, dynamic-tickets and dynamic-profile) right
|
|
8
|
+
is its own define, `authoring_decisions()`, expanded by the same three hosts right
|
|
9
9
|
after their settings block, so the gate in it reads a line already resolved.
|
|
10
10
|
`authoring_preamble()` carries no decisions text. D-LEARNING-VARIANTS: the whole of
|
|
11
11
|
`authoring_decisions()` is a curation-on arm, so a curation-off build carries no decisions
|
|
@@ -19,11 +19,11 @@ from the agent sources and holds every pass sentence to it.
|
|
|
19
19
|
@define authoring_preamble():
|
|
20
20
|
## Your task: author a Claude Code dynamic Workflow and run it
|
|
21
21
|
|
|
22
|
-
You (the main model)
|
|
22
|
+
You (the main model) author the Workflow script body inline and pass it to the `Workflow` tool.
|
|
23
23
|
|
|
24
24
|
### Workflow runtime contract
|
|
25
25
|
|
|
26
|
-
A workflow script
|
|
26
|
+
A workflow script must begin with a pure-literal export:
|
|
27
27
|
|
|
28
28
|
```js
|
|
29
29
|
export const meta = {
|
|
@@ -33,7 +33,7 @@ export const meta = {
|
|
|
33
33
|
};
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
The script body uses
|
|
36
|
+
The script body uses only these hooks:
|
|
37
37
|
|
|
38
38
|
```js
|
|
39
39
|
agent(prompt, opts) // spawn a sub-agent; opts.agentType resolves devflow installed agents
|
|
@@ -46,7 +46,7 @@ workflow(fn) // nest one level
|
|
|
46
46
|
|
|
47
47
|
Globals available in the script body: `args`, `budget`, `workflow()`.
|
|
48
48
|
|
|
49
|
-
**The script body has NO filesystem / Node.js / CLI access** — no tracker CLI of any kind, `gh` included. All file reading, issue fetching, git operations
|
|
49
|
+
**The script body has NO filesystem / Node.js / CLI access** — no tracker CLI of any kind, `gh` included. All file reading, issue fetching, git operations and shell commands happen inside the agents the script spawns. There is no `fs`, `exec` or `fetch` in scope.
|
|
50
50
|
|
|
51
51
|
### Agent reuse via agentType
|
|
52
52
|
|
|
@@ -56,39 +56,39 @@ Spawn devflow agents with:
|
|
|
56
56
|
agent("your prompt here", { agentType: "Code" })
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
-
Valid `agentType` values: Code, Fix, Validate, Polish, Harden, Evaluate, Test, Review, Git, Synthesize,
|
|
59
|
+
Valid `agentType` values: Code, Fix, Validate, Polish, Harden, Evaluate, Test, Review, Git, Synthesize, Design, Architect.
|
|
60
60
|
|
|
61
|
-
**
|
|
61
|
+
**Omit `opts.model` whenever `agentType` is set.** The agent frontmatter sets its own model tier, and `opts.model` overrides it.
|
|
62
62
|
|
|
63
|
-
Do not write logic that depends on an agent
|
|
63
|
+
Do not write logic that depends on an agent listing its own skills.
|
|
64
64
|
|
|
65
|
-
### Pre-flight self-check —
|
|
65
|
+
### Pre-flight self-check — required before the first live `Workflow` call
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
Audit the script against this checklist:
|
|
68
68
|
|
|
69
|
-
- **`meta` is a pure literal** — `name` and `description` present;
|
|
69
|
+
- **`meta` is a pure literal** — `name` and `description` present; no variables, function calls, spreads or template interpolation anywhere inside `meta`.
|
|
70
70
|
- **Every `pipeline(x, …)` / `parallel(x)` first argument is a real array** — never a function, object, or possibly-undefined value. If it derives from a prior agent result, coerce it: `parallel((maybeList || []).map(...))`.
|
|
71
|
-
- **No reference to a possibly-undefined field** — guard every cross-result field access with optional chaining
|
|
71
|
+
- **No reference to a possibly-undefined field** — guard every cross-result field access with optional chaining.
|
|
72
72
|
- **`.filter(Boolean)` before mapping over `agent()` / `parallel()` results** — an agent can return `null` (skipped, or died after retries); strip nulls before `.map` or field access. filter(Boolean) is crash-safety only; it must never convert missing required coverage into success.
|
|
73
73
|
- **`phase()` titles match the phases declared in `meta`** — every `phase("…")` call has a matching declared phase, and vice-versa.
|
|
74
74
|
|
|
75
|
-
Then run a
|
|
75
|
+
Then run a syntax gate: write the authored script to a fresh, run-unique scratch file `/tmp/df-wf-check-<meta.name>-<epoch-seconds>.js` (never a prior run's path), run `node --check` on that file, and only then pass the script text to the `Workflow` tool.
|
|
76
76
|
|
|
77
77
|
### Budget scaling
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
Scale the Review roster and the verification votes to the `budget` global: fewer at a low budget, more at a high budget. Never hardcode a roster size.
|
|
80
80
|
|
|
81
81
|
### Handoff convention for sequential Code agents within a ticket
|
|
82
82
|
|
|
83
|
-
When a ticket requires multiple sequential Code agent phases, each Code agent appends its own `## Phase {N} Implementation Summary` section, at most 8,192 bytes, to `{toplevel}/.devflow/docs/handoff-{branch_slug}.md
|
|
83
|
+
When a ticket requires multiple sequential Code agent phases, each Code agent appends its own `## Phase {N} Implementation Summary` section, at most 8,192 bytes, to `{toplevel}/.devflow/docs/handoff-{branch_slug}.md`, `{branch_slug}` being the ticket's branch name with every `/` replaced by `-`, and `{toplevel}` being `git rev-parse --show-toplevel` in the checkout the ticket's branch is in — never a subdirectory. It never rewrites an earlier section. The next Code agent reads, via HANDOFF_FILE input, only the section of the phase immediately before its own, not the whole file. PRIOR_PHASE_SUMMARY is the in-context form. The code is authoritative over the summaries.
|
|
84
84
|
|
|
85
85
|
### IRON RULE (LLM-vs-plumbing)
|
|
86
86
|
|
|
87
|
-
**Author
|
|
87
|
+
**Author no deterministic feature code:** no parsers, schedulers, topological sorts, dependency-graph helpers or confidence formulas. The workflow's agents do all issue reading, dependency reasoning and scheduling by judgment at runtime.
|
|
88
88
|
|
|
89
89
|
### SAFETY BANNER
|
|
90
90
|
|
|
91
|
-
**NEVER merge to main or master** — the workflow merges to an integration branch only.
|
|
91
|
+
**NEVER merge to main or master** — the workflow merges to an integration branch only. This rule must appear as an `engine_invariants()` note in every workflow that touches git.
|
|
92
92
|
@end
|
|
93
93
|
|
|
94
94
|
@define authoring_decisions():
|
|
@@ -101,7 +101,7 @@ When a ticket requires multiple sequential Code agent phases, each Code agent ap
|
|
|
101
101
|
|
|
102
102
|
Before you author the workflow script, read `{ledger}/.devflow/curation/index.md`. If the file is absent or empty, set `DECISIONS_CONTEXT` to `(none)`; otherwise use the file content as `DECISIONS_CONTEXT`.
|
|
103
103
|
|
|
104
|
-
|
|
104
|
+
Then inject the relevant DECISIONS_CONTEXT into the prompts of the Code, Fix, Design, Architect, Review and Harden agents, which follow `devflow:apply-decisions`. Those are the agent types above whose contract declares it; every other agent type gets no decisions context.
|
|
105
105
|
|
|
106
106
|
{{decisions.decisions_slice()}} The script carries one `DECISIONS_CONTEXT` for every agent, so cut it once, over the whole run.
|
|
107
107
|
|
|
@@ -8,15 +8,15 @@ note that names the Git agent's publication gate; a host with compliance off cal
|
|
|
8
8
|
because the gate's reference file is not installed there.
|
|
9
9
|
|
|
10
10
|
@define publication_resolve():
|
|
11
|
-
**Resolve `REVIEW_PUBLICATION` per worktree:** take `REVIEW_PUBLICATION` from that worktree's settings line — the line resolved above for `{root}`, the worktree's root, by the settings block when this run has not yet resolved that root
|
|
11
|
+
**Resolve `REVIEW_PUBLICATION` per worktree:** take `REVIEW_PUBLICATION` from that worktree's settings line — the line resolved above for `{root}`, the worktree's root, by the settings block when this run has not yet resolved that root. The line already caps the personal choice at the team's, so it is `off`, `auto` or `full`, and `off` when the line was unresolvable.
|
|
12
12
|
|
|
13
|
-
**Evidence stub:** only when `EVIDENCE_POLICY` is `required`, a resolved `off` becomes `stub`, so a counts-only record still reaches the PR. `stub` is never a config value
|
|
13
|
+
**Evidence stub:** only when `EVIDENCE_POLICY` is `required`, a resolved `off` becomes `stub`, so a counts-only record still reaches the PR. `stub` is never a config value.
|
|
14
14
|
@end
|
|
15
15
|
|
|
16
16
|
@define publication_gate():
|
|
17
17
|
{{publication_resolve()}}
|
|
18
18
|
|
|
19
|
-
Note: `auto`
|
|
19
|
+
Note: `auto` does not fail open: the Git agent probes the repository visibility and treats any error or unrecognised value as PUBLIC (mode STUB). What each value does is decided by the Git agent's publication gate (`references/publication-gate.md` step 2); this partial only resolves the value.
|
|
20
20
|
@end
|
|
21
21
|
|
|
22
22
|
@export publication_resolve
|
|
@@ -1,31 +1,30 @@
|
|
|
1
1
|
@define agent_roster():
|
|
2
2
|
### Confirmed agent roster
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
Model tiers are for reference only; never pass `opts.model`.
|
|
5
5
|
|
|
6
6
|
| agentType | Model tier | Role |
|
|
7
|
-
|
|
8
|
-
| Code | sonnet | Implements the plan and fixes review findings
|
|
9
|
-
| Fix | sonnet | Fixes the listed validation, alignment and QA failures
|
|
7
|
+
|---|---|---|
|
|
8
|
+
| Code | sonnet | Implements the plan and fixes review findings |
|
|
9
|
+
| Fix | sonnet | Fixes the listed validation, alignment and QA failures |
|
|
10
10
|
| Validate | haiku | Build / typecheck / lint / test — fast correctness gate |
|
|
11
11
|
| Polish | sonnet | Reduces complexity, removes duplication, improves readability |
|
|
12
12
|
| Harden | opus | 9-pillar self-review — deep structural analysis |
|
|
13
13
|
| Evaluate | sonnet | Plan-fidelity / alignment — "was the plan implemented correctly?" |
|
|
14
14
|
| Test | sonnet | Scenario-based acceptance tests against acceptance criteria |
|
|
15
|
-
| Review | opus | Focus-parameterized code review
|
|
16
|
-
| Git | haiku |
|
|
17
|
-
| Synthesize | haiku |
|
|
18
|
-
|
|
|
19
|
-
|
|
|
15
|
+
| Review | opus | Focus-parameterized code review |
|
|
16
|
+
| Git | haiku | Branches, commits, merges, worktree management |
|
|
17
|
+
| Synthesize | haiku | Aggregates multi-agent outputs |
|
|
18
|
+
| Design | opus | Gap analysis: tickets, critics, wave reads |
|
|
19
|
+
| Architect | opus | Plans, anti-pattern review |
|
|
20
20
|
@end
|
|
21
21
|
|
|
22
22
|
@define agent_caveats():
|
|
23
23
|
### Agent caveats
|
|
24
24
|
|
|
25
|
-
- **The Code family writes every fix** — Code for review findings, Fix for gate failures; no other agent type writes code. Finding
|
|
26
|
-
- **
|
|
27
|
-
-
|
|
28
|
-
- **Do not depend on agents enumerating their own skills.** Skills are loaded (spike F5 confirmed) but self-reporting is imperfect. Write agent prompts that give the agent full context directly.
|
|
25
|
+
- **The Code family writes every fix** — Code for review findings, Fix for gate failures; no other agent type writes code. Finding verification uses adversarial Review passes.
|
|
26
|
+
- **Review agents are focus-parameterized.** Make one `agent()` call with `agentType: "Review"` per focus, with the focus in the prompt. Never batch focuses into one Review call.
|
|
27
|
+
- Give each agent its full context in its prompt.
|
|
29
28
|
@end
|
|
30
29
|
|
|
31
30
|
@export agent_roster
|
|
@@ -19,16 +19,19 @@ not runtime calls.
|
|
|
19
19
|
|
|
20
20
|
The accepted shape below is `SETTINGS_LINE_RE` written out, and the fallback is
|
|
21
21
|
`SETTINGS_FAIL_CLOSED_LINE`, both exported by `resolve-settings.cjs`;
|
|
22
|
-
`tests/commands/settings-partial.test.ts` pins both to the script.
|
|
22
|
+
`tests/commands/settings-partial.test.ts` pins both to the script. On every error
|
|
23
|
+
path the script prints that same fallback line itself, with a non-zero exit. The
|
|
24
|
+
literal in the block applies when the script output fails the check or the script
|
|
25
|
+
cannot run at all.
|
|
23
26
|
|
|
24
27
|
@define settings_resolve():
|
|
25
|
-
**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
|
|
28
|
+
**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:
|
|
26
29
|
|
|
27
30
|
```bash
|
|
28
31
|
node "$HOME/.devflow/scripts/resolve-settings.cjs" "{root}" 2>/dev/null; echo "exit=$?"
|
|
29
32
|
```
|
|
30
33
|
|
|
31
|
-
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** (
|
|
34
|
+
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** (including a script that cannot run) ⇒ 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.
|
|
32
35
|
|
|
33
36
|
The accepted line is the only source of these values.
|
|
34
37
|
@end
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
@define ticket_body_template():
|
|
2
2
|
### Ticket body template
|
|
3
3
|
|
|
4
|
-
Each ticket in a wave MUST use this structure. The wave scheduler agents read these fields to reason about dependencies and order. The build engine agents read acceptance criteria to drive Gate 2.
|
|
5
|
-
|
|
6
4
|
---
|
|
7
5
|
|
|
8
6
|
**Wave:** N
|
|
@@ -26,7 +24,7 @@ One paragraph: what this ticket implements and why it exists in this wave.
|
|
|
26
24
|
- Related things that belong to other tickets
|
|
27
25
|
- Future work that must NOT be anticipated
|
|
28
26
|
|
|
29
|
-
|
|
27
|
+
At least one anti-feature is required per ticket.
|
|
30
28
|
|
|
31
29
|
## Invariants
|
|
32
30
|
|
|
@@ -37,7 +35,7 @@ System properties that MUST remain true after this ticket is merged:
|
|
|
37
35
|
|
|
38
36
|
## Acceptance criteria
|
|
39
37
|
|
|
40
|
-
Numbered, for the Evaluate and Test agents.
|
|
38
|
+
Numbered, for the Evaluate and Test agents.
|
|
41
39
|
|
|
42
40
|
1. POSITIVE: The system MUST...
|
|
43
41
|
2. POSITIVE: The API MUST return...
|
|
@@ -50,11 +48,9 @@ Numbered, for the Evaluate and Test agents. See `acceptance_criteria_contract()`
|
|
|
50
48
|
|
|
51
49
|
Questions that must be answered before implementation begins. If none, write "None".
|
|
52
50
|
|
|
53
|
-
When used with `/devflow:dynamic-plan`, open questions are collected into `DECISIONS-NEEDED.md` for user review at the plan→build boundary (the human gate, §11). Preference-profile-settled questions are auto-resolved and do not appear here.
|
|
54
|
-
|
|
55
51
|
---
|
|
56
52
|
|
|
57
|
-
**Note for wave scheduler — `Depends on:` cardinality and grammar:** the field lists **zero or more** provider-canonical issue references this ticket must wait for, comma-separated, or the literal `none`. Each entry is one `{ISSUE_REF}`; under `github` an `{ISSUE_REF}` is `#`-prefixed, so a two-dependency ticket renders `Depends on: #{n}, #{n}`. Write the reference exactly as the tracker renders it — never a bare number, never a URL, never a title. The `Wave: N` label is a human-readable hint; actual ordering is determined by reading the `Depends on` relationships.
|
|
53
|
+
**Note for wave scheduler — `Depends on:` cardinality and grammar:** the field lists **zero or more** provider-canonical issue references this ticket must wait for, comma-separated, or the literal `none`. Each entry is one `{ISSUE_REF}`; under `github` an `{ISSUE_REF}` is `#`-prefixed, so a two-dependency ticket renders `Depends on: #{n}, #{n}`. Write the reference exactly as the tracker renders it — never a bare number, never a URL, never a title. The `Wave: N` label is a human-readable hint; actual ordering is determined by reading the `Depends on` relationships.
|
|
58
54
|
@end
|
|
59
55
|
|
|
60
56
|
@export ticket_body_template
|