About correct
correct is a pstack skill for operators who want to prevent agents from repeating mistakes in a repository. It investigates recurring errors and addresses them through architecture, types, checks, tests, or documentation, then records how each rule is enforced.
Key features
- 01Groups recurring mistakes using repository evidence
- 02Prefers architectural fixes and a single source of truth
- 03Adds type, lint, or CI enforcement
- 04Tests checks against past mistakes
- 05Maintains a table of rules and enforcement
Use cases
- 01Preventing repeated agent errors in a codebase
- 02Turning review feedback into enforceable checks
- 03Verifying a new check against a past mistake
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ ericlitman/ open-pstack --skill correctAfter installing, type/correctin Claude Code to confirm it loaded.
Details
From the project READMECorrect
The operator keeps correcting agents in this repo for the same mistakes. Change the repo so the next agent can't make them.
Assume every contributor is an agent that sees only the files it opened, copies the nearest example, and takes the shortest path that compiles. Design the repo so a change that looks right from one file is right for the whole repo.
Find the mistake classes
First, read recent commits, reverts, review comments, agent instruction files, and comments that explain workarounds. Group the mistakes into classes. A class counts once it has happened twice.
Fix each class at the highest level that works
- Eliminate it with architecture. Give each piece of state one owner and each task one supported way. Hide internals so the wrong import fails. Replace hand-synced lists with one source of truth. Delete old ways and dead code an agent would copy.
- Enforce it with types so the bad state can't be written. If bad code still compiles, add a lint or CI check whose error names the file, type, or function to use instead. If the pattern is already common, fail only when a change adds more.
- Test the behavior. Fix or delete any test that still passes when the behavior it checks breaks, or that fails when only the internals change.
- Write docs or agent rules last, only for judgment calls. Nothing fails when an agent skips them.
Fix and prove
Then fix the most frequent classes now, one commit each. Prove each new check fails on a real past mistake. Run the same command locally and in CI. Exceptions go on the offending line with a reason, an expiry date, and a human's approval.
Keep the rule table
Last, keep a table in the agent instruction file that pairs each rule with what enforces it. When the operator corrects you, fix the mistake and add the rule. If the rule was already there and nothing enforces it, that's a repeat, so fix it at the highest level in the same change. Drop a rule once its mistake can't happen.
Reply: each class with its evidence, the level you picked, and why a higher level didn't work.