Documentation

Everything you need to understand and use SpecAg effectively.

Core Concepts

Spec-Driven Development (SDD)

In SDD, every piece of work starts with a specification document. AI agents have no memory between conversations — the spec IS their memory. The flow is:

Spec (business + technical + acceptance criteria)
  → AI implements against the spec
  → Commit references the spec (git hook enforces)
  → PR updates the spec changelog (CI enforces)
  → Demo proves the spec works
  → Human accepts

The 4-Role Team

RoleWhoResponsibilities
AdvisorYou (human)Vision, architecture, QA, final say. ~10 hrs/week.
Lead DevAI agentArchitecture, complex features, PR reviews
AssociateAI agentSmaller features, tests, infra scripts
PO AgentAI agentBacklog, ceremonies, daily reports, process glue

Sprint Lifecycle

SpecAg uses Saturday-to-Friday sprints (weekends for ceremonies so the human can attend):

DayTimeCeremony
Saturday3:00 PMSprint Review + Demos + Deploy
Saturday3:30 PMSprint Retrospective
Saturday4:00 PMSprint Planning (next sprint)
Sunday10:00 AMKickoff (tech spec grooming)
Daily8:05 AMDaily Standup (async)
Daily6:00 PMDaily Report + Burndown
Wednesday2:00 PMBacklog Refinement (async)

CLI Reference

specag init

Initialize a new SpecAg project in the current directory. Creates the folder structure, config file, and tier-appropriate templates.

$ specag init --name my-app --owner datta --tier starter

specag sprint prepare

Validate all specs in specs/ against the Definition of Ready for your current tier.

$ specag sprint prepare

specag sprint kickoff

Transition the current sprint from planned to active state.

$ specag sprint kickoff

specag stats

Display token usage, cost summary, and active hooks.

$ specag stats

specag tier show

Display current tier and enforcement matrix.

$ specag tier show

specag tier set <tier>

Upgrade or downgrade your project tier. Shows a diff of what changes before applying.

$ specag tier set medium

specag tier diff <tier>

Preview what changes if you switch to a different tier without applying.

$ specag tier diff personal

Pre-Call Hook Chain

Before any LLM API call, a chain of hooks runs. First non-ALLOW decision wins:

HookDecisionWhat it does
DailyCapHookREJECTReject if daily token cap reached
WeeklyCapHookREJECTReject if weekly cap reached
WorkWindowHookREJECTReject if outside work hours
PausedRegistryHookREJECTReject if epic is hard-paused (blocker T+7)
PCModeHookDOWNGRADERoute to cheaper model during discovery
BudgetGuardHookREJECTReject if estimated cost exceeds budget

Cascading Blocker SLA

When work is blocked on a human decision:

DayWhat Happens
T+1PO Agent nudges in Slack
T+3Priority bumps. Downstream impact broadcast.
T+7HARD PAUSE. Token tracker rejects ALL LLM calls on blocked paths. Zero spend until human responds.

Configuration

All project settings live in specag.config.yaml:

project:
  name: "my-project"
  owner: "Your Name"
  tier: personal      # starter | personal | medium
  timezone: "America/Chicago"

hooks:
  enabled:
    - daily_cap
    - weekly_cap
    - work_window
    - paused_registry
    - budget_guard

alerts:
  thresholds: [50, 80, 100]
  slack_channel: "#dev"
  deduplicate_minutes: 60

Spec Format

Every spec follows this structure:

## [SUMMARY]       # App, owner, status, priority, story points
## [STORY]         # User story or feature description
## [TECH SPEC]     # Technical design, API contracts, files touched
## [STANDARDS]     # Rules extracted from the spec
## [ACCEPTANCE CRITERIA]  # Given/When/Then format
## [CHANGE LOG]    # Version history of the spec itself

Further Reading

For the complete methodology reference (~2000 lines, 31 sections), see the Project Bible on GitHub.