Skip to content

docs(spec) Phase 4 Wave 0 — § Scope + ADRs 0019-0024 + guardrails Per-phase gate#95

Merged
jkeeley2073 merged 4 commits into
mainfrom
Dev-Phase4ScopeDraft
May 7, 2026
Merged

docs(spec) Phase 4 Wave 0 — § Scope + ADRs 0019-0024 + guardrails Per-phase gate#95
jkeeley2073 merged 4 commits into
mainfrom
Dev-Phase4ScopeDraft

Conversation

@jkeeley2073
Copy link
Copy Markdown
Contributor

Summary

Wave 0 of the Phase 4 parallel execution plan — pure docs/ADRs/spec, no code. Establishes the foundation for Phase 4 (Event-driven RAG against a curated 7-machine subset) so subsequent code waves have a target to aim at.

The Phase 4 design conversation (2026-05-07) locked the demonstrable artifact as full RAG architecture against a curated 7-machine subset, with full-corpus expansion deferred to Phase 4.5. Customer-quality re-evaluation mid-conversation also folded service bulletins for the curated subset's two Stern machines into Phase 4 (highest-leverage Repair-agent quality fix at minimal cost) and added ADR-0024 (two-stage re-ranking) to lock the cross-encoder path even though implementation defers behind an H3 quality gate.

