Skip to content

Commit 37804bd

Browse files
committed
docs: strengthen dogfood help workflow
1 parent 7237b11 commit 37804bd

2 files changed

Lines changed: 39 additions & 9 deletions

File tree

src/utils/__tests__/args.test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,7 @@ test('usage includes agent workflows, config, environment, and examples footers'
789789
assert.match(usageText, /Default loop: devices\/apps -> open -> snapshot -i/);
790790
assert.match(usageText, /Use selectors or refs as positional targets/);
791791
assert.match(usageText, /Full operating guide: agent-device help workflow/);
792+
assert.match(usageText, /Exploratory QA: agent-device help dogfood/);
792793
assert.match(usageText, /Agent Workflows:/);
793794
assert.match(usageText, /help workflow\s+Normal bootstrap, exploration, and validation loop/);
794795
assert.match(usageText, /help debugging\s+Logs, network, alerts, diagnostics, and traces/);
@@ -834,6 +835,16 @@ test('workflow help keeps common copyable command forms', () => {
834835
assert.match(help, /screenshot --overlay-refs/);
835836
});
836837

838+
test('usageForCommand resolves dogfood help topic', () => {
839+
const help = usageForCommand('dogfood');
840+
if (help === null) throw new Error('Expected dogfood help text');
841+
assert.match(help, /agent-device help dogfood/);
842+
assert.match(help, /Find user-visible issues from runtime behavior/);
843+
assert.match(help, /dogfood-output\/report\.md/);
844+
assert.match(help, /severity, title, affected flow, repro commands/);
845+
assert.match(help, /screenshot \.\/dogfood-output\/screenshots\/issue-001\.png --overlay-refs/);
846+
});
847+
837848
test('apps defaults to --all filter and allows overrides', () => {
838849
const defaultFilter = parseArgs(['apps'], { strictFlags: true });
839850
assert.equal(defaultFilter.command, 'apps');

src/utils/command-schema.ts

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ const AGENT_QUICKSTART_LINES = [
172172
'Use selectors or refs as positional targets: id="submit", label="Allow", or @ref after snapshot -i.',
173173
'Verification commands must name the expected text/selector; bare screenshots/snapshots are not enough.',
174174
'Use agent-device commands in final plans; raw platform tools, pseudo commands, and helper prose are wrong.',
175-
'Full operating guide: agent-device help workflow.',
175+
'Full operating guide: agent-device help workflow. Exploratory QA: agent-device help dogfood.',
176176
] as const;
177177

178178
const CONFIGURATION_LINES = [
@@ -434,27 +434,46 @@ Rules:
434434
435435
Use this when asked to dogfood, exploratory test, bug hunt, QA, or find issues in an app.
436436
437+
Goal:
438+
Find user-visible issues from runtime behavior. Do not read app source or invent findings from code.
439+
Produce a concise report with severity, repro commands, expected/actual behavior, and evidence paths.
440+
437441
Loop:
438-
1. Open a named session for the target app and platform.
439-
2. Capture initial snapshot -i and screenshot.
440-
3. Map top-level navigation.
441-
4. Explore major flows, edge states, loading, errors, offline, permissions, and settings.
442-
5. For each issue, stop and capture evidence before continuing.
443-
6. Close the session and summarize findings.
442+
1. Identify target app/platform; ask only if missing.
443+
2. Create output dirs and open a named session.
444+
3. Capture baseline snapshot -i and screenshot.
445+
4. Map top-level navigation, then exercise primary flows and edge states.
446+
5. For each issue, capture evidence immediately, then continue.
447+
6. Close the session and write the report.
448+
449+
Coverage:
450+
Navigation, forms, empty/error/loading states, offline or retry behavior, permissions, settings, accessibility labels, orientation/keyboard, and obvious performance stalls.
444451
445452
Evidence commands:
453+
mkdir -p ./dogfood-output/screenshots ./dogfood-output/videos ./dogfood-output/traces
446454
agent-device --session qa open <app> --platform ios
447455
agent-device --session qa snapshot -i
448456
agent-device --session qa screenshot ./dogfood-output/screenshots/initial.png
457+
agent-device --session qa screenshot ./dogfood-output/screenshots/issue-001.png --overlay-refs
458+
agent-device --session qa logs clear --restart
459+
agent-device --session qa logs mark "issue-001 repro"
460+
agent-device --session qa logs path
449461
agent-device --session qa record start ./dogfood-output/videos/issue-001.mp4
450462
agent-device --session qa record stop
451463
agent-device --session qa close
452464
465+
Report shape:
466+
./dogfood-output/report.md
467+
For each finding: severity, title, affected flow, repro commands, expected, actual, evidence files, notes.
468+
If no issues are found, report coverage completed and residual risk instead of claiming the app is bug-free.
469+
453470
Rules:
454-
Never read app source to invent findings.
471+
Findings must come from observed runtime behavior, not source reads.
455472
Re-snapshot after each mutation.
473+
Keep commands in the report reproducible; use selectors or refs from fresh snapshots, not guessed coordinates.
456474
Prefer refs for exploration and selectors for deterministic replay.
457-
Use logs, network, screenshot --overlay-refs, trace, perf, or react-devtools only when they add evidence to a specific issue.`,
475+
Use logs, network, screenshot --overlay-refs, trace, perf, or react-devtools only when they add evidence to a specific issue.
476+
Escalate to help debugging or help react-devtools when runtime symptoms require those tools.`,
458477
},
459478
} as const satisfies Record<string, { summary: string; body: string }>;
460479

0 commit comments

Comments
 (0)