agentleFS
audriusstataudriusstat/execution-discipline/skills/goal-contract/SKILL.md

goal-contract

Skill0 starsChanged 4 months agoMITView on GitHub

Use when starting any non-trivial task that changes something — feature, fix, refactor, migration, config — BEFORE the first edit, especially when the request is vague ("make it work", "improve X"). Triggers: "implement", "build", "add", "migrate", "įgyvendink", "padaryk", "sukurk", "pridėk", "pagerink". Invoke even when the user doesn't ask for planning — any implementation request without explicit acceptance checks qualifies. Not for: answering questions, explaining code, open-ended ideation (brainstorming does that), or trivial edits with one obvious check.

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 3

    Distinctive

    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:

    Ask: could another agent, given ONLY the CHECKS list, decide alone whether the work is done?

    line 37
  2. Distinctive:

    Add one check per invariant at risk.

    line 47
  3. Distinctive:

    Delete any step that serves no check.

    line 54

“Common” is measured: kept by at least 6 in 10 of the 3 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

Goal Contract

Triggers automatically when relevant; invoke directly with /goal-contract or ask, e.g. "define done before we start".

Plan backward from the goal, never forward from the first step. A step that serves no check is speculative work; a check without a command is an opinion.

Step 1 — Derive the contract

GOAL:   <one sentence, in the user's words>
PROOFS: <observable facts that will exist if and only if the goal is met>
CHECKS: <one runnable command or action per proof>
STEPS:  <minimal work to make each check pass>
        format: N. <step> → check: <command>

Derive proofs from the goal, checks from proofs, steps from checks — in that order. Working forward ("what do I do first?") produces plausible activity; working backward produces verifiable progress.

Step 2 — Strength test

Ask: could another agent, given ONLY the CHECKS list, decide alone whether the work is done? If not, the checks are too weak — "works", "looks good", "is clean" are adjectives, not checks. Rewrite until the answer is yes. Strong checks are what make autonomous execution safe; weak checks force constant clarifying questions.

Step 3 — Surface invariants

List project rules the steps could silently violate (auth boundaries, data model separations, vocabulary distinctions, fail-closed security rules). Add one check per invariant at risk. Most damage from capable models comes from confidently violating an invariant nobody restated.

Step 4 — Lock and prune

Checks are now locked: weakening or dropping a failing check later requires an explicit statement of why THAT CHECK was wrong — never a silent change. Delete any step that serves no check. If a step feels necessary but has no check, either invent the check or admit the step is speculative.

Anti-patterns

  • ✗ Writing code before the contract exists.
  • ✗ Checks phrased as adjectives ("robust", "clean", "works").
  • ✗ Asking the user how to verify — derive checks yourself, state assumptions.
  • ✗ A 10-step plan where 4 steps serve no check.

Relationship to other skills

  • universal-loop executes this contract: its Step 1 consumes CHECKS as-is.
  • recon-first runs before edits on unfamiliar code — the contract says what "done" is; recon establishes ground truth of what exists.
  • brainstorming explores WHAT to build; this skill formalizes DONE for work already decided.

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.

Reviews can't be read right now.

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.