Agent Skills › gmickel/flow-next › flow-next-capture

flow-next-capture

GitHub

将对话内容捕获并转化为带来源标记的 flow-next 规格说明书,支持重写、目标模式等场景,通过 flowctl 持久化存储并提供编辑选项。

plugins/flow-next/codex/skills/flow-next-capture/SKILL.md gmickel/flow-next

Trigger Scenarios

用户要求保存当前讨论为规格说明 从自由讨论或目标模式中合成正式文档

Install

npx skills add gmickel/flow-next --skill flow-next-capture -g -y
More Options

Non-standard path

npx skills add https://github.com/gmickel/flow-next/tree/main/plugins/flow-next/codex/skills/flow-next-capture -g -y

Use without installing

npx skills use gmickel/flow-next@flow-next-capture

指定 Agent (Claude Code)

npx skills add gmickel/flow-next --skill flow-next-capture -a claude-code -g -y

安装 repo 全部 skill

npx skills add gmickel/flow-next --all -g -y

预览 repo 内 skill

npx skills add gmickel/flow-next --list

SKILL.md

Frontmatter
{
    "name": "flow-next-capture",
    "description": "Save the current conversation as a source-tagged flow-next spec, then offer review or editing. Use when asked to capture this as a spec.",
    "allowed-tools": "Read, Bash, Grep, Glob, Write, Edit, Task",
    "user-invocable": false
}

/flow-next:capture — agent-native conversation → spec

A discussion (or a /flow-next:prospect survivor) often holds a complete spec that never gets written down, and the next session loses it. Capture is the synthesis step: the host agent extracts the user's turns, drafts a spec against the resolved template, tags only what it paraphrased or inferred ([paraphrase] / [inferred] / [strategy:<track>]; the user's verbatim words stay untagged), writes it through flowctl, prints a compact summary, and offers the saved file in the editor (docs/read-back.md). The capture request authorizes the write; substantive choices still get short questions. No Python synthesizer, no model subprocess.

flowctl supplies thin plumbing (spec create, spec set-plan, spec set-branch, memory search) plus the chart link-spec callback after a chart-briefing capture. Capture never writes chart files or a chart's ready flag; chart never writes .flow/specs.

Clear ideas and finished chart briefings route here; capture never manufactures a chart for clear work. Unsure: /flow-next:flow --explain.

