agentleFS
lightarktechlightarktech/founder-coding-skills/skills/mainline/SKILL.md

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

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
  1. Very specific:

    Create MISSION.md in the repo root (one per session, git-ignored — it is a working file, not a deliverable).

    line 14
  2. Distinctive:

    Do not hand the founder a form: When their first instruction arrives, draft the whole charter yourself from that message plus the state of …

    line 16
  3. Distinctive:

    When you can't tell, park it.

    line 44
  4. Distinctive:

    Name the gap: If the criteria are not all met, say so plainly.

    line 53

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

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:

FieldRule
# 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 scopePaths you may edit, one per line. A scope of ** never fires — that is the same as not installing it
## Red linesStop 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?

SituationDo
It is the mainlineJust do it
No — blocked without itDo it, then log one line in ## Detour ledger: what you did | why the mainline was blocked | how you get back
Yes — merely noticed itStop now. One line in ## Parking lot, handed back at close. Do not open a second front
It touches a red lineStop 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

  1. Settle detours. Tick - [x] what's done; move the rest to the parking lot.
  2. Check criteria one by one. Paste command output. Saying "all green" is not evidence (bad-news-first).
  3. Hand back the parking lot, each item with a suggested destination: new session / write it down / drop it.
  4. 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.md is 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).

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.