@iamu-dev/iamu 0.3.0-beta.5 → 0.4.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.
@@ -0,0 +1,111 @@
1
+ # Advise: from findings to fixes and directions
2
+
3
+ You are the advisor. A walker has used the product as a specific person in a specific situation and recorded findings: what was on screen, what it meant for them, and what they needed. A judge has answered whether they would come back. You come after both, out of character. Your job is to decide what should change, so the next run of this person, and the people around them, goes better.
4
+
5
+ Unlike the walker, you may read the project's code (read-only) and look at the screenshots. You do not drive the product.
6
+
7
+ You decide with the same product principles the walker observes with. They follow this method under "Product principles". Apply them at every step, not as a checklist at the end.
8
+
9
+ ## How to work
10
+
11
+ Work in this order. Do not skip ahead to writing fixes.
12
+
13
+ 1. **Read the flow first.** Read the steps in order, the verdict and every finding together, as the person lived them. Ask what they came to do, how far they got, and where the product made them work it out themselves. One finding is a moment; the flow is the story.
14
+
15
+ 2. **Meet the need.** A fix is judged by one thing: would this person have got what their `need` says (or, without one, the opposite of the `consequence`), at that moment? A fix that is technically correct but leaves the need unmet is wrong. Meet the need behind the words: when someone needs to know whether a request will be accepted, what serves them is the facts the decision rests on, shown plainly, not a prediction.
16
+
17
+ **Facts over forecasts.** Prefer showing what the product knows (the balance, who is away, which rule is broken and by how much) over scores, odds, confidence percentages or "AI recommendations". People can check and act on facts; a forecast they cannot verify makes them go and check elsewhere. Keep a prediction only when the person truly cannot act without one, and then show the facts it rests on next to it.
18
+
19
+ 3. **Diagnose: local or symptom.** Follow the diagnosis principle: one structural cause beats several symptom fixes, and the screenshots show what the persona pushed through without noticing. For each finding decide its `scope`:
20
+ - `local`: confined to one screen, element or string. A label, a missing value, a bug.
21
+ - `systemic`: a symptom of something shared. The same component or rule sits behind several findings; the data model has no notion of what the person is deciding; the product is organised around its records rather than the person's task; the information exists but not where the decision is made.
22
+ The code is your evidence. Search for the literal text in `ui_fact`, the screen title and the route, and start from there, not from the first plausible file. Note when a capability already exists elsewhere in the code but is not exposed where it is needed.
23
+
24
+ 4. **Decide what the system should do. Often less.** Before adding anything, ask in this order:
25
+ - Does this belong in the system at all, or is it a human process the system should record or stay out of? Place it on the software-boundary spectrum (enforces, records, facilitates, outside).
26
+ - Should this person see it at all? Role clarity: nobody sees everything at once. Showing the right thing to the right role often beats explaining more to everyone.
27
+ - Would removing, merging or deferring something make this better? Every visible element must earn its place; a required field must be something this person knows.
28
+ - Is the rule real? Trace a regulatory claim to its source and its weight (hard requirement, process model, best practice). Never block work over a best practice.
29
+ Prefer removing, hiding by role, deferring or leaving to people over adding. When you add something, say what it replaces or why nothing could.
30
+
31
+ 5. **Protect what works.** The panorama lists `strengths`: things the product does that people would miss if they were gone. A change must not remove or bury them; if it would, say so in the reach.
32
+
33
+ 6. **Look at how the leading systems in this domain do it.** Use the project's domain (see Context). If you can search the web, use it to check how two or three leading products handle this moment today rather than relying on memory, and describe only what you found or know well. Ask how the products that handle this moment best, for this kind of person, solve it, and describe the pattern as behaviour the person would see ("the dates turn amber and say a teammate is already away that week, before they submit"). Scale it to this product's real scope: what a team of this size, for these users, would build. Not the enterprise suite's full surface. A brand may be named only next to the mechanism, never instead of it.
34
+
35
+ 7. **Decide the ideal, then fit it to the code.** First what the person should experience. Then how this codebase gets there: existing components, data already loaded on that screen, the design system, copy conventions. Cite each file and the symbol you build on in `builds_on`. When the ideal needs more than the code has, say what it would take. Do not shrink the advice to what is easy to change.
36
+
37
+ 8. **Size by severity.** `minor` and `observation`: one or two sentences, no quick fix. `major` and `critical`: the strongest fix, and a `quick_fix` when the strongest fix is a bigger change.
38
+
39
+ 9. **Group shared causes.** Findings with one root cause get one `group`, with the cause stated once. Each finding's recommendation then says what fixing the cause does for that finding. Group members must cite at least one file in common.
40
+
41
+ 10. **Propose directions for the flow.** Now step back from single findings. Ask: if this flow were built around what this person came to do, what would be different? Propose 0 to 3 **directions**: structural changes, described as behaviour. Propose one only when two or more findings share a cause, or the cause is structural. Each direction names the findings it would absorb: this run's, and open findings from other scenarios listed in the panorama when the same cause shows there. Never propose a redesign for its own sake, and never one that the evidence does not need. If an open direction in the panorama already covers it, reuse its slug instead of inventing a new one.
42
+
43
+ 11. **Reason about reach.** For each direction, go through the project's other personas and scenarios in the panorama and ask:
44
+ - who else likely benefits, and why (`effect: "helps"`);
45
+ - who could be hurt: someone who relies on what you would move, hide or change (`effect: "risk"`);
46
+ - which scenarios must be re-run to check it actually helped (`verify`, including this one).
47
+ These are predictions, not observations. Give a reason for each. If a person who is clearly affected has no scenario, say so in the direction's `change` text rather than guessing.
48
+
49
+ 12. **Look at what nobody walked.** The panorama lists, per scenario, where it starts (`entry_path`) and which pages its runs visited (`walked_paths`). Compare that with the routes in the code. A surface every person passes through (a home page, a dashboard, the navigation) that no walk examined is a blind spot: every finding so far is silent about it. You cannot propose a direction for it without evidence, but you can name it as a `coverage_gap` observation and suggest the scenario that would test it (who, in what situation, starting where).
50
+
51
+ 13. **Question a feature's premise when it carries real risk.** Some features are risky as a premise, not only in their execution: processing health or other sensitive personal data, monitoring employees, automated decisions about people, dark patterns. If a feature in this product has that kind of legal, privacy or trust risk in this domain and country, say so as a `feature_risk` observation: what the risk is and what a safer form of the feature would be. Do not drop the feature from your advice on your own.
52
+
53
+ 14. **Decline rather than guess.** If a finding is not actionable from what you know, leave it out.
54
+
55
+ ## Writing
56
+
57
+ - Recommendations, quick fixes and direction texts are prose for a product person and a developer reading together. Plain, specific, in the product's own words.
58
+ - **No file paths or code symbols in the prose.** They go in `builds_on` only. The prose is shown to a later walker who must stay outside the code.
59
+ - A recommendation says what the person would see and why it meets their need, then how it fits this product.
60
+
61
+ ## Answer
62
+
63
+ Reply with one JSON object and nothing else.
64
+
65
+ For a run:
66
+
67
+ ```json
68
+ {
69
+ "groups": [{ "id": "g1", "root_cause": "…" }],
70
+ "advice": [
71
+ {
72
+ "finding_id": "<ref from the bundle, e.g. F3>",
73
+ "scope": "local | systemic",
74
+ "recommendation": "…",
75
+ "quick_fix": "… or null",
76
+ "builds_on": [{ "path": "relative/path/from/project/root", "symbol": "text that occurs in that file" }],
77
+ "group": "g1 or null",
78
+ "direction": "<direction slug> or null",
79
+ "heuristic": "the UX principle at stake (e.g. recognition_over_recall) or null"
80
+ }
81
+ ],
82
+ "directions": [
83
+ {
84
+ "slug": "kebab-case-name",
85
+ "title": "Short imperative title",
86
+ "problem": "The shared cause, in product terms",
87
+ "change": "What the person would experience instead",
88
+ "leading_practice": "How leading systems in this domain handle it, scaled to this product",
89
+ "size": "small | medium | large",
90
+ "absorbs": ["<ref, e.g. F3>", "<ref, e.g. F12>"],
91
+ "reach": [{ "scenario": "<scenario slug>", "effect": "helps | risk", "reason": "…" }],
92
+ "verify": ["<scenario slug>"],
93
+ "builds_on": [{ "path": "…", "symbol": "…" }]
94
+ }
95
+ ],
96
+ "observations": [
97
+ {
98
+ "kind": "coverage_gap | feature_risk",
99
+ "title": "Short title",
100
+ "detail": "What is missing or risky, and why it matters here",
101
+ "suggested_scenario": "Who, in what situation, starting where (coverage gaps) or null"
102
+ }
103
+ ]
104
+ }
105
+ ```
106
+
107
+ `observations` are at most five, never absorb findings and are never treated as evidence.
108
+
109
+ For a project synthesis (the bundle says `"mode": "project"`), answer with `directions` and `observations` only: `{ "directions": [ … ], "observations": [ … ] }`. Work across every scenario: look for the causes that keep showing up in different people's findings, and propose the directions that would absorb the most of them, within this product's scope. The bundle carries every unsettled problem: `open` ones, and `addressed` ones that were patched (their `existing_suggestion` is the patch) but not yet verified by a re-run. Read `latest_verdicts`: a scenario that still fails its human test after many of its findings were patched is the clearest sign that the patches treated symptoms and the cause is structural. Say so in the direction's `problem` when it applies.
110
+
111
+ Every `finding_id` and `absorbs` entry must be a finding `ref` from the bundle (`F1`, `F2`, …), copied exactly. Every `scenario` and `verify` entry must be a scenario slug from the panorama. Every `builds_on` path must exist and contain its symbol. Entries that break these rules are dropped one by one (an unknown absorbed id is removed from its direction) and the rest are kept.
@@ -174,15 +174,17 @@ The CLI automatically handles sequential numbering, timestamps, screenshot captu
174
174
  **Findings:** Always scaffold with the CLI — never create finding files by hand or call host Edit/Write tools:
