self-code-review
Skill0 starsChanged 4 months agoMITView on GitHub
Stage 5.5 self code review — findings-first review of the branch diff (git diff origin/main...HEAD) before push, with a HIGH/MEDIUM/LOW resolution policy. Use before pushing any feature branch, or when the user asks for a structured review of a change.
- Commits and pushes
In this repository16 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- adoptSkill
- browser-verifySkill
- create-spec-promptSkill
- feature-planSkill
- implement-specSkill
- orchestrateSkill
- pr-reviewSkill
- security-reviewSkill
- spec-reviewSkill
- browser-verifySkill
- create-specSkill
- implement-specSkill
- spec-reviewSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Mandatory: before every git push on a feature branch.
- Distinctive: line 21
Use verbatim, or adapt by appending focus areas (e.g.
- Very specific: line 41
Read the changed files in context.
- Very specific: line 88
Frontend: check shared-layer impact — a change to frontend/layers/shared affects every app layered on it.
- Distinctive: line 91
Migrations: check naming honesty — the migration name must match what its body actually does.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Self Code Review (Stage 5.5)
The Stage 5.5 executor for the SDLC in 00-core-workflow.md
(long form: docs/sdlc.md). The implementing agent runs it on the
branch diff before pushing, with one goal: Stage 6 operator review finds zero new code
issues and can focus on in-browser verification instead of re-reviewing code.
When this runs
- Mandatory before every
git pushon a feature branch. A push without a recorded Stage 5.5 pass is a process error. Only trivial single-line or doc-only changes are exempt. - On user request, for an ad-hoc review of any change.
Canonical invocation
Use verbatim, or adapt by appending focus areas (e.g. "...and transaction safety", "...and SSE coverage"):
/self-code-review review changes in this branch for bugs, regressions, and non-alignment
with repo conventions such as component reuse and centralized formatting.Inputs
- The diff:
git diff origin/main...HEAD(or a user-supplied range). - Exclude generated files from review scope:
frontend/layers/shared/zod/**, lockfiles (pnpm-lock.yaml), and any other build artifacts. Reviewing generated churn wastes tokens and buries real findings. Do flag it if a generated file was hand-edited.
Review discipline
- Findings first — summaries are brief and secondary.
- Prioritize: bugs, behavioral regressions, missing tests, schema-contract risks, auth risks, transaction-safety risks, and violations of repo conventions.
- Read the changed files in context; consult the relevant rule files
(
database.md,backend.md,frontend.md,testing.md). - Order findings HIGH / MEDIUM / LOW.
- Include verification gaps when the change was not adequately tested.
Output format
# Findings
## HIGH
### N. <one-line title>
[file.ts](path#Lline)
<2-4 sentences: what's wrong, why it matters, the fix>
## MEDIUM
### N. <title>
...
## LOW
### N. <title>
...
## Verification Gaps
| Area | Status |Resolution policy
- HIGH: fix on the same branch before push, or file an iteration spec
(
SPEC-NNN<letter>-...). Never push with an unresolved, unfiled HIGH. - MEDIUM: judgment call — fix when cheap; otherwise log under "Known follow-ups".
- LOW: note in the implementation log; no action required.
Record the pass under ## Self Code Review in the implementation log
(template), listing each
HIGH/MEDIUM finding with its resolution: commit sha, deferred iteration spec, or accepted
with rationale. This record is what Stage 5.6 and Stage 6 read to avoid re-litigating
intentional decisions.
Repo-specific reminders
- Schema work: confirm the full pipeline ran — migrate →
pnpm db:generate→pnpm zod:generate→pnpm tsc --noEmit(seedatabase.md). - Mutation paths: transactions, audit logging (
audit.service.ts), and SSE emission (after commit) must all survive the change. - Frontend: check shared-layer impact — a change to
frontend/layers/sharedaffects every app layered on it; a copy-pasted component that belongs in the shared layer is a finding. - Migrations: check naming honesty — the migration name must match what its body actually does.
- Base-class-level changes (
BaseController/BaseRepository, cross-cutting services): these touch every entity; insist on at least one integration test covering a full round trip.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

