frontier
Skill1 starsChanged 56 days agoMITView on GitHub
1-shot build discipline for AI coding in any repo. Use when starting a task, setting up AGENTS.md/CLAUDE.md, running multi-agent work, or when agent repeats mistakes. Karpathy behavior + Cherny loop + ponytail minimal-diff ladder + caveman-lite output + CodeGraph nav + relevance compaction + file-based multi-agent leases. Setup: python scripts/frontier.py init
3 other projects use a version of this.
Adopted by
Most recently taken up by
- AI-ModCon/genesis-skillstheir own version, first seen Sep 24, 2026
- apoorvjain25/frontiertheir own version, first seen Jul 3, 2026
- yiyaw-lab/agent-armortheir own version, first seen Jun 22, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- apoorvjain25/frontier★ 80same name
- AI-ModCon/genesis-skills★ 30same name
- yiyaw-lab/agent-armor★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository2 other files it gives its agents.
- references/CLAUDE.mdCLAUDE.md
- codegraphSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Never simplify away: trust-boundary validation, data-loss error handling, security, a11y basics, anything explicitly requested.
- Distinctive: line 25
Verify before done: run real commands, record exit codes + SHA.
- Very specific: line 32
No filler (just/really/basically), no pleasantries, no tool-call narration.
- Very specific: line 41
Only non-inferable content: custom tooling, weird builds, project gotchas.
- Very specific: line 51
Never memorize secrets/tokens/customer data.
- Very specific: line 81
Prefer over grep for cross-file work: codegraph explore "<symbol or question>" > .codegraph/ctx.md, read that file.
- Distinctive: line 126
Commit, amend, push, force-push, PR only when explicitly requested by the human.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill 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.
Files
Frontier build discipline v3
1. Behavior (always on)
- Think before coding. State assumptions, surface tradeoffs, push back when warranted.
- Simplicity first: climb the ladder in
references/ladder.md, stop at first rung that holds. Nothing speculative. - Surgical changes. Touch only what you must. Clean up only your own mess.
- Goal-driven. Define success criteria. Loop until verified.
- Never simplify away: trust-boundary validation, data-loss error handling, security, a11y basics, anything explicitly requested.
2. Loop (every task >30min)
- Plan first in
docs/TASKS/<ID>.md(copyreferences/TASK.md). Check in before coding. Read-down first:references/seek.mdorder (router -> task -> symbols -> entry/test -> target + all callers). - One slice, one branch, one PR. No dependent work before contracts merge.
- Verify before done: run real commands, record exit codes + SHA. Mocks != integration.
- On correction: append
symptom -> cause -> fixtodocs/LEARNINGS.md(max 5 lines). Never hide failed runs. - End with
STATE / CHANGED / PROOF / NEXT / RISKS(handoffgenerates the skeleton). No chat-history reliance.
3. Output (caveman-lite, always on)
- Code first. Then ≤3 short lines: what was skipped, when to add it.
- No filler (
just/really/basically), no pleasantries, no tool-call narration. Fragments OK. - Code symbols, paths, error strings verbatim. Never abbreviate those.
- Drop terseness for: security warnings, destructive-action confirms, ambiguous-order sequences. Resume after.
- Full stop on
stop frontier/normal mode. Seereferences/output.md.
4. Context budget
- Router
AGENTS.md<60 lines. Root instructions 100-150 sweet spot, hard stop 200 (past 300 gains reverse). - Commands first with exact flags. Numbered workflows. 3-10 line real examples pointing at good files, not prose.
- Only non-inferable content: custom tooling, weird builds, project gotchas. Never: full tree, generic advice,
/initdumps. - Boundaries three-tier: Always / Ask first / Never (top item: secrets/prod/customer data without approval). Every boundary pairs with a do.
- Nesting: shared rules root, package rules in subdir
AGENTS.md. Closest wins. Link, don't duplicate. Detail inreferences/, loaded on demand. /clearbetween unrelated tasks. Context rots ~30min — re-read router after reset.- Skeptical review: one builder, one fresh reviewer. Reviewer challenges, never rubber-stamps.
5. Memory (progressive disclosure)
- Tier 0 (default):
docs/LEARNINGS.md+memory/YYYY-MM-DD.md. Session start reads router + task file + compacted log only. Session end appends decisions. - Tier 1 (if installed): claude-mem / agentmemory.
recallbefore plan,remember/lessonafter correction,handoffat slice end. - Never memorize secrets/tokens/customer data.
<private>-tag it out. - Gotcha seen twice ->
Known constraintsin CONTEXT.md. Weekly: consolidate dupes, delete stale.
6. Scaffold (1-shot)
python scripts/frontier.py init [target_dir] # win/mac/linux, stdlib onlyCreates: AGENTS.md, CLAUDE.md, docs/{GOALS,CONTEXT,TASKS/_TEMPLATE,LEARNINGS}.md,
.agents/{protocol/LEASE.md,skills/{registry.json,codegraph/SKILL.md}},
memory/, .codegraph/, .gitignore entries. Never overwrites. See references/INSTALL.md.
7. Validate (read-only CI gate)
python scripts/frontier.py validate [docs/TASKS]Checks: frontmatter (id/status/PROOF), AGENTS.md ≤200 lines, secret scan,
expired-lease warnings. Gate: status=ready without fresh exit-0 evidence on
current SHA fails. Warnings: stale evidence, files outside every lease scope.
Exit 1 on fail. No side effects.
8. Auto-skills
.agents/skills/registry.json maps task keywords → skill names. At task start, agent loads every skill whose trigger matches the task text (see references/INSTALL.md). Trigger descriptions must be precise so auto-invoke fires.
9. CodeGraph nav
Prefer over grep for cross-file work: codegraph explore "<symbol or question>" > .codegraph/ctx.md, read that file. Per-repo index (codegraph init), incremental refresh. Skill wrapper: .agents/skills/codegraph/SKILL.md.
10. Compaction (no recency bias)
python scripts/frontier.py compact <in.md> <out.md> <task-file>Scores blocks by keyword overlap with task's symbol:/component:/module:/file: keys (case-insensitive). Ties keep file order via stable sort — never newest-first. Caps at 300 lines.
11. Multi-agent leases
python scripts/frontier.py lease acquire TASK AGENT SCOPE... # fail on scope overlap
python scripts/frontier.py lease heartbeat TASK AGENT # every ~30s, bg
python scripts/frontier.py lease signal TASK FROM TO TYPE MSG # async handoff
python scripts/frontier.py lease escalate TASK AGENT REASON # stuck -> escalate up
python scripts/frontier.py lease noop TASK AGENT # stopping-rule ping
python scripts/frontier.py lease lock|unlock TASK AGENT # shared-file mutex
python scripts/frontier.py lease release TASK AGENT # broadcasts done
python scripts/frontier.py lease status TASK | list # discoveryLeases are per-agent (.agents/leases/<task>.<agent>.json, 5-min TTL). Same task + disjoint scopes run in parallel; overlapping scopes block. Release auto-writes a done broadcast so polling peers stop (stopping rule). Full protocol: .agents/protocol/LEASE.md.
12. Toolbelt (single file, stdlib only)
python scripts/frontier.py suggest <task text...> # which skills to load
python scripts/frontier.py recall <words...> # past learnings, before plan
python scripts/frontier.py ctx <symbol...> # codegraph, SKIP if absent
python scripts/frontier.py handoff <task-file> # handoff skeleton + git SHA
python scripts/frontier.py drift <task> <agent> # scope changed? exit 1 = re-read
python scripts/frontier.py evidence <task> -- <cmd> # bind exit code to git SHA
python scripts/frontier.py review # diff-risk checklist
python scripts/frontier.py resume <agent> # leases + signals + broadcasts
python scripts/frontier.py doctor # machine check
python scripts/frontier.py selftest # 24-check end-to-end proof
python scripts/frontier.py bench # measured numbers (compact/recall/lease/drift)
python scripts/frontier.py lease acquire T A S... --force --ttl N # forced coexistence13. Git guardrails (never violate for any AI)
- Inspect
git status+git diffbefore commit/push; stage only intended files. Never commit secrets. - Commit, amend, push, force-push, PR only when explicitly requested by the human. Post-push force-push is off.
- Hooks that reject a commit: fix and make a NEW commit, never amend the failed one.
- One slice, one branch, one PR. No dependents before contracts merge. No self-merge.
14. Deferred tools (defer, never absorb)
Frontier is a discipline spine, not a tool host. It sets up its own files and delegates the rest:
| Capability | Tool (external) | Frontier hook |
| Tier-1 memory | claude-mem / agentmemory | recall = tier-0 only (5% coop), stays compatible |
| Semantic nav | codegraph | ctx runs it, SKIPs if absent |
| Orchestration | Task / Bureau / STORM | leases are the lock protocol underneath |
| Security scan | gitleaks / trivy | validate checks a few secret patterns only |
| Test engines | pytest / vitest / cargo | evidence consumes their exit code + SHA |
DM those tools directly; Frontier only reads their signals and stays out of their job.
Anti-patterns
Bible AGENTS.md, diary CLAUDE.md, task without verifiable criteria, mock claimed as integration, giant PR, self-merge, force-push after push, prompt pollution in router, manual skill loading, grep for cross-file nav, recency-biased context, single lease file per task, validator with side effects, prose longer than the code.
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
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.

