agentleFS
tuoithotuoitho/contract-first-agent-workflow/skills/verifying-contract-first-feature/SKILL.md

verifying-contract-first-feature

Skill1 starsChanged 3 months agoApache-2.0View on GitHub

Use when implemented Contract First workstreams are ready to be integrated or declared feature-complete and the approved design requires layered verification evidence.

The file

Show its rules and text

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈15

    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. Distinctive:

    Stop if implementation or required reviews are incomplete.

    line 25
  2. Distinctive:

    Run required layers from narrowest to broadest:

    line 31
  3. Distinctive:

    Verify changed business logic and local behavior through the repository's normal automated test suite.

    line 46
  4. Distinctive:

    Verify interactions that depend on real component boundaries such as:

    line 52
  5. Distinctive:

    Prefer real dependencies when their behavior is material.

    line 60
  6. Distinctive:

    Verify material contract properties such as:

    line 72
  7. Distinctive:

    When required, start the actual application runtime through its supported entrypoint and exercise externally observable behavior across the …

    line 91
  8. Distinctive:

    Run E2E only when the approved design requires it.

    line 107
  9. Distinctive:

    When required, exercise the critical flows declared in the design matrix (typically 1–3 scenarios), not every edge case.

    line 109
  10. Distinctive:

    Use browser evidence for affected states and inspect:

    line 119
  11. Distinctive:

    Never convert BLOCKED into PASS.

    line 138
  12. Distinctive:

    If an approved contract changes after implementation has begun:

    line 153
  13. Very specific:

    update the contract source of truth through managing-contract-revisions.

    line 155
  14. Distinctive:

    update the verification matrix.

    line 157
  15. Distinctive:

    Do not assume previously passing integration or E2E evidence remains valid.

    line 161
  16. Distinctive:

    Do not claim the feature is complete merely because:

    line 182

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

Verifying Contract First Feature

Overview

Feature completion requires evidence that implementation satisfies the approved behavior and shared contracts at every verification layer required by the design.

Passing unit tests alone is not sufficient when higher verification layers are required.

Preconditions

Read:

  • approved requirements;
  • approved design, including the verification matrix;
  • frozen shared contracts;
  • completed workstream contracts and their verification evidence;
  • implementation changes;
  • workstream review results.

Stop if implementation or required reviews are incomplete.

Verification Layers

Execute only layers required by the approved verification strategy.

Run required layers from narrowest to broadest:

  1. focused/unit
  2. integration
  3. contract
  4. runtime smoke
  5. end-to-end
  6. visual

Failure at a lower layer should normally stop broader verification until the failure is resolved.

For runtime smoke, end-to-end, and visual layers, use verifying-runtime-integration against the real assembled system with a fresh verifier.

Unit Verification

Verify changed business logic and local behavior through the repository's normal automated test suite.

Evidence must show the relevant tests actually executed and passed.

Integration Verification

Verify interactions that depend on real component boundaries such as:

  • database persistence;
  • transactions;
  • infrastructure adapters;
  • handler → use case → repository;
  • concurrency behavior.

Prefer real dependencies when their behavior is material.

Mocks do not satisfy an integration obligation for the mocked boundary.

In-process router/handler tests over a real database are integration evidence, not proof of external runtime startup.

In multi-service systems, verify each obligation at the narrowest real boundary (service-local integration over real dependencies); do not require the entire distributed topology to run for every service's integration evidence.

Contract Verification

Shared contracts must be executable where practical.

Verify material contract properties such as:

  • request schema;
  • response schema;
  • required fields;
  • field types;
  • enums;
  • formats;
  • HTTP status codes;
  • compatibility between producers and consumers.

A behavioral assertion for one field is not by itself proof that the complete shared contract remains valid.

Generated client/type compilation may contribute contract evidence but does not replace runtime schema verification when runtime conformance is required.

For contracts with independent consumers (service ↔ service, producer ↔ consumer), capture evidence from both sides against the same frozen revision: provider-side checks and consumer-side checks (consumer-driven contract testing or equivalent schema-based verification). Each side passing locally does not prove the pair integrates.

Runtime Smoke Verification

When required, start the actual application runtime through its supported entrypoint and exercise externally observable behavior across the real process/network boundary where that boundary is material.

Examples include:

  • application startup;
  • migrations;
  • configuration;
  • middleware;
  • authentication;
  • routing;
  • real HTTP requests.

In multi-service systems, each service runs its own runtime smoke through its entrypoint (start → health check → exercise a critical endpoint). Feature-level runtime smoke then exercises a small cross-service path in an integrated test environment; do not require the full production-like topology unless the design requires it.

End-to-End Verification

Run E2E only when the approved design requires it; it is an expensive selective gate, not a default layer or a per-task check.

When required, exercise the critical flows declared in the design matrix (typically 1–3 scenarios), not every edge case.

For UI features, prefer automated browser runs in headless mode through the real frontend and backend runtime as gate evidence. Use headed/interactive sessions only for debugging failures or visual inspection.

For backend-only flows, an external API scenario may satisfy E2E when no UI participates in the feature.

Visual Verification

Require visual verification only when the design marks visual correctness as material.

Use browser evidence for affected states and inspect:

  • visible content;
  • state changes;
  • layout;
  • clipping/overlap;
  • responsive behavior when relevant;
  • loading/error/empty states when relevant.

A passing DOM assertion does not prove visual correctness.

Required Gates Fail Closed

A required verification layer is one of:

  • PASS
  • FAIL
  • BLOCKED

Never convert BLOCKED into PASS.

Examples of BLOCKED:

  • required database unavailable;
  • browser could not start;
  • application could not start;
  • required external dependency unavailable.

A skipped required verification is incomplete verification.

Optional tests may skip when their documented prerequisites are absent.

Contract Amendments

If an approved contract changes after implementation has begun:

  1. update the contract source of truth through managing-contract-revisions;
  2. identify affected workstreams;
  3. update the verification matrix;
  4. invalidate affected prior verification evidence;
  5. re-run impacted verification layers.

Do not assume previously passing integration or E2E evidence remains valid.

Completion Evidence

Produce .dream/specs/<feature>/verification.md containing:

LayerScopeEvidenceResult
Unit...command/logPASS
Integration......PASS
Contract......PASS
Runtime......PASS
E2E......PASS
Visual......PASS

Omit layers explicitly marked not required by the approved design.

Feature completion is allowed only when every required layer is PASS.

Completion Rule

Do not claim the feature is complete merely because:

  • code compiles;
  • unit tests pass;
  • reviewers approved the code;
  • individual workstreams passed independently.

Completion requires all required feature verification gates to pass.

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.