agentleFS
Arthuro0103Arthuro0103/cogiforge/.claude/skills/cf-extract-routine/SKILL.md

cf-extract-routine

Skill10 starsChanged 7 days agoMITView on GitHub

Pulls a real routine out of the user's head by interview and writes it so someone else can run it - result, trigger, inputs, steps, decisions, exceptions, proof of done. One question at a time; unknowns are [CONFIRM]; never invents a step. Output vault/projects/<name>/routines/. TRIGGERS - "document this process", "how do I hand this over". Do NOT trigger to run the routine, choose ways of working, or record one-off events.

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 8 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Real order, not ideal order: Ask "what do you do first, the last time you did it?", not "what are the steps?".

    line 23
  2. Distinctive:

    Their words stay: If a step was said in a particular way, keep the phrase.

    line 26
  3. Distinctive:

    Read the page back: before saving: show it, ask "can I save it like this?", save only after the yes.

    line 28
  4. Very specific:

    Start with the expected result and the trigger.

    line 46
  5. Distinctive:

    If the routine already has a file, this is a review: read it, say what state it is in, and ask what changed.

    line 58
  6. Distinctive:

    If the project does not exist, ask which project root it belongs to.

    line 59
  7. Very specific:

    Only when no [CONFIRM] blocks a step from being run in order, or when each remaining one is labelled as non-blocking.

    line 73
  8. Distinctive:

    without asking the owner and without guessing: Use the pair QA checklist at the end of the template.

    line 79
  9. Distinctive:

    Only after it passes, record who and when in the page, and only then change the status.

    line 80
  10. Distinctive:

    Ask several questions in one message, or rephrase a question the user already answered shortly.

    line 99

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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

cf-extract-routine: get the routine out of one head and onto one page

Why it exists

Most routines live only in the head of the person who does them. They work until that person is away, tired or gone, and then nobody knows the order, the exceptions or how to tell it is done. The fix is a page that a second person can follow. The hard part is not writing, it is getting the real routine, not the tidy version people describe when asked "how does it go?". You are the interviewer: the content belongs to the user.

Template: [[skill-worksheets/routine-template|routine-template]]. Copy it, do not edit it.

The rules

  1. One question per message. The next question depends on the answer.
  2. Context before options. One sentence saying why you ask, then 2 to 4 concrete options (AskUserQuestion), always with room for a free answer. A short answer is a valid answer.
  3. Real order, not ideal order. Ask "what do you do first, the last time you did it?", not "what are the steps?".
  4. Never invent a step. Anything the user does not know, is unsure of, or answers "depends" without saying on what, is written as [CONFIRM] <the open question> in place of content.
  5. Their words stay. If a step was said in a particular way, keep the phrase; do not polish it into jargon.
  6. The agent may never write validated. The highest state it can set is ready-for-human-review.
  7. Read the page back before saving: show it, ask "can I save it like this?", save only after the yes.

Talk to the user and write the routine in the language the user writes in. Fixed tokens (frontmatter keys, status values, paths) stay exactly as written.

The eight things to find out

blockwhat to find outpossible opening
expected resultwhat exists in the world when the routine is done"when this goes well, what is different afterwards?"
triggerwhat starts it: a date, an event, a message, a feeling"what made you do it the last time?"
inputswhat must be at hand before step one"what do you open or need in front of you?"
steps, in orderthe sequence as it really happens"the last time, what was the very first thing you did?"
decisionswhere the path forks and what decides it"at any point did you stop to choose? between what?"
exceptionswhat goes wrong and what you do then"what is the usual thing that breaks it?"
whowho does each step, who can replace them"does anyone else ever do a part of it?"
proof of donehow anyone can tell it finished"how would someone else know it is over?"

Start with the expected result and the trigger; the rest follows the conversation. Someone who cannot name the proof of done has found the first [CONFIRM], and that is a good result, not a failure.

The steps

1. Before asking (you)

ls vault/projects/ 2>/dev/null
ls vault/projects/<name>/routines/ 2>/dev/null

If the routine already has a file, this is a review: read it, say what state it is in, and ask what changed. If the project does not exist, ask which project root it belongs to; do not create the project here.

2. Interview (you and the user)

Walk the eight blocks. Keep a running draft in your head, never a long list shown to the user mid-way.

3. Write the page (you, with the user's yes)

Copy the template to vault/projects/<name>/routines/<routine>.md. Fill the frontmatter (type: routine, status: draft, owner, date). The body must link the project root by full path ([[projects/<name>/instructions|<name>]]), only after checking that file exists. Every unknown stays [CONFIRM].

4. Move to ready-for-human-review (you)

Only when no [CONFIRM] blocks a step from being run in order, or when each remaining one is labelled as non-blocking. Say which [CONFIRM] are left. Then stop: this is as far as you go.

5. Validate with a second person (a human, not you)

validated needs a second person, different from the owner, to read the page and follow the order without asking the owner and without guessing. Use the pair QA checklist at the end of the template. Only after it passes, record who and when in the page, and only then change the status. If the user says "it is validated", ask for the name and the date before writing the word.

6. Run the gate

python3 core/gate.py
python3 core/ring.py --vault vault --gate

The output

vault/projects/<name>/routines/<routine>.md, type: routine, with the project link in the body. Checked by the gate (links resolve) and the ring (the file is connected).

Never

  • Fill a step, a decision or an exception the user did not say.
  • Declare validated, or write a validator name that the user did not give you.
  • Ask several questions in one message, or rephrase a question the user already answered shortly.
  • Turn the real order into a better order. If the real order looks wrong, say so after, as a note, not in the steps.

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.