Skip to content

feat(skills): creating-actions — guided authoring of reusable Maestro actions#272

Merged
Lykhoyda merged 2 commits into
mainfrom
action-creation-skill
Jun 11, 2026
Merged

feat(skills): creating-actions — guided authoring of reusable Maestro actions#272
Lykhoyda merged 2 commits into
mainfrom
action-creation-skill

Conversation

@Lykhoyda

Copy link
Copy Markdown
Owner

Summary

New creating-actions skill (the plugin's 8th) that facilitates creating new actions — replayable Maestro flows under .rn-agent/actions/ — with a required ASCII flow-diagram design step mapping screens/transitions to exact testIDs/selectors before any YAML is written.

The skill codifies the full authoring contract that previously lived scattered across rn-testing, run-action.md, and the bridge source:

  1. Step 0 — inventory dedup: scan learned-actions.mjs before authoring; extend a near-duplicate instead of forking it
  2. Step 1 — creation-path choice: recorder (cdp_record_test_*) vs direct YAML vs maestro_generate
  3. Step 2 — selector grounding: every testID from cdp_component_tree / device_snapshot / source grep — never invented
  4. Step 3 — ASCII flow diagram (required): [RouteName] boxes, -arrows labeled with exact selectors and ${PARAMS}, one assertion anchor per screen; embedded in the YAML header so each action documents itself
  5. Step 4 — M7 header contract (id regex, 5 inventory keys, params rules, status: experimental at creation)
  6. Step 5 — pre-replay validation: header round-trip via the inventory parser, placeholder↔params coverage both directions, selector audit
  7. Step 6 — replay-to-promote via cdp_run_action (never hand-set active; sidecar is never hand-written)

Ships with references/m7-header-reference.md (full field glossary, parser behavior, lifecycle transitions, failure codes) and examples/add-product-to-cart.yaml (worked example with embedded diagram).

Why the diagram rules are strict (grounded in parser reality, not style)

  • parseM7Header trims each comment line and last-wins kv-parses it: an adversarial probe confirmed a diagram line # status: shows spinner silently overwrites the action's status. Hence: every diagram line's content starts with a non-letter glyph ([, , ).
  • learned-actions.mjs extracts ${VAR} params from the whole file text, comments included (learned-actions.mjs:115) — so the skill pins down exactly where ${...} may appear (steps + diagram mirroring steps; bare names in prose).

Verification

  • RED→GREEN subagent test: baseline agent (best case, full repo access) authored a valid action but skipped flow design (no diagram) and the pre-authoring dedup scan; with the skill loaded, a confined agent on an unseen flow followed every step and produced a toolchain-clean action.
  • Toolchain validation of the shipped example: real parseM7Header round-trips all 11 M7 fields with the diagram embedded (incl. produces + expectedRouteSequence); learned-actions.mjs lists exact metadata and synthesizes the replay command with exactly one -e; Maestro check_flow_syntax → valid.
  • Adversarial probe demonstrating the status-overwrite hazard the skill guards against.

Wiring

  • Registered in plugin.json (skills 7→8)
  • Routed from using-rn-dev-agent (new decision-tree branch + skill-map row, count bump)
  • Cross-linked from rn-testing's M7 section
  • Changeset: rn-dev-agent-plugin minor

🤖 Generated with Claude Code

… actions

New skill walking the agent through the full action-authoring contract:
inventory-dedup scan before authoring, creation-path choice (recorder /
direct YAML / maestro_generate), selector grounding, a required ASCII
flow diagram (screens + transitions annotated with exact testIDs and
${PARAMS}, embedded in the YAML header with glyph-first lines so
parseM7Header cannot misread a diagram line as metadata — a bare
"# status: ..." line demonstrably overwrites the field), the M7 header
contract, pre-replay validation, and replay-to-promote via
cdp_run_action.

Ships references/m7-header-reference.md (full field glossary, parser
behavior, lifecycle, failure codes) and examples/add-product-to-cart.yaml
— validated end-to-end against the real toolchain: parseM7Header (all 11
fields round-trip with the diagram embedded), learned-actions.mjs
(inventory lists exact metadata + synthesizes the replay command), and
Maestro check_flow_syntax (valid).

Skill tested RED→GREEN with subagents: baseline run produced no diagram
and no dedup scan; with the skill loaded, a confined agent followed all
steps and produced a toolchain-clean action on an unseen flow.

Routed from using-rn-dev-agent (decision tree + skill map, count 7→8)
and cross-linked from rn-testing's M7 section; registered in
plugin.json; changeset: rn-dev-agent-plugin minor.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ee868f2588

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread skills/creating-actions/SKILL.md
Codex review on PR #272 (P2, verified real): both handlers accept
params (GH #116 — threaded to maestro as -e KEY=VALUE on first attempt
AND post-repair retry, run-action.ts:107/258/447), but the zod
registrations omitted the field. zod strips unknown keys by default, so
parameter bindings were silently dropped at the tool-call layer and a
parameterised action failed at runtime with unset ${VAR} placeholders —
breaking the call shape the new creating-actions skill (and the
pre-existing commands/run-action.md) document.

TDD: pr-272-params-schema-wiring.test.js pins both registrations
(failed before the schema fix, passes after). Key-format validation
(/^[A-Z_][A-Z0-9_]*$/) remains in the maestro_run handler. Full suite
1915/1915. dist rebuilt. Changeset: rn-dev-agent-cdp minor.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Lykhoyda Lykhoyda merged commit abe4411 into main Jun 11, 2026
10 checks passed
@Lykhoyda Lykhoyda deleted the action-creation-skill branch June 11, 2026 10:10

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 18ac6423da

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

## Step 5 — Validate Before First Replay

1. **Header parses + inventory lists it**: re-run the Step-0 command with `--filter <id>` — confirm `intent`, `tags`, `mutates`, `status` come back exactly as written (not `?`). This also proves the embedded diagram didn't corrupt the header.
2. **Placeholder coverage**: `grep -o '\${[A-Z_]*}' <file>` over the steps ↔ `# params` list, both directions.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use the full placeholder regex in validation

For actions that use allowed digit-bearing params such as ${PRODUCT_ID2} or ${OTP_6}, this validation command misses the placeholder because [A-Z_]* cannot consume digits before the closing brace. The contract above and the inventory scanner both allow [A-Z_][A-Z0-9_]*, so Step 5 can incorrectly pass while leaving a required binding out of # params, and the first replay then runs with an unset placeholder. Use the same full param regex here as the scanner/contract.

Useful? React with 👍 / 👎.

Lykhoyda added a commit that referenced this pull request Jun 11, 2026
…278)

