Turn document · 2026-05-29 04:04 EDT · Beads issue islandflow-ep2

# Configure Impeccable Live Mode

Initialized Impeccable live-mode configuration for the Next.js app router so future visual iteration can inject the picker through `apps/web/app/layout.tsx` without a first-time setup detour.

## Summary

The repository already had `PRODUCT.md` and `DESIGN.md`, so initialization preserved the existing Islandflow design context and added the missing live-mode configuration.

## Changes Made

- Added `.impeccable/live/config.json` for a Next.js App Router project.
- Configured live injection to target `apps/web/app/layout.tsx` before `</body>` using JSX comment syntax.
- Marked CSP as checked after the detector reported no Content Security Policy to patch.
- Ignored the local runtime file `.impeccable/live/server.json`, which is regenerated when the live helper starts.
- Created and claimed Beads issue `islandflow-ep2` for the setup work.

## Context

The Impeccable setup flow found existing product and design documents. The project register is `product`, and the UI conventions are already established around a dark evidence-console interface with amber as a sparse action and attention signal.

## Important Implementation Details

- The app uses the Next.js App Router, so the canonical live target is `apps/web/app/layout.tsx`.
- The app shell already loads Quantico, IBM Plex Sans, and IBM Plex Mono, matching the documented Islandflow Terminal design system.
- CSP detection returned `{"shape": null, "signals": []}`, so no source-level CSP patch was needed.
- Running `live.mjs` creates `.impeccable/live/server.json` locally and temporarily injects a live script marker into `layout.tsx`; the source marker was removed after validation because the committed setup should stay configuration-only.

## Relevant Diff Snippets

`@pierre/diffs` could not be run in this environment because the package did not expose a detectable executable, so this section uses a plain labeled diff fallback.

    diff --git a/.impeccable/live/config.json b/.impeccable/live/config.json
    new file mode 100644
    --- /dev/null
    +++ b/.impeccable/live/config.json
    @@
    +{
    +  "files": ["apps/web/app/layout.tsx"],
    +  "insertBefore": "</body>",
    +  "commentSyntax": "jsx",
    +  "cspChecked": true
    +}

    diff --git a/.gitignore b/.gitignore
    @@
     # Local assistant artifacts
     session-ses_*.md
     token-usage-output.txt
    +.impeccable/live/server.json

## Expected Impact for End-Users

This does not change the Islandflow web UI for normal users. It improves the design workflow for contributors by letting `$impeccable live` start against the existing app shell and preserve the documented product/design identity during visual iteration.

## Validation

- Ran `node .agents/skills/impeccable/scripts/context.mjs` and confirmed existing `PRODUCT.md` and `DESIGN.md`.
- Read `reference/init.md`, `reference/product.md`, and the live-mode setup guidance.
- Ran `node .agents/skills/impeccable/scripts/detect-csp.mjs`; no CSP was detected.
- Ran `node .agents/skills/impeccable/scripts/live.mjs`; it returned `"ok": true`, `pageFiles: ["apps/web/app/layout.tsx"]`, and `configDrift: null`.
- Confirmed and removed the temporary live script injection from `apps/web/app/layout.tsx` so production source is not coupled to a localhost helper port.

## Issues, Limitations, and Mitigations

- `@pierre/diffs` was unavailable as a runnable CLI, so the documentation includes a plain diff fallback.
- The live helper was only boot-validated. No interactive browser live session was started because the request was initialization, not variant generation.
- Future `$impeccable live` runs may temporarily reinject the localhost script marker while live mode is active; review that diff before committing unrelated UI work.
- The generated `server.json` file is intentionally ignored to avoid committing local helper state.

## Follow-up Work

- Run `$impeccable live` during the next UI iteration to select elements in the browser and generate on-brand variants.
- Run `$impeccable critique apps/web/app/terminal.tsx` if you want a scored review of the main terminal surface.
- No Beads follow-up issue was created because this task completed the requested initialization.