docs: L1 Phase 2A design/plan + plan-taxonomy decision #191

Merged
chihlasm merged 4 commits from docs/phase-2a-plus-taxonomy into main 2026-05-29 17:36:42 +00:00
Owner

Summary

Four docs-only commits, no code touched:

  • 5b58702 — L1 AI decision-tree builder Phase 2A design spec
  • f62712d — Resolve 6 Codex review findings on the Phase 2A spec
  • 23dbcec — L1 AI tree builder Phase 2A implementation plan
  • 5c38fb8 — DECISIONS.md + TODO.md entries for plan-tier taxonomy centralization (Option B)

The first three are the Phase 2A doc set. The fourth captures the 2026-05-29 decision to derive admin plan dropdown + validation from the plan_limits table rather than hand-duplicate the allow-list across 6+ sites (triggered by the prod 'AI sessions down' report that traced to the admin dropdown still offering the dead team slug).

Test plan

  • No code changes — docs only
  • Markdown links verified to existing files/lines
## Summary Four docs-only commits, no code touched: - `5b58702` — L1 AI decision-tree builder Phase 2A design spec - `f62712d` — Resolve 6 Codex review findings on the Phase 2A spec - `23dbcec` — L1 AI tree builder Phase 2A implementation plan - `5c38fb8` — DECISIONS.md + TODO.md entries for plan-tier taxonomy centralization (Option B) The first three are the Phase 2A doc set. The fourth captures the 2026-05-29 decision to derive admin plan dropdown + validation from the `plan_limits` table rather than hand-duplicate the allow-list across 6+ sites (triggered by the prod 'AI sessions down' report that traced to the admin dropdown still offering the dead `team` slug). ## Test plan - [x] No code changes — docs only - [x] Markdown links verified to existing files/lines
chihlasm added 4 commits 2026-05-29 15:30:03 +00:00
Brainstormed design for real-time AI tree building when no KB/flow matches.
Overrides the original "no empty-KB build" rule: build from generic L1
knowledge under a layered safety model (classification gate, constrained
generation, per-node validation with a hard floor, standing disclaimer).
Approach C — dedicated ai_tree_builder + match_or_build orchestrator,
reusing flow_matching_engine and the knowledge_flywheel proposal pipeline.

Scope: streaming node-by-node builder, admin-configurable categories,
flywheel capture of resolved trees, minimum escalation handoff (notify +
engineer surface). KB ingestion/connectors, PSA reassign, escalation
package, and AI chat handoff deferred to later phases.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Blocker: FlowProposal can't link an l1_walk_session (source_session_id is
  NOT NULL FK→ai_sessions, UI links /pilot). Add nullable l1_session_id +
  exactly-one CHECK + read-only walked-path link for L1-sourced proposals.
- High: flow_matching_engine matches published flows only; scope match pass
  to flows, defer proposal-matching.
- High: notification system is FlowPilot-shaped; enumerate the 3 changes for
  l1.session.escalated (VALID_EVENTS, link+body builder, explicit engineer
  recipients). Engineer-visible surface is the primary handoff.
- Medium: match before category gate so authored flows aren't blocked.
- Medium: define normalize_walked_path → valid tree with root id, unexplored
  branches as needs_review stubs.
- Medium: category write auth needs owner/admin, not engineer; add
  require_account_owner_or_admin dep.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
19 TDD tasks from the approved spec: 3 migrations (ai_build kind, account
categories, FlowProposal l1_session_id), ai_tree_builder (constrained node
gen + validation + normalize), match_or_build orchestrator (match-first,
gate-on-build), session-service ai_build start/advance, flywheel capture on
resolve, engineer escalation notification, category settings API, and the
frontend walker/dispatch/settings/escalations surfaces + e2e.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
docs(decisions): record plan-tier taxonomy centralization decision (Option B)
All checks were successful
Mirror to GitHub / mirror (push) Successful in 5s
CI / frontend (pull_request) Successful in 6m55s
CI / e2e (pull_request) Successful in 10m27s
CI / backend (pull_request) Successful in 11m42s
5c38fb8904
Captures the 2026-05-29 decision to derive admin plan dropdown + validation
from the plan_limits table rather than hand-duplicating the allow-list across
6+ sites. Triggered by the prod "AI sessions down" report that traced to the
admin dropdown still offering the dead 'team' slug. Adds the matching backlog
entry to TODO.md with duplication sites enumerated.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
chihlasm merged commit 0c5bd9734f into main 2026-05-29 17:36:42 +00:00
Sign in to join this conversation.