← ClaudeAtlas

backend-architect-contract-speclisted

Contract-specification reference for the DevForgeAI per-invocation work-contract handoff between the primary Claude session and the 5 development subagents (backend-architect, frontend-developer, refactoring-specialist, test-automator, integration-tester). Covers schema fields, lifecycle (primary writes → subagent reads + appends completion → gate verifies), file-path conventions (tmp/${STORY_ID}/contracts/), per-subagent phase-specific extensions, and the canonical template at assets/templates/contract-template.yaml. Preloaded into each of the 5 subagents via the `skills:` frontmatter array so the contract schema is available at subagent startup without on-demand reads.
bankielewicz/DevForgeAI · ★ 4 · Testing & QA · score 63
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