175
175
 
176
176
  ```bash
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
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 --need "What I needed at that moment" --description "What happened and why it mattered" --json
178
178
  ```
179
179
 
180
180
  - `--type`: `helps | hinders | missing | irrelevant | incorrect`
181
181
  - `--severity`: `critical | major | minor | observation`
182
182
  - `--task-impact`: `blocks | impairs | slows | neutral | accelerates | enables`
183
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
184
+ - `--need`: for every finding that is not `helps`, what you needed at that moment, in your own terms as the persona ("I needed to know the code was wrong before I submitted")
185
+ - `--description`: markdown body describing what happened and why it mattered
186
+
187
+ **Record the need, never the fix.** You are outside the product: you cannot see its code or know what it would take to change. Write what you needed, not how the screen should change, and keep solutions out of the description too ("add inline validation" is a fix; "I needed to know before I pressed Send" is a need). A separate advisor reads the code after the walk and writes the fix from your need.
186
188
 
187
189
  Leave `triage_status` alone; triage is not the walker's job.
188
190
 
@@ -61,7 +61,7 @@ Ask whether to pick one up. When the user picks a request:
61
61
 
62
62
  ### 2. List mode: present open findings grouped by scenario
63
63
 
64
- Read all `.md` files in `iamu/findings/` directory. Parse YAML frontmatter for metadata: `id`, `slug`, `scenario`, `persona`, `run`, `type`, `severity`, `triage_status`, `ui_fact`, `consequence`, `title`.
64
+ Run `iamu findings --open --json`. Each finding carries `slug`, `scenario`, `type`, `severity`, `title`, `where` (page and step), `recommendation` (the advisor's, or null) and `fix_state`. For how each scenario is doing, run `iamu report --json` and keep the newest row per `scenario`: its `summary.verdict` (label, question, answer) is the scenario's current outcome.
65
65
 
66
66
  Filter to `triage_status: open`.
67
67
 
@@ -73,18 +73,22 @@ Filter to `triage_status: open`.
73
73
 
74
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.
75
75
 
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):
76
+ **Directions before findings.** Run `iamu directions --json`. Directions are structural changes the advisor proposed after a walk, each absorbing several findings (sometimes across scenarios), with the people it could hurt and the scenarios to re-run. If any are `proposed` or `accepted`, show them above the tally, one line each: `◆ <title> (<size>, <status>) · absorbs <N> findings in <S> scenarios · could hurt: <scenarios or "none predicted">`. Offer them first: taking a direction fixes its findings together, which beats patching them one by one. For each the user can **take it** (`iamu directions set <slug> --status accepted`, then implement it, or hand it to planning when it is `large`), take **only the local fixes** (leave it `proposed`, triage its findings below), **defer**, or **reject** (`--status rejected`; it is never proposed again). When a taken direction is implemented, mark it `done` and offer `iamu-run` for every scenario in its `verify` list. Reach is a prediction: say "likely" and "could", never "will".
77
77
 
78
- ```
79
- Findings Tally: <N> Open (<C> Critical · <M> Major · <m> Minor) across <S> Scenarios
80
- Awaiting verification: <K> addressed findings pending re-run
78
+ When open findings span three or more scenarios and there are no open directions, or the user asks what to change first, offer a project synthesis: `iamu advise --project --json`, dispatch a thorough-tier subagent with `iamu/.analysis/advise_prompt.md` as its only context, and record its answer with `iamu advise-record --project --data '<json>'`. It proposes directions across every scenario.
81
79
 
82
- ▼ [<scenario>](iamu/scenarios/<scenario>.md) (4 findings)
83
- 1. [CRITICAL · hinders] Handoff list is cluttered (Step <N>)
84
- 2. [MAJOR · missing] No visible confirmation after shift submit (Step <N>)
85
- ```
80
+ Render it as Markdown, not inside a code fence, so the tables render. Start with a one-line tally, then one block per scenario, scenarios with the worst verdict first:
81
+
82
+ **<N> open problems** (<C> critical · <M> major · <m> minor) across <S> scenarios · <K> fixes awaiting a re-run
83
+
84
+ ### <persona> · <situation> — **<NO / PARTIAL / YES>**
85
+ <the scenario's latest `summary.verdict.answer`, first sentence or two>
86
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.
87
+ | # | Finding | Severity | Where | What to do |
88
+ |---|---|---|---|---|
89
+ | 1 | <title> | **Critical** | <where> | <first sentence of recommendation, or — > |
90
+
91
+ Number findings continuously across scenarios, so "fix 3" means one finding. Sort each table worst first (critical → major → minor → observation; incorrect, hinders and missing before irrelevant). Leave strengths (`helps`) out of the tables. Keep the "What to do" cell to one sentence: the full recommendation belongs in the finding card (step 3).
88
92
 
89
93
  Ask the user how they would like to triage:
90
94
 
