/** * vigiles — Generator → SKILL.md compiler. * * PARKED (2026-08-16). Not part of the public API and not in `docs/skills.md`. * It works — `vigiles compile` detects `genSkill(` and routes here (`cli.ts`), * verified end-to-end — but `genSkill` / `act` / `checkpoint` / `finish` / * `runSkill` are reachable from NO package subpath, so nobody outside this repo * can author one. Parked rather than deleted because the code is sound and its * tests pass; there is simply nothing to evaluate its usefulness against. * Do not re-document it or give it an entry point without settling that first — * see `docs/skills.md` §Status and the adoption-ladder work. * * A generator skill (`function* () { … yield act/gate/result … }`) has dynamic * control flow, so it can't be rendered by *executing* it. Instead we parse its * SOURCE with the TypeScript compiler API and render the structure to markdown: * * yield act("prose") → a prose step * yield gate(cmd("npm test")) → a `vigiles:gate` marker (+ verified ref) * yield result(cmd("npm test")) → a `vigiles:result` marker * if (cond) { … } else { … } → "### If " / "### Otherwise" * for / while (…) { … } → "### Repeat (…)" * * The emitted SKILL.md is what the agent reads (branches flattened to prose); * the harness drives the real generator at run time (see `skill-driver.ts`). * Gate references (`cmd`/`file`/`project`) are collected and verified, so the * cross-referencing moat works on generators too (literal args only). */ import { type StampedMarkdown } from "./compile.js"; export interface GeneratorError { type: "stale-file" | "stale-command"; message: string; } export interface CompileGeneratorResult { markdown: string; errors: GeneratorError[]; } export interface CompileGeneratorSkillResult { /** * The stamped artifact — present ONLY when `errors` is empty. `null` is what * makes a failed compile unwritable: `writeArtifact` accepts nothing else. */ artifact: StampedMarkdown | null; markdown: string; errors: GeneratorError[]; } /** * Compile a generator-skill spec source — `genSkill({ name, description }, * function* () { … })` — to a full SKILL.md (frontmatter + body + integrity * hash), verifying gate references. This is the CLI entry for generator skills. */ export declare function compileGeneratorSkill(source: string, options: { readonly basePath: string; readonly specFile?: string; }): CompileGeneratorSkillResult; /** * Compile a generator's SOURCE text to SKILL.md markdown + verified-ref * errors. `frontmatter` (name/description/…) is prepended verbatim if given. */ export declare function compileGenerator(source: string, options: { readonly basePath: string; readonly frontmatter?: string; }): CompileGeneratorResult; //# sourceMappingURL=compile-generator.d.ts.map