agentleFS
leosiminileosimini/keelokit/skills/check-health/SKILL.md

check-health

Skill2 starsChanged 13 days agoMITView on GitHub

Check and repair the health of a Keelokit project's harness — rules without enforcers, enforcers that point nowhere, expired or incomplete exceptions, gaps in docs/context, malformed stories — and add new rules with their checks. Use when the user says "doctor", "chequeá el harness", "¿está todo en orden?", "salud del proyecto", "agregá una regla", "esto no puede volver a pasar", "registrá una excepción", or when the doctor (`python3 .keelokit/bin/doctor.py`, `pnpm run doctor`) or CI's doctor step fails.

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

6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    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:

    Write the enforcer first and show it failing on the bad case, passing on the good one.

    line 48
  2. Very specific:

    Add the entry to .keelokit/rules.local.toml: id, level, rule, why (the incident in one line), enforced_by, and when if it only applies when …

    line 49
  3. Distinctive:

    Run the doctor; commit rule and enforcer together.

    line 51
  4. Very specific:

    Profile drift: When the doctor says the repo shows a trait the profile lacks (or lists one nothing backs), check the evidence, propose the …

    line 53
  5. Very specific:

    If the lesson applies to every product, tell the user it should move to the house rules in Keelokit.

    line 57
  6. Very specific:

    Only with the user's explicit approval in chat.

    line 62

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

Doctor — a rule without a check is a wish

Run

python3 .keelokit/bin/doctor.py

Fix by error type

ErrorFix
MUST rule without an enforcerAdd the test, lint rule, hook or CI job that fails when the rule breaks, then list it in enforced_by. If nothing can check it, it is a SHOULD — downgrade it and say so.
Enforcer does not existFix the path/name, or create the missing check. Never delete the rule to go green.
Enforced only by reviewAcceptable for SHOULD; for MUST, find a computational check or tell the user it is weak.
Exception incomplete or expiredAsk the user: renew (new date, reason, approver) or remove it and comply. Never renew on your own.
docs/context missing / vague / untracked gapMissing → /keelokit:plan-intake. Vague → ask for the number or name. Untracked gap → add its row to gaps.md.
CI-1: a job without timeout-minutes, or a timeout / test timeout / retries raisedAdd the timeout. For a raise: undo it and split the job by kind of test or shard it (docs/ci.md); an exception only with the user's yes
CI-2: a CI job missing from .keelokit/verify-map.toml, or a step it names that verify.sh lacksAdd the job to the map with the verify step that runs it, or add the step to scripts/verify.sh; ci_only only for what can't run on a machine
FMT-1: no eol=lf in .gitattributes, or no format:checkAdd * text=auto eol=lf (then pnpm format once, alone in its commit) and the script
FLAKY-1: a timeout or retries raised in a test configUndo it; reproduce the intermittent failure, fix the race, add its row to docs/escapes.md
MIG-1: a migration that sorts before main's last, or two stories of a wave adding migrationsRename the new one with a later timestamp after rebasing (never edit the applied ones); move one story to a later wave
DEBT-1: a ledger row malformed, "decided" without a recommendation, or reading as "known issue / later"Fix it or decide it with a recommendation; a missing 'Needs the owner' section is added empty
verify: CUT in status.py, or a verify that exits 4 (a required tool missing) / 3 (busy machine)CUT: read the state file's step and the known causes the next red prints; fewer parallel sessions. 4: install the tool, or KEELOKIT_ALLOW_MISSING=<tool> knowingly. 3: wait, or VERIFY_FORCE=1
"N changed files match no route"Add a route for that kind of file to .keelokit/verify-routing.toml (specific routes first)
Story errorsFix front matter, file name, or unknown depends_on; remove any status field.
Invariant without a class, or a story naming an unknown oneAdd class: <class> to the INV-nnn line in domain.md (how does it break? see the plugin's references/invariants.md); fix the story's invariants. A new invariant is a product rule: ask the user.
Story touches a critical area without integrity, or two stories of one area share a waveAdd integrity and the invariants it keeps; move one story to a later wave. Never shrink an area to go green.
A done story touches a critical area without integrity (a warning: the code shipped before the area, or despite it)Add integrity and the invariants the code keeps to the story, with a test citing each (INV-1).
Done story's invariant not cited by a test (INV-1)Delegate to the verifier: the test its class calls for, titled with the id.
Critical area points at a missing pathThe code moved or went away: update .keelokit/critical.toml, don't delete the area unless the code is gone.
Escape row incomplete (ESC-1)Fill in the class and the check that now catches it, or none — <why>.
No main or origin/main (0 stories done, --scope exits 2)Fetch main: git fetch origin main; in CI, fetch-depth: 0 on the job's checkout. Never point the doctor at HEAD: a branch's own Story: trailers aren't done work (INV-005).
doctor --scope failsFiles outside touches → add them and re-check the wave, or split the change. Undeclared critical area → integrity + full mode. Acceptance tests edited outside test(<ID>): … → revert the edit; the verifier changes tests, openly.

House rules (.keelokit/harness/) are inherited: don't edit them in the project. If one is wrong for everyone, say so — it gets fixed in the Keelokit template and arrives with copier update. If it is wrong only here, register an exception.

Adding a rule (after an incident or a repeated mistake)

  1. State it: [MUST|MUST NOT|SHOULD] <actor> <verb> <object> <measurable qualifier>.
  2. Write the enforcer first and show it failing on the bad case, passing on the good one.
  3. Add the entry to .keelokit/rules.local.toml: id, level, rule, why (the incident in one line), enforced_by, and when if it only applies when some path exists.
  4. Run the doctor; commit rule and enforcer together.

Profile drift. When the doctor says the repo shows a trait the profile lacks (or lists one nothing backs), check the evidence, propose the updated kind/traits to the user, and write .keelokit/profile.toml on their yes. A profile still unknown (an adopted repo) gets diagnosed the way /keelokit:project-adopt does. 5. If the lesson applies to every product, tell the user it should move to the house rules in Keelokit.

Registering an exception

Only with the user's explicit approval in chat. Add to .keelokit/exceptions.toml: rule, reason, approver (the user's name), expires (a date; permanent only if the user says so).

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.