Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,18 @@ releases; any change that moves scores is called out here.
clones and for docs that reference no code. Score: 1 − 0.5 × the share of drifting docs.
Effect on real repos: excalidraw 88 → 87 (a 537-day-old CLAUDE.md); repos with recently edited
docs gain a passing check (openai-agents-python 85 → 86, vitest context 87 → 88).
- Deeper Go and Rust checks:
- `types.go-any` (weight 1): `interface{}`/`any` used as a type per 1000 lines of Go product
code. Generic constraints, comments, strings, tests and generated files don't count. 1.0 up to
2/kloc, falling linearly to 0.7 at 30/kloc.
- `types.rust-unsafe` (weight 1): `unsafe` blocks/fns/impls per 1000 lines of Rust. `-sys` crates
are skipped, and `#![forbid(unsafe_code)]` or `unsafe_code = "forbid"` scores 1. 1.0 up to
1/kloc, falling to 0.7 at 20/kloc.
- `feedback.cargo-workspace` (weight 1): one cargo workspace reaches every crate. Nested
workspaces and crates in no workspace are flagged; members globs, `exclude`, path dependencies
(implicit members) and cargo-fuzz `fuzz/` crates are understood.
- Score effect: tokio 66 → 65 (9.4 unsafe/kloc), hugo 80 → 78 (15 any/kloc), zap types 100 → 95,
ripgrep 62 → 63 (workspace check passes); ollama, cobra, hyper and codex are unchanged overall.

### Changed

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,10 @@ It also:
| Category | Weight | Checks |
| ------------------ | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Context docs** | 30% | `AGENTS.md` / `CLAUDE.md` / `.cursor/rules` / Copilot / Gemini instructions exist · they list exact build, test and lint commands · they describe architecture and key directories · **not stale**: every referenced path and `npm run` script actually exists · **not drifting** (git history): a doc untouched for 90+ days while 25+ later commits changed the files it names or added/removed files in the dirs it describes · not too long (or too thin) · both `AGENTS.md` and `CLAUDE.md` so every agent is covered · `.cursor/rules/*.mdc` actually apply (frontmatter, globs that match files) · monorepos: large workspace packages have a nested `AGENTS.md` or are mentioned in the root docs |
| **Feedback loops** | 25% | A discoverable test command (package.json `test`, pytest config, `make test`, `cargo test`, `go test`) · linter configured (eslint, biome, oxlint, ruff, flake8, clippy, golangci-lint) · typecheck command (`tsc`, mypy, pyright) · CI config · `--run`: test suite passes and is fast, lint and typecheck pass, `--flaky` flags tests that change result between two runs |
| **Feedback loops** | 25% | A discoverable test command (package.json `test`, pytest config, `make test`, `cargo test`, `go test`) · linter configured (eslint, biome, oxlint, ruff, flake8, clippy, golangci-lint) · typecheck command (`tsc`, mypy, pyright) · CI config · MCP server configs (`.mcp.json`, `.cursor/mcp.json`, `.vscode/mcp.json`) and Claude Code hooks are valid · Rust: one cargo workspace reaches every crate (nested workspaces and orphan crates flagged; path deps and `fuzz/` understood) · `--run`: test suite passes and is fast, lint and typecheck pass, `--flaky` flags tests that change result between two runs |
| **Navigability** | 20% | `node_modules`, `.venv`, `dist`, caches ignored (and not committed) · no source files over 1000 lines · no minified/vendored/generated blobs in agent view · shallow directory tree · README |
| **Type safety** | 15% | TypeScript `strict` across root and package tsconfigs (follows `extends`, incl. workspace packages), `any` / `@ts-ignore` / `@ts-nocheck` density · plain JS penalized · Python type-hint coverage of product code + mypy/pyright config · Go/Rust count as compiler-checked |
| **Safety** | 10% | Committed `.env` / keys / credentials files · AWS, GitHub, Slack, Stripe, OpenAI, Anthropic, Google, npm token patterns · dangerous scripts: `rm -rf ~`, `curl \| sh`, force-push, `npm publish` hidden in `build`/`test`, network calls in install hooks |
| **Type safety** | 15% | TypeScript `strict` across root and package tsconfigs (follows `extends`, incl. workspace packages), `any` / `@ts-ignore` / `@ts-nocheck` density · plain JS penalized · Python type-hint coverage of product code + mypy/pyright config · Go/Rust count as compiler-checked · Go `interface{}`/`any` density and Rust `unsafe` density |
| **Safety** | 10% | Committed `.env` / keys / credentials files · AWS, GitHub, Slack, Stripe, OpenAI, Anthropic, Google, npm token patterns · dangerous scripts: `rm -rf ~`, `curl \| sh`, force-push, `npm publish` hidden in `build`/`test`, network calls in install hooks · committed agent permissions (`Bash(*)` allow rules, `bypassPermissions`, Codex `danger-full-access`) |

**`--run` executes project code**, so it is opt-in. It runs the test command (timed), the lint
command and the typecheck command the report detected (package.json scripts, `make` targets,
Expand Down Expand Up @@ -280,7 +280,7 @@ whatever `npm run build` does.

## Roadmap

- [ ] Deeper Go and Rust checks (unsafe/`interface{}` density, nested `Cargo.toml` workspaces) and Java/Kotlin support
- [ ] Deeper Go and Rust checks (unsafe/`interface{}` density, nested `Cargo.toml` workspaces) and Java/Kotlin support (Go/Rust done)
- [x] `--run` for lint/typecheck too, and flaky-test detection (run twice, compare)
- [x] Monorepo awareness: score each workspace package, check nested `AGENTS.md`
- [x] Doc staleness via git history (doc untouched while referenced code churned)
Expand Down
Loading
Loading