@iamu-dev/iamu 0.3.0-beta.0 → 0.3.0-beta.2

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.
@@ -99,29 +99,20 @@ Prompt the user to verify the safety boundary:
99
99
  2. "Adjust boundaries (add forbidden external URLs, change dev command or port)"
100
100
  3. "Skip safety fence for now"
101
101
  - Otherwise (text-only/CLI):
102
-
103
- ```text
104
- Confirm safety fence and dev environment?
105
- 1. [Recommended] Safety boundaries look safe — save fence and proceed
106
- 2. Adjust boundaries (add forbidden external URLs, change dev command or port)
107
- 3. Skip safety fence for now
108
-
109
- Reply '1' to accept [default], select 2-3, or tell me what to adjust:
110
- ```
102
+ Safety boundaries look safe. I recommend saving fence and proceeding.
103
+ Proceeding to save safety fence — say "adjust" to change boundaries or "skip" to defer.
111
104
 
112
105
  **Action on confirmation (Option 1):**
113
- Write `iamu/testability.md`:
114
- ```markdown
115
- ---
116
- target_url: <target_url>
117
- dev_command: <dev_command>
118
- auth_strategy: <dev_switcher | interactive | test_accounts | public>
119
- access: <How a walker becomes a given user: the switching mechanism, e.g. 'In the page, run localStorage.setItem("dev_persona", "<persona access>") and reload.' Omit when unknown. Never passwords or tokens.>
120
- harnesses:
121
- - <detected harnesses>
122
- ---
123
-
124
- # Project Testability & Environment
106
+ Persist the safety fence using `iamu set testability` (never invoke host file creation or edit tools):
107
+ ```bash
108
+ iamu set testability \
109
+ --target "<target_url>" \
110
+ --dev-command "<dev_command>" \
111
+ --auth-strategy "<dev_switcher | interactive | test_accounts | public>" \
112
+ [--access "<access mechanism>"] \
113
+ [--harnesses "<detected harness 1>, <detected harness 2>"] \
114
+ [--untestable-boundaries "<external dependency 1>, <external dependency 2>"] \
115
+ --body "# Project Testability & Environment
125
116
 
126
117
  ## Target & Run Instructions
127
118
  - Command: <dev command>
@@ -137,7 +128,8 @@ harnesses:
137
128
  - <List existing MSW mock files, DB seed scripts, or fixture directories>
138
129
 
139
130
  ## Untestable Boundaries (Do Not Walk)
140
- - <List un-mocked external dependencies and external submission portals>
131
+ - <List un-mocked external dependencies and external submission portals>" \
132
+ --json
141
133
  ```
142
134
 
143
135
  ---
@@ -171,33 +163,20 @@ Prompt the user to verify the project description:
171
163
  2. "Save project description only (skip scenario creation for now)"
172
164
  3. "Adjust domain or description"
173
165
  - Otherwise (text-only/CLI):
174
-
175
- ```text
176
- Confirm project domain & description?
177
- 1. [Recommended] Project description is accurate — proceed to design first test
178
- 2. Save project description only (skip scenario creation for now)
179
- 3. Adjust domain or description
180
-
181
- Reply '1' to accept [default], select 2-3, or tell me what to adjust:
182
- ```
166
+ Project description is accurate. I recommend proceeding to design your first test.
167
+ Proceeding to first test design — say "save only" or describe adjustments to change course.
183
168
 
184
169
  **Action on confirmation (Option 1):**
185
- Write `iamu/context.yml`. Put structured fields in frontmatter and the project description in the markdown body below the `---`:
186
- ```yaml
187
- ---
188
- schema_version: 1
189
- domain: <domain>
190
- # industry: <industry> # optional
191
- # jurisdiction: <jurisdiction> # strictly optional - omit if standard web app
192
- # governed_by: # strictly optional - omit if not regulated
193
- # - name: <statutory regulation>
194
- # authority_level: regulation
195
- ---
196
-
197
- <The substantive 1–2 paragraph project description and core user workflows>
170
+ Persist the domain context using `iamu set context` (never invoke host file creation or edit tools). Put structured fields in frontmatter and the project description in the markdown body below the `---` via `--body`:
171
+ ```bash
172
+ iamu set context \
173
+ --domain "<domain>" \
174
+ [--industry "<industry>"] \
175
+ --body "<The substantive 1–2 paragraph project description and core user workflows>" \
176
+ --json
198
177
  ```
