con un clic
build
Brief (medium+ tasks), Spec, Implementation plan
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Brief (medium+ tasks), Spec, Implementation plan
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
When --quality-locked is active, loop review/revise at each Quality Gate until findings reach a clean bar (no Critical, no Major, only cosmetic Minor) or the iteration cap (10) is reached. Uses a deterministic Python checker for classification and decision logic; agent runs the actual review and revision steps.
Use after implementation passes the quality gates, when a change needs an independent pass over the code before it ships, or when the user asks to "QA this", "check the implementation", or "verify it matches the spec". Applies to Standard and Comprehensive scopes with the Task tool available; Lightweight tasks skip.
Use when the user picks [A] Review at a spec/plan/ADR/root-cause/fix-plan checkpoint, or asks for an independent review before implementation begins. Applies to Standard and Comprehensive scopes with the Task tool available; Lightweight tasks skip.
Use as the code-quality gate after spec-compliance and constitution checks pass, or when the user says "review my code", "quality check", "security review", or "is this code good". Runs as an independent sub-agent when the Task tool is available.
Adversarial review verifying implementation matches its specification — checks completeness (nothing missing) and precision (nothing extra). Distrusts the implementer's self-report. Use after implementation, or when the user says "check against spec", "does this match requirements", or "verify the implementation".
Configure Sage preset and project settings. Switch between base, startup, enterprise, or opensource constitution presets. Use when the user says "configure sage", "change preset", or "sage settings".
| name | build |
| description | Brief (medium+ tasks), Spec, Implementation plan |
| disable-model-invocation | true |
Feature development guided by Sage.
BEFORE ANYTHING: Scan .sage/work/ for existing artifacts.
This scan is MANDATORY — check the DISK.
Manifest-first path: If .sage/work/*/manifest.md exists, run
python3 "${CLAUDE_PLUGIN_ROOT}/tools/manifest.py" resume (no python3 →
read the manifest by hand). The brief it prints is the primary context
source: resume at the phase indicated, with the manifest body as judgment
context, not orders — the live user outranks recorded decisions,
recorded decisions outrank manifest prose, and evidence outranks all of it.
Fallback path: If no manifest.md but artifacts exist, use file-scan routing (below). Create manifest.md from inferred state before proceeding (backfill). This preserves backward compatibility with pre-v1.0.9 cycles.
File-scan routing (when no manifest):
You MUST follow this routing. Do not override it based on:
Multiple in-progress: Present list: [1] Continue [initiative A] — [phase] [2] Continue [initiative B] — [phase] [3] Start something new
Read .sage/decisions.md for recent context. Read the handoff
field in the most recent artifact's frontmatter if present.
Upstream context: Also scan .sage/docs/ for research and
analysis artifacts (jtbd-, ux-audit-, opportunity-, ux-evaluate-).
If found, announce: "Sage: Found research/analysis context — [list].
Using as build input."
Create manifest.md when the first artifact is saved (brief or spec).
Use the template from core/templates/manifest-template.md.
Update manifest.md at EVERY checkpoint:
gate_state, updated timestampgate_state at each checkpoint (machine field — the spec-gate hook reads it):
[A] → gate_state: spec-approved[A] → gate_state: plan-approvedgate_state: buildinggate_state: gates-passedgate_state: completeUntil gate_state reaches spec-approved, the Claude Code hook blocks edits to
source files — that is Rule 3 made mechanical. Advance it the moment the spec is
approved, not "later"; a stale pre-spec keeps blocking the very work you just
approved.
Context budget pressure: If the conversation is very long (many tool calls, approaching context limits), write a manifest update BEFORE suggesting a session break. This is the critical moment — capture the judgment that's about to be lost.
Session end ([N]): Manifest update is MANDATORY. Write handoff guidance and context summary before ending.
Completion: Set status: complete and gate_state: complete at Step 8.
The completion guard blocks this transition unless gate_state was already
gates-passed — so run the quality gates before closing (Rule 5).
Anti-lazy-manifest contract: Context summary MUST NOT be:
Classify by structural complexity — not time, not gut feeling.
Lightweight: One component, no design decisions, no behavior changes visible to other team members. The change is obvious from the request. → Skip to Step 6, implement directly.
Standard: Multiple components, OR any design decision, OR coordination between modules. Spec file REQUIRED. → spec.md MUST exist at .sage/work/ before implementation. → plan.md MUST exist at .sage/work/ before implementation. → If the task also needs scope definition, write brief first (Step 3).
Comprehensive: New subsystem, cross-cutting changes, or multiple stakeholder impact. → MUST write brief (Step 3) → spec (Step 4) → plan (Step 5) → implement.
Complexity signals (any ONE makes it Standard or above):
Anti-downgrade: When in doubt, classify as Standard, not Lightweight. Do NOT downgrade to Lightweight to avoid writing a spec. If you find yourself thinking "this is simple enough to skip the spec," that thought is the signal to NOT skip the spec.
Present your assessment:
Sage → build workflow. [Scope] — [what makes it this scope]. Starting with [first required step].
If the user explicitly asks to skip a required step, write a minimal 5-line spec anyway (WHAT, WHY, HOW, DONE-WHEN), present [A]/[R], and record the skip rationale in decisions.md.
If scope is unclear or the task is Comprehensive, elicit requirements before defining the brief.
For structured elicitation process, read
sage/core/capabilities/elicitation/quick-elicit/SKILL.md.
It provides 3 focused rounds (~2 minutes):
If quick-elicit cannot be loaded, ask these three questions directly and draft a brief from the answers.
Define: what to build, why, acceptance scenarios, and constraints.
Save to .sage/work/YYYYMMDD-slug/brief.md with frontmatter:
🔒 CHECKPOINT:
Sage: Brief saved to .sage/work/YYYYMMDD-slug/brief.md Decision: [key scope decisions]. (append to .sage/decisions.md)
[A] Approve — continue to spec in this session [R] Revise — tell me what to change [N] New session — type /build to continue with spec
Pick A/R/N, or tell me what to change.
On approval: update brief frontmatter to status: completed.
Append decision to decisions.md (Rule 7).
Define: components, data model, APIs, key decisions, edge cases. Resolve open questions from the brief.
For detailed spec writing process, read
sage/core/capabilities/planning/specify/SKILL.md.
Save to .sage/work/YYYYMMDD-slug/spec.md with frontmatter:
🔒 CHECKPOINT: Sage: Spec saved to .sage/work/YYYYMMDD-slug/spec.md Decision: [key technical decisions]. (append to .sage/decisions.md)
[A] Approve — continue to plan in this session [R] Revise — tell me what to change [N] New session — type /build to continue with planning
Pick A/R/N, or tell me what to change.
On approval: update spec frontmatter to status: completed.
Write handoff field in frontmatter:
handoff: |
Key decisions: [summary of choices made]
Open questions: [what's unresolved]
Risks: [what to watch for during implementation]
Next agent should: [specific guidance for planning phase]
Append decision to decisions.md (Rule 7).
Break into small, independently testable tasks. Each task: what to do, done criteria, files involved. Use checkboxes as a guide.
For detailed planning process, read
sage/core/capabilities/planning/plan/SKILL.md.
Save to .sage/work/YYYYMMDD-slug/plan.md with frontmatter:
🔒 CHECKPOINT:
Sage: Plan saved to .sage/work/YYYYMMDD-slug/plan.md
[A] Approve — start building in this session [R] Revise — tell me what to change [N] New session — type /build to start implementation
Pick A/R/N, or tell me what to change.
On approval: append plan approach to decisions.md (Rule 7).
Execute the plan task by task using the build loop.
Read and follow sage/core/capabilities/orchestration/build-loop/SKILL.md.
It provides:
sage/core/capabilities/execution/tdd/SKILL.md)sage/core/capabilities/context/scope-guard/SKILL.md)sage/core/workflows/sub-workflows/quality-gates.workflow.md)If the build-loop cannot be loaded, follow these minimum rules: implement one task at a time, write tests before code, run full suite after each task, stay in scope, commit after each task.
If relevant Sage skills exist in sage/skills/, read and follow them.
If stuck during implementation: Activate the problem-solving skill.
Match the stuck pattern to a technique — complexity spiral → Simplification,
forced solution → Inversion, works-locally-but-fails → Scale Testing,
can't isolate → Minimal Reproduction.
Run quality gates on the completed implementation.
Read and follow sage/core/workflows/sub-workflows/quality-gates.workflow.md.
It sequences 5 verification stages:
Each gate that fails triggers fix-and-retry (max 3 attempts) or escalation to the user.
If quality-gates cannot be loaded, follow these minimum rules: run full test suite, paste output, verify implementation matches spec, check for hallucinated imports or APIs.
Review against spec. Check for missed edge cases.
🔒 CHECKPOINT:
Sage: Build complete. [summary of what was built] Decision: [key implementation decisions]. (append to .sage/decisions.md)
[A] Approve — merge/ship [R] Revise — here's what needs fixing [V] Verify — type /review for independent verification
Pick A/R/V, or tell me what to change.
On approval — checkpoint state (Rule 7):
status: completed.sage/decisions.mdhandoff field in plan.md frontmatter with key decisions,
open questions, and risks for the next agentNext steps (Zone 3):
Next steps: /qa — browser-based functional testing /design-review — design quality audit /reflect — review the cycle, extract learnings /review — independent code evaluation
Type a command, or describe what you want to do next.
Communication style: Engineering precision. Emphasize trade-offs, edge cases, and implementation specifics. Reference file paths, function names, and test results concretely.
Good build output:
Before presenting completed work, check each criterion above. Also: