workflow: project-driven agent workflow (docs-first, TODO/ROADMAP tracking, verify-before-done)
- 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:
1 parent
e709737df1
commit
a3739eb628
14 files changed
+652
-10
No files matched your search
@@ -102,3 +102,18 @@ export function changesPanel(session: Session): Panel {
|
||||
.join('\n');
|
||||
return { title: 'changes', body };
|
||||
}
|
||||
|
||||
/** Project workflow state: what the repo tracks and how the session behaved. */
|
||||
export function workflowPanel(session: Session): Panel {
|
||||
const w = session.workflowStatus();
|
||||
const yes = (b: boolean): string => (b ? 'yes' : 'no');
|
||||
const rows = [
|
||||
['workflow', w.enabled ? 'on' : 'off'],
|
||||
['TODO.md', `${yes(w.hasTodo)}${w.hasTodo ? ` (${w.todoLines} lines)` : ''}`],
|
||||
['ROADMAP.md', `${yes(w.hasRoadmap)}${w.hasRoadmap ? ` (${w.roadmapLines} lines)` : ''}`],
|
||||
['docs dir', `${yes(w.hasDocs)}${w.hasDocs ? ` (${w.docsFiles} files)` : ''}`],
|
||||
['reminders sent', w.nudged ? '1 (this session)' : 'none'],
|
||||
];
|
||||
const body = rows.map(([k, v]) => `${k}: ${v}`).join('\n');
|
||||
return { title: 'workflow', body };
|
||||
}
|
||||
Reference in new issue
Block a user