Skip to main content

SpecOps CLI

CI PyPI Python License: MIT

Read this in: English | Português (BR)

SpecOps turns GitHub Spec Kit's spec-driven workflow into an enforced, auditable process. It layers an agent-guided atomic development methodology on top of any Speckit repository — a physical state ledger, typed evidence with machine collection, and token-optimized review — without replacing or forking a single Speckit file.

Speckit gives your agents great artifacts (spec → plan → tasks → implement). SpecOps makes sure they actually follow them: state is on disk and Git-verifiable, evidence is collected by tooling instead of claimed by the agent, and review rejects as cheaply as possible.

Why SpecOps?

Spec-driven development with AI agents has three recurring failure modes. SpecOps addresses each one:

Problem Without SpecOps With SpecOps
Agents hallucinate progress "Done ✅" with no proof Every task closes with typed evidence; --auto attaches test output, commit hashes, and diffs at the commit boundary
State lives in the chat Lost on context reset; not auditable State is a physical status.yaml ledger, Git-verifiable and recovery-safe
Reviews are slow and expensive Agent reads the whole repo /specops-review rejects cheapest-first (reconcile → lint/test → working tree/effective diff) before reading any code

What it adds to Speckit

  • 📒 Physical state ledger (Repo-as-State). A versioned, structured status.yaml tracks phase, tasks, evidence, and review cycles. Mutated only through specops commands — never hand-edited, never held in agent memory. State changes are atomic and interruption-safe, guarded by optimistic concurrency (a monotonic revision) and a workspace-identity check (feature / branch / baseline); older ledgers migrate losslessly with a backup.
  • 🔬 Automated evidence collection. complete-task --auto runs your test command, harvests commits and diffs, and records them as typed evidence. A task cannot be DONE without proof.
  • 🔁 A phase state machine wired into the prompts. specops init injects directives into the specify, plan, tasks, and implement prompts so the ledger is created and phases advance automatically — the human never runs the bookkeeping by hand.
  • ✂️ Token-optimized surgical review. The installed /specops-review command reviews only effective-diff files and stops at the first cheap rejection.
  • 📐 Empirical verification & gates. specops consistency and specops reconcile are exit-code gates you can drop into CI or agent prompts.
  • ➕ Additive and reversible. Everything is delivered through marker-delimited blocks. Removing those blocks restores the affected Speckit files byte-for-byte.

Install

pip install speckit-specops

Installs the specops command. Requires Python ≥ 3.10 and Git ≥ 2.30. No network I/O after install.

Quick Start

# In a Speckit-initialized repository:
specops init          # inject directives, install /specops-review, create specops.json

That's it. From here you drive Speckit as usual (/speckit.specify, /speckit.plan, /speckit.tasks, /speckit.implement) and the injected directives take care of the ledger and phase transitions. Check state anytime:

specops status show

How it works

SpecOps rides the Speckit lifecycle. Once specops init has run, the injected directives drive the ledger at each stage seam:

Speckit stage What SpecOps does
specify Marks the repo as SpecOps-managed (informational; no ledger yet)
plan Enforces empirical path verification and the consistency gate
tasks Creates the ledger (status init-spec), advances the phase to TASKS, and requires [SC-xxx] coverage tags on every task
implement Opens IMPLEMENT, runs the evidence-backed ledger loop, then opens REVIEW
review /specops-review validates the diff and records APPROVED / REJECTED

The phase machine is SPECIFY → PLAN → TASKS → IMPLEMENT → REVIEW → DONE. If SpecOps is not installed, the Speckit prompts still work standalone — the directives degrade to no-ops.

Commands at a glance

Command What it does
specops init Prepare a Speckit repo: inject directives, install /specops-review, create specops.json
specops extension … Native Spec Kit extension lifecycle, plus the specops and specops-lite workflows
specops status … Drive the ledger: show, init-spec, start-task, complete-task, transition-phase, migrate, rebaseline
specops preflight Deterministic review gate, cheapest-first — CI-safe (formerly specops review)
specops reconcile Read-only gate: every recorded commit reachable, every DONE task evidenced
specops consistency Read-only gate: SC coverage tags + plan path action suffixes
specops doctor Read-only health diagnostic across every SpecOps surface
specops report Compact, stable machine surface for the active feature's status
specops context … Context map: ownership, phase read sets, impact, staleness
specops trace … End-to-end traceability; classify and acknowledge effective-diff drift
specops gate … Gate-profile suite and structured-evidence inspection
specops handoff … Structured corrective handoffs; import external findings (JSON/SARIF)
specops lane … Lightweight lane for small, reversible changes

