@iamu-dev/iamu 0.2.0-beta.7 → 0.3.0-beta.0
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 +6660 -1556
- 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 +46 -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 +6617 -1559
- 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 +118 -42
- package/dist/templates/skills/iamu-new.md +107 -58
- package/dist/templates/skills/iamu-propose.md +36 -20
- package/dist/templates/skills/iamu-run.md +277 -114
- package/dist/templates/skills/iamu-setup.md +259 -150
- 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 +8 -8
- 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,102 @@ 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
|
|
|
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):
|
|
98
106
|
|
|
99
|
-
|
|
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>
|
|
100
111
|
|
|
101
|
-
|
|
102
|
-
Finding: <title> ([file](iamu/findings/<slug>.md))
|
|
103
|
-
Scenario: [<scenario>](iamu/scenarios/<scenario>.md)
|
|
104
|
-
Severity: <severity> · Type: <type> · Status: <triage_status>
|
|
112
|
+
Reply '1' to walk through all [default], select 2-3, or enter a finding number/slug:
|
|
105
113
|
|
|
106
|
-
|
|
107
|
-
UI Fact: <ui_fact>
|
|
108
|
-
Evidence: Step <N> at <url> (Screenshot: [view](iamu/.runs/<run>/screenshots/<NNN>.png))
|
|
114
|
+
### 3. Direct triage: review one finding
|
|
109
115
|
|
|
110
|
-
|
|
111
|
-
<markdown body above ## Recommendation>
|
|
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).
|
|
112
117
|
|
|
113
|
-
|
|
114
|
-
<## Recommendation section, or "none">
|
|
118
|
+
Synthesize a comprehensive, dashboard-aligned triage summary. Do NOT force an artificial single `Source: file:line` (UX friction and user blockers often span entire flows, API errors, or policy). Instead, present:
|
|
115
119
|
|
|
116
|
-
|
|
120
|
+
```
|
|
121
|
+
Finding <N>/<total>: [<SEVERITY> · <type>] <title>
|
|
122
|
+
• Persona: <Persona Name> (<Role>) · <Screen title or URL, Step N>
|
|
123
|
+
• UI Fact: <What the UI showed or did (ui_fact)>
|
|
124
|
+
• Consequence: <Impact on the persona completing their task (consequence)>
|
|
125
|
+
• Agent Insight: <1–2 plain-language sentences synthesizing why this happens and what it means in context>
|
|
126
|
+
• Recommendation: <Concrete fix proposal from finding body>
|
|
127
|
+
• Evidence: <iamu/.runs/<run>/screenshots/step-<N>.png> [Dashboard](<url if cloud_linked>)
|
|
117
128
|
```
|
|
118
129
|
|
|
119
|
-
If the
|
|
130
|
+
If the project is cloud-linked, include the link to the finding in Iamu Cloud (from `iamu open --print`).
|
|
120
131
|
|
|
121
|
-
|
|
132
|
+
Emit this card visibly into the conversation.
|
|
122
133
|
|
|
123
|
-
|
|
134
|
+
### 4. Prompt for triage action
|
|
124
135
|
|
|
125
|
-
Every finding must land on a decision — never silently skip.
|
|
136
|
+
Every finding must land on a decision — never silently skip. Match the user's intent to the closest option.
|
|
137
|
+
|
|
138
|
+
**CRITICAL: Embed Full Context in Interactive Prompt Modals:**
|
|
139
|
+
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. **You must embed the complete finding summary inside the `question` argument** so the reviewer has full context directly in the dialog without having to close the modal.
|
|
140
|
+
|
|
141
|
+
- If your environment provides an interactive user-prompt tool (e.g. `ask_question`, `ask_followup_question`), invoke it:
|
|
142
|
+
- **Question:**
|
|
143
|
+
"""
|
|
144
|
+
Finding #<N>/<total>: <title>
|
|
145
|
+
|
|
146
|
+
• Impact: [<SEVERITY> · <type>]
|
|
147
|
+
• Persona: <Persona Name> (<Role>) · <Screen title or URL, Step N>
|
|
148
|
+
• UI Fact: <ui_fact>
|
|
149
|
+
• Consequence: <consequence>
|
|
150
|
+
• Agent Insight: <1–2 sentences explaining why this happens in simple terms>
|
|
151
|
+
• Recommendation: <concrete recommendation>
|
|
152
|
+
• Evidence: <screenshot path, local file link, and cloud dashboard link if linked>
|
|
153
|
+
|
|
154
|
+
How should we triage this finding?
|
|
155
|
+
"""
|
|
156
|
+
- **Options:**
|
|
157
|
+
1. "[Recommended] Queue to fix (mark for fix & continue triage)"
|
|
158
|
+
2. "Dismiss / Won't fix (record reason & walker guidance rule)"
|
|
159
|
+
3. "Design change needed (open issue / design doc)"
|
|
160
|
+
4. "Defer (revisit in later milestone)"
|
|
161
|
+
5. "Fix immediately (leave triage now)"
|
|
162
|
+
- Otherwise (in CLI or text-only environments):
|
|
163
|
+
|
|
164
|
+
Triage Finding #<N>/<total>: '<finding title>'
|
|
165
|
+
1. [Recommended] Queue to fix (mark for fix & continue triage)
|
|
166
|
+
2. Dismiss / Won't fix (record reason & walker guidance rule)
|
|
167
|
+
3. Design change needed (open issue / design doc)
|
|
168
|
+
4. Defer (revisit in later milestone)
|
|
169
|
+
5. Fix immediately (leave triage now)
|
|
170
|
+
|
|
171
|
+
Reply '1' to queue fix [default], enter 2-5, or describe your decision:
|
|
126
172
|
|
|
127
173
|
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
174
|
|
|
@@ -137,7 +183,9 @@ triage_status: addressed
|
|
|
137
183
|
triage_note: "Made handoff notes optional on /sv/handoff; verified on screen."
|
|
138
184
|
```
|
|
139
185
|
|
|
140
|
-
- **
|
|
186
|
+
- **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.
|
|
187
|
+
|
|
188
|
+
- **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
189
|
|
|
142
190
|
- **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
191
|
|
|
@@ -173,21 +221,49 @@ dismissed (not_relevant): <finding-slug>
|
|
|
173
221
|
|
|
174
222
|
### 5. Continue or close
|
|
175
223
|
|
|
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.
|
|
224
|
+
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
225
|
|
|
178
|
-
|
|
226
|
+
When all findings in the queue are triaged, present the summary:
|
|
179
227
|
|
|
180
|
-
```
|
|
228
|
+
```text
|
|
181
229
|
Triage complete.
|
|
182
|
-
|
|
230
|
+
Queued for fix: <N>
|
|
183
231
|
Dismissed: <N>
|
|
184
232
|
Rescoped (design change / defer): <N>
|
|
185
233
|
Kept open: <N>
|
|
186
|
-
|
|
187
|
-
<X> findings remain open. Use iamu-findings to resume later.
|
|
188
234
|
```
|
|
189
235
|
|
|
190
|
-
|
|
236
|
+
If `<N> > 0` findings were queued for fix:
|
|
237
|
+
- Prompt the user:
|
|
238
|
+
- If interactive tool available:
|
|
239
|
+
- Question: "Triage complete. Apply fixes for the <N> queued findings now?"
|
|
240
|
+
- Options:
|
|
241
|
+
1. "[Recommended] Apply queued fixes in workspace now"
|
|
242
|
+
2. "Done for now (keep fixes open in iamu/findings/)"
|
|
243
|
+
- Otherwise (CLI / text-only):
|
|
244
|
+
Apply fixes for the <N> queued findings now?
|
|
245
|
+
1. [Recommended] Apply queued fixes in workspace now
|
|
246
|
+
2. Done for now (keep fixes open in iamu/findings/)
|
|
247
|
+
Reply '1' to apply fixes [default], or select 2:
|
|
248
|
+
|
|
249
|
+
- **Executing the queued fixes:**
|
|
250
|
+
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>"`.
|
|
251
|
+
Run `iamu validate --all` to verify all entities before reporting done.
|
|
252
|
+
|
|
253
|
+
- **Closed-Loop Regression Verification (1-Click):**
|
|
254
|
+
If the addressed findings belong to a known scenario:
|
|
255
|
+
- If interactive tool available:
|
|
256
|
+
- Question: "Fixes applied and validated. Verify them now with a walkthrough re-run?"
|
|
257
|
+
- Options:
|
|
258
|
+
1. "[Recommended] Re-run walkthrough for <scenario-slug> to verify fixes hold"
|
|
259
|
+
2. "Done for now (leave verification for later)"
|
|
260
|
+
- Otherwise (CLI / text-only):
|
|
261
|
+
Verify fixes now?
|
|
262
|
+
1. [Recommended] Re-run walkthrough for <scenario-slug> to verify fixes hold
|
|
263
|
+
2. Done for now (leave verification for later)
|
|
264
|
+
Reply '1' to re-run [default], or select 2:
|
|
265
|
+
|
|
266
|
+
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
267
|
|
|
192
268
|
### 6. Publish and link (linked mode only)
|
|
193
269
|
|