migrate-to-spec
Convert an existing hand-written CLAUDE.md (or AGENTS.md) into a typed CLAUDE.md.spec.ts file. This is the incremental adoption path — you keep your existing instruction file as the starting point and get type safety going forward.
Don't need full TypeScript? A typed spec is the deepest commitment level. If the user only wants verified rules without a build step, point them at markdown mode first: inline
<!-- vigiles:enforce ... -->comments (Level 0) or avigiles:YAML frontmatter block withvigiles generate-schemafor editor autocomplete (Level 1). Both are verified byvigiles auditwith the same engine as a spec. Seedocs/markdown-mode.md. Migrate to a spec only when they want compiler-grade guarantees.
Instructions
Step 1: Read the Existing File
Read the target instruction file (default: CLAUDE.md in the repo root). If the user specified a path, use that.
Also check if vigiles is installed: look for vigiles in package.json devDependencies. If not, suggest:
npm install -D vigiles
Step 2: Parse the Structure
Identify these sections in the markdown: