Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Founder Defaults?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/avanturer-founder-defaults)
---
name: founder-defaults
description: "This repository's standing engineering defaults — style, structure, testing, security, dependencies. Use at the start of any implementation task."
metadata:
reviewed: "2026-12-02"
---
# Standing defaults
Every choice below is already made. Making it again per task is how a codebase ends up
with three date libraries and four error-handling styles, none of which is wrong on its
own. Deviate when the task genuinely requires it, and say why in the code.
Anything a gate already enforces is marked **[enforced]** — those are not advice, and
arguing with them costs a blocked turn. **[advisory]** marks a step that is part of the way of
working and that nothing refuses: skipping it costs quality, not a blocked turn. Unmarked lines
are advice too.
## Language and style
- **Formatter, never hand-formatting.** Prettier for JS/TS, Black or Ruff-format for
Python, gofmt, rustfmt. Run it; do not discuss it.
- **Types at every boundary.** Function signatures, exported values, API payloads. Not
`any`, not `dict`, not untyped JSON crossing a module edge. **[enforced for
docstrings]**
- **Errors are values or exceptions, consistently, never both in one layer.** Pick per
language: exceptions in Python, `Result`/tagged unions in Rust and TS where the
codebase already does, `error` returns in Go.
- **No swallowed exceptions.** **[enforced, permanent budget zero]** Catch what you can
act on; let the rest travel.
- **Names say what, not how.** `charge_in_minor_units`, not `process_data_v2`.
- **A file is one idea.** When you cannot name it in three words it is two files.
## Comments and docstrings **[enforced]**
Full rules in the `llm-first-code` skill. The short version: a comment carries what the
code cannot — why this and not the obvious alternative, what breaks if it changes, which
measurement drove it. `Args:` / `Returns:` / `:param:` are banned; the types say it.
## Structure
- **Feature-first, not layer-first.** `billing/` containing its routes, logic and tests
beats `controllers/ services/ models/` split three ways across the tree.
- **Depend inward.** Domain logic imports nothing from the framework. A test for it
needs no server, no database and no network.
- **One place to read configuration**, at startup, typed and validated. Never
`process.env.X` scattered through the code.
- **Migrations are additive.** Expand, backfill, contract — never a destructive change in
one step. **[enforced past prototype]**
## Testing
- **Test the behaviour a user notices**, not the shape of the implementation. A test that
breaks on a rename is a maintenance cost with no coverage.
- **Every bug gets a failing test first.** **[advisory]** It is the only way to know the fix
works and the only way it stays fixed. Nothing refuses a source write with no test yet; what
holds a test once written is `claude-bp freeze` and the merge's review of any change to it.
- **No test asserting a mock was called.** That asserts the code you just wrote calls the
code you just wrote.
- **Skipped tests are not passing tests.** **[enforced]** A suite that executes nothing
is refused at Stop.
- **The suite runs in under two minutes**, or it will not be run.
## Security
- **Secrets come from the environment.** **[enforced before the write]** Never a literal,
never a fallback default, never in a comment.
- **Every external input is untrusted**, including your own API's responses, webhook
payloads and anything an error tracker reports.
- **Parameterised queries only.** String-built SQL is refused on sight.
- **Deny by default in auth.** A missing rule means no access, not full access.
## Dependencies
- **A new dependency needs a comparison on record.** **[enforced]** The stdlib option is
always one of the alternatives, and it wins more often than it is chosen.
- **No dependency for something under twenty lines** you could own, test and understand.
- **Pin exact versions in applications**, ranges in libraries.
- **Prefer the boring one.** The library with five years of history and no releases this
month is a feature, not a warning.
## Performance
- **Measure before optimising, and record the number.** An optimisation with no
before-and-after is a guess with extra steps.
- **The three that actually matter:** an N+1 query, an unbounded result set, and work
inside a loop that belongs outside it. Everything else is noise until measured.
- **No cache without an invalidation story** written down.
## Git **[mostly enforced]**
Worktree per session, never the trunk, no conflict markers — all enforced. The parts that
are not: conventional commit messages, keep a commit to one logical change, and write the
body when the subject cannot carry the reason.
A push and `gh pr create` are awaited in the script that runs them **[advisory]**: chained in a
`.then` after the script ended, the pull request step never ran.
## Delegating to a subagent **[partly enforced]**
Enforced: at merge, a diff past ~100 lines of logic, on a risky path, or changing a test the
trunk had, a frozen test or a runner's section needs an
`independent-reviewer` started on it as it stands, and its blocking verdict holds the merge
until a clean one, new code, or the founder's `+merge`. Advisory, and refused nowhere: the planner before code. A first write to a risky
path in a tree with no tests frozen is told so once.
- **Who writes what** **[advisory]**: work on the same card goes on in the agent that did it,
through `SendMessage`; a different card gets a new agent, however related. Review is the
exception below (decision 0169). Whatever goes into a branch's commit is written by
that branch's `implementer`, even three lines; you write only what no commit carries (scratchpad,
cards). The first review is a fresh `independent-reviewer`; after a fix a new one reads only what
changed, its brief handing it the earlier findings; the same one gets only a question about the
verdict it just gave (decision 0169). A finding blocks only with a concrete failure scenario:
these inputs or this action lead to a wrong result, a crash, a leak or lost data. Briefs to
subagents and their reports are written in English; the main session answers the founder in the
founder's language.
- **A review loop stops at the first clean verdict** **[advisory]**: a VERDICT with 0 blocking
ends it, and its worth-fixing findings go into a card for the next release, not into another
round.
- **Pull requests in order** **[advisory]**: a pull request merges into main before work that
depends on it starts; where it cannot before the founder's word, the dependent cards go on one
release branch with one pull request, not a stack. A final reviewer is for a release branch
alone: it reads the files two or more cards changed, and each round is a new one. It merges with
`gh pr merge --merge` where the repository allows merge commits, squash only where it does not:
a squash leaves the agents' commits unreachable from main, and Claude Code then keeps every
agent's worktree and branch. Where the trunk requires linear history, `--squash`.
- **Search the code yourself, through LSP and Code Mode**: no agent for a lookup.
**[advisory]**: nothing counts whether a session used LSP or grep.
- **Claude Code's docs for its newest release** **[advisory]**: before relying on Claude Code
docs or settings, check the newest released version (`npm view @anthropic-ai/claude-code
version` or the changelog) and read the docs for that version, not for the installed one.
- **The roles pin their model and effort; call them with neither** **[advisory]**. The planner and
the implementer run in a worktree of their own by their definition; never pass them `cwd`, which
conflicts with it:
- `bestpractice:planner` (Opus, xhigh) **[advisory]** runs first on a card that is a bug
whose cause the card does not name, or that touches a path the merge gate counts as risky
(auth, routes, migrations, payments, SQL, env; auth, routes and payments by any word of the
path, such as `session`, `url`, `billing`): the spec from the founder's words, the
criteria, the failing acceptance tests; for a bug with no known cause, the cause and the
test that reproduces it. It commits its tests on its branch: merge that branch into your tree
as soon as it reports, before the review of its tests and the implementer, whose tree is cut
from yours.
- `bestpractice:independent-reviewer` (Opus, high) — the planner's tests against the
criteria before any code; then the change against the spec, never shown the
implementer's report; on a risky path a second pass with the security and data lens. Merge
the implementer's branch into your tree before sending one on the change: it reviews that
tree's diff. Its verdict names the diff id, never a commit sha: `claude-bp diff-id` prints it.
- `bestpractice:implementer` (Opus, high) — the code those frozen tests ask for, checked by
the suites its files reach; the full check is yours, once, when you integrate: merge its
branch into the branch your tree has checked out, `claude-bp-ci run` there, and push that.
Its pass is on record, so the push runs the check no more; a run by hand (`make ci`, `make
check` in the shell) is not on record, and the push runs it again. On a card with no
planner, the implementer writes the failing test first, then the code. Split by module so
none passes about 250k of context; backend and mobile are two implementers and an
integration card with its own e2e test.
- `bestpractice:web-researcher` (Sonnet, high) — anything only the web answers: a question,
a fact-check of many claims, products compared by their pages. Never `general-purpose` for
that: it starts at about four times the context, every tool loaded. It has no shell: other
repositories' code is read by a `general-purpose` agent with `gh`.
- **Solo when the founder says so** ("сам", "без агентов"): the planner's and implementer's
steps are yours, the failing test still first. The merge check still asks for the
independent reviewer on a large or risky diff: an author misses their own mistakes.
- **Explore and general-purpose run on Sonnet when the call names no model** **[enforced]**:
the hooks module sets it, under any chat model. A built-in that can write gets `opus` on the call; nothing
that only reads runs at `max`.
- **A fan-out needs a reason beyond speed.** Each agent pays for its own context of this
repository before it reads a line of the answer, and three searching the same tree
return the same answer three times: one agent per stream of work. Nothing counts them
(decision 0145); every agent is told so when it starts.
- **One agent searches GitHub, one `gh search` at a time** **[advisory]**: through `Promise.all`,
~40 calls hit HTTP 403 (GitHub allows 30 searches a minute, 10 of code). Clone a repository
shallow and read it on disk rather than search it call by call.
- **An agent that runs the app gets `isolation: "worktree"`** **[advisory]**: one told to run
`make demo` left its files in the founder's tree.
- **Say what nobody read** **[advisory]**: a summary of a fan-out names the sources no agent
opened, and says "read everything" only where each was read.
- **Delegate a QUESTION, not a chapter.** An agent that comes back with a conclusion has
earned its context. One that comes back with the files it read has spent it.
## Speaking to the founder
- **Criteria in Russian, as what they will see** («в письме приходит код из шести цифр»); a pull
request body carries those criteria, never the chat. A dialog asks three questions at most,
the default option first, marked "(Recommended)" **[count enforced]**.
- **A prompt that says no questions** **[advisory]**: decide where you would ask, and report
what you decided; a question in plain text is still a question.
- **Try the merge before asking for it** **[advisory]**: its refusal lists every blocker the
gate holds, so the founder is asked once, with all of them.
## When a gate here blocks you **[enforced]**
A refusal from this plugin is yours to resolve, and the founder is not the next step.
1. **Decide which it is.** Either the gate is right — in which case what it asked for is
still owed — or it is wrong about this case. You have the refusal, the call and the
repository; nobody else is better placed to tell.
2. **If it is right, do what it names.** The refusal says what would satisfy it.
3. **If it is wrong, file it and carry on**, the words on stdin where the shell expands nothing:
```bash
claude-bp-report defect <<'EOF'
<what it refused or did, and why that is wrong>
EOF
```
It costs the turn nothing and sends nothing without `claude-bp-report send`. Then take the
shortest correct route to the same work.
Reporting a gate to the founder is not a finish. The exceptions are the refusals that genuinely
wait on a person — an unapproved merge, a production deploy, a switch that is theirs to
set. Those say so, and stopping is the right answer to them.
## When these conflict with the task
The task wins, and you say so in the code: one comment naming the default and why this
case is different. Silent deviation is the thing this file exists to prevent — the next
session cannot tell a considered exception from an accident.