Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Um comando direto ignora o prompt de revisão. Verifique a origem antes de executá-lo.
Specification-driven workflow system for AI-assisted development. Use when the user mentions "spec system", "session workflow", "create PRD", "UX PRD", "plan session", "implement session", "validate session", "code review", "creview", "phase build", "session scope", "task checklist", "initspec", "plansession", "audit", "pipeline", "infra", "carryforward", "documents", "copush", "sculpt-ui", "seshsplit", "session split", "split plan into sessions", "docker build", "upstream changes", "quick implement", "quick frontend", "quick backend", "pull upstream", or when working in a project containing a .spec_system/ directory. Philosophy: 1 session = 1 spec = 2-4 hours (12-25 tasks).
version
2.1.20-codex
Apex Spec Workflow
A specification-driven workflow system for AI-assisted development that breaks
large projects into manageable 2-4 hour sessions with 12-25 tasks each.
Core Philosophy
1 session = 1 spec = 2-4 hours (12-25 tasks)
Break large projects into manageable, well-scoped implementation sessions that
fit within AI context windows and human attention spans.
A collection of sessions is a phase. A collection of phases is a mature/late
technical PRD.
Session Scope Rules
Hard Limits (Reject if Exceeded)
Limit
Value
Maximum tasks
25
Maximum duration
4 hours
Objectives
Single clear objective
Ideal Targets
Target
Value
Task count
12-25 (sweet spot: 20)
Duration
2-3 hours
Focus
Stable/late MVP
Command Structure
The skill exposes 24 commands total: 14 staged workflow commands and 10 utility
commands. The staged workflow drives the spec lifecycle; utility commands are
listed separately and run outside the session workflow.
Autonomous Command Contract
Every command runs autonomously. Commands must not ask questions, request
approval, wait for feedback, or insert an interactive review stop into the
workflow. When information is incomplete, choose the safest evidence-backed
default, record the assumption, and continue. When an external requirement such
as credentials, sudo access, billing, or a third-party dashboard action makes
progress impossible, stop after preserving all completed work and report the
blocker as a fact; do not ask for a decision.
Every command response must end with an explicit handoff that another agent can
follow without interpretation:
Summary:
- [facts about what changed or why no change was made]
Next command: `command-name` OR `none`
Reason: [why that command is the correct next workflow step]
Use none only when the project is complete or the command is a utility that
does not participate in the staged workflow.
The 14-Command Workflow
The workflow has 3 distinct stages:
Stage 1: INITIALIZATION (One-Time Setup)
initspec -> Set up spec system in project
|
v
createprd -> Generate PRD from requirements doc (optional)
|
v
createuxprd -> Generate UX PRD from design docs (optional)
|
v
phasebuild -> Create first phase structure (session stubs)
Stage 2: SESSIONS WORKFLOW (Repeat Until Phase Complete)
plansession -> Analyze project, create spec + task checklist
|
v
implement -> AI-led task-by-task implementation
|
v
creview -> Review and repair all uncommitted changes
|
v
validate -> Verify session completeness
|
v
updateprd -> Sync PRD, mark session complete
|
+-------------> Loop back to plansession
until ALL phase sessions complete
After a successful plansession run that creates the session spec and task checklist, the next workflow command is always implement.
After a successful implement run, the next workflow command is always
creview. After a successful creview run, the next workflow command is
validate.
After a successful updateprd run, the next workflow command has two paths: return to plansession if the phase still has unfinished sessions; otherwise exit the session loop and begin Phase Transition at audit.
Stage 3: PHASE TRANSITION (After All Previous Phase Sessions Are Complete)
audit -> Local dev tooling (formatter, linter, types, tests)
|
v
pipeline -> CI/CD workflows (quality, build, security)
|
v
infra -> Production infrastructure (health, security, deploy)
|
v
carryforward -> Capture lessons learned
|
v
documents -> Audit and update documentation
|
v
phasebuild -> Create next phase structure
|
v
-> Return to Stage 2 for new phase
carryforward does not jump directly to plansession. The usual handoff is
carryforward -> documents -> phasebuild; however, run phasebuild only if
PRD.md still defines another unfinished phase. If PRD.md has no remaining
phase, the workflow ends after documents and the project is complete.
Utility Commands (Safe at Any Time)
These 10 commands are not part of the required staged workflow. They run outside
the session workflow and can be used for support tasks at any time:
Command
Purpose
copush
Pull, version-bump, commit all changes, push to origin
sculpt-ui
Guide AI-led creation of distinctive frontend interfaces
seshsplit
Insert or refresh a session split plan inside a text or Markdown plan file
dockbuild
Quick Docker Compose build and start
dockcleanbuild
Clean Docker environment and rebuild from scratch
up2imp
Audit upstream changes and curate implementation list
qimpl
Context-aware autonomous implementation session
qfrontdev
Autonomous frontend implementation session
qbackenddev
Autonomous backend/infrastructure development session
pullndoc
Git pull upstream repo and document imported changes
Command Dispatch
When the user requests a specific command or workflow step, read the corresponding
reference document from this skill's references/ directory and follow
its instructions exactly. Match the user's intent to the closest entry
in the table below.
Stage 1: Initialization Commands
User Keywords
Reference File
Description
"init", "initialize", "setup spec"
references/initspec.md
Set up spec system in project
"create PRD", "PRD", "requirements"
references/createprd.md
Generate master PRD from requirements
"UX PRD", "design PRD"
references/createuxprd.md
Generate UX PRD from design docs
"phase", "new phase", "phase build"
references/phasebuild.md
Create phase structure with session stubs
Stage 2: Session Workflow Commands
User Keywords
Reference File
Description
"plan session", "next session"
references/plansession.md
Analyze project, create spec and task checklist
"implement", "execute tasks"
references/implement.md
AI-led task-by-task implementation
"code review", "creview", "review and repair"
references/creview.md
Review and repair all uncommitted changes
"validate", "verify session"
references/validate.md
Verify session completeness
"update PRD", "mark complete"
references/updateprd.md
Sync PRD, mark session complete
Stage 3: Phase Transition Commands
User Keywords
Reference File
Description
"audit", "dev tools", "linting"
references/audit.md
Local dev tooling setup
"pipeline", "CI/CD", "workflows"
references/pipeline.md
CI/CD workflow configuration
"infra", "infrastructure"
references/infra.md
Production infrastructure setup
"carry forward", "lessons learned"
references/carryforward.md
Capture lessons and security posture
"documents", "documentation"
references/documents.md
Audit and update documentation
Utility Commands
User Keywords
Reference File
Description
"copush", "push", "bump version"
references/copush.md
Pull, bump, commit, push
"sculpt", "UI design", "frontend design"
references/sculpt-ui.md
Distinctive frontend interface design
"seshsplit", "session split", "split plan into sessions"
The system auto-detects monorepo structures. Single .spec_system/ at the
repo root. Sessions reference their target package in metadata (spec.md
header and state.json), not in directory names. Sessions interleave across
packages within a phase.
Scripts
Project analysis scripts provide deterministic state facts and environment
verification. Scripts are copied to .spec_system/scripts/ during
initialization (via the initspec workflow step).
Script Locations
Scripts can be found in two places. Local scripts take precedence:
Local (per-project): .spec_system/scripts/ -- copied during init
Skill directory: scripts/ -- bundled with this skill