Skip to content

Commit b6963b5

Browse files
authored
Merge pull request #360 from AdaWorldAPI/claude/tier-1-implementation-specs
docs(specs): sprint-3 Tier-1 implementation specs (11 PR-X-1 + sequencing + smoke test + consumer template)
2 parents 4f7082a + b07858a commit b6963b5

27 files changed

Lines changed: 4798 additions & 0 deletions
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Sprint Log 3 — Tier-1 Implementation Specs (12 + meta)
2+
3+
> **Branch:** `claude/tier-1-implementation-specs`
4+
> **Off-main commit:** 4f7082a398ed
5+
> **Pattern:** CCA2A — append-only per-agent logs at `agents/agent-W{N}.md`; meta review at `meta-1-review.md`; sprint summary at `sprint-summary.md`.
6+
> **Protocol upgrades over sprint-2:**
7+
> - **pygithub direct REST with quote-stripped GITHUB_TOKEN** (avoid MCP throttling)
8+
> - Pre-verify branch + repo before write
9+
> - Pre-written SPRINT_LOG (this file) so agents see coordination state from turn 0
10+
> - Each agent prompt includes the canonical pattern letter table inline
11+
12+
## Sprint manifest
13+
14+
**Goal:** convert the 11 TD entries (TD-OGIT-G-SLOT-1 through TD-DEEPNSM-NSM-COLLAPSE-11 from `.claude/board/TECH_DEBT.md`) into PR-ready implementation specs. After this sprint, an engineer can pick any spec and start coding.
15+
16+
**Branch state pre-sprint:** `main` HEAD `4f7082a398ed` includes PR #358 (sprint-2 architecture synthesis) + PR #359 (tier-0 canonical pattern letter fix).
17+
18+
## Worker roster
19+
20+
| Agent | Deliverable | Output path | Target size |
21+
|---|---|---|---|
22+
| W1 | Sprint-3 master execution plan | `.claude/specs/sprint-3-execution-plan.md` | ~15 KB |
23+
| W2 | PR-A-1 spec: SPO-G u32 slot (TD-OGIT-G-SLOT-1) | `.claude/specs/pr-a-1-spo-g-u32-slot.md` | ~10 KB |
24+
| W3 | PR-B-1 spec: ContextBundle typed surface (TD-CONTEXT-BUNDLE-2) | `.claude/specs/pr-b-1-context-bundle.md` | ~10 KB |
25+
| W4 | PR-C-1 spec: GenericBridge + ConsumerPointer (TD-GENERIC-BRIDGE-3) | `.claude/specs/pr-c-1-generic-bridge.md` | ~10 KB |
26+
| W5 | PR-E-1 spec: /modules/<name>/manifest.yaml (TD-MANIFEST-MODULES-4) | `.claude/specs/pr-e-1-manifest-modules.md` | ~12 KB |
27+
| W6 | PR-F-1 spec: ractor supervisor port (TD-RACTOR-SUPERVISOR-5) | `.claude/specs/pr-f-1-ractor-supervisor.md` | ~12 KB |
28+
| W7 | PR-J-1 spec: INT4-32D thinking atoms (TD-INT4-32D-ATOMS-6) | `.claude/specs/pr-j-1-int4-32d-atoms.md` | ~8 KB |
29+
| W8 | Consumer crate template: hubspo-rs scaffolding guide | `.claude/specs/consumer-crate-template.md` | ~10 KB |
30+
| W9 | PR-D-1 spec: FMA OWL hydrator (PR-ANATOMY-1) | `.claude/specs/pr-d-1-fma-owl-hydrator.md` | ~10 KB |
31+
| W10 | Sprint-3 PR sequencing + dependency graph | `.claude/specs/sprint-3-pr-graph.md` | ~6 KB |
32+
| W11 | End-to-end OGIT-G smoke test design | `.claude/specs/ogit-g-smoke-test.md` | ~8 KB |
33+
| W12 | Trivia bundle: TD-9 + TD-10 + TD-11 quick PRs | `.claude/specs/trivia-prs-bundle.md` | ~6 KB |
34+
| M1 | Meta review (main thread) | `.claude/board/sprint-log-3/meta-1-review.md` | ~6 KB |
35+
36+
## Coordination notes
37+
38+
- **Each agent owns distinct file paths** — no merge conflicts expected
39+
- **pygithub-first** for all writes (avoid MCP throttling); each agent strips token quotes
40+
- **Append-only** for per-agent logs at `.claude/board/sprint-log-3/agents/agent-W{N}.md`
41+
- **Canonical pattern letters** from W1 master (sprint-2): A SPO-G u32 / B ContextBundle / C GenericBridge / D Meta-Structure Hydration / E Compile-Time Consumer Binding / F ractor Supervisor / G Best-Practice Thinking / H Switchable Cognitive Vessel (SHIPPED) / I Implicit Cognition (SHIPPED) / J INT4-32D Atoms / K Circular Compilation / L SPO-Chain Narrative / M Wave-Particle Bimodal / N Fingerprint-as-Codebook (SHIPPED) / O Phenomenological Memory (SHIPPED)
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Agent W1 — Sprint-3 Log
2+
3+
## Role
4+
Worker Agent W1 of Sprint-3 (12 workers + meta CCA2A). Owner of the master execution plan that stitches the other 11 worker spec deliverables into one navigable document.
5+
6+
## Branch
7+
`claude/tier-1-implementation-specs` (off-main `4f7082a3`).
8+
9+
## Action summary
10+
1. Read the W1 task brief (master sprint-3 execution plan, ~15 KB target).
11+
2. Confirmed branch `claude/tier-1-implementation-specs` exists at HEAD `1a587481b93ec24824cd2a539368802f619f49cb` via pygithub.
12+
3. Probed both target paths via `repo.get_contents` — both files were pre-existing stubs, so used `update_file` (not `create_file`).
13+
4. Wrote `.claude/specs/sprint-3-execution-plan.md` with: 4-week execution path, 11-row PR-by-PR table, 15-pattern status grid (post-PR #359 canonical), 4 risk callouts, acceptance checklist, cross-reference index.
14+
5. Forward-cited all 11 sister deliverables (W2-W12 specs) so the doc reads as a finished index even before sisters land.
15+
6. Wrote this log via the same pygithub flow.
16+
17+
## File metadata
18+
19+
| File | Path | Size (bytes) | Commit SHA |
20+
|---|---|---|---|
21+
| Master plan | `.claude/specs/sprint-3-execution-plan.md` | 6227 | `b1c1918270d3b7bb154e4c9a522dc60351e1c936` |
22+
| Agent log | `.claude/board/sprint-log-3/agents/agent-W1.md` | (this file) | (see post-push) |
23+
24+
## Brutally-honest self-review
25+
26+
### What this deliverable does well
27+
- **Forward-citation discipline.** Every PR-spec name (`pr-a-1-spo-g-u32-slot.md`, etc.) follows a consistent slug convention so that when W2-W12 land, their filenames slot in cleanly without rename churn.
28+
- **Pattern grid is post-PR #359 correct.** Used the canonical W1 master assignment (A=SPO-G slot, B=ContextBundle, C=GenericBridge, ...), not the older draft labels. H/I/N/O correctly marked SHIPPED so engineers do not waste cycles re-spec'ing them.
29+
- **Dependency column is honest.** PR-B-1 is flagged as the foundation bottleneck explicitly in the risk section, not buried in the table.
30+
- **Acceptance criteria are checkbox-shaped**, so meta CCA2A can mechanically verify sprint closure.
31+
32+
### What is weak / honest gaps
33+
- **Effort estimates (LOC) are inherited from sprint-2 TD entries**, not re-validated. If W2-W6 produce specs with materially different LOC, the table here will lie. Mitigation: meta should reconcile after all 12 worker specs land.
34+
- **No actual sequencing graph drawn.** I deferred the topological graph to W10's spec rather than duplicating it here. Acceptable separation of concerns but means this master doc is incomplete-by-design until W10 lands.
35+
- **Risk #4 (consumer dry-run regression threshold)** is asserted (~30 LOC vs ~300 LOC) without a citation back to the architecture doc that establishes the target. An engineer reading this cold will not know where ~30 LOC came from.
36+
- **No migration / rollback section.** If PR-B-1 lands and the ContextBundle shape turns out wrong, there is no documented unwind path. Sprint-3 is specs-only so this is arguably out of scope, but a real engineer plan would include it.
37+
- **Trivia PRs share one spec doc** (`trivia-prs-bundle.md`). If any of the three turns out non-trivial in W12's hands, this bundling will need to split, invalidating the table.
38+
- **Pattern G/L/K deferrals** are stated without a target sprint (sprint-4? sprint-5?). Deferring without a deadline is how patterns rot.
39+
40+
### Honest grade
41+
B+. Doc is structurally sound and forward-compatible with sister deliverables, but inherits unverified effort estimates and lacks a rollback path. Ship it; flag for meta-pass reconciliation after W2-W12 land.
42+
43+
## Protocol notes
44+
- Used pygithub `update_file` for both writes (files pre-existed as stubs). No MCP, no local FS — clean path.
45+
- One commit per file (2 commits total on this branch from W1).
46+
- No retries needed; pygithub auth + branch ref worked first try.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Agent W10 — Sprint-3 log
2+
3+
**Role:** Worker Agent W10 of Sprint-3 (12 + meta CCA2A).
4+
**Branch:** `claude/tier-1-implementation-specs` of `AdaWorldAPI/lance-graph`.
5+
**Tier:** Sequencing / topology — composes the 11 PR-X-1 specs into a DAG.
6+
**Tech-debt anchor:** none directly; this spec orders the closure of TD-OGIT-G-SLOT-1 and the other TD rows being addressed by sister workers.
7+
8+
---
9+
10+
## Deliverable
11+
12+
`.claude/specs/sprint-3-pr-graph.md` — PR-ready sequencing spec covering critical path, parallel-sprint opportunities, reviewer load matrix, and the canonical ship order. Consumed by the integration lead (which PR to merge next), the engineer picking up a TD-X row (which PRs are precursors), and sprint-4 planning (begins after step 10 of the ship order is green).
13+
14+
## Status
15+
16+
**DONE — spec drafted and pushed to branch.**
17+
18+
Delivery path: pygithub from this sandbox cannot reach `api.github.com` (the workspace's local proxy at `127.0.0.1:44771` only handles git protocol, not the REST API; `GITHUB_TOKEN` returned 401 against api.github.com). Falling back to the MCP github bridge for the actual push, which routes through the same auth chain the rest of the session uses. PyGithub remained the first-choice approach per the W10 brief.
19+
20+
## Decisions logged
21+
22+
1. **PR-B-1 is the unconditional first PR.** Everything else depends on the typed surface (`ContextBundle`, `OntologySlot`, `ConsumerPointer`) or imports the resolver. Attempting PR-A-1 before PR-B-1 would inline slot defs into `lance-graph` and reintroduce the circular dep PR #359 corrected.
23+
2. **PR-D-1 is sequenced after PR-A-1.** PR-D-1 hydrates SPO quads with `g = FMA_ROOT_G`, which only exists once `SpoQuad.g` is a real `u32` field. Parallelizing forces PR-D-1 to mock the slot then rewrite fixtures — wasted work.
24+
3. **Trivia bundle ships in one PR-train.** Each of the three trivia PRs is <50 LOC; per-PR review overhead dominates the actual change. Single review, single CI run.
25+
4. **PR-F-1 is a senior-eng review gate.** I-2 (single-writer) is load-bearing; regressions cost multi-day debug. Junior reviewer + senior approver, not junior alone.
26+
5. **Smoke test (W11) precedes consumer dry-run (W8).** Smoke must be green before dry-run, because the dry-run trusts smoke as the "stack healthy" signal. Reversing order risks scaffolding bugs masking stack-level failures.
27+
28+
## Critical-path summary
29+
30+
`PR-B-1 → PR-A-1 → PR-C-1 → PR-E-1 → PR-F-1 → smoke test` ≈ 11 working days serial; ~6 days if parallelized across two engineers (Engineer A on the critical path; Engineer B on trivia + PR-J-1 + PR-D-1 + dry-run).
31+
32+
## Cross-worker handover
33+
34+
- **W1 (master plan):** `sprint-3-execution-plan.md` — this spec is the DAG view of the week-by-week schedule W1 wrote.
35+
- **W2 (PR-A-1):** scheduled at step 3 of the ship order; depends on PR-B-1 landing first.
36+
- **W3 (PR-B-1):** scheduled at step 1 — the unconditional first PR. Without it, the rest of the sprint stalls.
37+
- **W4 (PR-C-1):** step 4; gates PR-F-1.
38+
- **W5 (PR-E-1):** step 6; gates PR-F-1.
39+
- **W6 (PR-F-1):** step 8; the heaviest review (~400 LOC, I-2 enforcement). Senior-eng gate.
40+
- **W7 (PR-J-1):** step 5; can interleave with PR-C-1 once PR-B-1 lands.
41+
- **W8 (consumer dry-run):** step 10; final validation.
42+
- **W9 (PR-D-1):** step 7; FMA TTL download work should start day 1 in parallel.
43+
- **W11 (smoke test):** step 9; gates step 10.
44+
- **W12 (trivia bundle):** step 2; the only PR set that can ship without PR-B-1.
45+
46+
## Files written this session
47+
48+
- `.claude/specs/sprint-3-pr-graph.md` (spec, ~6 KB)
49+
- `.claude/board/sprint-log-3/agents/agent-W10.md` (this log)
50+
51+
## Next handover
52+
53+
Integration lead reads the spec and picks the merge order. Engineers pick up the PR-X-1 specs in the order this DAG specifies. Sprint-4 planning waits for step 10 of the ship order to land green.
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# Agent W11 — Sprint-3 log
2+
3+
**Role:** Worker Agent W11 of Sprint-3 (12 + meta CCA2A).
4+
**Branch:** `claude/tier-1-implementation-specs` of `AdaWorldAPI/lance-graph`.
5+
**Tier:** Sprint-3 validation track.
6+
**Deliverable anchor:** end-to-end OGIT-G smoke test design (covers
7+
Patterns A + B + C + E + F end-to-end).
8+
9+
---
10+
11+
## Deliverable
12+
13+
`.claude/specs/ogit-g-smoke-test.md` — design spec for the integration
14+
test that proves the Tier-1 + Tier-2 architecture works as a single
15+
loop. Engineer picks this up *after* PR-A-1, PR-B-1, PR-C-1, PR-E-1,
16+
PR-F-1 are all merged.
17+
18+
## Status
19+
20+
**DONE — spec drafted and pushed to branch via pygithub.**
21+
22+
## Decisions logged
23+
24+
1. **Healthcare picked as the smoke vertical, not Anatomy.** Healthcare
25+
has one consumer + one inheritance edge (Healthcare -> DOLCE), which
26+
keeps the surface area small. FMA + DICOM (the Anatomy demo) is
27+
richer but pulls in PR-D-1 + PR-ANATOMY-*; those have their own
28+
integration tests. Smoke stays tight.
29+
2. **One primary test + four sub-tests, not one mega-test.** Primary
30+
covers happy-path five-pattern fan-out; sub-tests isolate failure
31+
modes (inert G error, cross-G isolation, actor panic + restart,
32+
compile-time duplicate-G error). Each sub-test <50 LOC so failure
33+
diagnosis is fast.
34+
3. **`trybuild` for the duplicate-G ui-test.** Compile-time errors need
35+
a snapshot harness, not a runtime assertion. Sibling `.stderr`
36+
snapshot proves Pattern E's compile-time guarantee.
37+
4. **`LanceAuditSink` in test mode with an in-memory drain.** Don't write
38+
to real Lance datasets in the smoke — a separate integration test on
39+
the lance-graph crate covers on-disk semantics. Smoke focuses on
40+
"did the emit shape pop out correctly" not "did the bytes land in
41+
parquet."
42+
5. **Tests gated behind `#[cfg(feature = "ogit-g-smoke")]`.** Keeps the
43+
optional `medcare-rs` compile-in dependency off the default build
44+
matrix. CI's integration job enables the feature.
45+
6. **Failure-mode table at the top of the spec.** One smoke test, five
46+
pattern letters — the table tells engineers which pattern broke
47+
when the assertion fires. Diagnostic value > test count.
48+
7. **Soak budget: 100x in CI gate, 1000x nightly.** "Not flaky" is a
49+
binary claim with a number behind it. Anything failing 1/1000 in
50+
nightly is a P1 bug, not test flakiness — recorded in the open
51+
questions.
52+
53+
## Dependency call-out
54+
55+
W11 is the *last* node in the Sprint-3 PR topological sort (per W10's
56+
graph). It depends on EVERY Tier-1 + Tier-2 spec landing first:
57+
58+
- PR-A-1 (W2): needed for the `g: u32` field on `AuditRecord`.
59+
- PR-B-1 (W3): needed for `OntologyRegistry::resolve(g)`.
60+
- PR-C-1 (W4): needed for `GenericBridge::should_emit(g, action)`.
61+
- PR-E-1 (W5): needed for `OGIT::*` constants from the build script.
62+
- PR-F-1 (W6): needed for `CallcenterSupervisor` + `SupervisorMsg`.
63+
64+
Plus a transient on `medcare-rs` having `compile-in-medcare` — W8's
65+
consumer-template spec covers that as a worked example.
66+
67+
## Cross-worker handover
68+
69+
- **W1 (master plan):** references this smoke as the Week-4 validation
70+
deliverable. Smoke runtime <5 s is the gate.
71+
- **W2, W3, W4, W5, W6 (Tier-1 + Tier-2 specs):** every type / trait
72+
referenced in the test sketch must exist in the sister specs. If any
73+
shape drifts, the smoke compile-fails and the regression is caught
74+
before merge.
75+
- **W8 (consumer template):** the smoke is the validation harness for
76+
W8's "<30 LOC per new consumer" claim — once W8's hubspo-rs dry-run
77+
lands, run this smoke against hubspo too as the proof.
78+
- **W9 (PR-D-1 FMA hydrator):** open question 3 in the spec defers
79+
inert-G choice to whether PR-D-1 has landed. Either inert G works;
80+
FMA is preferred when available.
81+
- **W10 (PR graph):** smoke is the last topological node; W10's graph
82+
shows the fan-in.
83+
84+
## Files written this session
85+
86+
- `.claude/specs/ogit-g-smoke-test.md` (spec, ~11.5 KB)
87+
- `.claude/board/sprint-log-3/agents/agent-W11.md` (this log)
88+
89+
## Next handover
90+
91+
Engineer pickup, but **only after Tier-2 lands**. Until PR-F-1 is
92+
merged, the smoke can't compile (no `CallcenterSupervisor` symbol).
93+
Open questions 1-5 have recommendations; engineer should confirm
94+
choices 1 (test runtime) + 2 (audit sink storage) with the PR-F-1 /
95+
PR-C-1 authors before coding starts.

0 commit comments

Comments
 (0)