|
| 1 | +# `.claude/ATT/` — Attractor-style NLSpecs of our kit |
| 2 | + |
| 3 | +> **Status:** DRAFT · **Version:** 0.1.0 · **Last updated:** 2026-05-17 |
| 4 | +> |
| 5 | +> **What this is.** Our `.claude/EN/` kit's ideas, restated in the |
| 6 | +> [strongdm/attractor](https://github.com/strongdm/attractor) NLSpec |
| 7 | +> format so a coding agent can implement them directly. |
| 8 | +> [NLSpec](https://github.com/strongdm/attractor#terminology) = |
| 9 | +> "human-readable spec intended to be directly usable by coding agents |
| 10 | +> to implement/validate behavior." |
| 11 | +> |
| 12 | +> **What this is NOT.** A replacement for `.claude/EN/`. The two are |
| 13 | +> complementary: `.claude/EN/` is the operator's cheat-sheet |
| 14 | +> (prose, in-session use); `.claude/ATT/` is the engineering spec |
| 15 | +> (NLSpec, build-time use). |
| 16 | +
|
| 17 | +## The three specs |
| 18 | + |
| 19 | +| File | Mirrors attractor's | Adds our innovation | |
| 20 | +|---|---|---| |
| 21 | +| [`autoattended-orchestrator-spec.md`](./autoattended-orchestrator-spec.md) | [`attractor-spec.md`](https://github.com/strongdm/attractor/blob/main/attractor-spec.md) (DOT-graph pipeline runner) | Wave-based 12-worker fan-out; 4-savant verdict gates (PP-13/14/15/16); 6 worker iron rules; sprint-token budget (~300k/wave); multi-file board pattern with single-mutable-file invariant | |
| 22 | +| [`anti-skim-agent-spec.md`](./anti-skim-agent-spec.md) | [`coding-agent-loop-spec.md`](https://github.com/strongdm/attractor/blob/main/coding-agent-loop-spec.md) (the per-LLM-call agent library) | Reading-Depth-Ladder (grep→read→thorough→fan-out); Lie-Detector LD-1..5 (sentinel token / proof-of-read SHA / 3-section challenge / negative-knowledge test / line-range quote); typed stuck-protocol blockers (AMBIGUITY / MISSING_INVARIANT / SPEC_SOURCE_MISMATCH / BEHAVIOUR_QUESTION / EXTERNAL_DEPENDENCY) | |
| 23 | +| [`agent-coordination-mcp-spec.md`](./agent-coordination-mcp-spec.md) | [`unified-llm-spec.md`](https://github.com/strongdm/attractor/blob/main/unified-llm-spec.md) (provider-agnostic LLM SDK) | Three coordination layers (role-teleport / file-blackboard / branch-pub-sub) the way a native A2A MCP server should expose them; structured handover schema; decision matrix for when each layer fits | |
| 24 | + |
| 25 | +## What we adopted from attractor (the five wins) |
| 26 | + |
| 27 | +These are concrete things attractor's specs nail down that our prose |
| 28 | +docs in `.claude/EN/` didn't have, now incorporated: |
| 29 | + |
| 30 | +| # | Attractor concept | Lands in our NLSpec | Adoption | |
| 31 | +|---|---|---|---| |
| 32 | +| 1 | Typed `status.json` schema + 5-value `StageStatus` enum (attractor Appendix C: `{outcome, preferred_label, suggested_next_ids, context_updates, notes}`) | [`autoattended-orchestrator-spec.md` §9](./autoattended-orchestrator-spec.md#9-status-file-schema) | Adopted **with `auto_status=false` mandatory** (see "Where it conflicts" below). | |
| 33 | +| 2 | DOT graph DSL for the workflow + lint rules (attractor §2 grammar + §7 validation: `reachability`, `start_no_incoming`, `goal_gate_has_retry`, `condition_syntax`) | [`autoattended-orchestrator-spec.md` §6](./autoattended-orchestrator-spec.md#6-sprint-plan-format) (DOT + YAML mirror) + [§7](./autoattended-orchestrator-spec.md#7-validation-rules) (WAVE-001..WAVE-017 with ERROR/WARNING severity) | Adopted with three wave-specific additions: `unique-write`, `declared-shared`, `auto-status-false`. | |
| 34 | +| 3 | Context Fidelity ladder (attractor §5.4: `full` / `truncate` / `compact` / `summary:low/medium/high` with token budgets + edge > node > graph > default precedence) | [`autoattended-orchestrator-spec.md` §11](./autoattended-orchestrator-spec.md#11-context-fidelity) | Adopted with one tightening: `fidelity=truncate` does NOT exempt a worker from the §3.3 Reading-Depth-Ladder of `anti-skim-agent-spec.md`. | |
| 35 | +| 4 | In-loop tool-call loop detection (attractor coding-agent §2.10: last 10 calls scanned for length-1/2/3 repeating patterns → inject steering warning) | [`anti-skim-agent-spec.md` §6](./anti-skim-agent-spec.md#6-tool-call-loop-detection) + AP9 in [§9](./anti-skim-agent-spec.md#9-anti-pattern-catalog-ap1ap9) | Adopted verbatim; elevated to a system-level invariant. PP-13's post-hoc AP9 catches what the in-loop detector misses. | |
| 36 | +| 5 | Definition-of-Done checklists + Cross-Provider Parity Matrix per spec (attractor §10-style conformance tables) | Each NLSpec ends with `§ Definition of Done` + `§ Cross-{Language,Provider} Parity Matrix` | Adopted as the structural template. The 26-repo rollout is now machine-checkable. | |
| 37 | + |
| 38 | +## Why this format |
| 39 | + |
| 40 | +Three properties we get from attractor's NLSpec format that our prose |
| 41 | +docs in `.claude/EN/` don't have: |
| 42 | + |
| 43 | +1. **Definition of Done checklists** at the end of each spec — gives |
| 44 | + us a conformance test for "is this implementation complete?" |
| 45 | +2. **Cross-Provider Parity Matrix** tables — gives us a per-language / |
| 46 | + per-runtime mapping so the same NLSpec can land in Rust, Python, |
| 47 | + TypeScript, Go without three-way drift. |
| 48 | +3. **Validation rules with ERROR/WARNING/INFO severity** — turns |
| 49 | + linting into a deterministic process, not a judgment call. |
| 50 | + |
| 51 | +## Where it conflicts with attractor's posture (and why we keep our position) |
| 52 | + |
| 53 | +| Attractor's default | Our position | Why | |
| 54 | +|---|---|---| |
| 55 | +| `auto_status=true` (§4.5 + Appendix C: "if the handler writes no status, auto-generate SUCCESS") | `auto_status=false` is mandatory | This is exactly the silent-skim failure mode our Lie-Detector LD-1..5 exists to prevent. Missing status = FAIL, not SUCCESS. | |
| 56 | +| Single-threaded graph traversal (§3.8: "Only one node executes at a time") | Wave fan-out is the baseline, not a special-case `parallel` node | Our token budget is per-wave (~300k for 12 workers), not per-node. Modeling waves as one giant `parallel` node is syntactically awkward. | |
| 57 | +| Engine-level retries with exponential backoff (§3.5-3.6) | Stuck-agents file typed blockers in REQUESTS-FROM-AGENTS.md; meta-agent decides | Retries should be contextual and inspected, not silent and uniform. | |
| 58 | +| `wait.human` default; LLM gates are test fixtures (§6.4: `AutoApproveInterviewer` "Used for automated testing") | LLM meta-agent is the production gate | Our meta-agent's plan review + P0/P1 PR review + inbox drain is a production role, not a test fixture. | |
| 59 | +| Subagent depth = 1 default (coding-agent §7.3) | Wave fan-out routinely runs 12 workers from one orchestrator | We override depth to ≥2 — workers should be able to spawn sub-investigations. | |
| 60 | + |
| 61 | +## Conformance |
| 62 | + |
| 63 | +A repo that imports these NLSpecs is conformant if it satisfies the |
| 64 | +"Definition of Done" checklist at the end of each spec. The lance-graph |
| 65 | +implementation (see [`AdaWorldAPI/lance-graph` `.claude/agents/`](https://github.com/AdaWorldAPI/lance-graph/tree/main/.claude/agents)) |
| 66 | +is the most-mature reference; the WoA + woa-rs implementations are |
| 67 | +the wave-based reference. |
| 68 | + |
| 69 | +## Provenance |
| 70 | + |
| 71 | +- Source kit: `.claude/EN/` in this repo (see [`.claude/EN/README.md`](../EN/README.md)) |
| 72 | +- Format inspiration: [strongdm/attractor](https://github.com/strongdm/attractor) (MIT-style NLSpecs) |
| 73 | +- Distillation handover: [`META/HANDOVER-AGENTKIT-CONSOLIDATION-2026-05-17.md`](https://github.com/AdaWorldAPI/WoA/blob/main/META%2FHANDOVER-AGENTKIT-CONSOLIDATION-2026-05-17.md) (in `AdaWorldAPI/WoA`) |
| 74 | +- Sister handover (Rust hardening pass): [`META/HANDOVER-WOA-RS-AGENT-HARDENING-2026-05-17.md`](https://github.com/AdaWorldAPI/WoA/blob/main/META%2FHANDOVER-WOA-RS-AGENT-HARDENING-2026-05-17.md) |
| 75 | + |
| 76 | +## Build |
| 77 | + |
| 78 | +To turn these NLSpecs into a runnable implementation, supply this |
| 79 | +prompt to a modern coding agent (Claude Code, Codex, OpenCode, Amp, |
| 80 | +Cursor, ...): |
| 81 | + |
| 82 | +``` |
| 83 | +codeagent> Implement the Autoattended Orchestrator + Anti-Skim Agent |
| 84 | + + Agent Coordination MCP as described by |
| 85 | + https://github.com/AdaWorldAPI/<repo>/tree/main/.claude/ATT |
| 86 | + together with strongdm/attractor as the substrate. |
| 87 | +``` |
0 commit comments