workflow: project-driven agent workflow (docs-first, TODO/ROADMAP tracking, verify-before-done)
ci / check (macos-latest) (push) Canceled after 0s
ci / check (ubuntu-latest) (push) Canceled after 0s
ci / check (windows-latest) (push) Canceled after 0s

- system prompt gains a Project workflow block when the repo tracks its own
  progress (TODO.md/ROADMAP.md/docs): read the task list first and keep it
  current, spec-first for non-trivial work, complete unit tests, verify before
  declaring done
- TODO.md + ROADMAP.md loaded as 'Project tracker' instruction blocks, capped
  tighter than AGENTS.md so the agent sees the shape without drowning in it
- one soft nudge per session when a turn writes files without touching the
  task list; suppressed when todo_write was called; never a gate
- /workflow command + panel showing TODO/ROADMAP/docs presence, line/file
  counts, nudge state
- config: workflow.enabled (default true), workflow.docsDir (default docs)
- prompt-cache version key extended with wf: so toggling the workflow busts
  the cached system prompt
- docs: docs/workflow.md, configuration table row, ROADMAP + TODO entries
- tests: test/workflow.test.ts (9 tests)

830 tests pass, typecheck clean, build green, live headless demo verified
This commit is contained in:
asepharyana
2026-09-09 19:00:22 +07:00
parent e709737df1
commit a3739eb628
14 changed files with 652 additions and 10 deletions
+10
View File
@@ -102,3 +102,13 @@ Kept for one release, then deleted.
- [x] Workspace file list refresh — after a turn that wrote files, re-walk at the boundary so the next prompt shows new paths
- [x] Per-turn spend cap — `maxSpendPerTurn`, aborts a step past the line with a notice
- [x] `/fork` — clone the session at the last turn boundary to a new saved session; original untouched
### Project-driven workflow batch (v8)
- [x] Workflow policy in the system prompt when the repo tracks progress (TODO.md/ROADMAP.md/docs) — read the task list first, keep it current, spec-first, complete unit tests, verify before done
- [x] TODO.md + ROADMAP.md loaded as `Project tracker` instruction blocks (capped 6k each, git root down to cwd)
- [x] Once-per-session soft nudge when a turn writes files without calling `todo_write` (skipped when the task list was updated)
- [x] `/workflow` — status panel: TODO/ROADMAP/docs presence + line/file counts + nudge state
- [x] `workflow.enabled` / `workflow.docsDir` config keys, merged in `config.merge`
- [x] Docs: `docs/workflow.md`, ROADMAP entry, TODO done-list entry
- [x] Tests: `test/workflow.test.ts` (9 tests)