* feat(agents): all agents on opus; rn-code-architect on fable

rn-tester, rn-code-explorer, rn-code-reviewer move sonnet → opus;
rn-debugger already opus; rn-code-architect moves opus → fable
(claude-fable-5 — the top tier, fitting the architect's role as the
single deep-reasoning blueprint step in the /rn-feature-dev pipeline,
where it runs 1-2× vs the explorers'/reviewers' 2-3× parallel fans).

Model-tier prose synced: using-rn-dev-agent agent-map tables +
decision tree, docs-site agent pages + index tables.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* refactor(skills): efficiency pass — dedup, trigger-only descriptions, stale-claim fixes

- rn-feature-development (5,076→3,962 words, −22%): Phase 8 defers to
  commands/proof-capture.md as the single protocol source (was a ~1,800-word
  drifting duplicate) with pipeline deltas on top; 8 per-phase evaluator
  lines collapsed to one core principle; description rewritten trigger-only
  per the CSO rule (workflow-summarizing descriptions make the body get
  skipped).
- using-rn-dev-agent (2,065→1,825): HELPERS_NOT_INJECTED recovery moved to
  rn-debugging (its owner) with routing pointers; surface counts fixed
  (76 tools / 14 commands, were 64/16).
- rn-testing: M7 section slimmed to a 5-key table + creating-actions
  pointer; heading preserved for citations.
- rn-best-practices / rn-setup: trigger-only descriptions (dropped the
  rot-prone 118-rule inventory; added failure-phrase triggers).
- Correctness: maestro_run/cdp_run_action params claims updated for #272
  (two files said "no -e pass-through"); run-action.md citation fixed
  ("Maestro Flow Standards" → real heading); smoke-test standardized on
  cdp_run_action (RunRecord + promotion), plain maestro_run reserved for
  the on-camera replay; <test-app> placeholder defined.

Verified: frontmatter parses on all 8 skills; zero stale-claim greps; all
cross-references resolve; confined-subagent retrieval test answered the
full Phase 8 chain (skill → proof-capture → creating-actions) concretely —
its 4 findings (stale Step-1.4 refs, smoke-test contradiction, Steps-range
skipping the diagram, undefined placeholder) are fixed in this commit.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant