agentleFS
AidALLAidALL/ghost-alice/necessity-gate/SKILL.md

necessity-gate

Skill15 starsChanged 6 months agoApache-2.0View on GitHub

Task-justification gate for new tasks, skills, files, audit cycles, or follow-ups. Compares problem evidence, regression risk, and recovery benefit; decides approve, reject, or modify. Blocks speculative work.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If this agent was dispatched to perform only a specific subtask, skip this skill.

    line 9
  2. Distinctive:

    Do not bypass this gate by expert judgment.

    line 13
  3. Distinctive:

    Run this gate when you are about to:

    line 40
  4. Distinctive:

    start a new audit or verification cycle

    line 43
  5. Distinctive:

    add a "follow-up", "open issues", or "improvements" section to a report

    line 45
  6. Distinctive:

    create a new tool, script, or reference file

    line 47
  7. Distinctive:

    No silent pass is allowed.

    line 58
  8. Distinctive:

    Write one concrete sentence for the proposed work.

    line 64
  9. Distinctive:

    Use one of these harm shapes:

    line 80
  10. Distinctive:

    Consider whether the work touches a working system, is relied on by other skills or runtime paths, is hard to recover, or creates more …

    line 90

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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
<SUBAGENT-STOP> If this agent was dispatched to perform only a specific subtask, skip this skill. </SUBAGENT-STOP><EXTREMELY-IMPORTANT> Do not bypass this gate by expert judgment. If the work "obviously" seems needed, still run the gate. This friction protects novice-day and bad-day agent behavior.

Starting a new task without this gate is a rule violation. </EXTREMELY-IMPORTANT>

necessity-gate

necessity-gate checks whether a new task, file, audit cycle, skill change, or follow-up is justified by real evidence and recovery value. It blocks padding, speculative cleanup, manufactured follow-ups, and scope creep.

Contents

  • Triggers
  • Escape Hatch
  • Procedure
    • 1. State The Work
    • 2. Classify The Problem
    • 3. Assess Harm If Skipped
    • 4. Assess Regression Risk
    • 5. Decide
  • Output Format
  • Habitual Failure Patterns
  • Relationship To Verification
  • What This Gate Does Not Block
  • References

Triggers

Run this gate when you are about to:

  • define a new task, skill, or file
  • start a new audit or verification cycle
  • edit frontmatter, body, or calls for a production skill
  • add a "follow-up", "open issues", or "improvements" section to a report
  • register new tasks with TodoWrite/update_plan
  • create a new tool, script, or reference file
  • promote an emergent subtask into real work

Escape Hatch

The gate is considered passed only when a reason is recorded:

  • user-directed: <quote> for explicit user instructions
  • reference to a previously approved task and substep
  • retry inside an already approved loop, where verification-before-completion absorbs the check

No silent pass is allowed.

Procedure

1. State The Work

Write one concrete sentence for the proposed work. Do not use vague phrasing.

2. Classify The Problem

Choose exactly one:

  • reproducible: a test fails, a command errors, or the user repeatedly reports the same symptom
  • evidenced: logs, files, schemas, or dependencies show a mismatch
  • speculative: the reason is "maybe", "cleaner", "could be useful", or expert preference

speculative defaults to reject unless later evaluation is exceptionally strong.

Separate evaluation means from runtime adoption. Benchmarking or A/B comparison can serve an explicitly requested evaluation deliverable, but evaluation usefulness alone does not justify adding runtime features. For runtime adoption or improvement, name the observed runtime behavior gap and the expected correction; assess the harm and regression risk of that correction. Do not substitute a new evaluation tool or product when the authorized objective is to improve current runtime behavior. Genuine user-directed evaluation work and evidenced runtime improvements remain permitted within their authorized scope.

3. Assess Harm If Skipped

Use one of these harm shapes:

  • system breakage
  • explicit user request unmet
  • future work cost accumulation, which is always suspect and is treated together with speculative

"The output would look cleaner" is not harm.

4. Assess Regression Risk

Consider whether the work touches a working system, is relied on by other skills or runtime paths, is hard to recover, or creates more scope expansion. If risk is written as zero, re-evaluate; true zero is rare.

5. Decide

  • APPROVE: harm is clearly larger than regression risk
  • MODIFY: harm is real but the proposed scope is too broad or too narrow
  • REJECT: harm is speculative, smaller than risk, or the work is padding

Record the decision and reasoning.

Output Format

[necessity-gate] <one-sentence task>
- classification: reproducible | evidenced | speculative
- harm: <one line>
- regression-risk: <one line>
- decision: APPROVE | MODIFY | REJECT
- reason: <one or two sentences>
- escape-hatch: <reason, if used>

Habitual Failure Patterns

ThoughtClassificationDefault
"This is worth checking too"speculativereject
"It works, but cleanup would be nicer"speculative cleanupreject
"There are TODOs, so create a cycle"manufactured cyclereject (unless the TODO itself is evidence-backed)
"Add follow-ups to make the report complete"paddingreject
"Apply the same pattern everywhere"scope creepreject
"Check everything just in case"premature auditreject
"Clean up other places at once"batch creepreject
"Make the docs look richer"aesthetic paddingreject

This table is not exhaustive. The threshold is that work without clear evidence or a user directive defaults to reject.

Relationship To Verification

necessity-gate is an initialization-event gate. It runs when work is first defined or when a loop discovers a new subtask. Inside an already approved loop, verification-before-completion handles the "did this step actually work" question.

What This Gate Does Not Block

  • explicit user-directed work
  • execution of a substep under already approved work
  • the next step after verification passes
  • improving the quality of an already approved artifact

References

  • AGENTS.md
  • task-router/SKILL.md
  • coding-convention/verification-before-completion/SKILL.md

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.