/cc10x:diff-driven-docsfrom cc10x
Updates documentation to reflect code changes after builds, commits, or PRs. Uses an impact classifier across business, technical, audit, and glossary layers to determine what needs updating.
Ships in cc10x. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Stale documentation is worse than no documentation — it actively misleads contributors, users, and future maintainers. Run the Impact Classifier on the diff across the four layers (business, technical, audit, glossary); write only what a layer's verdict requires.
Run this classifier before any doc work. Use it to determine which layers to evaluate and which to skip.
| Diff Characteristic | Business Layer | Technical Layer | Audit Layer | Glossary Layer |
|---|---|---|---|---|
| Internal utility, helper, or type change only | SKIP | CHECK | SKIP | SKIP |
| Test addition with no new pattern | SKIP | SKIP | SKIP | SKIP |
| Style / formatting change | SKIP | SKIP | SKIP | SKIP |
| Dependency version bump (no API change) | SKIP | SKIP | SKIP | SKIP |
| Routine bug fix (existing behavior corrected) | SKIP | CHECK | SKIP | SKIP |
| Simple refactor (behavior unchanged) | SKIP | CHECK if signatures changed | SKIP | SKIP |
| New exported function / hook / component | SKIP | CHECK | CHECK | SKIP |
| New page or route | CHECK | CHECK | CHECK | CHECK |
| Architectural pattern introduced | SKIP | CHECK | CREATE | CHECK |
| Technology choice made | SKIP | CHECK | CREATE | CHECK |
| Breaking change to public API | CHECK | CHECK | CREATE | CHECK |
| Permission or role change | CHECK | CHECK | CHECK | SKIP |
| Security or compliance impact | CHECK | CHECK | CREATE or UPDATE | SKIP |
| Domain term resolved or sharpened during the workflow | SKIP | SKIP | SKIP | CHECK |
SKIP business docs if: no user-facing surface changed; only internal utils, types, or tests were modified.
ALWAYS check technical docs when hooks, components, migrations, schema, routes, or exported library APIs changed.
CREATE an audit doc if: an architectural decision was made, a new pattern was introduced, a non-obvious tradeoff was accepted, or a team member six months from now would ask "why did we do it this way?"
CHECK glossary docs if: a domain term was resolved, sharpened, or found to contradict the code during a BUILD/PLAN/DEBUG workflow. The glossary layer is written only by designated shaping phases (planner, exploration DESIGN mode, doc-syncer) via cc10x:domain-modeling; builders emit proposals. See the Glossary Layer section below.
If all four layers are SKIP, set IMPACT_LEVEL: none and emit a SKIPPED contract immediately without opening any doc files.
User-facing guides, admin documentation, and feature descriptions. Business docs describe what users and administrators can do — not how the system works internally.
Hooks reference, components catalog, schema documentation, architecture notes, and JSDoc on exported APIs. Technical docs describe how the system is built — for developers working on the codebase.
Decision records capturing what changed, why, alternatives considered, and impact. Audit docs are written for future contributors who need to understand the reasoning behind a decision.
docs/adr/ (canonical, NNNN-numbered; legacy docs/decisions/ date-named files migrated lazily on touch), compliance notes, migration guides for breaking changescc10x:domain-modeling/ADR-FORMAT.md)docs/decisions/ and docs/adr/, the docs/adr/ version wins; delete the legacy duplicate — two live copies diverge, and readers can't tell which is authoritativeCONTEXT.md at the repo root — the project's domain language (terms and their meanings, no implementation details). Maintained inline by shaping phases (planner, exploration DESIGN mode, doc-syncer) via cc10x:domain-modeling.
CONTEXT.md (root), or per-context CONTEXT.md files if CONTEXT-MAP.md existscc10x:domain-modeling/CONTEXT-FORMAT.md (term, one-two sentence definition, _Avoid_ aliases)SKIP verdicts are owned by the Impact Classifier table above.
CREATE new when:
UPDATE existing when:
docs/adr/NNNN-{topic}.md (canonical) — scan docs/adr/ for the highest existing number and increment. Legacy docs/YYYY-MM-DD-{topic}-decision.md files in docs/decisions/ are migrated to docs/adr/ on next touch. Use cc10x:domain-modeling/ADR-FORMAT.md for the format.
## What Changed
[One paragraph describing the technical change]
## Why
[The primary reason for this decision]
## Alternatives Considered
- **{Alternative A}:** [Why it was not chosen]
- **{Alternative B}:** [Why it was not chosen]
## Impact
[Who is affected; any migration steps; ongoing maintenance implications]
The doc-syncer agent follows these five steps in order:
Step 1 — Get the diff
# For pre-commit (staged changes)
git diff --cached --stat && git diff --cached
# For post-build (last commit)
git diff HEAD~1 --stat && git diff HEAD~1
Read the full diff output before classifying.
Step 2 — Classify impact
Run the Impact Classifier table against the diff. Determine IMPACT_LEVEL and which layers to evaluate: none = all four layers SKIP; low = only the technical layer triggered and the changes are minor (rename, one-line fix); medium = technical layer triggered with signature changes, or one other layer triggered; high = multiple layers triggered, or the audit layer requires a new decision record. (Same scale cc10x:doc-syncer assigns — one definition in each place, same meaning.) If IMPACT_LEVEL is none, emit the SKIPPED contract immediately and stop.
Step 3 — Map changed files to doc targets
Use the project's ## Doc Targets from CLAUDE.md if present. Otherwise apply the generic heuristics in references/doc-target-heuristics.md. For each changed file, identify zero or more target documentation files.
Step 4 — Read then write
For each doc target:
Read the entire target file first — an unread edit duplicates sections and contradicts neighbors; the read is what makes the edit minimalEdit — do not rewrite sections that are not affected by the diffRead the file again after writing to verify the edit landed correctlyFor audit docs: check whether an existing decision doc covers this topic in docs/adr/ (canonical) or legacy docs/decisions/. If yes, update it (migrating legacy files to docs/adr/ on touch). If no, create a new file at docs/adr/NNNN-{topic}.md following the ADR format. For glossary docs: if a domain term was resolved or sharpened during the workflow, append it to CONTEXT.md (create lazily if missing) using the domain-modeling format — but only if this doc-syncer run is the designated writer (shaping phases write CONTEXT.md; builders emit proposals, see cc10x:domain-modeling).
Step 5 — Self-review
Before emitting the contract, verify:
## Docs section of CLAUDE.mdCLAUDE.md (it is an index only)This skill is loaded by the doc-syncer agent in the BUILD chain. The router spawns doc-syncer after integration-verifier passes and before the Memory Update task. The agent emits a ### Router Contract (MACHINE-READABLE) YAML block that the router validates before advancing.
Opt-out: Add DIFF_DRIVEN_DOCS: skip to the ## Session Settings section of activeContext.md to disable the doc-syncer for projects that manage documentation separately.
| Common excuse | Counter |
|---|---|
| "docs can wait" | Docs are a deliverable, not a follow-up. The workflow does not close until they are done. |
| "it's just a refactor" | If file paths, function signatures, or exported APIs changed, technical docs need updating. |
| "the diff is small" | Run the Impact Classifier. Small diffs still trigger technical doc updates when signatures change. |
| "nobody reads those docs" | Stale docs actively mislead. Empty docs are better than wrong ones. |
| "I'll add JSDoc later" | JSDoc on exported APIs is a technical doc update. Later means never. |
| "the tests document the behavior" | Tests document correctness, not usage. They are not a substitute for doc updates. |
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub romiluz13/cc10x --plugin cc10x22 skills in this plugin
/agent-commonUse when a cc10x agent starts a task: the shared preamble for the memory protocol, the contract format, and the output rules./architectureGreenfield architecture design: map functionality flows, draw components, design APIs,
classify dependencies, plan observability. For multi-component, API, schema, auth, or
integration-heavy work. For retrofitting existing code, use codebase-hygiene instead.
/buildingUse when writing production code test-first: the RED-GREEN-REFACTOR cycle, false-RED
detection, vertical slicing, scope escalation, test process discipline, and code
generation patterns.
/cc10x-guideAnswers questions about cc10x itself — what it is, how to install and configure it,
how the router, workflows, memory, and hooks operate, and how to troubleshoot.
Use this skill when: the user asks ABOUT cc10x — "what is cc10x", "how do I
configure cc10x", "why isn't cc10x activating", "how do cc10x workflows work",
"how does cc10x memory work", "cc10x troubleshooting".
NOT for performing work: "set up cc10x for me", build, debug, review, or plan
requests route to cc10x-router. "Update cc10x" / "upgrade cc10x" route to the
update skill. This skill answers questions; it never edits project code, never
writes files, never runs workflows.
Triggers: what is cc10x, cc10x help, cc10x guide, how to use cc10x, configure cc10x,
cc10x setup, cc10x faq, cc10x troubleshooting, cc10x not working, cc10x not activating.
/cc10x-routerRoutes build, debug, review, plan, QA, and triage requests through the cc10x workflows (task graphs, workflow artifacts, gates); it is the single entry point for cc10x code work.
Activates when the user asks to implement, fix, review, plan, test, refactor, or continue code work.
Trigger keywords: build, implement, create, write, add, review, audit, debug, fix, error, bug, broken, plan, design, architect, spec, brainstorm, test, refactor, optimize, update, change, research, cc10x, c10x.
Hand-off: questions about cc10x itself belong to `cc10x-guide`, and "update cc10x" belongs to the `update` skill.
/codebase-designCanonical deep-module vocabulary (module, interface, depth, seam, adapter,
leverage, locality) for designing a module's shape — a lot of behaviour
behind a small interface at a clean seam, testable through that interface.
The single source of truth for these terms; other skills (architecture,
codebase-hygiene) point here instead of restating them.
Use when designing or improving a module's interface, finding deepening
opportunities, deciding where a seam goes, or making code more testable.
Other plugins' skills for the same job