sflow-logs

Explain what a Singularity Flow command actually did.

SKILL.md

GitHub

Read the activity log

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

Read-only utility: run the requested read once with --utility-entry --for-agent --json (default singularity-flow logs --utility-entry --for-agent --json). Keep explicit Work IDs/filters; do not replace requested edits with a list. Eligible forms: status, progress, nextsteps, logs, agents list/mappings/status, workflow list, skill/instruction list/show without retained selectors. It checks pause before Git and returns verified repositoryPath plus data; no separate pause/session/workspace lookup or STATUS.md read. If paused, native Copilot; only offer /sf-pause off, never resume implicitly. Other forms: Before any boundary lookup or SFlow action, run singularity-flow pause status --json and follow its data.agentInstruction. If data.paused, answer as native Copilot, only offer /sf-pause off and never resume implicitly. Reads never authorize mutations; preserve later gates. If unsupported, stop with the compatibility error, never retry blindly.

<!-- sflow-output-contract: concise-relay -->

Output contract: Relay requested CLI fields or output faithfully; preserve warnings/errors and only the explanations required below. 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.

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

Boundary: no Story required; cwd=opened Git root or verified repositoryPath from singularity-flow workspace current --json; refuse if neither resolves; never search $HOME/parents. 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.

Run singularity-flow logs $ARGUMENTS. This command is read-only: it never changes repository, workflow, or lifecycle state, and it works even while a session is gated — a blocked session is exactly when the log matters.

Start narrow and widen only if needed:

singularity-flow logs --level error          # what failed
singularity-flow logs --level warn           # failures and refusals
singularity-flow logs --event hook           # why a tool call was refused
singularity-flow logs --event copilot        # what a native Copilot handoff did
singularity-flow logs --tail 200             # more history
singularity-flow logs level                  # effective levels and the log path
singularity-flow logs performance --limit 1  # latest opt-in classified timing

For sparse logs, ask for a raised-level capture:

SINGULARITY_FLOW_LOG_LEVEL=all singularity-flow <the failing command>

In PowerShell: $env:SINGULARITY_FLOW_LOG_LEVEL="all"; singularity-flow <the failing command> (it stays set for that session).

How to read what you find

For performance, never sum nested/parallel time; missing model metrics are unavailable, not zero. Capture is opt-in; never rerun mutations for timings.

  • command.failed carries the exact message, exit code, duration, and stack. Report the message and the failing command, not a paraphrase.
  • hook.guard.deny means Singularity Flow refused a tool call. The reason field says which selection was missing. Fix the cause — usually /sf-session — rather than retrying the same call.
  • hook.session.initiative means the branch is a governed initiative, where no work/Jira selection applies.
  • copilot.turn-complete carries the stop reason. A turn that completed with no proposal is a real outcome, not a pending one; say so and look for a nearby copilot.permission-denied or copilot.error that explains it.
  • log.unreadable is a truncated final line, normal when a process died mid-write. Treat it as evidence of a crash.

Reporting rules

Quote the event, the timestamp, and the message verbatim for the entries that matter, and summarize the rest. Never invent an entry, never describe a log you did not read, and never claim a cause the log does not support — say what is missing and how to capture it instead.

The log is machine-local under .git/singularity-flow/logs/ and is never committed, so it is safe to read but it is not shared evidence: do not cite it as governance or approval evidence for a phase.

Secrets are already redacted before anything is written. If a value still looks like a credential, report the field name only and never repeat the value.