INV — Architecture-split readiness assessment
INV — Architecture-split readiness assessment
Section titled “INV — Architecture-split readiness assessment”Audit date: 14/05/2026 (S237 docs-pathway-assess sub-agent)
Scope: Liam-direction docs-only assessment of the pathway to splitting docs/plans/phase-0-investigation/0.9-intended-architecture.md (2015 lines, 10/05/2026, S229-stamped) into the 9 architecture sub-docs architecture/01-vision-mission.md through architecture/09-diagrams.md referenced in 00-synthesis-v2.md §4.
Status: Assessment only — no decisions ratified here. Cites existing ratifications.
§1. Trajectory recap
Section titled “§1. Trajectory recap”Across S233 → S237 the work shifted from “close the Phase 0.9 feedback investigations” (S233) → “build Phase B foundation evidence” (S234) → “ratify the foundation and rewrite the cascading docs” (S235) → “scaffold ontology + close operational items” (S236) → “implement the ontology harness + plan the architecture split” (S237). Three through-lines hold across the four prompts: (a) the 9-sub-doc split was always queued for after Phase 0.9 closes — first deferred by S233 (continuation-prompt-kh-s233-…-tail.md WP4 §“gates on WP1+WP2+WP3”), then explicitly out-of-scope at S235 (continuation-prompt-kh-s235-…-foundation-fixes-and-phase-3.md Critical Rule 5) and S236 (continuation-prompt-kh-s236-…-wp6-ontology-scaffold-and-wp8-decisions.md Critical Rule 5), now finally scheduled as the next-after-foundation block per S237 WP5; (b) 0.9-intended-architecture.md was deliberately not rewritten during S233-S236 despite cascading ratifications touching its §4.3 — instead, mutations were applied as targeted edits with 00-synthesis-v2.md and 0.9-decision-graph.md §11 used as the cross-doc rectification layer; (c) each session added ratification weight without re-opening prior closures — S233 closed feedback investigations, S234 added prereqs + verification, S235 added 17 Q-OQR1 Liam ratifications, S236 closed WP8 N7/N9/audit_log RLS.
Context drift Liam is concerned about (S237 user feedback): the four prompts show low-but-real signal drift. S233’s WP4 list (01-vision-mission.md … 09-diagrams.md) and the architecture/ subdirectory path appear verbatim in every subsequent prompt’s reading list, but none of the prompts updates the WP4 sub-doc gating state in place. The state-of-the-truth ends up scattered across 00-synthesis-v2.md §4 (readiness map), 0.9-decision-graph.md §11.4 (still-open by category), 0.9-collapse-candidates.md §13 (still-open by row), and feedback-findings-review.md §5.4 (still-open scheduling). Each is consistent with the others as of S236 close, but a reader entering S237 from any single doc has an incomplete view. The S237 prompt itself flags this implicitly by routing WP5 to a sub-agent investigation rather than asserting a state.
Each session was optimising for a different thing: S233 for closure of investigation backlog (5 finding docs + 13 decision-graph patches); S235 for directional unblocks (Q-OQR1-01..17 ratifications cascading into 0.9-intended-architecture.md §4.3 + the cocoindex/ontology prereqs); S236 for operational closure (WP8 N7/N9/audit_log RLS + ontology markdown scaffold via multi-agent waves); S237 for handoff to implementation (WP6 D1+E2 implementer + the architecture-split kickoff prep, of which this doc is part). The pattern is “ratify, then write” — and the writing of the split is what S238+ is for.
§2. Why split 0.9-intended-architecture.md?
Section titled “§2. Why split 0.9-intended-architecture.md?”The source doc is 2015 lines, dated 10/05/2026 (S229), and predates every S233-S236 ratification that materially changes its content. Below are 10 concrete facts in the source doc that are now superseded by post-S233 ratifications. (Citations point to the ratifying doc + section; provenance also captured in 00-synthesis-v2.md §3 and 0.9-decision-graph.md §11.)
| # | Source-doc claim (0.9-intended-architecture.md) | Now superseded by | Ratification source |
|---|---|---|---|
| 1 | §4.3 q_a_pairs schema with workspace_id UUID NOT NULL REFERENCES workspaces(id) (S229 framing) | Corpus-level, scope_tag-driven q_a_pairs with no direct workspace FK; nullable source_workspace_id for provenance audit only | Q-OQR1-06 (14/05/2026); 00-synthesis-v2.md §3.6; 0.9-decision-graph.md §11.1 ONT.5; 0.9-collapse-candidates.md §12.2 row 1. Already patched in §4.3 of the source doc but only as a S235 ratified-shape note appended — the wider doc still narrates the prior framing |
| 2 | §6 “Q&A model” framing assumes q_a_pairs sit per-workspace via FK | Corpus-level + scope_tag/anti_scope_tag overlap drives workspace relevance | Q-OQR1-06; 00-synthesis-v2.md §3.6 |
| 3 | §1.2 “workspaces shape” + §10 tooling tables reference bid_workspaces as a satellite Option B | Renamed to procurement_workspaces; application_type='bid' → 'procurement' umbrella; form_type discriminator (bid/rfp/pqq/itt/framework/dps/gcloud) within | Q-OQR1-02 + Q-OQR1-05; 0.9-decision-graph.md §11.1 ONT.4 + §11.3 row 4; 0.9-collapse-candidates.md §12.1 rows 3-5 |
| 4 | §1.2 + §4 + §13.1 treat workspaces.type text column with CHECK as the workspace-type discriminator | workspaces.application_type_id FK to NEW application_types instance table; workspaces.type retires; 6 baseline core-provenance application_types (procurement, intelligence, sales_proposal, product_guide, competitor_research, training_onboarding) | Q-OQR1-01 (Option (c) hybrid) + Q-OQR1-03; 00-synthesis-v2.md §3.4; 0.9-decision-graph.md §11.1 ONT.2 + ONT.3 |
| 5 | §1.2 + §10 + workspaces narratives include kb_section as a workspace type | kb_section retires entirely (added in error; zero prod rows) | Q-OQR1-S235 + WP-ONTO-R1 §7; 00-synthesis-v2.md §3.8; 0.9-collapse-candidates.md §12.1 row 2 |
| 6 | §5 / §10 “binary handling” + source_documents treat the table as the binary-identity carrier with full versioning columns | Option α slim-and-keep + nullable source_documents.workspace_id; retires source_documents.{version, parent_id, original_filename} + source_document_diffs entirely | B2 RESOLVED-DIRECTIONAL-S234 + Q-OQR1-09 (S235); 00-synthesis-v2.md §2.1 B2 row + §3.15; 0.9-collapse-candidates.md §2.1 |
| 7 | §1.2 “Material impact” line: digests → change_reports rename “DO during architecture-impl phase (~3-5d)” + project_id → workspace_id “DEFER to dedicated naming-cleanup PR (~5d HIGH cost)“ | Combined into one pre-launch PR with kb_section retire + procurement rename + form_templates rename + provenance enum retrofit + application_types instance table + source_documents.workspace_id nullable + q_a_pairs corpus-level shape | Q-OQR1-16 (S235 combined-PR ratification); 0.9-decision-graph.md §11.3 (10-item combined-PR scope); 00-synthesis-v2.md §2.3 N3 row. Also: budget/day-count framing (“~3-5d”, “~5d HIGH cost”) is banned terminology per S231+ |
| 8 | §1.2 + §5 + §10 treat templates as the form-template table; S233 was directional toward bid_templates | Three-table form_templates rename: templates → form_templates; template_fields → form_template_fields; template_requirements → form_template_requirements. Plus provenance enum retrofit (96 prod SSQ + Charnwood rows seeded core) | I2 RESOLVED-S234 + Q-OQR1-11 (S235); 00-synthesis-v2.md §2.2 I2 row + §3.7; 0.9-collapse-candidates.md §12.5 |
| 9 | §2 + §5 + §10 entirely omit Cloud Run sidecar architecture for Docling. §5.3 “binaries” section treats binary handling as inside-Vercel | Docling 1.8 GB cannot land in Vercel 250 MB function bundle. Cloud Run sidecar architecture required. KH already runs Cloud Run for Python pipeline (kh-prod-494815 / kh-staging-494815) | S234 Docling bake-off §5; 00-synthesis-v2.md §3.1 + §3.2; 0.9-decision-graph.md §11.2 COCO.2 + COCO.6 |
| 10 | §6.3 “Pattern A/B parser repurpose” framing + §10.1 “Q3.5 / Q3.9 [RATIFY-AT-REVIEW] markers” + §16.4 Q3.5 / Q3.9 / Q1.15 / Q5.10 working-draft markers | Pattern A/B retires post-Phew-migration; ExtractByLlm is the cocoindex recurring runtime adapter; Q3.5 RESOLVED-MIGRATION-HELPER-ONLY; B1 dissolved entirely | B1 RESOLVED-S234 (Prereq 2 Rec 1); 00-synthesis-v2.md §2.1 B1 row; 0.9-collapse-candidates.md §12.3 row 3 |
Additional smaller items (cited together for compactness): §10.1 + §16.1 OQ4 still treat mempalace operational adoption as “ADOPTION-PROVISIONAL” — S232 confirmed install + plugin enablement live, and memory file system phased out per CLAUDE.md “Memory (Mempalace)” section; §9 “MCP tooling expansion” predates the still-open MCP-action review pass (Theme F) per feedback-findings-review.md §5.1; §16.1 OQ8/OQ9 statuses are S228 framings not refreshed against S234-S236 closures; no mention of the May 26/30 Supabase platform deadlines per 00-synthesis-v2.md §3.17/§3.18 (post-source-doc additions); no mention of N7 op_id propagation hybrid pattern (cocoindex per-flow op_id + trigger-driven for platform-wide audit cohesion) or N9 separate-columns scoring — both ratified S236 per 00-synthesis-v2.md §5.1.
Conclusion: the source doc is not “outdated” in a superficial sense; the central frame of its §1.2 + §4 + §5 + §10 + §13 is at variance with the ratified state across 00-synthesis-v2.md §2/§3, 0.9-decision-graph.md §11, and 0.9-collapse-candidates.md §12-§13. A clean split — written from current state, with the source doc as one input among many — is materially less risky than patching the source doc in place.
§3. Doc inventory for the 9-way split
Section titled “§3. Doc inventory for the 9-way split”For each target sub-doc: purpose, source material, readiness state (citing 00-synthesis-v2.md §4 verbatim where possible), and open gates.
| Sub-doc | Purpose | Source material | Readiness state | Open gates |
|---|---|---|---|---|
| 01-vision-mission | AI-consumer-first frame; user model (Claude-via-MCP primary, KH web UI secondary); application-types-as-applications framing | 0.9-intended-architecture.md §2 (Vision) — largely unchanged; docs/client-documentation/Knowledge Hub — Platform Overview.md (Liam S232 cited input); docs/client-documentation/Knowledge Hub — Claude Integration Guide.md; 00-synthesis-v2.md §3.4 (application_types-as-applications) | READY-TO-DRAFT (“None blocking” per 00-synthesis-v2.md §4 row 1) — LANDED S238 as 01-vision.md per pilot ratification (renamed from 01-vision-mission.md); see commit 4b9dccd3 + content-fix commit 6c30640c + 3-tier heritage-doc taxonomy patch (S238 wrap synthesis) | None |
| 02-data-flow | Source-binding model; cocoindex flow stages; binary path; Cloud Run sidecar; audit_log + op_id propagation; auto-RLS event trigger; grants pattern; ingest write paths | 0.9-intended-architecture.md §2.2 + §5 + §13.1; 00-synthesis-v2.md §3.1 (Cloud Run sidecar) + §3.2 (Docling) + §3.3 (pullmd) + §3.16 (auto-RLS) + §3.17 (grants); WP-ONTO-R1 §5 + §5.7 (content_items↔source_documents Layer-5 mapping); 0.9-decision-graph.md §11.1 ONT.7 (source_documents nullable workspace_id) + §11.2 (all 12 COCO rows) + §11.4.1 (N7 op_id) | READY-TO-DRAFT (“B2 RESOLVED-α (with §3.15 nullable workspace_id refinement); I3 RESOLVED-PARTIAL (sidecar UNBLOCKED-CONDITIONAL); B1 RESOLVED (ExtractByLlm); N5 RESOLVED; N6 RESOLVED; N7 RESOLVED-S236 (cocoindex + industry best practice); OQ-CX33-A RESOLVED” per 00-synthesis-v2.md §4 row 2) | None blocking; cross-link target for RLS-PATTERN doc TBD per §3.16 of synthesis-v2 (path “TBD with 04-workspace-types or new RLS-PATTERN.md”) |
| 03-tech-stack | v1 stack composition; Docling + Cloud Run sidecar; pullmd retention; cocoindex; Tiptap+Yjs; mempalace; Anthropic doc skills | 0.9-intended-architecture.md §10; 00-synthesis-v2.md §3.1 + §3.2 + §3.3 + §3.7 (typed columns standard); 0.9-decision-graph.md §11.2 COCO.1-COCO.12; CX.33 RESOLVED-DIRECTION-S233 (finding doc 06); 0.9-collapse-candidates.md §12.4 | READY-TO-DRAFT (“add Docling + Cloud Run sidecar per §3.1 + §3.2” per 00-synthesis-v2.md §4 row 3) | None |
| 04-workspace-types | Shape B retention; application_types instance table; per-application_type satellites; procurement rename; kb_section retirement; q_a_pairs corpus-level + scope_tag pattern; combined-PR scope | 0.9-intended-architecture.md §4 + §4.5 + §5; 00-synthesis-v2.md §3.4 (application_types) + §3.5 (procurement rename) + §3.6 (q_a_pairs corpus-level) + §3.7 (provenance pattern) + §3.8 (kb_section retire) + §3.13 (admin UI v1.1) + §3.14 (workspace-private deferred) + §3.15 (source_documents nullable); 0.9-decision-graph.md §11.1 ONT.2-ONT.10 + §11.3 combined-PR scope (10 items); 0.9-collapse-candidates.md §12.1 + §12.2; WP-ONTO-R1 (full doc); phase-b-prerequisite-1-onthology-pipeline.md §4.2/§4.4/§4.5/§5/§5.7 (S235 rewrite) | READY-TO-DRAFT (“I1 RESOLVED-procurement_workspaces; I2 RESOLVED-3-tables; OQ-Q113-A RESOLVED-per-app_type-satellite; OQ-Q35-C RESOLVED-NO; OQ-Q38-E RESOLVED-6-cols. Plus application_types instance table per §3.4. Big sub-doc — application_types + kb_section retire + procurement rename + q_a_pairs corpus-level all live here” per 00-synthesis-v2.md §4 row 4) | None blocking; biggest sub-doc by scope; downstream consumers depend on this landing first (see §4) |
| 05-qa-flow | Q&A as separate domain; corpus-level q_a_pairs + scope_tag; markdown sidecar v1 pattern; citations polymorphic; question_matches with question_kind discriminator; separate embedding_score + fulltext_score columns | 0.9-intended-architecture.md §4.3 + §6; 00-synthesis-v2.md §2.1 B1 + §2.2 I3 + §2.3 N8/N9/N11 + §3.6 + §5.1 (N9 RESOLVED-S236); WP-ONTO-R1 §4 + §6.2 (form_types instance with applicable_application_types); 0.9-decision-graph.md §11.1 ONT.5/ONT.6/ONT.11/ONT.13 + §11.2 COCO.9/COCO.10 + §11.4.1 (N9); 0.9-collapse-candidates.md §12.2 + §12.5 row 4 (bid_question_matches → question_matches) | READY-TO-DRAFT (“I3 RESOLVED-PARTIAL; B1/N1 RESOLVED; N8 RESOLVED; N9 RESOLVED-S236 (separate embedding_score + fulltext_score columns; op-verify deferred to feature spec); N11 RESOLVED; OQ-Q35-A/B/OQ-Q38-D RESOLVED-S234; OQ-CX33-B RESOLVED-S234. Plus q_a_pairs corpus-level shape per §3.6” per 00-synthesis-v2.md §4 row 5) | None blocking. S9 spike RESOLVED-PARTIAL (95% — layered fn-shape required, content_text consumption); sidecar v1 promotion “UNBLOCKED-CONDITIONAL” not blocked |
| 06-mcp-tooling | KH MCP tool inventory; mempalace direct vs wrapped pattern decision; wing wire-up; MCP-action refine/remove/extend pass | 0.9-intended-architecture.md §9; 09-synthesis-and-verification-feedback.md (S231 Liam feedback per S236 reading list); feedback-findings-review.md §5.1 Theme F (STILL-OPEN); 0.9-decision-graph.md §11.4.2 row 1; finding doc 03 (1B-5) Q4.5 | STILL-OPEN (“MCP review independent of WP-ONTO-R1 batch” + “Theme F still-open per feedback §5.1” per 00-synthesis-v2.md §4 row 6) | MCP-action review pass (Theme F) STILL-OPEN per 00-synthesis-v2.md §5.2 row 1 — “Liam reviewing — pre-decision pending before S237. Mempalace direct vs wrapped in KH MCP — operational.” Lone sub-doc with a STILL-OPEN gate as of S236 close |
| 07-collapse-list | Concise retire-list per item with tier marker; sourced from 0.9-collapse-candidates.md per the S232 Liam reframe (“list ONLY items collapsing, no duplication”) | 0.9-collapse-candidates.md §2-§13 (most of it); 00-synthesis-v2.md §2 + §3 (tier markers); WP4 inputs already curated by the S235 refresh of collapse-candidates | READY-TO-DRAFT (“driven by 0.9-collapse-candidates.md (S235 refresh); New tier markers RATIFIED-RETIRE-S235 / DEFERRED-v1.1-S235 / RATIFIED-DO-NOT-BUILD-S235” per 00-synthesis-v2.md §4 row 7) | None — but largely a transformation/extraction of an existing doc, not a fresh narrative. May be a thin sub-doc by design |
| 08-new-features | Knowledge Map (cocoindex substrate per CX.32); dedup-with-temporal; change-reports rename; scope_tag taxonomy; governance + freshness; bid-feedback loop; Cloud Run sidecar topology mention | 0.9-intended-architecture.md §11.5 + §12; 00-synthesis-v2.md §2.3 N4/N10 + §3.13 (admin UI v1.1) + §5.2 (Knowledge Map STILL-OPEN); CX.32 RESOLVED-S232 + CX.33 RESOLVED-DIRECTION-S233 in 0.9-decision-graph.md; finding doc 05 (1B-4 bid response feedback loop) | READY-TO-DRAFT (“N4 cosmetic; OQ-Q310-A/B RESOLVED-S234; OQ-Q38-A RESOLVED-S234-skip; OQ-Q38-G RESOLVED-S234. Knowledge Map = cocoindex substrate per CX.32; surface scope still open” per 00-synthesis-v2.md §4 row 8) | Knowledge Map graph substrate STILL-OPEN per 00-synthesis-v2.md §5.2 row 4 (“Future S7 spike; cocoindex confirmed as user-facing substrate at CX.32”) — does not block draft because surface scope is mention-only |
| 09-diagrams | ERDs (workspaces + application_types + procurement_workspaces + content_items + q_a_pairs + citations + question_matches + source_documents); ingest flow with Cloud Run sidecar topology; Q&A round-trip; bid feedback 3-UC; auto-RLS event trigger sequence | 0.9-intended-architecture.md §15 diagrams (illustrative — to be redrawn); §13.1 phase ordering; downstream of 02-data-flow + 04-workspace-types + 05-qa-flow + 03-tech-stack | READY-TO-DRAFT (“Generate ERDs + ingest + Q&A round-trip + bid feedback 3-UC + Cloud Run sidecar topology” per 00-synthesis-v2.md §4 row 9) | None directly blocking, but dependency-gated — see §4 below |
Summary count: 8 of 9 sub-docs READY-TO-DRAFT as of S236 close per 00-synthesis-v2.md §4. 1 sub-doc (06-mcp-tooling) STILL-OPEN pending Liam MCP-action review pre-decision.
§4. Ordering recommendation
Section titled “§4. Ordering recommendation”Three dependency layers across the 9 sub-docs:
Layer 1 (no upstream deps — can draft first, any order): 01-vision-mission (frames everything else; lowest-friction; can ship standalone) 03-tech-stack (composition list; references but doesn't depend on data-flow choices) 07-collapse-list (transformation of existing 0.9-collapse-candidates.md per Liam's "list only items collapsing" reframe)
Layer 2 (depends on Layer 1 framing being settled; cross-coupled): 04-workspace-types (biggest sub-doc; application_types + procurement rename + q_a_pairs corpus-level + kb_section retire + combined-PR scope all converge here) 02-data-flow (Cloud Run sidecar + auto-RLS + op_id + cocoindex flow stages; references 04 for workspace/application_type FK targets) 05-qa-flow (q_a_pairs corpus-level + sidecar v1 + question_matches + citations polymorphic; references 04 for q_a_pairs schema) 08-new-features (Knowledge Map + change-reports + bid-feedback loop; references 02/04/05)
Layer 3 (downstream of Layer 2 — needs schemas/flows landed first): 09-diagrams (ERDs + ingest flow + Q&A round-trip + bid feedback 3-UC + Cloud Run topology; renders the Layer 1+2 narrative)
Lone STILL-OPEN gate (drafts only when Liam MCP-action review lands): 06-mcp-tooling (Theme F STILL-OPEN per 00-synthesis-v2.md §5.2 row 1 + §4 row 6)Wave recommendation:
- Wave 1 (Layer 1):
01-vision-mission,03-tech-stack,07-collapse-list— parallelisable (no cross-coupling). Three sub-agents in parallel worktrees. - Wave 2 (Layer 2 main):
04-workspace-typesfirst (foreground, sequential — biggest sub-doc, downstream-blocking), then02-data-flow+05-qa-flowin parallel (both depend on 04 for FK targets and shapes, but not on each other’s prose). - Wave 3 (Layer 2 tail):
08-new-features(after 04/02/05 land — references all three). - Wave 4 (Layer 3):
09-diagrams— after 02/04/05/08 (renders their narrative). Single foreground. - Independent track:
06-mcp-tooling— drafts whenever Liam MCP-action review pre-decision lands; can be Wave 1/2/3/4 depending on timing.
Why this order:
04-workspace-typesis the biggest cross-coupled sub-doc per00-synthesis-v2.md§4 row 4 (“Big sub-doc — application_types + kb_section retire + procurement rename + q_a_pairs corpus-level all live here”) — 02-data-flow / 05-qa-flow / 08-new-features all reference its schemas, so it must land first to avoid forward-references.- Layer 1 sub-docs are “no upstream deps” per
00-synthesis-v2.md§4 — natural parallel kickoff. 09-diagramsis downstream of every other sub-doc by definition — ERDs need the schemas finalised in 04 + 02 + 05.06-mcp-toolingis the only STILL-OPEN gate; orthogonal track.
§5. Per-sub-doc readiness gates remaining (post-S236)
Section titled “§5. Per-sub-doc readiness gates remaining (post-S236)”Only sub-docs with open gates listed. Where 00-synthesis-v2.md §4 already states a gate-state verbatim it is quoted; else the gating items are sourced from §5 of synthesis-v2 or §11.4 of decision-graph.
| Sub-doc | Open gate(s) | Nature of gate | Quote / source |
|---|---|---|---|
| 02-data-flow | RLS-PATTERN.md destination decision (separate doc vs section within 04-workspace-types) | Spec / structure decision — Liam discretion | ”Lands in: Dedicated RLS pattern doc under WP4 (path TBD with 04-workspace-types or new RLS-PATTERN.md)” — 00-synthesis-v2.md §3.16 |
| 05-qa-flow | None blocking the draft; S9 spike RESOLVED-PARTIAL is a “UNBLOCKED-CONDITIONAL” not a block; per-method scoring operational verification deferred | None | ”I3 RESOLVED-PARTIAL; … N9 RESOLVED-S236 (separate embedding_score + fulltext_score columns; op-verify deferred to feature spec)” — 00-synthesis-v2.md §4 row 5 |
| 06-mcp-tooling | MCP-action review pass (Theme F) STILL-OPEN | Liam pre-decision needed — “Mempalace direct vs wrapped in KH MCP — operational" | "STILL-OPEN — MCP review independent of WP-ONTO-R1 batch” + “Theme F still-open per feedback §5.1” — 00-synthesis-v2.md §4 row 6; and “Liam reviewing — pre-decision pending before S237. Mempalace direct vs wrapped in KH MCP — operational.” — 00-synthesis-v2.md §5.2 row 1 |
| 08-new-features | Knowledge Map graph substrate scope (surface vs S7-spike-time decision) | Spec needed — but only for sub-section scope; not for the whole sub-doc | ”Knowledge Map = cocoindex substrate per CX.32; surface scope still open” — 00-synthesis-v2.md §4 row 8 |
| 09-diagrams | Cross-doc dependency — needs schemas finalised in 04 + 02 + 05 | Sequencing only — not Liam-decision | (Implicit per §4 ordering recommendation above) |
| All sub-docs touching schemas | May 30 grants pattern + May 26 OAuth 200/201 platform deadlines may need explicit migration template updates | Code investigation needed (orthogonal) | 00-synthesis-v2.md §3.17 + §3.18 + §5.2 rows 2-3 — “Per §3.17 — combined migration with §3.16 auto-RLS event trigger; CLAUDE.md Gotcha addition; migration template update.” |
Classification of gates:
- Liam pre-decision needed:
06-mcp-tooling(Theme F MCP-action review pass) — 1 gate, 1 sub-doc blocked. - Spec / structure decision (Liam discretion, lightweight):
02-data-flowRLS-PATTERN destination — affects organisation, not content. - Code investigation needed: Migration template + CLAUDE.md Gotcha for May 26/30 Supabase platform deadlines (orthogonal to sub-doc content; could land in production-readiness track per §5.2 row 2-3 disposition).
- Sequencing-only (not gating):
09-diagramswaits for 04/02/05/08.
§6. Suggested S238+ wave structure
Section titled “§6. Suggested S238+ wave structure”Three sessions sketched. Liam reviews after S238 per task instructions.
S238 — Wave 1 (Layer 1 sub-docs)
Section titled “S238 — Wave 1 (Layer 1 sub-docs)”Targets: 01-vision-mission.md, 03-tech-stack.md, 07-collapse-list.md.
Why these three first: All three are READY-TO-DRAFT per 00-synthesis-v2.md §4 with no cross-coupling between them and no downstream-doc dependency cycles. 07-collapse-list is a transformation of the existing 0.9-collapse-candidates.md (per Liam’s S232 reframe — “list ONLY items collapsing, no duplication”) so the source material is fully pre-curated. 01-vision-mission text is largely §2 of 0.9-intended-architecture.md augmented with the platform-overview/integration-guide inputs Liam flagged at S232. 03-tech-stack adds Docling + Cloud Run sidecar per 00-synthesis-v2.md §3.1 + §3.2 to §10 of the source doc.
Agent allocation: Three parallel sub-agents on isolation: "worktree" per CLAUDE.md “Parallel Tracks” guidance, each on content-items-investigation reset target (NOT main, per S237 Critical Rule 2). Each agent writes one sub-doc; foreground main session coordinates merge.
Verification gates:
- Each sub-doc cross-references the ratification sources cited in §3 of this assessment (no forward-references; no re-opening S235/S236 closures).
documentation-and-adrsskill applied; UK English; no budget/day-count/spike-confidence terminology per S231+ ban.- Sub-agent waves merge sequentially per CLAUDE.md guidance (“Sequential merges only”).
In-session Liam decision suggested:
- Confirm whether
07-collapse-listshould be a thin pointer doc (just tier markers + pointer back to0.9-collapse-candidates.md§12-§13) or a fully self-contained collapse-list duplicating the content. The S232 Liam reframe direction suggests thin pointer.
S239 — Wave 2 main + Wave 2 tail (Layer 2)
Section titled “S239 — Wave 2 main + Wave 2 tail (Layer 2)”Targets: 04-workspace-types.md (foreground sequential — biggest sub-doc); then 02-data-flow.md + 05-qa-flow.md (parallel after 04 lands); then 08-new-features.md (after 02/04/05 land).
Why this order: 04-workspace-types is the biggest cross-coupled sub-doc per 00-synthesis-v2.md §4 row 4 — must land first to avoid forward-references. 02-data-flow + 05-qa-flow both reference 04’s schemas (workspaces + application_types + procurement_workspaces + q_a_pairs corpus-level) and would block on each other if drafted in parallel before 04. 08-new-features references all three.
Agent allocation:
- Wave 2 main: foreground main session writes
04-workspace-types(sequential; high cross-coupling, needs main-context coherence). The combined-PR scope per0.9-decision-graph.md§11.3 (10 items) is the central narrative. - Wave 2 split: after 04 lands, dispatch
02-data-flow+05-qa-flowas two parallel worktree sub-agents. - Wave 2 tail: after 02/04/05 land, foreground main writes
08-new-features(references all three; main-context coherence valuable).
Verification gates:
04-workspace-typescross-links combined-PR scope verbatim per0.9-decision-graph.md§11.3; FK targets exactly match00-synthesis-v2.md§3.4 (workspaces.application_type_id) and §3.6 (no directq_a_pairs.workspace_id).02-data-flowcross-links the RLS-PATTERN destination decision per §5 of this assessment (Liam likely pre-decides at S238 wrap-up).05-qa-flowreferences Q-OQR1-06 corpus-level pattern verbatim; cites N9 separate-columns ratification per00-synthesis-v2.md§5.1.08-new-featuresdoesn’t open the Knowledge Map surface scope — references it as cocoindex-substrate per CX.32 + flags STILL-OPEN per §5.2 row 4.
In-session Liam decision needed:
- RLS-PATTERN.md destination per §5 of this assessment (separate doc vs §within 04). Lightweight.
- If Theme F MCP-action review pre-decision lands by S239, dispatch
06-mcp-toolingas a parallel sub-agent at any wave.
S240 — Wave 3 (Layer 3) + tail closeup
Section titled “S240 — Wave 3 (Layer 3) + tail closeup”Targets: 09-diagrams.md foreground; 06-mcp-tooling.md if Theme F decision has landed.
Why this order: 09-diagrams is downstream of every other sub-doc by definition (renders their narrative). 06-mcp-tooling lands whenever Theme F decision lands.
Agent allocation: Foreground main session writes 09-diagrams (high coherence cost; ERDs need cross-doc consistency check). If Theme F decision is by S240, parallel worktree sub-agent on 06-mcp-tooling.
Verification gates:
- ERDs render exactly the schemas in 02/04/05 — no drift; no schema changes “in the diagram” that aren’t in the prose docs.
- Cloud Run sidecar topology diagram matches
00-synthesis-v2.md§3.1. - Final cross-doc consistency audit: read all 9 sub-docs end-to-end; flag any forward-reference, drift, or contradiction.
- Archive
0.9-intended-architecture.mdto.planning/.archive/.specs/per CLAUDE.md “Historical planning” convention; preserve as audit trail.
§7. Risks + open questions
Section titled “§7. Risks + open questions”7.1 Trajectory clarity across S233-S237
Section titled “7.1 Trajectory clarity across S233-S237”Risk: The four prompts each cite 0.9-intended-architecture.md differently. S233 WP4 reading list calls it “Current 0.9-intended-architecture.md (~2000 lines)” without flagging staleness. S235 Critical Rule 5 + S236 Critical Rule 5 + S237 Critical Rule 5 explicitly defer WP4 sub-doc work. S237 user feedback flags context-loss across prompts. The assessment in §1 finds the through-line is coherent as of S236 close but no single doc reflects current state — a reader entering S237 sees four overlapping registers.
Suggested mitigation: When writing 01-vision-mission, include a brief “Status of 0.9-intended-architecture.md” note pointing readers to this assessment (INV-architecture-split-readiness.md) for the audit trail of what’s been superseded. Then archive the source doc to .planning/.archive/.specs/0.9-intended-architecture.md after Wave 4 closes.
7.2 06-mcp-tooling Theme F MCP-action review
Section titled “7.2 06-mcp-tooling Theme F MCP-action review”Risk: Lone STILL-OPEN gate per 00-synthesis-v2.md §4 + §5.2 row 1. The S237 prompt notes “Liam reviewing — pre-decision pending before S237” but Theme F doesn’t appear to have landed in S237’s WP4 (Liam-pending CV resolutions are the 9 items per the S237 prompt WP4 list, which do NOT include Theme F). If Theme F is still STILL-OPEN at S238 kickoff, 06-mcp-tooling blocks indefinitely without pre-decision.
Mitigation: Surface Theme F as a Liam pre-decision item for S238 kickoff. Working framing per finding doc 03 (1B-5 Q4.5) + feedback-findings-review.md §5.1 Theme F: “mempalace MCP direct vs wrapped in KH MCP tooling”. Lightweight binary decision once Liam reviews — and would unblock 06-mcp-tooling for Wave 1 parallel dispatch.
7.3 09-diagrams source-material sparseness
Section titled “7.3 09-diagrams source-material sparseness”Risk: 0.9-intended-architecture.md §15 has 3 illustrative diagrams (ER, ingest flow, Q&A retrieval flow) but none reflects the S235/S236 ratifications (application_types instance table; procurement rename; q_a_pairs corpus-level; Cloud Run sidecar; auto-RLS event trigger sequence). Diagrams need to be fully re-drawn against the post-04/02/05 schema state, not patched from §15.
Mitigation: Sub-doc 09-diagrams writer treats §15 as “predecessor sketch only — redraw from 02/04/05 schemas verbatim”. Verification gate: no schema appears in a diagram that doesn’t appear in the corresponding prose sub-doc.
7.4 RLS-PATTERN.md destination
Section titled “7.4 RLS-PATTERN.md destination”Risk: 00-synthesis-v2.md §3.16 says “path TBD with 04-workspace-types or new RLS-PATTERN.md”. If undecided at S239 Wave 2 kickoff, 02-data-flow writer may guess wrong destination, causing rewrite. Compounded by the May 30 grants pattern + auto-RLS event trigger combined migration scope per 00-synthesis-v2.md §3.17 — these may all live in the same RLS pattern doc.
Mitigation: Liam pre-decides at S238 wrap-up or S239 kickoff. Working recommendation per 00-synthesis-v2.md §3.16 framing: standalone docs/specs/rls-pattern/PRODUCT.md + TECH.md (consistent with the S235-resolved docs/specs/<id>/ location convention). Decoupled from the 9 sub-docs entirely; referenced from 02-data-flow and 04-workspace-types.
7.5 0.9-intended-architecture.md §10 (“Tool stack composition”) — Bid/Procurement contamination
Section titled “7.5 0.9-intended-architecture.md §10 (“Tool stack composition”) — Bid/Procurement contamination”Observation, not a risk: §10 of the source doc uses “bid” framing throughout, where current ratification uses “procurement” umbrella. This is the same naming-cleanup pattern Liam has already accepted in the combined PR per Q-OQR1-02 — the sub-docs should adopt procurement-umbrella naming from the start, treating “bid” as a form_type within procurement.
7.6 Confidence
Section titled “7.6 Confidence”This assessment is HIGH confidence for §2 (10 superseded items, all backed by quoted ratifications), §3 (doc inventory + readiness state, mostly quoted from 00-synthesis-v2.md §4), §5 (gates inventory, quoted from synthesis-v2 §4 + §5). MEDIUM confidence for §4 (ordering recommendation — based on dependency analysis but no Liam ratification yet) and §6 (wave structure — proposal only, contingent on Liam review). Trajectory recap (§1) has medium-confidence on the “drift across prompts” claim — the prompts are individually consistent, but no single doc reflects current state; Liam’s S237 user feedback is the highest-confidence signal that this is real.
End of assessment. Cites verbatim from 00-synthesis-v2.md §4 (readiness map), 0.9-decision-graph.md §11 (S234+S235+S236 ratifications), 0.9-collapse-candidates.md §12-§13 (S235 ratified retires), and feedback-findings-review.md §5 (post-prereq disposition register). All four are mutually consistent as of S236 close (b28e0acc). No new architecture decisions proposed.