Skip to content

Commit 5e2f95a

Browse files
committed
docs(.claude/ATT): Protocol A/B + Cooperative Savant Council + skeleton-fill
Folds in the strategic orchestration loop: - Two-Protocol Operating Modes (§14 of autoattended-orchestrator-spec.md) Protocol B = design loop on N docs jointly; Protocol A = implementation loop with skeleton-first preflight. - Commented-out Rust skeleton as PP-16's Protocol-A deliverable (§14.4) Canonical token: todo!("SOURCE: <path>:<lines>") per language. Validation: WAVE-018 skeleton-compiles / WAVE-019 source-annotated / WAVE-020 no-runtime / WAVE-021 protocol-declared / WAVE-022 coherence. - Cooperative Savant Council (§15) — NOT independent-parallel + super- verdict aggregation, but a shared scratchpad where savants iterate, cross-refer, and withdraw duplicates over R rounds (default max 3). Super-verdict CONVERGE / SPLIT / BLOCK at chairman synthesis. Validation: WAVE-023..WAVE-029. - Savant Mindsets (§4.0) — savants are mindsets, not verdict-producers. PP-13 = implementation principal; PP-14 = creative-design / R&D; PP-15 = DTO/interface architect; PP-16 = principal system architect. - Skeleton-Fill Contract (§13 of anti-skim-agent-spec.md) — what workers do when PP-16 hands them a skeleton: source-range read, SHA-pin verify, signature preserved, no new todo!(), SAFETY comments preserved. - Universal wire format (§1.3 of agent-coordination-mcp-spec.md) — tee -a [bug/proposal] markdown blob IS the MCP A2A wire format AND the log format. Three uses, one write. - Tables-over-prose discipline (§1.4 of agent-coordination-mcp-spec.md). - Cooperative-Savant Scratchpad Bus (§13 of agent-coordination-mcp-spec.md) with directory convention .claude/board/savant-council-<topic>/ and per-savant per-round file schema. Native MCP endpoint sketch: post_council_finding / read_council_round / subscribe_council_round. Additive only.
1 parent c22b92d commit 5e2f95a

3 files changed

Lines changed: 684 additions & 0 deletions

File tree

.claude/ATT/agent-coordination-mcp-spec.md

Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,62 @@ Both modes implement the same three-layer model (§3) with the same
3636
schemas (§6). The native server is a thin serde layer over the
3737
workaround's wire format.
3838

39+
### §1.3 The universal wire format: `tee -a [bug/proposal]`
40+
41+
The same markdown blob serves **three purposes simultaneously**:
42+
43+
| Purpose | Reader | Mutability |
44+
|---|---|---|
45+
| **MCP orchestration message** | the orchestrator (and any subscribed session via `subscribe_pr_activity`) | append-only |
46+
| **A2A wire format** | sibling agents (worker → worker, worker → meta, savant → savant) | append-only |
47+
| **Log format (audit + replay)** | any future session reading git history | immutable once committed |
48+
49+
One write, three uses. This is by design: it means the same code
50+
that posts an entry to the file-blackboard (Layer 1) ALSO emits the
51+
log line ALSO becomes a cross-session-readable orchestration message
52+
the moment it lands on a coordination PR's branch.
53+
54+
The blob's shape is **always a typed envelope + a body**:
55+
56+
```
57+
## YYYY-MM-DDTHH:MM — KIND[severity]: one-line headline (author, branch)
58+
59+
**Author:** <agent-id | session-id>
60+
**Kind:** BUG | PROPOSAL | HANDOVER | FINDING | DECISION | RFC | STATUS
61+
**Severity:** P0 | P1 | INFO (optional; defaults to INFO)
62+
**Refs:** <commit-sha> | <PR-#> | <handover-id>
63+
**Proof-of-read:**
64+
- file=<path> sha256=<...> lines=<N> depth=<D>
65+
- file=<path> sha256=<...> lines=<N> depth=<D>
66+
67+
---
68+
69+
<body — free-form markdown, but `## ` sub-headings preferred over prose>
70+
```
71+
72+
The `tee -a` envelope is the wire; the body is the payload. Routers
73+
(orchestrator, meta-agent, MCP server) dispatch by `Kind` and
74+
`Severity`; readers grep by `Author` + `Refs`; auditors replay by
75+
the immutable git-log order.
76+
77+
### §1.4 Tables over prose (NLSpec discipline)
78+
79+
Implementations SHOULD prefer tabular content over prose for every
80+
catalog (anti-patterns, validation rules, verdict vocabularies,
81+
configuration defaults, parity matrices). Rationale:
82+
83+
| Property | Table | Prose |
84+
|---|---|---|
85+
| Machine-parseable | yes | no |
86+
| Forces consistency (all rows have the same columns) | yes | no |
87+
| Compressible (each row is a fact) | yes | no |
88+
| Diffs cleanly in PRs | yes | partial |
89+
| Resists hedging language | yes (cell width caps qualifiers) | no |
90+
| Suitable for English narrative | no | yes |
91+
92+
Use prose for: section overviews, rationale paragraphs, conflict
93+
explanations. Use tables for: everything else.
94+
3995
### §1.3 What this spec is NOT
4096

4197
- Not a workflow engine. Wave / sprint structure is in
@@ -542,4 +598,146 @@ If the task is...
542598

543599
---
544600

601+
## §13 Cooperative-Savant Scratchpad Bus
602+
603+
> Added 2026-05-18. The transport layer for the Cooperative Savant
604+
> Council defined in `autoattended-orchestrator-spec.md` §15.
605+
606+
### §13.1 What the scratchpad bus is
607+
608+
A purpose-shaped extension of the Layer-1 File Blackboard (§3.2)
609+
used specifically for the savant council's iterative cooperation.
610+
Same wire format (`tee -a` markdown), same append-only governance
611+
(§7), one new directory convention:
612+
613+
```
614+
.claude/board/savant-council-<topic>/
615+
├── ROUND-0-ARTIFACT.md snapshot of artifact under review
616+
├── ROUND-<N>-<savant>.md one file per (round, savant)
617+
└── COUNCIL-VERDICT.md chairman's synthesis after CONVERGE
618+
```
619+
620+
Topic naming: `savant-council-<sprint-id>` (e.g.
621+
`savant-council-SPRINT-17-attractor-fold-in/`).
622+
623+
### §13.2 Per-savant file schema
624+
625+
```markdown
626+
# ROUND-{N} {savant_id} — {topic}
627+
628+
**Round:** N
629+
**Savant:** PP-13 | PP-14 | PP-15 | PP-16
630+
**Read at round start:** [list of peer files read this round]
631+
**Status:** IN-PROGRESS | ROUND-COMPLETE
632+
633+
## New findings (this round)
634+
635+
### F{round}-{savant}-{N}: {one-line headline}
636+
**Axis:** AP1..AP9 | BAP1..BAP10 | PD1..PD10 | EP1..EP8
637+
**Severity:** P0 | P1
638+
**File:** <path>:<line>
639+
**Detail:** <one paragraph>
640+
**Remediation:** <one paragraph>
641+
642+
## Cross-references to peers' findings
643+
644+
- F{R}-PP-X-N: NOTED — my angle: <one-line>
645+
- F{R}-PP-Y-N: SUPERSEDED-BY my F{R+1}-{self}-M
646+
647+
## Withdrawals (my prior findings I am retracting)
648+
649+
- F{R-1}-{self}-N: WITHDRAWN — covered by PP-X round R from a stronger angle
650+
```
651+
652+
### §13.3 Reading-and-writing protocol
653+
654+
Each savant in each round:
655+
656+
1. **Read** ALL `ROUND-(R-1)-*.md` files (peer findings from previous
657+
round) plus its own `ROUND-(R-1)-<self>.md` if any.
658+
2. **Decide** cross-refs, withdrawals, new findings.
659+
3. **Write** `ROUND-R-<self>.md` in one `tee -a` call (no
660+
partial writes — savants share a directory and partial
661+
writes confuse peers' next round).
662+
4. **Emit** `Status: ROUND-COMPLETE` if no new findings AND no
663+
un-addressed cross-refers from peers.
664+
665+
### §13.4 Chairman synthesis
666+
667+
After CONVERGE (all four savants `ROUND-COMPLETE` in the same
668+
round) the chairman savant (declared in sprint config; default
669+
PP-16 for Protocol A, PP-15 for Protocol B) reads ALL ROUND-*.md
670+
files in lexical order and writes a single `COUNCIL-VERDICT.md`
671+
matching the schema in `autoattended-orchestrator-spec.md` §15.5.
672+
673+
The chairman:
674+
- MUST cite every kept finding with its raised-by + cross-referrals.
675+
- MUST consolidate duplicates that survived the cooperation rounds
676+
(rare — most should withdraw themselves, but races can leave a
677+
pair that needs one merged into the other).
678+
- MUST NOT add findings of its own that did not appear in any
679+
`ROUND-*.md` (the chairman is a synthesizer, not a fifth voice).
680+
- MUST set `super_verdict` per §15.5 rules.
681+
682+
### §13.5 Concurrency contract
683+
684+
Savants may run on separate sessions; the scratchpad bus is the
685+
synchronization point.
686+
687+
- **Round boundary** is implicit: a savant starts round R only after
688+
it has read all four `ROUND-(R-1)-*.md` files (including its own).
689+
- **Last-writer-wins** is acceptable for the per-savant per-round
690+
file since each (savant, round) pair has exactly one writer by
691+
construction. If a savant writes twice in the same round (e.g. a
692+
retry after a tool-call loop), the second write replaces the first.
693+
- **Round skipping** is forbidden: a savant MUST NOT write
694+
`ROUND-(R+2)` until `ROUND-(R+1)` exists for it.
695+
696+
### §13.6 Decision matrix update
697+
698+
Extends §4 with one new row:
699+
700+
| Need | Workaround | Native MCP equivalent | Cost |
701+
|---|---|---|---|
702+
| Cooperative multi-agent review with iterative cross-refer + withdraw | Layer-1 File Blackboard scoped to `savant-council-<topic>/` directory (§13) | `post_council_finding` + `read_council_round` + `subscribe_council_round` | Medium: `tee -a` per round + git commit per round |
703+
704+
### §13.7 Native MCP endpoints (sketch)
705+
706+
```yaml
707+
endpoint: post_council_finding
708+
params:
709+
topic: string # e.g. "SPRINT-17-attractor-fold-in"
710+
round: integer
711+
savant: enum (PP-13 | PP-14 | PP-15 | PP-16)
712+
payload: FindingsFile # matches §13.2 schema
713+
returns:
714+
file_id: string
715+
716+
endpoint: read_council_round
717+
params:
718+
topic: string
719+
round: integer
720+
returns:
721+
findings_by_savant: map[savant -> FindingsFile]
722+
complete_savants: list[savant] # those that emitted ROUND-COMPLETE
723+
724+
endpoint: subscribe_council_round
725+
params:
726+
topic: string
727+
streams:
728+
event_kinds: [ findings_appended, savant_round_complete, council_converged, council_stalled, council_blocked ]
729+
```
730+
731+
### §13.8 Validation rules
732+
733+
| Rule | Description | Severity |
734+
|---|---|---|
735+
| `COORD-001 directory-naming` | Council scratchpad MUST live at `.claude/board/savant-council-<topic>/`. | ERROR |
736+
| `COORD-002 file-naming` | Per-savant files MUST be named `ROUND-<N>-PP-<NN>.md`. | ERROR |
737+
| `COORD-003 append-only` | The scratchpad directory inherits the append-only governance of §7. | ERROR |
738+
| `COORD-004 chairman-no-new-findings` | The chairman's `COUNCIL-VERDICT.md` MUST NOT introduce findings absent from any `ROUND-*.md`. | ERROR |
739+
| `COORD-005 round-monotonic` | Each savant MUST write `ROUND-(R+1)` only after `ROUND-R-<self>.md` exists. | ERROR |
740+
741+
---
742+
545743
*End of `agent-coordination-mcp-spec.md`.*

.claude/ATT/anti-skim-agent-spec.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,4 +440,82 @@ work.
440440

441441
---
442442

443+
## §13 Skeleton-Fill Contract (Protocol A)
444+
445+
> Added 2026-05-18. Applies to workers operating in
446+
> `autoattended-orchestrator-spec.md` Protocol A (implementation),
447+
> where PP-16's preflight has produced a commented-out Rust
448+
> skeleton (per §14.4 of the orchestrator spec).
449+
450+
### §13.1 What the worker receives
451+
452+
Three inputs:
453+
454+
1. The skeleton file(s) at `skeleton_output_path` containing
455+
`todo!("SOURCE: <path>:<lines>")` macros at every body site.
456+
2. The original spec / reference-source files referenced in each
457+
`SOURCE:` annotation.
458+
3. A SHA-256 of both the skeleton AND each referenced source file,
459+
pinned by PP-16 at preflight time.
460+
461+
### §13.2 Worker's obligations
462+
463+
For every `todo!("SOURCE: <path>:<lines>")` the worker fills:
464+
465+
1. **Read the source range** at the declared depth (§3.3); default
466+
for ports is `full`.
467+
2. **Record proof-of-read** for the source file at the declared
468+
line range (§7.1).
469+
3. **Replace `todo!(...)` with the body**, preserving the surrounding
470+
signature exactly. The signature came from PP-16; the worker
471+
does not change it without an Iron-Rule-amending RFC.
472+
4. **Quote the source line range in the commit message body** (per
473+
`autoattended-orchestrator-spec.md` §5.6).
474+
5. **Confirm the skeleton's SHA-256 against the pinned value** at
475+
start of work. If the skeleton has drifted (e.g. a sibling worker
476+
touched it), the worker MUST STOP and file an `EXTERNAL_DEPENDENCY`
477+
blocker in `META/REQUESTS-FROM-AGENTS.md`.
478+
479+
### §13.3 Forbidden in skeleton-fill mode
480+
481+
- Changing a signature provided by the skeleton (RFC required).
482+
- Adding a `todo!()` that did NOT come from the skeleton (would
483+
bypass PP-16's source-annotation discipline).
484+
- Removing a `// SAFETY:` comment from an `unsafe` block (PP-13
485+
will reject; PP-16 wrote it for a reason).
486+
- Filling bodies in a file outside `skeleton_output_path` (§5.1
487+
unique-file write discipline).
488+
489+
### §13.4 Reading depth required
490+
491+
| Source kind | Minimum depth |
492+
|---|---|
493+
| `SOURCE: <reference-source>:<lines>` (the function being ported) | `full` for the named line range |
494+
| `UNSAFE-SOURCE: <reference-source>:<lines>` | `thorough` for the named range AND the function's callers |
495+
| The skeleton file itself | `read` (to confirm the surrounding signature you're filling into) |
496+
| `META/INVARIANTS.md` | `thorough` (per §3.3) |
497+
498+
### §13.5 Validation rules
499+
500+
| Rule | Description | Severity |
501+
|---|---|---|
502+
| `FILL-001 source-range-read` | Every `todo!("SOURCE: P:L-M")` the worker fills MUST appear in the worker's proof-of-read with `file=P, lines covering L-M, depth=full`. | ERROR |
503+
| `FILL-002 skeleton-sha-pin` | Worker MUST verify the skeleton's SHA-256 against the value PP-16 pinned, at start of work. Drift → STOP + `EXTERNAL_DEPENDENCY`. | ERROR |
504+
| `FILL-003 signature-preserved` | Worker MUST NOT change a signature provided by the skeleton without a merged RFC. Diff inspection by PP-15 enforces. | ERROR |
505+
| `FILL-004 unsafe-safety-preserved` | `// SAFETY:` comments on `unsafe` blocks from the skeleton MUST survive into the filled body. PP-13 enforces. | ERROR |
506+
| `FILL-005 no-new-todo` | Worker MUST NOT introduce new `todo!()` calls; every `todo!()` in the filled file MUST trace back to a skeleton entry. | ERROR |
507+
508+
### §13.6 Definition of Done (skeleton-fill)
509+
510+
- [ ] Every `todo!()` in the assigned skeleton file(s) is replaced.
511+
- [ ] No new `todo!()` introduced (FILL-005).
512+
- [ ] Skeleton SHA matched at start; final SHA different (FILL-002).
513+
- [ ] Proof-of-read covers every `SOURCE:` annotation (FILL-001).
514+
- [ ] All signatures preserved (FILL-003).
515+
- [ ] All `// SAFETY:` comments preserved (FILL-004).
516+
- [ ] Tier-1 toolchain green on filled file (§8.1).
517+
- [ ] Status file written per `autoattended-orchestrator-spec.md` §9.1.
518+
519+
---
520+
443521
*End of `anti-skim-agent-spec.md`.*

0 commit comments

Comments
 (0)