bug-investigator
Use when encountering any bug, test failure, or unexpected behavior during spec-superflow execution, before proposing fixes. Invoked automatically when…
Convert approved planning artifacts into an execution contract. Invoke when the user wants to start building, asks to move from planning to implementation, or when execution-contract.md is missing or stale.
$ npx -y skills add MageByte-Zero/spec-superflow --skill contract-builder --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/contract-builderContext preview
The summary Claude sees to decide when to auto-load this skill.
Convert approved planning artifacts into an execution contract. Invoke when the user wants to start building, asks to move from planning to implementation, or when execution-contract.md is missing or stale.
name: contract-builder description: Convert approved planning artifacts into an execution contract. Invoke when the user wants to start building, asks to move from planning to implementation, or when execution-contract.md is missing or stale.
Converts planning artifacts into a single execution handshake: `execution-contract.md`. Load the baseline with `ssf runtime asset read templates/execution-contract.md`.
Read before generating: `.spec-superflow.yaml` (especially `dp_0_decisions`), `proposal.md`, `specs/`, `design.md`, `tasks.md`, then load `docs/artifact-contract.md` with `ssf runtime asset read docs/artifact-contract.md`.
Read `artifact_language=<concrete-language>` from `dp_0_decisions`. Generate `execution-contract.md` in the same language as that resolved value and the approved planning artifacts. Preserve required schema keywords and code identifiers verbatim; language consistency applies to explanatory prose and headings. If the concrete artifact language is missing or still `auto`, route back to `workflow-start` before writing the contract instead of guessing or silently defaulting to English.
| Source | Extract | |--------|---------| | `proposal.md` → `## Why` + `## What Changes` | Intent Lock (problem + scope) | | `proposal.md` → `## Scope > ### Out of Scope` | Scope Fence | | `specs/` → each `### Requirement:` | Approved Requirements, Scenarios, Test Obligations | | `design.md` → `## Decisions` | Architecture, Interface, Dependency Constraints | | `tasks.md` → numbered task groups | Execution Batches, Completion Definitions, Review Timing |
Before finalizing: 1. List every SHALL/MUST from `specs/` 2. Verify each is reflected in Approved Behavior, has a test obligation, and appears in at least one batch 3. Flag unmapped requirements in Escalation Rules 4. Note cross-batch dependencies
Must make obvious: approved behavior, out-of-scope, constraints, batches, test obligations, review gates, and conditions that force a rewind to planning. Prefer compression over repeating planning details.
After drafting: summarize handoff rules, identify ambiguity, flag unmapped requirements, ask user to approve explicitly. After approval:
ssf state set <change-dir> dp_3_result "approved: <summary>" ssf state set <change-dir> dp_3_timestamp $(date -u +%Y-%m-%dT%H:%M:%SZ)
Advance the state after approval:
ssf state transition <change-dir> bridging ssf state transition <change-dir> approved-for-build
DP-3 is a hard gate — no implementation without this record.
Refresh if: scope changed in proposal, requirements changed in specs, constraints changed in design, batches changed materially in tasks, or the contract no longer matches intent.
Generate a minimal contract only for a legacy Hotfix: Intent Lock (one sentence), Task List (numbered), Approval Gate (DP-3). Skip Scope Fence, Build Rules, Review Gates, Test Evidence. Still requires DP-3 approval. Quick direct execution and direct incident Hotfix do not invoke this skill; they use the signed receipt and finish with `test_result: pass` instead.
Run `ssf state init <change-dir>` to create `.spec-superflow.yaml` with hashes.
For a legacy Hotfix, after writing the minimal contract, run `ssf state init <change-dir>` or `ssf state rebuild <change-dir>` so `contract_hash` is recorded. DP-3 remains mandatory before build.
End every user-facing phase report with this concise handoff. Only a successfully persisted `closing` state and `abandoned` are terminal.
源码级融合 OpenSpec 规划引擎 + Superpowers 执行纪律的 AI 编程工作流插件。17 平台支持,9 skills,Spec-first,契约驱动。
Repo: MageByte-Zero/spec-superflow
Use when encountering any bug, test failure, or unexpected behavior during spec-superflow execution, before proposing fixes. Invoked automatically when…
Govern implementation from an approved execution contract. Invoke when execution-contract.md is approved and the user wants disciplined build work, TDD…
Review completed implementation batches for spec compliance and code quality. Invoke after execution batches complete, before merging, or when a review gate is…
Clarify intent, scope, constraints, and success criteria before artifact creation. Invoke when the request is fuzzy, the user is comparing options, or the…
Close out a spec-superflow change with verification, summary, and archive readiness. Invoke when implementation is complete, verification is underway, or the…
Sync delta specs to main specs before closure. Invoke while an executing change has delta specs to merge into the main spec base, or when detecting spec drift…