@psimona/darkf 0.6.0 → 0.8.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.
Files changed (49) hide show
  1. package/docs/concepts/failure-modes.md +23 -7
  2. package/docs/concepts/handoff.md +3 -3
  3. package/docs/concepts/node-types.md +44 -20
  4. package/docs/guides/pick-an-agent-runner.md +122 -4
  5. package/docs/guides/plan-with-a-task-queue.md +9 -7
  6. package/docs/guides/run-detached-and-monitor.md +3 -3
  7. package/docs/guides/write-your-first-workflow.md +14 -5
  8. package/docs/index.mdx +4 -0
  9. package/docs/reference/cli-commands.md +22 -6
  10. package/docs/reference/core-types.md +29 -4
  11. package/docs/reference/package-map.md +12 -8
  12. package/docs/start-here/quickstart.md +15 -7
  13. package/package.json +9 -2
  14. package/skills/darkf-writing-workflows/SKILL.md +141 -7
  15. package/src/cli/detached.test.ts +88 -2
  16. package/src/cli/doctor.test.ts +225 -10
  17. package/src/cli/index.ts +106 -27
  18. package/src/cli/setup.ts +4 -9
  19. package/src/cli/state-file.ts +14 -0
  20. package/src/cli/tarball.test.ts +3 -1
  21. package/src/cli/update.ts +4 -9
  22. package/src/core/graph.test.ts +124 -19
  23. package/src/core/graph.ts +51 -3
  24. package/src/core/tasks.ts +1 -1
  25. package/src/core/types.test.ts +52 -0
  26. package/src/core/types.ts +48 -18
  27. package/src/engine/run.test.ts +708 -18
  28. package/src/engine/run.ts +101 -16
  29. package/src/exports.ts +4 -0
  30. package/src/kit/agents/claude-code.test.ts +38 -2
  31. package/src/kit/agents/claude-code.ts +28 -37
  32. package/src/kit/agents/handoff.test.ts +12 -0
  33. package/src/kit/agents/handoff.ts +32 -8
  34. package/src/kit/agents/opencode.test.ts +1 -1
  35. package/src/kit/agents/opencode.ts +44 -28
  36. package/src/kit/specs.test.ts +247 -0
  37. package/src/kit/specs.ts +344 -0
  38. package/src/kit/status.test.ts +24 -0
  39. package/src/kit/status.ts +31 -14
  40. package/src/kit/validation/zod.test.ts +42 -0
  41. package/src/kit/validation/zod.ts +20 -0
  42. package/workflows/dev-loop/scripts/begin.ts +9 -6
  43. package/workflows/dev-loop/scripts/dispatch.ts +50 -0
  44. package/workflows/dev-loop/scripts/finish.ts +23 -21
  45. package/workflows/dev-loop/scripts/mark-done.ts +22 -0
  46. package/workflows/dev-loop/scripts/validate-plan.ts +30 -0
  47. package/workflows/dev-loop/workflow.ts +164 -68
  48. package/workflows/series-ordering/workflow.ts +1 -0
  49. /package/workflows/dev-loop/scripts/{check.ts → test.ts} +0 -0
@@ -1,41 +1,105 @@
1
1
  import { DONE, type WorkflowDef } from "@psimona/darkf/src/core/index.ts";
2
2
  import { opencodeRunner } from "@psimona/darkf/src/kit/agents/opencode.ts";
3
3
 
4
- // dev-loop — begin → implement → check → review → document → finish(squash) →
5
- // feedback.
4
+ // dev-loop — begin → PlanPhase{plan → validate} → (dispatch →
5
+ // Task{implement → test → [fix → test]* → review → mark done})* →
6
+ // document → finish(squash) → feedback.
6
7
  //
7
8
  // The darkf-on-darkf pilot, expanded after its first real run built the CLI
8
- // self-update feature (docs/specs/self-update/). Shape ported from
9
- // blueprint's build-backend: Begin cuts the feature branch, the composite
10
- // bounds the implement/fix/review cycle, Finish squash-merges onto master
11
- // with blueprint's rails, Feedback writes the run retrospective under
12
- // darkf/feedback/.
9
+ // self-update feature (docs/specs/_built/self-update/). Shape ported from
10
+ // blueprint's build-backend: Begin cuts the feature branch, Finish
11
+ // squash-merges onto master with blueprint's rails, Feedback writes the run
12
+ // retrospective under darkf/feedback/.
13
13
  //
14
- // Run from the target repo root with a globally installed darkf (never the
15
- // workspace symlink — doctor's selfRoot guard fails inside the checkout):
14
+ // Run from the target repo root with the released engine from the npm
15
+ // registry (never the workspace symlink — doctor's selfRoot guard fails
16
+ // inside the checkout; never a source-tarball install — repeated
17
+ // install:global runs corrupt bun's global manifest with duplicate
18
+ // dependency keys):
16
19
  //
17
- // bun run install:global # once, to refresh the global binary
20
+ // bun install -g @psimona/darkf@latest # released engine; the working
21
+ // # tree's workflow rides the branch
18
22
  // darkf validate darkf/workflows/dev-loop
19
23
  // darkf start darkf/workflows/dev-loop "message" --allow-dirty-workflow
20
24
  //
21
25
  // Editing the FEATURE / RUN_DATE constants at the top of the begin/finish
22
- // scripts and this file's agent prompts is the per-feature contract until
23
- // engine-side input plumbing exists. Resume is the fresh-run semantics: a
24
- // second run on an already-implemented tree verifies and ships it (see the
25
- // Implement prompt). No other git automation: the human curates what the
26
- // workflow leaves behind (spec archive, roadmap entry, feedback note).
26
+ // scripts and this file is the per-feature contract until engine-side input
27
+ // plumbing exists — but the agent prompts below are feature-agnostic, so
28
+ // that's the only edit a new dispatch needs. Resume is the fresh-run
29
+ // semantics: a second run on an already-implemented tree verifies and ships
30
+ // it. No other git automation: the human curates what the workflow leaves
31
+ // behind (spec archive, roadmap entry, feedback note).
27
32
  //
28
- // The implementer, fixer, reviewer, and documenter are separate dispatches.
29
- // Their only
30
- // shared channels are the repo itself (files, git diff, the spec docs) and
31
- // the one-hop handoff — matching PHILOSOPHY.md: nothing rides along for
32
- // free.
33
+ // Two bounded-loop composites, not one shared "whole build" composite,
34
+ // because they bound two unrelated kinds of backward routing (Bounded
35
+ // loops rule, darkf-writing-workflows) and need very different maxCycles
36
+ // budgets:
37
+ //
38
+ // - PlanPhase: Plan (an agent — distilling free-form spec prose into a
39
+ // task list takes judgment, not parsing) emits a candidate TaskList in
40
+ // its output, reusing darkf-core's existing shared vocabulary
41
+ // (docs/specs/_built/task-list-json/spec.md) rather than a one-off
42
+ // shape. ValidatePlan (a script) runs parseTaskList on it and, once
43
+ // valid, persists it at the canonical .darkf/run/<runId>/tasks.json — a
44
+ // script gets info.rootDir/info.runId to compute that path; a static
45
+ // agent prompt cannot interpolate a per-dispatch runId, only a
46
+ // compile-time constant like FEATURE. An invalid candidate loops back to
47
+ // Plan; budget is a small, fixed number of retry rounds.
48
+ //
49
+ // - Dispatch/Task is darkf's item-loop-convention shape
50
+ // (docs/specs/item-loop-convention/spec.md — a design, not shipped code
51
+ // yet, so this hand-rolls the algorithm rather than importing it), with
52
+ // Dispatch kept OUTSIDE the Task composite on purpose. Dispatch (a
53
+ // script) is the node that actually walks the plan — it picks the
54
+ // first "pending" task out of tasks.json, flips it "in-progress", and
55
+ // hands it to Implement as the one thing to build this pass. Task is
56
+ // the per-task lane: Implement → Test → (Fix → Test)* → Review →
57
+ // MarkDone. Review (an agent, reads tasks.json itself to find the
58
+ // in-progress task — it never receives it via handoff, which is
59
+ // several hops away by the time Review runs) verifies the task's claim
60
+ // against the actual working tree and never edits anything; MarkDone
61
+ // (a script) does the one mechanical write that follows an approval,
62
+ // then routes back out to Dispatch for the next task — a flat edge
63
+ // across the composite boundary (buildRegistry is one flat map keyed
64
+ // by state id; routing doesn't care which composite either side lives
65
+ // in).
66
+ //
67
+ // That flat edge is what makes the sizing per-task instead of
68
+ // per-plan: every time Dispatch (outside Task) hands off into Task
69
+ // again, that is a fresh entry into the composite, because the engine
70
+ // resets a composite's cycle counter whenever the immediately
71
+ // preceding dispatch's scope did not already include it
72
+ // (CompositeStateDef.maxCycles's doc, src/core/types.ts). Task's
73
+ // maxCycles below therefore budgets one task's worst case only, never
74
+ // multiplied by how many tasks the plan turns out to have. Dispatch
75
+ // itself carries no maxCycles of its own — the engine-wide maxSteps is
76
+ // the only backstop on the item-to-item loop, matching
77
+ // item-loop-convention's own Non-goals ("automatic maxCycles wiring"
78
+ // is explicitly out of scope: a workflow author still sizes a lane's
79
+ // own budget by hand, but never has to also guess the plan's total
80
+ // size to do it). This replaces the pilot's original shape, where
81
+ // Dispatch lived inside the same composite as the lane and the budget
82
+ // had to cover the whole plan — sized for "≤8 tasks × ≤9 dispatches,"
83
+ // it crashed on cycle-limit the first time a real plan came out to 17
84
+ // tasks, even though no single task was anywhere near a runaway.
85
+ //
86
+ // Every node's only shared channels are the repo itself (files, git diff,
87
+ // the spec docs, the run's tasks.json) and the one-hop handoff — matching
88
+ // PHILOSOPHY.md: nothing rides along for free. A node several hops past
89
+ // whoever produced something it needs (Review past Dispatch; Document past
90
+ // everything) rediscovers it from disk — "the task with status
91
+ // in-progress," "the directory under .darkf/run/ with the latest mtime" —
92
+ // never by a value hand-threaded through every intervening node's output.
93
+ // See darkf-writing-workflows's "Keep prompts feature-agnostic". The same
94
+ // tasks.json also feeds the OpenCode plugin's live "tasks nn/mm" tab for
95
+ // free, since MarkDone flips a task's status the moment its claim is
96
+ // actually verified, not merely claimed.
33
97
 
34
98
  export const agentRunner = opencodeRunner;
35
99
 
36
100
  const MODEL = "zai-coding-plan/glm-5.3-flash";
37
- const RUN_DATE = "2026-11-09";
38
- const FEATURE = "skill-setup";
101
+ const RUN_DATE = "2026-11-19";
102
+ const FEATURE = "opencode-overlay-tiles";
39
103
 
40
104
  export const workflow: WorkflowDef = {
41
105
  initial: "Begin",
@@ -44,43 +108,75 @@ export const workflow: WorkflowDef = {
44
108
  type: "script",
45
109
  file: "begin.ts",
46
110
  retries: 1,
47
- on: { started: "Loop", branch_failed: DONE },
111
+ on: { started: "Plan", branch_failed: DONE },
112
+ },
113
+ PlanPhase: {
114
+ initial: "Plan",
115
+ // Two dispatches per round (Plan, ValidatePlan); budget three full
116
+ // retry rounds. Unrelated to Task's budget — see the top comment
117
+ // on why these are two composites, not one.
118
+ maxCycles: 6,
119
+ states: {
120
+ Plan: {
121
+ type: "agent",
122
+ agent: { model: MODEL },
123
+ retries: 1,
124
+ prompt: `You are planning the ${FEATURE} run. Do not write or modify any code.
125
+
126
+ Read docs/specs/${FEATURE}/. It holds the contract as either a single spec.md, or a split prd.md (requirements) + design.md (implementation) pair — read whichever is present.
127
+
128
+ Distill the contract into one TaskList JSON object (shape: id, optional spec: { prd?, design? }, requirements?: TaskRequirement[], tasks: Task[] — TaskRequirement is { id, kind: "req"|"nfr"|"ng", text, priority? }; Task is { id, title, status, satisfies?, priority? }; priority is one of "must"|"should"|"could"|"won't"; status starts "pending" for every task):
129
+
130
+ - requirements: one entry per concrete requirement, NFR, or non-goal in the contract, kind "req"/"nfr"/"ng" accordingly, text stated the way the contract states it — don't paraphrase, don't add anything beyond it.
131
+ - tasks: one entry per concrete file to create or change and concrete behavior to add that the contract calls for. Each task's satisfies lists the requirement ids it implements. id is a short kebab-case slug; title is one line.
132
+
133
+ Put this object directly in your output — do not write any file yourself; the next step persists and validates it.
134
+
135
+ Finish with event "planned". If the contract is missing, contradictory, or too vague to distill a concrete task list from, finish with event "blocked" and the reason.`,
136
+ on: { planned: "ValidatePlan", blocked: DONE },
137
+ },
138
+ ValidatePlan: {
139
+ type: "script",
140
+ file: "validate-plan.ts",
141
+ retries: 1,
142
+ on: { valid: "Dispatch", invalid: "Plan" },
143
+ },
144
+ },
145
+ },
146
+ Dispatch: {
147
+ type: "script",
148
+ file: "dispatch.ts",
149
+ retries: 1,
150
+ on: { next_item: "Implement", plan_exhausted: "Document", blocked: DONE },
48
151
  },
49
- Loop: {
152
+ Task: {
50
153
  initial: "Implement",
51
- // The normal path is one cycle (Implement → Check → Review → Document
52
- // → Finish). Each Fix → Check re-entry costs another. 8 leaves room
53
- // for two fix rounds including the terminal Document dispatch before
54
- // the engine calls the run stuck.
55
- maxCycles: 8,
154
+ // Sized for one task's worst case only (Implement + Test + 2
155
+ // Fix/Test rounds + Review + MarkDone = 8), with item-loop-
156
+ // convention's own estimateMaxCycles(n, slack=1.5) rounding: 8 *
157
+ // 1.5 = 12. Dispatch is deliberately outside this composite (see
158
+ // the top comment) so this budget resets fresh on every task,
159
+ // never multiplied by the plan's task count.
160
+ maxCycles: 12,
56
161
  states: {
57
162
  Implement: {
58
163
  type: "agent",
59
164
  agent: { model: MODEL },
60
165
  retries: 1,
61
- prompt: `Implement the ${FEATURE} feature in this repository.
62
-
63
- First read docs/specs/${FEATURE}/spec.md. It is the contract: its Decisions and Non-goals sections are locked — implement exactly what they specify, nothing more. The spec is the only contract artifact; no design.md exists for this feature.
166
+ prompt: `Implement exactly the one task you were handed for the ${FEATURE} feature — see "Input from the previous step" below for its id, title, and which requirements it satisfies. Nothing else.
64
167
 
65
- Resume semantics: if the working tree already implements part of the spec, verify that part instead of re-implementing. The bundled skills already exist and are final content — darkf/skills/darkf-usage/SKILL.md and darkf/skills/darkf-writing-workflows/SKILL.md. Do not rewrite them. Wire them into setup, doctor, packaging, and the docs move as the spec specifies.
168
+ First read docs/specs/${FEATURE}/. It holds the contract as either a single spec.md, or a split prd.md (requirements) + design.md (implementation) pair — read whichever is present. Use it to understand what the handed-off task actually requires; its locked decisions and explicit non-goals bound the work.
66
169
 
67
- Deliverables (when not already present):
68
- - darkf/src/cli/setup.ts (new): \`darkf setup\` — sync both bundled skills into every detected host's skills dir. Hosts are a table in code per the spec: claude code (~/.claude/skills, binary claude), opencode (~/.opencode/skills, opencode), codex cli (~/.codex/skills, codex), gemini cli (~/.gemini/skills, gemini), cursor (~/.cursor/skills, cursor-agent); a host is detected when its skills dir exists OR its binary is on PATH. Write policy: darkf-* is darkf's namespace — copy when missing; when present, replace the whole dir (copy bundled to a dot-prefixed temp dir inside the skills dir, remove the installed dir, rename into place) so the destination is an exact mirror. States missing/ok/differs per skill. Output: one host-detection line, then one line per host per skill. Creates a missing skills dir (mode 0755) for a detected host; skips an undetected host without creating anything. Exits non-zero when a present host still ends missing/differs after the sync attempt. Takes no flags and no positional args; never prompts.
69
- - \`darkf upgrade\` (darkf/src/cli/update.ts) runs the same sync after self-update, under a "skills:" header, best-effort: a sync failure is reported and exits non-zero but never masks the upgrade itself.
70
- - doctor/validate split in darkf/src/cli/index.ts: \`darkf doctor\` with no ref checks the environment only — agent binaries, cwd sanity, skills section. \`darkf validate <ref>\` inherits the workflow checks doctor has today (resolves, loads, exports, structure), unchanged lines and exit codes. Back-compat: \`darkf doctor <ref>\` prints the new usage and exits 1. The skills section names every known harness: per skill ok/missing/differs for a present harness, \`harness not present\` for an absent one; it writes nothing and exits non-zero only for missing/differs on a present harness, with \`run darkf setup\` as the fix hint. All three (doctor skills section, validate checks, setup sync) share one skills-check function. Fix doctor's stale runner hint while there: "built-ins live in src/agents/" — the real location is src/kit/agents/.
71
- - Daily probe: once per calendar day, the first darkf invocation after the update gate runs a skills-only check via the same shared function. State file per the spec (XDG state semantics like updateStateFile) stores the last probe date; missing or corrupt counts as never probed. Silent when every present harness is ok. On missing/differs, print one compact block (the failing lines plus "fix: run darkf setup") before the invoked command's own output. Never fatal — the probe never changes the invoking command's exit code. \`setup\` and \`upgrade\` skip the probe and refresh the state file.
72
- - Packaging: darkf/package.json gains "files": ["src", "workflows", "skills", "docs"].
73
- - Docs move: move site/src/content/docs/** to darkf/docs/** and rebase the site's content loading onto darkf/docs/ (site/src/content.config.ts, starlight docsLoader — rebase it, or if the loader cannot rebase, a prepack copy with a drift check per the spec). bun run build in site/ must still succeed.
74
- - Tests per the spec's Testing section: setup tests with deps injected like update.ts's UpdateDeps (home, bundledDir, existsBinary) covering host detection by dir alone / by binary / absent, copy and mirror semantics including leftover-file wipe and crashed-temp-dir replacement, state reporting, and exit codes; doctor/validate split tests; daily-probe tests (first-of-day runs, same-day skip, corrupt state file, silent-ok, block-on-failure, exemptions); the tarball smoke check (npm pack, temp-prefix install, run setup/doctor/render and the skill-referenced docs paths).
170
+ Resume semantics: if the working tree already implements this task, verify it instead of re-implementing.
75
171
 
76
- Follow the existing code style of darkf/src/cli/index.ts and darkf/src/cli/update.ts. Do not commit. Do not touch files outside darkf/src/, darkf/package.json, darkf/skills/, darkf/docs/, site/, and docs/specs/${FEATURE}/.
172
+ Do not commit. Do not touch tasks.json — Review verifies your claim and MarkDone updates it once that verification passes.
77
173
 
78
- Finish with event "implemented". If the spec cannot be implemented as written, finish with event "blocked" and put the reason in the output. If a review demand contradicts the spec, finish with event "disputed" and ground the objection in the spec text.`,
79
- on: { implemented: "Check", blocked: DONE, disputed: DONE },
174
+ Finish with event "implemented". If the task cannot be implemented as specified, finish with event "blocked" and put the reason in the output. If a review demand contradicts the spec, finish with event "disputed" and ground the objection in the spec text.`,
175
+ on: { implemented: "Test", blocked: DONE, disputed: DONE },
80
176
  },
81
- Check: {
177
+ Test: {
82
178
  type: "script",
83
- file: "check.ts",
179
+ file: "test.ts",
84
180
  retries: 1,
85
181
  on: { passed: "Review", failed: "Fix" },
86
182
  },
@@ -90,10 +186,10 @@ Finish with event "implemented". If the spec cannot be implemented as written, f
90
186
  retries: 1,
91
187
  prompt: `You are repairing the ${FEATURE} implementation after a failed gate.
92
188
 
93
- The handoff you received carries either the failing tail of "bun run check" or the reviewer's change list. Read docs/specs/${FEATURE}/spec.md for the contract. Fix the code minimally. Do not redesign. Do not commit. Do not touch files outside darkf/src/, darkf/package.json, darkf/skills/, darkf/docs/, and site/.
189
+ The handoff you received carries either the failing tail of "bun run check" or the reviewer's change list. Read docs/specs/${FEATURE}/'s contract (spec.md if present, otherwise prd.md + design.md). Fix the code minimally. Do not redesign. Do not commit.
94
190
 
95
191
  Finish with event "fixed". If the failure exposes a spec defect you cannot resolve in code, finish with event "blocked" and the reason. If the demand contradicts the spec, finish with event "disputed" and ground the objection in the spec text.`,
96
- on: { fixed: "Check", blocked: DONE, disputed: DONE },
192
+ on: { fixed: "Test", blocked: DONE, disputed: DONE },
97
193
  },
98
194
  Review: {
99
195
  type: "agent",
@@ -101,28 +197,30 @@ Finish with event "fixed". If the failure exposes a spec defect you cannot resol
101
197
  retries: 1,
102
198
  prompt: `You are an independent reviewer. Do not modify any files.
103
199
 
104
- Verify the working tree against docs/specs/${FEATURE}/spec.md:
200
+ Find the run directory under .darkf/run/ with the latest mtime and read its tasks.json. Find the one task whose status is "in-progress" — that is the task just implemented and tested. A task reaching you is a claim to verify, not a fact to trust:
201
+
105
202
  - inspect git status --porcelain in addition to git diff — agent-authored new files are invisible to git diff alone
106
- - check the host table matches the spec exactly: five harnesses (claude code, opencode, codex cli, gemini cli, cursor), their skills dirs and binary names, and dir-exists OR binary-on-PATH detection
107
- - check the write policy: darkf-* namespace only, dir replacement not file merge (temp-dir copy, remove, rename), exact-mirror destinations, no flags, no prompts, undetected hosts skipped without dir creation
108
- - check the upgrade sync: runs after self-update under a "skills:" header, best-effort, same code path as setup
109
- - check the doctor/validate split: doctor with no ref = environment only (binaries, cwd sanity, skills section); validate <ref> inherits the workflow checks with unchanged lines and exit codes; doctor <ref> back-compat prints usage and exits 1; the skills section names every known harness with the spec's states and exit rules; the stale "src/agents/" hint is fixed to src/kit/agents/
110
- - check the daily probe: once per calendar day on first invocation after the update gate, skills-only via the shared function, spec state file with missing/corrupt treated as never probed, silent on ok, compact block plus fix hint on missing/differs, never fatal, setup/upgrade exempt and refreshing the state file
111
- - check packaging: package.json files allowlist exactly ["src", "workflows", "skills", "docs"]; docs moved to darkf/docs/; the site still builds from the moved docs (loader rebase or prepack copy with drift check)
112
- - check the bundled skills are byte-unchanged: darkf/skills/darkf-usage/SKILL.md and darkf/skills/darkf-writing-workflows/SKILL.md
113
- - check the tests cover the spec's Testing section: setup deps-injection fixtures, mirror semantics, doctor/validate split, daily probe behaviors, tarball smoke check
114
- - you may run "bun test darkf/src" and "bun run lint" yourself
115
-
116
- Approve only if the implementation fulfills the spec. Otherwise list every required change concretely in the output.
203
+ - read docs/specs/${FEATURE}/'s contract (spec.md if present, otherwise prd.md + design.md) for what each id in the task's "satisfies" list actually requires, and confirm the working tree genuinely satisfies every one of them
204
+ - you may run the project's own test/lint commands yourself
205
+
206
+ Approve only if the task's claim holds in full. Otherwise list every required change concretely in the output.
117
207
 
118
208
  Finish with event "approved" or event "changes_requested".`,
119
- on: { approved: "Document", changes_requested: "Fix" },
209
+ on: { approved: "MarkDone", changes_requested: "Fix" },
120
210
  },
121
- Document: {
122
- type: "agent",
123
- agent: { model: MODEL },
211
+ MarkDone: {
212
+ type: "script",
213
+ file: "mark-done.ts",
124
214
  retries: 1,
125
- prompt: `You are updating user-facing documentation for the ${FEATURE} feature, after an independent review approved the implementation. Do not modify code or tests.
215
+ on: { marked: "Dispatch" },
216
+ },
217
+ },
218
+ },
219
+ Document: {
220
+ type: "agent",
221
+ agent: { model: MODEL },
222
+ retries: 1,
223
+ prompt: `You are updating user-facing documentation for the ${FEATURE} feature, after every task in its plan was implemented and independently reviewed. Do not modify code or tests.
126
224
 
127
225
  Read docs/specs/${FEATURE}/spec.md (or prd.md/design.md when present) for what the feature does, and run git diff master plus git status --porcelain to see what shipped.
128
226
 
@@ -137,9 +235,7 @@ Docs must match the spec when this run lands — drift accumulates one stale pag
137
235
  Do NOT touch: ROADMAP.md, darkf/feedback/, docs/specs/ (the spec archive move and roadmap entry are post-merge human curation), any file under darkf/src/ or darkf-opencode-plugin/.
138
236
 
139
237
  If nothing user-facing changed and no doc drifted, finish with event "skipped" and put the one-line reason in the output. Otherwise make the edits and finish with event "documented". If the docs cannot be updated (for example the site is broken), finish with event "blocked" and the reason.`,
140
- on: { documented: "Finish", skipped: "Finish", blocked: DONE },
141
- },
142
- },
238
+ on: { documented: "Finish", skipped: "Finish", blocked: DONE },
143
239
  },
144
240
  Finish: {
145
241
  type: "script",
@@ -52,6 +52,7 @@ Write your result per the handoff instructions: event "done" if it matches the s
52
52
 
53
53
  export const workflow: WorkflowDef = {
54
54
  initial: "Fix",
55
+ agent: { model: "claude-sonnet-5-5" },
55
56
  states: {
56
57
  Fix: {
57
58
  initial: "Implement",