# Deferred Items — Phase 11 Items discovered during execution that are out of scope for the current plan/task but logged for future cleanup. ## From Plan 11-01 ### 1. `drizzle-kit generate` non-functional (migration tooling drift) - **Found during:** 11-01, Task 1, step 5 - **Issue:** `src/db/migrations/meta/_journal.json` and snapshot files are out of sync with `schema.ts`. Only `meta/0000_snapshot.json` exists; the journal has entries through `0001` only; SQL files `0003`, `0004`, `0005` (and now `0006`, added in 11-01) were hand-written without corresponding journal entries or snapshots. Running `npx drizzle-kit generate` fails immediately with `Error: Interactive prompts require a TTY terminal` because drizzle-kit computes a huge diff against the stale `0000` snapshot. - **Origin:** Pre-existing since Phase 8 (commit `f727954`, "feat(08-02): create Phase 8 migration and validation script" — hand-wrote `0003_offer_phases_quote_templates.sql` without updating journal/snapshots). - **Impact:** Every future migration in this repo must be hand-written following Drizzle's SQL output conventions (as 11-01 did for `0006_add_tags_table.sql`) until snapshots are reconciled. Low risk as long as the convention is followed consistently, but increases manual effort and risk of SQL syntax drift from what Drizzle would generate. - **Recommended fix:** Architectural-scope task (Rule 4 — requires user decision): either (a) regenerate `meta/*_snapshot.json` files for `0001`-`0006` by introspecting the current live schema with `drizzle-kit pull` or manual reconstruction, or (b) accept hand-written migrations as the permanent convention and document it explicitly in `CLAUDE.md`/project docs so future agents don't attempt `drizzle-kit generate` and waste a turn on the TTY error. - **Status:** Not fixed. Logged only. ### 2. Stale `quote_items` ↔ `service_catalog` JOIN in `admin-queries.ts` - **Found during:** 11-01 Task 2 (carried over from `11-CONTEXT.md` "Claude's Discretion") - **Issue:** `src/lib/admin-queries.ts` (lines ~335/343 and ~531/539) does `leftJoin(service_catalog, eq(quote_items.service_id, service_catalog.id))`, but `quote_items.service_id` is typed as `references(() => services.id, ...)` (post-Phase-8). For `quote_items` rows created after Phase 8, this JOIN won't match and the label falls back to `COALESCE(..., quote_items.custom_label)`, which may be `null`. - **Impact:** Low — admin-only label display in client/project workspace quote_items list. Non-blocking per `11-CONTEXT.md`. - **Recommended fix:** 4-line change — replace `leftJoin(service_catalog, ...)` with `leftJoin(services, eq(quote_items.service_id, services.id))` and `service_catalog.name` with `services.name` in both `COALESCE` expressions, at both line ranges. - **Status:** Not fixed. Candidate for Phase 12 cleanup or standalone hotfix. ### 3. `.planning/ROADMAP.md` is an empty placeholder for v2.1 - **Found during:** 11-01 state-update step (`gsd-sdk roadmap update-plan-progress 11`) - **Issue:** `.planning/ROADMAP.md` contains only the literal text `PLACEHOLDER` (11 bytes). `roadmap update-plan-progress 11` ran without error (`"updated": true`) but there is no "Phase 11" section to update, so the file content did not change. The real v2.1 roadmap content (referenced throughout `11-CONTEXT.md`/`STATE.md` as "ROADMAP.md") does not exist in this file — only `milestones/v1.0-ROADMAP.md` and `milestones/v2.0-ROADMAP.md` exist. - **Impact:** Low for this plan (doesn't block 11-01 deliverables), but `roadmap update-plan-progress` is a no-op for the rest of v2.1 until this is fixed, and any future agent reading `@.planning/ROADMAP.md` for phase goals/success-criteria (as referenced in `11-CONTEXT.md` canonical_refs) will find nothing. - **Recommended fix:** Populate `.planning/ROADMAP.md` with the v2.1 roadmap content (Phases 11-17), likely should have been written during `/gsd-plan-phase` v2.1 setup (commit `03898f2` "docs(planning): v2.1 milestone setup + Phase 11 context/patterns" added `11-CONTEXT.md`/`11-PATTERNS.md` but apparently not `ROADMAP.md` body content). - **Status:** Not fixed — pre-existing planning-artifact gap, out of scope for this execution plan. ### 4. `gsd-sdk` CLI not available in 11-03 execution environment - **Found during:** 11-03, state-update step (`init.execute-phase`, `state.advance-plan`, `roadmap.update-plan-progress`, etc.) - **Issue:** `gsd-sdk` was not found on `PATH`, and no `node_modules`-installed copy or local CLI was discoverable. All state updates (`STATE.md` position/progress/metrics/decisions/session) for this plan were applied via direct `Edit` to `.planning/STATE.md` instead of via SDK query handlers. `ROADMAP.md`/`REQUIREMENTS.md` updates were skipped: `ROADMAP.md` is still the `PLACEHOLDER` (item #3 above, no Phase 11 section to update), and `REQUIREMENTS.md` already shows OFFER-07/OFFER-08 as "Complete" (marked during 11-02's execution, before this plan's UI work existed — see item #5). - **Impact:** Low for this plan — `STATE.md` was updated manually with equivalent content. No data loss. Future plans (11-04) should check `gsd-sdk` availability early and fall back to manual `STATE.md` edits if still missing. - **Status:** Not fixed — environment/tooling gap, out of scope for this execution plan. ### 5. OFFER-07/OFFER-08 marked "Complete" in REQUIREMENTS.md before their UI was built - **Found during:** 11-03, requirements-check step - **Issue:** `.planning/REQUIREMENTS.md` shows OFFER-07 ("L'utente vede ed edita il catalogo `services` come tabella con inline editing") and OFFER-08 (tag multi-select) as `Complete`, attributed to Phase 11 — but as of 11-02's completion, only the query layer + server actions existed (no UI). 11-03 (this plan) built the `EditableCell`/`TagMultiSelect` primitives, and 11-04 (not yet executed) is the plan that wires them into `ServiceTable` to deliver the actual user-facing inline-edit/tag UX described by OFFER-07/08. - **Impact:** Low — both requirements legitimately complete once 11-04 lands (this plan is a direct, immediate prerequisite, same wave sequence, no risk of the milestone closing prematurely mid-phase). However the "Complete" status in REQUIREMENTS.md was technically premature at the time 11-02 marked it. - **Recommended fix:** No action needed if 11-04 executes next as planned. If 11-04 is ever skipped/deferred, re-open OFFER-07/08 status in REQUIREMENTS.md to "In Progress" until the UI wiring lands. - **Status:** Not fixed — pre-existing from 11-02, informational only, expected to self-resolve when 11-04 completes.