/** * dossier.ts — deterministic material the `specify` skill reasons over. * * The generative steps (write the spec prose, scaffold the code, judge * conformance) need a model. The CLI does not call one. Instead each command * here gathers the *deterministic inputs* an agent needs and hands them over as * structured JSON, so the skill spends its tokens reasoning, not re-discovering * structure the CLI can compute for free. * * reverse — read a graphify graph of the CODE → group symbols by community → * hand the agent clusters to turn into behavioral spec files. * build — read a SPEC → list triggers + aspect files → hand the agent a code * plan skeleton to scaffold from. * reflect — print the standing guide for writing code from a spec. */ export interface ReverseCluster { community: number; files: string[]; symbols: { label: string; source_file?: string; source_location?: string; }[]; } export interface ReverseDossier { status: 'ok' | 'error'; command: 'reverse'; /** 'graphify' when a graph was used (richer clusters), 'codescan' for the zero-setup fallback. */ mode: 'graphify' | 'codescan'; graph: string | null; code_dir: string; /** Where the AI MUST write the spec: a specs/ dir at the project root. Always set. */ spec_dir: string; total_symbols: number; clusters: ReverseCluster[]; instructions: string[]; hint?: string; message?: string; } export declare function reverseDossier(codeDir: string, opts?: { graphPath?: string; }): ReverseDossier; export interface BuildDossier { status: 'ok' | 'error'; command: 'build'; spec_dir: string; aspects: { file: string; triggers: string[]; }[]; total_triggers: number; instructions: string[]; message?: string; } export declare function buildDossier(specDir: string): BuildDossier; export interface ReflectGuide { status: 'ok'; command: 'reflect'; guide: string[]; } export declare function reflectGuide(): ReflectGuide; export interface NewSpecResult { status: 'ok' | 'error'; command: 'new'; spec_dir: string; created: string[]; idea: string; instructions: string[]; message?: string; } /** * Scaffold a brand-new spec directory from a one-line product idea — for the * greenfield case where no code exists yet. Writes a minimal, valid spec * skeleton (a README with placeholder triggers) and returns the instructions * the AI skill follows to expand the idea into a full behavioral spec. * * The skeleton is deliberately minimal and code-free; the model does the * expansion. We only guarantee the result is a structurally valid spec the * agent can grow into. */ export declare function newSpec(idea: string, opts?: { dir?: string; }): NewSpecResult; //# sourceMappingURL=dossier.d.ts.map