@iamu-dev/iamu 0.8.0-beta.7 → 0.8.0-beta.9

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.
@@ -93,7 +93,7 @@ Fix by looking, not by hoping:
93
93
  Only when no design doc is recorded: `iamu design template` refuses otherwise, and a recorded doc changes only through proposals (**C**). The template is filled in from the code, never by a model: the token values in the frontmatter (light theme), the token groups by name, the contrast clashes the tokens have, each component with the props it takes, and the roles people come in (from the personas and situations, never their names). Everything else starts as a `<placeholder>`. Auto-extract what the code and `iamu/context.yml` already answer, ask the user only for the qualitative intent and clash decisions that code cannot answer, and the result becomes the team's doc.
94
94
 
95
95
  1. **Template & Auto-Extraction (0 questions to the user).** Run `iamu design template --out iamu/.analysis/design-draft.md --json`. It is for the app the recorded tokens and components apply to, else the root; add `--dir <app>` when the user names another app, and pass the same `--dir` to the later commands. If it answers `out_exists`, a draft is in progress: ask whether to continue it (step 2 with that file) or start over (delete the file and run it again). Tell the user in two lines what came from the code (`sources`, the components, `roles`, `clashes`) and where the doc will go (`target`).
96
- Before asking the user anything, read the actual token files (`sources.tokens`), UI components (`sources.components`), page code, and `iamu/context.yml` (plus live rendered screens or recent runs if available), and pre-fill the code-evidenced placeholders in `iamu/.analysis/design-draft.md`:
96
+ Before asking the user anything, read the actual token files (`sources.tokens`), UI components (`sources.components`), page code, and `iamu/context.yml`—or, **when there is no local code (a remote site / URL-only project)**, fetch the live target URL's stylesheets and rendered HTML from `iamu/testability.md` (plus any parent/reference brand URL the user names) to extract CSS custom properties, colour/radius tokens (written into the YAML frontmatter), typography, recurring component patterns, and contrast ratios—and pre-fill the code/site-evidenced placeholders in `iamu/.analysis/design-draft.md`:
97
97
  - **Overview — Who it is for:** Synthesize who uses the product and what they come to do from `iamu/context.yml` and the roles and situations the Overview lists, then replace that list with the synthesized role-based words (roles only, never a persona's name or a single-scenario situation number).
98
98
  - **Look — Token roles:** Fill in `<what each is for>` for each extracted token group from how stylesheets and components actually apply those tokens (always name tokens in backticks, never raw hex or px values in prose).
99
99
  - **Interaction and States:** Extract how `Forms` (error reporting), `Loading`, `Failure`, and `Empty` states are actually implemented in `sources.components` and screens. Describe only the states the product has; missing state patterns go under `Not in the library yet` / `Open Questions`.
@@ -284,15 +284,16 @@ Iamu reads design docs wherever they are and never edits them on its own. Run `i
284
284
  - **Found docs** (a `DESIGN.md` in any format, design-system, brand, voice or interaction docs, design sections of `CLAUDE.md` or `AGENTS.md` shown as `CLAUDE.md#<heading>`, a `PRODUCT.md`, token files, a component library): list them once, one line each (kind, path). Show a candidate with a `note` (anything in a sample, export, fixture or spike folder) with its note, unticked. Ask once whether to record them; the user may drop some or add others. On yes, `iamu design sources <paths…>` (in a monorepo, `--applies-to` with the URL prefix or the app's folder each doc covers).
285
285
  - **A legacy `iamu/design.md`** (`iamu design status --json` shows `legacy.doc` and no `legacy.migrated_at`): fold it into the same single question. Run `iamu design migrate --json` first, and offer three answers next to the files: **move it** to a plain `DESIGN.md` the team owns (`iamu design migrate --move-to DESIGN.md --apply`), **keep** `iamu/design.md` as it is (`iamu design migrate --apply`, which records the choice so it is not offered again), or **not now** (run nothing; it is offered again next time). Only an explicit "keep" runs `--apply` without a move.
286
286
  - **Nothing found:** say so in one line: "No design docs found. The designer reviews each run by general craft until you record some (`iamu-design`) — strongly recommended so runs check your own tokens, components, and rules."
287
- - **No written design doc** (detection found only tokens or components, or nothing, and no design doc is recorded): after the question above, or in its place when there was nothing to record, explain in one sentence why a design doc makes Iamu much stronger (*"With a `DESIGN.md`, Iamu's designer checks your own tokens, components, states, and rules on every run instead of only general craft"*), and ask one question the user may skip:
287
+ - **No written design doc** (detection found only tokens or components, or nothing, and no design doc is recorded): after the question above, or in its place when there was nothing to record, explain in one sentence why a design doc makes Iamu much stronger (*"With a `DESIGN.md`, Iamu's designer checks your own tokens, components, states, and rules on every run instead of only general craft"*), and ask one standalone question the user may skip.
288
+ - **CRITICAL (Local Code AND Remote Sites):** Mode E works both when local source code exists AND when testing a remote site with no local code (on a remote site, Mode E extracts tokens, typography, component patterns, states, and contrast ratios directly from the live target URL's stylesheets/DOM or a reference brand URL). **NEVER omit Option 1 (`Yes — start DESIGN.md now`), NEVER mark `Not now` as `(Recommended)`, and NEVER batch this question into the same `ask_question` call as Step 3a**—wait for the user's answer to Step 4b first so Mode E can run if they choose Yes:
288
289
  - If interactive user-prompt tools exist (`ask_question`, `ask_followup_question`), invoke it:
289
- - **Question:** "There is no `DESIGN.md` yet. Iamu gets much sharper with one (every run checks your own tokens, components, states, and rules instead of generic craft). Start one from your code now?"
290
+ - **Question:** "There is no `DESIGN.md` yet. Iamu gets much sharper with one (every run checks your own tokens, components, states, and rules instead of generic craft). Start one now?"
290
291
  - **Options:**
291
- 1. "(Recommended) Yes — start `DESIGN.md` from my code now (auto-extracts tokens, components, states & formats, then asks 2–3 quick intent questions)"
292
+ 1. "(Recommended) Yes — start `DESIGN.md` now (auto-extracts tokens, components, states & formats from your code or live site, then asks 2–3 quick intent questions)"
292
293
  2. "Not now — finish setup first (keep reminding me to run `iamu-design`)"
293
294
  3. "No — review by general craft only and stop offering `DESIGN.md`"
294
295
  - Otherwise (text-only/CLI):
295
- "There is no design doc yet, and Iamu gets much sharper with one (checking your own tokens, components, and rules on every run). Shall I start one from your code? I auto-extract your tokens, components, states, formats and contrast clashes from code, then ask 2–3 quick questions on feel and clash rules. **Yes** (recommended) / **not now** (keep recommending `iamu-design`) / **no**."
296
+ "There is no design doc yet, and Iamu gets much sharper with one (checking your own tokens, components, and rules on every run). Shall I start one now? I auto-extract your tokens, components, states, formats and contrast clashes from your code or live site, then ask 2–3 quick questions on feel and clash rules. **Yes** (recommended) / **not now** (keep recommending `iamu-design`) / **no**."
296
297
  - **Yes:** follow the `iamu-design` skill, mode E, then carry on with setup.
297
298
  - **Not now:** run nothing; it stays recommended at the end of setup, in `iamu status`, and after runs until a design doc is recorded.
298
299
  - **No:** run `iamu design template --decline`, so runs stop offering it.
@@ -442,7 +443,7 @@ Next step:
442
443
  iamu-run <persona-slug>--<outline-slug>
443
444
 
444
445
  Other commands when you're ready:
445
- • iamu-design Create or record DESIGN.md from your code (strongly recommended if not set yet: makes every run check your own tokens, components, and rules instead of general craft)
446
+ • iamu-design Create or record DESIGN.md from your code or live site (strongly recommended if not set yet: makes every run check your own tokens, components, and rules instead of general craft)
446
447
  • iamu-new Draft a scenario for a different product flow
447
448
  • iamu-propose Brainstorm high-risk workflows and blind spots
448
449
  • iamu doctor Diagnose test environment and target health
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iamu-dev/iamu",
3
- "version": "0.8.0-beta.7",
3
+ "version": "0.8.0-beta.9",
4
4
  "type": "module",
5
5
  "description": "Test your product as realistic personas — scenario-driven development CLI",
6
6
  "license": "MIT",
@@ -58,9 +58,9 @@
58
58
  "tsup": "^8.5.1",
59
59
  "typescript": "^5.8.0",
60
60
  "vitest": "^4.1.11",
61
- "@iamu-dev/local-store": "0.1.0",
62
61
  "@iamu/tsconfig": "0.1.0",
63
- "@iamu-dev/protocol": "0.1.0"
62
+ "@iamu-dev/protocol": "0.1.0",
63
+ "@iamu-dev/local-store": "0.1.0"
64
64
  },
65
65
  "scripts": {
66
66
  "build": "tsup && tsc -b --force tsconfig.build.json --emitDeclarationOnly && node scripts/copy-assets.mjs",