cgagentharness-doc-sync

Detects documentation drift between code, configuration, and project docs in a Rust harness.

Updated Sep 7, 2026
One-click install
npx skills add https://github.com/cgfixit/CG-agent-harness --skill cgagentharness-doc-sync-cgfixit
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: cgagentharness-doc-sync
Source: https://github.com/cgfixit/CG-agent-harness/tree/main/.claude/skills/cgagentharness-doc-sync
Command: npx skills add https://github.com/cgfixit/CG-agent-harness --skill cgagentharness-doc-sync-cgfixit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Code changes in the CG-Agent harness can silently invalidate documented contracts in AGENTS.md, INVARIANTS.md, README.md, and config.default.yaml, leaving stale claims about auth, TLS, web permissions, routes, and invariants that mislead operators and reviewers. ## Core Features & Use Cases - Drift Detection: Finds hardcoded values that should live in config, missing route documentation, undocumented gate names, and stale invariant claims. - Contract Verification: Runs targeted cargo test suites (invariant_guard, registered route coverage, auth guards, security headers) to confirm documented behavior matches code. - Truth-Source Reconciliation: Enforces the ordering code > config > INVARIANTS.md > AGENTS.md > README.md and updates primary docs plus mirrored .claude/.codex guidance in the same change. - Use Case: After adding a new API route or changing a write-policy flag, run this check to confirm the route inventory, CLI examples, and security docs still reflect reality before opening a PR. ## Quick Start Ask the assistant to run the documentation drift check after modifying code that affects documented behavior, configuration contracts, shim actions, API routes, or architectural invariants.

Frequently Asked Questions about cgagentharness-doc-sync

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check if documentation is out of sync with code changes?▼

Run the doc-sync check after any code change affecting documented behavior, config contracts, routes, or invariants. It reads code, config.default.yaml, INVARIANTS.md, AGENTS.md, and README in order, then flags hardcoded values, missing route docs, and stale invariant claims.

What tests verify documented invariants in a Rust project?▼

The skill runs cargo test --locked against the invariant_guard, registered_paths_are_unique_and_cover_every_router_route, auth_guards, secure_portal, and security_headers test targets. Exit statuses, failures, and skips are inspected directly without piping to grep.

Does this documentation check require specific tools?▼

Yes, it requires ripgrep for searching and git for diff context. It also expects a Cargo project containing INVARIANTS.md, AGENTS.md, README.md, and assets/config.default.yaml.

When should I run a documentation drift check?▼

Run it whenever code changes could affect documented behavior, configuration contracts, shim actions, API routes, or architectural invariants. It is especially important before PRs touching core paths, where before/after invariants and test evidence are required.

What are the limitations of automated documentation sync checks?▼

The check does not rewrite historical acceptance records; those are labeled historical rather than updated. Dependency drift is out of scope and handled separately by the verify-deps skill and docs/DEPENDENCIES.md.