Best for
- Use when asked to capture this as a spec.
gmickel/flow-next/plugins/flow-next/codex/skills/flow-next-capture/SKILL.md
Synthesize the current conversation into a flow-next spec with read-back gating. Use when asked to capture this as a spec.
Decision brief
A free-form discussion (or a /flow-next:prospect survivor) frequently produces enough material for a complete spec, but stops short of the formal flowctl spec create + spec set-plan heredoc documented in CLAUDE.md. Without an explicit synthesis step, that context decays — the ne…
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/gmickel/flow-next --skill "plugins/flow-next/codex/skills/flow-next-capture"Inspect the Agent Skill "flow-next-capture" from https://github.com/gmickel/flow-next/blob/1300e43304f9ecda78250d935847998ae4bee84e/plugins/flow-next/codex/skills/flow-next-capture/SKILL.md at commit 1300e43304f9ecda78250d935847998ae4bee84e. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
if [[ "$RAWARGS" == "--override-strategy" ]]; then OVERRIDESTRATEGY=1 RAWARGS="${RAWARGS//--override-strategy/}" fi bash if [[ -n "${REVIEWRECEIPTPATH:-}" || "${FLOWRALPH:-}" == "1" ]]; then echo "Error: /flow-next:capture requires conversation context + a user at the terminal;…
Execute the phases in workflow.md in order:
Clear meaningful ideas and finished chart briefings route here - to capture (or direct spec authoring). Capture does not manufacture a chart for clear work. When intent and boundaries are already stateable, skip chart (signal absent). After a structured brief lands, narrow or sk…
When the conversation (or $ARGUMENTS) references a chart briefing — a path under .flow/charts/-briefing.md, an explicit B-ID (B1, B2, …), or a chart id with a published briefing — capture treats that briefing as attributable evidence, not as pre-tagged acceptance criteria:
CRITICAL: flowctl is BUNDLED — NOT installed globally. which flowctl will fail (expected). Define once; subsequent blocks (here and in workflow.md / phases.md) use $FLOWCTL:
Permission review
The documentation asks the agent to read local files, directories, or repositories.
**Detect** the briefing input early (Phase 1 evidence). Read the index (and cluster file when multi-spec). Record chart id, B-ID, cluster key (if any), D-ID links, and approved asset references.The documentation asks the agent to create, modify, or delete local files.
**Read-back loop (mandatory, even in autofix)** — Write the full draft ONCE to a literal unique path (workflow.md §4.1). **Interactive print-then-ask (R13):** print the FULL draft markdown (and rewrite-mode diff when applicable) as an ordinEvidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 91/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 672 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
A free-form discussion (or a /flow-next:prospect survivor) frequently produces enough material for a complete spec, but stops short of the formal flowctl spec create + spec set-plan heredoc documented in CLAUDE.md. Without an explicit synthesis step, that context decays — the next session loses the conversation, the spec never lands, and the user re-explains the same idea to /flow-next:plan.
Ask the user via plain text. Render the options below as a numbered list 1. … N., followed by a final option N+1. Other — type your own answer. Print the question, then the numbered list, then stop and wait for the user's next message before continuing. Parse the reply as: a bare number 1–N+1 → that option; the literal text of an option label → that option; free text after Other → custom answer.
This skill IS the synthesis. The host agent (Claude Code / Codex / Droid) extracts the recent user turns, drafts a CLAUDE.md-shaped spec with per-line source tags ([user] / [paraphrase] / [inferred] / [strategy:<track>]), prints the full draft as ordinary markdown then issues a short approval ask (print-then-ask — never embed multi-paragraph drafts in plain-text numbered prompt bodies), and only then writes the spec via existing flowctl plumbing. There is no Python synthesizer, no codex / copilot subprocess, no fast-model classifier. The host agent is already an LLM and does the work directly.
flowctl provides thin spec plumbing (spec create, spec set-plan, optional spec set-branch, memory search for duplicate detection) plus the chart handoff callback (chart link-spec) after a successful chart-briefing capture. Capture never writes chart files and never mutates a chart's ready flag; chart never writes .flow/specs.
Clear meaningful ideas and finished chart briefings route here - to capture (or direct spec authoring). Capture does not manufacture a chart for clear work. When intent and boundaries are already stateable, skip chart (signal absent). After a structured brief lands, narrow or skip interview only once read-back proves no material gaps - never pre-skip interview on hope. Unsure: /flow-next:guide.
When the conversation (or $ARGUMENTS) references a chart briefing — a path under .flow/charts/*-briefing*.md, an explicit B-ID (B1, B2, …), or a chart id with a published briefing — capture treats that briefing as attributable evidence, not as pre-tagged acceptance criteria:
status: draft) is never treated as final. A stale B-ID (after chart reopen or supersession of linked D-IDs) is refused by default.## Decision Context / evidence sections as links and references — never with trailing [user] / [paraphrase] / [inferred] / [strategy:<track>] tags.[user].spec create → spec set-plan → flowctl chart link-spec <chart> --briefing <B> --spec <S> --decisions <D,...> [--cluster <k>]. Call link-spec only after each successful spec creation. Decline records nothing and leaves the chart resumable.produced_specs[] (and existing specs) for this B-ID+cluster identity; if a link already exists, link/use that spec instead of minting a duplicate. Partial multi-spec capture records only successful links and resumes the failed cluster without duplicating the first. Shared-context D-IDs stay attributable in each handoff but become acceptance requirements only where read-back confirms the target spec needs that guarantee.Read workflow.md for the full phase-by-phase execution. Read phases.md for the must-ask cases lookup, source-tag taxonomy, confidence tiers, and forbidden-behaviors list.
CRITICAL: flowctl is BUNDLED — NOT installed globally. which flowctl will fail (expected). Define once; subsequent blocks (here and in workflow.md / phases.md) use $FLOWCTL:
FLOWCTL="${CODEX_HOME:-$HOME/.codex}/scripts/flowctl"
[ -x "$FLOWCTL" ] || FLOWCTL=".flow/bin/flowctl"
Inline skill (no context: fork) — plain-text numbered prompt must stay reachable across phases. Subagents can't call plain-text numbered prompts (Claude Code issues #12890, #34592). Phase 0 (duplicate detection) and Phase 4 (read-back loop) both require user choice in interactive mode.
Parse $ARGUMENTS for the literal token mode:autofix and the flags --rewrite <spec-id>, --from-compacted-ok, --yes, --override-strategy. Strip recognized tokens; whatever remains is treated as freeform context (ignored — the conversation is the input, not $ARGUMENTS).
RAW_ARGS="$ARGUMENTS"
MODE="interactive"
REWRITE_TARGET=""
FROM_COMPACTED_OK=0
COMMIT_YES=0
OVERRIDE_STRATEGY=0
# Mode token
if [[ "$RAW_ARGS" == *"mode:autofix"* ]]; then
MODE="autofix"
RAW_ARGS="${RAW_ARGS//mode:autofix/}"
fi
# --rewrite <id>
if [[ "$RAW_ARGS" =~ --rewrite[[:space:]]+([^[:space:]]+) ]]; then
REWRITE_TARGET="${BASH_REMATCH[1]}"
RAW_ARGS="${RAW_ARGS//--rewrite ${REWRITE_TARGET}/}"
fi
# --from-compacted-ok
if [[ "$RAW_ARGS" == *"--from-compacted-ok"* ]]; then
FROM_COMPACTED_OK=1
RAW_ARGS="${RAW_ARGS//--from-compacted-ok/}"
fi
# --yes (autofix commit gate)
if [[ "$RAW_ARGS" == *"--yes"* ]]; then
COMMIT_YES=1
RAW_ARGS="${RAW_ARGS//--yes/}"
fi
# --override-strategy (Phase 5.0 strategy-contradiction override)
if [[ "$RAW_ARGS" == *"--override-strategy"* ]]; then
OVERRIDE_STRATEGY=1
RAW_ARGS="${RAW_ARGS//--override-strategy/}"
fi
| Mode | When | Behavior |
|---|---|---|
| Interactive (default) | User is at the terminal | Phase 0 asks on duplicate detection; Phase 3 asks on must-ask ambiguities; Phase 4 print-then-ask read-back (full draft as ordinary markdown, then short plain-text numbered prompt) — write only on approve |
Autofix (mode:autofix) | Batch usage from another skill / scripted invocation | No user questions. Phase 0 hard-errors on duplicates / relevant evidence made incomplete by compaction without explicit overrides. Historical compaction signals alone do not block. Phase 3 must-ask cases hard-error (autofix can't ask). Phase 4 Writes the full draft once + prints the summary tally to stdout (autofix path unchanged). Writes to .flow/ ONLY when --yes is also passed; without --yes, exit 0 with "draft written; rerun with --yes to commit" |
--rewrite <id> was passed; relevant capture evidence is missing / truncated / summary-only after compaction → exit 2 unless --from-compacted-ok was passed. A historical compaction marker or system-summary block alone is advisory and does not block..flow/ write. Full draft Written once to the §4.1 draft file (all sections + R-IDs); summary payload ([inferred] tally + 8+ acceptance suggestion if applicable) printed to stdout. Without --yes, exit 0 with the "rerun with --yes" hint. With --yes, proceed to Phase 5 write. (Autofix has no interactive print-then-ask; --yes is the consent substitute.)tracker.readyState, and the spec was written). The --rewrite readiness reset (§5.3) still runs — it is idempotent plumbing, not a consent question./flow-next:capture requires conversation context + user confirmation. Autonomous loops have neither. Hard-error with exit 2 when running under Ralph.
if [[ -n "${REVIEW_RECEIPT_PATH:-}" || "${FLOW_RALPH:-}" == "1" ]]; then
echo "Error: /flow-next:capture requires conversation context + a user at the terminal; not compatible with Ralph mode (REVIEW_RECEIPT_PATH or FLOW_RALPH detected)." >&2
exit 2
fi
No env-var opt-in. Ralph never decides direction.
In autofix mode, skip user questions entirely and apply the rules above.
In interactive mode:
plain-text numbered prompt. Never silently skip the question.[high] / [judgment-call] / [your-call]. The body carries the recommendation; option labels stay neutral so the user isn't anchored on the option text itself. (See phases.md §Confidence tiers.) Exception — the Phase 4 read-back never recommends approve while unverified [inferred] items exist (no self-blessing; workflow.md §4.2).R-ID, [inferred] get translated when user-facing); option descriptions state their consequence ("Choose this if…"). Priorities, not length caps — trim repetition and background, never required content.The goal is automated synthesis with human oversight on judgment calls — not a question for every section.
/flow-next:plan (spec-kit convention — capture writes intent, plan writes implementation).[inferred] criteria must surface at Phase 4 read-back so the user can reject them./flow-next:plan task specs after research lands. Capture's output is a high-level spec, not an implementation guide.--rewrite <spec-id> (R8). Without it, Phase 0 conflict-detection branches into extend / supersede / proceed-anyway.context: fork — plain-text numbered prompt must stay reachable.flowctl spec create before Phase 4 approval. Phase 5 is the only write phase.Glossary? approval; autofix prints suggestions only (--yes consents to the spec write, not to vocabulary changes). The gate is husk-aware (glossary list --json total_terms > 0) — seeding an empty glossary is /flow-next:prime's job, never capture's.git add -A from this skill. When committing the new spec, stage only the JSON sidecar (.flow/specs/<id>.json) + .flow/specs/<id>.md (and .flow/meta.json if the next-id counter mutated). Other working-tree changes are not capture's concern.Execute the phases in workflow.md in order:
.flow/specs/ + flowctl memory search on extracted keywords); compaction relevance check (refuse only when the evidence needed for this capture is missing / truncated / summary-only, not merely because history contains a compaction signal); idempotency (refuse silent overwrite without --rewrite); chart-briefing admission when a briefing path/B-ID is in play (refuse draft/stale unless explicit risk override with named D-IDs + read-back).## Conversation Evidence block FIRST (raw quotes from recent user turns, capped ~30 lines). When a chart briefing is in play, also extract chart id / B-ID / cluster / D-ID / asset evidence references (untagged). Spec sections refer to evidence by line, not from agent memory.[user] / [paraphrase] / [inferred] / [strategy:<track>]) only on acceptance criteria and prose capture newly authors. Chart D-ID evidence is never source-tagged. Apply the canonical template at plugins/flow-next/templates/spec.md (per R17 — cross-link, never re-embed the section list inline). At runtime the template is resolved via the 4-tier discovery cascade — first match wins: <repo_root>/SPEC.md → <repo_root>/spec.md → .flow/templates/spec.md → bundled ${PLUGIN_ROOT}/templates/spec.md. The bundled file is the canonical source of truth; earlier tiers are user-customized overrides. Route explicit biz-context signals (nine SIGNAL CATEGORIES per fn-44 R24, only [user] / [paraphrase] tags) to their destinations; sections without conversation signal stay absent. Compute BIZ_SIGNAL_CATEGORIES (0..9) for Phase 6's R25 dispatch.plain-text numbered prompt — one-line pointer + compact [inferred] tally/warnings + options only; never embed multi-paragraph drafts, diffs, or criteria lists in the ask body (they render as collapsed plain text). Never Recommended: approve while unverified [inferred] items exist (workflow.md §4.2). Interactive: approve / edit / abort; edit cycles revise via Edit + full-file Read + reprint the revised draft before each short re-ask. When 8+ acceptance criteria: include consider splitting? as an option (R11). When the glossary is populated (total_terms > 0) and the conversation surfaced new project vocabulary: surface term-add proposals + a consent question after approve (workflow.md §2.7 / §4.2; writes land in §5.8). With no tracker.readyState, a new capture in a repo with adopted local readiness offers one Mark ready? question; a rewrite offers it only when the target itself was ready before the rewrite. An unrelated ready spec never prompts on a draft rewrite. The copy explains Pilot/autonomous eligibility; default keep-draft (workflow.md §4.2; write lands in §5.9). Autofix: prints summary payload to stdout; requires --yes to commit; term proposals print as suggestions, never written; readiness never written (autofix path unchanged).flowctl spec create --title "..." --json → parse id → flowctl spec set-plan <id> --file <literal draft path> --json (consumes the §4.1 draft file — no heredoc re-authoring). When capturing from a chart briefing: after each successful create+set-plan, call flowctl chart link-spec <chart-id> --briefing <B> --spec <id> --decisions <D,...> [--cluster <k>] --json. On retry, discover an already-linked B-ID+cluster identity in produced_specs[] first and link the existing spec instead of creating a duplicate. Decline / abort records nothing. Partial multi-spec: record only successful links; resume the failed cluster. Optional flowctl spec set-branch if user named one. Capture creates fresh specs; allocate R-IDs sequentially from R1. --rewrite resets readiness via idempotent spec unready (§5.3); consented mark-ready lands via spec ready (§5.9). When artifacts.html.enabled is true, Phase 5 closes by regenerating the spec render lens at .flow/artifacts/<id>/spec.html per the shared disclosure reference (plugins/flow-next/references/html-artifacts.md) and replacing the spec's artifact link line in place (workflow.md §5.10); the Phase 6 footer then names the artifact path. With the mode off/unset there is zero artifact-related behavior or output.Spec captured at .flow/specs/<id>.md. plus /flow-next:plan <id> and /flow-next:interview <id> next-step hints. The R25 business-pass suggestion fires when the captured conversation names 1-2 distinct R24 signal categories (the same 1 <= n < 3 rule), agent-judged. When it fires, append the /flow-next:interview --scope=business suggestion line.The new spec is the deliverable — it lives in .flow/specs/<spec-id>.md after Phase 5. Standard output also receives:
Autofix mode without --yes produces a draft + the "rerun with --yes" hint and exits 0 — no write happens, no spec is allocated.
Alternatives
gmickel/flow-next
Synthesize the current conversation context into a flow-next spec at `.flow/specs/<spec-id>.md` via `flowctl spec create + spec set-plan` — agent-native, source-tagged, with mandatory read-back before write. Triggers on /flow-next:capture, "capture spec", "lock down what we discussed", "make a spec from this conversation", "convert conversation to spec". Optional `mode:autofix` token runs without questions and requires `--yes` to commit. Optional `--rewrite <spec-id>` overwrites an existing spec
gmickel/flow-next
Synthesize the current conversation context into a flow-next spec at `.flow/specs/<spec-id>.md` via `flowctl spec create + spec set-plan` — agent-native, source-tagged, with mandatory read-back before write. Triggers on /flow-next:capture, "capture spec", "lock down what we discussed", "make a spec from this conversation", "convert conversation to spec". Optional `mode:autofix` token runs without questions and requires `--yes` to commit. Optional `--rewrite <spec-id>` overwrites an existing spec