Loading...
Loading...
Convert an existing hand-written CLAUDE.md into a typed .spec.ts file for incremental adoption
npx skill4agent add zernie/vigiles migrate-to-specCLAUDE.md.spec.tsDon'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: inlinecomments (Level 0) or a<!-- vigiles:enforce ... -->YAML frontmatter block withvigiles:for editor autocomplete (Level 1). Both are verified byvigiles generate-schemawith the same engine as a spec. Seevigiles lint. Migrate to a spec only when they want compiler-grade guarantees.docs/markdown-mode.md
CLAUDE.mdvigilespackage.jsonnpm install -D vigiles`npm run build` — description- `command` — description`src/foo.ts` — description###**Enforced by:****Guidance only****Enforced by:** \→**Enforced by:** \or similar non-linter →**Guidance only**guidance("...")CLAUDE.md.spec.tsimport {
claude,
enforce,
guidance,
check,
every,
file,
cmd,
ref,
instructions,
} from "vigiles/spec";
export default claude({
sections: {
// Prose sections here
},
keyFiles: {
// Key files here
},
commands: {
// Commands here
},
rules: {
// Rules here
},
});file()cmd()npm run**Enforced by:** \rules to// TODO: classify as enforce() or guidance()**Why:**enforce()guidance()ref()npm run build
npx vigiles compile CLAUDE.md.spec.tsnpx vigiles compilenpx vigiles check.gitignorevigiles compilevigiles check- name: Compile specs
run: npx vigiles compile
- name: Verify integrity
run: npx vigiles check- uses: zernie/vigiles@main
with:
command: check