/** * `docs.stats` — per-project CleoDocs adoption metrics (T13363, spec §7/§9). * * Emitted so the CleoDocs re-architecture is judged by behaviour, not by * file counts in the store: * * - **add:update ratio** — `docs.add` vs `docs.update` entries in the docs * audit log (`.cleo/audit/docs-audit.jsonl`, via {@link readAuditLog}). * The pilot's starting point is ~10:1. * - **loose-markdown count** — `*.md` files TRACKED BY GIT outside the * CleoDocs store (`git ls-files '*.md'` minus the store). Using the index * makes the scan gitignore-aware by construction: dependency trees, * VCS internals, `.cleo/council-runs`, and nested git worktrees never * appear because real projects ignore them. The Council baseline counts * (~751 axiom-app + 1,265 admin-operations) were of tracked/counted * loose files, so this is the comparable shape. UNTracked loose `.md` * files are intentionally out of scope — they are invisible to the * adoption signal. Outside a git work tree the metric is 0 (there is no * tracked-files notion to measure). * - **wikilinks edges** — row count of the `docs_wikilinks` graph table * (T11826), through the chokepoint drizzle handle. * - **decisions linked** — live `decision_adr_links` rows (status * `linked`, T13359). The legacy ledger `adrPath` field has no read * accessor, so only the link table contributes. * * Read-only: never writes to the store, the filesystem, or the audit log. * * @module * @task T13363 * @task T13629 — loose-markdown scan is git ls-files-based (gitignore-aware) * @epic T13340 * @saga T13339 */ import type { DocsStatsResult, LooseMarkdownMetrics } from '@cleocode/contracts/operations/docs.js'; /** * Count loose `*.md` files — git-tracked markdown outside the CleoDocs * store. `git ls-files '*.md'` from the project root returns the tracked * markdown paths (gitignore-aware); the store and dependency trees are then * filtered defensively. Untracked files are intentionally NOT counted. * * @param projectRoot - Absolute project root (must be a git work tree). * @returns The count plus what was scanned and excluded; `count` is 0 with * empty `scannedDirs` when the root is not a git work tree. */ export declare function countLooseMarkdown(projectRoot: string): LooseMarkdownMetrics; /** * Compute the per-project adoption metrics for `docs.stats` (T13363). * * @param opts.projectRoot - Absolute path to the CLEO project root. * @returns The metrics envelope (read-only; nothing is written). * @task T13363 */ export declare function computeDocsStats(opts: { projectRoot: string; }): Promise; //# sourceMappingURL=stats.d.ts.map