@iamu-dev/iamu 0.2.0-beta.7 → 0.2.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.
- package/dist/bin.js +1562 -236
- package/dist/index.js +1558 -232
- package/dist/templates/skills/iamu-new.md +3 -0
- package/dist/templates/skills/iamu-propose.md +6 -1
- package/dist/templates/skills/iamu-run.md +5 -1
- package/dist/templates/skills/iamu-setup.md +35 -2
- package/package.json +1 -1
|
@@ -99,6 +99,9 @@ Roles with Stakes:
|
|
|
99
99
|
Execution Preconditions (resolved at iamu-run):
|
|
100
100
|
• Assumed State: <What records/data should exist, e.g. "Department with existing risk register containing open hazards">
|
|
101
101
|
• Squint Guidance: <How the walker should approximate if exact records are missing, e.g. "If no packaging hazard exists, select any physical safety hazard and proceed with delegation">
|
|
102
|
+
• Reachable Surface: <Entry route matched against iamu/testability.md, e.g. "/incidents/new">
|
|
103
|
+
|
|
104
|
+
If the situation requires an un-mocked endpoint or missing data fixture to be walkable, offer to scaffold the missing MSW handler (e.g. in `src/mocks/handlers.ts`) or fixture file directly in the codebase before finalizing.
|
|
102
105
|
```
|
|
103
106
|
|
|
104
107
|
Ask the user: "Ready to test this draft, or would you like to refine the focus question, preconditions, or circumstances? (Enter to accept, or type adjustments)"
|
|
@@ -33,7 +33,7 @@ If context is thin (few actors, sparse notes), say so upfront — "your context
|
|
|
33
33
|
|
|
34
34
|
## Steps
|
|
35
35
|
|
|
36
|
-
### 1. Load domain context
|
|
36
|
+
### 1. Load domain context & testability boundaries
|
|
37
37
|
|
|
38
38
|
Read `iamu/context.yml`. Extract and hold:
|
|
39
39
|
- **Domain + industry** — what world does this product operate in?
|
|
@@ -41,6 +41,11 @@ Read `iamu/context.yml`. Extract and hold:
|
|
|
41
41
|
- **Governed_by** — regulations and standards (if applicable). These create structural tensions in regulated domains.
|
|
42
42
|
- **Notes body** — extended context, often containing workflow descriptions, pain points, organizational dynamics.
|
|
43
43
|
|
|
44
|
+
Read `iamu/testability.md` (if present) to enforce execution boundaries:
|
|
45
|
+
- **Reachable surfaces:** Ground candidates in reachable routes. Avoid proposing scenarios for product areas with no navigable surfaces.
|
|
46
|
+
- **Untestable boundaries:** Strictly avoid proposing scenarios in flows documented as untestable (e.g. un-mocked live payment gateways, SMS dispatch, third-party SSO).
|
|
47
|
+
- **Mocks & Fixtures:** Note which candidates require existing database seeds or mock handlers.
|
|
48
|
+
|
|
44
49
|
### 2. Load existing coverage
|
|
45
50
|
|
|
46
51
|
Read existing entities to understand what's already been tested:
|
|
@@ -113,7 +113,11 @@ After bind + brief, the scenario is ready to execute. Continue to step 3.
|
|
|
113
113
|
|
|
114
114
|
### 3. Target
|
|
115
115
|
|
|
116
|
-
**Web** —
|
|
116
|
+
**Web** — determine the target URL:
|
|
117
|
+
1. If the user passed an explicit target or the scenario has `target_url`, use that.
|
|
118
|
+
2. Otherwise, check `iamu/testability.md` for `target_url`.
|
|
119
|
+
3. If still unconfigured, prompt the user for the target URL (live product, staging, or localhost).
|
|
120
|
+
Verify target reachability and dev server health with `iamu doctor --target <url>` before launching.
|
|
117
121
|
|
|
118
122
|
Where the walk *starts* is part of the situation, not of the environment: a persona arriving from a video, an email or a search result lands on a specific page, not the home page. If the scenario has `entry_path`, `iamu start-run` resolves it against the target — pass the product's base URL as `--target`. If it has none but the situation clearly begins on a particular page, set `entry_path` in the scenario frontmatter first (a path like `/en/episodes/1`, never a full URL), so this run and every later one start there. A walk started on the wrong page reports the detour as a finding.
|
|
119
123
|
|
|
@@ -59,7 +59,8 @@ Synthesize the project into a cohesive, substantive narrative (1–2 paragraphs)
|
|
|
59
59
|
- Key user journeys and operational characteristics (e.g. mobile floor use, audit deadlines).
|
|
60
60
|
- Market, geography, and specific compliance frameworks (only if evident).
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
Audit testability without cluttering the domain context:
|
|
63
|
+
Inspect `package.json` dev scripts, existing mock harnesses (MSW, seed scripts), auth route guards (`middleware.ts`, ProtectedRoute, session hooks), and page/route directories (`app/`, `src/routes/`). Use these findings to populate `iamu/testability.md`.
|
|
63
64
|
|
|
64
65
|
**If there is no code (greenfield, design phase, or test sandbox):** do NOT interrogate the user with a multi-part survey or ask for dev auth plumbing. Ask for a single entry point:
|
|
65
66
|
> No local codebase detected. To seed context, provide one of:
|
|
@@ -71,7 +72,6 @@ Do NOT collect code architecture (agent reads the codebase directly — tech sta
|
|
|
71
72
|
- **URL provided:** Fetch or search public marketing/docs for that site. Automatically extract the substantive narrative, core user journeys, and key actors. If industry regulations are obvious (e.g., healthcare/HIPAA, Swedish workplace safety/AML), include them in the narrative.
|
|
72
73
|
- **One-sentence summary provided:** Immediately expand into a full substantive narrative using domain knowledge.
|
|
73
74
|
- **"sandbox" provided:** Seed a standard B2B SaaS narrative with Admin and End-User roles.
|
|
74
|
-
- **Do NOT ask upfront about auth mechanics (`access`) or compliance frameworks (`governed_by`).** Infer if obvious, otherwise leave them blank.
|
|
75
75
|
|
|
76
76
|
**Present ONLY the narrative description for user confirmation (Do NOT include metadata bullets or personas):**
|
|
77
77
|
|
|
@@ -124,6 +124,39 @@ Once the user confirms the narrative description:
|
|
|
124
124
|
- `access` — optional. Only what the docs actually say; leave it out rather than guess.
|
|
125
125
|
- Do NOT add `industry` or `architecture` — these don't affect walkthroughs.
|
|
126
126
|
|
|
127
|
+
2. Persist the technical testability and execution contract to `iamu/testability.md`:
|
|
128
|
+
Scaffold the target environment, auth mechanisms, discovered surfaces, mock harnesses, and untestable boundaries discovered from the code:
|
|
129
|
+
|
|
130
|
+
```markdown
|
|
131
|
+
---
|
|
132
|
+
target_url: http://localhost:3000
|
|
133
|
+
dev_command: <detected dev script, e.g. pnpm dev or pnpm dev:mock>
|
|
134
|
+
auth_strategy: <dev_switcher | interactive | test_accounts | public>
|
|
135
|
+
harnesses:
|
|
136
|
+
- <detected harnesses, e.g. msw, seed>
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
# Project Testability & Environment
|
|
140
|
+
|
|
141
|
+
## Target & Run Instructions
|
|
142
|
+
- Command: <dev command>
|
|
143
|
+
- Base URL: <target_url>
|
|
144
|
+
|
|
145
|
+
## Auth & Access Boundary
|
|
146
|
+
- <How a walker becomes this persona in dev or test mode>
|
|
147
|
+
|
|
148
|
+
## Reachable Surfaces
|
|
149
|
+
- <List discovered routes/entry points, e.g. /login, /dashboard, /incidents>
|
|
150
|
+
|
|
151
|
+
## Mocks & Data Fixtures
|
|
152
|
+
- <List existing MSW mock files, DB seed scripts, or fixture directories>
|
|
153
|
+
|
|
154
|
+
## Untestable Boundaries (Do Not Walk)
|
|
155
|
+
- <List un-mocked external dependencies, e.g. live Stripe charges, SMS 2FA, external SSO>
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Keep `context.yml` strictly about domain reality (which the Walker subagent reads), and `testability.md` strictly about developer testability and execution boundaries (which orchestrator skills read).
|
|
159
|
+
|
|
127
160
|
#### Phase B: Persona Casting (Opt-In & Separate Confirmation)
|
|
128
161
|
Immediately after saving `iamu/context.yml`, ask the user if they want to seed baseline personas:
|
|
129
162
|
|