vigiles API reference
    Preparing search index...

    Interface ClaudeSpec

    interface ClaudeSpec {
        _specType: "claude";
        commands?: Record<string, string>;
        keyFiles?: Record<string, string>;
        maxSectionLines?: number;
        maxTokens?: number;
        rules: Record<string, Rule>;
        sections?: Record<string, string | InstructionFragment[]>;
        target?: InstructionTarget | InstructionTarget[];
    }
    Index

    Properties

    _specType: "claude"
    commands?: Record<string, string>

    npm scripts / shell commands → descriptions. Verified against package.json.

    keyFiles?: Record<string, string>

    File paths → descriptions, compiled into a "## Key Files" list. Verified via existsSync.

    Move each entry out, then remove keyFiles. The list loads on every request to tell the agent where files are, which it finds itself. For each entry: delete it if the file or the docs already say it; move a fact about one file into that file's header comment; move a rule for one folder into that folder's nested instruction file; keep a one-line file() pointer (verified the same way) only if nothing else leads there. Still compiled for one major — the one that ships this notice — and removed in the major after it; vigiles lint reports every use as deprecated-key-files. Migration: docs/rules/deprecated-key-files.md.

    maxSectionLines?: number

    Maximum lines for a single named prose section. Overrides the generous compile-time default (200 lines) that guards every section + agent section against an egregious content dump — set a tighter number to enforce your own house limit, or a larger one for an intentionally long section.

    maxTokens?: number

    Maximum estimated tokens for the compiled output (~4 chars per token). Compile fails if exceeded. Matches ETH Zurich 2511.12884 finding that files over ~300 lines / ~2000 tokens degrade agent task success.

    rules: Record<string, Rule>

    Rules: enforce(), check(), or guidance().

    sections?: Record<string, string | InstructionFragment[]>

    Named prose sections — plain strings or tagged templates with file()/cmd()/ref().

    Output filename(s). Defaults to "CLAUDE.md". Also used as the h1 heading. Pass an array to compile one spec to multiple targets (e.g., CLAUDE.md + AGENTS.md).