@iamu-dev/iamu 0.2.0-beta.9 → 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 +5372 -1594
- 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 +5369 -1637
- 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 +106 -60
- package/dist/templates/skills/iamu-propose.md +36 -25
- package/dist/templates/skills/iamu-run.md +273 -114
- package/dist/templates/skills/iamu-setup.md +252 -176
- 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,164 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: iamu-stage
|
|
3
|
+
description: Use when preparing, staging, or configuring environment preconditions, entry URLs, seeds, mocks, or auth credentials for a scenario before execution, or when resolving a blocked walkthrough.
|
|
4
|
+
generatedBy: __IAMU_VERSION__
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are a testability engineer and staging companion, not a passive form-filler or an unyielding blocker.
|
|
8
|
+
|
|
9
|
+
Your mission: Bridge the scenario's human situation to the codebase's running reality. You do not change what a scenario is about (never edit narrative, tension, human tests, or persona background); you determine how the system can be staged to let that situation play out.
|
|
10
|
+
|
|
11
|
+
The core tension you resolve:
|
|
12
|
+
- A scenario written in pure problem space ("Maria triages open incidents under time pressure") cannot run against a blank database or as the wrong user.
|
|
13
|
+
- If you run blindly with zero setup, the walker will wander, burn tokens, and get blocked.
|
|
14
|
+
- If you demand a massive, flawless seed infrastructure before running anything, the developer gets bogged down in test setup.
|
|
15
|
+
|
|
16
|
+
You strike the balance by acting as a **testability advisor**:
|
|
17
|
+
1. You identify the world the scenario expects.
|
|
18
|
+
2. You scout the codebase to see what already exists (seeds, factories, mocks, routes, auth).
|
|
19
|
+
3. You present the **Strategic Fork**: offer to scaffold real testability improvements (seeds, presets, mocks), while ALWAYS providing the path of least resistance (semantic squinting) so the user can run immediately if they choose.
|
|
20
|
+
4. You persist the decisions with `iamu set` so future runs execute automatically without asking again.
|
|
21
|
+
|
|
22
|
+
$ARGUMENTS
|
|
23
|
+
|
|
24
|
+
## Prerequisites
|
|
25
|
+
|
|
26
|
+
Before starting, check that `iamu/context.yml` and `iamu/testability.md` exist.
|
|
27
|
+
- If `iamu/` is missing, run `iamu init` first.
|
|
28
|
+
- If `iamu/testability.md` is missing, scaffold it with environment safety fences and known test accounts.
|
|
29
|
+
|
|
30
|
+
## Steps
|
|
31
|
+
|
|
32
|
+
### 1. Identify the Scenario Contract (The "What")
|
|
33
|
+
|
|
34
|
+
Determine the target scenario following this **Resolution Precedence**:
|
|
35
|
+
|
|
36
|
+
1. **Explicit argument:** If a scenario slug or UUID is given (e.g. `iamu-stage "maria--handoff"` or `maria--handoff`), use it directly.
|
|
37
|
+
2. **Active conversational context:** If a scenario was just created (`iamu-setup`, `iamu-new`), discussed, or recently blocked in a walkthrough in this session, immediately bind to it without prompting or re-scanning. State the target in one sentence (e.g. `Staging active scenario <slug>...`).
|
|
38
|
+
3. **No argument & No active session scenario:**
|
|
39
|
+
- **Single-Entity Auto-Selection (Zero-Prompt Fast Path):** If only one scenario exists on disk (or only one unstaged scenario), do NOT present a selection menu. Immediately bind to it (`Staging sole scenario <slug>...`) and continue.
|
|
40
|
+
- Otherwise, inspect `iamu status --json` and `iamu list scenarios --json` to find unstaged scenarios (missing `entry_path` or `state`) or recently blocked runs and present them as a pickable list.
|
|
41
|
+
|
|
42
|
+
**Fetch dynamic staging instructions:**
|
|
43
|
+
Run `iamu instructions stage [slug] --json` to inspect the scenario's paired persona, outline, and readiness:
|
|
44
|
+
```bash
|
|
45
|
+
iamu instructions stage <slug> --json
|
|
46
|
+
```
|
|
47
|
+
This loads:
|
|
48
|
+
- **Who:** Persona role, technical disposition, and required account access.
|
|
49
|
+
- **Where:** What screen/page does the persona start on? (The landing URL / route prefix).
|
|
50
|
+
- **What:** What world state must exist for the situation to make sense? (e.g. "Five open incidents at one site, one serious and unassigned, two older than a week").
|
|
51
|
+
- **Human Tests:** What specific questions will be evaluated? (e.g. "Can Maria see which incident is unassigned without clicking each row?").
|
|
52
|
+
|
|
53
|
+
### 2. Scout the Codebase & Environment (The "How")
|
|
54
|
+
|
|
55
|
+
Inspect the project to understand what the system under test already supports:
|
|
56
|
+
|
|
57
|
+
1. **Testability & Safety Fence:**
|
|
58
|
+
- Read `iamu/testability.md`: what environments are safe? Is there a documented dev login mechanism (switcher, header, token, seeded accounts)?
|
|
59
|
+
|
|
60
|
+
2. **Database & Seeds:**
|
|
61
|
+
- Check `package.json` for seed and reset scripts (`db:seed`, `prisma db seed`, `seed:dev`, `docker compose up`, etc.).
|
|
62
|
+
- Inspect existing seed files (`prisma/seed.ts`, `drizzle/seed.ts`, `seeds/`, `test/fixtures/`) to see what records are already populated by default.
|
|
63
|
+
- Check schema models (`schema.prisma`, `schema.ts`) to see what fields and relations incidents/tickets/items require.
|
|
64
|
+
|
|
65
|
+
3. **Routes & Entry Surface:**
|
|
66
|
+
- Search the app's route tree (`src/app/`, `src/pages/`, `src/routes/`) to verify the exact path corresponding to the scenario's starting point (e.g. `/incidents`, `/app/triage`, `/reports`).
|
|
67
|
+
|
|
68
|
+
4. **Running Dev Server:**
|
|
69
|
+
- Verify the target URL (e.g. `http://localhost:3000`). If a local server is running, check what port it uses.
|
|
70
|
+
|
|
71
|
+
### 3. Audit Gaps & Present the Strategic Fork
|
|
72
|
+
|
|
73
|
+
Present an honest, concise audit of what the scenario needs vs. what the system currently provides:
|
|
74
|
+
|
|
75
|
+
```markdown
|
|
76
|
+
### Staging Audit for `<scenario-slug>`
|
|
77
|
+
|
|
78
|
+
- **Persona Role:** Maria Gomez (Shift Coordinator)
|
|
79
|
+
- Need: Account with site-coordinator privileges.
|
|
80
|
+
- Found: `coordinator@site-a.test` in seed scripts.
|
|
81
|
+
- **Entry Route:** `/incidents` (verified in `src/app/(dashboard)/incidents/page.tsx`).
|
|
82
|
+
- **World State:** 5 open incidents, 1 serious and unassigned.
|
|
83
|
+
- Current DB / Seed: Default seed only creates 0 incidents, or empty demo state.
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Now present the **Strategic Fork** to the user. Do not be an unyielding bureaucrat. Give the user two clear options:
|
|
87
|
+
|
|
88
|
+
#### Option A: Build Testability (The High-Integrity Path)
|
|
89
|
+
*Recommend this when a clean seed script or preset is easy to add.*
|
|
90
|
+
- Explain what is needed: "We can make your system more testable by adding an open-incidents preset to your seed script."
|
|
91
|
+
- Propose the concrete code diff for the seed script or test fixture (e.g. extending `prisma/seed.ts` or a new `scripts/seed-incidents.ts`).
|
|
92
|
+
- **Safety invariant:** All test seeds must be non-destructive and idempotent using fixed test keys/IDs (upserts); never propose or execute destructive resets (`migrate reset`, `db:reset`, or table drops) on local dev databases.
|
|
93
|
+
- **Auth efficiency:** When configuring access, prefer dev bypass headers/switchers or session cookies over automated form-fills whenever available.
|
|
94
|
+
- Explain the benefit: 100% deterministic runs, zero flakiness, reusable across all incident-related scenarios.
|
|
95
|
+
|
|
96
|
+
#### Option B: Semantic Squinting (The Path of Least Resistance)
|
|
97
|
+
*Offer this so the user can test immediately without modifying code.*
|
|
98
|
+
- Explain the approximation: "If you want to run against your existing dev database right now without changing code, we can instruct the walker to squint."
|
|
99
|
+
- Formulate the semantic squinting rule:
|
|
100
|
+
> *"Squint at whatever active incidents or tickets exist on screen, even if only 1 exists and dates are today. Maria will evaluate triage workflows against available items."*
|
|
101
|
+
- State the trade-off: Maria will walk and do her best, but human tests that strictly require multiple old incidents may report unobserved or inconclusive results.
|
|
102
|
+
|
|
103
|
+
#### Option C: Zero Setup Needed (`strategy: none`)
|
|
104
|
+
*Use when the scenario is on a public page, landing flow, or self-contained form that requires no pre-existing database records.*
|
|
105
|
+
- State: "This situation reads a public page and requires no pre-existing world state."
|
|
106
|
+
- Mark `--state-description "No particular data needed"`.
|
|
107
|
+
|
|
108
|
+
### 4. Apply & Persist Staging
|
|
109
|
+
|
|
110
|
+
Once the user chooses (or confirms):
|
|
111
|
+
|
|
112
|
+
1. **If code scaffolding was chosen (Option A):**
|
|
113
|
+
- Apply the seed/mock code changes.
|
|
114
|
+
- Run the seed command to verify it populates the environment.
|
|
115
|
+
|
|
116
|
+
2. **Save staging fields to the scenario with `iamu set`:**
|
|
117
|
+
```bash
|
|
118
|
+
iamu set scenario <slug> \
|
|
119
|
+
--entry "/<route>" \
|
|
120
|
+
--state-description "<Description of required world in domain words>" \
|
|
121
|
+
--state-approximation "<How the walker approximates when exact records are missing>"
|
|
122
|
+
```
|
|
123
|
+
If Option C was chosen:
|
|
124
|
+
```bash
|
|
125
|
+
iamu set scenario <slug> --entry "/<route>" --state-description "No particular data needed"
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
3. **Save persona access if needed:**
|
|
129
|
+
If the persona requires a specific role or switcher key:
|
|
130
|
+
```bash
|
|
131
|
+
iamu set persona <persona-slug> --access "<account-or-role-key>"
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
4. **Record project-wide learnings:**
|
|
135
|
+
If you discovered project-level conventions (e.g. "Seed requires `SEED_ORG=site-a`", or "Role switching uses `localStorage.setItem('dev-role', ...)`"), record them in `iamu/testability.md`.
|
|
136
|
+
|
|
137
|
+
5. **Validate:**
|
|
138
|
+
Run `iamu validate iamu/scenarios/<slug>.md` to confirm the frontmatter is valid.
|
|
139
|
+
|
|
140
|
+
### 5. Confirm Ready to Walk
|
|
141
|
+
|
|
142
|
+
Summarize the staging setup cleanly in 3-4 bullet points:
|
|
143
|
+
- **Scenario:** `<slug>` staged.
|
|
144
|
+
- **Entry Path:** `/<route>`
|
|
145
|
+
- **Starting State:** `<state description>`
|
|
146
|
+
- **Approximation:** `<approximation guidance>`
|
|
147
|
+
- **Persona Access:** `<access key or login mechanism>`
|
|
148
|
+
|
|
149
|
+
Prompt the user with the 1-click execution command:
|
|
150
|
+
```bash
|
|
151
|
+
iamu-run <scenario-slug>
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## Handling Re-entry: Recovering a Blocked Run
|
|
157
|
+
|
|
158
|
+
When invoked because a previous walkthrough ended with `blocked: { reason: "..." }`:
|
|
159
|
+
1. **Focus directly on the blocker:** Read `blocked.reason` from `canonical.json` or `summary.json`.
|
|
160
|
+
2. **Diagnose the failure mode:**
|
|
161
|
+
- *Was it missing seed data?* Offer Option A (scaffold seed) or Option B (loosen approximation).
|
|
162
|
+
- *Was it an auth / permissions error?* Update `persona.access` or adjust `testability.md` dev credentials.
|
|
163
|
+
- *Was it a 404 or bad entry route?* Inspect app routes and fix `scenario.entry_path`.
|
|
164
|
+
3. **Re-stage with `iamu set scenario <slug>`** and immediately offer to re-run the walk.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: iamu-status
|
|
3
|
-
description:
|
|
3
|
+
description: Use when checking overall Iamu project status, listing available personas, scenarios, or capabilities, inspecting test coverage, or reviewing recent walkthrough runs.
|
|
4
4
|
generatedBy: __IAMU_VERSION__
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -23,26 +23,31 @@ Do NOT use `find`, `grep`, or `cat` to dump raw `.md` files in `iamu/`. The CLI
|
|
|
23
23
|
|
|
24
24
|
### 2. Format entity responses with an executive tally and clickable links
|
|
25
25
|
|
|
26
|
-
When the user asks for project status, lead with an executive tally banner, followed by
|
|
26
|
+
When the user asks for project status, lead with an executive tally banner, followed by compact 1-line bullet points with clickable markdown file links.
|
|
27
|
+
|
|
28
|
+
**ANTI-BLOAT DIRECTIVE:** Do NOT output multi-column markdown tables (they wrap awkwardly and break borders in terminal viewports). Keep each entity to a single scannable line:
|
|
27
29
|
|
|
28
30
|
```
|
|
29
31
|
Project Status: <P> Personas · <S> Scenarios (<R> Tested, <U> Untested) · <F> Open Findings · <C> Capabilities
|
|
32
|
+
Product Map: <T> Surfaces (<R> Reached · <U> Unreached) [if explore map exists]
|
|
30
33
|
```
|
|
31
34
|
|
|
32
35
|
**Personas:**
|
|
33
|
-
|
|
34
|
-
|---|---|---|---|
|
|
35
|
-
| [`elin-dahl`](iamu/personas/elin-dahl.md) | Elin Dahl | Architect & first-time house owner in Falun | active |
|
|
36
|
+
• [`elin-dahl`](iamu/personas/elin-dahl.md) — Elin Dahl · Architect & first-time house owner in Falun · active
|
|
36
37
|
|
|
37
38
|
**Scenarios:**
|
|
38
|
-
|
|
39
|
-
|---|---|---|---|
|
|
40
|
-
| [`replacing-windows`](iamu/scenarios/replacing-windows.md) | [`elin-dahl`](iamu/personas/elin-dahl.md) | [`measure-and-order`](iamu/outlines/measure-and-order.md) | ready |
|
|
39
|
+
• [`replacing-windows`](iamu/scenarios/replacing-windows.md) — [`elin-dahl`](iamu/personas/elin-dahl.md) · outline: [`measure-and-order`](iamu/outlines/measure-and-order.md) · ready
|
|
41
40
|
|
|
42
41
|
**Findings:**
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
• `1` [CRITICAL · hinders] Submit fails opaquely on empty field — [`view`](iamu/findings/<slug>.md)
|
|
43
|
+
|
|
44
|
+
**Awaiting Verification (Needs a Re-run):**
|
|
45
|
+
If `iamu status` reports fixes awaiting a re-run:
|
|
46
|
+
• [`<scenario-slug>`](iamu/scenarios/<scenario-slug>.md) — <N> fixes awaiting verification from a re-run (`iamu-run <scenario-slug>`)
|
|
47
|
+
|
|
48
|
+
**Product Map & Unreached Surfaces:**
|
|
49
|
+
If `iamu status --json` has `explore` data:
|
|
50
|
+
• <T> surfaces mapped (<R> reached, <U> unreached) — run `iamu explore coverage` to inspect blind spots. Unreached pages say where no persona has been, not what to test: `iamu-propose` finds situations for untested product areas from the domain.
|
|
46
51
|
|
|
47
52
|
### 3. Ignore internal templates
|
|
48
53
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolves the root directory containing `templates/`.
|
|
3
|
+
* In development (source/vitest): import.meta.url is in `src/` or `src/commands/`,
|
|
4
|
+
* so templates are located at `src/templates`.
|
|
5
|
+
* In production bundle (tsup): import.meta.url is in `dist/`,
|
|
6
|
+
* and copy-assets.mjs copies templates to `dist/templates`.
|
|
7
|
+
*/
|
|
8
|
+
export declare function getTemplatesRoot(): string;
|
|
9
|
+
export declare function getTemplateDir(subdir: "skills" | "prompts"): string;
|
|
10
|
+
export declare function getTemplateFile(subdir: "skills" | "prompts", filename: string): string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pick specified keys from an array of records or a single record.
|
|
3
|
+
* Supports comma-separated field list: e.g. "slug,name,role".
|
|
4
|
+
* If fields is boolean true or undefined/empty, returns target as-is.
|
|
5
|
+
*/
|
|
6
|
+
export declare function filterJsonFields<T extends Record<string, unknown>>(target: T[] | T, fields?: string | boolean): unknown;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type SigintCleanup = () => Promise<void> | void;
|
|
2
|
+
/**
|
|
3
|
+
* Registers an asynchronous cleanup handler to execute on SIGINT (e.g. closing an HTTP server).
|
|
4
|
+
* Returns an unregister function.
|
|
5
|
+
*/
|
|
6
|
+
export declare function registerSigintCleanup(handler: SigintCleanup): () => void;
|
|
7
|
+
/**
|
|
8
|
+
* Registers global process handlers for graceful shutdown and top-level error boundaries.
|
|
9
|
+
*/
|
|
10
|
+
export declare function setupProcessHandlers(): void;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare function stripAnsi(str: string): string;
|
|
2
|
+
export declare function visualLength(str: string): number;
|
|
3
|
+
export declare function padRight(str: string, targetWidth: number): string;
|
|
4
|
+
export declare function truncate(str: string, maxWidth: number): string;
|
|
5
|
+
export interface TableColumn<T> {
|
|
6
|
+
header: string;
|
|
7
|
+
value: (item: T) => string;
|
|
8
|
+
minWidth?: number;
|
|
9
|
+
maxWidth?: number;
|
|
10
|
+
}
|
|
11
|
+
export interface FormatTableOptions {
|
|
12
|
+
tty?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Formats data into a cleanly aligned table with dynamically calculated column widths.
|
|
16
|
+
* Automatically accounts for ANSI color sequences in length calculations.
|
|
17
|
+
* When output is piped (!process.stdout.isTTY), automatically emits machine-readable
|
|
18
|
+
* Tab-Separated Values (TSV) without ANSI escapes, borders, or text truncation.
|
|
19
|
+
*/
|
|
20
|
+
export declare function formatTable<T>(items: T[], columns: TableColumn<T>[], options?: FormatTableOptions): string[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function isSemverGreater(latest: string, current: string): boolean;
|
|
2
|
+
/**
|
|
3
|
+
* Non-blocking, cached check against npm registry for CLI updates.
|
|
4
|
+
*/
|
|
5
|
+
export declare function checkForUpdate(currentVersion: string): Promise<string | null>;
|
|
6
|
+
export declare function printUpdateNotice(currentVersion: string, latestVersion: string): void;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/** The build block's view of the working tree. */
|
|
2
|
+
export interface WorktreeState {
|
|
3
|
+
git_dirty: boolean;
|
|
4
|
+
/** Only when dirty: 12 lowercase hex characters. */
|
|
5
|
+
worktree_hash?: string;
|
|
6
|
+
}
|
|
7
|
+
/** Answers the working-tree question for a project root. */
|
|
8
|
+
export type WorktreeDetector = (projectRoot: string) => WorktreeState | undefined;
|
|
9
|
+
/** Untracked files hashed at most; past this the count still counts. */
|
|
10
|
+
export declare const MAX_UNTRACKED_HASHED = 2000;
|
|
11
|
+
/**
|
|
12
|
+
* Whether the working tree has changes outside `iamu/`, and their
|
|
13
|
+
* fingerprint.
|
|
14
|
+
*
|
|
15
|
+
* Hash recipe (sha256, first 12 hex characters):
|
|
16
|
+
* 1. the bytes of `git diff HEAD --binary -- . ':(exclude)<iamu>'`, run
|
|
17
|
+
* from the repository root with diff settings pinned;
|
|
18
|
+
* 2. then, for each untracked non-ignored file outside `iamu/` sorted by
|
|
19
|
+
* path (bytewise, at most {@link MAX_UNTRACKED_HASHED}):
|
|
20
|
+
* `<path>\0<sha256 of content>\n`, and past the cap `+<count>\n`.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* detectWorktreeState("/work/shop");
|
|
25
|
+
* // { git_dirty: true, worktree_hash: "3fa9c1d2e4b5" }
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare function detectWorktreeState(projectRoot: string, iamuDirName?: string): WorktreeState | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Whether the product's code changed between `start-run` and `complete`.
|
|
31
|
+
* The build block's fingerprint is taken at start; an edit (or commit) made
|
|
32
|
+
* while the walker was out means the run's findings may mix two versions,
|
|
33
|
+
* and the build it lands in describes only the first.
|
|
34
|
+
*
|
|
35
|
+
* @param start - The run's recorded build block (`walkthrough.json`).
|
|
36
|
+
* @param now - The working tree as it is now.
|
|
37
|
+
* @returns A one-line warning, or null when nothing changed or either side
|
|
38
|
+
* is unknown.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* codeChangedWarning({ git_dirty: false }, { git_dirty: true, worktree_hash: "a1b2c3d4e5f6" });
|
|
43
|
+
* // "the product's code changed during the walk …"
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
export declare function codeChangedWarning(start: {
|
|
47
|
+
git_dirty?: boolean;
|
|
48
|
+
worktree_hash?: string;
|
|
49
|
+
} | undefined, now: WorktreeState | undefined): string | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iamu-dev/iamu",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0-beta.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Test your product as realistic personas — scenario-driven development CLI",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"homepage": "https://iamu.dev",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
|
-
"url": "https://github.com/iamu-dev/iamu.git",
|
|
11
|
+
"url": "git+https://github.com/iamu-dev/iamu.git",
|
|
12
12
|
"directory": "apps/cli"
|
|
13
13
|
},
|
|
14
14
|
"bugs": "https://github.com/iamu-dev/iamu/issues",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"claude-code"
|
|
23
23
|
],
|
|
24
24
|
"bin": {
|
|
25
|
-
"iamu": "
|
|
25
|
+
"iamu": "dist/bin.js"
|
|
26
26
|
},
|
|
27
27
|
"sideEffects": true,
|
|
28
28
|
"files": [
|
|
@@ -59,17 +59,17 @@
|
|
|
59
59
|
"typescript": "^5.8.0",
|
|
60
60
|
"vitest": "^4.1.11",
|
|
61
61
|
"@iamu-dev/local-store": "0.1.0",
|
|
62
|
-
"@iamu
|
|
63
|
-
"@iamu/
|
|
62
|
+
"@iamu/tsconfig": "0.1.0",
|
|
63
|
+
"@iamu-dev/protocol": "0.1.0"
|
|
64
64
|
},
|
|
65
65
|
"scripts": {
|
|
66
|
-
"build": "tsup && tsc -b tsconfig.build.json --emitDeclarationOnly && node scripts/copy-assets.mjs",
|
|
67
|
-
"clean": "node -e \"fs.rmSync('dist', { recursive: true, force: true }); fs.rmSync('tsconfig.tsbuildinfo', { force: true }); fs.rmSync('tsconfig.build.tsbuildinfo', { force: true })\"",
|
|
66
|
+
"build": "tsup && tsc -b --force tsconfig.build.json --emitDeclarationOnly && node scripts/copy-assets.mjs",
|
|
67
|
+
"clean": "node -e \"fs.rmSync('dist', { recursive: true, force: true }); fs.rmSync('.eval-dist', { recursive: true, force: true }); fs.rmSync('tsconfig.tsbuildinfo', { force: true }); fs.rmSync('tsconfig.build.tsbuildinfo', { force: true })\"",
|
|
68
68
|
"typecheck": "tsc --noEmit",
|
|
69
69
|
"test": "vitest run",
|
|
70
70
|
"test:coverage": "vitest run --coverage",
|
|
71
71
|
"eval:walkthroughs": "vitest run --config vitest.benchmark.config.ts",
|
|
72
|
-
"eval:gemini": "node dist/
|
|
72
|
+
"eval:gemini": "node .eval-dist/gemini-eval-cli.js",
|
|
73
73
|
"pack:dry-run": "npm pack --dry-run"
|
|
74
74
|
}
|
|
75
75
|
}
|