Skills & guardrails for AI coding agents

Every engineer ships at your team’s bar.

AI made code cheap to write — and review the bottleneck. Precedent turns your team’s review corrections into standing rules for Claude Code and Codex, loaded into every session — junior or staff, human or agent. The same mistake never ships twice.

First patterns the same dayThe team’s judgment, everyone’s baselineReviews catch design, not repeats
review comments · payments-apiseen 0×
PR #142 · @maya6 weeks ago
Use the shared retryWithBackoff helper — don’t hand-roll the retry loop.
PR #163 · @maya3 weeks ago
Same note as last time: this bypasses retryWithBackoff again.
PR #189 · @dev4 days ago
Hand-rolled backoff. Third time. Can we make the agents stop doing this?
Precedent set
.claude/skills/cause-hand-rolled-backoff/SKILL.md

Outbound calls always use retryWithBackoff. Every agent now knows.

skill3 incidents · 3 PRsclaude + codex

the loop your team already lives — ended

Claude Code + CodexGitHub + BitbucketSKILL.md + hooks + MCPStarts from history you already have

The problem

AI made code cheap.
Review got expensive.

Output scaled; verification didn’t. Review is now the rate limiter — your best engineers re-correcting the same classes of mistake, PR after PR, while the corrections themselves evaporate.

Review became the bottleneck

merge pathagent PRs▸▸▸▸▸review · queue 5merged

On teams with heavy AI adoption, time in PR review is up 91–441% (Faros telemetry, 22,000 devs). An AI review bot catches the mistake again tomorrow — the fix is upstream, before the code is written.

The same comment on the fourth PR

same fixPR #97#118#131#142 · ×4

Missing org_id scope. Hand-rolled retries. Swallowed errors. Different author, same fix — because the correction never made it back into the agents.

“Almost right, but not quite”

the PRcompiles ✓tests pass ✓looks professional ✓wrong retry semantics

Engineers’ #1 frustration with AI code — 66% in Stack Overflow’s 2025 survey. Near-miss code is the hardest kind to review: everything looks thorough, so the bugs hide.

If it’s not in context, it doesn’t exist

context windowsystem promptCLAUDE.md · 142d staleAGENTS.md · staleteam rules · missing

An agent knows exactly what’s in its window: CLAUDE.md, AGENTS.md, and the prompt. The hand-written docs it does load drifted the day they merged — so every correction stays a comment instead of becoming a rule.

receipts: Faros telemetry ’26 · Stack Overflow ’25 · Baltes et al., arXiv 2603.27249 · DORA ’25

after precedent
same fix · 4 PRsships once — becomes a rule
CLAUDE.md · 142d staleregenerated from history
“almost right, but not quite”right the first time
review re-explains basicsreview guards the design

The layer

Every correction compounds.

Corrections flow in once. Consistency flows out — to every session, every agent, every PR. No step depends on anyone remembering anything.

Corrections happen here

PR review threadswebhooks · comments · diffs
Fix-after-merge commitshotfixes · reverts · follow-ups
Agent session logs~/.claude/projects · ~/.codex/sessions
§Precedent
cluster recurring fixes → patterns
attach receipts — incidents × distinct PRs
draft SKILL.md · guardrail · hook
your team approves ✓

Rules execute here

.claude/skills/ + AGENTS.mdloaded at session start — both agents
PreToolUse hooksblocked before it’s ever written
MCPintent lookups before an agent edits
The Briefsticky comment on every PR

every new session and PR feeds the next pattern

Rules are code

Skills land in .claude/ — versioned, reviewed, owned by you. No hidden config in our cloud.

Receipts on every claim

Each pattern cites the exact PRs and comments behind it. No vibes, no industry benchmarks.

Approval before enforcement

Nothing becomes a rule until your team adopts it. Quiet signals keep accumulating evidence.

Aggregate-only

Patterns describe the codebase, never individual engineers. There is no per-developer view.

How it works

Teach once. Enforced everywhere.

01

Connect

A CLI watcher reads Claude Code and Codex sessions; a GitHub App reads PRs, commits, and review comments. Nothing about your workflow changes.

$ precedent setup

watcher · claude code + codex sessions

github app · PRs, commits, review threads

02

Mine

Repeated fixes cluster into patterns with receipts — the exact PRs and comments behind each one. Your team approves what becomes a rule.

pattern surfaced · payments-api

§ hand-rolled retry loops

6 incidents · 5 PRs → drafted for approval

03

Enforce

Approved rules land as SKILL.md, AGENTS.md, and PreToolUse hooks, loaded every session; reviewers get a Brief on each PR. The fourth repeat never ships.

$ codex "refactor the payment client"

· AGENTS.md loaded — 12 team rules

written under standing rules

Product

Loaded in every session. Grounded in every PR.

The result: sessions that already know

Skills load at session start. The agent applies your rules while writing the code — not your reviewer, after.

claude code · feature/stripe-webhooks

$ claude "add the Stripe webhook handler"

· loading .claude/skills — 12 skills

§cause-unvalidated-webhook → verify signature before parsing the body

§cause-hand-rolled-backoff → retryWithBackoff for outbound calls

✚ src/webhooks/stripe.ts — written under 2 standing rules

What recurs, with receipts

Patterns ranked by incidents × spread. Click through to every comment and commit behind a claim.

patterns · all repos
Unscoped tenant queriesrecurring cause
14 incidents · 9 PRs
Hand-rolled retry loopsrecurring cause
6 incidents · 5 PRs
Follow-up fixes in payments/webhookscost hotspot
5 incidents · 4 PRs
Error-swallowing catch blocksreview theme
4 incidents · 4 PRs

The Brief, on every PR

Intent, decisions, and cautions from the sessions behind the change — so reviewers stop re-inferring them.

§precedentBOT
Intent
Verify webhook signatures before body parsing, so failures reject fast.
Decisions
Shared verifySignature util; raw-body scoped to /webhooks/*.
Rejected
Per-route inline verification — duplicated the secret lookup.
Caution
This path was fixed after merge 3× in 60 days. Watch replay protection.

Pricing

Per repo. Not per seat.

Agents broke the seat math. You pay for repos where Precedent is holding the line — developers, agents, and PRs unlimited.

Design partner

$0 while we prove it on your repos
  • Patterns from your existing history in week one
  • Direct line to the founding team
  • You keep every adopted rule, regardless
Request a pilot

Per active repo

flat / repo / month indicative — pilots are shaping it
  • Unlimited developers, agents, and PRs
  • Org-wide patterns and adoption queue
  • The Brief on every analyzed PR
Talk pricing

Quiet repos don’t bill. Archive a repo, stop paying for it.

Set precedent.

Connect a repo. Precedent mines the history you already have — and from the next session, everyone ships at the same bar. Yours.

Request a pilot