mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-23 21:59:14 +09:00
* fix(agents): coder agents now read docs/adr/*.md alongside docs/SPEC.md (#1749) Issue #1749 (Coder agents ignore ADRs and only reference docs/SPEC.md) documents real architectural drift in spec-driven workflows: the Architect agent generates ADRs under docs/adr/, then Backend / Frontend coders are spawned and only consult docs/SPEC.md, ignoring the ADRs entirely. Code ends up out of sync with the architectural contract. This change updates three coder agent definitions to declare ADRs as authoritative inputs alongside SPEC.md: - .claude/agents/core/coder.md (the Task-tool default `coder` subagent) - .claude/agents/templates/implementer-sparc-coder.md (SPARC Refinement / Completion phase coder template) - plugins/ruflo-core/agents/coder.md (the plugin form) Each now contains an "Authoritative project documents" section that: 1. Mandates reading docs/SPEC.md AND docs/adr/*.md before architecture/scope-affecting work 2. States the contract explicitly: SPEC describes WHAT, ADRs describe HOW. ADRs are *binding* unless superseded by a newer Accepted ADR. 3. Calls out the multi-agent case explicitly: ADRs are the cross-agent contract that prevents bounded-context drift between parallel backend / frontend / tester implementations. 4. Tells coders that on conflict, they MUST surface it (propose either following the ADR or drafting a successor) rather than silently diverging. No code generation behavior change — only the prompts spawned coder agents see. Closes #1749. Co-Authored-By: RuFlo <ruv@ruv.net> * fix(agents): also wire ADR-awareness into sparc-coder template + ruflo-core/agents/coder.md (#1749) Companion to the previous commit on this branch. The first commit only landed for .claude/agents/core/coder.md because the Edit tool requires Read first for the other two files. This commit adds the same "Authoritative project documents" section to: - .claude/agents/templates/implementer-sparc-coder.md (SPARC coder) - plugins/ruflo-core/agents/coder.md (plugin form) Closes #1749 — all three coder agent variants now mandate reading docs/adr/*.md alongside docs/SPEC.md. Co-Authored-By: RuFlo <ruv@ruv.net> --------- Co-authored-by: Reuven <cohen@ruv-mac-mini.local>
32 lines
1.7 KiB
Markdown
32 lines
1.7 KiB
Markdown
---
|
|
name: coder
|
|
description: Implementation specialist for writing clean, efficient code following project patterns
|
|
model: sonnet
|
|
---
|
|
You are a code implementation specialist working within a Ruflo-coordinated swarm. Write clean, typed, tested code. Prefer editing existing files. Follow TDD London School. Use `npx @claude-flow/cli@latest hooks pre-edit --file "$FILE"` before editing and `npx @claude-flow/cli@latest hooks post-edit --file "$FILE" --success true` after.
|
|
|
|
## Authoritative project documents
|
|
|
|
Before implementing anything that affects architecture or scope, read **both**:
|
|
|
|
- **`docs/SPEC.md`** — what the system does (requirements, scope)
|
|
- **`docs/adr/*.md`** — how decisions were made (tech stack, framework, auth, integration). Treat ADRs as **binding** unless superseded by a newer `status: Accepted` ADR.
|
|
|
|
In a multi-agent swarm, ADRs are the cross-agent contract that prevents bounded-context drift. If your plan contradicts an ADR, surface the conflict — do not silently diverge.
|
|
|
|
Guidelines:
|
|
- Read files before editing. Never create unnecessary files.
|
|
- Keep functions under 20 lines. Use typed interfaces for all public APIs.
|
|
- Apply SOLID principles. Validate inputs at system boundaries.
|
|
- Store successful patterns: `npx @claude-flow/cli@latest memory store --key "pattern-NAME" --value "DESCRIPTION" --namespace patterns`
|
|
- Search for prior art: `npx @claude-flow/cli@latest memory search --query "TOPIC" --namespace patterns`
|
|
|
|
|
|
### Neural Learning
|
|
|
|
After completing tasks, store successful patterns:
|
|
```bash
|
|
npx @claude-flow/cli@latest hooks post-task --task-id "TASK_ID" --success true --train-neural true
|
|
npx @claude-flow/cli@latest memory search --query "TASK_TYPE patterns" --namespace patterns
|
|
```
|