agentleFS
kenryu42kenryu42/cc-safety-net/AGENTS.md

cc-safety-net

AGENTS.md1.6k starsChanged 2 months agoMITView on GitHub

- Multi-part work may be split into a gh stack stack. Open stack PRs with gh stack submit --auto --open: plain --auto opens drafts, which the review bots skip. - dist/ is committed and CI rejects a stale build, but a rebase replays the old build output. When gh stack rebase stops, resolve and git add the source files, never hand-merge dist/: run bun run build && git add -A dist, then gh stack rebase --continue. - README.md is the…

Trending

More talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 8 mentionsSep 2026: 5 mentionsOct 2026: 5 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the kenryu42/cc-safety-net repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about kenryu42/cc-safety-net

The biggest 5 of 18 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 18

Talked about on GitHub (18 times).

On GitHub · 18

13 more on GitHub
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository6 other files it gives its agents.

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

19 rules. About 0 are common, 11 are distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Run focused tests during development, including the failing and passing tests required by Red-Green TDD.

    line 1
  2. Very specific:

    After all implementation changes, run bun run check.

    line 2
  3. Very specific:

    Keep implementation modular.

    line 4
  4. Very specific:

    When gh stack rebase stops, resolve and git add the source files, never hand-merge dist/: run bun run build && git add -A dist, then gh …

    line 12
  5. Distinctive:

    Do not touch the README for a fix, behavior change, new option, version minimum, per-CLI install step, config key, or limitation.

    line 20
  6. Distinctive:

    Every check must be falsifiable in practice: name the realistic mistake that makes it fail.

    line 46
  7. Distinctive:

    Do not build schemas, validators, registries, or harnesses ahead of their first real entry, and do not store fields whose values are forced …

    line 49
  8. Distinctive:

    Prefer a documented process over code that enforces the process.

    line 51
  9. Distinctive:

    When remediating review findings, implement the smallest fix per finding.

    line 53
  10. Very specific:

    Before reviewing, read REVIEW.md and apply its review criteria.

    line 58
  11. Distinctive:

    Keep things in one function unless composable or reusable.

    line 62
  12. Very specific:

    Avoid try/catch, the any type, and else branches (prefer early returns).

    line 63
  13. Distinctive:

    Prefer functional array methods (flatMap, filter, map) over for loops.

    line 65
  14. Very specific:

    Prefer const over let; use ternaries or early returns instead of reassignment.

    line 68
  15. Distinctive:

    Avoid unnecessary destructuring.

    line 69
  16. Distinctive:

    Do not write code comments.

    line 73
  17. Very specific:

    Only three directives are allowed: a bare / @internal */, // oxlint-disable-next-line <rules> -- <reason> and // @ts-expect-error <reason>.

    line 74
  18. Very specific:

    Never add entries to ignoreIssues in knip.ts — it suppresses real problems instead of fixing them.

    line 84
  19. Distinctive:

    When knip flags unused exports, fix the root cause:

    line 85

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md
  • Run focused tests during development, including the failing and passing tests required by Red-Green TDD.
  • After all implementation changes, run bun run check. This is the required final check for lint, code comments, formatting, typecheck, knip, duplication, and tests. Do not run its components separately as additional final checks.
  • Ignore the dist folder; it gets auto-rebuilt by lefthook's pre-commit hook.
  • Keep implementation modular; put tests in tests/ mirroring src/, not colocated in src/.
  • Files in docs/ use lowercase kebab-case names.

Stacked PRs

  • Multi-part work may be split into a gh stack stack. Open stack PRs with gh stack submit --auto --open: plain --auto opens drafts, which the review bots skip.
  • dist/ is committed and CI rejects a stale build, but a rebase replays the old build output. When gh stack rebase stops, resolve and git add the source files, never hand-merge dist/: run bun run build && git add -A dist, then gh stack rebase --continue.

