mainline
Skill1 starsChanged 4 months agoMITView on GitHub
Pin what this session is for in a file, account for every detour, and balance the ledger before closing. Use when opening a session, picking up a handoff, noticing a problem outside the current job, or being asked "what are we actually doing".
1 other project uses a version of this.
Adopted by
Most recently taken up by
- mainline-org/mainlinetheir own version, first seen Apr 29, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- mainline-org/mainline★ 202same 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 repository14 other files it gives its agents.
- bad-news-firstSkill
- bug-autopsySkill
- context-hygieneSkill
- decision-wiringSkill
- dispatch-economicsSkill
- grill-founderSkill
- handoff-contractSkill
- loop-contractSkill
- model-tieringSkill
- red-light-firstSkill
- rules-as-mechanismSkill
- surgical-changesSkill
- two-axis-reviewSkill
- vertical-ticketsSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is 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.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
Create MISSION.md in the repo root (one per session, git-ignored — it is a working file, not a deliverable).
- Distinctive: line 16
Do not hand the founder a form: When their first instruction arrives, draft the whole charter yourself from that message plus the state of …
- Distinctive: line 44
When you can't tell, park it.
- Distinctive: line 53
Name the gap: If the criteria are not all met, say so plainly.
≈ “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
The mainline of a session normally lives in exactly one place: the first message. Then context gets compacted, that message becomes a summary of a summary, and the session keeps working — confidently, competently — on something else. Nobody notices, because the AI never says "I have changed subject" and the founder is watching output, not direction.
So the mainline moves out of the conversation and into a file the harness restates every turn.
First principle: account, don't intercept. Detours are allowed by default. A gate that blocks teaches the model to satisfy the gate instead of doing the job, and it cannot win anyway — block Write and it uses a shell heredoc, block one tool and it picks another. What actually hurts is not the turn; it's the turn nobody wrote down and nobody came back from.
Opening a session — pin the charter first
Create MISSION.md in the repo root (one per session, git-ignored — it is a working file, not a deliverable). Template: templates/MISSION.template.md.
Do not hand the founder a form. When their first instruction arrives, draft the whole charter yourself from that message plus the state of the repo, then put only the one-line mainline in front of them, phrased so one word answers it:
Mainline:
<one line>. Reply OK, or tell me in one sentence what you want instead.
Where you genuinely cannot tell, write - [ ] NEEDS FOUNDER: <the specific missing thing> — never invent it, never send back a list of questions.
Four required fields. Each heading is matched by keyword and accepts either its English or its Chinese form (# Mainline: / # 主线:, ## Done when / ## 完成判据, ## In scope / ## 范围内, ## Detour ledger / ## 岔道台账), so a charter can be written entirely in either language against the same installed gates:
| Field | Rule |
# Mainline: | One line, this exact heading — the gate reads it |
## Done when | - [ ] items, each observable. "Done"/"production ready" are banned; "suite passes, output pasted" is a criterion |
## In scope | Paths you may edit, one per line. A scope of ** never fires — that is the same as not installing it |
## Red lines | Stop and ask. Default-allow does not apply here |
Two more headings appear in the template. ## Detour ledger is parsed by the gates — they count what is still open in it. ## Red lines and ## Parking lot are for you and the founder to read; nothing parses them.
Mid-session — three states, decided in one question
Can the mainline still move today without this?
| Situation | Do |
| It is the mainline | Just do it |
| No — blocked without it | Do it, then log one line in ## Detour ledger: what you did | why the mainline was blocked | how you get back |
| Yes — merely noticed it | Stop now. One line in ## Parking lot, handed back at close. Do not open a second front |
| It touches a red line | Stop and ask the founder, regardless of the above |
When you can't tell, park it. Default to not widening.
Reading drifts too, not just writing. Repo-wide greps and whole documents read end-to-end import another area into context, and the model then takes it over — send wide reconnaissance to a dispatched agent and keep only its conclusion (dispatch-economics).
Closing — balance the ledger, in this order
- Settle detours. Tick
- [x]what's done; move the rest to the parking lot. - Check criteria one by one. Paste command output. Saying "all green" is not evidence (
bad-news-first). - Hand back the parking lot, each item with a suggested destination: new session / write it down / drop it.
- Name the gap. If the criteria are not all met, say so plainly. Detour results are never presented as the mainline delivery.
Failure modes we actually hit
- Mainline only in the first message — the whole reason this skill exists. It must be a file.
- Vague criteria — "make it work" can never be checked, so the charter silently stops meaning anything.
- Detours logged, never ticked — the ledger never balances and the anchor nags forever. That is intentional.
- Scope written too wide — the gate goes silent while still looking installed. List only what you truly intend to edit.
- A per-session instructions file is not a charter — that is read once at startup.
MISSION.mdis restated every turn. If the two disagree, fix it on the spot and tell the founder.
Hardware for all of the above — three gates, plus the parser and its regression suite — is in hooks/. This skill is the practice; those are the enforcement (rules-as-mechanism).
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.

