/** * CLI glue for the `contextatlas list-extraction-sources` subcommand * (v0.7.1 Step 1.1.b.0 + Q1.1.G.α — substrate-equivalence closure at * /index-atlas Skill surface per Path D architecture). * * Walks all three extraction streams and emits a unified JSON manifest * the `/index-atlas` Skill consumes via Bash + Read. The manifest is the * mechanical-floor substrate that closes the v0.7 Step 2.3.b.0 * substrate-equivalence claim falsified empirically at v0.8 Step 1.1.b * factorial three-repo scale. * * Stream A — ADRs at config.adrs.path. Walks via existing * walkProseFiles. Per-ADR entry includes content + sha. * Stream B — Source-symbols-with-docstrings. Per-language LSP * adapter walk + listSymbols + getDocstring filtered by * isExportedSymbol. Per-symbol entry includes docstring * text + symbol metadata + source path. * Stream C — Architectural-intent-filtered commit messages. Walks * via parseCommitLog + makeDefaultCommitFilter. Per- * commit entry includes pre-built extraction body per * buildCommitExtractionBody (subject + body). * * Manifest is JSON to stdout. Skill workflow reads the manifest once * via Read tool, iterates per-source, makes one canonical-extraction- * prompt call per source via session tokens (matches CLI's per-source * API-call iteration mechanically). The CLI's per-call loop IS the * substrate-equivalence floor; this subcommand pre-walks the source * registry so the Skill agent can iterate without re-implementing * walking machinery. * * Zero Anthropic API cost — all work is local (file walk + LSP + * git log). Subscription-bounded property preserved at the Skill * surface per ADR-02 §Decision Path-3 entry-point-determined cost * model. * * Exit codes: * 0 — manifest emitted successfully * 2 — setup error (missing config / adapter init failure / git * not on PATH) */ export type ListExtractionSourcesExitCode = 0 | 2; export interface ListExtractionSourcesCliOptions { configRoot: string; configFile: string | null; /** * Where to write the manifest. When omitted, manifest goes to * stdout (Skill consumes via Bash stdout capture into a temp file + * Read). When provided, the file is written and a short status * message goes to stdout instead. */ outputPath?: string | null; /** Test seam: stdout writer. */ writeStdout?: (chunk: string) => void; /** Test seam: stderr writer. */ writeStderr?: (chunk: string) => void; } export interface ListExtractionSourcesCliResult { exitCode: ListExtractionSourcesExitCode; } /** * Per-ADR entry in the manifest. The Skill agent reads this entry, * feeds `content` to the canonical EXTRACTION_PROMPT, and emits * claims with `source: "adr:"`, `source_path: `, * `source_sha: `. */ export interface AdrSource { source_type: "adr"; path: string; sha: string; content: string; } /** * Per-symbol entry for Stream B. The Skill agent reads this entry, * feeds `docstring` to the canonical EXTRACTION_PROMPT, and emits * claims with `source: "docstring:"`, * `source_path: `, `source_sha: `. The * `symbol_name` is included in symbol_candidates of each emitted * claim so resolve-symbols recovers the documented-symbol provenance * channel that CLI's writeDocstringClaim populates inline. */ export interface DocstringSource { source_type: "docstring"; symbol_id: string; symbol_name: string; symbol_kind: string; source_path: string; file_sha: string; line: number; docstring: string; } /** * Per-commit entry for Stream C. The Skill agent reads this entry, * feeds `extraction_body` to the canonical EXTRACTION_PROMPT (matches * buildCommitExtractionBody output exactly), and emits claims with * `source: "commit:"`, `source_path: `, `source_sha: `. */ export interface CommitSource { source_type: "commit"; sha: string; subject: string; body: string; author: string; date: string; extraction_body: string; } export interface ExtractionSourcesManifest { manifest_version: "1"; generated_at: string; config_root: string; source_root: string; sources: { adrs: AdrSource[]; docstrings: DocstringSource[]; commits: CommitSource[]; }; summary: { adr_count: number; symbols_with_docstrings: number; filtered_commits: number; }; } /** * Run the list-extraction-sources subcommand. Never throws — all * failure paths map to exit codes + actionable stderr messages. */ export declare function runListExtractionSourcesSubcommand(options: ListExtractionSourcesCliOptions): Promise; //# sourceMappingURL=cli-list-extraction-sources.d.ts.map