What it is for
Builds an end-to-end test for one journey. CoreStory has no journey or acceptance-criteria store, so the agent traces the journey from code and rules, and each verified rule becomes an assertion. Use it when- You want a test that covers a user journey, API flow, or API-to-database path.
- You want the failure branches the rules define covered, not only the happy path.
- You need tests for a single rule or module (use Behavioral Test Generation).
Prerequisites
- A repository that CoreStory v3 has indexed. The skill checks this first with
statusandcorpus_info, and stops if the snapshot is missing or the last ingest failed. Setup is on the CoreStory v3 playbooks overview. - The
corestory-localplugin or the MCP connection, so the agent can reach the CoreStory v3 tools. - A test environment the tests can run against (app startup, database, test client). If none exists, the skill proposes the smallest fit and asks before adding dependencies.
How to invoke it
- Automatic. With the Claude Code plugin, a session hook points the agent to the matching skill before it edits or answers. The agent picks
generate-e2e-testswhen the request fits. - By name. Ask for it directly (
/generate-e2e-testsin Claude Code; the plugin may show it ascorestory-local:generate-e2e-tests), or say “use the generate-e2e-tests skill” in other agents. - From a rules file. Without the plugin hook, add the one-line fallback from the overview to
CLAUDE.mdorAGENTS.md.
What it produces
- New E2E test files in the repo’s E2E location.
E2E-NOTES.mdin the repository root: journey steps withpath:start-end, rules asserted (id and values), tests added, commands and results, branches not covered, andNot verified.
How it works
- Preflight with
statusandcorpus_info; name one journey. - Trace it:
searchandread_filefor the entry point,connectionsfor callers and callees across layers, and the steps recorded asstep: path:start-end. - Find rules on the path with
search(kind:"sao:Rule"),entitywith evidence andread_file; preconditions and failure branches come from the same reads. - Read existing E2E tests and config for framework, data isolation and the run command.
- Write the happy path, then the failure branches. If tests can run, run each repeatedly and record the results.
Limits
- If tests cannot run in the session, the notes say so; nothing is reported as passing.
- A failing test is a finding about the rule or the code, with both locations.
- CoreStory reads and indexes code. It does not run or test it. Any test results in the output are the agent’s own, from commands it ran.
- Results describe the ingested snapshot, which may differ from your working tree if files changed since.
- Hits from
searchare leads, not proof. The skill reads the cited lines before it relies on a rule, and lists what it could not check underNot verified. - Compared with the hosted playbook: the hosted playbook is End-to-End Test Generation.
Skill source
The full recipe is the skill file itself:generate-e2e-tests/SKILL.md on GitHub.