Skip to content

Add /self:audit — Karpathy-style measure-first codebase audit - #25

Merged
5uck1ess merged 4 commits into
mainfrom
feat/self-audit-karpathy
Apr 5, 2026
Merged

Add /self:audit — Karpathy-style measure-first codebase audit#25
5uck1ess merged 4 commits into
mainfrom
feat/self-audit-karpathy

Conversation

@5uck1ess

@5uck1ess 5uck1ess commented Apr 5, 2026

Copy link
Copy Markdown
Owner

Summary

New /devkit:self-audit command that implements the Karpathy research methodology: measure first, form hypotheses from evidence, rank by impact/effort, test one at a time.

How it works

  1. Detect stack (Go, TS, Python, Rust, CI, Docker)
  2. Measure everything in parallel (coverage, lint, security, stale code, git health)
  3. Analyze — turn raw numbers into ranked hypotheses with evidence citations
  4. Present — actionable report with specific devkit commands to run

Key principle

Does NOT fix anything. Only measures and analyzes. The developer decides which hypothesis to test, one at a time. No bundling.

Use case

Run on any repo: /devkit:self-audit → get ranked improvement list → pick #1/devkit:self-improve or /devkit:self-test → measure again.

Test plan

  • CI passes (validate-counts should verify 22 commands, 14 workflows)
  • Run /devkit:self-audit on devkit itself as a smoke test

5uck1ess added 4 commits April 5, 2026 19:21
Systematic audit that measures everything before forming opinions:
coverage per package, lint issues, security vulns, stale code, git health.
Ranks hypotheses by impact/effort ratio with evidence citations.
Suggests which devkit command to use for each hypothesis.

Does NOT fix anything — only measures and analyzes. You decide what to
test, one at a time.
- README tree: self-*.md (5) → (6) after adding self-audit
- Remove fake Karpathy quote marks — reframe as paraphrase
- Fix "What NOT to Do" contradiction: was implying fixing is in scope,
  now says "use the suggested devkit command" instead
- Sync workflow "What NOT to Do" with command (4 bullets, same content)
- Separate HAS_TS from HAS_JS detection (package.json alone ≠ TypeScript)
- Workflow detect step now includes {{input}} so user args aren't discarded
- Fix shell glob: [ -f */go.mod ] → find with -maxdepth 2 -print -quit
- Fix HAS_TESTS: now returns yes/no like all other variables
- Replace platform-specific stat with portable git log --format='%ai'
- README: "one-at-a-time" → "report only" (command doesn't fix anything)
The "quote" was fabricated. The actual inspiration is karpathy/autoresearch:
one file, one metric, keep or discard, loop ~100 times overnight. We apply
the same pattern to codebase quality instead of ML training.

Now references the real repo with a link and describes the actual methodology.
@5uck1ess
5uck1ess merged commit dfa748d into main Apr 5, 2026
3 checks passed
@5uck1ess
5uck1ess deleted the feat/self-audit-karpathy branch April 5, 2026 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant