sflow-next

Execute one valid Singularity Flow lifecycle action without chaining later actions.

SKILL.md

GitHub

Execute the next workflow action

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

First run singularity-flow nextsteps --for-agent --json once. It checks pause before Git or Story discovery and returns the verified binding and actions. If paused, use native Copilot; explicit SFlow requests only offer /sf-pause off; never resume implicitly. Use personalization.replyName literally once per reply/suggestion group, never in artifacts or approval identity. Lookup from current cwd (non-Git allowed). Never search /Users, $HOME or parents for a repo. Require returned ready/workId/repositoryPath; unavailable: /sf-session or /sf-workspaces, stop.

<!-- sflow-output-contract: deterministic-mutation -->

Output contract: Let the CLI validate and mutate state; preserve its exact result, warnings, publication status, artifacts, and next actions. 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. 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 this invocation's entry: require ready/workId, valid phaseAgent for active phases; cwd=repositoryPath. Use returned workItemRoot/artifact paths; never $HOME. 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.

  1. Read contextBoundary first: an earlier-phase chat relays its ordered reset commands and stops; a fresh chat continues. Chat resets have no Shell/model-free equivalent. Use binding/phase/first NOW; refuse ACTIVE_SUBJECT_MISMATCH. No duplicate pause/session/status or inferred --task/Story. preparation delegates composition to the entry-capable author; never waive grounding or rebuild.
  2. Never run singularity-flow next. Load one returned SFlow skill route (any /sf-* or /sflow-* route), use its configured producer/channel, complete its preflight, execute at most its one authorized action, and stop. Relay, never run, human-decision routes (/sf-approve, /sf-confirm, /sf-decide, /sf-review-decide, /sf-reject, any approval or decision): the person types them; a route's arguments are never their answer.
  3. Sole no-skill exception: when snapshot state=publication_pending and its first NOW command equals singularity-flow sync, show it and explain it retries only the retained commit. Run singularity-flow sync <WORK-ID> once in the verified cwd, then stop; never follow THEN, invoke /sf-nextsteps or /sf-next, or retry.
  4. Follow the selected skill; never rewrite it to /sf-phase. Pass only this invocation's verified packet and its input preview to the selected skill; do not repeat its boundary lookup. If the selected action is /sf-code or any singularity-flow prepare <phase> authoring route, do not imitate or inline it, nor run it: report Next in Copilot: /sf-code or its skill and stop; preserve /sflow-code likewise. Never publish a delegated action or chain another lifecycle action.
  5. On failure follow remediationPlan's first read-only step. Never add --apply without the reviewed plan and exact confirmation. ARTIFACT_AUTHORING_INCOMPLETE permits one recheck and correction handoff, not a retry loop.
  6. Input/audit actions use returned metadata, not phase show or marker searches. Read exact returned paths only when needed; no broad repository/skill searches.
  7. Preserve returned telemetry, warnings, hashes and effects. Separate Completed action from Next action; never claim the next action was taken. Use the action result's continuation; only if absent run singularity-flow nextsteps <WORK-ID> --for-agent --json once. Copy the first NOW action's copilotCommand and command from that same action object; render all three surfaces per the Output contract. Never pair /sf-phase with singularity-flow next. Do not automatically submit a generation you just published.
  8. Relay, never execute, chat resets. After the user resets, rebuild binding without repeating the reset solely because boundary metadata remains.