@iamu-dev/iamu 0.8.0-beta.1 → 0.8.0-beta.3
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/README.md +36 -6
- package/dist/bin.js +13900 -12243
- package/dist/commands/advise.d.ts +4 -2
- package/dist/commands/agent-commands.d.ts +22 -0
- package/dist/commands/browse-driver.d.ts +5 -1
- package/dist/commands/browse.d.ts +37 -1
- package/dist/commands/cloud-push.d.ts +3 -3
- package/dist/commands/complete.d.ts +21 -0
- package/dist/commands/completion.d.ts +2 -0
- package/dist/commands/context.d.ts +19 -0
- package/dist/commands/dev-script.d.ts +14 -0
- package/dist/commands/doctor.d.ts +6 -0
- package/dist/commands/edit-entity.d.ts +2 -0
- package/dist/commands/evaluate.d.ts +10 -3
- package/dist/commands/finding-stability.d.ts +1 -0
- package/dist/commands/findings.d.ts +9 -0
- package/dist/commands/init.d.ts +11 -2
- package/dist/commands/instructions-walk.d.ts +2 -0
- package/dist/commands/instructions.d.ts +2 -11
- package/dist/commands/list.d.ts +3 -0
- package/dist/commands/match.d.ts +8 -5
- package/dist/commands/new-entity.d.ts +2 -0
- package/dist/commands/new-finding.d.ts +2 -0
- package/dist/commands/persona-today.d.ts +20 -0
- package/dist/commands/post-walk.d.ts +18 -0
- package/dist/commands/pull.d.ts +1 -1
- package/dist/commands/set-entity.d.ts +15 -3
- package/dist/commands/skill-command.d.ts +13 -0
- package/dist/commands/step.d.ts +2 -0
- package/dist/commands/summary.d.ts +2 -0
- package/dist/commands/triage.d.ts +19 -2
- package/dist/index.js +13878 -12231
- package/dist/templates/prompts/complete.md +2 -3
- package/dist/templates/prompts/design-review.md +1 -1
- package/dist/templates/prompts/designer.md +14 -7
- package/dist/templates/prompts/persona.md +2 -1
- package/dist/templates/prompts/walk.md +26 -8
- package/dist/templates/skills/iamu-findings.md +17 -28
- package/dist/templates/skills/iamu-new.md +9 -9
- package/dist/templates/skills/iamu-run.md +65 -42
- package/dist/templates/skills/iamu-setup.md +2 -2
- package/dist/templates/skills/iamu-stage.md +1 -1
- package/dist/templates.d.ts +1 -1
- package/package.json +3 -3
- package/dist/templates/prompts/evaluate.md +0 -64
|
@@ -3,6 +3,7 @@ export declare const ADVISOR_VERSION = "1.5.0";
|
|
|
3
3
|
/** The installed `iamu/.prompts/advise.md`, or the bundled template. */
|
|
4
4
|
export declare function readAdvisePrompt(projectRoot: string): string;
|
|
5
5
|
export interface AdviseOptions {
|
|
6
|
+
run?: string;
|
|
6
7
|
project?: boolean;
|
|
7
8
|
json?: boolean;
|
|
8
9
|
promptFile?: string;
|
|
@@ -11,15 +12,16 @@ export interface AdviseOptions {
|
|
|
11
12
|
* Print the advisor's input: for a run (after the judge, before publish)
|
|
12
13
|
* or, with --project, across every open finding in the project.
|
|
13
14
|
*/
|
|
14
|
-
export declare function advise(
|
|
15
|
+
export declare function advise(runIdArg: string | undefined, opts?: AdviseOptions): Promise<void>;
|
|
15
16
|
export interface AdviseRecordOptions {
|
|
17
|
+
run?: string;
|
|
16
18
|
project?: boolean;
|
|
17
19
|
file?: string;
|
|
18
20
|
data?: string;
|
|
19
21
|
json?: boolean;
|
|
20
22
|
}
|
|
21
23
|
/** Record the advisor's answer for a run, or a project synthesis. */
|
|
22
|
-
export declare function adviseRecord(
|
|
24
|
+
export declare function adviseRecord(runIdArg: string | undefined, opts: AdviseRecordOptions): Promise<void>;
|
|
23
25
|
export interface DirectionsOptions {
|
|
24
26
|
json?: boolean;
|
|
25
27
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** Skills the CLI points the agent at. */
|
|
2
|
+
export type AgentSkill = "run" | "findings" | "design";
|
|
3
|
+
/**
|
|
4
|
+
* How to invoke an iamu skill from the agent, in the form this project's
|
|
5
|
+
* host accepts (`/iamu:<skill>` with the plugin or Claude Code commands,
|
|
6
|
+
* else `/iamu-<skill>`). One name per skill: see `skillCommand`.
|
|
7
|
+
*
|
|
8
|
+
* @param projectRoot - Absolute path to the project root.
|
|
9
|
+
* @param skill - The skill to invoke.
|
|
10
|
+
* @param args - Arguments appended after the command, if any.
|
|
11
|
+
* @returns The slash command, e.g. `/iamu:run checkout`.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* agentCommand("/project", "run", "maya--video"); // "/iamu:run maya--video"
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare function agentCommand(projectRoot: string, skill: AgentSkill, args?: string): string;
|
|
19
|
+
/** The re-run that turns a persona finding's fix into `verified`. */
|
|
20
|
+
export declare function rerunCommand(projectRoot: string, scenario: string): string;
|
|
21
|
+
/** The designer's review that turns a designer finding's fix into `verified`. */
|
|
22
|
+
export declare function designReviewCommand(screen: string): string;
|
|
@@ -44,6 +44,8 @@ export interface BrowserDriver {
|
|
|
44
44
|
commandLine(pid: number): Promise<string | null>;
|
|
45
45
|
/** Send SIGTERM to `pid`. Never throws. */
|
|
46
46
|
kill(pid: number, signal?: NodeJS.Signals | number): void;
|
|
47
|
+
/** Is `pid` still alive in the OS process table? */
|
|
48
|
+
alive?(pid: number): boolean;
|
|
47
49
|
}
|
|
48
50
|
/** How long a CDP liveness probe may take before the port counts as dead. */
|
|
49
51
|
export declare const CDP_PROBE_TIMEOUT_MS = 1000;
|
|
@@ -121,7 +123,9 @@ export declare function isOurBrowser(commandLine: string | null, profileDir: str
|
|
|
121
123
|
*
|
|
122
124
|
* @public
|
|
123
125
|
*/
|
|
124
|
-
export declare function reapBrowser(pid: number, profileDir: string, driver: Pick<BrowserDriver, "commandLine" | "kill">
|
|
126
|
+
export declare function reapBrowser(pid: number, profileDir: string, driver: Pick<BrowserDriver, "commandLine" | "kill"> & {
|
|
127
|
+
alive?: (pid: number) => boolean;
|
|
128
|
+
}): Promise<boolean>;
|
|
125
129
|
/**
|
|
126
130
|
* Select the target page to act on from all open pages in the context.
|
|
127
131
|
* Filters out devtools and browser internal/extension pages unless only internal pages exist.
|
|
@@ -3,6 +3,8 @@ import { type BrowserDriver, type Size } from "./browse-driver.js";
|
|
|
3
3
|
export type { BrowserDriver } from "./browse-driver.js";
|
|
4
4
|
/** Parsed options for `iamu browse <command>`. */
|
|
5
5
|
export interface BrowseOptions {
|
|
6
|
+
/** step: record into a run that is already completed. */
|
|
7
|
+
force?: boolean;
|
|
6
8
|
shot?: string;
|
|
7
9
|
nth?: string;
|
|
8
10
|
submit?: boolean;
|
|
@@ -76,6 +78,25 @@ export declare function parseViewport(value: string | undefined): Size | null;
|
|
|
76
78
|
* @public
|
|
77
79
|
*/
|
|
78
80
|
export declare function findChrome(env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform, exists?: (p: string) => boolean): string | null;
|
|
81
|
+
/**
|
|
82
|
+
* The OS window `start` opens: large enough for the viewport plus the
|
|
83
|
+
* browser's chrome, never smaller than 1280×900. `--width` / `--height`
|
|
84
|
+
* (deprecated) still win.
|
|
85
|
+
*
|
|
86
|
+
* @param viewport - The page size `start` emulates, or null for none.
|
|
87
|
+
* @param width - `--width`, when given.
|
|
88
|
+
* @param height - `--height`, when given.
|
|
89
|
+
* @returns The window size in pixels.
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* ```ts
|
|
93
|
+
* windowSize({ width: 1920, height: 1080 }); // { width: 1936, height: 1200 }
|
|
94
|
+
* windowSize({ width: 390, height: 844 }); // { width: 1280, height: 964 }
|
|
95
|
+
* ```
|
|
96
|
+
*
|
|
97
|
+
* @public
|
|
98
|
+
*/
|
|
99
|
+
export declare function windowSize(viewport: Size | null, width?: string, height?: string): Size;
|
|
79
100
|
/**
|
|
80
101
|
* Should `start` launch without a window? `--headless` wins, then
|
|
81
102
|
* `IAMU_HEADLESS`, then CI or a Linux box with no `DISPLAY`.
|
|
@@ -118,7 +139,8 @@ export declare function shouldDisableSandbox(env?: NodeJS.ProcessEnv, uid?: numb
|
|
|
118
139
|
* terminated only when its command line shows our `--user-data-dir`;
|
|
119
140
|
* a PID the OS has since handed to another process is left alone.
|
|
120
141
|
*
|
|
121
|
-
* @param opts - `viewport`, `run`, `port`, `
|
|
142
|
+
* @param opts - `viewport`, `run`, `port`, `headless`, `json` (and the
|
|
143
|
+
* deprecated `width` / `height`, which override the derived window).
|
|
122
144
|
* @param driver - Machine/browser seam; tests pass a fake.
|
|
123
145
|
*
|
|
124
146
|
* @example
|
|
@@ -214,6 +236,20 @@ returnTo?: string): Promise<ClearedStorage | {
|
|
|
214
236
|
* @public
|
|
215
237
|
*/
|
|
216
238
|
export declare function parseActionCommand(raw: string): string[];
|
|
239
|
+
export interface ActionOptsOverride {
|
|
240
|
+
submit?: boolean;
|
|
241
|
+
nth?: string;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Extract `--submit` and `--nth <n>` flags from tokenized action arguments
|
|
245
|
+
* so inline flags are not treated as literal text arguments.
|
|
246
|
+
*
|
|
247
|
+
* @public
|
|
248
|
+
*/
|
|
249
|
+
export declare function extractActionFlags(tokens: string[]): {
|
|
250
|
+
args: string[];
|
|
251
|
+
optsOverride: ActionOptsOverride;
|
|
252
|
+
};
|
|
217
253
|
/**
|
|
218
254
|
* `iamu browse <command> [args…]` — dispatch one browse subcommand.
|
|
219
255
|
* Failures print to stderr and set exit code 1.
|
|
@@ -10,9 +10,9 @@ export interface CloudRunInfo {
|
|
|
10
10
|
* Push one run to the cloud when the project is cloud-linked. Returns
|
|
11
11
|
* `undefined` for a local-only project, so callers print nothing.
|
|
12
12
|
*
|
|
13
|
-
* Called by
|
|
14
|
-
*
|
|
15
|
-
* local
|
|
13
|
+
* Called by `complete`, which offers "Open in Iamu Cloud" afterwards: a
|
|
14
|
+
* local-only write there would open a stale report. The record stages
|
|
15
|
+
* after it stay local; `iamu sync` publishes their result.
|
|
16
16
|
*/
|
|
17
17
|
export declare function pushRunToCloud(projectRoot: string, runId: string): Promise<CloudRunInfo | undefined>;
|
|
18
18
|
/** Project dashboard URL, or `null` for a local-only project. */
|
|
@@ -13,6 +13,8 @@ export interface CompleteOptions {
|
|
|
13
13
|
}
|
|
14
14
|
/** Non-fatal observations made while completing, reported after assembly. */
|
|
15
15
|
export interface CompletionExtras {
|
|
16
|
+
/** What the walk left out: no steps, no closing summary. Never fatal. */
|
|
17
|
+
walkWarnings: string[];
|
|
16
18
|
revisit: RevisitReport | null;
|
|
17
19
|
viewportWarning: string | null;
|
|
18
20
|
codeWarning: string | null;
|
|
@@ -34,6 +36,17 @@ export declare function pickCompletedAt(manifest: Pick<WalkthroughManifest, "com
|
|
|
34
36
|
export declare function completedManifest(manifest: WalkthroughManifest, completedAt: string): WalkthroughManifest;
|
|
35
37
|
/** Persist the completed manifest to disk atomically. */
|
|
36
38
|
export declare function persistManifest(manifestPath: string, manifest: WalkthroughManifest, completedAt: string): Promise<WalkthroughManifest>;
|
|
39
|
+
/**
|
|
40
|
+
* What a walk left out that `complete` assembles around anyway: no steps
|
|
41
|
+
* (an unblocked run then has no evidence) or no `summary.json` (no
|
|
42
|
+
* closing synthesis, no blocked or ended state). Warnings, not errors: a
|
|
43
|
+
* completion is still a completion.
|
|
44
|
+
*/
|
|
45
|
+
export declare function walkGapWarnings(run: {
|
|
46
|
+
runId: string;
|
|
47
|
+
runDirPath: string;
|
|
48
|
+
manifest: Pick<WalkthroughManifest, "blocked">;
|
|
49
|
+
}, opts?: Pick<CompleteOptions, "force">): Promise<string[]>;
|
|
37
50
|
/** `complete --json` output: the canonical plus whichever extras exist. */
|
|
38
51
|
export declare function completeJsonPayload(canonical: CanonicalWalkthrough, extras: CompletionExtras): Record<string, unknown>;
|
|
39
52
|
/** Non-fatal provenance warnings; prints nothing for a clean audit. */
|
|
@@ -99,6 +112,14 @@ type AssembledRunFiles = {
|
|
|
99
112
|
* stages that re-derive them in parallel never interleave.
|
|
100
113
|
*/
|
|
101
114
|
export declare function assembleRun(projectRoot: string, runId: string, manifest: WalkthroughManifest, completedAt: string): Promise<AssembledRunFiles>;
|
|
115
|
+
/**
|
|
116
|
+
* {@link assembleRun} for a caller that already holds the run's record
|
|
117
|
+
* lock (`withRunLock` is not re-entrant). The record stages take the lock
|
|
118
|
+
* around their finding writes and this re-derivation together, so another
|
|
119
|
+
* stage never reads half-written findings or overwrites the report with
|
|
120
|
+
* an older canonical.
|
|
121
|
+
*/
|
|
122
|
+
export declare function assembleRunUnlocked(projectRoot: string, runId: string, manifest: WalkthroughManifest, completedAt: string): Promise<AssembledRunFiles>;
|
|
102
123
|
/** One requested place, whether the run reached it, and what awaits there. */
|
|
103
124
|
export type RevisitReportPlace = RevisitPlaceCoverage & {
|
|
104
125
|
findings: Array<{
|
|
@@ -52,6 +52,7 @@ export declare function resolveRunId(projectRoot: string, explicitRunId?: string
|
|
|
52
52
|
*/
|
|
53
53
|
export declare function reportFatalError(err: unknown, argv?: readonly string[]): void;
|
|
54
54
|
export declare function resolveProject(opts?: {
|
|
55
|
+
cwd?: string;
|
|
55
56
|
json?: boolean | string;
|
|
56
57
|
}): Promise<ProjectContext | null>;
|
|
57
58
|
/**
|
|
@@ -72,3 +73,21 @@ export declare function resolveCloudProject(opts?: {
|
|
|
72
73
|
export declare function safeReadEntity<T extends object = Record<string, unknown>>(projectRoot: string, type: EntityType, slug: string, opts?: {
|
|
73
74
|
json?: boolean | string;
|
|
74
75
|
}): Promise<Awaited<ReturnType<typeof readEntity<T>>> | null>;
|
|
76
|
+
/**
|
|
77
|
+
* Refuse to record into a run that `iamu complete` already finished:
|
|
78
|
+
* canonical.json and report.md were derived from what was there, and a
|
|
79
|
+
* later step, finding or summary would leave them silently stale.
|
|
80
|
+
* `force` records anyway; the caller then re-derives with
|
|
81
|
+
* `iamu complete <run-id> --force`. A run without a readable manifest
|
|
82
|
+
* is not refused here (the writer reports what it needs).
|
|
83
|
+
*
|
|
84
|
+
* @returns true when the caller may write; false once the refusal has
|
|
85
|
+
* been reported (exit code 1).
|
|
86
|
+
*/
|
|
87
|
+
export declare function refuseCompletedRun(runDirPath: string, runId: string, opts: {
|
|
88
|
+
json?: boolean;
|
|
89
|
+
force?: boolean;
|
|
90
|
+
}, report?: (message: string, diag: {
|
|
91
|
+
code: string;
|
|
92
|
+
fix: string;
|
|
93
|
+
}) => void): boolean;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type PackageManager = "pnpm" | "npm" | "yarn" | "bun";
|
|
2
|
+
export interface DevScripts {
|
|
3
|
+
manager: PackageManager;
|
|
4
|
+
/** Scripts that look like they start the app, in preference order. */
|
|
5
|
+
scripts: string[];
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The dev scripts `projectRoot`'s package.json declares. `null` without a
|
|
9
|
+
* readable package.json; an empty `scripts` list when it has none that
|
|
10
|
+
* start the app.
|
|
11
|
+
*/
|
|
12
|
+
export declare function detectDevScripts(projectRoot: string): DevScripts | null;
|
|
13
|
+
/** The shell command that runs `script` with `manager`. */
|
|
14
|
+
export declare function devCommand(manager: PackageManager, script: string): string;
|
|
@@ -18,6 +18,12 @@ export interface DoctorResult {
|
|
|
18
18
|
export declare function checkPortAvailable(port: number): Promise<boolean>;
|
|
19
19
|
/** Check CDP responsiveness on a port */
|
|
20
20
|
export declare function checkCdpResponsive(port: number): Promise<boolean>;
|
|
21
|
+
/**
|
|
22
|
+
* The testability status a target URL earns when a person sets it:
|
|
23
|
+
* `verified` when it answers the probe (any response short of a server
|
|
24
|
+
* error, an external auth redirect included), else `configured`.
|
|
25
|
+
*/
|
|
26
|
+
export declare function probeTargetStatus(targetUrl: string): Promise<"verified" | "configured">;
|
|
21
27
|
export declare function checkTargetHealth(targetUrl: string): Promise<DoctorCheck[]>;
|
|
22
28
|
export declare function checkProjectHarnesses(projectRoot: string): Promise<DoctorCheck[]>;
|
|
23
29
|
export declare function checkProjectTestabilityContract(projectRoot: string): Promise<{
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export interface EditEntityOptions {
|
|
2
2
|
json?: boolean;
|
|
3
3
|
}
|
|
4
|
+
/** Types `iamu edit <type>` opens: every entity plus project config. */
|
|
5
|
+
export declare const EDITABLE_TYPES: readonly ["persona", "capability", "outline", "scenario", "finding", "source", "guidance", "testability", "context"];
|
|
4
6
|
/**
|
|
5
7
|
* Open an entity or project configuration file in the user's $EDITOR or $VISUAL,
|
|
6
8
|
* and validate its frontmatter against the schema on exit.
|
|
@@ -23,17 +23,24 @@ export declare function applyVerdicts(canonical: CanonicalWalkthrough, recorded:
|
|
|
23
23
|
* walkthrough for report markdown rendering.
|
|
24
24
|
*/
|
|
25
25
|
export declare function applyRecordedVerdicts(canonical: CanonicalWalkthrough, runDirPath: string): Promise<CanonicalWalkthrough>;
|
|
26
|
-
export
|
|
26
|
+
export interface EvaluateOptions {
|
|
27
|
+
run?: string;
|
|
27
28
|
json?: boolean;
|
|
28
29
|
promptFile?: string;
|
|
29
|
-
}
|
|
30
|
+
}
|
|
31
|
+
export declare function evaluate(runIdArg?: string, opts?: EvaluateOptions): Promise<void>;
|
|
30
32
|
export interface EvaluateRecordOptions {
|
|
33
|
+
run?: string;
|
|
31
34
|
file?: string;
|
|
32
35
|
data?: string;
|
|
33
36
|
json?: boolean;
|
|
37
|
+
/** @deprecated No-op since evaluate-record stopped prompting (removed in 0.9.0). */
|
|
34
38
|
yes?: boolean;
|
|
39
|
+
/** @deprecated No-op since evaluate-record stopped prompting (removed in 0.9.0). */
|
|
35
40
|
prompt?: boolean;
|
|
41
|
+
/** @deprecated No-op since evaluate-record stopped prompting (removed in 0.9.0). */
|
|
36
42
|
view?: boolean;
|
|
43
|
+
/** @deprecated No-op since evaluate-record stopped pushing (removed in 0.9.0). */
|
|
37
44
|
push?: boolean;
|
|
38
45
|
}
|
|
39
|
-
export declare function evaluateRecord(
|
|
46
|
+
export declare function evaluateRecord(runIdArg: string | undefined, opts: EvaluateRecordOptions): Promise<void>;
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
export declare function findings(opts?: {
|
|
2
2
|
open?: boolean;
|
|
3
|
+
/** Fix applied (`triage_status: addressed`), whatever its fix state. */
|
|
4
|
+
addressed?: boolean;
|
|
5
|
+
/** Hidden alias of `addressed`, kept for one release. */
|
|
3
6
|
resolved?: boolean;
|
|
4
7
|
dismissed?: boolean;
|
|
8
|
+
deferred?: boolean;
|
|
9
|
+
status?: string;
|
|
10
|
+
/** Only findings an active tester guidance rule flagged. */
|
|
11
|
+
flagged?: boolean;
|
|
12
|
+
/** Only addressed findings in this fix state. */
|
|
13
|
+
fixState?: string;
|
|
5
14
|
scenario?: string;
|
|
6
15
|
/** Only the persona's, or only the designer's. Default: both. */
|
|
7
16
|
source?: string;
|
package/dist/commands/init.d.ts
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
|
+
import { type TestabilityStatus } from "@iamu-dev/protocol";
|
|
1
2
|
import type { HostAdapter } from "../adapters/types.js";
|
|
2
3
|
/**
|
|
3
4
|
* The setup skill as the user will see it. With the Iamu plugin enabled,
|
|
4
|
-
* Claude Code has `/iamu:init` and no `iamu-setup
|
|
5
|
+
* Claude Code has `/iamu:init` and no `iamu-setup` (see `skillCommand`).
|
|
5
6
|
*/
|
|
6
7
|
export declare function setupCommand(projectRoot: string, hosts: HostAdapter[]): string;
|
|
8
|
+
/**
|
|
9
|
+
* The "start your dev server" line of the init summary: the project's own
|
|
10
|
+
* dev script under its package manager, the recorded `dev_command`, or
|
|
11
|
+
* an honest "none found" — never a guessed `pnpm dev`.
|
|
12
|
+
*/
|
|
13
|
+
export declare function devServerHint(projectRoot: string, devCommandRecorded?: string | null): string;
|
|
7
14
|
/**
|
|
8
15
|
* Detect the target port for local dev execution.
|
|
9
16
|
* Checks, in order:
|
|
@@ -13,7 +20,9 @@ export declare function setupCommand(projectRoot: string, hosts: HostAdapter[]):
|
|
|
13
20
|
*/
|
|
14
21
|
export declare function detectTargetPort(projectRoot: string): number | undefined;
|
|
15
22
|
export declare function detectTargetUrl(projectRoot: string): string;
|
|
16
|
-
|
|
23
|
+
/** The target line of the init summary, by testability status. */
|
|
24
|
+
export declare function describeTargetStatus(status: TestabilityStatus): string;
|
|
25
|
+
export declare function createDraftTestabilityContent(targetUrl?: string, status?: TestabilityStatus): string;
|
|
17
26
|
export interface InitOptions {
|
|
18
27
|
name?: string;
|
|
19
28
|
yes?: boolean;
|
|
@@ -12,18 +12,9 @@ export declare function instructionsStage(slug?: string, opts?: {
|
|
|
12
12
|
json?: boolean;
|
|
13
13
|
}): Promise<void>;
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* Phases `iamu instructions [phase]` serves (`run` is an alias of `walk`).
|
|
16
16
|
*/
|
|
17
|
-
export declare
|
|
18
|
-
json?: boolean;
|
|
19
|
-
}): Promise<void>;
|
|
20
|
-
/**
|
|
21
|
-
* Generates dynamic triage instructions for reviewing run findings.
|
|
22
|
-
*/
|
|
23
|
-
export declare function instructionsTriage(slug?: string, opts?: {
|
|
24
|
-
run?: string;
|
|
25
|
-
json?: boolean;
|
|
26
|
-
}): Promise<void>;
|
|
17
|
+
export declare const INSTRUCTION_PHASES: string[];
|
|
27
18
|
/**
|
|
28
19
|
* Top-level dispatcher for `iamu instructions [phase] [slug]`.
|
|
29
20
|
*/
|
package/dist/commands/list.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { type EntityType } from "@iamu-dev/protocol";
|
|
2
|
+
/** `iamu list <type>` accepts each type by name or by these plurals. */
|
|
3
|
+
export declare const PLURAL_LABELS: Record<EntityType, string>;
|
|
1
4
|
export declare function list(type: string | undefined, opts: {
|
|
2
5
|
capability?: string;
|
|
3
6
|
diff?: string | boolean;
|
package/dist/commands/match.d.ts
CHANGED
|
@@ -3,18 +3,21 @@ import { type WalkthroughManifest } from "@iamu-dev/local-store";
|
|
|
3
3
|
export declare function completedManifest(runDirPath: string, runId: string, opts?: {
|
|
4
4
|
json?: boolean;
|
|
5
5
|
}): Promise<WalkthroughManifest | null>;
|
|
6
|
+
export interface MatchOptions {
|
|
7
|
+
run?: string;
|
|
8
|
+
json?: boolean;
|
|
9
|
+
promptFile?: string;
|
|
10
|
+
}
|
|
6
11
|
/**
|
|
7
12
|
* Print the matcher's input bundle: this run's findings, the scenario's
|
|
8
13
|
* earlier canonical findings, this run's steps, and the prompt.
|
|
9
14
|
*/
|
|
10
|
-
export declare function match(
|
|
11
|
-
json?: boolean;
|
|
12
|
-
promptFile?: string;
|
|
13
|
-
}): Promise<void>;
|
|
15
|
+
export declare function match(runIdArg?: string, opts?: MatchOptions): Promise<void>;
|
|
14
16
|
export interface MatchRecordOptions {
|
|
17
|
+
run?: string;
|
|
15
18
|
file?: string;
|
|
16
19
|
data?: string;
|
|
17
20
|
json?: boolean;
|
|
18
21
|
}
|
|
19
22
|
/** Record the matcher's answer and re-derive the run's delta and report. */
|
|
20
|
-
export declare function matchRecord(
|
|
23
|
+
export declare function matchRecord(runIdArg: string | undefined, opts: MatchRecordOptions): Promise<void>;
|
|
@@ -31,4 +31,6 @@ export interface NewEntityOptions {
|
|
|
31
31
|
stateApproximation?: string;
|
|
32
32
|
json?: boolean;
|
|
33
33
|
}
|
|
34
|
+
/** Entity types `iamu new <type>` creates (findings: `iamu new-finding`). */
|
|
35
|
+
export declare const SUPPORTED_TYPES: readonly ["persona", "outline", "capability", "source", "scenario"];
|
|
34
36
|
export declare function newEntity(type: string, opts: NewEntityOptions): Promise<void>;
|
|
@@ -22,6 +22,8 @@ export interface NewFindingOptions {
|
|
|
22
22
|
recommendation?: string;
|
|
23
23
|
/** Complete markdown body (overrides description and recommendation). */
|
|
24
24
|
body?: string;
|
|
25
|
+
/** Record into a run that is already completed. */
|
|
26
|
+
force?: boolean;
|
|
25
27
|
json?: boolean;
|
|
26
28
|
}
|
|
27
29
|
export declare function newFinding(opts: NewFindingOptions): Promise<void>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A persona's baseline: the `## Today` section of the persona body, how
|
|
3
|
+
* this person does the job today (a paper sheet, a spreadsheet, phone
|
|
4
|
+
* calls, another tool). The walker compares the product against it and
|
|
5
|
+
* the judge weighs voluntary use against it. A body heading, not a
|
|
6
|
+
* frontmatter field, so no schema changes.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Split a persona body into its `## Today` section and the rest. The
|
|
10
|
+
* section runs to the next heading of level one or two, or the end.
|
|
11
|
+
* `today` is null when there is no such section or it is empty.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* splitPersonaToday("Fixes taps.\n\n## Today\nA paper job sheet.")
|
|
15
|
+
* // → { today: "A paper job sheet.", rest: "Fixes taps." }
|
|
16
|
+
*/
|
|
17
|
+
export declare function splitPersonaToday(body: string): {
|
|
18
|
+
today: string | null;
|
|
19
|
+
rest: string;
|
|
20
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface PostWalkOptions {
|
|
2
|
+
run?: string;
|
|
3
|
+
critic?: boolean;
|
|
4
|
+
ux?: boolean;
|
|
5
|
+
byOrchestrator?: boolean;
|
|
6
|
+
json?: boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Single-command post-walk orchestrator helper (`iamu post-walk [run-id]`).
|
|
10
|
+
*
|
|
11
|
+
* 1. Completes the run locally (`iamu complete --no-prompt --no-push`) if still `in-progress`.
|
|
12
|
+
* 2. Records any subagent answer files already present in `<run-dir>/`
|
|
13
|
+
* (`matches.json`, `judge_answer.json` / `verdicts.json`, `advise_answer.json`,
|
|
14
|
+
* `designer_answer.json`) in canonical lock-safe order.
|
|
15
|
+
* 3. Generates all remaining post-walk subagent prompts (`match_prompt.md`,
|
|
16
|
+
* `judge_prompt.md`, `advise_prompt.md`, `designer_prompt.md`) in one hop.
|
|
17
|
+
*/
|
|
18
|
+
export declare function postWalk(runIdArg?: string, opts?: PostWalkOptions): Promise<void>;
|
package/dist/commands/pull.d.ts
CHANGED
|
@@ -19,8 +19,16 @@ export interface SetEntityOptions {
|
|
|
19
19
|
stateApproximation?: string;
|
|
20
20
|
/** `false` clears scenario `state` (Commander defaults it to `true`). */
|
|
21
21
|
state?: boolean;
|
|
22
|
+
/** Scenario bound persona slug, or `false` to clear. */
|
|
23
|
+
persona?: string | false;
|
|
24
|
+
/** Scenario outline slug. */
|
|
25
|
+
outline?: string | false;
|
|
22
26
|
/** Persona access key or testability switching mechanism, or `false` to clear. */
|
|
23
27
|
access?: string | false;
|
|
28
|
+
/** Persona role description. */
|
|
29
|
+
role?: string | false;
|
|
30
|
+
/** Persona disposition / attitude, or `false` to clear. */
|
|
31
|
+
disposition?: string | false;
|
|
24
32
|
/** Capability route prefixes, comma-separated; replaces `paths`, or `false` to clear. */
|
|
25
33
|
paths?: string | false;
|
|
26
34
|
/** Capability route prefix to add (repeatable). */
|
|
@@ -33,6 +41,8 @@ export interface SetEntityOptions {
|
|
|
33
41
|
capability?: string | false;
|
|
34
42
|
/** Outline additional capabilities (comma-separated), or `false` to clear. */
|
|
35
43
|
additionalCapabilities?: string | false;
|
|
44
|
+
/** Outline structural tension, or `false` to clear. */
|
|
45
|
+
tension?: string | false;
|
|
36
46
|
/** Dev startup command, or `false` to clear (testability). */
|
|
37
47
|
devCommand?: string | false;
|
|
38
48
|
/** Authentication strategy (dev_switcher, interactive, test_accounts, public), or `false` to clear (testability). */
|
|
@@ -49,9 +59,9 @@ export interface SetEntityOptions {
|
|
|
49
59
|
jurisdiction?: string | false;
|
|
50
60
|
/** Orientation notes (context). */
|
|
51
61
|
notes?: string | false;
|
|
52
|
-
/**
|
|
62
|
+
/** Description (capability, outline, or context alias for body narrative). */
|
|
53
63
|
description?: string | false;
|
|
54
|
-
/**
|
|
64
|
+
/** Name or title (scenario, persona, outline, capability, context). */
|
|
55
65
|
name?: string | false;
|
|
56
66
|
/** Governing documents/standards (context patch). */
|
|
57
67
|
governedBy?: ContextFrontmatter["governed_by"] | false;
|
|
@@ -59,12 +69,14 @@ export interface SetEntityOptions {
|
|
|
59
69
|
actors?: ContextFrontmatter["actors"] | false;
|
|
60
70
|
/** Domain glossary (context patch). */
|
|
61
71
|
glossary?: ContextFrontmatter["glossary"] | false;
|
|
62
|
-
/** Markdown body narrative
|
|
72
|
+
/** Markdown body narrative. */
|
|
63
73
|
body?: string;
|
|
64
74
|
/** JSON patch file (or - for stdin) containing staging fields. */
|
|
65
75
|
file?: string;
|
|
66
76
|
json?: boolean;
|
|
67
77
|
}
|
|
78
|
+
/** Fields `iamu set <type>` may change, by type (the keys are the types). */
|
|
79
|
+
export declare const SETTABLE: Record<string, readonly (keyof SetEntityOptions)[]>;
|
|
68
80
|
/**
|
|
69
81
|
* `iamu set <type> <slug>` — change the staging fields of an existing
|
|
70
82
|
* entity: a scenario's start path, target and starting state, a
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The command that runs skill `name` (`setup`, `run`, `findings`, …) in
|
|
3
|
+
* `projectRoot`, with `args` appended when given.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```ts
|
|
7
|
+
* skillCommand(root, "setup"); // "/iamu:init" with the plugin enabled
|
|
8
|
+
* skillCommand(root, "run", "maria--handoff"); // "/iamu-run maria--handoff"
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
export declare function skillCommand(projectRoot: string, name: string, args?: string): string;
|
|
12
|
+
/** The setup skill for `projectRoot`: what "run setup" means here. */
|
|
13
|
+
export declare function setupSkill(projectRoot: string): string;
|
package/dist/commands/step.d.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
/** Where a guidance rule written by `iamu triage --scope` applies. */
|
|
2
|
+
export declare const SCOPES: readonly ["project", "outline", "capability"];
|
|
1
3
|
export interface TriageOptions {
|
|
2
4
|
status: string;
|
|
3
|
-
/**
|
|
5
|
+
/** Optional triage note or reason. */
|
|
4
6
|
note?: string;
|
|
5
|
-
/** Dismiss reason: not_relevant | walker_error | duplicate. */
|
|
7
|
+
/** Dismiss reason: not_relevant | walker_error | out_of_scope | duplicate. */
|
|
6
8
|
reason?: string;
|
|
9
|
+
/** Finding slug or id this repeats when dismissing as duplicate. */
|
|
10
|
+
duplicateOf?: string;
|
|
7
11
|
/** Guidance rule text; defaults to "Don't report: <title>". */
|
|
8
12
|
rule?: string;
|
|
9
13
|
/** Where the guidance rule applies. Default: project. */
|
|
@@ -18,6 +22,19 @@ export interface TriageOptions {
|
|
|
18
22
|
sweep?: boolean | string;
|
|
19
23
|
json?: boolean;
|
|
20
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* What an addressed finding's fix now waits for: a re-run of its
|
|
27
|
+
* scenario (the persona's), or a designer's review of its screen.
|
|
28
|
+
*/
|
|
29
|
+
export interface AwaitingStep {
|
|
30
|
+
kind: "rerun" | "design_review";
|
|
31
|
+
/** The scenario to re-run (`rerun`). */
|
|
32
|
+
scenario?: string;
|
|
33
|
+
/** The screen to review (`design_review`). */
|
|
34
|
+
screen?: string;
|
|
35
|
+
/** The command that produces the proof. */
|
|
36
|
+
command: string;
|
|
37
|
+
}
|
|
21
38
|
/**
|
|
22
39
|
* Set the triage status of one or more findings. Dismissing as
|
|
23
40
|
* `not_relevant` or `walker_error` also writes a tester guidance rule
|