Read workflow.md for the phases and phases.md for the source tags. Branch-specific machinery lives in references/*.md, loaded only when its gate fires.

Read working-rules.md first unless you already have this run; it holds for every step of this skill.

Preamble

CRITICAL: flowctl is BUNDLED — NOT installed globally. which flowctl will fail (expected). workflow.md's Preamble defines $FLOWCTL; later blocks (there and in phases.md) use it.

Inline skill (no context: fork) — plain-text numbered prompt must stay reachable across phases; subagents cannot call plain-text numbered prompts.

Mode Detection

Parse $ARGUMENTS for the literal tokens mode:autofix, from:flow and from:goal and the flags --rewrite <spec-id>, --from-compacted-ok, --yes, --override-strategy, --no-plan. Strip recognized tokens; the remainder is ignored (the conversation is the input), except under from:goal, where it names the goal or its source.

RAW_ARGS="$ARGUMENTS"
MODE="interactive"
REWRITE_TARGET=""
FROM_COMPACTED_OK=0
COMMIT_YES=0
OVERRIDE_STRATEGY=0

if [[ "$RAW_ARGS" == *"mode:autofix"* ]]; then
  MODE="autofix"
  RAW_ARGS="${RAW_ARGS//mode:autofix/}"
fi

if [[ "$RAW_ARGS" =~ --rewrite[[:space:]]+([^[:space:]]+) ]]; then
  REWRITE_TARGET="${BASH_REMATCH[1]}"
  RAW_ARGS="${RAW_ARGS//--rewrite ${REWRITE_TARGET}/}"
fi

if [[ "$RAW_ARGS" == *"--from-compacted-ok"* ]]; then
  FROM_COMPACTED_OK=1
  RAW_ARGS="${RAW_ARGS//--from-compacted-ok/}"
fi

# --yes (autofix write gate), --override-strategy, --no-plan, from:flow and
# from:goal authorize durable writes, so they are EXACT-token matches: lookalikes
# ("--yesterday", "--no-planning", "from:flowchart", "from:goals") stay in the remainder.
NO_PLAN_OPT=0
FROM_FLOW=0
FROM_GOAL=0
CLEANED_ARGS=""
for TOK in $RAW_ARGS; do
  if [ "$TOK" = "--yes" ]; then
    COMMIT_YES=1
  elif [ "$TOK" = "--override-strategy" ]; then
    OVERRIDE_STRATEGY=1
  elif [ "$TOK" = "--no-plan" ]; then
    NO_PLAN_OPT=1
  elif [ "$TOK" = "from:flow" ]; then
    FROM_FLOW=1
  elif [ "$TOK" = "from:goal" ]; then
    FROM_GOAL=1
  else
    CLEANED_ARGS="$CLEANED_ARGS $TOK"
  fi
done
RAW_ARGS="$CLEANED_ARGS"

# from:goal is an unattended write the --goal invocation already consented to.
if [ "$FROM_GOAL" = "1" ]; then
  MODE="autofix"
  COMMIT_YES=1
  echo "GATE ACTIVE — STOP. Read references/from-goal.md before continuing."
fi
if [ "$MODE" = "autofix" ]; then
  echo "GATE ACTIVE — STOP. Read references/autofix-mode.md before continuing."
fi   # default branch: bare no-op — NO link, NO read path
Mode When Behavior
Interactive (default) User is at the terminal Asks on duplicates and must-ask cases; writes the spec, shows its summary, offers the editor; no generic write approval
Autofix (mode:autofix) Batch or scripted invocation No questions; every ask becomes exit 2; writes only with --yes

When the sentinel prints, read references/autofix-mode.md before Phase 0; it owns the per-phase autofix rules. Under from:goal, read references/from-goal.md as well; it says where a goal run's source differs. On the interactive path, read nothing.

Questions (interactive only)

Interactive capture follows the working rules' attended contract, plus:

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.

  • Use plain-text numbered prompt (load it with ToolSearch select:plain-text numbered prompt if needed); plain-text numbered options only when the tool is unreachable. Never skip a question silently.
  • The body leads with the recommendation, a one-sentence reason, and a confidence tier ([high] / [judgment-call] / [your-call]; before asking, read references/confidence-tiers.md). Option labels stay neutral and state their consequence.
  • Plain language: one sentence of stakes, everyday words, a short gloss for any needed term (R-ID, [inferred]).
  • Never ask for facts the conversation already gave. Phase 3 asks only its must-ask cases; other [inferred] content surfaces in the summary instead.

Forbidden behaviors

These protect spec trust:

  • Unstated technology. "Needs persistence" is fine; "uses PostgreSQL" needs the user to have said it. Capture writes intent; plan writes implementation.
  • Unmarked invention. An untagged line claims to be the user's words and must be findable in the evidence; every paraphrase or fill-in carries its tag, and [inferred] criteria surface in the summary for the user to keep, edit, or drop. Saving never upgrades a tag.
  • Process fences as spec content. New-vs-rewrite decisions, ready-marking, "do not implement", and the duplicate-scan outcome are capture's lifecycle, never spec body or ## Boundaries lines, and never evidence lines. Boundaries hold only product constraints a worker could get wrong.
  • Coordinates in the spec body. State contracts (types, signatures, behaviors, invariants), not code snippets, file paths, or line numbers, unless the exact location is itself the decision. Paths belong in plan's task specs.
  • Silent overwrite. Replacing a spec needs --rewrite <spec-id>; otherwise Phase 0's duplicate branch decides.
  • Acting without its own consent. Never auto-split (the user picks), never mark ready or add glossary terms without their separate questions (autofix writes neither; seeding an empty glossary is /flow-next:prime's job), never treat a saved spec as implementation consent, and never admit a draft/stale briefing silently or treat a forced draft chart briefing as final (the override names the D-IDs and reads back the risk).
  • Committing. Capture never stages or commits; the user owns when .flow/ changes land.
  • context: fork. Blocking questions must stay reachable.

Workflow

Execute workflow.md in order:

The spec at .flow/specs/<spec-id>.md is the deliverable. Autofix without --yes prints the draft summary and exits 0 with no spec allocated.

Version History

  • 4eba935 Current 2026-10-19 16:47

    新增 goal mode 支持,使 flow --goal 能构建目标规格并自动捕获子规格。

  • 7db792a 2026-09-28 08:12

    修复无监督运行中的范围保持、审查状态及工人交接问题;修正审查文本复制逻辑;解决控制字绕过和旧规格携带等正确性问题。

  • b91f43c 2026-09-22 21:14

    规范模板决定写入的章节,修复了章节顺序跟随模板的问题。

  • c9f7a79 2026-09-09 15:22

    新增spec级别的no_plan字段以替代pilot的--no-plan标志,修复了--no-plan参数的精确匹配逻辑,确保状态设置的准确性。

  • 8baa538 2026-08-20 07:58

Same Skill Collection

optimization/audit/baseline/SKILL.md
optimization/interview/baseline/SKILL.md
optimization/make-pr/baseline/SKILL.md
optimization/plan/baseline/SKILL.md
optimization/prospect/baseline/SKILL.md
plugins/flow-next/codex/skills/flow-next-audit/SKILL.md
plugins/flow-next/codex/skills/flow-next-chart/SKILL.md
plugins/flow-next/codex/skills/flow-next-deps/SKILL.md
plugins/flow-next/codex/skills/flow-next-export-context/SKILL.md
plugins/flow-next/codex/skills/flow-next-features/SKILL.md
plugins/flow-next/codex/skills/flow-next-flow/SKILL.md
plugins/flow-next/codex/skills/flow-next-guide/SKILL.md
plugins/flow-next/codex/skills/flow-next-impl-review/SKILL.md
plugins/flow-next/codex/skills/flow-next-interview/SKILL.md
plugins/flow-next/codex/skills/flow-next-land/SKILL.md
plugins/flow-next/codex/skills/flow-next-make-pr/SKILL.md
plugins/flow-next/codex/skills/flow-next-map/SKILL.md
plugins/flow-next/codex/skills/flow-next-memory-migrate/SKILL.md
plugins/flow-next/codex/skills/flow-next-pilot/SKILL.md
plugins/flow-next/codex/skills/flow-next-plan-review/SKILL.md
plugins/flow-next/codex/skills/flow-next-plan/SKILL.md
plugins/flow-next/codex/skills/flow-next-prime/SKILL.md
plugins/flow-next/codex/skills/flow-next-prose/SKILL.md
plugins/flow-next/codex/skills/flow-next-prospect/SKILL.md
plugins/flow-next/codex/skills/flow-next-qa/SKILL.md
plugins/flow-next/codex/skills/flow-next-ralph-init/SKILL.md
plugins/flow-next/codex/skills/flow-next-resolve-pr/SKILL.md
plugins/flow-next/codex/skills/flow-next-setup/SKILL.md
plugins/flow-next/codex/skills/flow-next-spec-completion-review/SKILL.md
plugins/flow-next/codex/skills/flow-next-strategy/SKILL.md
plugins/flow-next/codex/skills/flow-next-sync/SKILL.md
plugins/flow-next/codex/skills/flow-next-tracker-sync/SKILL.md
plugins/flow-next/codex/skills/flow-next-visual/SKILL.md
plugins/flow-next/codex/skills/flow-next-work-rolling/SKILL.md
plugins/flow-next/codex/skills/flow-next-work/SKILL.md
plugins/flow-next/codex/skills/flow-next-worktree-kit/SKILL.md
plugins/flow-next/codex/skills/flow-next/SKILL.md
plugins/flow-next/skills/flow-next-chart/SKILL.md
plugins/flow-next/skills/flow-next-deps/SKILL.md
plugins/flow-next/skills/flow-next-export-context/SKILL.md
plugins/flow-next/skills/flow-next-features/SKILL.md
plugins/flow-next/skills/flow-next-guide/SKILL.md
plugins/flow-next/skills/flow-next-impl-review/SKILL.md
plugins/flow-next/skills/flow-next-interview/SKILL.md
plugins/flow-next/skills/flow-next-land/SKILL.md
plugins/flow-next/skills/flow-next-make-pr/SKILL.md
plugins/flow-next/skills/flow-next-map/SKILL.md
plugins/flow-next/skills/flow-next-pilot/SKILL.md
plugins/flow-next/skills/flow-next-plan-review/SKILL.md

Metadata

Files
0
Version
4eba935
Hash
fdcf73d0
Indexed
2026-08-20 07:58

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-31 12:35
浙ICP备14020137号-1