backend-architect-contract-speclisted
Install: claude install-skill bankielewicz/DevForgeAI
# Contract Specification — Work Contract for Development Subagents
**Status**: Preloaded skill (BA-018) | **Consumers**: 5 dev subagents | **Governance**: ADR-055
This skill documents the YAML work-contract format that the primary Claude session writes to `tmp/${STORY_ID}/contracts/phase-${PHASE}-${SUBAGENT}.yaml` before dispatching a development subagent via `Task()`. The subagent reads the contract, executes the work, and appends its `completion_record` to the same file. An `artifact-verification-gate.sh` hook then verifies the completion before phase-complete.
The per-invocation contract replaces the prose-flattening path where the primary session composed a ~60-line English prompt and the subagent re-Read() the story + re-Glob()ed tests. With the contract, primary passes structured state once; the subagent has no need to rebuild it.
---
## When this skill fires
This is a **preloaded skill**. It is injected into the subagent's startup context via the `skills:` YAML array in the subagent's frontmatter (`src/claude/agents/<subagent>.md`). Per Anthropic's subagent architecture (ADR-055, constraints A-D), preloaded skills load their full content at dispatch — no runtime lookup, no on-demand Read().
The skill is NOT triggered by description matching. It is preloaded unconditionally whenever any of the 5 dev subagents are dispatched.
---
## Schema reference
**Machine-readable source of truth:** `devforgeai/config/contract.schema.json`
**Template (start here to compose