agentleFS
spignottispignotti/opencode-workflow-kit/skills/project-contract/SKILL.md

project-contract

Skill0 starsChanged 3 months agoMITView on GitHub

Create, validate, and maintain a compact opt-in technical contract for a project's accepted decisions and invariants. Load when setting up a project contract, or when a project AGENTS.md declares an active or draft Project Contract.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Establish: run the short interview (purpose, key risks, accepted decisions, required evidence), write a draft, present for approval, then …

    line 53
  2. Distinctive:

    No project-scope prose, source-code explanations, or dependency-version lists.

    line 72

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

Project Contract

A compact, opt-in, Git-versioned record of a project's accepted technical decisions and invariants. It is local, normative once active, and never activated automatically.

When to load

  • The user asks to set up, validate, or amend a project contract ("set up a project contract").
  • A project-local AGENTS.md declares a Project Contract marker with Status: active or draft.
  • A plan or review needs to verify contract compliance.

Compact layout

AGENTS.md  ## Project Contract
  ├─ Status: active | draft | opted-out | not-required
  ├─ Manifest: <path to TECHNICAL_CONTRACT.md>
  ├─ Activation reason: <manual | short reason>
  └─ Opt-out reason: <required when Status=opted-out>
TECHNICAL_CONTRACT.md        # single manifest, always read when active

The manifest records status, authority, accepted decisions, risk controls with required evidence, and open items. There is no module tree and no docs/decisions/ requirement.

Activation rules

SignalStatus
No request, quick/standard projectnot-required
Explicit "set up a project contract"draft → user approval → active
User declines after offeropted-out with a reason

A contract is never silently active: it becomes active only after user approval of an explicit draft with no blocking open items.

Structural validation

python3 <skill>/scripts/check_project_contract.py --root <project> [--json]

Exit codes:

  • 0 — valid not-required, valid active, or explicit opted-out with reason.
  • 2 — missing required active artifacts, draft, marker/manifest mismatch, or unsafe manifest path.

The checker proves shape and references only, never semantic validity.

Lifecycle

  • Establish: run the short interview (purpose, key risks, accepted decisions, required evidence), write a draft, present for approval, then set active. No external write-back.
  • Amend: a material contract change is a plan-named, user-approved change; code follows in the same approved package.
  • Consume: plans and reviews read the relevant sections and do not rewrite the contract.
  • Retire: downgrading or completing a project never deletes contract history.

Conflict protocol

Contract, code, config, and the brief disagreeing is a conflict, not a silent-winner decision. Do not rewrite the contract to match code, and do not ignore the contract for new work. Return to plan with:

STOP — Project Contract Gate
Observed: <missing artifact or exact contradiction>
Boundary: <contract section and plan task>
Decision needed: <smallest planning decision>

Content rules

  • Record only decisions, invariants, risk controls, and required evidence.
  • No project-scope prose, source-code explanations, or dependency-version lists.

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.