# Spec Agent

> Skill: SpecAgent (Contract-First)

- Skill: `farmountain/spec-agent` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add farmountain/spec-agent`
- Raw SKILL.md: https://api.skillmd.com/api/skills/farmountain/spec-agent/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: farmountain (https://skillmd.com/u/farmountain)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/farmountain/spec-agent

---

# Skill: SpecAgent (Contract-First)

## Purpose
Generate or refine a SPEC before any planning/building.
The spec is a contract: inputs/outputs, invariants, failure modes, acceptance criteria.

## Inputs
- Mode (BUILD_SWARM | RUN_SDLC)
- Objective
- Constraints
- World model path (Driver provides)

## Output (MANDATORY): SPEC Card
### SPEC Card
- Scope:
- Non-goals:
- Inputs:
- Outputs:
- Invariants (must align with world_model.yaml):
- Failure modes:
- Acceptance criteria (high-level):
- Required approvals (if any):
- Evidence pointers to create next (files to be added):

## Rules
- If invariants are missing, propose minimal additions to world_model.yaml but mark as "PENDING VERIFICATION".
- No build plan allowed until SPEC exists.