199
178
 
200
- *If user chooses Option 2 (Save context only):* write `context.yml` and exit cleanly:
179
+ *If user chooses Option 2 (Save context only):* run `iamu set context ...` as above, and exit cleanly:
201
180
  "✓ Project context initialized. When you're ready to create your first test journey, run `/iamu:new`."
202
181
 
203
182
  ---
@@ -213,6 +192,7 @@ Step 3/3: Co-Design Your First Test Journey
213
192
  Why this matters: Validates whether a real human with specific operational pressures can complete a critical task without getting blocked or frustrated.
214
193
 
215
194
  Baseline Test Proposal (WYSIWGW Spec-Sheet):
195
+ Capability: <Capability Name> (<What staff can do in this area>)
216
196
  Persona: <Name> (<Role / Title>)
217
197
  • Reality: <Working context, physical habits, tenure, pressures>
218
198
  • Friction: <Diagnostic friction, skepticism, bounce trigger>
@@ -234,31 +214,27 @@ Prompt the user to verify the scenario and its auth precondition:
234
214
  3. "Switch role / design a different scenario (write-in)"
235
215
  4. "Skip scenario for now"
236
216
  - Otherwise (text-only/CLI):
237
-
238
- ```text
239
- Scaffold this baseline journey?
240
- 1. [Recommended] Scaffold journey with <detected auth mechanism>
241
- 2. Use interactive human login handshake (pause browser for live login)
242
- 3. Switch role / design a different scenario
243
- 4. Skip scenario for now
244
-
245
- Reply '1' to accept [default], select 2-4, or tell me what to adjust:
246
- ```
217
+ I recommend Option 1: Scaffold journey with <detected auth mechanism>.
218
+ Proceeding to scaffold baseline journey — say "interactive login", "switch role", or "skip" to adjust.
247
219
 
248
220
  **Action on confirmation (Option 1 or Option 2):**
249
- 1. **Scaffold Persona**:
221
+ 1. **Scaffold Primary Capability** (if not already existing):
250
222
  ```bash
251
- iamu new persona --name "<Name>" --role "<Role>" --disposition "<Disposition>" --body "<2-4 sentence narrative detailing technical habits, patience level, and specific friction triggers>" [--access "<account-or-role>"] --json
223
+ iamu new capability --name "<Capability Name>" --description "<What staff can do in this area>" --json
252
224
  ```
253
225
  2. **Scaffold Situation Outline**:
254
226
  ```bash
255
- iamu new outline --name "<Outline Title>" --tension "<Core Tension>" --human-test "<Concrete yes/partial/no evaluation question>" --narrative "<2-3 sentence problem-space narrative without UI terms>" --json
227
+ iamu new outline --name "<Outline Title>" --capability "<capability-slug>" --tension "<Core Tension>" --human-test "<Concrete yes/partial/no evaluation question>" --narrative "<2-3 sentence problem-space narrative without UI terms>" --json
228
+ ```
229
+ 3. **Scaffold Persona**:
230
+ ```bash
231
+ iamu new persona --name "<Name>" --role "<Role>" --disposition "<Disposition>" --body "<2-4 sentence narrative detailing technical habits, patience level, and specific friction triggers>" [--access "<account-or-role>"] --json
256
232
  ```
257
- 3. **Scaffold Bound Scenario**:
233
+ 4. **Scaffold Bound Scenario**:
258
234
  ```bash
259
235
  iamu new scenario --name "<persona-slug>--<outline-slug>" --outline "<outline-slug>" --persona "<persona-slug>" --entry "<entry_path>" --body "<Persona's first-person test brief describing what they intend to achieve>" --json
260
236
  ```
261
- 4. **Validate all entities**:
237
+ 5. **Validate all entities**:
262
238
  ```bash
263
239
  iamu validate --all
264
240
  ```
@@ -325,6 +301,7 @@ If login times out or fails:
325
301
  - **Clean terminal formatting.** Do not wrap agent briefings in markdown code fences (` ``` `). Use fixed column alignment for attributes and clean tree diagrams for generated files.
326
302
  - **Non-regulated software is the default.** Do not invent or force regulations (`governed_by`) on apps, developer tools, or consumer software. If the codebase has no compliance documentation, omit `governed_by` entirely.
327
303
  - **Explore automatically.** Read the codebase before asking the user anything. The user should only need to confirm or correct, not describe their own project from scratch.
328
- - **Context on disk is load-bearing.** Once step 4 writes `iamu/context.yml`, every downstream skill (`iamu-new`, `iamu-run`) auto-loads it.
304
+ - **Context on disk is load-bearing.** Once `iamu set context` writes `iamu/context.yml`, every downstream skill (`iamu-new`, `iamu-run`) auto-loads it.
305
+ - **Never invoke host Edit or Write tools.** Always scaffold or modify configuration and entities via `iamu set` and `iamu new` shell commands. Host tool edits trigger modal confirmation tripwires for the user.
329
306
  - **Handle re-runs gracefully.** An already-scaffolded project is a no-op on scaffold, a refresh on context/personas/scenarios (if the user opts in), and a re-prompt on cloud link.
330
307
  - **Handle errors gracefully.** Unreachable file → note it, move on. Unreachable cloud → report and let the user retry or defer.
@@ -105,6 +105,17 @@ Now present the **Strategic Fork** to the user. Do not be an unyielding bureaucr
105
105
  - State: "This situation reads a public page and requires no pre-existing world state."
106
106
  - Mark `--state-description "No particular data needed"`.
107
107
 
108
+ **Interactive Decision Gate:**
109
+ - If your environment provides an interactive user-prompt tool (e.g. `ask_question`, `ask_followup_question`), invoke it:
110
+ - Question: "How should we stage '<scenario-slug>' for walkthrough?"
111
+ - Options:
112
+ 1. "[Recommended] Option A: Build Testability (<brief seed proposal>)"
113
+ 2. "Option B: Semantic Squinting (test immediately against current dev database)"
114
+ 3. "Option C: Zero Setup Needed (public or self-contained flow)"
115
+ - Otherwise (in CLI or text-only environments):
116
+ I recommend Option A: Build Testability (<brief seed proposal>).
117
+ Proceeding with testability setup — say "squint" for Option B, or "zero setup" for Option C to change course.
118
+
108
119
  ### 4. Apply & Persist Staging
109
120
 
110
121
  Once the user chooses (or confirms):
@@ -57,7 +57,7 @@ The directory `iamu/.prompts/` contains internal prompt templates (`persona.md`,
57
57
 
58
58
  For a project-status question, add one line on the cloud from `iamu status --json` (`mode`, `sync`, `requests`) and `iamu auth status --json` (`authenticated`):
59
59
 
60
- - **Linked** → `Cloud: linked — <url from iamu open --print>`, then only what needs action: unpushed changes (`sync.pending_new` + `sync.pending_updates` + `walkthroughs.pending`, and `sync.local_deletions.count`) → `iamu sync`; `requests.open` above zero → `<N> team requests — iamu-findings`.
60
+ - **Linked** → `Cloud: linked — [Open Project in Iamu Cloud](<url from iamu open --print>)`, then only what needs action: unpushed changes (`sync.pending_new` + `sync.pending_updates` + `walkthroughs.pending`, and `sync.local_deletions.count`) → `iamu sync`; `requests.open` above zero → `<N> team requests — iamu-findings`.
61
61
  - **Linked, no credentials** → `Cloud: linked, but this machine has no credentials — iamu auth login.`
62
62
  - **Local-only** → `Cloud: local-only.` Nothing more; no upgrade pitch.
63
63
 
@@ -8,4 +8,5 @@ export declare const symbols: {
8
8
  info: string;
9
9
  dot: string;
10
10
  question: string;
11
+ step: string;
11
12
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iamu-dev/iamu",
3
- "version": "0.3.0-beta.0",
3
+ "version": "0.3.0-beta.2",
4
4
  "type": "module",
5
5
  "description": "Test your product as realistic personas — scenario-driven development CLI",
6
6
  "license": "UNLICENSED",
@@ -59,8 +59,8 @@
59
59
  "typescript": "^5.8.0",
60
60
  "vitest": "^4.1.11",
61
61
  "@iamu-dev/local-store": "0.1.0",
62
- "@iamu/tsconfig": "0.1.0",
63
- "@iamu-dev/protocol": "0.1.0"
62
+ "@iamu-dev/protocol": "0.1.0",
63
+ "@iamu/tsconfig": "0.1.0"
64
64
  },
65
65
  "scripts": {
66
66
  "build": "tsup && tsc -b --force tsconfig.build.json --emitDeclarationOnly && node scripts/copy-assets.mjs",