feat(l1): AI decision-tree builder — Phase 2A #193
@@ -51,23 +51,31 @@ source_session_id + exactly-one CHECK + schema made optional); `l1_category_serv
|
||||
walked_path entry), `POST /l1/sessions/{id}/next-node`, `GET /l1/escalations`,
|
||||
`GET|PATCH /accounts/me/l1-categories`, `require_account_owner_or_admin` dep.
|
||||
|
||||
**Frontend (Tasks 13–15) — committed; whole-project `tsc -b` + eslint clean as of fix `2cc7c83`:**
|
||||
**Frontend (Tasks 13–15) — committed; whole-project `tsc -b` + eslint clean. VERIFIED HEAD `4d3e2f1`, tree clean.**
|
||||
- `03e8748` Task 13 — `types/l1.ts` (+ai_build, IntakeOutcome/Result, NearMiss, TreeNode,
|
||||
NextNodeRequest/Result, L1Categories) + `api/l1.ts` (intake→IntakeResult; nextNode,
|
||||
escalations, getCategories, setCategories). nextNode body carries `node_text`.
|
||||
- `df7150f` Task 14 + `f483196` Task 15 were FIRST committed BROKEN (I misread eslint
|
||||
EXIT=0 as a clean tsc; both had TS2305 missing-export + props-contract errors).
|
||||
**`2cc7c83` repairs both** — verified `npx tsc -b` EXIT=0 (whole project) + eslint EXIT=0:
|
||||
- `L1Dashboard.tsx`: minimal outcome-dispatch edit on the REAL page (matched/build→walker;
|
||||
suggest→use-flow/build-new; out_of_scope→escalate-without-walk).
|
||||
- `L1WalkTreeVariant.tsx`: kept real props `{session,onSessionUpdate,onDone}` +
|
||||
ResolveModal/EscalateModal + header + transcript sidebar; added ai_build branch that
|
||||
walks nodes via /next-node (passes node_text), disclaimer banner (`bg-warning/10` —
|
||||
NOTE: `*-dim` tokens are NOT `--color-*-dim`; use `/10` opacity), terminal→modals.
|
||||
- Tasks 14/15 took THREE commits because the flaky shell caused two broken commits
|
||||
(`df7150f`, `f483196` had missing-export/props errors; `ad9c4c8` was committed with
|
||||
TSC_EXIT=2 because I batched the commit with its own failing verification). The REAL
|
||||
working fix is **`4d3e2f1`** — confirmed via single-value commands: committed
|
||||
`L1WalkTreeVariant.tsx` has `advanceNode` (grep -c = 3), committed `L1Dashboard.tsx`
|
||||
has `useSuggestedFlow` (= 2); and a sentinel-wrapped `npx tsc -b` returned TSC=0,
|
||||
eslint=0 on the on-disk files before commit. What landed:
|
||||
- `L1Dashboard.tsx`: outcome dispatch on the REAL page (matched/build→walker;
|
||||
suggest→use-flow/build-new; out_of_scope→escalate-without-walk). Original
|
||||
PageMeta/greeting/inputs/open-tickets layout preserved.
|
||||
- `L1WalkTreeVariant.tsx`: real props `{session,onSessionUpdate,onDone}` +
|
||||
ResolveModal/EscalateModal + header + transcript sidebar kept; added ai_build branch
|
||||
that walks nodes via /next-node (passes node_text), disclaimer banner (`bg-warning/10`
|
||||
— NOTE: `*-dim` tokens are NOT `--color-*-dim`; use `/10` opacity), terminal→modals.
|
||||
flow/proposal keep the Phase-1 synthetic path.
|
||||
- `L1WalkPage.tsx` unchanged (already routes ai_build → tree variant).
|
||||
NOT browser-verified (chromium can't launch here).
|
||||
- **Verified clean state: HEAD `2cc7c83`, working tree clean.**
|
||||
- **SHELL DISCIPLINE for resume:** single-value Bash commands (`grep -c`, `wc -l`,
|
||||
`git rev-parse --short`, `git log -1 --format=%s`) are RELIABLE; multi-line
|
||||
`{ echo; … } > file` blocks get GARBLED/interleaved. NEVER batch a commit with its
|
||||
own verification — verify in a separate step and READ the result before committing.
|
||||
|
||||
## Resume point — Tasks 16–19
|
||||
|
||||
|
||||
Reference in New Issue
Block a user