Metadata
| Status | done |
|---|---|
| Assigned | agent-1160 |
| Agent identity | f51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e |
| Created | 2026-04-29T17:53:13.838338469+00:00 |
| Started | 2026-04-29T17:53:46.302444296+00:00 |
| Completed | 2026-04-29T18:12:46.372475754+00:00 |
| Tags | fix,docs,architecture, eval-scheduled |
| Eval score | 0.83 |
| └ blocking impact | 0.88 |
| └ completeness | 0.88 |
| └ constraint fidelity | 0.55 |
| └ coordination overhead | 0.88 |
| └ correctness | 0.82 |
| └ downstream usability | 0.78 |
| └ efficiency | 0.75 |
| └ intent fidelity | 0.90 |
| └ style adherence | 0.85 |
Description
Description
Three categories of documentation are conflated in workgraph today:
- Universal chat-agent role contract — how chat agents behave in ANY workgraph project. Examples: 'don't read source, use wg add, do quality pass before batch execution, distinguish dispatcher vs chat agent vs worker agent.'
- Project-specific context — autohaiku-vs-workgraph-vs-other-project conventions, files, goals.
- Workgraph contributor docs — design rationale, architecture choices, why-we-chose-X.
Today they live in:
- workgraph repo's CLAUDE.md mixes 1 + 2 (workgraph-as-a-project)
- workgraph repo's docs/designs/ holds 3
- Each downstream project has its own CLAUDE.md / AGENTS.md mixing layers 1 (often missing) and 2
User confusion: 'is this a piece of documentation that may not be available unless you're actually working in the WorkGraph repo, right? Or is this about how you're supposed to work on WorkGraph itself? I think it's confusing. I don't know where one starts and where the other ends.'
Concrete consequence: chat agents in downstream projects (e.g. ~/autohaiku) may or may not follow workgraph's documented patterns (quality-pass workflow, paused-task convention, chat-vs-dispatcher distinction) depending on what bundled prompt or quickstart output they receive. The quality-pass design doc lives in workgraph source — invisible from downstream projects — yet the BEHAVIOR it describes is supposed to be universal.
Goal
Cleanly separate the three layers and make the universal role contract available wherever wg runs.
Proposal
Layer 1: Universal role contract — bundle with the wg binary
- Promote the role-contract content (from CLAUDE.md, fallback prompt, quality-pass design) into a single canonical document
- Ship it inside the wg binary as the output of a new
wg agent-guidecommand (or expandwg quickstartto include it) - Every chat agent invocation prepends/references this content as part of its role context — regardless of which project it's working in
- Source of truth: a single Markdown file in workgraph source (e.g.
src/text/agent_guide.md) embedded via include_str! at compile time
Layer 2: Project-specific context — stays in each project's CLAUDE.md / AGENTS.md
- Workgraph repo's CLAUDE.md becomes ONLY the workgraph-as-a-project layer-2 content (its development guidelines, smoke gate, glossary), no universal role stuff
- The 'Chat agent role' section of current CLAUDE.md → moves to layer 1
- The 'Service Configuration' / 'Smoke gate' / project-specific stuff stays in CLAUDE.md
- Every project that adopts workgraph adds its own layer-2 content; layer 1 is automatically present via the bundled binary
Layer 3: Contributor docs — clearly mark as such
docs/designs/anddocs/research/get a header note: 'This document is for people hacking on workgraph itself. The behavior it describes is implemented; you don't need to read this to USE workgraph.'- Optional: add a top-level docs README that explains the three layers and where each thing lives
Validation
-
wg agent-guidecommand exists; outputs the universal role contract Markdown - CLAUDE.md in workgraph repo contains only layer-2 content (workgraph-as-a-project); the 'Chat agent role' / 'For All Agents' / 'Cycles' / 'Task description requirements' / 'Smoke gate' sections that are universal move to the bundled agent-guide
-
A chat agent invoked in a non-workgraph project (e.g. ~/autohaiku) gets the universal role contract via the bundled prompt OR via reading
wg agent-guideoutput at session start - docs/designs/ and docs/research/ get the contributor-only header
- Cross-reference: the quality-pass design doc + phantom-edge analysis explicitly link to the bundled role contract that supersedes them as the source of behavior
- cargo build + cargo test pass
- cargo install --path . was run before claiming done
Out of scope (deliberate)
- Multi-language docs / i18n
- Generating role contract per-handler (claude vs codex variants) — single Markdown for now; the handler's prompting layer can adapt as needed
- Versioned / pinned role contracts — single file, evolves with the binary
Depends on
Required by
- (none)
Log
- 2026-04-29T17:53:13.824516916+00:00 Task paused
- 2026-04-29T17:53:13.878929809+00:00 Task published
- 2026-04-29T17:53:44.476377516+00:00 Lightweight assignment: agent=Careful Programmer (f5143935), exec_mode=full, context_scope=full, reason=Careful Programmer (0.77 score, 328 tasks) fits this architectural documentation reorganization—it requires code changes (wg agent-guide command), file modifications across CLAUDE.md/docs/, and careful separation of universal vs project-specific layers.
- 2026-04-29T17:53:46.302447813+00:00 Spawned by coordinator --executor claude --model opus
- 2026-04-29T17:53:57.977446089+00:00 Starting task: reorg docs into 3 layers — universal role contract bundled in wg binary, project-specific in CLAUDE.md, contributor docs marked
- 2026-04-29T18:11:51.993849106+00:00 Built and installed: cargo build + cargo install --path . succeeded; 8/8 agent_guide unit tests pass
- 2026-04-29T18:11:52.034390371+00:00 wg agent-guide outputs 306-line universal role contract from include_str! bundle
- 2026-04-29T18:12:38.308174290+00:00 Committed: e4e8c60d7 — pushed to remote (10 files, +491/-76)
- 2026-04-29T18:12:46.372478830+00:00 Task pending eval (agent reported done; awaiting `.evaluate-*` to score)
- 2026-04-29T18:14:14.785192335+00:00 PendingEval → Done (evaluator passed; downstream unblocks)