Skip to content

Knowledge Hub — Project Plan

Purpose: Top-level consolidated plan for Knowledge Hub product work. Defines the phase model, top-level tasks per phase, dependencies, gating, and cross-track coordination. Serves as the single source of truth for project sequencing.

Audience: Liam (product owner) + Claude Code as development partner + future agents needing to understand where any given task fits in the overall plan.

1. Scope + relationship to other reference docs

Section titled “1. Scope + relationship to other reference docs”
Reference docCoversThis plan relates how
docs/specs/id-31-0.9-canonical-pipeline/{PRODUCT,TECH}.md (Superseeded)Canonical pipeline architectural historic-substrate (canonical-pipeline-drift-audit-s240.md identified 19 drift items - these are folded into PLAN.md (or the per-task new spec files), Canonical-pipeline spec pair retained as historical-substrate.Phase 1 (canonical pipeline implementation) Detailed decomposition in docs/specs/id-31-canonical-pipeline-implementation-plan/PLAN.md
docs/plans/phase-0-investigation/10-feedback-investigation-findings/00-synthesis-v2.mdPhase 0.9 investigation closeout (RATIFIED-S237)Phase 0 of this plan completes when WP4 architecture family closes; this synthesis is the authoritative investigation record
docs/specs/core-docs-pathway-assessment/S239-still-open-consolidation.mdSTILL-OPEN register + S240/S241 closure addendumItems still open per the addendum are tracked under §10 of this plan
  • Phase numbering: Phase 0 (investigation + architecture), Phase 1 (canonical pipeline), Phase 2 (first application), Phase 3 (second application), Phase 4 (v1.1 deferred). Phases gate sequentially; some items within a phase parallelise.
  • Ratification tags: the canonical 6-tag vocabulary applies ([RATIFIED-...], [DEFERRED-v1.1], [CONDITIONAL-RETIRE], [LOCKSTEP-WITH-MIGRATION], [RATIFIED-RETIRE], [RATIFIED-RENAME]). Source-attribution markers ([RATIFIED-S2XX]) are also used where ratification provenance matters.
  • UK English throughout (colour, organisation, DD/MM/YYYY).
  • No fabrication. Every claim cites a source. Construction-guide §5 discipline applies.
  • Effort units: 1 task unit ≈ 1-1.5h foreground OR 2h sub-agent. Multiply for sessions where multi-wave structure applies.
PhaseTitleStatusGate to next phase
0Investigation + Architecture DocumentationNEARLY-COMPLETE (8/9 architecture sub-docs landed S237-S240; 09-diagrams + cross-doc audit + archive of predecessor remain — see §4)Architecture family closure (09-diagrams.md + cross-doc audit + 0.9-intended-architecture.md archive)
1Canonical Pipeline Implementation (v1)NEXT (gated on Phase 0 closure; decomposition in docs/specs/id-31-canonical-pipeline-implementation-plan/PLAN.md)Canonical pipeline shipped + Q-OQR1-16 combined-PR migration applied + reserved-workspace-seats migration applied
2First Application — Procurement (bid drafting)Planned (gated on Phase 1)Procurement application live in production with real-bid eval baseline (product-roadmap.json §1.4)
3Second Application — Sales ProposalsPlanned (gated on Phase 2 stability)Sales proposal application live
4v1.1 Deferred ItemsPlanned (gated on v1 launch)All [DEFERRED-v1.1] items addressed or re-categorised
Phase 0 ─── Phase 1 ─── Phase 2 ─── Phase 3
└─── Phase 4 (v1.1 deferred items)

Parallel tracks run alongside all phases — see §9.


4. Phase 0: Investigation + Architecture Documentation

Section titled “4. Phase 0: Investigation + Architecture Documentation”

Status: NEARLY-COMPLETE.

Scope completed:

  • Phase 0.9 investigation arc — see 00-synthesis-v2.md (RATIFIED-S237 close-out). All v1 B/I/N items resolved; 15 new items surfaced and ratified; WP4 readiness map shows 8/9 sub-docs READY-TO-DRAFT or LANDED.
  • Architecture sub-doc family (9-doc split of the historical 0.9-intended-architecture.md):
    • 01-vision.md (LANDED-S238)
    • 02-data-flow.md + 04-workspace-types.md + 05-qa-flow.md (LANDED-S240 Wave 2)
    • 03-tech-stack.md + 07-collapse-list.md (LANDED-S239 Wave 1)
    • 06-mcp-tooling.md (LANDED-S240 Theme F direct-pattern ratified)
    • 08-new-features.md (LANDED-S240 Wave 2 tail)
    • 09-diagrams.md (PENDING — see remaining work below)
  • Architecture-track spec pairs:
    • docs/specs/rls-pattern/{PRODUCT,TECH}.md (NEW-S239)
    • docs/specs/reserved-workspace-seats/{PRODUCT,TECH}.md (NEW-S240)
    • docs/specs/id-31-0.9-canonical-pipeline/{PRODUCT,TECH}.md (RECONCILED-S238)
  • Audits + drift assessments:
    • implementation-readiness-audit-s240.md
    • canonical-pipeline-drift-audit-s240.md
    • S239-still-open-consolidation.md (S240 + S241 closure addendum applied)

Remaining work (gates Phase 1 kickoff):

Task IDTaskEffortDependencies
0.ADraft 09-diagrams.md (ERDs for content_items + q_a_pairs + q_a_extractions; sequence diagrams for ingest + Q&A round-trip + bid feedback 3-UC + auto-RLS event trigger; ERDs for source_documents + cocoindex source-key)1.5-2 unitsNone — all referenced sub-docs landed
0.BCross-doc audit — read all 9 sub-docs end-to-end, flag drift / contradictions / missing forward-refs, output findings doc1 unit0.A landed
0.CArchive docs/plans/phase-0-investigation/0.9-intended-architecture.md to .planning/.archive/.specs/ once 0.B confirms 9 sub-docs cover everything0.5 unit0.B PASS verdict

Phase 0 closure criterion: All 9 architecture sub-docs landed + cross-doc audit PASS + predecessor archived.

Deferred from Phase 0 (carry forward):

  • Per-tool MCP audit + client-doc refresh (was S241 WP2). Defer to later in Phase 1 or to a dedicated audit session. Scope spec: 06-mcp-tooling.md §6.11.

5. Phase 1: Canonical Pipeline Implementation (v1)

Section titled “5. Phase 1: Canonical Pipeline Implementation (v1)”

Status: NEXT (gated on Phase 0 closure).

Scope: Implement the canonical pipeline per docs/specs/id-31-0.9-canonical-pipeline/{PRODUCT,TECH}.md and the landed Wave 2 architecture sub-docs. Detailed top-level tasks + subtasks + dependency graph + new-spec inventory live in docs/specs/id-31-canonical-pipeline-implementation-plan/PLAN.md (produced S241 WP-B — see §11 of this plan for spec inventory cross-references).

Indicative phase composition (final structure per PLAN.md):

TrackScope
Cocoindex pipeline (Phase 2 commencement per 0.9-synthesis.md §8.4 — superseded by PLAN.md ordering)Cocoindex Option A wiring + lifespan/ContextProvider scaffolding + canonical flow at scripts/cocoindex_pipeline/flow.py + Docling sidecar on Cloud Run
Q-OQR1-16 combined-PR migration10-item migration scope per 0.9-decision-graph.md §11.3: application_types introduce + kb_section retire + procurement rename + project_idworkspace_id + digestschange_reports + form_templates rename + provenance enum retrofit + q_a_pairs schema sketch update + CV 04 capability retire + CV 16 firecrawl retire (lockstep with DB CHECK drops). Combined with reserved-workspace-seats DDL.
Reserved workspace seats migration5 satellite seat tables (intelligence_workspaces, sales_proposal_workspaces, product_guide_workspaces, competitor_research_workspaces, training_onboarding_workspaces) created upfront with PK + FK + RLS only, per docs/specs/reserved-workspace-seats/{PRODUCT,TECH}.md
Q&A schema migrations + RPCsq_a_pairs corpus-level shape + q_a_extractions derived cache + question_matches (formerly bid_question_matches — never built under old name) + separate embedding_score + fulltext_score columns + RPCs
NEW spec authoring (gating tasks above)See §11 for the spec inventory; key v1 specs: cocoindex-extraction-contract, cocoindex-ledger-api, procurement-workspaces, Q1.3-Q1.N content model extension
Theme retirementsPattern A/B Q&A parser [RATIFIED-RETIRE] post-Phew migration; Firecrawl + @mendable/firecrawl-js retire on Docling adoption; pipeline_failures [RATIFIED-DO-NOT-BUILD]; diff-UI [DEFERRED-v1.1] (S240 Liam ratification per S239-still-open-consolidation.md S240 addendum)
Investigation spike (Q-OQR1 prompt-cache)1-2h spike — confirm ExtractByLlm request shape supports cache_control block; Anthropic API cache hit verified per S241 Liam ratification
Tests + docsPer-stage test coverage + integration tests + E2E + post-apply docs (Astro docs-site auto-sync — see §9)

Phase 1 closure criterion: Canonical pipeline running in production against a real corpus + Q-OQR1-16 combined-PR migration applied + reserved-workspace-seats migration applied + cocoindex extraction contract spec satisfied + p-1 RLS auto-enable + p-3 fail-loud Data API behaviour both verified post-apply.

Gating dependencies into Phase 1:

  • Phase 0 closure (architecture family complete) — gates the implementation kickoff to ensure the spec substrate is settled.
  • v1 gating specs (status as of S244 close):
    • cocoindex-extraction-contract/{PRODUCT,TECH}.md — STILL-OPEN (gates cocoindex extraction stage).
    • Q1.3-Q1.N content model extension — STILL-OPEN (gates content-flow implementation tasks).
    • procurement-workspaces/{PRODUCT,TECH}.md — STILL-OPEN (gates Phase 2).
    • intelligence-workspaces/{PRODUCT,TECH}.mdLANDED-S243 + AMENDED-S244-Wave-0.5 (gates T2 sub-task 8).
    • product-guide-workspaces/{PRODUCT,TECH}.mdLANDED-S244 (Phase 1 reserved-seat only).
    • concurrent-edit-intent-arbitration/TECH.mdLANDED-S244 (gates T9).
    • cocoindex-ledger-api/TECH.mdDEFERRED-v1.1 per RATIFIED-S243 Item 11 (v1 ships only pipeline_runs rollup).

Drift items disposition: The 19 drift items in canonical-pipeline-drift-audit-s240.md are folded into PLAN.md (or the per-task new spec files), not inlined into canonical-pipeline PRODUCT/TECH per S241 Liam direction. Canonical-pipeline spec pair retained as historical-substrate.


6. Phase 2: First Application — Procurement (bid drafting)

Section titled “6. Phase 2: First Application — Procurement (bid drafting)”

Status: Planned (gated on Phase 1 closure).

Scope: Build the procurement application using the canonical pipeline substrate. Per Q-OQR1-02, the application_type is procurement (formerly bid — renamed in the Q-OQR1-16 combined PR). Per S243 Item 19 ratification (form_type 3-tier split — see PLAN.md §4.2 sub-task 9), procurement scope decomposes into three tiers:

  • form_types CV (true forms only) — bid, rfp, pqq, itt, tender, checklist, questionnaire, sales_proposal_template.
  • NEW procurement_vehicles CVframework, dps.
  • NEW procurement_vehicle_instances tableg_cloud is an instance of framework (not a form_type). Other instances may be added (e.g. G-Cloud 14, DPS variants).

Ontology updates: docs/ontology/26-form-type.md trimmed + NEW 30-procurement-vehicle.md + NEW 31-procurement-vehicle-instance.md. Migration drafted in PLAN.md §4.2 T2 sub-task 9 (Q-OQR1-16 combined PR).

Required NEW spec: docs/specs/procurement-workspaces/{PRODUCT,TECH}.md (currently referenced from reserved-workspace-seats/PRODUCT.md as “owned by the procurement feature spec or equivalent”). The reserved-workspace-seats spec at v1 only creates the bare seat table — per-app columns + bid-drafting workflow live in this NEW spec.

Indicative top-level tasks (final task list lands in docs/specs/procurement-workspaces/TECH.md once authored):

  • ALTER procurement_workspaces satellite table — add per-app columns (workflow state, deadlines, evaluator config, etc.)
  • Bid composer UI surface (consumes canonical pipeline content via question_matches + Q&A search)
  • question_matches consumption (Q&A retrieval against bid questions per Q-OQR1-02 + N9 separate embedding_score + fulltext_score)
  • Real-data eval baseline (currently a backlog item — Liam to provide template)
  • EP8 Q&A .docx import UI surface (per product-roadmap.json §1.11)
  • Procurement workflow state machine (renamed BID_STATESPROCUREMENT_WORKFLOW_STATES per Q-OQR1-02; live code path: lib/procurement/procurement-workflow.ts)
  • Bid feedback 3-UC composite (see 08-new-features.md)

Closure criterion: Procurement application live + eval baseline established on real-bid data + bid composer ships with a UX-tested workflow.


7. Phase 3: Second Application — Sales Proposals

Section titled “7. Phase 3: Second Application — Sales Proposals”

Status: Planned (gated on Phase 2 closure + stability window).

Scope: Build the sales proposals application using the canonical pipeline substrate. Per Q-OQR1-03, the application_type is sales_proposal; satellite table is sales_proposal_workspaces (created upfront with PK+FK+RLS only at Phase 1 per reserved-workspace-seats; per-app columns added here).

Required NEW spec: docs/specs/sales-proposal-workspaces/{PRODUCT,TECH}.mdPRODUCT/TECH spec stub authored in Phase 1 Wave 0 per RATIFIED-S243 (Item 15); per-app columns added via ALTER at Phase 3 build time.

Research substrate (RATIFIED-S243 Item 13): Phase 3 starts from existing sales-proposal research documentation prepared pre-canonical-pipeline. Liam confirms research-doc path at Phase 3 kickoff; research substrate informs the v1 spec set + per-app column scope. Sales Proposals is a key KH platform application — closure criteria reflect full application functionality, not just Q&A pair integration.

Indicative top-level tasks: ALTER sales_proposal_workspaces — add per-app columns (proposal stage, client metadata, win/loss tracking, evidence references, etc.); sales-proposal composer UI surface; q_a_pair reuse from procurement evidence (origin_kind='derived_from_bid_response'); proposal-specific extraction patterns via cocoindex (sales templates, case-study reuse); proposal export pipeline (DOCX/PDF); eval baseline on real sales proposals.

Closure criterion (RATIFIED-S243 Item 13 — revised): Sales-proposal application live in production + composer UI ships with UX-tested workflow + sales-proposal-specific extraction integrated (case-study reuse, win-story citation, client-metadata templating) + N successful proposals generated end-to-end (composer → review → export) on real client engagements + eval baseline established. Q&A pair reuse (originally the v1 metric) is one of several success signals, not the sole criterion.


Status: Planned (gated on v1 launch).

Items deferred to v1.1 per ratifications across S234-S241:

ItemSourceDisposition
Workspace-private q_a_pairsQ-OQR1-08 + 00-synthesis-v2.md §3.14Single Phew tenant for v1; multi-tenant scoping in v1.1
Admin UI for client-managed vocabularies (application_types, form_types, scope_tags)Q-OQR1-13 + 00-synthesis-v2.md §3.13Extends existing settings-page pattern
Markdown sidecar materialisation for approved Q&A pairs (UC5 4.6.Q7 + UC6 4.3.Q7)0.9-canonical-pipeline/PRODUCT.md §11v1 keeps approved Q&A pairs KH-DB-only
P-5 RLS auto-enable observability hookrls-pattern/{PRODUCT,TECH}.md P-5/T-5v1 = option (c) structured logging only (RAISE LOG → Cloud Run sidecar); v1.1 reopens with three options (a/b/c)
Diff-UI retire scopeREVERSED-S243 (Item 5) — Diff-UI RETAINED for v1, surface re-pointed from source_document_diffs substrate to markdown sidecar revision comparison. See PLAN.md §4.9 T9 (Diff-UI sidecar re-point sub-task). Files preserved: app/api/source-documents/[id]/diff/*, app/documents/[id]/diff/page.tsx, components, lib/source-documents/document-diff.ts, source-document-impact.ts.n/a — IN-SCOPE v1
Mempalace wrapped-within-KH-MCP patternTheme F S240 ratification[DEFERRED-POST-LAUNCH] per theme-f-mempalace-investigation.md; v1 ships direct pattern
migration-revoke-guard.yml extension (CI guard for reserved-seats per-app columns)reserved-workspace-seats/TECH.md T-7v1 = review discipline only; v1.1 = CI guard extension
Form_type behaviour code vs data-drivenQ-OQR1-14Code-driven for v1; data-driven for v2
q_a_extractions to markdown sidecar pipeline05-qa-flow.md §4 + Q-OQR1-CLOSED-CONDITIONALv1 keeps approved pairs DB-only

Closure criterion: Every v1.1 item has either landed in production OR been re-categorised (e.g. promoted to v2 / retired / merged into another phase).


Two long-lived worktree tracks run alongside main, as per CLAUDE.md.


Astro docs-site (production-readiness track): Replaces the current docs/reference/SCHEMA-QUICK-REFERENCE.md update-coupled freshness guard. The schema-reference entry was removed from TRACKED_REFERENCE_DOCS S241 (lib/docs/tracked-reference-docs.ts). Astro will auto-sync schema reference from a programmatic source (e.g. live database.types.ts + supabase/migrations/). Other tracked docs retain the freshness guard until the production-readiness track migrates them to Astro auto-sync.

Workflow orchestration (production-readiness track): SDLC dev-workflow with orchestrator/executor/checker/curator skills + agents. Main track adopts as the orchestrator stabilises.

Mempalace integration (RATIFIED-S240 direct pattern): Mempalace runs as separate Anthropic plugin alongside KH MCP. KH MCP runs on Vercel server-side; mempalace runs in local Claude runtime. Wrapping deferred to v1.1 conditional on mempalace-v4-alpha PG-backend availability. KH MCP tools do NOT wrap mempalace calls.

Task-management terminology migration: Production-readiness track will migrate task IDs to the ID-15 / ID-15.1 convention (no action on main; awaiting handoff per production-readiness mempalace S48 entry).


11.1 Existing canonical specs (CURRENT-CANONICAL)

Section titled “11.1 Existing canonical specs (CURRENT-CANONICAL)”
Spec pathTypeStatusUsed by phase
docs/specs/id-31-0.9-canonical-pipeline/{PRODUCT,TECH}.mdPRODUCT + TECHRECONCILED-S238 (historical-substrate; PLAN.md is the implementation driver)Phase 1
docs/specs/id-38-rls-pattern/{PRODUCT,TECH}.mdPRODUCT + TECHLANDED-S239Phase 1 (foundation for any new public table)
docs/specs/reserved-workspace-seats/{PRODUCT,TECH}.mdPRODUCT + TECHLANDED-S240Phase 1 (combined migration scope)
docs/specs/wp6-ontology-harness/TECH.mdTECHLANDED-S237Phase 1 (ontology Zod harness + content-type registry — implementation already shipped per WP6 D1 commit a258d144)
Spec pathTypeSkillConfirmed-need sourcePhase 1 task gating
docs/specs/id-36-cocoindex-extraction-contract/{PRODUCT,TECH}.mdPRODUCT + TECH/write-product-spec + /write-tech-specS241 Liam ratification (Q-EX2 Pydantic discriminated union with ExtractByLlm)Gates the cocoindex extraction-stage implementation
docs/specs/id-36-cocoindex-ledger-api/TECH.mdTECH/write-tech-specDEFERRED-v1.1 per RATIFIED-S243 Item 11 — v1 ships only pipeline_runs rollup; per-stage detail surface deferredn/a v1
Q1.3-Q1.N content model extensionTBD — either canonical-pipeline PRODUCT.md §1 extension OR a NEW spec — WP-B PLAN.md decides/write-product-spec (likely)S241 implementation-readiness audit finding P6; affects every content-flow implementation taskGates content-flow implementation tasks
docs/specs/intelligence-workspaces/{PRODUCT,TECH}.mdPRODUCT + TECH/write-product-spec + /write-tech-specLANDED-S243 + AMENDED-S244-Wave-0.5 + WP2a-IMPL-LANDED-S245 (commits 4abf7328 + f6a13f4e + c8cf4e8f) — full Shape B 3 typed cols (added relevance_threshold); helper-first hybrid migration ratified; WP2a helper + 23-site code sweep landed S245Gates T2 sub-task 8 (Shape B promotion)
docs/specs/product-guide-workspaces/{PRODUCT,TECH}.mdPRODUCT + TECH/write-product-spec + /write-tech-specLANDED-S244 (commits e257dbac + 0cec141a) — reserved-seat only at Phase 1; 3 GF gap-flags deferred to feature-buildPhase 1 reserved-seat
docs/specs/id-59-concurrent-edit-intent-arbitration/TECH.mdTECH only/write-tech-specLANDED-S244 (commit 12a20963) — v1 safe default codified (CV cosmetic/data/structural per ONT.14)Gates T9 (UC1/UC4/UC6)
Spec pathTypeSkillSource
docs/specs/procurement-workspaces/{PRODUCT,TECH}.mdPRODUCT + TECH/write-product-spec + /write-tech-specReserved-workspace-seats [forward-ref] (“owned by procurement feature spec or equivalent”); confirmed Phase 2 prerequisite
Spec pathTypeSkillSource
docs/specs/sales-proposal-workspaces/{PRODUCT,TECH}.mdPRODUCT + TECH/write-product-spec + /write-tech-specLANDED-S244 (commits 3af858b1 + 8463d72f + 7ea4c77d) — reserved-seat only at Phase 1; Phase 3 substrate carries T-8 gap-flag for 4 candidate arm files awaiting Liam-review + canonical-pipeline reconciliation. Reserved-workspace-seats forward-ref (sales-proposal satellite).

11.5 Specs surfaced during WP-B decomposition (S241)

Section titled “11.5 Specs surfaced during WP-B decomposition (S241)”

docs/specs/id-31-canonical-pipeline-implementation-plan/PLAN.md (S241 WP-B) may identify additional NEW specs during decomposition. Items not in §11.2-§11.4 will be appended to §11 as PLAN.md lands.


From S239-still-open-consolidation.md (post S241 addendum) — items NOT yet placed into a phase above:

ItemSourcePhase placement candidate
Knowledge Map graph substrate00-synthesis-v2.md §5.2 row 4Phase 4 (cocoindex substrate confirmed at CX.32; surface scope still open)
CocoInsight on-prem deployment posture00-synthesis-v2.md §5.2 row 6Contingent — only if KH self-hosts; defer until scenario surfaces
Tracked-changes DOCX regression test00-synthesis-v2.md §5.2 row 8Phase 1 (pre-launch QA task; relates to CLAUDE.md “python-docx and Track Changes” gotcha)
Roadmap §3 / §3.7 / §11 LIKELY-ABSORB per-item verification07-collapse-list.md §12.3Phase 1 (binds at 02-data-flow.md integration during canonical pipeline build)
P7 file-upload route disposition (app/api/upload/route.ts)07-collapse-list.md §12.2Phase 1 (binds at cocoindex source-binding architecture)
EP8 partial obsolescence (60% shipped via S194/S198/S205-S207)0.9-decision-graph.md §7 OQ7 + product-roadmap.json §1.11Phase 2 (Liam-direction: EP8 ships in procurement-workspaces; OQ7 spike or PRODUCT.md rewrite tracked at roadmap §1.11)
RLS-PATTERN gaps (P8 LIKE/PARTITION; P9 retroactive RLS audit)S239-still-open-consolidation.md post-S241 addendumproduct-backlog.json rows 40 + RLS-P9 (added S241 WP-C); not on a phase yet — could promote to Phase 1 fix list if a partitioned table or LIKE migration ships

These items, if not addressed, block the whole project:

GateOwnerStatus
Architecture family closure (09-diagrams + cross-doc audit + archive)Main track (Phase 0)NEARLY-COMPLETE — 09-diagrams + cross-doc audit + archive remain
Q-OQR1-16 combined-PR migration draftMain track (Phase 1)STILL-OPEN — drafted into PLAN.md; ratification scope settled S235
4 NEW v1 specs (§11.2)Main track (Phase 1)PARTIAL — 3 of 4 originally-listed specs status: cocoindex-extraction-contract STILL-OPEN; cocoindex-ledger-api DEFERRED-v1.1 per RATIFIED-S243; Q1.3-Q1.N content model extension STILL-OPEN. PLUS-S244: intelligence-workspaces LANDED + AMENDED-S244-Wave-0.5; product-guide-workspaces LANDED-S244; concurrent-edit-intent-arbitration LANDED-S244.
Procurement-workspaces spec (§11.3)Main track (Phase 2)STILL-OPEN
Astro docs-site auto-syncproduction-readiness trackIN-FLIGHT (production-readiness track ownership; tracked via track-local roadmap)
Workflow orchestration self-applicationproduction-readiness trackIN-FLIGHT (mempalace S48 entry: S49 = last bootstrap session before self-application)

DocRole in this plan
docs/plans/phase-0-investigation/0.9-synthesis.md §6 + §8Predecessor (OUTDATED S231 era; superseded by THIS doc) — preserved for audit-trail
docs/plans/phase-0-investigation/10-feedback-investigation-findings/00-synthesis-v2.mdRATIFIED-S237 investigation closeout — phase 0 substrate
docs/specs/core-docs-pathway-assessment/S239-still-open-consolidation.mdSTILL-OPEN register + S240/S241 closure addendum
docs/specs/core-docs-pathway-assessment/implementation-readiness-audit-s240.mdAudit substrate
docs/specs/core-docs-pathway-assessment/canonical-pipeline-drift-audit-s240.md19 drift items — folded into PLAN.md per S241 Liam direction
docs/specs/id-31-0.9-canonical-pipeline/{PRODUCT,TECH}.mdArchitectural substrate for Phase 1 (historical-substrate)
docs/specs/id-31-canonical-pipeline-implementation-plan/PLAN.mdPhase 1 detailed task tree
docs/reference/state-of-the-product.mdCurrent capability state (Phase 0 closure record)
docs/reference/product-backlog.jsonWork awaiting promotion to task list
docs/reference/product-roadmap.jsonApp-level forward-looking items
docs/specs/core-docs-pathway-assessment/architecture-sub-doc-construction-guide.mdDrafting discipline for architecture-track specs
docs/plans/phase-0-investigation/0.9-decision-graph.md §11Consolidated S234+S235+S236 ratifications

DateSessionChange
18/05/2026kh-S241 mainFirst authoritative consolidated project plan. Supersedes the prereq-chain framing in 0.9-synthesis.md §6 + §8 (S231-era, outdated). Establishes the 5-phase model + Phase 0 closure criterion + Phase 1 forward-ref to PLAN.md.
20/05/2026kh-S243-interim mainPre-S244 ratifications applied per docs/plans/phase-0-investigation/pre-s244-project-feedback.md. Phase 3 Sales Proposals closure criterion revised (Item 13). Diff-UI retire scope REVERSED — retained for v1 (Item 5). Additional Phase 1 scope items routed to PLAN.md S243-changelog (Items 6, 7, 9-12, 14, 15, 17-19).
20/05/2026kh-S244 content-items-investigationFour NEW spec sets landed: intelligence-workspaces PRODUCT+TECH (RATIFIED-S243 + AMENDED-S244-Wave-0.5 — Shape B promoted to full 3 typed cols incl. relevance_threshold; helper-first hybrid migration ratified; T-5 read-path expanded from 13 refs/6 files to ~23 refs/13 files); sales-proposal-workspaces PRODUCT+TECH (RATIFIED-S244 — reserved-seat only Phase 1, T-8 gap-flag for 4 candidate arm files awaiting Liam-review + canonical-pipeline reconciliation); product-guide-workspaces PRODUCT+TECH (RATIFIED-S244 — reserved-seat only Phase 1, 3 GF gap-flags with §5.2 category tags); concurrent-edit-intent-arbitration TECH (RATIFIED-S244 — v1 safe default codified per CV cosmetic/data/structural per ONT.14). WP2 restructured into WP2a (pre-T2 helper + ~23-site code sweep; CI stays green) + WP2b (T2 SQL incl. intel Shape B 3-col + helper swap; single PR) + WP3 (staging apply) + WP4 (prod apply). PLAN.md §4.2 sub-task 8 updated to 3 typed cols.
20/05/2026kh-S245 content-items-investigationWP2a helper-first hybrid landed (commits f6a13f4e + c8cf4e8f). NEW lib/intelligence/workspace-context.ts exports getIntelligenceWorkspaceContext() + extractContextFromDomainMetadata() reading JSONB pre-T2 (behaviour-preserving). 23-site code sweep across 5 /api/intelligence/* routes (typed top-level projection) + app/intelligence/[workspaceId]/page.tsx + components/intelligence/workspace-settings.tsx UI + lib/intelligence/pipeline.ts loadWorkspaceContext + Zod schema comment. IntelligenceWorkspace interface migrated to typed top-level (company_profile_id / guide_id / relevance_threshold); domain_metadata reduced to loose `Json
20/05/2026kh-S246 content-items-investigationWP2b T2 combined-PR migration landed + applied to staging (8 commits 38242fef..1030b5e5). Migration file supabase/migrations/20260520120828_t2_combined_pr_intel_shape_b_form_type_split.sql (587 lines) covers: application_types instance table + 6 seed rows + workspaces.application_type_id FK swap (type text col dropped, kb_section retired); project_id → workspace_id rename on bid_questions + templates; procurement_workspaces reserved seat CREATE (was incorrectly framed as RENAME pre-S246 W1 audit — bid_workspaces never existed in prod); 5 reserved satellite seats (intelligence/sales_proposal/product_guide/competitor_research/training_onboarding); intelligence_workspaces Shape B promotion with 3 typed cols + JSONB-strip + env-agnostic pre/post-state assertion design (Liam ratification W1); digests → change_reports table rename; provenance enum cascade + entity_aliases.category → provenance (legacy generic → core); source_documents.workspace_id no-op idempotent DROP NOT NULL; q_a_pairs schema sketch; form_type 3-tier split (form_types CV / procurement_vehicles CV / procurement_vehicle_instances) with template_requirements crosswalk (66 sq→pqq + 30 rfp→rfp). lib/intelligence/workspace-context.ts internals swapped JSONB→satellite JOIN (signature stable; extractContextFromDomainMetadata renamed to extractContextFromSatellite); new INTELLIGENCE_WORKSPACE_SELECT composable clause. 47-file PR2 sweep (Agents A+B+C) + 15-file test mock sweep (Agents D+E) + residual compile fixes. lib/workspace-types.ts got a minimal compile fix (kb_section retired, bid → procurement, TODO(T4) comment) — full retire to application_types TanStack Query lives in T4 scope. Test baseline 12,781 pass / 35 fail / 28 skip (23 net-new across 5 files NOT in PR2 agent briefs — S247 WP2 scope).
20/05/2026kh-S247 content-items-investigationWP1 T2 migration applied to production rovrymhhffssilaftdwd (commit 2f98c8cfsync_bid_status trigger drop pulled forward from T4 to migration 1.5b after first prod-apply failed with record "new" has no field "type" SQLSTATE 42703). Staging-apply S246 had bypassed the failure path because greenfield (0 intel rows w/ JSONB keys → sub-task 8.3 UPDATE matched 0 rows → trigger never fired); prod has 3 rows so the trigger fired and dereferenced NEW.type (column dropped in 1.6). Audited code S247: no production path writes workspaces.status column for bid workspaces — trigger was dead-code w.r.t. live writers. Re-applied to prod cleanly: env-agnostic invariants 4/3/2/0 → 4/3/2/0 (unstripped=0), 96/96 crosswalk, 24 entity_aliases retrofit, 6 application_types + 6 reserved seats + 8 form_types + 3 procurement_vehicles. Staging trigger drop applied manually via MCP execute_sql for state parity; types regen’d from prod via supabase gen types typescript --project-id rovrymhhffssilaftdwd — schema parity vs staging-generated types byte-identical (no actual schema diff). WP3 docs cascade: PLAN.md §4.2 sub-tasks 1-10 marked DONE-S246 + NEW sub-task 11 DONE-S247; this changelog row; SCHEMA-QUICK-REFERENCE.md new tables documented + Last-verified bumped; CLAUDE.md workspace-discriminator gotcha added; ontology 26-form-type.md status → APPLIED-S246 + NEW 30-procurement-vehicle.md + NEW 31-procurement-vehicle-instance.md. WP2 test residual sub-agent dispatched (background) to clear the 23 net-new fails to ≤12 baseline.
21/05/2026kh-S249 content-items-investigationT6 Q&A two-tier model migration + RPCs landed on staging (WP1 + WP2 + WP4 docs cascade) (commits 2f3428c7 + 6614d8c3 + f7ce9754 + a20786f5 + WP4 docs). WP1 migration 20260520225456_t6_q_a_pairs_full_schema.sql: q_a_pairs ALTER to full spec-compliant column set (adds alternate_question_phrasings text[], question_embedding vector(1024); answer_standard SET NOT NULL; enum reconciliation — origin_kind ('extracted_from_corpus','curated_explicit','derived_from_bid_response','imported_legacy') default curated_explicit; publication_status ('draft','in_review','published','archived') replacing T2’s 'superseded' value per UC6 §8.3); NEW q_a_extractions cocoindex UPSERT target (extractor_kind 4-value CHECK + promoted_to_pair_id FK + invalidated_at); NEW q_a_pair_history trigger-written version table (UNIQUE (q_a_pair_id, version), CASCADE FK); q_a_pairs_history_trigger() SECURITY DEFINER + REVOKE EXECUTE FROM anon (P-4); GIN indexes idx_q_a_pairs_scope_tag + idx_q_a_pairs_anti_scope_tag; idx_q_a_pairs_workspace confirmed RATIFIED-DO-NOT-BUILD per 05-qa-flow.md §11 + Q-OQR1-06. WP2 migration 20260520231524_t6_q_a_search_rpcs.sql: q_a_search(text, vector(1024), integer) two-step retrieval Step 1 — hybrid ranking; SEPARATE embedding_score + fulltext_score columns per N9 RESOLVED-S236 (not a blended single score); caller-side scope filtering; q_a_get_verbatim(uuid) two-step retrieval Step 2 — full pair row excluding question_embedding (payload discipline per S16 §6.1). Both RPCs: SECURITY DEFINER, REVOKE anon, GRANT authenticated/service_role. Types regen post-WP1 + post-WP2 staging apply — q_a_extractions + q_a_pair_history + q_a_search + q_a_get_verbatim Function types surfaced; schema parity verified. WP4 docs cascade: PLAN.md §4.6 sub-tasks 1-6 DONE-S249 + sub-task 7 IN-PROGRESS-S249 (WP3 branch pending cherry-pick); SCHEMA-QUICK-REFERENCE.md §34 NEW + Last-verified bumped 21/05/2026; NEW ontology entry docs/ontology/32-q-a-pair.md (status APPLIED-S249).

End of project plan. This document is the authoritative source for phase sequencing + cross-track coordination. Detailed task decomposition for Phase 1 lives in docs/specs/id-31-canonical-pipeline-implementation-plan/PLAN.md. Per-application detail (Phases 2 + 3) lives in the application-specific feature specs (procurement-workspaces / sales-proposal-workspaces).