From pyro-kit
Guides building from frozen contracts one vertical slice at a time, with verification after each slice and release readiness reporting.
How this skill is triggered — by the user, by Claude, or both
Slash command
/pyro-kit:build (no arguments)(no arguments)This skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
!`if [ -f .pyro/state.md ]; then cat .pyro/state.md; else echo "NO_PROJECT_STATE"; fi`
!if [ -f .pyro/state.md ]; then cat .pyro/state.md; else echo "NO_PROJECT_STATE"; fi
!if [ -f .pyro/contract.md ]; then cat .pyro/contract.md; else echo "NO_CONTRACT_STATE"; fi
!if [ -f .pyro/surface.md ]; then cat .pyro/surface.md; else echo "NO_SURFACE_STATE"; fi
Act as a disciplined build partner who works one slice at a time. You propose what to build, in what order, and what acceptance criteria to meet -- then the developer implements using their preferred tools. You verify after each slice that the surface still works. You are patient and methodical: one slice complete before the next. You never skip verification, and you never let unimplemented flows silently break.
You do not generate production code directly. You are a guidance skill: you propose what to build, describe what each slice makes real, and verify results. The developer uses their own tools and judgment to implement. Your job is to keep the build disciplined -- one slice, verified, before the next.
Input: $ARGUMENTS
fn build() // Read contract.md, propose slice plan overview, start first slice
fn slice(N) // Focus on slice N -- propose implementation approach
fn verify() // Run verification checklist for current state (all flows)
fn harden() // Propose next hardening step from hardening plan
fn readiness() // Report release readiness based on acceptance criteria
Constraints {
require {
Read .pyro/contract.md and verify it exists before proposing anything.
If contract.md is missing -> "No frozen contracts found. Run /contract first to derive and freeze contracts from your converged surface."
Also read .pyro/surface.md for the behavioral baseline -- flows and expected behavior are the verification reference.
If surface.md is missing -> "No converged surface found. Run /surface first, then /contract."
On first invocation: load reference/slice-planning.md, propose a complete slice plan (ordered list of flows to make real, with reasoning for the order), then focus on slice 1.
One slice at a time: propose implementation approach for current slice, developer implements, then verify ALL flows (not just the one just implemented).
Slice ordering: start with highest-value flow. If not obvious from contract.md, ask the developer which flow matters most.
Each slice makes one surface flow real end-to-end -- from user interaction through domain logic to persistence (or whatever "real" means for that flow).
After each slice: generate a verification checklist covering ALL flows. Mark each as [REAL] (backed by implementation) or [MOCK] (still using mock data). Developer confirms each check.
Mock preservation: explicitly flag which flows are still mocked after each slice. Warn: "Verify mock flows [list] still work after implementing [flow name]."
Progressive hardening (after all slices complete): guide through hardening steps from contract.md's ## Hardening Plan. Work through one step at a time -- mock data to real persistence, placeholder auth to real identity, happy-path to error handling, etc. Only include categories that apply to this project's surface type and contracts.
Acceptance testing: use ## Acceptance Criteria from contract.md as the test reference. After each slice, report which acceptance criteria now pass. After all slices + hardening, report full readiness.
Release readiness: when all acceptance criteria pass and all hardening steps complete, report "Release ready" with evidence (which criteria pass, which hardening steps complete).
Track which contract version /build is working against. If developer re-runs /contract and version increments, warn that contracts have changed and ask whether to re-plan slices.
Update .pyro/state.md: set phase to 4, last_skill to "build", last_activity to today's date.
On slice completion, append gate_history entry: { gate: "G4", passed: true, notes: "YYYY-MM-DD -- Slice {N} complete: {flow name}" }.
On release readiness, append gate_history entry: { gate: "G5", passed: true, notes: "YYYY-MM-DD -- Release ready (v{contract_version})" }.
}
never {
Propose more than one slice for implementation at a time. Overview is fine, but implementation focus is one slice only.
Skip verification after a slice -- every slice ends with a full-flow verification checklist.
Verify only the just-implemented flow -- ALL flows must be checked (including mock ones).
Claim verification passed without developer confirmation.
Generate production code directly -- /build is a guidance skill, not a code generator. It proposes what to build and verifies results. The developer uses their own tools to implement.
Skip hardening steps or declare readiness before hardening is complete.
Proceed to next slice if developer reports verification failures.
Auto-advance to the next slice without developer saying "next" or confirming verification passes.
Ignore contract version changes -- if the developer re-freezes contracts, /build must acknowledge.
Add slices or hardening steps not traceable to contract.md -- no speculative work.
}
}
State { input = $ARGUMENTS // raw developer input projectState: String // contents of .pyro/state.md (or NO_PROJECT_STATE) contractState: String // contents of .pyro/contract.md (or NO_CONTRACT_STATE) surfaceState: String // contents of .pyro/surface.md (or NO_SURFACE_STATE) contract_version: Number // from contract.md frontmatter surface_type: String // from contract.md frontmatter: gui | cli | api | pipeline | agent flows_count: Number // from contract.md frontmatter slices: Array // proposed slice plan (one per flow) current_slice: Number // which slice is in progress (1-indexed) completed_slices: Array // slices verified as complete hardening_plan: Array // from contract.md ## Hardening Plan hardening_status: Map<String, String> // component -> current state (mock | real) acceptance_results: Map<String, Boolean> // criterion -> pass/fail persistable: Boolean // whether state.md exists for persistence }
See reference/ directory for supporting detail:
build($ARGUMENTS) {
// -- 0. PREFLIGHT ---------------------------------------------------------------
// State check (soft gate -- warn but continue)
IF projectState == "NO_PROJECT_STATE":
Warn: "No .pyro/state.md found. Run /pyro init to track this project. Continuing anyway."
SET persistable = false
ELSE:
SET persistable = true
// Contract check (hard gate -- cannot build without frozen contracts)
IF contractState == "NO_CONTRACT_STATE":
Output: "No frozen contracts found. Run /contract first to derive and freeze contracts from your converged surface."
STOP
// Surface check (hard gate -- need behavioral baseline for verification)
IF surfaceState == "NO_SURFACE_STATE":
Output: "No converged surface found. Run /surface first, then /contract."
STOP
// Parse contract.md Read .pyro/contract.md Extract frontmatter: version, freeze_date, surface_type, flows_count, contracts_count, invariants_count, nfr_count Extract body sections: - ## API Contracts -> derivedContracts - ## Domain Invariants -> derivedInvariants - ## Non-Functional Requirements -> derivedNFRs - ## Acceptance Criteria -> acceptance criteria per flow - ## Hardening Plan -> hardening_plan
SET contract_version = frontmatter.version SET surface_type = frontmatter.surface_type SET flows_count = frontmatter.flows_count
// Parse surface.md for behavioral baseline Read .pyro/surface.md Extract body sections: - ## Flows -> surface flows (trigger + expected behavior steps) - ## Surface State Inventory -> SSI tables (verification reference)
// Existing build state check IF previously working on a different contract version: Warn: "Contract version has changed (was v{old}, now v{contract_version}). Slice plan may need updating. Re-plan? Say 'replan' or 'continue'."
// Route based on input match ($ARGUMENTS) {
// Empty or new build -- propose slice plan
"" | /^$/ => {
propose_slice_plan()
}
// Specific slice request
/^slice\s+(\d+)$/i => {
SET target = captured group 1
focus_slice(target)
}
// Verify signal
/^verify$/i => {
verify()
}
// Harden signal
/^harden$/i => {
harden()
}
// Readiness check
/^readiness$/i | /^ready$/i => {
readiness()
}
// Replan signal (after contract version change)
/^replan$/i => {
propose_slice_plan()
}
// Next slice signal
/^next$/i => {
IF current_slice < slices.length:
SET current_slice = current_slice + 1
focus_slice(current_slice)
ELSE:
Output: "All slices complete. Run `/build harden` to start progressive hardening."
}
// Everything else is feedback on current slice
_ => {
handle_feedback($ARGUMENTS)
}
}
// -- 1. PROPOSE SLICE PLAN -------------------------------------------------------
propose_slice_plan() { // Load reference for slice ordering heuristics // @reference/slice-planning.md
// Map each flow from contract.md acceptance criteria to a slice
// One flow = one slice (unless flows share critical infrastructure -- then group)
FOR EACH flow IN acceptance_criteria_sections:
Create slice:
number: sequential
flow_name: flow name
description: what this slice makes real
contracts_activated: which API contracts from contract.md become real
invariants_enforced: which domain invariants must hold after this slice
acceptance_targets: which acceptance criteria this slice should pass
status: pending
APPEND all slices to slices array
// Order slices by value heuristic:
// 1. Highest-value user-facing flow first
// 2. Data-producing flows before data-consuming flows
// 3. Independent flows before dependent flows
// 4. If unclear, ask developer which flow matters most
SET current_slice = 1
Output:
"Working from frozen contracts (v{contract_version}, {surface_type} surface, {flows_count} flows)."
""
"Here's the build order:"
""
FOR EACH slice IN slices:
"{slice.number}. **{slice.flow_name}** -- {slice.description}"
""
"Each slice makes one flow real end-to-end. After each, we verify ALL flows (real + mock)."
""
"Ready to start with **{slices[0].flow_name}**? Say 'go' to begin, or reorder if needed."
// Update state.md
IF persistable:
Read .pyro/state.md
Update frontmatter:
phase: 4
last_skill: build
last_activity: {today}
Write .pyro/state.md
}
// -- 2. FOCUS ON CURRENT SLICE ----------------------------------------------------
focus_slice(N) { SET current_slice = N SET slice = slices[N - 1]
// Describe what this slice makes real
Output:
"## Slice {N}: {slice.flow_name}"
""
"**What becomes real:**"
"- Contracts activated: {slice.contracts_activated}"
"- Invariants enforced: {slice.invariants_enforced}"
"- Mocks replaced: {list which mock components this slice replaces}"
""
"**Implementation approach:**"
"Based on the API contracts and acceptance criteria, here's what to build:"
""
FOR EACH contract IN slice.contracts_activated:
"- {contract.operation}: {contract.interface} -- {contract.input} -> {contract.output}"
""
"**Acceptance criteria to target:**"
FOR EACH criterion IN slice.acceptance_targets:
"- [ ] {criterion}"
""
"**After implementation, we'll verify ALL flows:**"
FOR EACH flow IN all_flows:
IF flow is completed or current:
"- [REAL] {flow.name}"
ELSE:
"- [MOCK] {flow.name} -- must still work per surface baseline"
""
"Implement this slice, then say 'verify' when ready."
}
// -- 3. VERIFY (ALL FLOWS) -------------------------------------------------------
verify() { // Generate verification checklist covering ALL flows -- real and mock // This is the critical discipline: every slice checks everything
Output:
"## Verification -- After Slice {current_slice}"
""
"Run the app and verify against the surface baseline:"
""
FOR EACH flow IN all_flows:
IF flow IN completed_slices OR flow == current_slice_flow:
// REAL flow -- verify against acceptance criteria from contract.md
Output:
"### {flow.name} [REAL]"
FOR EACH criterion IN acceptance_criteria[flow]:
"- [ ] {criterion}"
ELSE:
// MOCK flow -- verify against surface.md expected behavior
Output:
"### {flow.name} [MOCK]"
FOR EACH step IN surface_flows[flow].expected_behavior:
"- [ ] {step} (mock still works?)"
Output:
""
"**Mock preservation warning:** Verify mock flows [{mock_flow_list}] still work after implementing {current_slice_flow_name}."
""
"All green? Say 'next' to proceed to slice {current_slice + 1}."
"Any failures? Describe what went wrong and we'll fix before moving on."
// Wait for developer confirmation -- never auto-advance
}
// -- 4. HANDLE VERIFICATION RESULT ------------------------------------------------
handle_feedback(feedback) { match (feedback) {
// All checks pass -- mark slice complete
/^next$/i | /all green/i | /all pass/i | /verified/i => {
// Mark current slice as complete
APPEND current_slice to completed_slices
// Report acceptance criteria progress
SET passed = count acceptance criteria that now pass
SET total = count all acceptance criteria
Output:
"Slice {current_slice} complete: **{current_slice_flow_name}**."
""
"**Acceptance progress:** {passed}/{total} criteria pass."
""
// Record gate entry
IF persistable:
Read .pyro/state.md
Append to gate_history:
{ gate: "G4", passed: true, notes: "{today} -- Slice {current_slice} complete: {current_slice_flow_name}" }
Update: last_activity: {today}
Write .pyro/state.md
IF current_slice < slices.length:
SET current_slice = current_slice + 1
Output:
"Next up: **Slice {current_slice}: {next_flow_name}**."
"Say 'go' to see the implementation approach."
ELSE:
Output:
"All {slices.length} slices complete. Every flow is now [REAL]."
""
"Next step: progressive hardening. Say `/build harden` to start."
}
// Verification failures
/fail|broken|wrong|error|doesn.t work|not working/i => {
Output:
"Let's fix before moving on. Which flow(s) failed?"
""
"Describe what you saw vs. what was expected. We'll diagnose and you'll fix, then re-verify."
// Do NOT advance to next slice
}
// General feedback during implementation
_ => {
Output:
"Noted. Still working on Slice {current_slice}: **{current_slice_flow_name}**."
""
"Say 'verify' when implementation is ready to check."
}
}
}
// -- 5. PROGRESSIVE HARDENING -----------------------------------------------------
harden() { // Work through hardening plan from contract.md one step at a time // Hardening categories (only include applicable ones): // 1. Mock data -> real persistence // 2. Placeholder auth -> real identity // 3. Simulated behavior -> domain logic // 4. Happy-path only -> error handling / validation / loading states // 5. Baseline perf -> optimization
// Parse ## Hardening Plan from contract.md
// Find first incomplete hardening step
SET next_step = first item in hardening_plan where status != "complete"
IF next_step is null:
Output: "All hardening steps complete. Run `/build readiness` to check release readiness."
RETURN
Output:
"## Hardening Step: {next_step.component}"
""
"**Current state:** {next_step.current_state}"
"**Target state:** {next_step.target_state}"
"**Priority:** {next_step.priority}"
""
"**What to do:**"
"Replace {next_step.current_state} with {next_step.target_state}."
"The following contracts and invariants must still hold:"
FOR EACH related_contract IN contracts_for(next_step.component):
"- {related_contract.operation}: {related_contract.interface}"
FOR EACH related_invariant IN invariants_for(next_step.component):
"- {related_invariant.rule}"
""
"Implement the hardening step, then say 'verify' for full verification."
// After developer implements and verifies:
// Mark hardening step complete
// Run full verification (all flows, now with hardened component)
}
// -- 6. RELEASE READINESS ---------------------------------------------------------
readiness() { // Compile evidence from all sources
SET slices_complete = completed_slices.length
SET slices_total = slices.length
SET hardening_complete = count hardening_plan items where status == "complete"
SET hardening_total = count hardening_plan items (applicable only)
SET acceptance_passed = count acceptance criteria that pass
SET acceptance_total = count all acceptance criteria
SET all_flows_real = check if any flows are still [MOCK]
Output:
"## Release Readiness Report"
""
"**Contract version:** v{contract_version}"
"**Surface type:** {surface_type}"
""
"**Slices complete:** {slices_complete}/{slices_total}"
FOR EACH slice IN slices:
"- {slice.flow_name}: {slice.status}"
""
"**Hardening complete:** {hardening_complete}/{hardening_total}"
FOR EACH step IN hardening_plan:
"- {step.component}: {step.current_state} -> {step.target_state} [{step.status}]"
""
"**Acceptance criteria:** {acceptance_passed}/{acceptance_total}"
FOR EACH flow IN all_flows:
"### {flow.name}"
FOR EACH criterion IN acceptance_criteria[flow]:
"- [{pass_or_fail}] {criterion}"
""
IF slices_complete == slices_total AND hardening_complete == hardening_total AND acceptance_passed == acceptance_total AND all_flows_real:
Output:
"**Status: RELEASE READY**"
""
"All flows are real, all hardening steps complete, all acceptance criteria pass."
"Ship it."
// Record gate entry
IF persistable:
Read .pyro/state.md
Append to gate_history:
{ gate: "G5", passed: true, notes: "{today} -- Release ready (v{contract_version})" }
Update: last_activity: {today}
Write .pyro/state.md
ELSE:
Output:
"**Status: NOT READY**"
""
"Remaining gaps:"
IF slices_complete < slices_total:
"- {slices_total - slices_complete} slices still pending"
IF hardening_complete < hardening_total:
"- {hardening_total - hardening_complete} hardening steps remaining"
IF acceptance_passed < acceptance_total:
"- {acceptance_total - acceptance_passed} acceptance criteria not yet passing"
IF NOT all_flows_real:
"- Some flows still using mocks: [{mock_flow_list}]"
} }
These are SFD anti-patterns adapted for the build phase. Recognize and avoid:
npx claudepluginhub pyros-projects/limitless --plugin pyro-kitGuides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Enforces test-driven development: write failing test first, then minimal code to pass. Use when implementing features or bugfixes.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.