Four commits:

  • fe4d21d — Phase 4 § Scope draft (25 items mirroring Phase 3 structure) + Phase 4.5 placeholder + 3 deferred-features entries
  • 050f201 — ADRs 0019-0024 (chunking / embedding / index schema / citation extraction / citation-required guardrail / two-stage re-ranking) + bulletin fold-in
  • 3178285 — guardrails.md § Per-phase gate enhancement: README.md + docs/vision.md per-phase-close-review checkbox (lesson from PR docs(spec) post-Phase-3-close audit fix-ups — README honesty pass + observability PinballMap inventory #94 — second time the pattern repeated)
  • 7bcbf97 — /local-review fix-up (2 🔴 + 4 ⚠️ findings addressed)

Test Plan

Doc-only PR — no code, no tests added or modified.

  • Numbered scope items render sequentially 1-25 (markdownlint MD029 clean)
  • All scope-item cross-references in ADRs match post-renumber numbering (verified via grep "scope item" docs/adr/00{19,20,21,22,23,24}-*.md)
  • docs/adr/README.md index includes all 6 new ADRs (0019-0024)
  • Phase 4 § Scope structure mirrors Phase 3's exactly (Status / Sequence position / Demonstrable artifact / Scope / Key decisions / Exit criteria / Dependencies / Non-goals / Parallelism plan / Risks / Open design questions / Operational hand-offs / Retrospective)
  • Each ADR matches the Phase 3 ADR template shape (Status / Date / Context / Decision / Consequences / Alternatives considered / References)
  • Build + test still green (no source changes — Phase 3 close baseline of 687 tests stands)
  • Identity check: git log -1 --format='%an <%ae>' shows personal noreply

Out of Scope

Wave 0 is doc-only by design. Implementation work begins in Wave 1 (Phase 4 § Scope items 7-14, sequenced per the parallelism plan). Specifically out of scope for this PR:

  • The optional W0-3-style further enhancements to guardrails.md (only the README/vision-claim-review item was promoted; other proposed enhancements stay deferred)
  • Any code, tests, infra changes, or data/phase4/curated-subset.v1.json slate manifest (that lands in Wave 2 PR W2-4 per the plan)
  • Cohere Rerank cross-encoder implementation (deferred behind ADR-0024's H3 quality gate)

Checklist

  • CI is green (build + test + coverage + CodeQL + sanitization) — verified pre-push; will re-confirm in PR checks
  • PR title follows the Conventional Commits format above
  • If this is a new architectural decision, an ADR has been added under docs/adr/ — six new ADRs (0019-0024)
  • If user-visible behavior changes, README.md and/or docs/ are updated in the same PR — docs/build-spec.md, docs/guardrails.md, docs/adr/* updated; README/vision unchanged because no user-visible behavior shipped in this Wave 0 PR
  • No memory in ~/.claude/projects/c--projects-PinballWizard/memory/ is now stale (the parallel-execution-plan and design-kickoff handoff are honored, not contradicted)
  • No TODO / FIXME / commented-out code committed
  • No new entries in <NoWarn> without a comment explaining why and the removal criterion — N/A (no code)

Pre-push self-audit

Step 0 — /local-review (qualitative)

  • Ran /local-review and addressed every 🔴 finding before push
  • Local review outcome: 2 🔴 (both fixed: cross-reference sync + missing README index entry) / 4 ⚠️ (all 4 fixed: ADR-0024 alternatives section drift, dead-config flag clarification, ADR-0023 tool-error telemetry distinction, build-spec hand-off framing) / 4 categories ✅ + 4 N/A (HTTP/security/performance/configuration not applicable to doc-only)

Step 1 — Mechanical checklist

  • Every new *Options property has at least one real getter call in src/ — N/A (no code)
  • Sibling-diffed against the closest existing implementation — Phase 3 ADRs 0014-0018 used as the template reference; ADR-0024's "Alternatives evaluated for the locked path" subsection drift caught and folded
  • No bare catch { } — N/A (no code)
  • New ISourceScraper? — N/A (no scrapers)
  • Tests assert behavior, not just structure — N/A (no tests)
  • Build is zero-warning — N/A (no .cs); markdownlint MD004 noise is pre-existing (Phase 3 ADRs use the same dash style)
  • git log -1 --format='%an <%ae>' shows personal noreply, not work email — confirmed 94459922+jkeeley2073@users.noreply.github.com

Phase 4 design conversation locked the demonstrable artifact:
full RAG architecture against a curated 7-machine subset, with
full-corpus expansion deferred to Phase 4.5. Drafts § Phase 4
to mirror Phase 3's structure (24 scope items, 6 waves, 3
operational hand-offs), adds Phase 4.5 placeholder, and records
three new deferred-features entries (full corpus, service
bulletins, OCR fallback) that point at Phase 4.5 as the revisit
trigger.

Wave 0 PR W0-1 of the Phase 4 parallel plan; unblocks W0-2
(ADRs 0019-0023 batch).
W0-2 Wave 0 PR. Drafts six new ADRs (hybrid chunking, embedding
model, AI Search index schema, tool-call-trace citation extraction,
citation-required guardrail, two-stage re-ranking) and updates
Phase 4 § Scope to absorb the customer-quality re-evaluation:

- Service bulletins fold into Phase 4 for the curated subset's
  two Stern machines (Repair quality at launch); index schema
  (ADR-0021) supports document_type enum from v1; Change Feed
  Function trigger (item 18) extends to manual + service_bulletin.
- ADR-0024 locks the Cohere Rerank cross-encoder path;
  implementation gates on H3 quality data (citation_precision
  < 0.65 AND ≥30% retrieval-side refusals) — decision recorded
  in repo even if code defers.
- § Scope renumbered 1-25; references throughout (Key decisions,
  Exit criteria, Parallelism plan, Risks, Open design questions,
  Deferred features) updated to match.

Wave 0 PR W0-2; closes Wave 0 except for the optional W0-3
(guardrails.md § Per-phase gate enhancement).
W0-3 Wave 0 PR. Adds an explicit README.md + docs/vision.md
per-phase-close-review checkbox to the § Per-phase gate.

Reason: post-Phase-3-close audit (PR #94) caught README/vision
overclaims that PR-time review missed — and this is the second
time the pattern repeated (Phase 1 close had a similar gap).
The per-phase gate now enforces what per-PR review can't:
checking customer-facing claim accuracy against the phase's
actual deliverables before declaring exit.

Closes Wave 0 of the Phase 4 parallel execution plan; unblocks
Wave 1 (A-track inherited follow-ups + B-track foundations).
Pre-push /local-review surfaced 2 🔴 + 4 ⚠️ findings; all addressed:

🔴 Cross-reference sync after § Scope renumbering:
  - ADR-0019 References: items 1, 14 → 1, 15
  - ADR-0020 References: items 2, 15 → 2, 15, 16
  - ADR-0021 References: items 3, 14, 15 → 3, 16, 18, 20
  - ADR-0022 body + References: items 9, 20 → 10, 21
  - ADR-0023 body + References: items 22, 23 → 23, 24
  - ADR-0024 body + References: item 23 → 24

🔴 ADR-0024 missing from docs/adr/README.md index — added.

⚠️ ADR-0024: "Alternatives evaluated for the locked path"
   subsection folded into the main "Alternatives considered"
   section with two named sub-groups (Phase 4 stance / impl
   choice). Aligns with Phase 3 ADR template.

⚠️ ADR-0024: clarified Rag:CrossEncoder:Enabled flag is part
   of deferred implementation surface, not Phase 4 v1 dead
   config (preempts dead-config-grep tripwire at impl time).

⚠️ ADR-0023: added pinwiz.ai.tool_errors_total mitigation
   for the "tool-error vs agent-didn't-call-tool" telemetry
   indistinguishability; build-spec scope item 25 extended to
   define the instrument.

⚠️ Build-spec: hand-off H1 framing fixed from "After Wave 1"
   to "Mid-Wave 1 (after PR W1-4)" — matches dependency core.

Closes Wave 0 PR fix-up loop; ready for push.
@jkeeley2073 jkeeley2073 added the claude-code Generated with Claude Code label May 7, 2026
@jkeeley2073 jkeeley2073 merged commit c83a266 into main May 7, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude-code Generated with Claude Code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant