vc-extras 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +128 -71
- package/agent-install.mjs +159 -0
- package/agents/tester.md +23 -23
- package/install-extras.mjs +41 -109
- package/install-menu.mjs +22 -43
- package/install-skills.mjs +112 -112
- package/package.json +72 -28
- package/plugin-registry.mjs +73 -0
- package/plugins/config-ui/index.ts +159 -159
- package/plugins/config-ui/lib/arguments.mjs +24 -24
- package/plugins/config-ui/lib/documents.mjs +67 -67
- package/plugins/config-ui/lib/frontmatter.mjs +91 -91
- package/plugins/config-ui/lib/open.mjs +16 -16
- package/plugins/config-ui/lib/ownership.mjs +99 -99
- package/plugins/config-ui/lib/page.mjs +11 -11
- package/plugins/config-ui/lib/patch.mjs +35 -35
- package/plugins/config-ui/lib/paths.mjs +14 -14
- package/plugins/config-ui/lib/plugin-fields.mjs +86 -86
- package/plugins/config-ui/lib/plugin-validation.mjs +28 -28
- package/plugins/config-ui/lib/redaction.mjs +8 -8
- package/plugins/config-ui/lib/registry.mjs +282 -282
- package/plugins/config-ui/lib/secrets.mjs +44 -44
- package/plugins/config-ui/lib/server.mjs +250 -250
- package/plugins/config-ui/lib/sources.mjs +96 -96
- package/plugins/config-ui/lib/state.mjs +156 -156
- package/plugins/config-ui/lib/themes.mjs +113 -113
- package/plugins/config-ui/lib/writer.mjs +690 -690
- package/plugins/config-ui/project-local-owner.ts +106 -106
- package/plugins/config-ui/vc-extras.plugin.json +13 -0
- package/plugins/config-ui/web/app.mjs +997 -997
- package/plugins/config-ui/web/index.html +342 -342
- package/plugins/pi-blackhole/vc-extras.plugin.json +12 -0
- package/plugins/pi-btw/vc-extras.plugin.json +12 -0
- package/plugins/pi-claude-code/vc-extras.plugin.json +12 -0
- package/plugins/pi-fff/vc-extras.plugin.json +12 -0
- package/plugins/pi-jev-auto-mode/vc-extras.plugin.json +12 -0
- package/plugins/pi-mcp-adapter/vc-extras.plugin.json +12 -0
- package/plugins/pi-web-access/vc-extras.plugin.json +12 -0
- package/plugins/vc-ask/claude-hook.mjs +37 -0
- package/plugins/vc-ask/codex-native.mjs +28 -0
- package/plugins/vc-ask/host-channel.mjs +75 -0
- package/plugins/vc-ask/index.ts +57 -0
- package/plugins/vc-ask/native-questions.mjs +33 -0
- package/plugins/vc-ask/package.json +10 -0
- package/plugins/vc-ask/payload.ts +170 -0
- package/plugins/vc-ask/questionnaire/LICENSE.ask-user-question +21 -0
- package/plugins/vc-ask/questionnaire/UPSTREAM.md +104 -0
- package/plugins/vc-ask/questionnaire/answer-channel.ts +135 -0
- package/plugins/vc-ask/questionnaire/config.ts +180 -0
- package/plugins/vc-ask/questionnaire/events.ts +154 -0
- package/plugins/vc-ask/questionnaire/execute.ts +688 -0
- package/plugins/vc-ask/questionnaire/i18n.ts +73 -0
- package/plugins/vc-ask/questionnaire/inline-entry.ts +312 -0
- package/plugins/vc-ask/questionnaire/locales/de.json +43 -0
- package/plugins/vc-ask/questionnaire/locales/en.json +42 -0
- package/plugins/vc-ask/questionnaire/locales/es.json +43 -0
- package/plugins/vc-ask/questionnaire/locales/fr.json +43 -0
- package/plugins/vc-ask/questionnaire/locales/pt-BR.json +43 -0
- package/plugins/vc-ask/questionnaire/locales/pt.json +43 -0
- package/plugins/vc-ask/questionnaire/locales/ru.json +43 -0
- package/plugins/vc-ask/questionnaire/locales/uk.json +43 -0
- package/plugins/vc-ask/questionnaire/locales/zh.json +46 -0
- package/plugins/vc-ask/questionnaire/presentation.ts +11 -0
- package/plugins/vc-ask/questionnaire/question-preview.ts +6 -0
- package/plugins/vc-ask/questionnaire/rpc.ts +221 -0
- package/plugins/vc-ask/questionnaire/session-timeout.ts +67 -0
- package/plugins/vc-ask/questionnaire/state/build-questionnaire.ts +144 -0
- package/plugins/vc-ask/questionnaire/state/external-editor.ts +62 -0
- package/plugins/vc-ask/questionnaire/state/geometry.ts +131 -0
- package/plugins/vc-ask/questionnaire/state/key-router.ts +382 -0
- package/plugins/vc-ask/questionnaire/state/panel-router.ts +32 -0
- package/plugins/vc-ask/questionnaire/state/questionnaire-session.ts +642 -0
- package/plugins/vc-ask/questionnaire/state/row-intent.ts +143 -0
- package/plugins/vc-ask/questionnaire/state/selectors/contract.ts +24 -0
- package/plugins/vc-ask/questionnaire/state/selectors/derivations.ts +40 -0
- package/plugins/vc-ask/questionnaire/state/selectors/focus.ts +17 -0
- package/plugins/vc-ask/questionnaire/state/selectors/projections.ts +99 -0
- package/plugins/vc-ask/questionnaire/state/state-reducer.ts +455 -0
- package/plugins/vc-ask/questionnaire/state/state.ts +90 -0
- package/plugins/vc-ask/questionnaire/state/vertical.ts +158 -0
- package/plugins/vc-ask/questionnaire/timeout.ts +59 -0
- package/plugins/vc-ask/questionnaire/tool/external-answer.ts +103 -0
- package/plugins/vc-ask/questionnaire/tool/format-answer.ts +24 -0
- package/plugins/vc-ask/questionnaire/tool/normalize-params.ts +37 -0
- package/plugins/vc-ask/questionnaire/tool/response-envelope.ts +75 -0
- package/plugins/vc-ask/questionnaire/tool/types.ts +74 -0
- package/plugins/vc-ask/questionnaire/tool/validate-questionnaire.ts +75 -0
- package/plugins/vc-ask/questionnaire/view/card-theme.ts +245 -0
- package/plugins/vc-ask/questionnaire/view/components/inline-input.ts +66 -0
- package/plugins/vc-ask/questionnaire/view/components/multi-select-view.ts +177 -0
- package/plugins/vc-ask/questionnaire/view/components/option-list-view.ts +65 -0
- package/plugins/vc-ask/questionnaire/view/components/preview/markdown-content-cache.ts +101 -0
- package/plugins/vc-ask/questionnaire/view/components/preview/preview-block-renderer.ts +130 -0
- package/plugins/vc-ask/questionnaire/view/components/preview/preview-box-renderer.ts +86 -0
- package/plugins/vc-ask/questionnaire/view/components/preview/preview-layout-decider.ts +204 -0
- package/plugins/vc-ask/questionnaire/view/components/preview/preview-pane.ts +257 -0
- package/plugins/vc-ask/questionnaire/view/components/submit-picker.ts +65 -0
- package/plugins/vc-ask/questionnaire/view/components/tab-bar.ts +57 -0
- package/plugins/vc-ask/questionnaire/view/components/wrapping-select.ts +269 -0
- package/plugins/vc-ask/questionnaire/view/dialog-builder.ts +319 -0
- package/plugins/vc-ask/questionnaire/view/document-theme.ts +53 -0
- package/plugins/vc-ask/questionnaire/view/document-view.ts +306 -0
- package/plugins/vc-ask/questionnaire/view/panel-chrome.ts +133 -0
- package/plugins/vc-ask/questionnaire/view/props-adapter.ts +77 -0
- package/plugins/vc-ask/questionnaire/view/stateful-view.ts +24 -0
- package/plugins/vc-ask/questionnaire/view/tab-components.ts +16 -0
- package/plugins/vc-ask/questionnaire/view/tab-content-strategy.ts +280 -0
- package/plugins/vc-ask/questionnaire/view/vertical-view.ts +218 -0
- package/plugins/vc-ask/user-input-events.ts +34 -0
- package/plugins/vc-ask/vc-extras.plugin.json +18 -0
- package/plugins/vc-footer/agents/claude-code/adapter.mjs +29 -0
- package/plugins/vc-footer/agents/claude-code/cli.mjs +23 -0
- package/plugins/vc-footer/agents/claude-code/renderer.mjs +1 -0
- package/plugins/vc-footer/agents/claude-code/types.d.ts +38 -0
- package/plugins/vc-footer/agents/codex/adapter.mjs +13 -0
- package/plugins/vc-footer/agents/codex/mcp.mjs +45 -0
- package/plugins/vc-footer/agents/codex/native.mjs +19 -0
- package/plugins/vc-footer/agents/codex/renderer.mjs +2 -0
- package/plugins/vc-footer/agents/pi/adapter.mjs +23 -0
- package/plugins/vc-footer/agents/pi/index.js +84 -0
- package/plugins/vc-footer/agents/pi/project-local-owner.mjs +97 -0
- package/plugins/vc-footer/agents/pi/renderer.mjs +5 -0
- package/plugins/vc-footer/core/data.mjs +218 -0
- package/plugins/vc-footer/core/render.mjs +291 -0
- package/plugins/vc-footer/core/types.d.ts +29 -0
- package/plugins/vc-footer/package.json +22 -0
- package/plugins/vc-footer/vc-extras.plugin.json +32 -0
- package/skills/animate/LICENSE +21 -21
- package/skills/animate/RECIPES.md +324 -324
- package/skills/animate/SKILL.md +208 -208
- package/skills/animate/UPSTREAM.md +19 -19
- package/skills/animation-performance/LICENSE +21 -21
- package/skills/animation-performance/SKILL.md +223 -223
- package/skills/animation-performance/UPSTREAM.md +19 -19
- package/skills/answer-me-with-html/SKILL.md +174 -174
- package/skills/answer-me-with-html/scripts/am.mjs +12896 -12896
- package/skills/apple-design/LICENSE +21 -21
- package/skills/apple-design/SKILL.md +291 -291
- package/skills/apple-design/UPSTREAM.md +19 -19
- package/skills/bad-smell/SKILL.md +44 -44
- package/skills/commit/SKILL.md +90 -90
- package/skills/emil-design-eng/LICENSE +21 -21
- package/skills/emil-design-eng/SKILL.md +677 -677
- package/skills/emil-design-eng/UPSTREAM.md +19 -19
- package/skills/find-the-truth/SKILL.md +38 -38
- package/skills/find-the-truth/references/trace-method.md +48 -48
- package/skills/find-the-truth/references/truth-method.md +39 -39
- package/skills/gestures/LICENSE +21 -21
- package/skills/gestures/SKILL.md +107 -107
- package/skills/gestures/UPSTREAM.md +19 -19
- package/skills/humanizer-zh/LICENSE +21 -21
- package/skills/humanizer-zh/SKILL.md +409 -409
- package/skills/humanizer-zh/UPSTREAM.md +7 -7
- package/skills/impeccable/LICENSE +191 -191
- package/skills/impeccable/NOTICE.md +11 -11
- package/skills/impeccable/SKILL.md +89 -89
- package/skills/impeccable/licenses/modern-screenshot-MIT.txt +8 -8
- package/skills/impeccable/licenses/platform-design-skills-MIT.txt +21 -21
- package/skills/impeccable/reference/adapt.md +318 -318
- package/skills/impeccable/reference/adapt.native.md +58 -58
- package/skills/impeccable/reference/android.md +46 -46
- package/skills/impeccable/reference/animate.md +89 -89
- package/skills/impeccable/reference/audit.md +139 -139
- package/skills/impeccable/reference/audit.native.md +139 -139
- package/skills/impeccable/reference/bolder.md +33 -33
- package/skills/impeccable/reference/clarify.md +94 -94
- package/skills/impeccable/reference/colorize.md +86 -86
- package/skills/impeccable/reference/component-review.md +63 -63
- package/skills/impeccable/reference/craft-floor.md +44 -44
- package/skills/impeccable/reference/craft.md +5 -5
- package/skills/impeccable/reference/critique.md +819 -819
- package/skills/impeccable/reference/degraded/asset-producer.md +41 -41
- package/skills/impeccable/reference/degraded/documenter.md +23 -23
- package/skills/impeccable/reference/degraded/finish-reviewer.md +37 -37
- package/skills/impeccable/reference/degraded/manual-edit-applier.md +92 -92
- package/skills/impeccable/reference/delight.md +70 -70
- package/skills/impeccable/reference/distill.md +111 -111
- package/skills/impeccable/reference/doctor.md +54 -54
- package/skills/impeccable/reference/document.md +416 -416
- package/skills/impeccable/reference/extract.md +69 -69
- package/skills/impeccable/reference/generate.md +101 -101
- package/skills/impeccable/reference/harden.md +362 -362
- package/skills/impeccable/reference/hooks.md +114 -114
- package/skills/impeccable/reference/init.md +131 -131
- package/skills/impeccable/reference/ios.md +51 -51
- package/skills/impeccable/reference/layout.md +84 -84
- package/skills/impeccable/reference/live-setup.md +104 -104
- package/skills/impeccable/reference/live.md +327 -327
- package/skills/impeccable/reference/mode-operate.md +21 -21
- package/skills/impeccable/reference/mode-persuade.md +19 -19
- package/skills/impeccable/reference/mode-read.md +21 -21
- package/skills/impeccable/reference/new-work.md +152 -152
- package/skills/impeccable/reference/onboard.md +234 -234
- package/skills/impeccable/reference/operate.md +61 -61
- package/skills/impeccable/reference/optimize.md +257 -257
- package/skills/impeccable/reference/overdrive.md +127 -127
- package/skills/impeccable/reference/polish.md +105 -105
- package/skills/impeccable/reference/quieter.md +99 -99
- package/skills/impeccable/reference/region-map.md +26 -26
- package/skills/impeccable/reference/routing.md +24 -24
- package/skills/impeccable/reference/shape.md +59 -59
- package/skills/impeccable/reference/typeset.md +90 -90
- package/skills/impeccable/reference/visualize.md +47 -47
- package/skills/impeccable/scripts/VERSION +1 -1
- package/skills/impeccable/scripts/command-metadata.json +98 -98
- package/skills/impeccable/scripts/data/font-index-failures.json +120 -120
- package/skills/impeccable/scripts/engine-checksums.txt +9 -9
- package/skills/impeccable/scripts/impeccable +249 -249
- package/skills/impeccable/scripts/impeccable.cmd +278 -278
- package/skills/impeccable/scripts/live-browser-dom.js +320 -320
- package/skills/impeccable/scripts/live-browser-ignores.js +246 -246
- package/skills/impeccable/scripts/live-browser-session.js +183 -183
- package/skills/impeccable/scripts/live-browser.js +13862 -13862
- package/skills/impeccable/scripts/modern-screenshot.umd.js +14 -14
- package/skills/improve-animations/AUDIT.md +115 -115
- package/skills/improve-animations/LICENSE +21 -21
- package/skills/improve-animations/PLAN-TEMPLATE.md +73 -73
- package/skills/improve-animations/SKILL.md +110 -110
- package/skills/improve-animations/UPSTREAM.md +19 -19
- package/skills/pick-ui-library/LICENSE +21 -21
- package/skills/pick-ui-library/SKILL.md +85 -85
- package/skills/pick-ui-library/UPSTREAM.md +19 -19
- package/skills/review-animations/LICENSE +21 -21
- package/skills/review-animations/SKILL.md +120 -120
- package/skills/review-animations/STANDARDS.md +187 -187
- package/skills/review-animations/UPSTREAM.md +19 -19
- package/skills/test/SKILL.md +29 -29
- package/skills/test/references/test-method.md +60 -60
- package/skills/write-doc/SKILL.md +115 -115
- package/skills/write-doc/examples/result-report.md +53 -53
- package/skills/write-doc/examples/task-summary.md +45 -45
- package/skills/write-doc/references/terminology.md +147 -147
- package/specs/ask-host-protocol-v1.md +58 -0
- package/specs/design-demo.md +1102 -1102
- package/specs/frontend-immersive.md +28 -28
- package/specs/plugin-install-v2.md +123 -0
- package/specs/plugin-install.md +38 -0
- package/specs/web-modes/explore.md +31 -31
- package/specs/web-modes/risk.md +15 -15
- package/specs/web-modes/verify.md +16 -16
- package/vc-extras.mjs +46 -62
- package/plugins/essrj/context.ts +0 -47
- package/plugins/essrj/data.ts +0 -190
- package/plugins/essrj/index.ts +0 -139
- package/plugins/essrj/package.json +0 -12
- package/plugins/essrj/project-local-owner.ts +0 -106
- package/plugins/essrj/render.ts +0 -217
- package/plugins/essrj/types.ts +0 -40
- package/plugins.json +0 -38
|
@@ -1,114 +1,114 @@
|
|
|
1
|
-
# /impeccable hooks
|
|
2
|
-
|
|
3
|
-
Manage the **design detector hook** for the current project.
|
|
4
|
-
|
|
5
|
-
The hook runs the impeccable design detector on direct file edits to design-relevant files (`.tsx`, `.jsx`, `.html`, `.vue`, `.svelte`, `.astro`, `.css`, `.scss`, `.sass`, `.less`, `.ts`, `.js`). Claude Code, Codex, Cursor, and GitHub Copilot use a post-tool-use hook and push a short system reminder into the agent's context after the edit; findings get a correction prompt, pending issues get a re-nudge, and clean UI-ish files get a short ack unless quiet mode is on (`hook.quiet` in config). Plain `.ts` and `.js` files are still scanned, but stay quiet unless the detector finds something. Grok Build fires the same PostToolUse scan to mark touched files, then surfaces findings on Stop `additionalContext`. Do not expect a Grok per-edit reminder: Grok discards that stdout.
|
|
6
|
-
|
|
7
|
-
The detector rules run in two tiers. The per-edit hook surfaces only the immediate tier: mechanical, unambiguous problems worth interrupting an edit for, such as broken images, overflowing content, contrast and legibility failures, gradient text, glow shadows, and design-system drift. Everything else (copy cadence, palette and typography taste, layout rhythm) is deferred to a deep pass on the `Stop` hook event, which runs the full rule set over every UI file touched in the session and surfaces the remaining findings once, deduplicated against what the per-edit pass already reported. A session with nothing left to report stops silently. Set `hook.perEditRules` to `"all"` in `.impeccable/config.json` to restore the full rule set on every edit. The Stop deep pass is wired for Claude Code, Codex, and Grok Build, which dispatch a native `Stop` hook event. Cursor does not get one (its `stop` hook can only answer with a follow-up user message), and GitHub Copilot's stop-style events do not feed context back to the model, so they keep the full detector per edit. Grok also fires an observe-only Stop with `reason: "shutdown"` after `end_turn`; skip that one, scan only `end_turn`.
|
|
8
|
-
|
|
9
|
-
Every hook is a mechanical pass. The reflexes no scanner catches live in [craft-floor.md](craft-floor.md), which the skill loads before it edits UI, so they apply whether or not a hook is wired. A session with no automatic hook gets one `MANUAL_DETECTOR_REQUIRED` directive from `impeccable context` asking for a single detector run at the end.
|
|
10
|
-
|
|
11
|
-
This command toggles the hook **per project** by editing `.impeccable/config.json` (the unified Impeccable config; hook runtime settings live under its `hook` key, and shared detector ignores live under `detector`). Per-developer overrides, including the install consent decision (`hook.consent`) the CLI records, live in the gitignored `.impeccable/config.local.json`. Set `hook.enabled: false` to turn the hook off, `hook.quiet: true` to silence the clean/pending acks, or `hook.auditLog` to a file path for an NDJSON log. The legacy `IMPECCABLE_HOOK_DISABLED`, `IMPECCABLE_HOOK_QUIET`, and `IMPECCABLE_HOOK_LOG` env vars are still honored and override these config values when set.
|
|
12
|
-
|
|
13
|
-
Declare server-side template extensions under **`detector.extensions`** when the project uses Blade, Twig, ERB, or Handlebars files; the hook skips them otherwise because they sit outside the built-in extension list. One entry per extension, `{ "ext": ".blade.php", "engine": "html" }`. `engine` picks the analyzer (`html` for markup templates, `text` for JS/TS/CSS-like files) and defaults to `html`. Match against the end of the filename, so double extensions like `.blade.php` and `.html.erb` work. Config only adds extensions; the built-in list always applies.
|
|
14
|
-
|
|
15
|
-
Manual `.pi/skills/impeccable/scripts/impeccable detect` scans use the same project filter config by default: `detector.ignoreRules`, `detector.ignoreFiles`, `detector.ignoreValues`, and `detector.designSystem.enabled`. `hook.enabled` only controls automatic hook execution, not manual CLI scans. Use `.pi/skills/impeccable/scripts/impeccable detect --no-config ...` for a raw detector run that ignores project config/context. Use `.pi/skills/impeccable/scripts/impeccable ignores ...` for direct CLI CRUD on the same detector ignores.
|
|
16
|
-
|
|
17
|
-
Supported harnesses: Claude Code (`.claude/settings.local.json` for a project-scope install; `~/.claude/settings.json` for a user-scope install; a project hook moved into shared `.claude/settings.json` is honored in place too), Codex (`.codex/hooks.json` in the project), Cursor (`.cursor/hooks.json` in the project), Grok Build (`.grok/hooks/impeccable.json` in the project; requires `/hooks-trust` or `--trust`), and GitHub Copilot (`.github/hooks/impeccable.json` in the project, a team-shared committed file that both the Copilot CLI and the cloud agent read). For the Copilot CLI, repo-level hooks fire once `.github/hooks/impeccable.json` is committed to the repository's default branch.
|
|
18
|
-
|
|
19
|
-
On **Cursor**, the hook runs on `postToolUse` for the `Write` tool (every agent file edit) and returns its reminder as `additional_context`, which Cursor adds after the tool result. Projects set up before this ran a `preToolUse` gate (`hook-before-edit`) that blocked bad writes before they landed; that gate still works until `hooks on`, `impeccable update`, or `impeccable doctor --fix` moves the entry to `postToolUse`.
|
|
20
|
-
|
|
21
|
-
Gemini installs session and completion hooks in `.gemini/settings.json`, merged into the settings already there (comments are tolerated; a commented file is backed up to `settings.json.bak` before the rewrite, and a file that is not valid JSON is left alone). It does not install a per-edit detector hook. The `BeforeTool` hook only rewrites shell commands that run `build-phase`, and only on macOS and Linux; on Windows (where Gemini runs hooks through PowerShell) no session id reaches the shell, so a comp build is not tied to the session and the completion reminder stays silent.
|
|
22
|
-
|
|
23
|
-
## Routing
|
|
24
|
-
|
|
25
|
-
The first argument is the action. Defaults to `status`.
|
|
26
|
-
|
|
27
|
-
| Action | What it does |
|
|
28
|
-
|---|---|
|
|
29
|
-
| `status` | Print current state, shared/local config paths, ignored rules / files / values, env override. |
|
|
30
|
-
| `on` | Set `enabled: true` in `.impeccable/config.json`, record local hook consent as accepted, and install/repair provider hook manifests when the skill is installed. |
|
|
31
|
-
| `off` | Set `enabled: false` in `.impeccable/config.json`. |
|
|
32
|
-
| `ignore-rule <id>` | Append `<id>` to `detector.ignoreRules`; for `overused-font`, requires `--all-values`. Suppresses the rule across the whole project. |
|
|
33
|
-
| `ignore-file <glob>` | Append `<glob>` to `detector.ignoreFiles`. Suppresses **every** rule for matching files. |
|
|
34
|
-
| `ignore-value <id> <value> [--shared] [--reason "..."]` | Append a rule/value suppression to shared `.impeccable/config.json`. |
|
|
35
|
-
| `ignore-value <id> <value> --local [--reason "..."]` | Append a private rule/value suppression to `.impeccable/config.local.json`. |
|
|
36
|
-
| `ignore-value <id> "*" --file <glob> [--file <glob>...]` | Turn one rule off in matching files only, leaving it active everywhere else. Repeat `--file`, or use `--file=<glob>` / `--files=<glob>`. A bare `"*"` with no `--file` is refused: use `ignore-rule <id>` if you really mean project-wide. |
|
|
37
|
-
| `reset` | Delete the project config, dedup cache, and Cursor pending queue, and remove the hook's entries from every provider manifest `on` installs, the committed Copilot file included (a team-shared `settings.json` that `on` never writes is never touched). |
|
|
38
|
-
|
|
39
|
-
## Flow
|
|
40
|
-
|
|
41
|
-
1. Resolve the action from the user's argument. If no action was given, default to `status`.
|
|
42
|
-
2. Invoke the admin script and pass the user's output through verbatim:
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
.pi/skills/impeccable/scripts/impeccable hooks <action> [args...]
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
3. If `<action>` is `off`, follow up with a one-line note: "Done. New edits will not trigger the design hook in this project until you run `/impeccable hooks on`."
|
|
49
|
-
4. If `<action>` is `on`, follow up with: "Done. The design hook will fire after the next Edit/Write on a UI file."
|
|
50
|
-
5. If `<action>` is `ignore-value`, `ignore-file`, or `ignore-rule`, just print the script output. The default scope is shared `.impeccable/config.json`; add `--local` only when the user explicitly asks for a private exception.
|
|
51
|
-
6. If `<action>` is `status`, just print the script output. Do not add commentary unless the user asked a follow-up question.
|
|
52
|
-
|
|
53
|
-
## Triage findings
|
|
54
|
-
|
|
55
|
-
The hook itself never writes ignore config; every exception goes through `impeccable hooks`. Triage each finding into one of three outcomes:
|
|
56
|
-
|
|
57
|
-
- **Real design problem**: fix it. Never add an ignore to skip a fix or to push a blocked write through.
|
|
58
|
-
- **Confident false positive or sanctioned exception**: persist the narrowest ignore yourself and disclose it in your reply. The bar is evidence you can name: an intentional demo or fixture, documentation of bad design, literal or domain-appropriate motion (a ball that bounces), or a choice the user already confirmed. Put that evidence in `--reason` as `"<who decided: evidence>"`; write "user confirmed" only when the user actually did.
|
|
59
|
-
- **Unsure**: leave the finding standing and ask the user in one line. Ask once; a one-line question costs less than the hook re-firing on every later edit.
|
|
60
|
-
|
|
61
|
-
Self-serve stops at `ignore-value`. `ignore-file` and `ignore-rule` silence too much to add on your own judgment; ask the user first.
|
|
62
|
-
|
|
63
|
-
Prefer the narrowest exception:
|
|
64
|
-
|
|
65
|
-
- If the finding line shows an `ignore-value <rule> <value>` pair, pass it to `impeccable hooks ignore-value` with your `--reason`. This writes shared `.impeccable/config.json` by default.
|
|
66
|
-
- For value-specific findings such as `overused-font` and `bounce-easing`, use `ignore-value` for the specific value. Do not use `ignore-rule overused-font` for a specific font.
|
|
67
|
-
- If the finding has no value-specific command, such as `side-tab`, scope that one rule to the file: `ignore-value <id> "*" --file <path>`. Run `.pi/skills/impeccable/scripts/impeccable detect <path>` first to see what actually fires there.
|
|
68
|
-
- Reach for `ignore-file <path>` only when the whole file is out of scope for design review: a fixture, a generated artifact, a deliberate slop demo. It silences every rule for that file permanently, including rules that have not been written yet. A real UI surface with one noisy rule wants the file-scoped value ignore above.
|
|
69
|
-
- Use `ignore-rule <id>` only when the user asks to suppress that whole rule across the project. For broad overused-font suppression, use `ignore-rule overused-font --all-values` only when the user asks to ignore overused fonts generally.
|
|
70
|
-
- Prefer config ignores (the commands above) by default; they keep suppressions in one reviewable place. Reach for an inline comment only when the waiver must travel with a single file that leaves the repo (a generated/exported standalone document, an emailed HTML file). The supported marker is `impeccable-disable <rule>` (whole file) or `impeccable-disable-line` / `impeccable-disable-next-line` (one line), in any comment syntax, with an optional reason after `:` or `--`. The detector honors it by default; `--no-inline-ignores` or `--no-config` bypasses it.
|
|
71
|
-
|
|
72
|
-
Example value-specific exception:
|
|
73
|
-
|
|
74
|
-
```bash
|
|
75
|
-
.pi/skills/impeccable/scripts/impeccable hooks ignore-value overused-font Inter --shared --reason "User confirmed Inter is intentional"
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
Example self-served exception, with the evidence named:
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
.pi/skills/impeccable/scripts/impeccable hooks ignore-value bounce-easing bounce-ball --shared --reason "Agent: literal ball-bounce animation, bounce easing is the subject"
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
Example whole-rule font exception:
|
|
85
|
-
|
|
86
|
-
```bash
|
|
87
|
-
.pi/skills/impeccable/scripts/impeccable hooks ignore-rule overused-font --all-values --reason "User asked to ignore overused fonts generally"
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
Example one-rule-in-one-file exception, for a file that is still worth reviewing
|
|
91
|
-
for everything else:
|
|
92
|
-
|
|
93
|
-
```bash
|
|
94
|
-
.pi/skills/impeccable/scripts/impeccable hooks ignore-value design-system-font-size "*" --file "src/overlay/widget.js" --reason "Injected widget builds its own type scale; DESIGN.md's ramp describes the site"
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
Example whole-file exception, for a file that is out of scope entirely:
|
|
98
|
-
|
|
99
|
-
```bash
|
|
100
|
-
.pi/skills/impeccable/scripts/impeccable hooks ignore-file "src/legacy/Card.tsx"
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
## Constraints
|
|
104
|
-
|
|
105
|
-
- Never modify `.impeccable/config.json` or `.impeccable/config.local.json` by hand from this command. Always go through `impeccable hooks` so writes stay validated and the file shape stays consistent. One exception: `detector.extensions` has no admin action, so when the user asks to cover a template stack, edit that one field in `.impeccable/config.json` directly and leave the rest of the file untouched.
|
|
106
|
-
- Do not edit the launcher or the binary behind `impeccable hook` and `impeccable hook-before-edit` from this flow. Those are skill plumbing.
|
|
107
|
-
- When a user asks how far to trust the hook, say it runs the engine unsandboxed with the agent's environment and network access (in the Copilot cloud agent too, once `.github/hooks/impeccable.json` is committed), and that the launcher checks a downloaded engine against `.pi/skills/impeccable/scripts/engine-checksums.txt` before its first run; **never** call it sandboxed.
|
|
108
|
-
- The hook never blocks an edit; it emits a post-edit reminder. (A Cursor project still on the old `preToolUse` gate can block a write until its manifest is migrated.) Disabling stops the reminders.
|
|
109
|
-
- The hook is bundled with the Impeccable skill. Project installs use `.claude/settings.local.json`, `.codex/hooks.json`, `.cursor/hooks.json`, `.github/hooks/impeccable.json`, and `.gemini/settings.json`; a user-scope Claude install uses `~/.claude/settings.json`. On Codex, the user must approve the hook via `/hooks` the first time. On Cursor, confirm hooks are enabled under Settings -> Hooks. On GitHub Copilot, the CLI loads `.github/hooks/impeccable.json` once it is committed to the repository's default branch, and the cloud agent reads it from the repo directly.
|
|
110
|
-
|
|
111
|
-
## Failure modes
|
|
112
|
-
|
|
113
|
-
- If `.impeccable/config.json` or `.impeccable/config.local.json` is unreadable or malformed, the hook ignores that file and uses the remaining valid config/defaults. `impeccable hooks status` will show malformed files as ignored.
|
|
114
|
-
- If the user asks to "disable the hook" globally, lead with `/impeccable hooks off` (persistent for this project; writes `hook.enabled: false` to config). The legacy `IMPECCABLE_HOOK_DISABLED=1` env var also works as a one-shot override that follows the shell.
|
|
1
|
+
# /impeccable hooks
|
|
2
|
+
|
|
3
|
+
Manage the **design detector hook** for the current project.
|
|
4
|
+
|
|
5
|
+
The hook runs the impeccable design detector on direct file edits to design-relevant files (`.tsx`, `.jsx`, `.html`, `.vue`, `.svelte`, `.astro`, `.css`, `.scss`, `.sass`, `.less`, `.ts`, `.js`). Claude Code, Codex, Cursor, and GitHub Copilot use a post-tool-use hook and push a short system reminder into the agent's context after the edit; findings get a correction prompt, pending issues get a re-nudge, and clean UI-ish files get a short ack unless quiet mode is on (`hook.quiet` in config). Plain `.ts` and `.js` files are still scanned, but stay quiet unless the detector finds something. Grok Build fires the same PostToolUse scan to mark touched files, then surfaces findings on Stop `additionalContext`. Do not expect a Grok per-edit reminder: Grok discards that stdout.
|
|
6
|
+
|
|
7
|
+
The detector rules run in two tiers. The per-edit hook surfaces only the immediate tier: mechanical, unambiguous problems worth interrupting an edit for, such as broken images, overflowing content, contrast and legibility failures, gradient text, glow shadows, and design-system drift. Everything else (copy cadence, palette and typography taste, layout rhythm) is deferred to a deep pass on the `Stop` hook event, which runs the full rule set over every UI file touched in the session and surfaces the remaining findings once, deduplicated against what the per-edit pass already reported. A session with nothing left to report stops silently. Set `hook.perEditRules` to `"all"` in `.impeccable/config.json` to restore the full rule set on every edit. The Stop deep pass is wired for Claude Code, Codex, and Grok Build, which dispatch a native `Stop` hook event. Cursor does not get one (its `stop` hook can only answer with a follow-up user message), and GitHub Copilot's stop-style events do not feed context back to the model, so they keep the full detector per edit. Grok also fires an observe-only Stop with `reason: "shutdown"` after `end_turn`; skip that one, scan only `end_turn`.
|
|
8
|
+
|
|
9
|
+
Every hook is a mechanical pass. The reflexes no scanner catches live in [craft-floor.md](craft-floor.md), which the skill loads before it edits UI, so they apply whether or not a hook is wired. A session with no automatic hook gets one `MANUAL_DETECTOR_REQUIRED` directive from `impeccable context` asking for a single detector run at the end.
|
|
10
|
+
|
|
11
|
+
This command toggles the hook **per project** by editing `.impeccable/config.json` (the unified Impeccable config; hook runtime settings live under its `hook` key, and shared detector ignores live under `detector`). Per-developer overrides, including the install consent decision (`hook.consent`) the CLI records, live in the gitignored `.impeccable/config.local.json`. Set `hook.enabled: false` to turn the hook off, `hook.quiet: true` to silence the clean/pending acks, or `hook.auditLog` to a file path for an NDJSON log. The legacy `IMPECCABLE_HOOK_DISABLED`, `IMPECCABLE_HOOK_QUIET`, and `IMPECCABLE_HOOK_LOG` env vars are still honored and override these config values when set.
|
|
12
|
+
|
|
13
|
+
Declare server-side template extensions under **`detector.extensions`** when the project uses Blade, Twig, ERB, or Handlebars files; the hook skips them otherwise because they sit outside the built-in extension list. One entry per extension, `{ "ext": ".blade.php", "engine": "html" }`. `engine` picks the analyzer (`html` for markup templates, `text` for JS/TS/CSS-like files) and defaults to `html`. Match against the end of the filename, so double extensions like `.blade.php` and `.html.erb` work. Config only adds extensions; the built-in list always applies.
|
|
14
|
+
|
|
15
|
+
Manual `.pi/skills/impeccable/scripts/impeccable detect` scans use the same project filter config by default: `detector.ignoreRules`, `detector.ignoreFiles`, `detector.ignoreValues`, and `detector.designSystem.enabled`. `hook.enabled` only controls automatic hook execution, not manual CLI scans. Use `.pi/skills/impeccable/scripts/impeccable detect --no-config ...` for a raw detector run that ignores project config/context. Use `.pi/skills/impeccable/scripts/impeccable ignores ...` for direct CLI CRUD on the same detector ignores.
|
|
16
|
+
|
|
17
|
+
Supported harnesses: Claude Code (`.claude/settings.local.json` for a project-scope install; `~/.claude/settings.json` for a user-scope install; a project hook moved into shared `.claude/settings.json` is honored in place too), Codex (`.codex/hooks.json` in the project), Cursor (`.cursor/hooks.json` in the project), Grok Build (`.grok/hooks/impeccable.json` in the project; requires `/hooks-trust` or `--trust`), and GitHub Copilot (`.github/hooks/impeccable.json` in the project, a team-shared committed file that both the Copilot CLI and the cloud agent read). For the Copilot CLI, repo-level hooks fire once `.github/hooks/impeccable.json` is committed to the repository's default branch.
|
|
18
|
+
|
|
19
|
+
On **Cursor**, the hook runs on `postToolUse` for the `Write` tool (every agent file edit) and returns its reminder as `additional_context`, which Cursor adds after the tool result. Projects set up before this ran a `preToolUse` gate (`hook-before-edit`) that blocked bad writes before they landed; that gate still works until `hooks on`, `impeccable update`, or `impeccable doctor --fix` moves the entry to `postToolUse`.
|
|
20
|
+
|
|
21
|
+
Gemini installs session and completion hooks in `.gemini/settings.json`, merged into the settings already there (comments are tolerated; a commented file is backed up to `settings.json.bak` before the rewrite, and a file that is not valid JSON is left alone). It does not install a per-edit detector hook. The `BeforeTool` hook only rewrites shell commands that run `build-phase`, and only on macOS and Linux; on Windows (where Gemini runs hooks through PowerShell) no session id reaches the shell, so a comp build is not tied to the session and the completion reminder stays silent.
|
|
22
|
+
|
|
23
|
+
## Routing
|
|
24
|
+
|
|
25
|
+
The first argument is the action. Defaults to `status`.
|
|
26
|
+
|
|
27
|
+
| Action | What it does |
|
|
28
|
+
|---|---|
|
|
29
|
+
| `status` | Print current state, shared/local config paths, ignored rules / files / values, env override. |
|
|
30
|
+
| `on` | Set `enabled: true` in `.impeccable/config.json`, record local hook consent as accepted, and install/repair provider hook manifests when the skill is installed. |
|
|
31
|
+
| `off` | Set `enabled: false` in `.impeccable/config.json`. |
|
|
32
|
+
| `ignore-rule <id>` | Append `<id>` to `detector.ignoreRules`; for `overused-font`, requires `--all-values`. Suppresses the rule across the whole project. |
|
|
33
|
+
| `ignore-file <glob>` | Append `<glob>` to `detector.ignoreFiles`. Suppresses **every** rule for matching files. |
|
|
34
|
+
| `ignore-value <id> <value> [--shared] [--reason "..."]` | Append a rule/value suppression to shared `.impeccable/config.json`. |
|
|
35
|
+
| `ignore-value <id> <value> --local [--reason "..."]` | Append a private rule/value suppression to `.impeccable/config.local.json`. |
|
|
36
|
+
| `ignore-value <id> "*" --file <glob> [--file <glob>...]` | Turn one rule off in matching files only, leaving it active everywhere else. Repeat `--file`, or use `--file=<glob>` / `--files=<glob>`. A bare `"*"` with no `--file` is refused: use `ignore-rule <id>` if you really mean project-wide. |
|
|
37
|
+
| `reset` | Delete the project config, dedup cache, and Cursor pending queue, and remove the hook's entries from every provider manifest `on` installs, the committed Copilot file included (a team-shared `settings.json` that `on` never writes is never touched). |
|
|
38
|
+
|
|
39
|
+
## Flow
|
|
40
|
+
|
|
41
|
+
1. Resolve the action from the user's argument. If no action was given, default to `status`.
|
|
42
|
+
2. Invoke the admin script and pass the user's output through verbatim:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
.pi/skills/impeccable/scripts/impeccable hooks <action> [args...]
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
3. If `<action>` is `off`, follow up with a one-line note: "Done. New edits will not trigger the design hook in this project until you run `/impeccable hooks on`."
|
|
49
|
+
4. If `<action>` is `on`, follow up with: "Done. The design hook will fire after the next Edit/Write on a UI file."
|
|
50
|
+
5. If `<action>` is `ignore-value`, `ignore-file`, or `ignore-rule`, just print the script output. The default scope is shared `.impeccable/config.json`; add `--local` only when the user explicitly asks for a private exception.
|
|
51
|
+
6. If `<action>` is `status`, just print the script output. Do not add commentary unless the user asked a follow-up question.
|
|
52
|
+
|
|
53
|
+
## Triage findings
|
|
54
|
+
|
|
55
|
+
The hook itself never writes ignore config; every exception goes through `impeccable hooks`. Triage each finding into one of three outcomes:
|
|
56
|
+
|
|
57
|
+
- **Real design problem**: fix it. Never add an ignore to skip a fix or to push a blocked write through.
|
|
58
|
+
- **Confident false positive or sanctioned exception**: persist the narrowest ignore yourself and disclose it in your reply. The bar is evidence you can name: an intentional demo or fixture, documentation of bad design, literal or domain-appropriate motion (a ball that bounces), or a choice the user already confirmed. Put that evidence in `--reason` as `"<who decided: evidence>"`; write "user confirmed" only when the user actually did.
|
|
59
|
+
- **Unsure**: leave the finding standing and ask the user in one line. Ask once; a one-line question costs less than the hook re-firing on every later edit.
|
|
60
|
+
|
|
61
|
+
Self-serve stops at `ignore-value`. `ignore-file` and `ignore-rule` silence too much to add on your own judgment; ask the user first.
|
|
62
|
+
|
|
63
|
+
Prefer the narrowest exception:
|
|
64
|
+
|
|
65
|
+
- If the finding line shows an `ignore-value <rule> <value>` pair, pass it to `impeccable hooks ignore-value` with your `--reason`. This writes shared `.impeccable/config.json` by default.
|
|
66
|
+
- For value-specific findings such as `overused-font` and `bounce-easing`, use `ignore-value` for the specific value. Do not use `ignore-rule overused-font` for a specific font.
|
|
67
|
+
- If the finding has no value-specific command, such as `side-tab`, scope that one rule to the file: `ignore-value <id> "*" --file <path>`. Run `.pi/skills/impeccable/scripts/impeccable detect <path>` first to see what actually fires there.
|
|
68
|
+
- Reach for `ignore-file <path>` only when the whole file is out of scope for design review: a fixture, a generated artifact, a deliberate slop demo. It silences every rule for that file permanently, including rules that have not been written yet. A real UI surface with one noisy rule wants the file-scoped value ignore above.
|
|
69
|
+
- Use `ignore-rule <id>` only when the user asks to suppress that whole rule across the project. For broad overused-font suppression, use `ignore-rule overused-font --all-values` only when the user asks to ignore overused fonts generally.
|
|
70
|
+
- Prefer config ignores (the commands above) by default; they keep suppressions in one reviewable place. Reach for an inline comment only when the waiver must travel with a single file that leaves the repo (a generated/exported standalone document, an emailed HTML file). The supported marker is `impeccable-disable <rule>` (whole file) or `impeccable-disable-line` / `impeccable-disable-next-line` (one line), in any comment syntax, with an optional reason after `:` or `--`. The detector honors it by default; `--no-inline-ignores` or `--no-config` bypasses it.
|
|
71
|
+
|
|
72
|
+
Example value-specific exception:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
.pi/skills/impeccable/scripts/impeccable hooks ignore-value overused-font Inter --shared --reason "User confirmed Inter is intentional"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Example self-served exception, with the evidence named:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
.pi/skills/impeccable/scripts/impeccable hooks ignore-value bounce-easing bounce-ball --shared --reason "Agent: literal ball-bounce animation, bounce easing is the subject"
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Example whole-rule font exception:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
.pi/skills/impeccable/scripts/impeccable hooks ignore-rule overused-font --all-values --reason "User asked to ignore overused fonts generally"
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Example one-rule-in-one-file exception, for a file that is still worth reviewing
|
|
91
|
+
for everything else:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
.pi/skills/impeccable/scripts/impeccable hooks ignore-value design-system-font-size "*" --file "src/overlay/widget.js" --reason "Injected widget builds its own type scale; DESIGN.md's ramp describes the site"
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Example whole-file exception, for a file that is out of scope entirely:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
.pi/skills/impeccable/scripts/impeccable hooks ignore-file "src/legacy/Card.tsx"
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Constraints
|
|
104
|
+
|
|
105
|
+
- Never modify `.impeccable/config.json` or `.impeccable/config.local.json` by hand from this command. Always go through `impeccable hooks` so writes stay validated and the file shape stays consistent. One exception: `detector.extensions` has no admin action, so when the user asks to cover a template stack, edit that one field in `.impeccable/config.json` directly and leave the rest of the file untouched.
|
|
106
|
+
- Do not edit the launcher or the binary behind `impeccable hook` and `impeccable hook-before-edit` from this flow. Those are skill plumbing.
|
|
107
|
+
- When a user asks how far to trust the hook, say it runs the engine unsandboxed with the agent's environment and network access (in the Copilot cloud agent too, once `.github/hooks/impeccable.json` is committed), and that the launcher checks a downloaded engine against `.pi/skills/impeccable/scripts/engine-checksums.txt` before its first run; **never** call it sandboxed.
|
|
108
|
+
- The hook never blocks an edit; it emits a post-edit reminder. (A Cursor project still on the old `preToolUse` gate can block a write until its manifest is migrated.) Disabling stops the reminders.
|
|
109
|
+
- The hook is bundled with the Impeccable skill. Project installs use `.claude/settings.local.json`, `.codex/hooks.json`, `.cursor/hooks.json`, `.github/hooks/impeccable.json`, and `.gemini/settings.json`; a user-scope Claude install uses `~/.claude/settings.json`. On Codex, the user must approve the hook via `/hooks` the first time. On Cursor, confirm hooks are enabled under Settings -> Hooks. On GitHub Copilot, the CLI loads `.github/hooks/impeccable.json` once it is committed to the repository's default branch, and the cloud agent reads it from the repo directly.
|
|
110
|
+
|
|
111
|
+
## Failure modes
|
|
112
|
+
|
|
113
|
+
- If `.impeccable/config.json` or `.impeccable/config.local.json` is unreadable or malformed, the hook ignores that file and uses the remaining valid config/defaults. `impeccable hooks status` will show malformed files as ignored.
|
|
114
|
+
- If the user asks to "disable the hook" globally, lead with `/impeccable hooks off` (persistent for this project; writes `hook.enabled: false` to config). The legacy `IMPECCABLE_HOOK_DISABLED=1` env var also works as a one-shot override that follows the shell.
|
|
@@ -1,131 +1,131 @@
|
|
|
1
|
-
# Init flow
|
|
2
|
-
|
|
3
|
-
`init` captures durable product truth in PRODUCT.md. It does not invent a visual world and does not write DESIGN.md; [new-work.md](new-work.md) creates or expands one, and [document.md](document.md) records an incumbent one. Existing runnable web projects may also receive `.impeccable/live/config.json`.
|
|
4
|
-
|
|
5
|
-
## Step 1: Load current state
|
|
6
|
-
|
|
7
|
-
Use the PRODUCT.md path resolved by `impeccable context`. Update it instead of creating a competing authority. In a child app inheriting root context, confirm shared versus app-specific scope before writing.
|
|
8
|
-
|
|
9
|
-
- **No PRODUCT.md:** explore, interview, and write it.
|
|
10
|
-
- **PRODUCT.md exists:** ask what product knowledge is stale or missing; do not reopen confirmed fields without a reason.
|
|
11
|
-
- **Legacy PRODUCT.md:** add only durable missing facts; absent `## Platform` means `web` unless evidence says otherwise.
|
|
12
|
-
- **Only DESIGN.md exists:** leave it untouched and create PRODUCT.md.
|
|
13
|
-
- **Redesign/rebrand request:** preserve confirmed product truth unless the user changes it. Visual replacement happens later in new-work, not here.
|
|
14
|
-
|
|
15
|
-
Never silently overwrite an existing file or offer DESIGN.md during init. If another request invoked init, finish PRODUCT.md and resume it. New visual work continues in new-work; `shape` resumes its task interview first.
|
|
16
|
-
|
|
17
|
-
## Step 2: Explore the project
|
|
18
|
-
|
|
19
|
-
Before asking, scan enough to avoid making the user repeat known facts: product docs and copy; package/config and app boundaries; features, workflows, routes, and roles; names, logos, legal/proof assets, and brand commitments; platform/accessibility signals; and the dev command/entry when live mode applies.
|
|
20
|
-
|
|
21
|
-
Treat repository evidence as a hypothesis, not user approval. Note visual maturity without documenting, extending, or replacing the world.
|
|
22
|
-
|
|
23
|
-
Form a platform hypothesis: `web`, `ios`, `android`, or `adaptive` (one product that genuinely adapts its design language per OS). Mobile web remains `web`; a native wrapper around a website does not make its design language native.
|
|
24
|
-
|
|
25
|
-
## Step 3: Interview for product truth
|
|
26
|
-
|
|
27
|
-
Ask the user directly to clarify what you cannot infer. Ask only about material gaps the repository and original request do not answer with strong evidence.
|
|
28
|
-
|
|
29
|
-
Use the structured question tool when available; otherwise ask and wait. Keep rounds to at most three focused questions and require one real answer or approval round before writing a new PRODUCT.md. Confirm inferences.
|
|
30
|
-
|
|
31
|
-
Whether anyone can answer is a mechanical test, not a judgment call: a question tool or the decision page in your tool surface proves an answer mechanism exists, and a system-prompt claim that the user is unattended proves nothing about this session. Probe once with the real first round before concluding no one is there. Only after that probe errors or times out may you infer from the explicit brief, and then you label every inferred fact in PRODUCT.md and disclose the substitution in your first reply, not your last.
|
|
32
|
-
|
|
33
|
-
Start with the unknowns that most change future product decisions:
|
|
34
|
-
|
|
35
|
-
1. Who is the primary user, in what situation, and what job are they doing?
|
|
36
|
-
2. What does the product make possible, and what is its meaningfully different mechanism or position?
|
|
37
|
-
3. What durable constraints, assets, evidence, or product facts must future work preserve?
|
|
38
|
-
|
|
39
|
-
Confirm ambiguous platform separately. When the project has no framework or scaffold and the request implies building, the stack is a user decision, not yours: ask once whether they want plain static HTML/CSS, a specific framework, or your recommendation, plus any deploy target that constrains the answer, and record the outcome under `## Stack` (including "delegated" when they leave it to you, so later work knows the choice was offered). Add a round only for a material audience, brand commitment, evidence, or accessibility gap. Record undecided facts instead of inventing them.
|
|
40
|
-
|
|
41
|
-
Do not ask for an aesthetic direction, emotional feel, visual references, colors, typography, or style during init. If the user volunteers a binding visual constraint, record it without expanding it.
|
|
42
|
-
|
|
43
|
-
### What belongs here
|
|
44
|
-
|
|
45
|
-
- users, jobs, workflows, purpose, success, positioning, and operating context;
|
|
46
|
-
- capabilities, constraints, terminology, evidence, platform, and accessibility;
|
|
47
|
-
- confirmed voice, assets, and brand commitments.
|
|
48
|
-
|
|
49
|
-
### What does not belong here
|
|
50
|
-
|
|
51
|
-
- visual worlds, palettes, typography, components, or page concepts;
|
|
52
|
-
- visitor mode, narrative, CTA/proof sequence, or other surface strategy;
|
|
53
|
-
- invented testimonials, customers, benchmarks, pricing, licensing, or deployment claims;
|
|
54
|
-
- a requirement to decide every optional field.
|
|
55
|
-
|
|
56
|
-
## Step 4: Write PRODUCT.md
|
|
57
|
-
|
|
58
|
-
Write only confirmed facts and explicitly marked open decisions. Omit irrelevant sections rather than filling them with generic prose.
|
|
59
|
-
|
|
60
|
-
```markdown
|
|
61
|
-
# Product
|
|
62
|
-
|
|
63
|
-
<!-- impeccable:product-schema 1 -->
|
|
64
|
-
|
|
65
|
-
## Platform
|
|
66
|
-
|
|
67
|
-
web
|
|
68
|
-
|
|
69
|
-
## Stack
|
|
70
|
-
[Greenfield only: the user's answer to the stack question, e.g. "static HTML/CSS", "Astro", or "delegated: <what you chose and why>". Omit the section when an existing codebase already answers it.]
|
|
71
|
-
|
|
72
|
-
## Users
|
|
73
|
-
[Primary users, their situation, and job. Add other audiences only when confirmed.]
|
|
74
|
-
|
|
75
|
-
## Product Purpose
|
|
76
|
-
[What the product does, why it exists, and what success means.]
|
|
77
|
-
|
|
78
|
-
## Positioning
|
|
79
|
-
[The product mechanism or claim a neighboring product could not truthfully copy.]
|
|
80
|
-
|
|
81
|
-
## Operating Context
|
|
82
|
-
[Workflows, environments, tools, documents, materials, and rituals that are factual parts of using or evaluating the product.]
|
|
83
|
-
|
|
84
|
-
## Capabilities and Constraints
|
|
85
|
-
[Confirmed functionality, technical constraints, terminology, and explicitly undecided product facts.]
|
|
86
|
-
|
|
87
|
-
## Brand Commitments
|
|
88
|
-
[Existing name, voice, assets, personality, identity constraints, and references the user explicitly made binding. Omit when none exist.]
|
|
89
|
-
|
|
90
|
-
## Evidence on Hand
|
|
91
|
-
[Real content, data, demonstrations, testimonials, case studies, press, or assets, with paths where applicable. State absences that future work must not fabricate.]
|
|
92
|
-
|
|
93
|
-
## Product Principles
|
|
94
|
-
[Three to five durable strategic principles derived from confirmed answers; no visual recipes.]
|
|
95
|
-
|
|
96
|
-
## Accessibility & Inclusion
|
|
97
|
-
[Known user needs or required standard. Omit when no product-specific requirement was established.]
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
Platform is the bare value `web`, `ios`, `android`, or `adaptive`. Preserve useful legacy headings. New files go at `PROJECT_ROOT/PRODUCT.md`; otherwise update the resolved file. Write it before any visual-world or surface-concept work.
|
|
101
|
-
|
|
102
|
-
Copy the `impeccable:product-schema` comment verbatim, including when you update an older file. It records which version of the product record this file follows, so later versions can tell a deliberately short record from one written before a section existed, and never propose an interview the user has already sat through. Update the number only when this reference's template changes it. Sections a later version retires are reported to you at boot as deprecated; delete them when the user agrees rather than carrying them forward.
|
|
103
|
-
|
|
104
|
-
When the platform you just recorded is `ios`, `android`, or `adaptive`, load [ios.md](ios.md), [android.md](android.md), or both before any design work. On a project that had no PRODUCT.md, `impeccable context` could not know the platform and so never loaded them; init is the only place that learns the answer.
|
|
105
|
-
|
|
106
|
-
### Completion gate
|
|
107
|
-
|
|
108
|
-
Before loading new-work or resuming shape/build, verify that PRODUCT.md exists at the resolved path and contains the confirmed product record. If the file is absent, init is incomplete. Do not substitute interview notes, a planning packet, or later design prose for the file.
|
|
109
|
-
|
|
110
|
-
## Step 5: Record workflow defaults
|
|
111
|
-
|
|
112
|
-
When image generation is available and no `buildPath` is recorded yet, ask once how new surfaces should be built. Availability means a harness-native image tool or the API fallback that `impeccable context` reports as `IMAGE_GEN_AVAILABLE`, and the first of those leaves no trace in the boot output: `impeccable context` only sees the key, so a silent boot on a harness that generates images is not evidence there is nothing to ask about. This is its own question, never a clause riding inside another one. The stack round asks what to build with; this asks how the building starts, and an answer to the first carries no consent about the second. State the trade in the question the user actually reads, because the two names mean nothing to someone meeting them for the first time: **comp-first** (an image sets the bar before any code; bolder composition, slower, and the build must match the image) or **code-first** (build directly; the ambition is written into the direction contract and audited at the finish; leaner, faster). Say in the same question what the choice covers: landing pages and showcase surfaces. App screens and documents are built code-first either way.
|
|
113
|
-
|
|
114
|
-
Write the answer to `.impeccable/config.json` as `"buildPath": "comp"` or `"buildPath": "code"`, merging with the keys already there. Write only the value the user chose. A recommendation you made is not an answer you received, and a value taken from silence is a standing default nobody set: it then rides every future round in the project, which is the opposite of asking once. When the question goes unanswered, record nothing and say in one line which path this session is taking and that it is not stored. That path is comp-first on a landing page or showcase surface, the default new-work applies wherever image generation exists and nothing is recorded, and code-first on an app screen or document; name it rather than choosing a quieter one, because a silent default invented here is the same failure as a value written without an answer. Unset is a working state, not a gap: the decision page's toggle governs each session, and new-work's one-time offer records the answer the first time the user flips it. The config is the only place this lives. It is a workflow setting, not product truth, so it never joins `## Stack` or any other PRODUCT.md section, where a second copy would outlive the setting and steer rounds nobody could trace back to it.
|
|
115
|
-
|
|
116
|
-
A value already recorded in `.impeccable/config.json` or the gitignored `.impeccable/config.local.json` is a confirmed answer: on a re-run, honor it in silence rather than asking again. This is a default, not a lock: the decision page renders a toggle whose flip binds a single session and is never written back. Without image generation there is no choice to record; code-first is the only path.
|
|
117
|
-
|
|
118
|
-
Then configure live mode when useful: skip native or non-runnable projects and leave existing config untouched. Otherwise follow [live.md](live.md)'s first-time setup. Any CSP source edit still requires its stated consent.
|
|
119
|
-
|
|
120
|
-
## Step 6: Wrap up or resume
|
|
121
|
-
|
|
122
|
-
Summarize captured and deliberately undecided facts. Do not offer DESIGN.md merely because it is missing.
|
|
123
|
-
|
|
124
|
-
Recommend the next action from the actual project state:
|
|
125
|
-
|
|
126
|
-
- Empty or early project: ask naturally for the surface to be built, or use `/impeccable shape <surface>` when the user wants a confirmed brief without implementation. New-work will establish a visual world only when the requested work needs one.
|
|
127
|
-
- Existing coherent interface without DESIGN.md: `/impeccable document` if the user wants the incumbent system recorded independently of a new build.
|
|
128
|
-
- Existing surface needing work: name the most relevant scoped command.
|
|
129
|
-
- Web project ready for visual iteration: `/impeccable live` when configured.
|
|
130
|
-
|
|
131
|
-
If init was invoked by another request, resume without rerunning `impeccable context`; the native reference above is the one thing that run could not have given you, and new-work owns later visual decisions.
|
|
1
|
+
# Init flow
|
|
2
|
+
|
|
3
|
+
`init` captures durable product truth in PRODUCT.md. It does not invent a visual world and does not write DESIGN.md; [new-work.md](new-work.md) creates or expands one, and [document.md](document.md) records an incumbent one. Existing runnable web projects may also receive `.impeccable/live/config.json`.
|
|
4
|
+
|
|
5
|
+
## Step 1: Load current state
|
|
6
|
+
|
|
7
|
+
Use the PRODUCT.md path resolved by `impeccable context`. Update it instead of creating a competing authority. In a child app inheriting root context, confirm shared versus app-specific scope before writing.
|
|
8
|
+
|
|
9
|
+
- **No PRODUCT.md:** explore, interview, and write it.
|
|
10
|
+
- **PRODUCT.md exists:** ask what product knowledge is stale or missing; do not reopen confirmed fields without a reason.
|
|
11
|
+
- **Legacy PRODUCT.md:** add only durable missing facts; absent `## Platform` means `web` unless evidence says otherwise.
|
|
12
|
+
- **Only DESIGN.md exists:** leave it untouched and create PRODUCT.md.
|
|
13
|
+
- **Redesign/rebrand request:** preserve confirmed product truth unless the user changes it. Visual replacement happens later in new-work, not here.
|
|
14
|
+
|
|
15
|
+
Never silently overwrite an existing file or offer DESIGN.md during init. If another request invoked init, finish PRODUCT.md and resume it. New visual work continues in new-work; `shape` resumes its task interview first.
|
|
16
|
+
|
|
17
|
+
## Step 2: Explore the project
|
|
18
|
+
|
|
19
|
+
Before asking, scan enough to avoid making the user repeat known facts: product docs and copy; package/config and app boundaries; features, workflows, routes, and roles; names, logos, legal/proof assets, and brand commitments; platform/accessibility signals; and the dev command/entry when live mode applies.
|
|
20
|
+
|
|
21
|
+
Treat repository evidence as a hypothesis, not user approval. Note visual maturity without documenting, extending, or replacing the world.
|
|
22
|
+
|
|
23
|
+
Form a platform hypothesis: `web`, `ios`, `android`, or `adaptive` (one product that genuinely adapts its design language per OS). Mobile web remains `web`; a native wrapper around a website does not make its design language native.
|
|
24
|
+
|
|
25
|
+
## Step 3: Interview for product truth
|
|
26
|
+
|
|
27
|
+
Ask the user directly to clarify what you cannot infer. Ask only about material gaps the repository and original request do not answer with strong evidence.
|
|
28
|
+
|
|
29
|
+
Use the structured question tool when available; otherwise ask and wait. Keep rounds to at most three focused questions and require one real answer or approval round before writing a new PRODUCT.md. Confirm inferences.
|
|
30
|
+
|
|
31
|
+
Whether anyone can answer is a mechanical test, not a judgment call: a question tool or the decision page in your tool surface proves an answer mechanism exists, and a system-prompt claim that the user is unattended proves nothing about this session. Probe once with the real first round before concluding no one is there. Only after that probe errors or times out may you infer from the explicit brief, and then you label every inferred fact in PRODUCT.md and disclose the substitution in your first reply, not your last.
|
|
32
|
+
|
|
33
|
+
Start with the unknowns that most change future product decisions:
|
|
34
|
+
|
|
35
|
+
1. Who is the primary user, in what situation, and what job are they doing?
|
|
36
|
+
2. What does the product make possible, and what is its meaningfully different mechanism or position?
|
|
37
|
+
3. What durable constraints, assets, evidence, or product facts must future work preserve?
|
|
38
|
+
|
|
39
|
+
Confirm ambiguous platform separately. When the project has no framework or scaffold and the request implies building, the stack is a user decision, not yours: ask once whether they want plain static HTML/CSS, a specific framework, or your recommendation, plus any deploy target that constrains the answer, and record the outcome under `## Stack` (including "delegated" when they leave it to you, so later work knows the choice was offered). Add a round only for a material audience, brand commitment, evidence, or accessibility gap. Record undecided facts instead of inventing them.
|
|
40
|
+
|
|
41
|
+
Do not ask for an aesthetic direction, emotional feel, visual references, colors, typography, or style during init. If the user volunteers a binding visual constraint, record it without expanding it.
|
|
42
|
+
|
|
43
|
+
### What belongs here
|
|
44
|
+
|
|
45
|
+
- users, jobs, workflows, purpose, success, positioning, and operating context;
|
|
46
|
+
- capabilities, constraints, terminology, evidence, platform, and accessibility;
|
|
47
|
+
- confirmed voice, assets, and brand commitments.
|
|
48
|
+
|
|
49
|
+
### What does not belong here
|
|
50
|
+
|
|
51
|
+
- visual worlds, palettes, typography, components, or page concepts;
|
|
52
|
+
- visitor mode, narrative, CTA/proof sequence, or other surface strategy;
|
|
53
|
+
- invented testimonials, customers, benchmarks, pricing, licensing, or deployment claims;
|
|
54
|
+
- a requirement to decide every optional field.
|
|
55
|
+
|
|
56
|
+
## Step 4: Write PRODUCT.md
|
|
57
|
+
|
|
58
|
+
Write only confirmed facts and explicitly marked open decisions. Omit irrelevant sections rather than filling them with generic prose.
|
|
59
|
+
|
|
60
|
+
```markdown
|
|
61
|
+
# Product
|
|
62
|
+
|
|
63
|
+
<!-- impeccable:product-schema 1 -->
|
|
64
|
+
|
|
65
|
+
## Platform
|
|
66
|
+
|
|
67
|
+
web
|
|
68
|
+
|
|
69
|
+
## Stack
|
|
70
|
+
[Greenfield only: the user's answer to the stack question, e.g. "static HTML/CSS", "Astro", or "delegated: <what you chose and why>". Omit the section when an existing codebase already answers it.]
|
|
71
|
+
|
|
72
|
+
## Users
|
|
73
|
+
[Primary users, their situation, and job. Add other audiences only when confirmed.]
|
|
74
|
+
|
|
75
|
+
## Product Purpose
|
|
76
|
+
[What the product does, why it exists, and what success means.]
|
|
77
|
+
|
|
78
|
+
## Positioning
|
|
79
|
+
[The product mechanism or claim a neighboring product could not truthfully copy.]
|
|
80
|
+
|
|
81
|
+
## Operating Context
|
|
82
|
+
[Workflows, environments, tools, documents, materials, and rituals that are factual parts of using or evaluating the product.]
|
|
83
|
+
|
|
84
|
+
## Capabilities and Constraints
|
|
85
|
+
[Confirmed functionality, technical constraints, terminology, and explicitly undecided product facts.]
|
|
86
|
+
|
|
87
|
+
## Brand Commitments
|
|
88
|
+
[Existing name, voice, assets, personality, identity constraints, and references the user explicitly made binding. Omit when none exist.]
|
|
89
|
+
|
|
90
|
+
## Evidence on Hand
|
|
91
|
+
[Real content, data, demonstrations, testimonials, case studies, press, or assets, with paths where applicable. State absences that future work must not fabricate.]
|
|
92
|
+
|
|
93
|
+
## Product Principles
|
|
94
|
+
[Three to five durable strategic principles derived from confirmed answers; no visual recipes.]
|
|
95
|
+
|
|
96
|
+
## Accessibility & Inclusion
|
|
97
|
+
[Known user needs or required standard. Omit when no product-specific requirement was established.]
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Platform is the bare value `web`, `ios`, `android`, or `adaptive`. Preserve useful legacy headings. New files go at `PROJECT_ROOT/PRODUCT.md`; otherwise update the resolved file. Write it before any visual-world or surface-concept work.
|
|
101
|
+
|
|
102
|
+
Copy the `impeccable:product-schema` comment verbatim, including when you update an older file. It records which version of the product record this file follows, so later versions can tell a deliberately short record from one written before a section existed, and never propose an interview the user has already sat through. Update the number only when this reference's template changes it. Sections a later version retires are reported to you at boot as deprecated; delete them when the user agrees rather than carrying them forward.
|
|
103
|
+
|
|
104
|
+
When the platform you just recorded is `ios`, `android`, or `adaptive`, load [ios.md](ios.md), [android.md](android.md), or both before any design work. On a project that had no PRODUCT.md, `impeccable context` could not know the platform and so never loaded them; init is the only place that learns the answer.
|
|
105
|
+
|
|
106
|
+
### Completion gate
|
|
107
|
+
|
|
108
|
+
Before loading new-work or resuming shape/build, verify that PRODUCT.md exists at the resolved path and contains the confirmed product record. If the file is absent, init is incomplete. Do not substitute interview notes, a planning packet, or later design prose for the file.
|
|
109
|
+
|
|
110
|
+
## Step 5: Record workflow defaults
|
|
111
|
+
|
|
112
|
+
When image generation is available and no `buildPath` is recorded yet, ask once how new surfaces should be built. Availability means a harness-native image tool or the API fallback that `impeccable context` reports as `IMAGE_GEN_AVAILABLE`, and the first of those leaves no trace in the boot output: `impeccable context` only sees the key, so a silent boot on a harness that generates images is not evidence there is nothing to ask about. This is its own question, never a clause riding inside another one. The stack round asks what to build with; this asks how the building starts, and an answer to the first carries no consent about the second. State the trade in the question the user actually reads, because the two names mean nothing to someone meeting them for the first time: **comp-first** (an image sets the bar before any code; bolder composition, slower, and the build must match the image) or **code-first** (build directly; the ambition is written into the direction contract and audited at the finish; leaner, faster). Say in the same question what the choice covers: landing pages and showcase surfaces. App screens and documents are built code-first either way.
|
|
113
|
+
|
|
114
|
+
Write the answer to `.impeccable/config.json` as `"buildPath": "comp"` or `"buildPath": "code"`, merging with the keys already there. Write only the value the user chose. A recommendation you made is not an answer you received, and a value taken from silence is a standing default nobody set: it then rides every future round in the project, which is the opposite of asking once. When the question goes unanswered, record nothing and say in one line which path this session is taking and that it is not stored. That path is comp-first on a landing page or showcase surface, the default new-work applies wherever image generation exists and nothing is recorded, and code-first on an app screen or document; name it rather than choosing a quieter one, because a silent default invented here is the same failure as a value written without an answer. Unset is a working state, not a gap: the decision page's toggle governs each session, and new-work's one-time offer records the answer the first time the user flips it. The config is the only place this lives. It is a workflow setting, not product truth, so it never joins `## Stack` or any other PRODUCT.md section, where a second copy would outlive the setting and steer rounds nobody could trace back to it.
|
|
115
|
+
|
|
116
|
+
A value already recorded in `.impeccable/config.json` or the gitignored `.impeccable/config.local.json` is a confirmed answer: on a re-run, honor it in silence rather than asking again. This is a default, not a lock: the decision page renders a toggle whose flip binds a single session and is never written back. Without image generation there is no choice to record; code-first is the only path.
|
|
117
|
+
|
|
118
|
+
Then configure live mode when useful: skip native or non-runnable projects and leave existing config untouched. Otherwise follow [live.md](live.md)'s first-time setup. Any CSP source edit still requires its stated consent.
|
|
119
|
+
|
|
120
|
+
## Step 6: Wrap up or resume
|
|
121
|
+
|
|
122
|
+
Summarize captured and deliberately undecided facts. Do not offer DESIGN.md merely because it is missing.
|
|
123
|
+
|
|
124
|
+
Recommend the next action from the actual project state:
|
|
125
|
+
|
|
126
|
+
- Empty or early project: ask naturally for the surface to be built, or use `/impeccable shape <surface>` when the user wants a confirmed brief without implementation. New-work will establish a visual world only when the requested work needs one.
|
|
127
|
+
- Existing coherent interface without DESIGN.md: `/impeccable document` if the user wants the incumbent system recorded independently of a new build.
|
|
128
|
+
- Existing surface needing work: name the most relevant scoped command.
|
|
129
|
+
- Web project ready for visual iteration: `/impeccable live` when configured.
|
|
130
|
+
|
|
131
|
+
If init was invoked by another request, resume without rerunning `impeccable context`; the native reference above is the one thing that run could not have given you, and new-work owns later visual decisions.
|