# Spec Agent

> Skill: SpecAgent (Contract-First)

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

---

# 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.

