Skip to content

docs(cli): advertise open --foreground and snapshot --actions in the workflow card - #1682

Merged
thymikee merged 3 commits into
mainfrom
claude/card-advertise-foreground-actions
Aug 8, 2026
Merged

docs(cli): advertise open --foreground and snapshot --actions in the workflow card#1682
thymikee merged 3 commits into
mainfrom
claude/card-advertise-foreground-actions

Conversation

@thymikee

@thymikee thymikee commented Aug 8, 2026

Copy link
Copy Markdown
Member

Summary

Advertise two shipped iOS simulator workflows in the compact agent-device help workflow card:

  • open --foreground attaches to the sole running app and returns its initial interactive snapshot; if capture fails, the session remains open and recovery is snapshot -i.
  • snapshot -i --actions exposes custom-action names hidden in merged elements while making clear those names are evidence, not direct targets.

The conformance harness now rejects explicit foreground app targets from parsed positionals regardless of flag order, pins degraded-open recovery, and builds the merged-actions sample through the real snapshot -i output route. Scope is 10 help/conformance files; runtime behavior is unchanged.

Validation

  • Workflow card: 8,992 bytes (under the 9,000-byte compact-card gate).
  • Deterministic help/conformance suite: 276 tests passed.
  • Red-before proof: the old scorer accepted open --foreground --platform ios com.example.app; the new parsed-positionals check rejects it.
  • Red-before proof: realistic node depths made the old sample producer render an indented tree; snapshotCliOutput({ interactiveOnly: true }) restores the production flattened output.
  • pnpm check:affected --run: every runnable local check passed, including format, lint, typecheck, layering, Fallow, build/package, affected coverage, provider integration, Node integration, progress, and replay compatibility.

No device run is required: this changes help text and its planning/conformance fixtures, not device-facing runtime behavior.

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
JS raw 1.99 MB 1.99 MB +230 B
JS gzip 645.6 kB 645.7 kB +91 B
npm tarball 784.1 kB 784.2 kB +101 B
npm unpacked 2.74 MB 2.74 MB +230 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 27.8 ms 27.3 ms -0.5 ms
CLI --help 65.9 ms 66.4 ms +0.4 ms

Top changed chunks:

Chunk Raw diff Gzip diff
dist/src/cli-help.js +230 B +91 B

@thymikee

thymikee commented Aug 8, 2026

Copy link
Copy Markdown
Member Author

Re-reviewed exact head 12cf904b2 — not ready; three P2 conformance gaps remain.

  1. Help claims open --foreground returns refs/fails closed, but capture failure intentionally returns a successful open with initialSnapshotError + recovery warning; document and cover that degraded path.
  2. foreground-attach-single-sim misses explicit apps after flags (open --foreground --platform ios com.example.app parses but scores clean); validate parsed positionals independent of ordering.
  3. MERGED_CARD_ACTIONS_SAMPLE passes ignored { interactiveOnly: true } to formatSnapshotText; the real snapshot -i route flattens via snapshotCliOutput/{ flatten: true }, and depth-less synthetic nodes conceal the mismatch. Exercise the real formatter route with a realistic fixture.

…workflow card

open --foreground (#1670/#1671) and snapshot -i --actions (#1665) shipped
with no mention in the compact `help workflow` card, so a planning model
never discovers either. Add one terse line each: the foreground fast-path
in Bootstrap, and the merged-element custom-action guidance in Validation
and evidence. Stays under the 9,000-byte compact-card budget (8493 -> 8908
bytes).

Adds two help-conformance bench cases per the repo's changed-guidance rule:
foreground-attach-single-sim (correct plan starts with `open --foreground`
in an unambiguous single-sim scenario, fail-closed alternative forbidden)
and merged-card-actions-not-directly-invokable (a merged Bluesky-style feed
card's actions list is evidence, not a selector). Both use a real pinned
sample rebuilt through the production snapshot renderer.
…matcher

Flag order after `open` isn't semantically meaningful (`open --platform ios
--foreground` is exactly as correct as `open --foreground --platform ios`),
but startsWithForegroundOpen required --foreground to be the literal next
token after `open`. Rescoring the completed repeat=3 bench report shows this
docked codex:gpt-5.4-mini on all 3 trials even though its plan was
config-order noise, not a real deviation -- the no-positional/no-device
guarantee already comes from the forbidden checks. Loosened to require
--foreground anywhere on the open line; foreground-attach-single-sim now
scores 54/54 across both runners.
@thymikee
thymikee force-pushed the claude/card-advertise-foreground-actions branch from 12cf904 to adc8366 Compare August 8, 2026 07:29
@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Aug 8, 2026
@thymikee

thymikee commented Aug 8, 2026

Copy link
Copy Markdown
Member Author

Resolved all three findings at exact head adc836669: degraded foreground-capture recovery is documented and conformance-pinned, explicit foreground targets are rejected from parsed positionals regardless of flag order, and the merged-actions sample now uses the production snapshotCliOutput({ interactiveOnly: true }) route with realistic depths. Red-before evidence and the full affected-gate result are in the updated PR body. Code review clean; marked ready-for-human.

@thymikee
thymikee merged commit 9c25bc6 into main Aug 8, 2026
30 checks passed
@thymikee
thymikee deleted the claude/card-advertise-foreground-actions branch August 8, 2026 08:35
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-08-08 08:35 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant