sflow-specify

Route a spec-driven Story toward an approved specification.

SKILL.md

GitHub

Specify — route toward an approved specification

<!-- sflow-copilot-pause -->

Reuse a verified pause-aware entry supplied in this invocation before any mutation or selection change; otherwise first run singularity-flow session current --for-agent --json once; pause precedes Git. If paused: native Copilot, only /sf-pause off, never resume implicitly. Reuse binding/personalization.replyName; fresh operation checks/consent remain required.

<!-- sflow-output-contract: clarification-and-artifact -->

Output contract: Author configured artifacts from governed inputs and pinned clarification; publish only after readiness. Approved phase inputs are the earlier steps' outputs and settle what they state: never ask what they answer or search elsewhere for them. Summarize artifacts with verified Markdown-preview links; never paste document bodies, code or diffs into Copilot. For code, list touched paths and observed added/deleted/created line counts; unavailable stays unavailable. Use existing evidence, not extra calls solely for display. Summaries, links and opened previews are not human review or approval. For every next action, honor returned commandGuidance in order: Copilot, Shell, VS Code (model-free) using modelFreeCommand; if absent, say "not available for this action". Missing Copilot: "no verified equivalent". Never invent routes. On a refusal read remediationPlan: run its first read-only step once and follow context.strategy; never retry an unchanged condition or edit an earlier phase to clear it. One returned automatic plan-hash action (such as sync) may run once, then re-enter once. When a result's act.state is author, or it routes back to this skill with nothing for a person to answer, edit, review or confirm, that is this turn's own work: do it, never relay it. A file edit that does not match is not a refusal: read the file again and redo the edit. Run a check only when a returned field or command asks for it; never decide from a step's name, kind or route that it applies. A refusal saying a check does not apply to this step is not a blocker: skip it and continue. Act on a result's act first: its state, do routes and any ask. A bounded result names agentOutput.read ranges and omittedFields text files; read all in one response with your file tool. If your host saved a result to a file you cannot open, run that command again with --for-agent --json; never read the host's copy with shell tools.

<!-- sflow-execution-boundary -->

Boundary: reuse entry ready/workId, cwd=repositoryPath; CLI/workItemRoot paths only; never $HOME. No duplicate lookup. Use exact CLI-returned paths. repositoryPath is command cwd, not a prefix for absolute file paths. Never rebase paths or strip .git/worktrees. Issued private/external files are exact exceptions to repository confinement, not wider read/write permission; writes still need authorization. Resolve relative paths only against their declared base. On failure, preserve the path and error; never search or recreate it. Blocked: relay resolution.issues[].choices too. Eligible risk needs reason/expiry and authorized human confirmation. Never auto-accept risk.

  1. Run singularity-flow specify --json. It returns milestone, checkpoint, kernel operations and <PHASE>, the step its commands name; not-routed: relay next[], stop.
  2. Relay checkpoint.reason and the ordered next[] actions exactly; at model-generation the NOW prepare is your step 5, never a route to end on. Never invent an action the router did not return.
  3. If the checkpoint is recovery, route it first. Nothing else may proceed while a retained commit has not reached its remote.
  4. If the checkpoint is approval, stop: only an authorized human Git identity approves.
  5. At model-generation, require the first NOW action in the returned next[] to be singularity-flow prepare <PHASE>; run that exact returned command once and use its artifact path. If the action differs, stop and relay the returned route; never author a seeded or stale draft. With the resolved agent, approved inputs, pinned template/constitution, and required world-model views, author the specification scenario-first: prioritized Given/When/Then scenarios, actors, empty/failure states, permissions, boundaries, and non-functional requirements. Fill Agent brief with approved intent only; the kernel preserves exact sections for review. Run singularity-flow wm compose --phase <PHASE> once for its Active supporting evidence; under ## Sources cite each document used as DOC-nnn — <name> and list unreadable or unavailable ones as gaps. Where evidence is missing, write [NEEDS CLARIFICATION: <one question grounded in the current Story evidence>], not an invented answer. A blocking marker: ask the person, run singularity-flow clarification record <PHASE> --marker "<question>" --answer "<reply>", write the answer in its place, recheck.
  6. Before publication run singularity-flow phase prepublish <PHASE> --for-agent --json --publish-if-ready (includes draft-check). Unready: singularity-flow recover <WORK-ID> --phase <PHASE> --for-agent --json; stay here. Repair from approved inputs when correction.sameTurn; else route to its owner via correction.guidance/correction.skill. Never invent, pad, blindly delete markers, nest models or overwrite producers. Use returned commands.publish when ready unless publishIfReady.published; absent: relay commands.next, stop. A race-time ARTIFACT_AUTHORING_INCOMPLETE permits one recheck and at most one publication retry if ready, never a loop. Never submit or approve. Follow returned repairLoop.protocol for persistent correction/resume; stop unchanged.
  7. Claim a milestone only when the router returns it.
  8. State the underlying operations you ran.
  9. Show each returned next action as Next in Copilot: /sf-..., then the exact Terminal equivalent: singularity-flow ...; never omit or guess either.