quality-execution-contract
Skill1 starsChanged 5 months agoMITView on GitHub
Five-step copy-paste workflow for making safe, verified changes to an existing codebase. Prevents scope creep, hallucination, and untested changes. Force explicit intent declaration before any code edit. The contract makes the agent think before coding, prevents scope creep, and ensures verification is planned — not an afterthought. Apply to every non-trivial coding task: bug fixes, feature work, refactors, or config changes that go beyond a one-line typo fix. If the task touches more than one file or changes observable behavior,…
In this repository117 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- advanced-orchestrationSkill
- architect-agentSkill
- implementer-agentSkill
- quality-councilSkill
- reviewer-agentSkill
- tester-agentSkill
- writer-critic-pairSkill
- authoring-skillsSkill
- api-endpoint-qualitySkill
- async-job-qualitySkill
- auth-qualitySkill
- db-migration-qualitySkill
- frontend-state-qualitySkill
- acceptance-criteriaSkill
- adaptive-flowSkill
- adaptive-prompt-selectionSkill
- adversarial-code-reviewSkill
- architecture-decision-recordsSkill
- brainstormingSkill
- brownfield-spec-enhancementSkill
- bug-fix-lifecycleSkill
- checkpoint-validationSkill
- cicd-integrationSkill
- clarify-before-codeSkill
- claude-code-hooks-packSkill
- code-context-packSkill
- code-intelligence-reviewSkill
- context-policySkill
- context-rich-implementationSkill
- crash-proof-planningSkill
- critique-pass-protocolSkill
- dependency-aware-task-orderingSkill
- deprecation-migrationSkill
- disciplined-diagnosisSkill
- docs-authorSkill
- executing-plansSkill
- external-skillSkill
- finishing-a-development-branchSkill
- git-guardrailsSkill
- goal-driven-executionSkill
- grill-user-before-buildingSkill
- guard-bypass-protocolSkill
- improve-codebase-architectureSkill
- incremental-reviewSkill
- issue-slicingSkill
- lessons-learned-dbSkill
- loop-engineeringSkill
- model-aware-configSkill
- model-weakness-memorySkill
- multi-repo-learningSkill
- orchestration-workflowsSkill
- plan-driven-executionSkill
- plan-from-specSkill
- prd-from-contextSkill
- project-constitutionSkill
- prompt-architectureSkill
- prototype-before-commitmentSkill
- quality-engineSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
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
- Distinctive: line 32
When the user explicitly asks to protect quality or avoid breaking things
- Distinctive: line 42
Follow the five-step quality workflow:
- Distinctive: line 51
Write the test plan with exact commands and manual fallback steps.
- Distinctive: line 53
Only after the contract is complete, proceed with the edit.
- Very specific: line 56
Use skills/core/code-context-pack/SKILL.md for the context-pack protocol.
- Distinctive: line 118
No scorecard: No audit trail → hard to verify or roll back.
≈ “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.
Files
Skill: Quality Execution Contract
Five-step copy-paste workflow for making safe, verified changes to an existing codebase. Prevents scope creep, hallucination, and untested changes.
Purpose
Force explicit intent declaration before any code edit. The contract makes the agent think before coding, prevents scope creep, and ensures verification is planned — not an afterthought.
When to use
Apply to every non-trivial coding task: bug fixes, feature work, refactors, or config changes that go beyond a one-line typo fix. If the task touches more than one file or changes observable behavior, complete this contract first. Also use when:
- Bug fixes with unclear root cause
- Feature additions where safety matters more than speed
- Any change touching production-adjacent code
- When the user explicitly asks to protect quality or avoid breaking things
- During code review before merging
Inputs
Task description, acceptance criteria, repository context, risk level, and file inventory.
Workflow
Follow the five-step quality workflow:
- Create a Contract — Write a one-paragraph quality execution contract: goal, acceptance criteria, risk tier, files to touch/not touch.
- Fill in the contract template (
templates/quality-contract.md) completely. - Declare the goal, acceptance criteria, and explicit non-goals.
- Assess risk tier honestly — tiny means one-line; risky means data or API impact.
- List files to inspect, files likely to change, and files explicitly NOT touched.
- Identify new dependencies or public API changes with justification.
- Gather context: inspect existing patterns, find similar implementations, locate relevant tests.
- Write the test plan with exact commands and manual fallback steps.
- Sign the four commitments.
- Only after the contract is complete, proceed with the edit.
- Fill in the contract template (
- Right-Size Context — Build a minimal context pack: only the files and lines relevant to the change.
- Use
skills/core/code-context-pack/SKILL.mdfor the context-pack protocol.
- Use
- Smallest Safe Diff — Apply the smallest diff that satisfies the contract. No refactoring, no scope creep.
- Self-Review Against Criteria — Re-read the contract and verify every acceptance criterion. Check for edge cases, side effects, regressions.
- Write the Scorecard — Use
templates/quality-scorecard.mdto produce the verification scorecard. Run verification per the test plan before claiming done.
Outputs
- A completed Quality Execution Contract with explicit goal, acceptance criteria, risk tier, scope boundaries, context evidence, test plan, and signed commitments.
- A Context Pack with only the relevant files/code (use
templates/code-context-pack-template.md) - The Smallest Safe Diff that satisfies the contract
- A Self-Review confirming every acceptance criterion is met
- A Scorecard documenting verification results (use
templates/quality-scorecard.md)
Key terms
- Contract: Binding agreement between AI and user about what will/won't be changed.
- Scorecard: Audit trail showing which acceptance criteria passed and which (if any) failed.
- Quality Diff: Side-by-side comparison of the generated diff against expected behavior.
The contract (inline)
## Understanding
- Goal:
- Acceptance criteria:
- Non-goals:
## Risk Assessment
- Risk tier: (tiny/small/medium/large/risky)
- Files to inspect:
- Files likely to change:
- Files NOT to touch:
- New dependencies? (none / list and justify)
- Public API changes? (no / describe and justify)
## Context Gathered
- Existing patterns inspected:
- Similar implementations found:
- Tests relevant:
## Test Plan
- Test command(s) to run:
- Manual verification if tests unavailable:
## Commitment
- I will make the smallest correct change
- I will run verification before claiming done
- I will not refactor unrelated code
- I will report honestly if verification could not runFailure modes
- No contract written: Changes proceed without agreement on scope → scope creep, regressions.
- Skipping the contract for "obvious" one-file changes that still alter behavior.
- Filling in the contract after coding — the value is in the pre-coding thinking.
- Context pack too large: AI suffers context window pressure → misses details, hallucinates.
- Diff exceeds contract scope: Refactoring or cleanup sneaks in → untested changes, risk.
- Skipped self-review: Acceptance criteria not checked → bugs reach production.
- No scorecard: No audit trail → hard to verify or roll back.
- Claiming done without running the test plan.
- Leaving "Files NOT to touch" empty and then touching extras.
- Understating the risk tier to avoid writing a thorough plan.
Verification checklist
- Contract written before any code change
- Contract filled in before any edits.
- Contract lists files NOT to touch
- Risk tier matches actual complexity.
- Test plan has runnable commands.
- Commitment statements are honest (no "N/A" for verification).
- Context pack contains only relevant lines
- Diff changes nothing outside contract scope
- Every acceptance criterion checked
- Scorecard created for every change
- Verification evidence collected after edits complete.
Related skills
skills/core/verification-before-done/SKILL.md— evidence bar for completion claims.skills/core/goal-driven-execution/SKILL.md— turns an imperative into a verifiable goal.skills/core/code-context-pack/SKILL.md— context pack protocol.skills/core/checkpoint-validation/SKILL.md— phase gate validation pattern.
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
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.

