agentleFS
shahmanagershahmanager/frontier/SKILL.md

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

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. apoorvjain25/frontier★ 80same name
    2. AI-ModCon/genesis-skills★ 30same name
    3. 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.

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
  1. Distinctive:

    Never simplify away: trust-boundary validation, data-loss error handling, security, a11y basics, anything explicitly requested.

    line 19
  2. Distinctive:

    Verify before done: run real commands, record exit codes + SHA.

    line 25
  3. Very specific:

    No filler (just/really/basically), no pleasantries, no tool-call narration.

    line 32
  4. Very specific:

    Only non-inferable content: custom tooling, weird builds, project gotchas.

    line 41
  5. Very specific:

    Never memorize secrets/tokens/customer data.

    line 51
  6. Very specific:

    Prefer over grep for cross-file work: codegraph explore "<symbol or question>" > .codegraph/ctx.md, read that file.

    line 81
  7. Distinctive:

    Commit, amend, push, force-push, PR only when explicitly requested by the human.

    line 126

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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)

  1. Plan first in docs/TASKS/<ID>.md (copy references/TASK.md). Check in before coding. Read-down first: references/seek.md order (router -> task -> symbols -> entry/test -> target + all callers).
  2. One slice, one branch, one PR. No dependent work before contracts merge.
  3. Verify before done: run real commands, record exit codes + SHA. Mocks != integration.
  4. On correction: append symptom -> cause -> fix to docs/LEARNINGS.md (max 5 lines). Never hide failed runs.
  5. End with STATE / CHANGED / PROOF / NEXT / RISKS (handoff generates 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. See references/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, /init dumps.
  • 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 in references/, loaded on demand.
  • /clear between 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. recall before plan, remember/lesson after correction, handoff at slice end.
  • Never memorize secrets/tokens/customer data. <private>-tag it out.
  • Gotcha seen twice -> Known constraints in CONTEXT.md. Weekly: consolidate dupes, delete stale.

6. Scaffold (1-shot)

python scripts/frontier.py init [target_dir]   # win/mac/linux, stdlib only

Creates: 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            # discovery

Leases 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 coexistence

13. Git guardrails (never violate for any AI)

  • Inspect git status + git diff before 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:

CapabilityTool (external)Frontier hook
Tier-1 memoryclaude-mem / agentmemoryrecall = tier-0 only (5% coop), stays compatible
Semantic navcodegraphctx runs it, SKIPs if absent
OrchestrationTask / Bureau / STORMleases are the lock protocol underneath
Security scangitleaks / trivyvalidate checks a few secret patterns only
Test enginespytest / vitest / cargoevidence 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.

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.