agentleFS
Scylla23Scylla23/modelrouter/skills/reflect/SKILL.md

reflect

Skill1 starsChanged 4 months agoMITView on GitHub

Rewrite router memory from the routing log - turn repeated redos and escalations into dated rules, prune contradicted ones. User-invoked; edits ~/.router/memory.md.

172 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use poteto-help, setup-pstack and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • ianclearySkill

    poteto-help

    Guides users through pstack setup, /poteto-mode, and picking the skill, playbook, or principle for a task. Type /poteto-help with a question.

    Also in 14 projects that use this

  • bnemaSkill

    setup-pstack

    Configure which Pi models pstack uses per role. Detects available provider/model specs and writes pstack's user configuration. Use for /setup-pstack, "configure pstack models", or changing pstack model choices.

    Also in 24 projects that use this

  • eryzerzSkill

    make-bot-ui

    Use when building a custom UI (page, dashboard, buttons) that should wake a Grok Bot over a webhook, when the user must provide a webhook sender key, or when exposing that UI on Tailscale.

    Also in 19 projects that use this

  • ianclearySkill

    principle-explain-the-number

    Apply before you trust, report, or act on a number you measured: a speedup, a regression, a throughput, a latency, or an eval result. Find what limits it, and rule out that it measured something other than the work you think.

    Also in 26 projects that use this

  • jaydubya818Skill

    automate-me

    Use when the user wants working preferences captured in a reusable mode skill.

    Also in 39 projects that use this

  • jaydubya818Skill

    poteto-mode

    Use when non-trivial work should follow the smallest rigorous Jstack workflow.

    Also in 27 projects that use this

  • +6 more from jaydubya818

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 3 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 163 edited versions we read keep these.

  • 3

    Distinctive

    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:

    Read exactly two files with the Read tool:

    line 13
  2. Very specific:

    If ./.router/log.jsonl is missing or empty, report that there is nothing to learn from yet and stop.

    line 19
  3. Distinctive:

    If BOTH entries of a pair are flagged (an enforced task that was then redone), the LATER entry is the signal — a redo after an enforcement …

    line 28
  4. Very specific:

    Keep the header (everything above the first - line) byte-identical.

    line 44
  5. Very specific:

    Every rule line must match, character for character: /^- (\d{4}-\d{2}-\d{2}): (.+?) → (haiku|sonnet|opus|fable) \((.+)\)$/

    line 45
  6. Very specific:

    REMOVE the old line and append the updated rule (new tier/date/ reason) at the end — an updated rule is the newest.

    line 55
  7. Distinctive:

    No new signals → change nothing and say so.

    line 61

“Common” is measured: kept by at least 6 in 10 of the 163 edited versions of this file we could read. “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

Reflect — learn routing rules from the log

Rewrite ~/.router/memory.md from the routing log. Follow exactly:

  1. Read exactly two files with the Read tool:
    • ~/.router/memory.md — the user-level memory file.
    • ./.router/log.jsonl — the routing log inside the CURRENT project directory (where you were invoked). This is a DIFFERENT .router directory from the one in your home directory; do not look for the log in ~/.router. If ./.router/log.jsonl is missing or empty, report that there is nothing to learn from yet and stop. If memory.md is missing, treat it as having no rules. Use only the last 40 log lines.
  2. Signals: ONLY log entries with flags.redo true (tier redo_from was too low; the entry's model is where it landed) or flags.enforced true (rule confirmed working). An entry whose flags are all false is NEVER a signal — the log usually holds pairs (an unflagged original plus its flagged redo, same task); such a pair is ONE signal: the flagged entry. Two entries with the same task text are one signal, not two. If BOTH entries of a pair are flagged (an enforced task that was then redone), the LATER entry is the signal — a redo after an enforcement means the rule's tier was still too low, a contradiction, not a confirmation.
  3. Tokenize each signal: lowercase its task text and split on every character that is not a-z or 0-9; keep tokens of 3+ characters that are not stopwords (list in point 3); add fingerprint.keywords and fingerprint.files tokenized the same way. Example: task "Fix typo in auth.js" gives fix, typo, auth. A pattern earns a rule when the SAME token appears in the token sets of 2 or more signals with DIFFERENT task texts. A token seen in only one signal earns nothing, no matter how strong it looks. The rule's tier is the tier those tasks LANDED on (entry model); if the signals landed on different tiers, use the highest of them, never anything higher.
  4. Rewrite the file with the Write tool. Output contract — every point is mandatory:
    • Keep the header (everything above the first - line) byte-identical.
    • Every rule line must match, character for character: /^- (\d{4}-\d{2}-\d{2}): (.+?) → (haiku|sonnet|opus|fable) \((.+)\)$/
    • Pattern: 1-3 lowercase ASCII keywords, ≤29 chars. Reason: plain ASCII, ≤40 chars. Date: today, YYYY-MM-DD.
    • The pattern must contain at least one keyword of 3+ characters that is NOT one of these (the enforcer ignores them): a an the and or to in of on for file files churn edits changes updates tweaks fixes work tasks only. A rule without such a keyword can never match — do not write it.
    • Newest last. One rule per pattern: if a pattern already has a rule, REMOVE the old line and append the updated rule (new tier/date/ reason) at the end — an updated rule is the newest. Never duplicate.
    • Prune a rule only when ≥2 redo signals with different task texts contradict its tier on matching tasks. ONE contradicting signal changes nothing. Never touch rules the log says nothing about.
    • Max 12 rules; if over, drop the oldest first.
  5. No new signals → change nothing and say so.
  6. Re-read the file after writing; if any rule line fails the regex, fix it before finishing.
  7. Report one line per rule added, updated, or pruned. Do not delegate.

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.