From contree
Identify gaps and cruft — where intent and implementation have drifted apart. Compares test trees against code in both directions, then hands gaps to tdd. TRIGGER when: the user asks about drift, gaps, staleness, or completeness — including loose phrasings like 'check for drift', 'audit the project', 'something feels off', 'is this in sync', 'review the trees vs the code', 'propose fixes for drift', or 'what's missing?'.
How this skill is triggered — by the user, by Claude, or both
Slash command
/contree:syncThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Finds where the contract has drifted from reality. Compares the trees in `## Test Trees` against implementation in both directions — surfacing gaps (intent without code), cruft (code without intent), staleness (trees that no longer reflect the system), and **failing tests** (trees claim behaviour the system does not actually deliver). Resolves drift with the user, then hands gaps to `tdd`.
Finds where the contract has drifted from reality. Compares the trees in ## Test Trees against implementation in both directions — surfacing gaps (intent without code), cruft (code without intent), staleness (trees that no longer reflect the system), and failing tests (trees claim behaviour the system does not actually deliver). Resolves drift with the user, then hands gaps to tdd.
After sync, the project must behave exactly as the test trees describe, and the test trees must describe and verify all behaviour. A failing test means we are not synced. Fixing existing test failures is part of sync's responsibility — not a separate concern to defer or hand back to the user untouched.
Read ## Test Trees in the project's CLAUDE.md. Parse each tree — every when/then path is a specified behaviour.
If ## Test Trees doesn't exist or has no trees, stop and suggest running setup first.
Read the codebase to understand what's actually implemented:
*.domain.test.*, *.use-case.test.*, *.adapter.test.*, *.system.test.*) — what's already covered?describe(, it(, test(, context(, or the language's equivalent). This is the framework-agnostic comparison point: the hierarchy must mirror its tree verbatim.For each test tree, check four things:
src, unit, integration, functional), verify the named file exists on the filesystem. A tree that names src/foo.ts when the file lives at src/bar.ts (or nowhere) is drift. Any category declared none is surfaced as an explicit gap for the user to resolve — intentional-but-open, awaiting coverage.Check the reverse — does the implementation do things no test tree describes? At Domain, Use-case, and Port-contract, any branch without a corresponding tree path is drift. At Adapter and System, any observable behaviour at the seam without a tree is drift.
Never resolve drift unilaterally. Every case below requires a concrete user decision before any edit — even when the resolution seems obvious (e.g. "the function is clearly YAGNI, just delete it"). Drift is where intent and implementation disagree; silently picking a side destroys the contract this skill exists to protect. Present the drift, present the options, ask, then act on the answer.
Implementation missing for a tree path (test tree exists, no code):
Implementation exists without a tree (code exists, no test tree):
Coverage-by-proxy (a unit is reachable only through higher-layer tests, with no tree at its native layer):
change (or write it directly if the layer and behaviour are unambiguous), then hand the gaps to tdd.Path drift (a tree names a file path that does not exist on the filesystem):
tdd). Present to the user and ask.Declared gap (a category value is none):
none value per tree so the user can prioritise which gaps to close via tdd.Failing tests (test exists for a tree path but does not pass):
tdd if the gap is large), or is the tree wrong (present to the user and ask before changing the contract)? Default assumption is the implementation is wrong unless evidence says otherwise. Sync is not complete while any test is red.Missing System tree (a slice has inner trees — Use-case, Domain, Adapter, Port — but no System tree above them):
change). Do not invent a System tree silently.Stale trees (test tree for capabilities that no longer exist):
Dead paths (a when/then path that no longer reflects reality):
Describe/it drift (test file's describe/it hierarchy disagrees with its tree):
After this step, test trees and implementation intent should be aligned, and the user has approved every change.
For each tree with no test file (or no passing tests), suggest the user runs tdd to implement it. Present the gaps so they can prioritise.
After all gaps are implemented and all failing tests are resolved:
## Test Trees## Test Trees — confirm it accurately describes the systemAfter sync completes:
## Test Trees has a test file; every when/then path has a passing test at that tree's layer## Test Trees — same language, same structureProvides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
npx claudepluginhub elimydlarz/claude-code-plugins --plugin contree