@@ -112,6 +116,10 @@ Read the finding file at `iamu/findings/<slug>.md`. Parse the YAML frontmatter (
112
116
 
113
117
  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.
114
118
 
119
+ **Advised findings are shown as they are.** When the frontmatter has `advised_by`, the recommendation was written after the walk by the advisor, from the code and the persona's need; a `**Part of:**` line names the direction it belongs to. Show it as is, and before applying it read `iamu/.runs/<run>/advice.json` and check that each `builds_on` file still exists and contains its symbol; if not, say the advice is stale before editing.
120
+
121
+ **Raise the recommendation before you show it** (only when there is no `advised_by`: older runs, findings pulled from the cloud, or runs whose advisor stage did not run). The walker wrote it without seeing the code, and it often patches the symptom. Ask what the products that handle this moment best would do for this persona — the established pattern and why it works, not a brand name. Then take a quick look at what this codebase can build that on: existing components, data already on the screen, the design system. Show the strongest fix that fits this project. When it is a bigger change than the walker's proposal, keep a small step that helps now as the quick fix. When the walker's proposal is already the right one, show it as is. Never recommend what the project cannot support without saying what it would take. Your reasoning stays out of the card — it is what "Discuss" is for.
122
+
115
123
  Format the visible finding in chat:
116
124
 
117
125
  ```markdown
@@ -123,7 +131,8 @@ Format the visible finding in chat:
123
131
  <What went wrong on screen and why it hinders the persona (synthesizing ui_fact and consequence in 1–2 clear, direct sentences)>
124
132
 
125
133
  **💡 Recommendation:**
126
- <Concrete fix proposal from finding body>
134
+ <The strongest fix that fits this project, grounded in the finding and the code>
135
+ <Only when the recommendation is a bigger change: *Quick fix:* <small step that helps now>>
127
136
  ```
128
137
  *(For `type: "helps"` findings, omit `**❌ Problem:**` and `**💡 Recommendation:**`; render `**✓ Strength:** <Observation>`)*.
129
138
 
@@ -236,7 +245,7 @@ If `<N> > 0` findings were queued for fix:
236
245
  Proceeding with code edits — say "done" to keep fixes open in iamu/findings/.
237
246
 
238
247
  - **Executing the queued fixes:**
239
- 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>"`.
248
+ When Option 1 is chosen, apply code edits for each queued finding sequentially in the workspace — the fix shown on its card or agreed in Discuss, not the walker's original text. Verify the changes once (run test/typecheck suite). Update each finding with `iamu triage <slug> --status addressed --note "<summary of fix>"`.
240
249
  Run `iamu validate --all` to verify all entities before reporting done.
241
250
 
242
251
  - **Closed-Loop Regression Verification (1-Click):**
@@ -50,7 +50,11 @@ Determine the mode based on `$ARGUMENTS` and user intent:
50
50
  6. Run `iamu validate --all`.
51
51
  7. Summarize: persona created in `iamu/personas/<slug>.md`. Prompt user: "You can now pair `<slug>` with a scenario draft via `iamu-new`, or propose situations for them via `iamu-propose`." Stop here for standalone persona requests.
52
52
 
53
- - **Fast-Path Scenario mode** (when intent, topic, or a candidate from `iamu-propose` is provided or referenced from conversational context, e.g. `iamu-new "checkout friction"`, "let's do candidate 2", "draft that", "option 1"):
53
+ - **Fast-Path Scenario mode** (when intent, topic, an Acceptance Criterion / User Story, or a candidate from `iamu-propose` is provided or referenced from conversational context, e.g. `iamu-new "checkout friction"`, `iamu-new "AC: System must require re-auth on payout change"`, "let's do candidate 2", "draft that", "option 1"):
54
+ - **Acceptance Criteria & User Stories:** When input contains an AC or user story:
55
+ 1. *Walkability check:* If the requirement is pure backend/infra (DB encryption, cron jobs, latency) with no observable human/browser workflow, reject: *"Deterministic backend constraint — verify via unit/integration tests."*
56
+ 2. *Entity mapping:* Map the requirement directly to the outline's `--human-test` question (framed as an observable outcome, not a DOM selector) and the story context to the outline's situation (`--narrative`), following the standard `outline.md` and `combine.md` methodologies (zero UI/screen language, evaluated at run completion).
57
+ 3. *Cast matching:* Match the story's actor to an existing persona in `iamu/personas/` (`iamu list personas`). Only propose a new persona if no fitting role exists in the panel.
54
58
  If the user refers to a candidate proposed in the current session, resolve that candidate's details directly from the conversation history.
55
59
  Do NOT drag the user through multiple question modals. Skip Step 2 entirely!
56
60
  Jump directly to Step 3 and present the **Complete Scenario Spec-Sheet** (Situation + Bound Persona + Evaluation Checkpoint + Walker Brief) for **1-click / 1-key acceptance**.
@@ -76,10 +80,27 @@ Present 2–3 scannable scenario proposals. Each proposal MUST bundle the situat
76
80
  • Evaluation Checkpoint: "<Concrete binary question>"
77
81
  ```
78
82
 
79
- **Interactive Decision:**
83
+ **Dual-Surface Candidate Selection (Sequencing Rule):**
84
+ You MUST output the candidate proposals to the chat stream FIRST. In the SAME turn, invoke `ask_question` with the candidates and options embedded in the `question` argument:
85
+
80
86
  - If your environment provides an interactive user-prompt tool (e.g. `ask_question`, `ask_followup_question`), invoke it:
81
- - Question: "Scaffold this scenario for walkthrough?"
82
- - Options:
87
+ - **Question:**
88
+ """
89
+ Proposed Test Journey Candidates:
90
+
91
+ 1. <Bundle 1 Title> (<Capability>)
92
+ • Persona: <Persona 1 Name> (<Role>)
93
+ • Tension: <1 concise sentence on human or organizational tension>
94
+ • Evaluation Checkpoint: "<Concrete binary yes/partial/no question>"
95
+
96
+ 2. <Alternative Title> (<Capability>)
97
+ • Persona: <Alternative Persona Name> (<Role>)
98
+ • Tension: <1 concise sentence>
99
+ • Evaluation Checkpoint: "<Concrete binary question>"
100
+
101
+ Scaffold this scenario for walkthrough?
102
+ """
103
+ - **Options:**
83
104
  1. "[Recommended] Scaffold '<Bundle 1 Title>' as <Persona 1 Name>"
84
105
  2. "Switch persona: Walk as <Alternative Persona Name> (<Role>)"
85
106
  3. "Select alternative: '<Bundle 2 Title>' as <Persona 2 Name>"
@@ -98,7 +119,7 @@ Present 2–3 scannable scenario proposals. Each proposal MUST bundle the situat
98
119
 
99
120
  In Fast-Path mode or when customizing, present the complete scenario as a structured, scannable Spec-Sheet before creating anything. Every field shown here is written verbatim to disk on confirmation.
100
121
 
101
- Keep the narrative capped at 2–3 punchy sentences (problem-space only, zero UI terms). (Note: When passing text to modal prompt tools like `ask_question`, use plain text without header hashes or blockquotes; in normal chat output, format clearly with standard markdown).
122
+ Keep the narrative capped at 2–3 punchy sentences (problem-space only, zero UI terms).
102
123
 
103
124
  ```
104
125
  Scenario Spec-Sheet: <Outline Title>
@@ -119,10 +140,26 @@ Persona & Brief:
119
140
  "<First-person brief in persona voice (2–3 sentences). Describes what they intend to achieve before touching the product. Written verbatim to scenario markdown body.>"
120
141
  ```
121
142
 
122
- **Interactive Draft Confirmation:**
143
+ **Dual-Surface Draft Confirmation (Sequencing Rule):**
144
+ You MUST output the complete Scenario Spec-Sheet to the chat stream FIRST. In the SAME turn, invoke `ask_question` with the spec-sheet embedded in the `question` argument so the user can verify all details within the dialog:
145
+
123
146
  - If your environment provides an interactive user-prompt tool, invoke it:
124
- - Question: "Scaffold scenario '<Outline Title>'?"
125
- - Options:
147
+ - **Question:**
148
+ """
149
+ Scenario Spec-Sheet: <Outline Title>
150
+
151
+ Situation & Stakes:
152
+ Narrative: <2–3 sentences problem-space only, zero UI terms>
153
+ Tension: <Colliding needs in X vs Y format or "None">
154
+ Evaluation: <Concrete binary yes/partial/no question scored at evaluation>
155
+
156
+ Persona & Brief:
157
+ Persona: <Name> (<Role>) — Friction: <Diagnostic friction trigger>
158
+ Walker Brief: "<First-person brief in persona voice (2–3 sentences)>"
159
+
160
+ Scaffold scenario '<Outline Title>'?
161
+ """
162
+ - **Options:**
126
163
  1. "[Recommended] Scaffold scenario and prepare walkthrough"
127
164
  2. "Switch persona: Walk as <Alternative Persona> (<Role>)"
128
165
  3. "Adjust situation, checkpoint, or brief"
@@ -55,12 +55,13 @@ Build a coverage picture: which capabilities have scenarios? Which actors from `
55
55
 
56
56
  ### 3. Determine focus
57
57
 
58
- Four entry paths based on `$ARGUMENTS`:
58
+ Five entry paths based on `$ARGUMENTS`:
59
59
 
60
60
  - **Persona / Tester panel** (e.g. `iamu-propose "personas"`, `"who else should we test with?"`, `"propose new personas"`) — analyze which actors from `context.yml` lack personas in `iamu/personas/`. Focus proposals on creating durable, diagnostically biased personas for uncovered roles.
61
61
  - **Area or capability** (e.g. `iamu-propose "employee provisioning"`) — focus proposals on this area. Match against capabilities and context actors/workflows.
62
62
  - **Open-ended** (e.g. `iamu-propose`, `iamu-propose "what's missing?"`) — analyze coverage gaps across scenarios and persona diversity. Prioritize untested product areas and actors without personas.
63
63
  - **Specific tension** (e.g. `iamu-propose "what happens when the safety coordinator disagrees with HR?"`) — use as seed but ground in context. Verify the tension is real (do these actors and dynamics exist in the domain?).
64
+ - **Requirement / Acceptance Criteria** (e.g. `iamu-propose "AC: require re-auth on payout change"`, user stories, or RFP clauses) — verify walkability first (reject pure backend/infra for unit/integration coverage). Ground the requirement in domain situations: propose 2–3 contrasting candidates showing how different actors from `context.yml` or the casting panel encounter this requirement under different pressures, with the AC mapped to each candidate's `--human-test` evaluation checkpoint.
64
65
 
65
66
  ### 4. Present candidates (Numbered Cards)
66
67
 
@@ -88,10 +89,24 @@ Existing coverage: <N> scenarios ([<slug1>](iamu/scenarios/<slug1>.md), ...). Un
88
89
  • Tension: <1-line human/domain tension>
89
90
  • Stress-tests: <What this reveals about the product>
90
91
 
91
- **Interactive Candidate Selection:**
92
+ **Dual-Surface Candidate Selection (Sequencing Rule):**
93
+ You MUST output the proposed candidates to the chat stream FIRST. In the SAME turn, invoke `ask_question` with the candidates and tensions embedded in the `question` argument:
94
+
92
95
  - If your environment provides an interactive user-prompt tool (e.g. `ask_question`, `ask_followup_question`), invoke it:
93
- - Question: "Which scenario candidate would you like to scaffold?"
94
- - Options:
96
+ - **Question:**
97
+ """
98
+ Proposed Scenario Candidates:
99
+
100
+ 1. <Candidate 1 Title> (<Actor>)
101
+ • Capability: <Capability slug> · Tension: <1-line human tension>
102
+ 2. <Candidate 2 Title> (<Actor>)
103
+ • Capability: <Capability slug> · Tension: <1-line human tension>
104
+ 3. <Candidate 3 Title> (<Actor>)
105
+ • Capability: <Capability slug> · Tension: <1-line human tension>
106
+
107
+ Which scenario candidate would you like to scaffold?
108
+ """
109
+ - **Options:**
95
110
  1. "[Recommended] Scaffold '<Candidate 1 Title>' (<Actor>)"
96
111
  2. "Scaffold '<Candidate 2 Title>' (<Actor>)"
97
112
  3. "Scaffold '<Candidate 3 Title>' (<Actor>)"
@@ -119,10 +134,24 @@ Existing personas: [<slug1>](iamu/personas/<slug1>.md), ... Uncovered roles from
119
134
  • Key Expectations & Vocabulary: <Domain terms and spec requirements>
120
135
  ```
121
136
 
122
- **Interactive Persona Selection:**
137
+ **Dual-Surface Persona Selection (Sequencing Rule):**
138
+ You MUST output the proposed personas to the chat stream FIRST. In the SAME turn, invoke `ask_question` with the candidates embedded in the `question` argument:
139
+
123
140
  - If your environment provides an interactive user-prompt tool (e.g. `ask_question`, `ask_followup_question`), invoke it:
124
- - Question: "Which persona would you like to add to the casting panel?"
125
- - Options:
141
+ - **Question:**
142
+ """
143
+ Proposed Persona Candidates:
144
+
145
+ 1. <Name 1> (<Actor role>)
146
+ • Friction: <Friction triggers and bounce risks>
147
+ 2. <Name 2> (<Actor role>)
148
+ • Friction: <Friction triggers and bounce risks>
149
+ 3. <Name 3> (<Actor role>)
150
+ • Friction: <Friction triggers and bounce risks>
151
+
152
+ Which persona would you like to add to the casting panel?
153
+ """
154
+ - **Options:**
126
155
  1. "[Recommended] Add <Name 1> (<Actor role>)"
127
156
  2. "Add <Name 2> (<Actor role>)"
128
157
  3. "Add <Name 3> (<Actor role>)"
@@ -329,10 +329,10 @@ Step files live at `iamu/.runs/<run-id>/steps/<NNN>.json`. The CLI manages monot
329
329
 
330
330
  **Recording findings:**
331
331
 
332
- Use the CLI to create findings with valid frontmatter, UUID, slug, description, and recommendation in one atomic call:
332
+ Use the CLI to create findings with valid frontmatter, UUID, slug, need and description in one atomic call (the walker records what the persona needed, never the fix; the advisor writes the fix in step C2):
333
333
 
334
334
  ```bash
335
- 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" --recommendation "Concrete fix proposal" --json
335
+ 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 --need "What I needed at that moment" --description "What happened and why it mattered" --json
336
336
  ```
337
337
 
338
338
  This generates a valid UUID, derives the slug from the title, and writes the complete finding file to `iamu/findings/<slug>.md`. Returns `{ "slug": "...", "path": "...", "id": "..." }`. Never invoke host Edit or Write tools.
@@ -397,7 +397,23 @@ iamu evaluate-record <run-id> --data '<raw_verdicts_json>' --no-prompt --no-push
397
397
 
398
398
  This links findings to human tests (`human_test_id`) and updates the report with judge verdicts.
399
399
 
400
- **D. Read the completed canonical.** Read `iamu/.runs/<run-id>/canonical.json` for the final data including verification delta (if a prior run exists). Use this for step 5 presentation.
400
+ **C2. Advise: fixes and directions.** Get the advisor prompt:
401
+
402
+ ```bash
403
+ iamu advise <run-id> --json
404
+ ```
405
+
406
+ If `needed` is `false` (blocked run, nothing open to advise, or already advised), skip to D. Otherwise read the prompt from `iamu/.runs/<run-id>/advise_prompt.md` and dispatch an advisor subagent with it as its only context (use the **thorough** model tier). Unlike the walker, the advisor reads the project's code (read-only) and the screenshots: it classifies each finding local or systemic, writes the fix from the persona's need, looks at how leading systems in the domain handle the moment, and proposes directions for the flow with their predicted reach on other personas. Record its JSON answer via `--data`:
407
+
408
+ ```bash
409
+ iamu advise-record <run-id> --data '<raw_advice_json>'
410
+ ```
411
+
412
+ Each entry is checked on its own. Entries that come back rejected (an invented file or symbol, a path in the prose, a direction with too little evidence) stay unadvised and the rest is kept; a run is advised once, so do not record again. Mention rejected entries in step 5. Keep the result's `directions` and `rerun` for step 5.
413
+
414
+ The judge (C) and the advisor (C2) are independent, so their subagents may run in parallel, but run `evaluate-record` and `advise-record` one after the other: both rewrite finding files. On a host without subagents, run the advise prompt yourself inline and record it the same way.
415
+
416
+ **D. Read the completed canonical.** Read `iamu/.runs/<run-id>/canonical.json` for the final data including the verification delta (if a prior run exists) and `analysis.directions` (if the advisor ran). Use this for step 5 presentation.
401
417
 
402
418
  **E. Publish (linked mode only).** Upload the completed run, screenshots, verdicts, and findings in one atomic sync:
403
419
 
@@ -415,7 +431,7 @@ It prints the URL only if the run is on the cloud; otherwise it exits 1 and says
415
431
 
416
432
  In linked-no-credentials or local-only mode, skip E.
417
433
 
418
- Only after A→E are complete, proceed to step 5.
434
+ Only after A→E (with C2) are complete, proceed to step 5.
419
435
 
420
436
  ### 4a. Walk methodology summary
421
437
 
@@ -427,46 +443,68 @@ The `walker_prompt` from `iamu instructions walk` is the source of truth and con
427
443
 
428
444
  ### 5. Present assessment — stay in the conversation
429
445
 
430
- Render results **inline** as a concise executive scorecard.
446
+ You MUST output the complete Executive Scorecard to the chat stream FIRST. Build it from `iamu report <scenario-slug> --json`: the first row is this run, and its `summary` holds everything below already assembled (verdict, per-test labels, the since-last-run outcome of each earlier finding, findings with titles, where and recommendations, directions, observations). Do not re-read `canonical.json` or `verdicts.json` yourself. Output rich Markdown, not inside a code fence, so tables render and links are clickable:
431
447
 
432
- **ANTI-BLOAT DIRECTIVE:** Terminal viewports are small. Never output multi-screen walls of markdown text. The overview exists only to present the top-line score and orient the user for triage. Do NOT dump long quotes, recommendations, full descriptions, or "What Worked" essays here — those belong in the interactive triage step below.
448
+ ### <summary.persona> · <summary.situation>
449
+ <summary.steps> steps · [Open in Iamu Cloud](<summary.cloud>) *(local-only: `[report.md](iamu/.runs/<run-id>/report.md)`)*
433
450
 
434
- Keep the presentation under 15 lines total. Output as rich Markdown (do NOT wrap the entire summary in a triple-backtick code block so links render as clickable):
451
+ > **<summary.verdict.question>** **<summary.verdict.label>**
452
+ > <summary.verdict.answer>
435
453
 
436
- ### Walkthrough Complete: [<scenario-slug>](iamu/scenarios/<scenario-slug>.md) ([<persona>](iamu/personas/<persona>.md))
437
- **Verdict:** <FAIL / PARTIAL / PASS> · <N> Blockers (Critical) · <M> Friction points (Major/Minor) · <K> Helpers (<StepCount> steps)
438
- **Checkpoint:** "<human_tests[0].question>" → <No / Partial / Yes>: <1-sentence direct answer>
454
+ If `summary.tests` has more than one test, add one line per test: `**<label>** · <question>`.
439
455
 
440
- #### Findings:
441
- 1. **[CRITICAL]** · *<type>* · <Short title> (Step <N> at `<short_url_path>`)
442
- 2. **[MAJOR]** · *<type>* · <Short title> (Step <N> at `<short_url_path>`)
443
- ...
444
- (Helps: • [helps] <short title> (Step <N>))
456
+ If `summary.since` is set, show what happened to every earlier finding this run re-checked (`summary.since.items`), then one line for the new ones:
445
457
 
446
- (If canonical.json contains a `verification` section, include a 1-line delta: `Since last run: ✓ <N> fixed · ✗ <M> persist · + <K> new`.)
458
+ **Since the last run** (<date of summary.since.baselineAt>)
447
459
 
448
- > ☁️ **Cloud Walkthrough:** [Open in Iamu Cloud](<url from iamu open <run-id> --print>)
449
- *(If local-only, render instead: `> **Artifact:** [iamu/.runs/<run-id>/report.md](iamu/.runs/<run-id>/report.md) (Local only)`)*
460
+ | Earlier finding | Now |
461
+ |---|---|
462
+ | <title> | ✓ Resolved / ✗ Persists / ○ Not seen / ? Unclear |
450
463
 
451
- Do NOT output `### What Worked` paragraphs or lengthy bullet essays. Keep the entire summary under 15 lines, then immediately present the triage prompt below.
464
+ `+ <summary.since.added> new problems this run.` "Not seen" means the walk did not pass that way: never call it fixed.
452
465
 
453
- 7. **Next actions (Interactive Triage Selection)**:
454
- When the walkthrough completes and yields findings:
455
- - If your environment provides an interactive user-prompt tool (e.g. `ask_question`, `ask_followup_question`), invoke it:
456
- - Question: "Walkthrough complete: <F> findings reported. How would you like to proceed?"
457
- - Options:
458
- 1. "[Recommended] Walk through findings one by one"
459
- 2. "Apply fixes for all clear findings (batch fix)"
460
- 3. "Discuss findings and persona friction points"
461
- 4. "Re-run walkthrough to test changes"
462
- - Otherwise (in CLI or text-only environments):
463
- Walkthrough complete: <F> findings reported. I recommend walking through findings one by one.
464
- Proceeding with one-by-one triage. (Say "batch fix", "discuss", or "re-run" to change course).
466
+ **Findings** (<N> problems, <K> strengths), worst first:
467
+
468
+ | # | Finding | Severity | Where | What to do |
469
+ |---|---|---|---|---|
470
+ | 1 | <title> | **Major** | <where> | <first sentence or two of recommendation, or — > |
471
+
472
+ Mark a finding that persists from the last run with `(persists)` after its title. Strengths go on one line under the table: `✓ Strengths: <title>; <title>`.
473
+
474
+ If `summary.directions` is non-empty:
475
+
476
+ **Directions** (structural changes the advisor proposes)
477
+
478
+ | Direction | Size | Absorbs | Re-run to check |
479
+ |---|---|---|---|
480
+ | <title> | <size> | <absorbs> findings | <verify> scenarios |
481
+
482
+ Reach is a prediction until those scenarios run again.
483
+
484
+ If `summary.observations` is non-empty, end with **Also worth knowing**: one bullet each, `Not walked: <title>` (coverage_gap) or `Risk: <title>` (feature_risk).
485
+
486
+ Do NOT output `### What Worked` paragraphs or lengthy bullet essays. Keep the scorecard scannable: the tables are the summary.
487
+
488
+ **Zero-Friction Triage Transition (Eliminate Meta-Prompt Gate):**
489
+ Do NOT prompt the user with a generic "How would you like to proceed?" multiple-choice modal. That intermediate prompt adds cognitive friction, duplicates the triage options, and obscures the assessment scorecard.
490
+
491
+ - **If `summary.findings` is empty (no problems):**
492
+ Output: "No problems found in this run." The verdict above still stands on its own: a run without findings can still answer NO.
493
+ Do not enter triage.
494
+
495
+ - **If `summary.findings` is not empty:**
496
+ Output the Executive Scorecard above to chat FIRST, and advance IMMEDIATELY to triage on **Finding #1 of <total>** (Step 6 below) in the same turn. The user can choose to queue to fix, queue all remaining fixes (batch accept), dismiss, or discuss directly from Finding #1.
465
497
 
466
498
  ### 6. Conversational Triage & Guided Review
467
499
 
468
500
  The conversation is the triage surface. Do NOT eject the user to manual CLI commands or dump them at file paths.
469
501
 
502
+ **Directions come first.** When the advisor proposed directions, offer them before going finding by finding, one at a time: what changes for the person, which findings it absorbs (in this and other scenarios), who it could hurt, and the size. The user chooses:
503
+ - **Take it**: `iamu directions set <slug> --status accepted`, then implement it (or hand it to planning when it is large). The findings it absorbs are fixed by the direction, not patched one by one.
504
+ - **Only the local fixes**: leave the direction `proposed` and triage its findings normally below.
505
+ - **Defer** (leave `proposed`) or **reject** (`iamu directions set <slug> --status rejected`; it will not be proposed again).
506
+ After a taken direction lands, mark it `done` and re-run the scenarios in its `verify` list, not only this one.
507
+
470
508
  #### A. Guided One-by-One Review ("walk through them" / "review one by one")
471
509
  When the user asks to review findings one by one:
472
510
  1. **Present Finding #N in a scannable format (High Visual Hierarchy):**
@@ -612,4 +650,4 @@ Run `iamu validate --all` to verify all entities before reporting done. If older
612
650
  - **Validate before done.** Always run `iamu validate --all` after a walkthrough to catch any issues.
613
651
  - **Use CLI for scaffolding.** `iamu start-run` for runs, `iamu new-finding` for findings, `iamu complete` for assembly. Never manually create run directories or generate UUIDs.
614
652
  - **Step files:** Record steps via the CLI (`iamu browse step` or `iamu step`), which manages step numbering, screenshots, and atomic writes to `steps/001.json`.
615
- - **Finding bodies:** After `iamu new-finding` scaffolds the file, edit the file to add the description and recommendation below the frontmatter.
653
+ - **Finding bodies:** `iamu new-finding` writes the description; the recommendation is written by `iamu advise-record` (step C2), never by the walker.