Detector suite for registered repo-derivable doc claims (sprint 3.30 Phase 2): check emits a versioned machine-readable work-list and exits nonzero on drift; exceptions and baselines are shrink-only — growth fails. T1 scope: D4 conflict-marker lines and D2 reference integrity, wired into pre-commit and CI from day one.
| Tier | tools |
| Role | unclassified (baselined) |
| Path | crates/tools/doc-truth |
| Edition | 2021 |
| Targets | tools-doc-truth, tools_doc_truth, cli_test |
| Public items | 79 across 12 modules |
| Tests | 142 |
What it is for
Decidable core of the tools-doc-truth detector suite (sprint 3.30 Phase 2). Pure functions over text and path sets — the binary gathers IO, this layer decides. Round-1 laws baked in: exceptions are SHRINK-ONLY (growth is itself a finding), and D4 flags conflict-marker lines paired or not — a normal unresolved merge has perfectly paired markers.
Capabilities
Claim
Cadence agreement between an extension's README and its background worker
| Item |
|---|
pub enum Claim |
fn readme_claims(md : & str) -> Vec <ReadmeClaim> |
CodeFacts
Cadence agreement between an extension's README and its background worker
| Item |
|---|
pub struct CodeFacts |
fn code_facts(js : & str) -> CodeFacts |
Disagreement
Cadence agreement between an extension's README and its background worker
| Item |
|---|
pub struct Disagreement |
fn disagreements(claims : & ReadmeClaim, facts : & CodeFacts) -> Vec <Disagreement> |
ReadmeClaim
Cadence agreement between an extension's README and its background worker
| Item |
|---|
pub struct ReadmeClaim |
Rhythm
Cadence agreement between an extension's README and its background worker
| Item |
|---|
pub struct Rhythm |
Schedule
Cadence agreement between an extension's README and its background worker
| Item |
|---|
pub struct Schedule |
class (other)
D5/D6 — document-class rules and the layout manifest.
| Item |
|---|
fn statefile_supersedes_lines(text : & str) -> Vec <usize> |
fn commands_diff(listed : & BTreeSet <String>, existing : & BTreeSet <String>,) ->(Vec <String>, Vec <String>) |
fn layout_diff(manifest : & BTreeSet <String>, actual : & BTreeSet <String>,) ->(Vec <String>, Vec <String>) |
exceptions (other)
Shrink-only exceptions (round-1 law, all four seats): an exceptions file
| Item |
|---|
fn parse(content : & str) -> BTreeSet <String> |
fn growth(committed : & BTreeSet <String>, current : & BTreeSet <String>) -> Vec <String> |
fn growth_with_renames(committed : & BTreeSet <String>, current : & BTreeSet <String>, renames : & std::collections::BTreeMap <String, String>,) -> Vec <String> |
facts (other)
D1 — fact-spans: <!-- fact:ID -->VALUE<!-- /fact:ID --> inline in
| Item |
|---|
fn parse_spans(text : & str) ->(Vec <FactSpan>, Vec <Malformed>) |
fn apply_facts(text : & str, derived : & BTreeMap <String, String>) ->(String, usize) |
FactSpan
D1 — fact-spans: <!-- fact:ID -->VALUE<!-- /fact:ID --> inline in
| Item |
|---|
pub struct FactSpan |
Malformed
D1 — fact-spans: <!-- fact:ID -->VALUE<!-- /fact:ID --> inline in
| Item |
|---|
pub struct Malformed |
kinds (other)
Document kind grammar (sprint 4.10 Phase C): parsed from the PROCESS.md
| Item |
|---|
fn pattern_matches(pattern : & str, name : & str) -> bool |
fn heading_skeleton(text : & str) -> Vec <String> |
fn skeleton_missing(required : & String, skeleton : & String) -> Vec <String> |
fn path_shaped(inner : & str) -> bool |
fn replace_word_outside_paths(line : & str, term : & str, replacement : & str) ->(String, usize) |
fn replace_word_in_line(line : & str, term : & str, replacement : & str) ->(String, usize) |
fn replace_word_in_rs_line(line : & str, term : & str, string_form : & str, code_form : & str,) ->(String, usize) |
fn replace_word_in_md_line(line : & str, term : & str, replacement : & str) ->(String, usize) |
fn replace_word_stock(text : & str, term : & str, replacement : & str) ->(String, usize, usize) |
fn fix_skeleton(text : & str, required : & String, equivalents : & (& str, & [& str)], placeholders : & (& str, & str),) ->(String, Vec <String>) |
fn section_body(text : & str, canonical : & str) -> Option <Vec <String>> |
fn section_is_placeholder(body : & String) -> bool |
KindRule
Document kind grammar (sprint 4.10 Phase C): parsed from the PROCESS.md
| Item |
|---|
pub struct KindRule |
fn parse_kind_grammar(map_text : & str) -> Vec <KindRule> |
fn placement_off_kind(rules : & KindRule, path : & str) -> Option <bool> |
SectionCensus
Document kind grammar (sprint 4.10 Phase C): parsed from the PROCESS.md
| Item |
|---|
pub struct SectionCensus |
fn census(observations : & (String, String, bool)) -> Vec <SectionCensus> |
fn unearned_sections(census : & SectionCensus, threshold_pct : u32) -> Vec <& SectionCensus> |
WordStockHit
Document kind grammar (sprint 4.10 Phase C): parsed from the PROCESS.md
| Item |
|---|
pub struct WordStockHit |
fn word_stock(file : & str, text : & str, terms : & String) -> Vec <WordStockHit> |
fn noun_sense_conflicts(file : & str, text : & str, noun : & str, sense_a_forms : & String, sense_b_forms : & String,) -> Vec <WordStockHit> |
fn phrase_stock(file : & str, text : & str, phrases : & String) -> Vec <WordStockHit> |
links (other)
D2 — reference integrity: relative markdown links, and docs/ paths
| Item |
|---|
pub const D2_SELF_BLOCK: & & str |
pub const AGGREGATED_DOCS: & & str |
pub const VERBATIM_DOCS: & & str |
fn path_candidates(citing_file : & str, target : & str, is_crate_dir : & dyn Fn(& str) -> bool,) -> Vec <String> |
LinkRef
D2 — reference integrity: relative markdown links, and docs/ paths
| Item |
|---|
pub struct LinkRef |
fn extract_md_links(text : & str) -> Vec <LinkRef> |
fn extract_backticked_paths(text : & str) -> Vec <LinkRef> |
fn extract_code_doc_paths(source : & str) -> Vec <LinkRef> |
MarkerHit
D4 — conflict-marker lines in tracked text, paired or not.
| Item |
|---|
pub struct MarkerHit |
fn scan_markers(text : & str) -> Vec <MarkerHit> |
numbering (other)
D3 — numbering allocators: ADR / sprint / bug identifiers must be unique
| Item |
|---|
fn adr_id(filename : & str) -> Option <(u32, String)> |
fn sprint_file_on_grammar(filename : & str) -> bool |
fn duplicates(pairs : & (String, String)) -> Vec <(String, Vec <String>)> |
fn two_level(number : & str) -> Option <(u64, u64)> |
fn next_free_in_series(series : u64, taken : & String) -> String |
fn next_free_decimal(base : & str, taken : & String) -> String |
fn rewrite_number_tokens(text : & str, old : & str, new : & str) ->(String, usize) |
fn rewrite_number_tokens_decimal(text : & str, old : & str, new : & str, kept_stems : & String,) ->(String, usize) |
fn insert_renumber_note(text : & str, old : & str, new : & str, date : & str) -> String |
fn mentions_number(text : & str, number : & str) -> bool |
fn civil_from_days(z : i64) ->(i64, u32, u32) |
report (other)
The versioned machine-readable work-list (round 1: schema-version and
| Item |
|---|
pub const SCHEMA_VERSION: & str |
Finding
The versioned machine-readable work-list (round 1: schema-version and
| Item |
|---|
pub struct Finding |
fn render_line(f : & Finding) -> String |
Report
The versioned machine-readable work-list (round 1: schema-version and
| Item |
|---|
pub struct Report |
fn build_report(mut findings : Vec <Finding>) -> Report |
revisit (other)
D8 — REVISIT-bearing reference docs (sprint 3.37).
| Item |
|---|
fn today_utc() -> String |
fn civil_from_unix_secs(secs : u64) -> String |
fn parse_entries(text : & str) ->(Vec <RevisitEntry>, Vec <RevisitHit>) |
fn expired(entries : & RevisitEntry, today : & str) -> Vec <RevisitHit> |
RevisitEntry
D8 — REVISIT-bearing reference docs (sprint 3.37).
| Item |
|---|
pub struct RevisitEntry |
RevisitHit
D8 — REVISIT-bearing reference docs (sprint 3.37).
| Item |
|---|
pub struct RevisitHit |
fn bare_redates(committed : & str, working : & str) -> Vec <RevisitHit> |
scaffold (other)
D7 repair helpers — stub content assembled ONLY from facts already in
| Item |
|---|
fn leading_moddoc_block(source : & str) -> Vec <String> |
fn readme_stub(name : & str, summary : & str, moddoc : & String) -> String |
fn insert_changelog_line(changelog : & str, line : & str) -> String |
TierDefHit
D9 — tier-definition grammar containment (sprint 4.8 mechanization (c),
| Item |
|---|
pub struct TierDefHit |
fn definition_grammar_hits(terms : & String, text : & str) -> Vec <TierDefHit> |
How to use it
No examples/ target and no doctest in this crate's rustdoc. The tests listed under Verification are the closest executable usage.
Module structure
tools_doc_truth
cadenceclassexceptionsfactskindslinksmarkersnumberingreportrevisitscaffoldtierdef
flowchart TD n_tools_doc_truth["tools_doc_truth"] n_tools_doc_truth --> n_cadence["cadence"] n_tools_doc_truth --> n_class["class"] n_tools_doc_truth --> n_exceptions["exceptions"] n_tools_doc_truth --> n_facts["facts"] n_tools_doc_truth --> n_kinds["kinds"] n_tools_doc_truth --> n_links["links"] n_tools_doc_truth --> n_markers["markers"] n_tools_doc_truth --> n_numbering["numbering"] n_tools_doc_truth --> n_report["report"] n_tools_doc_truth --> n_revisit["revisit"] n_tools_doc_truth --> n_scaffold["scaffold"] n_tools_doc_truth --> n_tierdef["tierdef"]
Public surface
`cadence`
| Item | What it is |
|---|---|
pub struct Schedule | One chrome.alarms.create call. |
pub struct Rhythm | One <key>Minutes/<key>Seconds rhythm in DEFAULTS, in minutes. |
pub struct CodeFacts | — |
pub enum Claim | — |
pub struct ReadmeClaim | — |
pub struct Disagreement | A README claim the code does not bear out, or one the reading cannot decide. |
fn code_facts(js : & str) -> CodeFacts | Schedules, rhythms and the auto-capture flag of one worker source. |
fn readme_claims(md : & str) -> Vec <ReadmeClaim> | Cadence claims of one README, outside fenced code. |
fn disagreements(claims : & ReadmeClaim, facts : & CodeFacts) -> Vec <Disagreement> | The claims the code does not bear out, README order. |
`class`
| Item | What it is |
|---|---|
fn statefile_supersedes_lines(text : & str) -> Vec <usize> | Lines (1-indexed) where a state file stacks supersession — the reader is being made to reconcile, which the class exists to prevent. |
fn commands_diff(listed : & BTreeSet <String>, existing : & BTreeSet <String>,) ->(Vec <String>, Vec <String>) | Two-way diff between the command names an index lists and the command files that exist: (listed-but-missing, existing-but-unlisted). |
fn layout_diff(manifest : & BTreeSet <String>, actual : & BTreeSet <String>,) ->(Vec <String>, Vec <String>) | Entries present on disk but not declared in the manifest |
`exceptions`
| Item | What it is |
|---|---|
fn parse(content : & str) -> BTreeSet <String> | Parse an exceptions file: one entry per line, # comments and blanks ignored, entries trimmed. |
fn growth(committed : & BTreeSet <String>, current : & BTreeSet <String>) -> Vec <String> | Entries present in current but not in committed — the GROWTH set |
fn growth_with_renames(committed : & BTreeSet <String>, current : & BTreeSet <String>, renames : & std::collections::BTreeMap <String, String>,) -> Vec <String> | Shrink-only growth, rename-aware (2026-09-01, the term-retirement class): an added entry is NOT growth when it is exactly a removed entry with a recorded file rename applied — the key moved with the file it names, and the drift it excuses is unchanged |
`facts`
| Item | What it is |
|---|---|
pub struct FactSpan | One span occurrence, 1-indexed line. |
pub struct Malformed | A malformed span (open without matching close on the same line, or mismatched ids) — always a finding, never silently skipped. |
fn parse_spans(text : & str) ->(Vec <FactSpan>, Vec <Malformed>) | Extract all well-formed spans and all malformed occurrences. |
fn apply_facts(text : & str, derived : & BTreeMap <String, String>) ->(String, usize) | Rewrite every registered span's interior to the derived value |
`kinds`
| Item | What it is |
|---|---|
pub struct KindRule | One kind rule: the directory it governs and a filename pattern in the map's own language (NN+ = one number group, <x> = one token, {a,b} = alternatives, * = any run). |
fn parse_kind_grammar(map_text : & str) -> Vec <KindRule> | Parse the artifact-map table text into kind rules |
fn pattern_matches(pattern : & str, name : & str) -> bool | Whole-name pattern match |
fn placement_off_kind(rules : & KindRule, path : & str) -> Option <bool> | A doc's placement verdict against the grammar |
fn heading_skeleton(text : & str) -> Vec <String> | A document's level-2 heading skeleton, normalized (lowercase, leading numbering stripped, fences skipped) |
fn skeleton_missing(required : & String, skeleton : & String) -> Vec <String> | D11 core: does a skeleton CONTAIN the ratified required sections in order? (Containment, not equality — documents may add sections.) Returns the missing sections, empty = conforming. |
pub struct WordStockHit | One banned/retired term on one prose line (D12 word-stock ratchet) |
fn word_stock(file : & str, text : & str, terms : & String) -> Vec <WordStockHit> | — |
fn noun_sense_conflicts(file : & str, text : & str, noun : & str, sense_a_forms : & String, sense_b_forms : & String,) -> Vec <WordStockHit> | One-noun-one-referent check (operator-ratified 2026-08-16: "the noun should never be shared between meanings" — context-scoped) |
fn phrase_stock(file : & str, text : & str, phrases : & String) -> Vec <WordStockHit> | Multi-word phrase sweep (domain-ratification pass, 2026-08-16): find whole-phrase occurrences under the same exclusion discipline as word_stock (fences, NAMING-ALLOW lines and successors) |
fn path_shaped(inner : & str) -> bool | Like replace_word_in_line, but double-quoted spans containing / are shielded first (sprint 4.12 rehearsal lesson: directories do not move, so path = "../../tools/tools-cli-conformance" and workspace members entries must never rename — a quoted string with a slash is a path, never a crate name) |
fn replace_word_outside_paths(line : & str, term : & str, replacement : & str) ->(String, usize) | — |
fn replace_word_in_line(line : & str, term : & str, replacement : & str) ->(String, usize) | Whole-word replacement on ONE line, no prose exclusions — the rename exporter's library crate (sprint 4.12; code lines have no NAMING-ALLOW discipline and want every occurrence) |
fn replace_word_in_rs_line(line : & str, term : & str, string_form : & str, code_form : & str,) ->(String, usize) | Rust-source variant of replace_word_in_line: package names appear in TWO grammars on the same line — prose (string literals, comments: the hyphen form is the name) and code (use x::, paths: only the underscore ident is valid Rust) |
fn replace_word_in_md_line(line : & str, term : & str, replacement : & str) ->(String, usize) | Markdown variant of replace_word_in_line: link LABELS are prose and rename; relative link TARGETS (](../x), ](./x)) are paths and never rename, because directories do not move (round-8 rehearsal class: a ../application-classify link renamed to a directory that does not exist, while the d2-exceptions registry keys the old path) |
fn replace_word_stock(text : & str, term : & str, replacement : & str) ->(String, usize, usize) | Phase-D batch-1 stock repair: replace whole-word occurrences of term with replacement, under EXACTLY the D12 exclusion discipline (fences, NAMING-ALLOW lines and their successors untouched) |
fn fix_skeleton(text : & str, required : & String, equivalents : & (& str, & [& str)], placeholders : & (& str, & str),) ->(String, Vec <String>) | Phase-D bulk skeleton repair (operator directive via coordinator, 2026-08-16) |
fn section_body(text : & str, canonical : & str) -> Option <Vec <String>> | The body of one level-2 section, by normalized heading: every line after the heading up to the next level-2 heading |
fn section_is_placeholder(body : & String) -> bool | A section satisfied in form only: once provenance comments and blanks are removed, the body is empty or is a single parenthetical note |
pub struct SectionCensus | How one required section fares across the documents of its kind: present carry it at all, placeholder of those carry it in form only. |
fn census(observations : & (String, String, bool)) -> Vec <SectionCensus> | Tally (kind, section, is_placeholder) observations — one per document per required section it carries — into a deterministic census. |
fn unearned_sections(census : & SectionCensus, threshold_pct : u32) -> Vec <& SectionCensus> | The rows of doc-skeletons.tsv the corpus has not earned: placeholders account for MORE than threshold_pct of the documents carrying the section, so requiring it no longer separates a conforming document from a non-conforming one |
`links`
| Item | What it is |
|---|---|
pub struct LinkRef | A relative link target extracted from markdown, 1-indexed line. |
fn extract_md_links(text : & str) -> Vec <LinkRef> | Extract checkable targets from text links: skip absolute URLs (any scheme), pure fragments, and mailto; strip #fragment from what remains. |
fn extract_backticked_paths(text : & str) -> Vec <LinkRef> | Extract repository paths written as inline code — crates/identity/auth |
pub const D2_SELF_BLOCK: & & str | Rust sources whose docs/ string literals are not citations of existing docs: the docs mover IS the move map — its literals are a completed move's SOURCE paths, which by definition no longer exist — and claim-verify's fixtures are synthetic claim documents |
pub const AGGREGATED_DOCS: & & str | Documents that reproduce other tracked documents verbatim |
pub const VERBATIM_DOCS: & & str | Unapplied verbatim records: a model worker's output, quoted byte-for-byte as evidence of what it proposed |
fn path_candidates(citing_file : & str, target : & str, is_crate_dir : & dyn Fn(& str) -> bool,) -> Vec <String> | Repo-relative paths a backticked citation may resolve to, in order |
fn extract_code_doc_paths(source : & str) -> Vec <LinkRef> | Extract docs/... paths cited inside string literals in Rust source |
`markers`
| Item | What it is |
|---|---|
pub struct MarkerHit | One flagged line (1-indexed). |
fn scan_markers(text : & str) -> Vec <MarkerHit> | — |
`numbering`
| Item | What it is |
|---|---|
fn adr_id(filename : & str) -> Option <(u32, String)> | 0032-lexicon-repair.md → (32, "lexicon-repair"). |
fn sprint_file_on_grammar(filename : & str) -> bool | Sprint filename grammar: sprint-<digits.digits*>-<slug>.md, slug lowercase/digits/hyphens |
fn duplicates(pairs : & (String, String)) -> Vec <(String, Vec <String>)> | Keys claimed more than once → (key, claimant list). |
fn two_level(number : & str) -> Option <(u64, u64)> | "3.41" → Some((3, 41)) |
fn next_free_in_series(series : u64, taken : & String) -> String | The numerically next free N.M in series N, given every claimed number string (any grammar — sprint-doc and three-level claims occupy too) |
fn next_free_decimal(base : & str, taken : & String) -> String | The decimal insertion number under base: numerically next free base.K given every claimed number string (operator rule 2026-08-15: "any duplicate sprints add another decimal" — the renumbered doc stays adjacent to the number it collided on instead of jumping the series) |
fn rewrite_number_tokens(text : & str, old : & str, new : & str) ->(String, usize) | Rewrite the exact renumber tokens old → new: sprint-{old}- filename stems, US-{old}. acceptance-criteria ids, and Sprint {old} titles — each with a numeric boundary so no OTHER sprint's identifier is touched |
fn rewrite_number_tokens_decimal(text : & str, old : & str, new : & str, kept_stems : & String,) ->(String, usize) | Decimal-mode token rewrite (#242): in decimal mode the OLD number survives on the kept doc, so the moved doc's references to the kept doc's file stem must NOT be rewritten |
fn insert_renumber_note(text : & str, old : & str, new : & str, date : & str) -> String | Insert the provenance note directly under the first H1 — the line a citer of the old number needs in order to find the doc after the move. |
fn mentions_number(text : & str, number : & str) -> bool | True when text mentions number as a standalone number token (hard boundary both sides) — the ambiguity detector for prose like "sprint 3.4" that a renumber must list for a human, never rewrite. |
fn civil_from_days(z : i64) ->(i64, u32, u32) | Days since 1970-01-01 → (year, month, day), proleptic Gregorian (Howard Hinnant's civil_from_days) |
`report`
| Item | What it is |
|---|---|
pub const SCHEMA_VERSION: & str | — |
pub struct Finding | — |
pub struct Report | — |
fn build_report(mut findings : Vec <Finding>) -> Report | Sort findings into the one canonical order (detector, file, line, claim) and wrap them with the schema version |
fn render_line(f : & Finding) -> String | Human-readable line for one finding. |
`revisit`
| Item | What it is |
|---|---|
pub struct RevisitEntry | One parsed entry row. |
pub struct RevisitHit | A D8 finding from one file. |
fn today_utc() -> String | Today's UTC date as YYYY-MM-DD, dependency-free (civil-from-days, Howard Hinnant's algorithm) |
fn civil_from_unix_secs(secs : u64) -> String | The pure conversion behind today_utc, separated so exact dates are assertable (mutation gate 2026-08-08: every arithmetic step survived while the conversion was only reachable through the wall clock). |
fn parse_entries(text : & str) ->(Vec <RevisitEntry>, Vec <RevisitHit>) | Parse entry rows out of a REVISIT-bearing doc |
fn expired(entries : & RevisitEntry, today : & str) -> Vec <RevisitHit> | Expiry: entries whose revisit date is on or before today (ISO) are due |
fn bare_redates(committed : & str, working : & str) -> Vec <RevisitHit> | Bare-redate check: an entry in both the committed and new versions whose revisit date moved while its note stayed identical is a finding — the date moved but nothing was reread |
`scaffold`
| Item | What it is |
|---|---|
fn leading_moddoc_block(source : & str) -> Vec <String> | The leading //! block of an entry point, as plain prose lines (markers stripped) |
fn readme_stub(name : & str, summary : & str, moddoc : & String) -> String | README stub: title, the one-line summary, then the //! prose if any. |
fn insert_changelog_line(changelog : & str, line : & str) -> String | Insert the scaffold line under ## Unreleased when the heading exists, else ATOP the ledger — before the first ## section, because this changelog grows at the top (tools-merge-resolve Class::Ledger) |
`tierdef`
| Item | What it is |
|---|---|
pub struct TierDefHit | One out-of-place tier definition. |
fn definition_grammar_hits(terms : & String, text : & str) -> Vec <TierDefHit> | Scan one document for tier-term definition-grammar lines |
No pub use re-exports: every item above is declared in this crate.
Boundary
Reaches into foundation.
Shares tier tools with 84 other crates: tools-advisory-reach, tools-archive-guard, tools-artifact-scaffold, tools-ask-ai-core, tools-ask-ais, tools-ask-gemini, tools-book, tools-book-report, … (84 total).
_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._
Where it sits
| Tier (ontology) | tools |
| Architectural role (taxonomy) | unclassified (baselined) |
| Location | crates/tools/doc-truth |
| Vocabulary in force (lexicon) | current |
Tier flow. Which tiers this crate's own edges cross.
flowchart LR n_tools["tools"] --> n_foundation["foundation"]
Dependencies
Runtime, in this workspace.
| Crate | Tier | Optional | Only on |
|---|---|---|---|
| `foundation-lexicon` | foundation | no | always |
Runtime, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
anyhow | ^1 | — | no | always |
clap | ^4 | derive | no | always |
serde | ^1 | derive | no | always |
serde_json | ^1 | — | no | always |
Development, in this workspace.
| Crate | Tier | Optional | Only on |
|---|---|---|---|
| `tools-cli-conformance` | tools | no | always |
Development, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
tempfile | ^3 | — | no | always |
Build. None.
Depended on by. 2 workspace crates.
Signal flow — what reaches this crate, and what it reaches.
flowchart LR n_tools_corpus["tools-corpus"] -->|uses| SELF n_tools_extension_conformance["tools-extension-conformance"] -->|uses| SELF SELF["tools-doc-truth"] SELF -->|development| n_tools_cli_conformance["tools-cli-conformance"] SELF -->|runtime| n_foundation_lexicon["foundation-lexicon"] classDef self fill:#1f883d,stroke:#1f883d,color:#fff; class SELF self;
Feature flags
No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.
Targets
| Kind | Name | Source |
|---|---|---|
| bin | tools-doc-truth | `src/main.rs` |
| lib | tools_doc_truth | `src/lib.rs` |
| test | cli_test | `tests/cli_test.rs` |
Error model
No public error type was detected: no public item declares a type named *Error, and no public signature returns one.
Operational characteristics
| Property | Evidence |
|---|---|
| async public surface | none detected |
| async runtime | none detected |
| database access | none detected |
| network I/O | none detected |
| unsafe code | none detected |
| environment variables | yes |
No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.
Configuration
| Variable | Read in |
|---|---|
CARGO_MANIFEST_DIR | src/links.rs |
Related capabilities
2 workspace crates depend on this one: tools-corpus, tools-extension-conformance.
Verification
| Kind | Count |
|---|---|
| Unit tests | 115 |
| Integration tests | 27 |
| Examples | 0 |
| Doctests | 0 |
Evidence by module. How often each public module is named by something executable.
| Module | Tests | Examples | Consumers |
|---|---|---|---|
cadence | 9 | 0 | 5 |
class | 3 | 0 | 0 |
exceptions | 3 | 0 | 3 |
facts | 4 | 0 | 1 |
kinds | 22 | 0 | 13 |
links | 8 | 0 | 1 |
markers | 2 | 0 | 0 |
numbering | 11 | 0 | 2 |
report | 5 | 0 | 4 |
revisit | 7 | 0 | 2 |
scaffold | 3 | 0 | 0 |
tierdef | 2 | 0 | 0 |
What the tests establish, by name:
bootstrap_seed_of_a_new_exceptions_file_is_lawful—tests/cli_test.rsclean_repo_is_green_and_setext_heading_survives—tests/cli_test.rscommitted_exception_tolerates_but_uncommitted_growth_fails—tests/cli_test.rsexc_against_ref_catches_growth_already_committed—tests/cli_test.rsfact_span_drift_is_detected_and_fix_repairs_only_interiors—tests/cli_test.rsinjected_adr_and_sprint_collisions_are_detected_unless_frozen—tests/cli_test.rsinjected_bare_date_bump_is_detected_and_a_reviewed_redate_passes—tests/cli_test.rsinjected_class_and_layout_defects_are_detected—tests/cli_test.rsinjected_dead_link_and_dead_code_citation_are_detected—tests/cli_test.rsinjected_expired_revisit_entry_blocks_and_a_future_one_passes—tests/cli_test.rsinjected_malformed_revisit_row_is_detected—tests/cli_test.rsinjected_paired_conflict_markers_are_detected—tests/cli_test.rsinjected_undocumented_crate_is_detected_by_d7—tests/cli_test.rsjson_is_deterministic_and_versioned—tests/cli_test.rsrenumber_sprint_dry_run_writes_nothing_and_signals_pending_changes—tests/cli_test.rsrenumber_sprint_never_treats_itself_or_a_near_miss_as_a_citer—tests/cli_test.rsrenumber_sprint_refuses_a_file_that_is_not_colliding—tests/cli_test.rsrenumber_sprint_repairs_the_collision_end_to_end—tests/cli_test.rsscaffold_dry_run_writes_nothing_and_signals_pending_changes—tests/cli_test.rsscaffold_emits_stubs_from_repo_facts_and_clears_d7—tests/cli_test.rsscaffold_fills_only_the_gaps_and_reports_a_complete_crate—tests/cli_test.rsscaffold_refuses_a_crate_with_no_facts_to_carry—tests/cli_test.rsstaged_bare_bump_with_reverted_worktree_still_blocks—tests/cli_test.rsstaged_mode_sees_staged_files_only—tests/cli_test.rsstaged_path_catches_baseline_growth_for_every_governed_file—tests/cli_test.rsthe_renumber_citer_cap_holds_at_its_exact_boundary—tests/cli_test.rsunregistered_fact_id_is_a_finding—tests/cli_test.rsa_no_timer_claim_agrees_with_a_worker_that_schedules_nothing_and_disagrees_with_auto_capture—src/cadence.rsa_no_timer_claim_disagrees_with_a_periodic_alarm_and_a_matched_period_agrees—src/cadence.rscode_facts_read_alarms_and_the_defaults_block_only—src/cadence.rs- _… 112 more_
Documentation coverage
| Measure | Documented | Total |
|---|---|---|
| Public items with rustdoc | 70 | 79 |
Public modules with a //! block | 12 | 12 |
pie showData
title Public items with rustdoc
"Documented" : 70
"No rustdoc detected" : 9
Metrics
| Metric | Value |
|---|---|
| Rust source files | 14 |
| Source lines | 6654 |
| Code lines | 5319 |
| Public API items | 79 |
| Public modules | 12 |
| Tests | 142 |
| Examples | 0 |
| Cargo features | 0 |
| Direct runtime dependencies | 5 |
| Workspace reverse dependencies | 2 |
pie showData
title Public API by kind
"constant" : 4
"enum" : 1
"function" : 57
"struct" : 17
pie showData
title Rust source composition
"Code" : 5319
"Blank or comment" : 1335
Generation
Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.