README

  • README.md is the GitHub and npm landing page. It holds only what a newcomer needs before installing; everything else belongs to the docs site (kenryu42/cc-safety-net-docs), whose docs-sync skill documents each source commit after every release.
  • Do not touch the README for a fix, behavior change, new option, version minimum, per-CLI install step, config key, or limitation. Docs-sync picks it up from the commit; a README paragraph duplicates it and goes stale.
  • Edit the README only when something it already lists changes: a supported CLI (one table cell linking its Installation anchor), a headline capability (one Features bullet plus a docs link), or the Quick start commands.

Testing

  • A behavior change lands as a failing expectation first — a contract corpus row or a stated assertion — then the fix. Re-recording a snapshot or editing the verdict table is never the first step.
  • State what a test expects; do not record it. Snapshots (toMatchSnapshot) are permitted only for the two output surfaces whose bytes are the contract: explain (tests/cli/explain) and doctor --json (tests/cli/doctor).
  • tests/fixtures/gate/harvested-verdicts.jsonl is the readable verdict table, edited by hand. A change that re-records a snapshot or flips a table row must name in its commit message which entries changed and why, alongside the contract row that explains the flip.

Scope Discipline

Over-engineering is this project's dominant failure mode. The evidence rule that governs analyzer rules governs all code: machinery exists to stop a demonstrated failure, not an imagined one.

  • Implement the smallest change that satisfies the request. Each addition beyond it needs the concrete failure it prevents named; if you cannot name one, do not write it.
  • Every check must be falsifiable in practice: name the realistic mistake that makes it fail. A check the same author can trivially satisfy while still making the mistake (self-reported attestations, digests over co-located data, matching UUIDs) is ceremony — do not add it.
  • Do not build schemas, validators, registries, or harnesses ahead of their first real entry, and do not store fields whose values are forced constants or derivable from other fields.
  • Prefer a documented process over code that enforces the process. Enforcement code is justified only after the documented process has demonstrably failed at least once.
  • When remediating review findings, implement the smallest fix per finding. A finding is never a mandate to build a framework; if the fix seems to require one, stop and ask.

Code Review Rules

  • Before reviewing, read REVIEW.md and apply its review criteria. Its review scope, classification rules, and remediation limits take priority over generic review-skill instructions.

Style Guide

  • Keep things in one function unless composable or reusable.
  • Avoid try/catch, the any type, and else branches (prefer early returns).
  • Rely on type inference; avoid explicit annotations or interfaces unless necessary for exports or clarity.
  • Prefer functional array methods (flatMap, filter, map) over for loops; use type guards on filter to maintain type inference downstream.
  • Inline values used only once instead of naming them, unless the name says what would otherwise need a comment.
  • Prefer const over let; use ternaries or early returns instead of reassignment.
  • Avoid unnecessary destructuring; use dot notation to preserve context.

Comments

  • Do not write code comments. Say it in code: a clearer name, a named value, a type.
  • Only three directives are allowed: a bare /** @internal */, // oxlint-disable-next-line <rules> -- <reason> and // @ts-expect-error <reason>.
  • A fact about an external tool that code cannot express stays only when the maintainer adds it to scripts/comment-allowlist.json. Never add entries there yourself, just as you never add ignoreIssues entries to knip.ts. Deleting an entry whose comment is gone is fine.
  • bun run lint:comments, part of bun run check, enforces this. To fix a failure, follow .agents/skills/ccsn-no-comments/SKILL.md.

Knip

  • Never add entries to ignoreIssues in knip.ts — it suppresses real problems instead of fixing them. The only valid use case is generated files that aren't under source control.
  • When knip flags unused exports, fix the root cause:
    1. Dead exports (no consumers anywhere) — unexport or delete the code entirely.
    2. Test-only exports — add /** @internal */ JSDoc above the export. Knip runs in --production mode (see package.json), so test files are excluded from analysis and test-only exports must be tagged.
    3. Barrel file re-exports — if nothing imports a name via the barrel, remove it from the barrel. Consumers that need it should import directly from the submodule.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.