Skip to the content

Capsid menu

capsid_lint_namespace

Lint a namespace, on Capsid. Needs a grant that depends on the action.

Can change or removeReaches GitHub or Cloudflare

What it does

Consolidation loop and truth report for a namespace.

mode 'gather' (default, read-only) returns current core.md, the concept and decision docs, every unconsolidated episodic and source doc, and capsid/conventions.md, the rules. After writing the updated core.md and concept docs with capsid_write_doc, call mode 'finalize' with consumed: the episodic/source paths that were compiled. Finalize moves them under archive/ (never deletes, never touches core or concept docs) and writes one audit row.

mode 'report' measures the store instead of compiling it. It runs eight checks and the response names each one by these ids: contradictions (prose asserting a number the artifact disagrees with), stale_decisions, unbound_specs, broken_links, doc_vs_code_drift (a repo path named in canon that is no longer in the repo), unconsolidated (the episodic and source backlog), rule_doc_caps (a rule document over its cap: core.md 8KB, the others 20KB) and stale_tool_names (a rule document naming a tool or action the Worker does not serve). It also counts documents by type and returns one integrity percentage, which excludes a check that could not run. It stores the result as <namespace>/reports/lint-<date>.md. capsid_lint_namespace reads only what the caller is scoped to, except capsid/conventions.md, which every caller gets. An edge whose other end is in an out-of-scope namespace is left out of gather and report, and report skips the repo drift check when the namespace's repo is outside the caller's repo scope. finalize and report need the write grant. finalize, and a report that would overwrite one for the same date, need confirmation: elicited when the client supports it, otherwise pass confirm: true.

What a client is told

The MCP hints it carries, so a client can ask before it acts (src/tool-annotations.ts).

Arguments

The arguments of capsid_lint_namespace
ArgumentTypeNeededWhat it is
namespacestringalways
modeone of: gather, finalize, reportno
consumedlist of stringno
confirmbooleanno