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. Verified via existsSync.

    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).