carrick-audit
The task skill that audits a whole project from the index: calls that reach no route, type mismatches, functions and routes written twice, with each item proven in source and a fix list at the end.
carrick-audit audits the whole project from the index on main. Every item starts as a row the index returned, and the skill opens source only to prove or drop it. It ends with a fix list, most harmful first.
When to use it
When you ask what is wrong in this codebase, what to clean up, for a health check, or where the project has built the same thing twice. For one function or one change, use carrick-reuse, carrick-impact or carrick-drift.
What to ask
Ask for the audit, and name a service or some sections to narrow it. If you ask only about duplicates, it runs sections C, D and E and says A and B were not asked for.
What it does
Before it reads any source, the skill makes four calls (get_project_map, get_service_graph, find_similar with audit: true and get_findings) and states the following.
- the counts: calls that reach no route, consumer and producer pairs, groups of similar functions, and operations served;
- an estimate of the new tokens and the minutes the audit will take, section by section, and the sub-agents it will start;
- what the index already shows, as leads, not verdicts.
It then waits for your go-ahead, unless your ask already gave one. It runs the five sections in sub-agents where your agent can start them, and one after another where it cannot. The audit changes nothing. At the end it asks which fix-list items to apply, and applies only those.
| Section | What it looks for | Tools |
|---|---|---|
| A. Calls that reach no route | Calls to an operation no indexed service serves | get_service_graph, get_api_endpoints |
| B. Type verdicts | Type mismatches between a route, event or procedure and its callers, pair by pair | check_compatibility, get_contract_pair, get_operation |
| C. Functions written twice | Groups of functions that do the same job | find_similar with audit: true, get_callers |
| D. Routes written twice | Two handlers in different files that serve the same thing | find_similar with include_callbacks: true, get_api_endpoints, get_operation |
| E. One job, several answers | Eight common jobs (formatting money and dates, validating phone numbers and emails, permission checks, pagination, error reporting, API headers) done differently in different places | search_by_intent |
What you get back
Each item is classed after the skill has read the source, and quotes the line that decides it:
- REAL or DIVERGED: it breaks for a user, or two copies give different results.
- WRITTEN TWICE, DIFFERS or WRITTEN TWICE, SAME: a route written twice.
- DUPLICATE: the same job and the same result.
- TYPE-ONLY or VARIANT: a difference that breaks nothing, or is there on purpose.
- FALSE, FALSE POSITIVE, OUTSIDE or NOT A COPY: the index was wrong, or the call is meant for something this project does not hold.
- CAN’T TELL: the skill could not settle it, and says what it looked for.
The report holds, in order:
- The first line of the
get_findingsanswer, which names the commits and the day the index was built, and the estimate. - The fix list: what a user can hit first, then divergences, routes written twice and the copies. Each item has its class, every file and line, what it costs and the change in one line.
- Optional tidying: TYPE-ONLY and VARIANT items.
- Every other row the index returned, with its class and a reason, so every row is accounted for.
- What the index could not tell you: calls compared against calls not compared, call sites Carrick could not resolve, and rows only a model states.
- Every call that was refused or failed.
- The protocols the items came from and those that held none.
Each section ends with a count line, rows returned against rows classed, and the two numbers match or the line says why not.
Limits
- The index is
main. Work on an unmerged branch is not in it. - Routes that nobody calls and have no second copy are not covered yet, and neither are routes that change data without an auth check. The report says so.
- A type verdict that was not compared is not agreement. The report counts those.
- A large project is read in several windows, so the count of groups before the go-ahead can be a floor, written as “at least”.
Related
- Task skills lists all five skills.
- MCP tools documents
get_findings,find_similarand the other tools it calls.