diff --git a/PHASE-8-PROGRESS.md b/PHASE-8-PROGRESS.md index e0ab7ac..ca7ad16 100644 --- a/PHASE-8-PROGRESS.md +++ b/PHASE-8-PROGRESS.md @@ -56,10 +56,21 @@ PWA install behaviour is browser-state. To verify on your own device: ## Plan 8c — Per-project markdown context -- [ ] Task 1: Schema -- [ ] Task 2: The intake context extension -- [ ] Task 3: The prompt modules -- [ ] Task 4: The prompt tests -- [ ] Task 5: The owner editor -- [ ] Task 6: Wire the editor into the admin page -- [ ] Task 7: Full verification +- [x] Task 1: Schema — `7df7074`. Optional `projects.background_md`, max 40000 chars. Migration idempotent (says "already present" on re-run). +- [x] Tasks 2 + 3: Intake context + prompt modules — `4a31b16`. `IntakeContext.backgroundMd`; `intakeContext` reads + truncates to 30000-char prompt cap with marker. Both prompts add a "Background on this app" section framed as the developer's own notes. +- [x] Task 4: Prompt tests — `5c6f82c`. 9 new tests in `prompt.test.ts` (was 11, now 20). **The byte-identical test is the day-one regression guard**: every existing project gets empty `background_md` after migration, and the empty path must produce exactly the pre-8c prompt. +- [x] Task 5: Owner editor — Server Action `setProjectBackgroundMdAction` (owner-only, slices to 40000) + `BackgroundMdEditor` (one textarea, live counter, explicit Save, repo URL as "see also"). +- [x] Task 6: Wire into admin — `2432fff`. Editor sits below IntakeLinksPanel on `/admin/projects/[projectId]`. +- [x] Task 7: Full verification — `npm test` 459/459 (was 450, +9 prompt tests), 11/11 phase-8 integration tests, `npm run build` clean. Manual walkthrough documented below. + +## Phase 8c manual walkthrough + +1. Sign in as owner → `/admin/projects/` → scroll past `Public intake links` to "Background notes for the assistant". +2. Type a short markdown doc, Save, reload — doc persists. +3. Paste 50000 chars, Save, reload. Stored value is the first 40000 chars (field cap); wizard receives first 30000 + truncation marker. +4. With an AI provider configured, run the wizard as a client manager on the same project. The first question should reference your doc (e.g. "the quotes area does X — is that what you mean?"). +5. Sign out, open a public token for the same project, run the wizard. Same prompt fires — `intakeContext` is the single code path. + +## Phase 8 — complete + +All three sub-plans (8a public route, 8b PWA shell, 8c markdown context) are committed.