tools capa

tools-extension-conformance

Conformance checker for the workspace's browser extensions (sprint 4.45): the Gate 1.5.6 input guard, the parse-cleanliness probe, and `check` — loads docs/reference/extension-standard.tsv through closed enums, reads the manifest and extension.toml, and answers every applicable row; kinds without an evaluator answer unsupported, which fails the gate.

Conformance checker for the workspace's browser extensions (sprint 4.45): the Gate 1.5.6 input guard, the parse-cleanliness probe, and `check` — loads docs/reference/extension-standard.tsv through closed enums, reads the manifest and extension.toml, and answers every applicable row; kinds without an evaluator answer unsupported, which fails the gate.

Tiertools
Roletooling
Pathcrates/tools/extension-conformance
Edition2021
Targetstools-extension-conformance, tools_extension_conformance, cli_test
Public items118 across 11 modules
Tests169

What it is for

Conformance checker for the workspace's browser extensions (sprint 4.45): the standard is a table, this reads it. Sprint doc: docs/userstories/sprint-4.45-the-extension-standard-is-a-table-and-the-checker-reads-it.md; seed: the sprint 4.44 audit (B-066..B-071). Dependencies: tree-sitter and tree-sitter-javascript (the syntax frontend, approved 2026-09-04), clap, serde, toml, tools-doc-truth (the cadence reader); clap's usage errors exit 2.

The two extensions under extensions/ are instances of the standard in docs/reference/extension-standard.tsv (two classes, site-bound and general-automation; each declares its class in extension.toml). Each row is a rule instance: a predicate kind with parameters, evaluated over the manifest, the descriptor, the README and the authored sources. A construct outside a kind's analysis subset is reported as unsupported, never passed, and unsupported fails the gate like failed (decision 2). This README is generated from this block; the per-kind readings, with what each passes unseen, are stated in the module headers named below.

# Commands

tree-sitter-javascript, report per-file ERROR/MISSING counts and the vendored and symlinked paths not read. Exit 0 clean · 1 any unclean file · 2 refused by the guard or no repository root · 3 a read or parse failed after admission.

descriptor and the README (the README under the descriptor cap, after admission), load the table, evaluate every row that applies to the class, print one line per rule (rule status location detail). Exit 0 when no row is failed or unsupported (warn, finding, exempt do not fail) · 1 otherwise · 2 refused · 3 read failed. --json emits schema extension-conformance.check/1, which operations-test-results-ingest from-conformance - records as one ledger run.

each evaluated whole against the index (decision 5; module staged): the snapshot being committed, not the working tree. --json emits extension-conformance.check-staged/1 with one check/1 report per evaluated extension; a selected directory with no file left under it in the index is listed under removed and evaluated by nothing. The pre-commit stage in .githooks/pre-commit runs it when a path under extensions/ is staged (AC 6). This is the crate's one subprocess: git by name with fixed argument vectors, output capped.

from the class's embedded template (module template); an existing directory is refused. The committed extensions/TEMPLATE-* directories are this rendering, and a test holds them equal to the embedded sources (AC 7: a scaffold passes check with nothing failing or unsupported).

# The guard (Gate 1.5.6)

guard: fs::canonicalize + repo-root prefix check on the directory; per-file byte cap and running file count checked from metadata during the walk, refusing at the first offender; symlinks neither followed nor admitted, named in the report. Exactly one file is read before admission — the extension's extension.toml — after its own canonicalize + prefix check and a 64 KiB cap from metadata. No .js body is read by the guard; the tests make fixture files unreadable so a body read would surface as an Io error. probe and check read each admitted file under the same byte cap (a file that grew past it between guard and read is refused at read time). Hard links are not detected. No network, no database; no subprocess but git in --staged mode (above).

Vendored files — node_modules/, wasm/, *.min.js by default, plus vendored files = ... in extension.toml — are excluded from the walk and named as skipped. Entry grammar: name/ (one path component) matches a directory of that name at any depth; *.suffix matches files by name suffix at any depth; anything else is one file by exact relative path. Refused at load: a directory entry with more than one component, a wildcard anywhere but first, with nothing after it, or with a trailing /, a .. or . component, a repeated separator, an absolute path, an empty entry. layout development uses the same grammar.

# The rows and their readers

predicate kind, decidable and severity; a row outside any enum, a missing column, a duplicate id or an empty table is a load error. A table defect at evaluation (a query that does not compile, an unknown scope token, a missing parameter) is failed at the table path with severity and exemptions not applied.

host_permissions (four digits; E2 matches <id>-*.md under docs/architecture/adr), layout development (E8 excludes the files it names, a directory entry at any depth), [exempt] rows (rule, non-empty reason, ISO since`; anything else refuses the descriptor; an exemption naming a rule that produced no verdict is a failed verdict).

accessible resources, the extension-pages CSP, the background service worker; page_loadable (a resource a page can fetch, or a "world": "MAIN" script) and MatchPattern with Chrome's grammar (ws compares as http, wss as https).

http(s)/ws(s) URL falls inside a host permission; a template URL with a substitution is unsupported; a URL built by concatenation is not visible), manifest_key (E2, E12), owner (J2), single_file_query (E9: the table's tree-sitter query, compiled once, scoped by manifest section, a hit when the named capture mentions a top-level declaration), cross_file_producer (E4, reader in messages), call_site_guard (E5, reader in guards), dominance_gate (E3, E7, E8, E10, readers in dominance, selected by site=), doc_code_agreement (E6: the README's cadence claims against the background worker, decided by tools_doc_truth::cadence, registered there as D15), pair_emission (J1: the flows of every file, reader in flows, paired by side-effect class and cut into tools_packet_compile::flow_pair::FlowPairShard packets carried on the verdict — digests, enums and counts, validated before they are carried; the commit they pin is read from .git by head_commit, no subprocess). Every kind has an evaluator. A failed verdict's detail also lists the rule's sites outside the reading.

top_level_unread.

# Where it sits

Tier tools. Invoked by the operator (cargo run -q -p tools-extension-conformance -- check extensions/<x>) and, at pre-commit, by the stage in .githooks/pre-commit for staged extensions/ paths. The tree-sitter loading is marked as a candidate for a foundation- crate the day a second consumer wants it.

Capabilities

crate root

Conformance checker for the workspace's browser extensions (sprint 4.45): the

Item
pub const DEFAULT_MAX_FILE_BYTES: u64
pub const DEFAULT_MAX_FILES: usize
pub const DESCRIPTOR_MAX_BYTES: u64
pub const EXTENSION_TOML: & str
fn find_repo_root(start : & Path) -> Option <PathBuf>
fn guard(repo_root : & Path, dir : & Path, limits : Limits) -> Result <Admitted, GuardError>
fn probe(repo_root : & Path, admitted : & Admitted, limits : Limits,) -> Result <Vec <ParseReport>, GuardError>
pub const GIT_POINTER_MAX_BYTES: u64
pub const PACKED_REFS_MAX_BYTES: u64
fn head_commit(repo_root : & Path) -> Option <String>

Admitted

Conformance checker for the workspace's browser extensions (sprint 4.45): the

Item
pub struct Admitted

GuardError

Conformance checker for the workspace's browser extensions (sprint 4.45): the

Item
pub enum GuardError
fn read_capped(path : & Path, rel : & Path, cap : u64) -> Result <String, GuardError>
fn read_extension_doc(root : & Path, rel : & Path) -> Result <Option <String>, GuardError>

Limits

Conformance checker for the workspace's browser extensions (sprint 4.45): the

Item
pub struct Limits
Limits :: fn default() -> Self

ParseReport

Conformance checker for the workspace's browser extensions (sprint 4.45): the

Item
pub struct ParseReport
fn probe_source(file : & Path, source : & str) -> ParseReport

Vendored

Conformance checker for the workspace's browser extensions (sprint 4.45): the

Item
pub struct Vendored
Vendored :: fn defaults() -> Self
Vendored :: fn for_extension(root : & Path, dir : & Path) -> Result <Self, GuardError>
Vendored :: fn from_descriptor_text(text : & str, path : PathBuf) -> Result <Self, GuardError>
Vendored :: fn matches(& self, rel : & Path, is_dir : bool) -> bool

descriptor (other)

extension.toml — the descriptor beside manifest.json.

Item
fn is_adr_id(id : & str) -> bool
fn is_rule_id(id : & str) -> bool

Descriptor

extension.toml — the descriptor beside manifest.json.

Item
pub struct Descriptor
Descriptor :: fn parse(text : & str) -> Result <Self, DescriptorError>
Descriptor :: fn read(dir : & Path) -> Result <Self, DescriptorError>
Descriptor :: fn exemption(& self, rule_id : & str) -> Option <& Exempt>

DescriptorError

extension.toml — the descriptor beside manifest.json.

Item
pub enum DescriptorError

Exempt

extension.toml — the descriptor beside manifest.json.

Item
pub struct Exempt

Against

Sites and the gates that dominate them, as the dominance_gate kind reads them

Item
pub enum Against

Compared

Sites and the gates that dominate them, as the dominance_gate kind reads them

Item
pub struct Compared

EffectGate

Sites and the gates that dominate them, as the dominance_gate kind reads them

Item
pub enum EffectGate

Gate

Sites and the gates that dominate them, as the dominance_gate kind reads them

Item
pub struct Gate

GateSource

Sites and the gates that dominate them, as the dominance_gate kind reads them

Item
pub enum GateSource

GatedSite

Sites and the gates that dominate them, as the dominance_gate kind reads them

Item
pub struct GatedSite

GatedSites

Sites and the gates that dominate them, as the dominance_gate kind reads them

Item
pub struct GatedSites
fn api_registrations(source : & str, api : & str, method : & str, filter : & str) -> GatedSites
fn first_timer_or_observer(source : & str) -> GatedSites

ListenerFacts

Sites and the gates that dominate them, as the dominance_gate kind reads them

Item
pub struct ListenerFacts
fn message_listener_sites(source : & str) -> ListenerFacts

ListenerSite

Sites and the gates that dominate them, as the dominance_gate kind reads them

Item
pub struct ListenerSite

Operand

Sites and the gates that dominate them, as the dominance_gate kind reads them

Item
pub enum Operand

SideEffect

Sites and the gates that dominate them, as the dominance_gate kind reads them

Item
pub struct SideEffect

SinkSite

Sites and the gates that dominate them, as the dominance_gate kind reads them

Item
pub struct SinkSite

Sinks

Sites and the gates that dominate them, as the dominance_gate kind reads them

Item
pub struct Sinks
fn dynamic_code_sinks(source : & str) -> Sinks

evaluate (other)

Evaluate the rule table against one admitted extension.

Item
fn params(column : & str) -> BTreeMap <String, String>
fn evaluate(rules : & Rule, ctx : & Context <'_>) -> Vec <Verdict>
fn evaluator(kind : PredicateKind) -> Option <Evaluator>
fn built_kinds() -> Vec <PredicateKind>

Context

Evaluate the rule table against one admitted extension.

Item
pub struct Context<'a>

Status

Evaluate the rule table against one admitted extension.

Item
pub enum Status
Status :: fn as_str(self) -> & 'static str
Status :: fn fails_gate(self) -> bool

UrlLiterals

Evaluate the rule table against one admitted extension.

Item
pub struct UrlLiterals
fn url_literals(source : & str) -> UrlLiterals

Verdict

Evaluate the rule table against one admitted extension.

Item
pub struct Verdict

Flow

Flows that end in a real-world action, as the pair_emission kind reads them (J1).

Item
pub struct Flow
fn flows(source : & str) -> Vec <Flow>

CallSite

In-flight guards around a call, as the call_site_guard kind reads them (E5).

Item
pub struct CallSite

GuardFacts

In-flight guards around a call, as the call_site_guard kind reads them (E5).

Item
pub struct GuardFacts
fn guard_facts(source : & str) -> GuardFacts

manifest (other)

manifest.json as the checker reads it, and Chrome match patterns.

Item
fn glob_matches(glob : & str, text : & str) -> bool
fn any_covers(patterns : & String, url : & str) -> bool

Background

manifest.json as the checker reads it, and Chrome match patterns.

Item
pub struct Background

ContentScript

manifest.json as the checker reads it, and Chrome match patterns.

Item
pub struct ContentScript

ContentSecurityPolicy

manifest.json as the checker reads it, and Chrome match patterns.

Item
pub struct ContentSecurityPolicy

Host

manifest.json as the checker reads it, and Chrome match patterns.

Item
pub enum Host

Manifest

manifest.json as the checker reads it, and Chrome match patterns.

Item
pub struct Manifest
Manifest :: fn parse(json : & str) -> Result <Self, ManifestError>
Manifest :: fn page_loadable(& self) -> PageLoadable
Manifest :: fn is_page_loadable(& self, rel : & str) -> bool

ManifestError

manifest.json as the checker reads it, and Chrome match patterns.

Item
pub enum ManifestError

MatchPattern

manifest.json as the checker reads it, and Chrome match patterns.

Item
pub struct MatchPattern
MatchPattern :: fn parse(pattern : & str) -> Result <Self, PatternError>
MatchPattern :: fn covers(& self, url : & str) -> bool

PageLoadable

manifest.json as the checker reads it, and Chrome match patterns.

Item
pub struct PageLoadable

PatternError

manifest.json as the checker reads it, and Chrome match patterns.

Item
pub enum PatternError

Port

manifest.json as the checker reads it, and Chrome match patterns.

Item
pub enum Port

Scheme

manifest.json as the checker reads it, and Chrome match patterns.

Item
pub enum Scheme

WebAccessible

manifest.json as the checker reads it, and Chrome match patterns.

Item
pub struct WebAccessible

World

manifest.json as the checker reads it, and Chrome match patterns.

Item
pub enum World

Listener

window.postMessage producers and message listeners, as the cross-file rule reads

Item
pub struct Listener

ListenerConstant

window.postMessage producers and message listeners, as the cross-file rule reads

Item
pub struct ListenerConstant

MessageFacts

window.postMessage producers and message listeners, as the cross-file rule reads

Item
pub struct MessageFacts
fn message_facts(source : & str, fields : & String) -> MessageFacts

Producer

window.postMessage producers and message listeners, as the cross-file rule reads

Item
pub struct Producer

query (other)

Tree-sitter queries held in the table, run over one file.

Item
fn run_query(source : & str, query : & str) -> Result <Vec <Match>, QueryError>
fn top_level_names(source : & str) -> BTreeSet <String>
fn top_level_unread(source : & str) -> Vec <(usize, & 'static str)>

Capture

Tree-sitter queries held in the table, run over one file.

Item
pub struct Capture

Match

Tree-sitter queries held in the table, run over one file.

Item
pub type Match: BTreeMap <String, Capture>

QueryError

Tree-sitter queries held in the table, run over one file.

Item
pub enum QueryError
fn compile(query : & str) -> Result <Vec <String>, QueryError>

rules (other)

The rule table, loaded from docs/reference/extension-standard.tsv.

Item
pub const TABLE_PATH: & str
pub const TABLE_MAX_BYTES: u64
fn parse_table(text : & str) -> Result <Vec <Rule>, TableError>
fn is_iso_date(d : & str) -> bool
fn load_table(repo_root : & Path) -> Result <Vec <Rule>, TableError>

Applies

The rule table, loaded from docs/reference/extension-standard.tsv.

Item
pub enum Applies

Class

The rule table, loaded from docs/reference/extension-standard.tsv.

Item
pub enum Class

Decidable

The rule table, loaded from docs/reference/extension-standard.tsv.

Item
pub enum Decidable

PredicateKind

The rule table, loaded from docs/reference/extension-standard.tsv.

Item
pub enum PredicateKind

Rule

The rule table, loaded from docs/reference/extension-standard.tsv.

Item
pub struct Rule

Severity

The rule table, loaded from docs/reference/extension-standard.tsv.

Item
pub enum Severity

TableError

The rule table, loaded from docs/reference/extension-standard.tsv.

Item
pub enum TableError

staged (other)

check --staged — the extensions a commit touches, evaluated whole against the

Item
fn staged_paths(root : & Path, cap : u64) -> Result <Vec <PathBuf>, GuardError>
fn extensions_touched(paths : & PathBuf) -> Vec <PathBuf>
fn index_files(root : & Path, dir : & Path, cap : u64) -> Result <Vec <PathBuf>, GuardError>
fn index_read(root : & Path, path : & Path, cap : u64) -> Result <String, GuardError>

template (other)

template <class> <name> — the standard's executable form (sprint 4.45 task 7).

Item
pub const FILES: & str; 4
fn source(class : Class, file : & str) -> Option <& 'static str>
fn render(class : Class, file : & str, name : & str) -> Option <String>
fn valid_name(name : & str) -> bool

TemplateError

template <class> <name> — the standard's executable form (sprint 4.45 task 7).

Item
pub enum TemplateError
fn scaffold(repo_root : & Path, class : Class, name : & str) -> Result <PathBuf, TemplateError>

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_extension_conformance

flowchart TD
  n_tools_extension_conformance["tools_extension_conformance"]
  n_tools_extension_conformance --> n_descriptor["descriptor"]
  n_tools_extension_conformance --> n_dominance["dominance"]
  n_tools_extension_conformance --> n_evaluate["evaluate"]
  n_tools_extension_conformance --> n_flows["flows"]
  n_tools_extension_conformance --> n_guards["guards"]
  n_tools_extension_conformance --> n_manifest["manifest"]
  n_tools_extension_conformance --> n_messages["messages"]
  n_tools_extension_conformance --> n_query["query"]
  n_tools_extension_conformance --> n_rules["rules"]
  n_tools_extension_conformance --> n_staged["staged"]
  n_tools_extension_conformance --> n_template["template"]

Public surface

`crate root`

ItemWhat it is
pub const DEFAULT_MAX_FILE_BYTES: u64Byte cap per file, read from metadata before that file's body is read (Gate 1.5.6).
pub const DEFAULT_MAX_FILES: usizeFile cap per run (Gate 1.5.6).
pub const DESCRIPTOR_MAX_BYTES: u64Byte cap on extension.toml itself, read from metadata before the read.
pub const EXTENSION_TOML: & strThe name of the per-extension descriptor read for the vendored list.
pub struct LimitsInput bounds
Limits :: fn default() -> Self
pub enum GuardErrorWhy a directory was refused, or a read failed
pub struct AdmittedWhat the guard admitted, and what it set aside by name.
pub struct VendoredThe vendored list: defaults plus an extension's own vendored files
Vendored :: fn defaults() -> SelfThe list every extension gets without saying so.
Vendored :: fn for_extension(root : & Path, dir : & Path) -> Result <Self, GuardError>Defaults plus the vendored files array of <dir>/extension.toml, when present
Vendored :: fn from_descriptor_text(text : & str, path : PathBuf) -> Result <Self, GuardError>Defaults plus the vendored files array of a descriptor's text — the same reading for_extension applies to the file on disk, for a descriptor read from the index (check --staged)
Vendored :: fn matches(& self, rel : & Path, is_dir : bool) -> boolWhether a path relative to the extension directory is vendored.
fn find_repo_root(start : & Path) -> Option <PathBuf>Walk up from start to the directory holding .git
fn guard(repo_root : & Path, dir : & Path, limits : Limits) -> Result <Admitted, GuardError>Admit an extension directory (Gate 1.5.6)
pub struct ParseReportPer-file parse-cleanliness measurement.
fn probe_source(file : & Path, source : & str) -> ParseReportParse one JavaScript source and count ERROR and MISSING nodes
fn read_capped(path : & Path, rel : & Path, cap : u64) -> Result <String, GuardError>Read one admitted file under the byte cap
fn probe(repo_root : & Path, admitted : & Admitted, limits : Limits,) -> Result <Vec <ParseReport>, GuardError>Parse every admitted file
pub const GIT_POINTER_MAX_BYTES: u64Byte cap on each .git file head_commit reads (HEAD, a gitdir: pointer, a commondir, one loose ref): none is more than a line.
pub const PACKED_REFS_MAX_BYTES: u64Byte cap on packed-refs, one line per ref.
fn head_commit(repo_root : & Path) -> Option <String>The commit HEAD names, read from the repository's own files with no subprocess: .git/HEAD (or, in a worktree, the directory the .git file's gitdir: line names — followed as written, since a worktree's git dir legitimately sits outside the worktree), then the loose ref it names (in the git dir, then the common dir), then packed-refs in the common dir
fn read_extension_doc(root : & Path, rel : & Path) -> Result <Option <String>, GuardError>Read one extension document (a README a rule's doc= names) the way the descriptor is read: a symlink is refused unread (the walk admits no symlink, and a document is no different), the path is canonicalized and prefix-checked against root, and the size is checked from metadata against DESCRIPTOR_MAX_BYTES before the read

`descriptor`

ItemWhat it is
pub enum DescriptorError
pub struct Exempt
pub struct DescriptorThe descriptor, validated.
fn is_adr_id(id : & str) -> boolAn ADR id as this repository names them: four ASCII digits.
fn is_rule_id(id : & str) -> boolA rule id as the table names them: E or J followed by digits.
Descriptor :: fn parse(text : & str) -> Result <Self, DescriptorError>
Descriptor :: fn read(dir : & Path) -> Result <Self, DescriptorError>Read <dir>/extension.toml under the descriptor cap
Descriptor :: fn exemption(& self, rule_id : & str) -> Option <& Exempt>The exemption row for a rule id, if any.

`dominance`

ItemWhat it is
pub enum GateSourceWhere a gate's tested value comes from.
pub struct GateOne condition dominating a site.
pub struct GatedSiteA site with the gates that dominate it.
pub struct GatedSitesSites of a gated selector plus what the reading could not hold.
pub enum AgainstWhat a listener compares an event-data field against.
pub struct Compared
pub enum EffectGateWhat dominates one side effect, read from the gates on its lexical path.
pub struct SideEffect
pub struct ListenerSiteA message listener (E3).
pub struct ListenerFacts
pub enum OperandHow a dynamic-code sink's operand reads.
pub struct SinkSite
pub struct Sinks
fn message_listener_sites(source : & str) -> ListenerFactsE3 sites of one file.
fn api_registrations(source : & str, api : & str, method : & str, filter : & str) -> GatedSitesE7 sites of one file: <api>.<event>.<method>(…, { urls: filter }).
fn first_timer_or_observer(source : & str) -> GatedSitesE8 site of one file: the first timer or observer, if any.
fn dynamic_code_sinks(source : & str) -> SinksE10 sites of one file.

`evaluate`

ItemWhat it is
pub enum Status
Status :: fn as_str(self) -> & 'static strThe wire spelling, as --json and the text report print it.
Status :: fn fails_gate(self) -> boolWhether this status fails the commit gate (decision 2).
pub struct Verdict
pub struct Context<'a>Everything an evaluator may read
fn params(column : & str) -> BTreeMap <String, String>Parse a key=value;key=value parameter column into a map
fn evaluate(rules : & Rule, ctx : & Context <'_>) -> Vec <Verdict>One verdict per row that applies to the extension's class, plus one failed verdict per exemption that names no such row.
fn evaluator(kind : PredicateKind) -> Option <Evaluator>The evaluator for a kind, or None while it is not built
fn built_kinds() -> Vec <PredicateKind>The kinds with an evaluator, derived from evaluator — the record cites this list; the code consults the function.
pub struct UrlLiteralsWhat url_literals found: literal URLs with their lines, and the lines of template strings that carry a substitution and a fragment beginning with a URL scheme.
fn url_literals(source : & str) -> UrlLiteralsString literals in a JavaScript source that spell an http(s)/ws(s) URL, with their 1-based lines

`flows`

ItemWhat it is
pub struct FlowOne flow: a unit that reaches an action.
fn flows(source : & str) -> Vec <Flow>The flows of one file.

`guards`

ItemWhat it is
pub struct CallSiteA call to a wrapper-guarded callee.
pub struct GuardFacts
fn guard_facts(source : & str) -> GuardFactsRead one file's guards.

`manifest`

ItemWhat it is
pub enum ManifestError
pub enum WorldThe world a content script runs in.
pub struct ContentScript
pub struct WebAccessible
pub struct ContentSecurityPolicy
pub struct ManifestThe manifest fields the rules read
pub struct BackgroundMV3 background: the service worker file, extension-relative.
pub struct PageLoadableWhat a page can load: fetchable resource patterns and the scripts that execute in the page's realm.
Manifest :: fn parse(json : & str) -> Result <Self, ManifestError>Parse a manifest.json body
Manifest :: fn page_loadable(& self) -> PageLoadableThe page-loadable set (see module docs).
Manifest :: fn is_page_loadable(& self, rel : & str) -> boolWhether an extension-relative path is page-loadable: listed as a MAIN-world script, or matched by a web_accessible_resources glob.
fn glob_matches(glob : & str, text : & str) -> bool* matches any run of characters, including /; everything else is literal
pub struct MatchPatternA Chrome match pattern, parsed.
pub enum Scheme
pub enum PortA port constraint on an exact host.
pub enum Host
pub enum PatternError
MatchPattern :: fn parse(pattern : & str) -> Result <Self, PatternError>
MatchPattern :: fn covers(& self, url : & str) -> boolWhether a literal URL (scheme://host:port/path...) falls inside this pattern
fn any_covers(patterns : & String, url : & str) -> boolWhether url falls inside any of patterns; a pattern that does not parse is skipped, the caller having reported it on its own row.

`messages`

ItemWhat it is
pub struct ListenerConstantOne constant a listener compares an event-data field against.
pub struct ListenerA message listener and what it compares.
pub struct ProducerA produced constant: postMessage({ <field>: '<value>' }) on the window channel.
pub struct MessageFacts
fn message_facts(source : & str, fields : & String) -> MessageFactsRead one file's listeners and producers for the given fields.

`query`

ItemWhat it is
pub enum QueryError
pub struct CaptureOne capture of one match.
pub type Match: BTreeMap <String, Capture>One match: capture name (without @) → capture.
fn compile(query : & str) -> Result <Vec <String>, QueryError>Compile query against the grammar without running it — the check a row gets once, before any file is read — and return its capture names (without @), so a row's top_level_reference can be checked against what the query defines.
fn run_query(source : & str, query : & str) -> Result <Vec <Match>, QueryError>Compile query and run it over source.
fn top_level_names(source : & str) -> BTreeSet <String>Names declared at the top level of the file.
fn top_level_unread(source : & str) -> Vec <(usize, & 'static str)>Top-level constructs top_level_names does not read, with their lines: a let/const/var declarator whose name is a pattern (destructuring), and an export statement (whatever it declares or re-exports)

`rules`

ItemWhat it is
pub const TABLE_PATH: & strRepo-relative path of the table.
pub const TABLE_MAX_BYTES: u64Byte cap on the table, read from metadata before the read (Gate 1.5.6).
pub enum ClassThe two extension classes the standard names.
pub enum AppliesWhich rows apply to a given extension class.
pub enum PredicateKindThe closed set of predicate kinds
pub enum Decidable
pub enum Severity
pub struct Rule
pub enum TableError
fn parse_table(text : & str) -> Result <Vec <Rule>, TableError>Parse the table text
fn is_iso_date(d : & str) -> boolYYYY-MM-DD by shape: ten characters, digits with - at positions 4 and 7
fn load_table(repo_root : & Path) -> Result <Vec <Rule>, TableError>Load the table from the repository root.

`staged`

ItemWhat it is
fn staged_paths(root : & Path, cap : u64) -> Result <Vec <PathBuf>, GuardError>The repo-relative paths staged for commit — added, copied, modified, renamed and deleted: a deleted listener file changes the extension as much as an edited one, and the snapshot after the deletion is what runs
fn extensions_touched(paths : & PathBuf) -> Vec <PathBuf>The extension directories (extensions/<name>) the staged paths touch, in order.
fn index_files(root : & Path, dir : & Path, cap : u64) -> Result <Vec <PathBuf>, GuardError>Every tracked regular file under dir in the index, repo-relative
fn index_read(root : & Path, path : & Path, cap : u64) -> Result <String, GuardError>One file's content as staged (git show :<path>), under cap bytes

`template`

ItemWhat it is
pub const FILES: & str; 4One embedded template file: its extension-relative path and its text.
fn source(class : Class, file : & str) -> Option <& 'static str>The embedded text of templates/<class>/<file>.
fn render(class : Class, file : & str, name : & str) -> Option <String>A template file rendered for name.
pub enum TemplateErrorWhy a scaffold was refused.
fn valid_name(name : & str) -> boolWhether a name is one path component of the allowed alphabet: A-Za-z0-9A-Za-z0-9-* — no separator, no dot, no space.
fn scaffold(repo_root : & Path, class : Class, name : & str) -> Result <PathBuf, TemplateError>Write the class's files to <repo_root>/extensions/<name>/, refusing an existing directory

No pub use re-exports: every item above is declared in this crate.

Boundary

Depends on no other workspace tier.

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)tooling
Locationcrates/tools/extension-conformance
Vocabulary in force (lexicon)current

Dependencies

Runtime, in this workspace.

CrateTierOptionalOnly on
`tools-doc-truth`toolsnoalways
`tools-packet-compile`toolsnoalways

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
clap^4derivenoalways
serde^1derivenoalways
serde_json^1noalways
thiserror^2noalways
toml^0.8noalways
tree-sitter^0.25noalways
tree-sitter-javascript^0.25noalways

Development, in this workspace.

CrateTierOptionalOnly on
`tools-cli-conformance`toolsnoalways

Development, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
tempfile^3noalways

Build. None.

Depended on by. Nothing in this workspace.

Signal flow — what reaches this crate, and what it reaches.

flowchart LR
  SELF["tools-extension-conformance"]
  SELF -->|development| n_tools_cli_conformance["tools-cli-conformance"]
  SELF -->|runtime| n_tools_doc_truth["tools-doc-truth"]
  SELF -->|runtime| n_tools_packet_compile["tools-packet-compile"]
  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

KindNameSource
bintools-extension-conformance`src/main.rs`
libtools_extension_conformance`src/lib.rs`
testcli_test`tests/cli_test.rs`

Error model

Error typeNamed by
DescriptorErrordeclared, no public signature returns it
GuardErrorguard, index_files, index_read, probe, read_capped, read_extension_doc, … (7 total)
ManifestErrordeclared, no public signature returns it
PatternErrordeclared, no public signature returns it
QueryErrorcompile, run_query
TableErrorload_table, parse_table
TemplateErrorscaffold

Operational characteristics

PropertyEvidence
async public surfacenone detected
async runtimenone detected
database accessnone detected
network I/Onone detected
unsafe codenone detected
environment variablesyes

No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.

Configuration

VariableRead in
CARGO_MANIFEST_DIRsrc/descriptor.rs

No workspace crate depends on this one.

Verification

KindCount
Unit tests153
Integration tests16
Examples0
Doctests0

Evidence by module. How often each public module is named by something executable.

ModuleTestsExamplesConsumers
crate root1800
descriptor500
dominance1700
evaluate900
flows200
guards300
manifest1500
messages500
query700
rules1200
staged400
template600

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc92118
Public modules with a //! block1111
pie showData
    title Public items with rustdoc
    "Documented" : 92
    "No rustdoc detected" : 26

Metrics

MetricValue
Rust source files13
Source lines10639
Code lines8814
Public API items118
Public modules11
Tests169
Examples0
Cargo features0
Direct runtime dependencies9
Workspace reverse dependencies0
pie showData
    title Public API by kind
    "constant" : 9
    "enum" : 21
    "function" : 38
    "method" : 15
    "struct" : 34
    "type alias" : 1
pie showData
    title Rust source composition
    "Code" : 8814
    "Blank or comment" : 1825

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.

Todas las tools · Manual