GuideGenerating autoreg.md

Generating autoreg.md

autoreg.md is the spec that tells AutoReg about your application, and it’s generated for you — not written by hand. The generate-autoreg AI skill works out whether your project is a UI, an HTTP API, or both, and runs the matching generator: generate-ui-autoreg produces a spec with confirmed selectors and realistic test data for browser tests; generate-api-autoreg produces a spec with every endpoint, request/response model and error contract for API tests (see API Testing). Both are ready to import.

Tests generated from a skill-written spec typically pass on the first run, because every selector in the spec was confirmed to exist in your app before the file was written.

Step 1 — Install the skill

Install the AutoReg: Skill Installer extension (autoreg.autoreg-skill-installer) in VS Code (or any VS Code-compatible editor). It installs in seconds into any repository, application, or project:

  1. Open the AutoReg panel in the activity bar.
  2. The extension detects which AI coding agents exist in your workspace — Claude Code, Cursor, GitHub Copilot, Windsurf, Continue, Cline, Aider, Gemini CLI, Codex CLI, and more.
  3. Click Install next to your agent.

Using the skill:

  • Agent detected — type the slash command in your coding agent’s chat:
    /generate-autoreg
    The skill uses the current app source folder and creates its workflow under .autoreg/ui/ or .autoreg/api/ there.
  • No agent detected — a generate-autoreg/ folder is created in your workspace with the skill inside it. Reference it directly in your agent’s chat:
    @generate-autoreg/generate-autoreg.md

Step 2 — Run the skill in your agent

In Claude Code, for example:

/generate-autoreg

The current workspace is the app source. The skill writes the uploadable spec and workflow files together under .autoreg/ui/ or .autoreg/api/, reusing those folders when they exist. For a project with both UI and API, the skill creates .autoreg/ui/autoreg.md and .autoreg/api/autoreg.md in the same app source tree.

Use --ui, --api or --both to force a type. If the workspace contains several independent apps, the skill asks which app source folder to analyze.

The skill detects UI and API features from the app source. Libraries and command-line tools are reported as unsupported.

Step 3 — Answer the interview

Before it gets started, the skill asks you up front for things it can’t work out on its own:

  • Test credentials — accounts for each role
  • Seed data — records that already exist in the test environment
  • Sample values — realistic inputs for forms (names, amounts, dates)

Secrets you provide are kept out of the spec’s plain text and resolved securely at import time.

Step 4 — Review the generated spec

For a UI project the skill writes an autoreg.md containing:

SectionWhat’s in it
Confirmed selectorsOnly selectors that were confirmed to exist in your app — no guesswork.
Every routeEvery page and API route in your app, including which ones require login.
Realistic test dataValues that match your app’s actual forms and validation rules, so tests exercise real scenarios and real error messages.
Page behavioursLoading states, modals, toasts, and other UI patterns the generator should expect.
Auth flowsLogin, logout, registration, and the roles your app supports.
Test Data CatalogThe credentials, seed data, and sample values used across the suite.
8–25 test scenariosPositive and negative cases, ready to generate tests from.

For an API project the spec instead lists every endpoint, the request and response models, the error contracts and the token flow, with every request value as an editable test parameter — see API Testing.

AutoReg automatically verifies every spec the skill produces when you import it, so you can trust it’s genuine and unaltered. The New Workflow dialog shows whether it imported a UI SPEC or an API SPEC.

Step 5 — Import into AutoReg

Create a new AutoReg workflow, enter a workflow name and select the generated source autoreg.md. AutoReg creates the .ar manifest, plans, tests, runs, baselines, deltas, defects, and fix reports under <app source>/.autoreg/<ui-or-api>/. Its generated .gitignore excludes runs, test parameter values, and the MCP session file from version control. On import, AutoReg:

  1. Verifies the spec — confirms it came from the skill and hasn’t been changed since.
  2. Resolves any pending secret values — you’re prompted for them, and they’re stored securely rather than written into the spec.
  3. Starts test generation — see Generating tests.

Refreshing a spec

If your app changes, re-run the skill rather than editing autoreg.md directly — that keeps the spec accurate and lets AutoReg continue to recognize it as genuine.

Troubleshooting

ProblemFix
Skill not offered in the agentRe-open the AutoReg panel and click Install; check the autoreg.autoDetect setting is enabled.
Spec doesn’t import as verifiedRe-run the skill to produce a fresh copy rather than editing the file by hand.
Selectors in the spec don’t match the deployed appThe deployed version differs from what was analyzed. Re-run the skill against the branch that is actually deployed.

Next steps