sflow-plan

Route a spec-driven Story toward an approved plan.

SKILL.md

GitHub

Plan

<!-- 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 plan --json; read its checkpoint, kernel operations and <PHASE>, the step its commands name; not-routed: relay next[], stop.

  2. Relay checkpoint.reason and the ordered next[] exactly.

  3. If the checkpoint is recovery, route it first; nothing else proceeds until its commit reaches the remote.

  4. If the checkpoint is approval, stop: only an authorized human Git identity approves.

  5. At model-generation, require first NOW in next[] = singularity-flow prepare <PHASE>; execute once, use its artifact path. Otherwise relay the route and stop; no seeded/stale drafting. Use the resolved agent, approved inputs and pinned template/constitution. singularity-flow wm compose --phase <PHASE>: use supporting evidence; cite used documents as DOC-nnn — <name>. Derive the plan from approved specification clauses. In Test strategy, fill the planned-evidence table, one row per authoritative clause: fully qualified ID, backticked exact repository-relative paths (never directories, globs, modules or prose), Fulfillment and Observable result. For non-testable clauses use not-applicable: with a reviewed explanation, never to hide unknowns. Non-commentable changes (manifest/lockfile/CI config): ## Supporting files bullets with exact path/reason. Fill Agent brief: approach, surfaces, sequence, proof, risks. tasks.md is advisory, never a gate.

  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. Correct agent findings from governed evidence 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: one recheck, one publication retry if ready, never a loop. Follow returned repairLoop.protocol; stop unchanged. New/modified Expected paths: product source; Planned tests: tests. Test-only obligations use fulfillment test-only with Expected paths = -. Retained files: fulfillment evidence, exact Story evidence path, primary visual/inspection Verification contracts row. Review returned planningEvidenceRepair patches only when sameTurn; recheck. File presence never proves a visual pass.

  7. Report only returned milestones and operations run. Never submit, approve, reject or advance. Show returned next actions as Next in Copilot: /sf-... and exact Terminal equivalent: singularity-flow ...; never omit or guess routes.