@iamu-dev/iamu 0.2.0-beta.9 → 0.3.0-beta.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/dist/adapters/claude-plugin.d.ts +13 -0
- package/dist/adapters/registry.d.ts +6 -0
- package/dist/adapters/types.d.ts +19 -0
- package/dist/bin.d.ts +2 -0
- package/dist/bin.js +5965 -1807
- package/dist/build-info.d.ts +53 -0
- package/dist/cloud-url.d.ts +19 -0
- package/dist/commands/auth-http.d.ts +37 -0
- package/dist/commands/auth-project-choice.d.ts +74 -0
- package/dist/commands/auth-token-input.d.ts +21 -0
- package/dist/commands/auth.d.ts +84 -0
- package/dist/commands/browse-actions.d.ts +61 -0
- package/dist/commands/browse-driver.d.ts +121 -0
- package/dist/commands/browse.d.ts +195 -0
- package/dist/commands/cloud-push.d.ts +27 -0
- package/dist/commands/complete.d.ts +132 -0
- package/dist/commands/completion.d.ts +2 -0
- package/dist/commands/context.d.ts +81 -0
- package/dist/commands/credentials.d.ts +144 -0
- package/dist/commands/diff-filter.d.ts +11 -0
- package/dist/commands/doctor.d.ts +33 -0
- package/dist/commands/edit-entity.d.ts +8 -0
- package/dist/commands/evaluate.d.ts +34 -0
- package/dist/commands/explore-crawl.d.ts +67 -0
- package/dist/commands/explore.d.ts +53 -0
- package/dist/commands/findings.d.ts +7 -0
- package/dist/commands/init.d.ts +27 -0
- package/dist/commands/instructions-walk.d.ts +69 -0
- package/dist/commands/instructions.d.ts +30 -0
- package/dist/commands/list.d.ts +5 -0
- package/dist/commands/live-run-client.d.ts +127 -0
- package/dist/commands/match.d.ts +15 -0
- package/dist/commands/mcp-config.d.ts +10 -0
- package/dist/commands/new-entity.d.ts +34 -0
- package/dist/commands/new-finding.d.ts +25 -0
- package/dist/commands/open.d.ts +8 -0
- package/dist/commands/port.d.ts +17 -0
- package/dist/commands/preflight.d.ts +26 -0
- package/dist/commands/prune.d.ts +11 -0
- package/dist/commands/pull.d.ts +5 -0
- package/dist/commands/register-cloud.d.ts +5 -0
- package/dist/commands/register-findings.d.ts +5 -0
- package/dist/commands/register-project.d.ts +5 -0
- package/dist/commands/register-walkthrough.d.ts +5 -0
- package/dist/commands/register.d.ts +10 -0
- package/dist/commands/report.d.ts +3 -0
- package/dist/commands/serve.d.ts +11 -0
- package/dist/commands/set-entity.d.ts +73 -0
- package/dist/commands/skills.d.ts +34 -0
- package/dist/commands/start-run.d.ts +56 -0
- package/dist/commands/status.d.ts +3 -0
- package/dist/commands/step-numbering.d.ts +87 -0
- package/dist/commands/step.d.ts +96 -0
- package/dist/commands/summary.d.ts +20 -0
- package/dist/commands/sync.d.ts +6 -0
- package/dist/commands/triage.d.ts +21 -0
- package/dist/commands/update.d.ts +4 -0
- package/dist/commands/validate.d.ts +11 -0
- package/dist/commands/view-results.d.ts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +5894 -1782
- package/dist/sync-mcp/fatal.d.ts +42 -0
- package/dist/sync-mcp/server.d.ts +1 -0
- package/dist/sync-mcp/tools.d.ts +12 -0
- package/dist/templates/prompts/walk.md +62 -37
- package/dist/templates/skills/iamu-findings.md +141 -44
- package/dist/templates/skills/iamu-new.md +106 -60
- package/dist/templates/skills/iamu-propose.md +36 -25
- package/dist/templates/skills/iamu-run.md +303 -124
- package/dist/templates/skills/iamu-setup.md +256 -181
- package/dist/templates/skills/iamu-stage.md +164 -0
- package/dist/templates/skills/iamu-status.md +16 -11
- package/dist/templates.d.ts +10 -0
- package/dist/ui/journey-diff.d.ts +3 -0
- package/dist/ui/json.d.ts +6 -0
- package/dist/ui/logger.d.ts +5 -0
- package/dist/ui/panic.d.ts +11 -0
- package/dist/ui/symbols.d.ts +11 -0
- package/dist/ui/table.d.ts +20 -0
- package/dist/ui/update-check.d.ts +6 -0
- package/dist/worktree-state.d.ts +49 -0
- package/package.json +6 -6
- package/dist/eval/gemini-eval-cli.js +0 -976
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fatal-error reporting for the sync MCP server entry point.
|
|
3
|
+
*
|
|
4
|
+
* stdout is the MCP stdio transport, so a diagnostic printed there would
|
|
5
|
+
* corrupt the protocol stream. Everything here writes to stderr only.
|
|
6
|
+
*/
|
|
7
|
+
/** Side effects a fatal report needs, injectable so it can be tested. */
|
|
8
|
+
export interface FatalDeps {
|
|
9
|
+
/** Write a diagnostic line — stderr, never stdout. */
|
|
10
|
+
writeErr: (text: string) => void;
|
|
11
|
+
/** Terminate the process with the given exit code. */
|
|
12
|
+
exit: (code: number) => void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Describe a fatal error, with its stack when there is one.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* formatFatal("uncaughtException", new Error("boom"));
|
|
20
|
+
* // "iamu sync-server: fatal uncaughtException: boom\n…stack…\n"
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare function formatFatal(kind: string, err: unknown): string;
|
|
24
|
+
/**
|
|
25
|
+
* Report a fatal error on stderr and exit non-zero.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* handleFatal("uncaughtException", err, deps);
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export declare function handleFatal(kind: string, err: unknown, deps?: FatalDeps): void;
|
|
33
|
+
/**
|
|
34
|
+
* Install `uncaughtException` / `unhandledRejection` handlers that log
|
|
35
|
+
* to stderr before exiting, instead of dying silently with code 1.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* installFatalHandlers();
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export declare function installFatalHandlers(deps?: FatalDeps): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
/**
|
|
3
|
+
* Build the `iamu-sync` MCP server: push, pull, auth status, and
|
|
4
|
+
* background change polling over the local `iamu/` project tree.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```ts
|
|
8
|
+
* const server = createSyncServer();
|
|
9
|
+
* await server.connect(new StdioServerTransport());
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
export declare function createSyncServer(): McpServer;
|
|
@@ -26,6 +26,16 @@ The persona has never seen this product's source code, its design docs, its issu
|
|
|
26
26
|
|
|
27
27
|
A finding you could only have made by reading code is not a walkthrough finding. Drop it.
|
|
28
28
|
|
|
29
|
+
## Strict Operational Capability Fence
|
|
30
|
+
|
|
31
|
+
<CAPABILITY_FENCE>
|
|
32
|
+
You are an observational walker subagent ONLY:
|
|
33
|
+
1. ZERO WRITE ACCESS: You are strictly forbidden from modifying, editing, patching, creating, or deleting project source files, tests, configs, or documents. You have no file editing tools for repository files.
|
|
34
|
+
2. ZERO CODE FIXING: Even if you spot a trivial typo, CSS bug, or broken link in the product, you must NEVER attempt to fix it in the codebase. Your only job is to record it as an iamu finding.
|
|
35
|
+
3. COMMAND WHITELIST: You may only execute `iamu browse ...`, `iamu step ...`, `iamu new-finding ...`, and `iamu summary ...`. Do not run git commits, builds, tests, or file mutations.
|
|
36
|
+
4. CHILD SESSION SUPPRESSION: Do not load parent workflow skills, triage routines, or setup flows. Do not run `iamu triage`, `iamu new`, or `iamu init`. Your sole task is walking the screen and recording steps.
|
|
37
|
+
</CAPABILITY_FENCE>
|
|
38
|
+
|
|
29
39
|
## Five observation categories
|
|
30
40
|
|
|
31
41
|
At every significant screen, observe through all five lenses:
|
|
@@ -80,6 +90,20 @@ Follow the persona's motivation. Spend time on what matters to them. When you ha
|
|
|
80
90
|
|
|
81
91
|
Browser failures — blank page, stuck spinner, cryptic error, 404 — are signal, not noise. Screenshot the failure state, record it as a finding, move on. Do not retry silently or open developer tools: the persona cannot.
|
|
82
92
|
|
|
93
|
+
If a step command fails with `The user stopped this run from the live viewer. End the walk now.`, do not retry or continue: stop the walkthrough immediately and proceed to Synthesis with what you observed so far.
|
|
94
|
+
|
|
95
|
+
## Human intervention (CAPTCHA, 2FA, & blocking walls)
|
|
96
|
+
|
|
97
|
+
When an anti-bot challenge (Cloudflare Turnstile, Google reCAPTCHA, hCaptcha), SMS/email two-factor authentication (2FA), or interactive security gate appears:
|
|
98
|
+
- **Do NOT record a product bug:** Security challenges and bot mitigation are operational hurdles, not product UX defects.
|
|
99
|
+
- **Request human intervention:** In an interactive session with a human present (visible Chrome window), pause and ask the human in chat to solve the challenge or complete the 2FA prompt in the open browser window.
|
|
100
|
+
- **Wait and verify:** After the human completes the verification, run:
|
|
101
|
+
```bash
|
|
102
|
+
iamu browse step --run <run-id> --action "Waited for human verification" wait 3000
|
|
103
|
+
```
|
|
104
|
+
Take a fresh snapshot to verify the page cleared the gate, and continue walking.
|
|
105
|
+
- **Headless / Unattended environments:** If running headless or in CI where no human is available, do not hang in infinite loops. Record the block in your step notes, finish the run with `--blocked`, and proceed to Synthesis.
|
|
106
|
+
|
|
83
107
|
## Tooling limitations vs product bugs
|
|
84
108
|
|
|
85
109
|
Your browser tooling has limitations that can look like product bugs. Before recording a finding, ask: "Is this a real product issue, or is my tooling failing?"
|
|
@@ -87,12 +111,12 @@ Your browser tooling has limitations that can look like product bugs. Before rec
|
|
|
87
111
|
**Signs of tooling limitation (NOT a product bug):**
|
|
88
112
|
- Navigation to a URL works in a real browser but the tool reports a blank page or redirect loop
|
|
89
113
|
- A click triggers client-side routing but the tool reports "bounced to dashboard" or the URL didn't change
|
|
90
|
-
- A dropdown/select appears empty but
|
|
114
|
+
- A dropdown/select appears empty in accessibility snapshot but rendered controls appear in indexed element inspection
|
|
91
115
|
- Screenshots show content that contradicts what the accessibility snapshot reports
|
|
92
116
|
|
|
93
117
|
**When you suspect a tooling issue:**
|
|
94
118
|
1. Try the interaction a different way (keyboard instead of click, direct URL instead of navigation)
|
|
95
|
-
2.
|
|
119
|
+
2. Inspect interactive elements (e.g. using indexed element inspection) to view rendered controls and available indices
|
|
96
120
|
3. Take a screenshot — if the screenshot shows the UI working but the tool reports failure, it's a tooling issue
|
|
97
121
|
4. If still unclear, record the finding but note in the `consequence` field: "May be a browser tooling limitation — verify in a real browser"
|
|
98
122
|
|
|
@@ -114,7 +138,7 @@ Your prompt may include an approximation strategy (e.g. "If Malmö is missing, c
|
|
|
114
138
|
|
|
115
139
|
## Portal-rendered UI
|
|
116
140
|
|
|
117
|
-
Radix / Headless UI / Floating UI render dropdowns and listboxes into portals that do not appear in accessibility snapshots. If an expandable combobox looks empty after click, try: press ArrowDown then Enter, or
|
|
141
|
+
Radix / Headless UI / Floating UI render dropdowns and listboxes into portals that do not appear in accessibility snapshots. If an expandable combobox looks empty after click, try: press ArrowDown then Enter, or re-run an indexed snapshot to inspect rendered portal elements. Take a fresh screenshot.
|
|
118
142
|
|
|
119
143
|
Progressive disclosure is normal. Before recording a `missing` finding, verify by interacting through at least one round of the form's progressive steps.
|
|
120
144
|
|
|
@@ -129,51 +153,52 @@ Your walking prompt has an `## Access` section saying how to become this persona
|
|
|
129
153
|
|
|
130
154
|
## Recording
|
|
131
155
|
|
|
132
|
-
**Steps:**
|
|
133
|
-
|
|
134
|
-
Path: `iamu/.runs/<run-id>/steps/<NNN>.json` (zero-padded, e.g., `001.json`, `002.json`)
|
|
135
|
-
|
|
136
|
-
```json
|
|
137
|
-
{
|
|
138
|
-
"step_number": 1,
|
|
139
|
-
"timestamp": "2026-04-27T10:00:00Z",
|
|
140
|
-
"action": "Opened dashboard",
|
|
141
|
-
"note": "First thing I see is...",
|
|
142
|
-
"screenshot": "screenshots/step-1.png",
|
|
143
|
-
"url": "https://app.example.com/dashboard",
|
|
144
|
-
"surface": "dashboard overview"
|
|
145
|
-
}
|
|
146
|
-
```
|
|
156
|
+
**Steps:** Record each step atomically via the CLI — never hand-craft raw JSON step files with custom scripts or host Write tools:
|
|
147
157
|
|
|
148
|
-
|
|
158
|
+
- For `iamu browse`:
|
|
159
|
+
```bash
|
|
160
|
+
iamu browse step --run <run-id> --action "<action>" --note "<first-person monologue>" <command> [args...]
|
|
161
|
+
```
|
|
162
|
+
Commands: `click <role> "<name>"`, `click-text "<text>"`, `click-index <N>`, `fill <role> "<name>" "<text>"`, `fill-index <N> "<text>"`, `select <role> "<name>" "<val>"`, `upload <role> "<name>" "<file-path>"`, `upload-index <N> "<file-path>"`, `press <key>`, `scroll [px]`, `back`, `shot`, `wait [ms]`.
|
|
163
|
+
When accessibility names are ambiguous, missing, or broken, inspect indexed interactive elements and drive via `click-index <N>`, `fill-index <N> "<text>"`, or `upload-index <N> "<file-path>"`.
|
|
164
|
+
When a link or button opens a new window/tab (`target="_blank"`), manage tabs via `tabs`, `switch-tab <index>`, and `close-tab [index]`.
|
|
165
|
+
- For other surfaces:
|
|
166
|
+
```bash
|
|
167
|
+
iamu step --run <run-id> --action "<action>" --note "<first-person monologue>" [--shot <screenshot-path>] [--url <url>]
|
|
168
|
+
```
|
|
149
169
|
|
|
150
|
-
`
|
|
170
|
+
`action` is what you did (e.g. "Clicked Checkout button").
|
|
171
|
+
`note` is your internal first-person persona reaction in character.
|
|
172
|
+
The CLI automatically handles sequential numbering, timestamps, screenshot capture/linking, and live event streaming.
|
|
151
173
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
One file per step. No appending. The Write tool creates the file without permission prompts.
|
|
155
|
-
|
|
156
|
-
**Findings:** Always scaffold with the CLI — never create a finding file by hand, never invent an id:
|
|
174
|
+
**Findings:** Always scaffold with the CLI — never create finding files by hand or call host Edit/Write tools:
|
|
157
175
|
|
|
158
176
|
```bash
|
|
159
|
-
iamu new-finding --scenario <slug> --run <run-id> --title "Short title" --type hinders --severity major --ui-fact "What the UI showed" --consequence "Impact on persona" --task-impact impairs --confidence high --json
|
|
177
|
+
iamu new-finding --scenario <slug> --run <run-id> --title "Short title" --type hinders --severity major --ui-fact "What the UI showed" --consequence "Impact on persona" --task-impact impairs --confidence high --description "Detailed markdown description of the issue" --recommendation "Concrete fix proposal" --json
|
|
160
178
|
```
|
|
161
179
|
|
|
162
|
-
`--type
|
|
180
|
+
- `--type`: `helps | hinders | missing | irrelevant | incorrect`
|
|
181
|
+
- `--severity`: `critical | major | minor | observation`
|
|
182
|
+
- `--task-impact`: `blocks | impairs | slows | neutral | accelerates | enables`
|
|
183
|
+
- `--confidence`: `high | medium | low`
|
|
184
|
+
- `--description`: markdown body describing what happened and why
|
|
185
|
+
- `--recommendation`: concrete suggestion for how to improve or fix the issue
|
|
163
186
|
|
|
164
|
-
|
|
187
|
+
Leave `triage_status` alone; triage is not the walker's job.
|
|
165
188
|
|
|
166
|
-
|
|
167
|
-
- `--confidence` — how sure you are this is real for this persona: `high` (you saw it on screen, clearly), `medium` (you saw it, but the persona might read it differently), `low` (it may be your tooling — say so in `consequence`). Then use the Edit tool to add the description and a `## Recommendation` section below the frontmatter. Leave `triage_status` alone; triage is not the walker's job.
|
|
189
|
+
**Screenshots:** Screenshots are captured automatically by `iamu browse step`. If driving manually, save to `iamu/.runs/<run-id>/screenshots/step-<N>.png` before recording each step. Screenshots are optional — if the browser tool disconnects or screenshots fail, use accessibility snapshots instead and continue walking.
|
|
168
190
|
|
|
169
|
-
**
|
|
170
|
-
|
|
171
|
-
Use the Write tool for step files. Never use bash `cat`, `echo`, or heredocs to write files.
|
|
191
|
+
**Execution rule:** Execute everything via CLI commands in the shell. Never invoke host Edit or Write tools on files in the workspace.
|
|
172
192
|
|
|
173
193
|
## Synthesis
|
|
174
194
|
|
|
175
|
-
After walking,
|
|
176
|
-
|
|
177
|
-
|
|
195
|
+
After walking, record your synthesis using the CLI:
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
iamu summary <run-id> --worked "What worked well 1" --worked "What worked well 2" --question "Open question 1"
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
- `--worked` — Things the system did well for this persona. Important to preserve.
|
|
202
|
+
- `--question` — Questions that arose that need discussion.
|
|
178
203
|
|
|
179
|
-
Then return your summary
|
|
204
|
+
Then return your final summary to the orchestrating agent so it can run `iamu complete` and the evaluation stage.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: iamu-findings
|
|
3
|
-
description:
|
|
3
|
+
description: Use when triaging, reviewing, listing, or resolving findings, bugs, UX friction, or issues discovered during walkthroughs, or when the user asks "what broke?", "show findings", or "review issues".
|
|
4
4
|
generatedBy: __IAMU_VERSION__
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -16,12 +16,18 @@ Before starting, check that `iamu/` exists with findings to review. If `iamu/` d
|
|
|
16
16
|
|
|
17
17
|
## Steps
|
|
18
18
|
|
|
19
|
-
### 1. Resolve
|
|
19
|
+
### 1. Resolve target and scope
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
Follow this precedence cascade:
|
|
22
22
|
|
|
23
|
-
- **
|
|
24
|
-
- **
|
|
23
|
+
- **Explicit finding slug or UUID** → skip to step 3 (direct triage of this finding).
|
|
24
|
+
- **Active session context (Recent Walkthrough / Active Scenario):**
|
|
25
|
+
If a walkthrough run just completed in this session, or the user asks to review/triage findings right after running a scenario (e.g. "what did we find?", "triage findings", "show findings"):
|
|
26
|
+
- Filter list mode to that run or scenario's open findings by default (or if only 1–2 open findings exist from the run, jump directly to step 3).
|
|
27
|
+
- Note clearly: `(Showing open findings for recently completed run <run-id> / scenario <slug>. Use iamu-findings --all to view all scenarios)`.
|
|
28
|
+
- **No argument & No active session walkthrough** →
|
|
29
|
+
- **Single-Entity Auto-Selection (Zero-Prompt Fast Path):** If only 1 open finding exists in the project, skip directly to step 3 (direct triage of this finding).
|
|
30
|
+
- Otherwise, continue to step 2 (global list mode across all scenarios).
|
|
25
31
|
|
|
26
32
|
**Cloud state** (either path). Run `iamu auth status --json` once:
|
|
27
33
|
|
|
@@ -67,62 +73,113 @@ Filter to `triage_status: open`.
|
|
|
67
73
|
|
|
68
74
|
A run that simply did not come across a finding proves nothing — never call a fix verified because it was not seen. After the list, if any fixes await a re-run, say how many and in which scenarios (`iamu status --json` → `rerun`, with `requests.open` for team requests), and offer `iamu-run <scenario>` for the first one.
|
|
69
75
|
|
|
70
|
-
Group by `scenario` field and render with an executive tally header, followed by a severity-sorted list per
|
|
76
|
+
Group by `scenario` field and render with an executive tally header, followed by a compact, severity-sorted 1-line list per finding (CRITICAL → MAJOR → MINOR → OBS; hinders and missing first, helps last):
|
|
71
77
|
|
|
72
78
|
```
|
|
73
79
|
Findings Tally: <N> Open (<C> Critical · <M> Major · <m> Minor) across <S> Scenarios
|
|
74
80
|
Awaiting verification: <K> addressed findings pending re-run
|
|
75
81
|
|
|
76
82
|
▼ [<scenario>](iamu/scenarios/<scenario>.md) (4 findings)
|
|
77
|
-
1. [CRITICAL · hinders] Handoff list is cluttered (
|
|
78
|
-
|
|
79
|
-
• Evidence: Step <N> at <url>
|
|
80
|
-
• Recommendation: Add status filter chips
|
|
81
|
-
|
|
82
|
-
2. [MAJOR · missing] No visible confirmation after shift submit ([file](iamu/findings/<slug>.md))
|
|
83
|
-
• Persona: <Persona Name>: "<Persona reaction or consequence quote>"
|
|
84
|
-
• Evidence: Step <N> at <url>
|
|
85
|
-
• Recommendation: Show inline success toast
|
|
83
|
+
1. [CRITICAL · hinders] Handoff list is cluttered (Step <N>)
|
|
84
|
+
2. [MAJOR · missing] No visible confirmation after shift submit (Step <N>)
|
|
86
85
|
```
|
|
87
86
|
|
|
87
|
+
**ANTI-BLOAT DIRECTIVE:** Do NOT dump persona quotes, evidence URLs, or recommendations into the overview tally. Keep it strictly 1 line per finding so the user can scan it in 3 seconds.
|
|
88
|
+
|
|
88
89
|
Ask the user how they would like to triage:
|
|
89
90
|
|
|
90
|
-
- **"walk through them"** → iterate through all open findings one-by-one in order with
|
|
91
|
+
- **"walk through them"** → iterate through all open findings one-by-one in order with compact card (`[Fix now] [Skip / Dismiss] [Discuss] [Next]`).
|
|
91
92
|
- **"all critical"** → iterate through all critical findings in order.
|
|
92
93
|
- **Scenario group name** (e.g. "group 1") → iterate through that scenario's findings.
|
|
93
94
|
- **Single number or slug** → single finding (skip to step 3).
|
|
94
95
|
- **"fix 1 and 2"** → make code fixes and mark addressed immediately.
|
|
95
96
|
- **"skip 3" / "dismiss 3"** → dismiss with reason (`out_of_scope`, `not_relevant`, `walker_error`, `duplicate`).
|
|
96
97
|
|
|
98
|
+
**Interactive Triage Strategy:**
|
|
99
|
+
- If your environment provides an interactive user-prompt tool (e.g. `ask_question`, `ask_followup_question`), invoke it:
|
|
100
|
+
- Question: "How would you like to review these <N> open findings?"
|
|
101
|
+
- Options:
|
|
102
|
+
1. "[Recommended] Walk through findings one by one"
|
|
103
|
+
2. "Focus only on Critical findings (<C> items)"
|
|
104
|
+
3. "Review by scenario group: <Top Scenario>"
|
|
105
|
+
- Otherwise (in CLI or text-only environments):
|
|
106
|
+
|
|
107
|
+
How would you like to triage these <N> open findings?
|
|
108
|
+
1. [Recommended] Walk through findings one by one
|
|
109
|
+
2. Focus only on Critical findings (<C> items)
|
|
110
|
+
3. Review by scenario group: <Top Scenario>
|
|
111
|
+
|
|
112
|
+
Reply '1' to walk through all [default], select 2-3, or enter a finding number/slug:
|
|
113
|
+
|
|
97
114
|
### 3. Direct triage: review one finding
|
|
98
115
|
|
|
99
|
-
Read the finding file at `iamu/findings/<slug>.md`. Parse the YAML frontmatter
|
|
116
|
+
Read the finding file at `iamu/findings/<slug>.md`. Parse the YAML frontmatter (`severity`, `type`, `title`, `ui_fact`, `consequence`, `persona`, `walkthrough_step_id`, `screen_title`, `page_url`, `run`) and markdown body (description and recommendation).
|
|
100
117
|
|
|
101
|
-
|
|
102
|
-
Finding: <title> ([file](iamu/findings/<slug>.md))
|
|
103
|
-
Scenario: [<scenario>](iamu/scenarios/<scenario>.md)
|
|
104
|
-
Severity: <severity> · Type: <type> · Status: <triage_status>
|
|
118
|
+
Synthesize a scannable triage summary. Do NOT output an undifferentiated wall of bullets or academic schema labels like "UI Fact:". The reviewer must be able to parse **What is broken** and **What to fix** in under 3 seconds.
|
|
105
119
|
|
|
106
|
-
|
|
107
|
-
UI Fact: <ui_fact>
|
|
108
|
-
Evidence: Step <N> at <url> (Screenshot: [view](iamu/.runs/<run>/screenshots/<NNN>.png))
|
|
120
|
+
Format the visible finding in chat:
|
|
109
121
|
|
|
110
|
-
|
|
111
|
-
|
|
122
|
+
```markdown
|
|
123
|
+
### Finding #<N>/<total> [<SEVERITY>] — <title>
|
|
124
|
+
> **Where:** `<Screen title or URL>` (Step <N>) · **Persona:** <Persona Name> (<Role>)
|
|
125
|
+
> **Evidence:** `iamu/.runs/<run>/screenshots/step-<N>.png` [Dashboard](<url if cloud_linked>)
|
|
112
126
|
|
|
113
|
-
|
|
114
|
-
|
|
127
|
+
**❌ Problem:**
|
|
128
|
+
<What went wrong on screen and why it hinders the persona (synthesizing ui_fact and consequence in 1–2 clear, direct sentences)>
|
|
115
129
|
|
|
116
|
-
|
|
130
|
+
**💡 Recommendation:**
|
|
131
|
+
<Concrete fix proposal from finding body>
|
|
117
132
|
```
|
|
118
133
|
|
|
119
|
-
If the
|
|
134
|
+
If the project is cloud-linked, include the link to the finding in Iamu Cloud (from `iamu open --print`).
|
|
135
|
+
|
|
136
|
+
Emit this card visibly into the conversation.
|
|
120
137
|
|
|
121
138
|
### 4. Prompt for triage action
|
|
122
139
|
|
|
123
|
-
|
|
140
|
+
Every finding must land on a decision — never silently skip. Match the user's intent to the closest option.
|
|
141
|
+
|
|
142
|
+
**CRITICAL: Embed Scannable Finding in Interactive Prompt Modals:**
|
|
143
|
+
Host interactive tools (e.g. `ask_question`, `ask_followup_question`) render a modal that obscures the terminal and displays ONLY the tool's `question` argument. **Embed this exact scannable structure inside the `question` argument** with blank lines separating the sections:
|
|
144
|
+
|
|
145
|
+
- If your environment provides an interactive user-prompt tool (e.g. `ask_question`, `ask_followup_question`), invoke it:
|
|
146
|
+
- **Question:**
|
|
147
|
+
"""
|
|
148
|
+
Finding #<N>/<total> [<SEVERITY>]: <title>
|
|
149
|
+
Where: <Screen title or URL, Step N> · Persona: <Persona Name> (<Role>)
|
|
150
|
+
|
|
151
|
+
❌ PROBLEM:
|
|
152
|
+
<What is broken or awkward on screen and why it hinders the persona in 1–2 direct sentences>
|
|
153
|
+
|
|
154
|
+
💡 RECOMMENDATION:
|
|
155
|
+
<Concrete fix proposal from finding body>
|
|
124
156
|
|
|
125
|
-
|
|
157
|
+
How should we triage this finding?
|
|
158
|
+
"""
|
|
159
|
+
- **Options:**
|
|
160
|
+
1. "[Recommended] Queue to fix (<brief 3-5 word fix summary>)"
|
|
161
|
+
2. "Dismiss / Skip (<brief reason if obvious, e.g. keep current design>)"
|
|
162
|
+
3. "Discuss / Explore trade-offs"
|
|
163
|
+
4. "Fix immediately (leave triage now)"
|
|
164
|
+
5. "Next finding (keep open / defer)"
|
|
165
|
+
- Otherwise (in CLI or text-only environments):
|
|
166
|
+
|
|
167
|
+
Finding #<N>/<total> [<SEVERITY>]: <title>
|
|
168
|
+
Where: <Screen title or URL, Step N> · Persona: <Persona Name> (<Role>)
|
|
169
|
+
|
|
170
|
+
❌ PROBLEM:
|
|
171
|
+
<What went wrong and why it hinders the persona in 1–2 direct sentences>
|
|
172
|
+
|
|
173
|
+
💡 RECOMMENDATION:
|
|
174
|
+
<Concrete fix proposal>
|
|
175
|
+
|
|
176
|
+
1. [Recommended] Queue to fix (<brief 3-5 word fix summary>)
|
|
177
|
+
2. Dismiss / Skip (not relevant or walker error)
|
|
178
|
+
3. Discuss / Explore trade-offs
|
|
179
|
+
4. Fix immediately (leave triage now)
|
|
180
|
+
5. Next finding (keep open / defer)
|
|
181
|
+
|
|
182
|
+
Reply '1' to queue fix [default], enter 2-5, or describe your decision:
|
|
126
183
|
|
|
127
184
|
Record the decision with `iamu triage` — it sets `triage_status` and `triage_note` in `iamu/findings/<slug>.md`, and for a dismissal it also teaches the next walk:
|
|
128
185
|
|
|
@@ -137,7 +194,12 @@ triage_status: addressed
|
|
|
137
194
|
triage_note: "Made handoff notes optional on /sv/handoff; verified on screen."
|
|
138
195
|
```
|
|
139
196
|
|
|
140
|
-
- **
|
|
197
|
+
- **Discuss / Explore trade-offs (Conversational Dialogue Mode — NO MODAL LOOPS)** → when the user chooses "Discuss", asks a question, or wants to explore architectural trade-offs:
|
|
198
|
+
**DO NOT invoke `ask_question` or present multiple-choice menus.** Stay in natural conversational chat as a senior pair programmer. Answer follow-up questions, inspect code, benchmark against competitors, and discuss options in plain markdown. Converse naturally back and forth until you reach a conclusion together. Only when a consensus or decision is reached ("let's queue it", "dismiss it", "fix it now"), record the decision and proceed. Do NOT trap the user with modal dialogs after each conversational turn.
|
|
199
|
+
|
|
200
|
+
- **Queue to fix [Recommended in list-mode]** → add to the session's fix queue. Tell the user in 1 line: "✓ Queued for fix. Advancing to next finding..." and loop to the next finding. Complete the triage queue across all findings first.
|
|
201
|
+
|
|
202
|
+
- **Fix immediately (leave triage now)** → the change is small, one-or-two files, and user explicitly chose to leave triage now. Make the edit, verify it loads (if a dev server is running, open the affected screen and check), then record: `iamu triage <slug> --status addressed --note "<one-line change summary>"`. Do not close a finding as addressed before the change lands and is inspected. Tell the user the fix now awaits a re-run: only a later walkthrough of the scenario turns it verified.
|
|
141
203
|
|
|
142
204
|
- **Design change needed** → the change requires design thinking (restructuring a flow, new capability, API contract touch, multiple files). Do NOT fix inline. Use the project's own change process if it has one — check the agent docs and the repo for it (an `openspec/` directory and its change skills, an ADR or RFC folder, an issue tracker the docs name) and start the change there with the finding's persona + scenario context pre-filled. Only if the project has none, draft a short design doc. Then leave the finding `open` until the change ships. Attach the change reference in `triage_note`: `"Design change: <reference>. Re-triage when the change ships."`.
|
|
143
205
|
|
|
@@ -145,12 +207,19 @@ triage_note: "Made handoff notes optional on /sv/handoff; verified on screen."
|
|
|
145
207
|
|
|
146
208
|
- **Won't fix (accepted trade-off)** → the problem is real but the team accepts it. `iamu triage <slug> --status wont_fix --note "<the trade-off>"`. It stays out of future walks' dismissed list only as a known issue — no guidance rule is written.
|
|
147
209
|
|
|
148
|
-
- **Not relevant / walker got it wrong** → the finding should never have been reported.
|
|
149
|
-
|
|
150
|
-
|
|
210
|
+
- **Not relevant / walker got it wrong (Load-Bearing Guidance Learning)** → the finding should never have been reported. **Never infer the reason silently.** Always ask the user:
|
|
211
|
+
> "To teach future walkthroughs what not to report, why should this be dismissed?
|
|
212
|
+
> • **By design / intended behavior:** (Why this pattern is expected)
|
|
213
|
+
> • **Walker error:** (What the walker misread or did wrong)
|
|
214
|
+
> • **Out of scope:** (Non-issue for this product/flow)
|
|
215
|
+
> What specific rule should future walkers follow?"
|
|
216
|
+
|
|
217
|
+
Once the user provides their rationale:
|
|
218
|
+
- *Not relevant* (by design, out of scope): `iamu triage <slug> --status dismissed --reason not_relevant --note "<why it is not a problem>" --rule "<rule string>"`.
|
|
219
|
+
- *Walker error* (the walker misread the screen): `iamu triage <slug> --status dismissed --reason walker_error --note "<what it misread>" --rule "<rule string>"`.
|
|
151
220
|
- *Duplicate* of another finding: `--reason duplicate --note "Duplicate of <slug>"` (no rule is written).
|
|
152
221
|
|
|
153
|
-
Not relevant and walker error write a **tester guidance rule** to `iamu/guidance/<slug>.md` that every later walker reads (and the matcher uses to flag repeats). The rule text defaults to "Don't report: <title>"; pass `--rule "<one sentence the walker can act on>"` when the title is too narrow or too broad. The rule applies to the whole project unless you pass `--scope outline` or `--scope capability` — narrow it when the finding is only irrelevant in this situation. Several findings dismissed for the same reason go in one call and share one rule. **Tell the user: "Dismissed —
|
|
222
|
+
Not relevant and walker error write a **tester guidance rule** to `iamu/guidance/<slug>.md` that every later walker reads (and the matcher uses to flag repeats). The rule text defaults to "Don't report: <title>"; pass `--rule "<one sentence the walker can act on>"` when the title is too narrow or too broad. The rule applies to the whole project unless you pass `--scope outline` or `--scope capability` — narrow it when the finding is only irrelevant in this situation. Several findings dismissed for the same reason go in one call and share one rule. **Tell the user: "✓ Dismissed (<reason>) — Guidance rule taught to future walks in iamu/guidance/<slug>.md: '<rule string>'."** One-word notes ("nope") degrade future runs — capture the user's specific rationale.
|
|
154
223
|
|
|
155
224
|
- **Keep (no decision yet)** → rare. Use only when the reviewer genuinely needs more information. Leave `triage_status: open` and add a `triage_note` noting what you are waiting for: `"Waiting on <thing> before triage."`.
|
|
156
225
|
|
|
@@ -173,21 +242,49 @@ dismissed (not_relevant): <finding-slug>
|
|
|
173
242
|
|
|
174
243
|
### 5. Continue or close
|
|
175
244
|
|
|
176
|
-
If the user is in list-mode iteration (picked "all critical" or a scenario group), loop to step 3 for the next finding in the queue.
|
|
245
|
+
If the user is in list-mode iteration (picked "walk through them", "all critical", or a scenario group), loop to step 3 for the next finding in the queue.
|
|
177
246
|
|
|
178
|
-
|
|
247
|
+
When all findings in the queue are triaged, present the summary:
|
|
179
248
|
|
|
180
|
-
```
|
|
249
|
+
```text
|
|
181
250
|
Triage complete.
|
|
182
|
-
|
|
251
|
+
Queued for fix: <N>
|
|
183
252
|
Dismissed: <N>
|
|
184
253
|
Rescoped (design change / defer): <N>
|
|
185
254
|
Kept open: <N>
|
|
186
|
-
|
|
187
|
-
<X> findings remain open. Use iamu-findings to resume later.
|
|
188
255
|
```
|
|
189
256
|
|
|
190
|
-
|
|
257
|
+
If `<N> > 0` findings were queued for fix:
|
|
258
|
+
- Prompt the user:
|
|
259
|
+
- If interactive tool available:
|
|
260
|
+
- Question: "Triage complete. Apply fixes for the <N> queued findings now?"
|
|
261
|
+
- Options:
|
|
262
|
+
1. "[Recommended] Apply queued fixes in workspace now"
|
|
263
|
+
2. "Done for now (keep fixes open in iamu/findings/)"
|
|
264
|
+
- Otherwise (CLI / text-only):
|
|
265
|
+
Apply fixes for the <N> queued findings now?
|
|
266
|
+
1. [Recommended] Apply queued fixes in workspace now
|
|
267
|
+
2. Done for now (keep fixes open in iamu/findings/)
|
|
268
|
+
Reply '1' to apply fixes [default], or select 2:
|
|
269
|
+
|
|
270
|
+
- **Executing the queued fixes:**
|
|
271
|
+
When Option 1 is chosen, apply code edits for each queued finding sequentially in the workspace. Verify the changes once (run test/typecheck suite). Update each finding with `iamu triage <slug> --status addressed --note "<summary of fix>"`.
|
|
272
|
+
Run `iamu validate --all` to verify all entities before reporting done.
|
|
273
|
+
|
|
274
|
+
- **Closed-Loop Regression Verification (1-Click):**
|
|
275
|
+
If the addressed findings belong to a known scenario:
|
|
276
|
+
- If interactive tool available:
|
|
277
|
+
- Question: "Fixes applied and validated. Verify them now with a walkthrough re-run?"
|
|
278
|
+
- Options:
|
|
279
|
+
1. "[Recommended] Re-run walkthrough for <scenario-slug> to verify fixes hold"
|
|
280
|
+
2. "Done for now (leave verification for later)"
|
|
281
|
+
- Otherwise (CLI / text-only):
|
|
282
|
+
Verify fixes now?
|
|
283
|
+
1. [Recommended] Re-run walkthrough for <scenario-slug> to verify fixes hold
|
|
284
|
+
2. Done for now (leave verification for later)
|
|
285
|
+
Reply '1' to re-run [default], or select 2:
|
|
286
|
+
|
|
287
|
+
When Option 1 is chosen, hand off to `iamu-run <scenario-slug>` to re-run the walkthrough, visit the revisit places, verify resolutions in `canonical.json`, and report the verified delta.
|
|
191
288
|
|
|
192
289
|
### 6. Publish and link (linked mode only)
|
|
193
290
|
|