speq-skill / Docs / Workflow
Jump to: Interactive workflow · Headless PR Pipeline
The speq-skill workflow starts with a one-time Mission bootstrap, then repeats a Plan → Implement → Record cycle.
/speq:mission → specs/mission.md (once per project)
│
┌────────────────┼────────────────┐
▼ ▼ ▼
/speq:plan → /speq:implement → /speq:record (repeat)
| Step | Description |
|---|---|
| /speq:mission | One-time project bootstrap |
| /speq:plan | Create spec deltas |
| /speq:implement | Implement plan deltas |
| /speq:record | Merge deltas into permanent specs |
| /speq:audit | Health-check the spec library and guide fixes |
| Headless PR Pipeline | Autonomous plan/implement via a feat/ branch + PR |
| Utility skills | Reusable skills |
Generate specs/mission.md through an interactive interview. Run once per project.
When to use: starting a new project with speq-skill, or adding specs to an existing codebase.
- Project type — Determines brownfield (existing code) vs. greenfield (new project)
- Exploration — For brownfield projects, explores tech stack, commands, structure
- Interview — Asks clarifying questions about purpose, users, capabilities
- Generation — Creates
specs/mission.mdwith all gathered information
The agent covers 11 areas, grouping related questions to keep the interview focused:
| Topic | What the agent asks about |
|---|---|
| Identity & Purpose | Project name, one-sentence summary, problem statement |
| Target Users | Personas, goals, typical workflows |
| Core Capabilities | 3–5 things the system does (what, not how) |
| Out of Scope | Explicit non-goals and unsupported features |
| Domain Glossary | Project-specific terms and their meanings |
| Tech Stack | Language, runtime, framework, database, testing |
| Commands | Build, test, lint/format, coverage |
| Project Structure | Directory layout and purpose of each directory |
| Architecture | High-level pattern, key components, data flow |
| Constraints | Technical, business, and performance limits |
| External Dependencies | Services/APIs the project depends on |
Note
/speq:mission runs once per project. The next three steps form the repeating development cycle.
Create feature spec deltas and an implementation plan, staged in specs/_plans/<plan-name>/.
When to use: starting new feature development, modifying existing behavior, or refactoring spec-first.
specs/_plans/<plan-name>/
├── plan.md # Implementation plan
├── decision-log.md # Design decisions (optional)
└── <domain>/<feature>/spec.md # Delta specs
planner-agent creates decision-log.md during the planning interview, capturing Q&A, design choices, and alternatives considered. Entries marked Promotes to ADR: yes become a new specs/_decision/NNN-<plan-name>.md fragment when recorder-agent runs /speq:record. See Decision Log.
Before handoff, plan-reviewer adversarially challenges the plan (intent fidelity, feasibility, requirement quality, task breakdown, prose) and loops BLOCKER findings back to planner-agent for revision, capped at 2 rounds; unresolved blockers escalate to the human. Resolved blockers are logged as [plan-review]-prefixed ## Review Findings entries in decision-log.md.
| Verb | When |
|---|---|
add |
New feature |
change |
Modify existing |
remove |
Deprecate/delete |
refactor |
Restructure, same behavior |
fix |
Bug or spec mismatch |
Pattern: <verb>-<feature-scope>[-<qualifier>]
Examples: add-user-auth, fix-validation-edge-case, refactor-search-module
Implement approved plan deltas — orchestrate tasks, delegate to sub-agents, review code, and produce a verification report.
When to use: after /speq:plan, to implement a plan:
/speq:implement <plan-name>- Loads the plan and creates a task breakdown
- Partitions tasks by tag —
[expert]-tagged tasks route toimplementer-expert-agent, all others toimplementer-agent(see Model Routing) - Spawns sub-agents to work through tasks (with context rotation)
- Loads targeted guardrails for clean code, unit testing, and integration testing
- Runs code review on changed files via
code-reviewer - Executes build, test, and lint verification
- Generates a verification report
Merge implemented spec deltas into the permanent spec library.
When to use: after a successful /speq:implement:
/speq:record <plan-name>- Verify — Checks
verification-report.mdexists - Load — Reads plan and delta specs
- Merge — Applies deltas to permanent specs using markers:
| Marker | Action |
|---|---|
DELTA:NEW |
Append scenario |
DELTA:CHANGED |
Replace scenario with same name |
DELTA:REMOVED |
Delete scenario with same name |
- Clean — Strips all DELTA markers
- Validate — Runs
speq feature validate - Check thresholds — Flags any feature over 10 scenarios or domain over 8 features and asks you how to split it; never reorganizes without your decision
- Promote decisions — Entries marked
Promotes to ADR: yesindecision-log.mdare written to a newspecs/_decision/NNN-<plan-name>.mdfragment - Archive — Moves the plan to
specs/_recorded/NNN-<plan-name>/, whereNNNis a record-time sequence number
/speq:plan-pr and /speq:implement-pr run the same Plan → Implement → Record cycle unattended. Without a live interview, each decision that would normally prompt with AskUserQuestion either takes a documented default or becomes an open question posted on the PR for later reply.
/speq:plan-pr <intent> → PR (draft; + open questions if blocked)
│
(reply on the PR, or /speq:plan <name> locally)
│
▼
/speq:implement-pr <name> → same PR, updated + marked ready
- One branch per plan:
feat/<plan-name>, created by/speq:plan-prand reused by/speq:implement-pr. Both push to the same PR; there is no separate plan-only branch. - Blocked state: if planning hits a decision that genuinely needs a human (irreversible, architecturally divergent, or security/compliance relevant),
specs/_plans/<plan-name>/open-questions.mdis written,plan.mdis flagged blocked, and the PR opens as a draft with the questions posted as a comment./speq:implement-prrefuses to proceed while this file exists. - Resuming: either reply on the PR and re-run
/speq:plan-pr <plan-name>(it re-fetches new comments and reviews as answers), or check out the branch and finish interactively with/speq:plan <plan-name>. - Headless defaults:
/speq:implement-prauto-answers yes to/speq:record's library-split question. - PR title & lifecycle: the PR title uses a conventional-commit feature title
<type>(<scope>): <slug>derived from the plan-name (add-search-candle⇒feat(search): add search candle), not thespec(plan):commit prefix./speq:plan-propens it as a draft;/speq:implement-prmarks it ready once the implementation is pushed. - Git/PR mechanics: both skills delegate every branch, commit, push, and PR operation to
git-agent— the one sub-agent permitted to write git history or touch a remote. See Model Routing.
Health-check a speq project in one read-only pass, then fix each finding after asking permission for the change.
Use when:
- Inheriting or cloning a speq project and gauging its state
- Periodically, to catch spec-library drift
Checks: spec-library <domain>/<feature> structure, speq feature validate, decision-log format and validity, mission.md ↔ spec-library sync (delegated to audit-agent), unrecorded plans in _plans/, gitignore hygiene (_recorded ignored; _decision/_plans tracked), recorded-folder naming, library thresholds, and git hygiene.
Output: a BLUF summary — a verdict, a ✓/✗/⚠ checks table, and numbered remediations. Structural fixes (migrate an old decision-log.md, restructure domains) and the /speq:mission handoff for mission drift run only after the user confirms.
Reusable guidance invoked by workflow skills:
| Skill | Purpose |
|---|---|
/speq:code-tools |
Semantic code navigation via Serena Model Context Protocol (MCP) |
/speq:ext-research |
External docs via Context7 and WebSearch |
/speq:code-guardrails |
Code quality guardrails |
/speq:git-discipline |
Git read-only rules |
/speq:cli |
speq CLI usage patterns |
/speq:writing-guardrails |
Prose style rules for speq artifacts and GitHub PRs/issues/comments |
See MCP Servers for details on Serena and Context7.