The full reference — flags, exit codes, JSON contracts, examples, and the review workflow — lives in docs/commands.md.

How SpecOps behaves: a paved road you can leave — on the record

SpecOps is neither a rigid gate that blocks you nor a suggestion you can ignore. It presents a correct path and lets you deviate — as long as the deviation is recorded. What it blocks is silent deviation, not deviation itself:

  • A path you changed that the plan didn't predict isn't rejected — you acknowledge it with a reason (specops trace acknowledge).
  • A review finding that turns out to be a false positive isn't a dead-end — you dismiss it with a reason (specops handoff finding dismiss).
  • A gate that was skipped is recorded as a finding, never silently passed.

SpecOps records the deviation and its reason; it does not judge whether the reason is good — that is the team's call, not the tool's. (A small core of safety-critical gates — persisted-schema changes, secrets, public-contract breaks, destructive actions — is not pierceable; there SpecOps halts and asks a human.)

Configuration — specops.json

Key Purpose Default
test_command Command run by complete-task --auto pytest
lint_command Lint gate run by specops preflight (empty = skipped) ""
skills_dir Directory the review prompt loads skills from .specify/skills

Unknown keys are preserved on re-init.

Language policy

All SpecOps operational output (CLI messages, injected assets) is in English. Your prose (spec.md, plan.md, task descriptions) may be in any language — SpecOps parses only structural tokens (SC-\d+, T\d+, action suffixes), never content.

Supported Speckit layouts

SpecOps resolves prompt targets at runtime from .specify/integrations/<agent>.manifest.json. Any Speckit integration with a recorded manifest is supported; unknown layouts fail closed. Tested with Speckit ≥ 0.12 (Claude skills mode, separator -).

Uninstall

Remove the appended block from each prompt file, then delete specops.json and the installed review command. No other files are written; the restore is byte-identical.

Contributing

Contributions are welcome — see CONTRIBUTING.md for dev setup, the quality gates, and project principles. SpecOps is at 0.x; the CLI surface and ledger format may still change before 1.0 (see CHANGELOG.md).

License

MIT © Paulo Segundo

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

speckit_specops-0.6.0.tar.gz (126.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

speckit_specops-0.6.0-py3-none-any.whl (149.0 kB view details)

Uploaded Python 3

File details

Details for the file speckit_specops-0.6.0.tar.gz.

File metadata

  • Download URL: speckit_specops-0.6.0.tar.gz
  • Upload date:
  • Size: 126.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for speckit_specops-0.6.0.tar.gz
Algorithm Hash digest
SHA256 17d24a79fd74e2c5df80e245b505c95ad1692bfb7589bc49fbb36200c3cf6fac
MD5 81d6762a4ce58fb91a3e07698d0c325c
BLAKE2b-256 ed80535028aa57216b09875b7f647923a5c2209c8cafb689bece8b1b6a3ad683

See more details on using hashes here.

Provenance

The following attestation bundles were made for speckit_specops-0.6.0.tar.gz:

Publisher: release.yml on paulo2nd/specops

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file speckit_specops-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: speckit_specops-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 149.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for speckit_specops-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 88d5d87ea3854a1216baad60df358ef114a31e1659f6951012c49905fd5f595d
MD5 15fe6d7038b6630f27cbee5031d9e585
BLAKE2b-256 acc0ebb8501e98f4a6964ec19959455cb73cdc718edc8b844a2b867ff1faa5a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for speckit_specops-0.6.0-py3-none-any.whl:

Publisher: release.yml on paulo2nd/specops

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.13.0

2 files

0.12.0

2 files

0.11.0

2 files

0.10.0

2 files

0.9.0

2 files

0.8.1

2 files

0.8.0

2 files

0.7.1

2 files

0.7.0

2 files

This release

0.6.0 This release

2 files

0.5.1

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.1

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page