flow-next-sync
БесплатноБез исполняемых скриптовНе проверенManually trigger plan-sync to update downstream task specs after implementation drift. Use when code changes outpace specs.
от gmickel★ 735 звёзд на GitHubОб этом скилле
Manual Plan-Sync
Manually trigger plan-sync to update downstream task specs.
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. Define once; subsequent blocks use $FLOWCTL:
FLOWCTL="${CODEX_HOME:-$HOME/.codex}/scripts/flowctl"
[ -x "$FLOWCTL" ] || FLOWCTL="<plugin-root>/scripts/flowctl" # <plugin-root> = the directory two levels above this skill's SKILL.md file (the harness gave you that file's absolute path when the skill loaded); substitute it literally
[ -x "$FLOWCTL" ] || FLOWCTL=".flow/bin/flowctl"
Input
Arguments: $ARGUMENTS
Format: <id> [--dry-run]
<id>- task IDfn-N-slug.M(or legacyfn-N.M,fn-N-xxx.M) or spec IDfn-N-slug(or legacyfn-N,fn-N-xxx), or a resolvable tracker handle (wor-17/wor-17.M) thatflowctl showmaps to the linked spec/task--dry-run- show changes without writing
Workflow
Step 1: Parse Arguments
Parse $ARGUMENTS for:
- First positional arg =
ID --dry-runflag =DRY_RUN(true/false)
Validate ID first (handle-recognition rule):
- The id is resolved by
flowctl show, not by a prefix check. A session that rejects a resolvable tracker handle as an unknown id — because it gated on "must start withfn-" — has broken this. Route the arg through$FLOWCTL show <ID> --json(Step 3); flowctl's widened resolver maps a tracker key (wor-17/wor-17.M) to its linked spec/task, so a resolvable handle is the existing spec/task, never a new id./flow-next:sync wor-17therefore resolves the linked spec. - If no ID provided: "Usage: /flow-next:sync
[--dry-run]" - If the arg does not resolve via
flowctl show(Step 3): "Unknown ID. Use fn-N-slug (spec) / fn-N-slug.M (task), a tracker handle (wor-17), or legacy fn-N, fn-N-xxx."
Detect ID type (use the canonical id from flowctl show):
- Contains
.(e.g., fn-1.2, fn-1-add-oauth.2, wor-17.2) -> task ID - No
.(e.g., fn-1, fn-1-add-oauth, wor-17) -> spec ID
Step 2: Validate Environment
test -d .flow || { echo "No .flow/ found. Run flowctl init first."; exit 1; }
If .flow/ missing, output error and stop.
Step 3: Validate ID Exists
$FLOWCTL show <ID> --json
If command fails:
- For task ID: "Task
not found. Run flowctl listto see available." - For spec ID: "Spec
not found. Run flowctl specsto see available."
Stop on failure.
Step 4: Find Downstream Tasks
For task ID input:
# Extract spec from task ID (remove .N suffix)
SPEC=$(echo "<task-id>" | sed 's/\.[0-9]*$//')
# Get all tasks in spec
$FLOWCTL tasks --spec "$SPEC" --json
Filter to status: todo or status: blocked. Exclude the source task itself.
For spec ID input: reuse the tasks array already returned by Step 3's $FLOWCTL show <spec-id> --json (no second tasks --spec call needed).
First, find a source task to anchor drift detection (agent requires
COMPLETED_TASK_IDS):- Prefer most recently updated task with
status: done - Else: most recently updated task with
status: in_progress - Else: error "No completed or in-progress tasks to sync from. Complete a task first."
- Prefer most recently updated task with
Then filter remaining tasks to
status: todoorstatus: blocked(these are downstream).
If no downstream tasks:
No downstream tasks to sync (all done or none exist).
Stop here (success, nothing to do).
Done when
- A source task is anchored — the input task in task mode, or the most recently updated
done(elsein_progress) task in spec mode — or the run stopped with the documented refusal because neither exists. DOWNSTREAM_TASK_IDSholds the spec'stodoandblockedtasks with the source task excluded. An empty downstream set stops the run here. A session that spawns the agent with nothing downstream has broken this.
Step 5: Gather glossary + decisions + strategy context
Three extra context types help the agent catch drift the spec text alone can't reveal: project-glossary terms (renames where the old spec used a term whose _Avoid_ alias now appears in code), active decision constraints (current code may touch files mentioned in a decision's Consequences section), and strategic-intent drift (completed task contradicts an active STRATEGY.md track or approach).
Write the three inputs to files; dispatch only their paths. Empty or failed reads use the same defaults as an absent source.
# fence:plan-sync-inputs — FLOWCTL is the resolved executable path
mkdir -p .flow/tmp
SYNC_CONTEXT=$(mktemp -d "$(pwd)/.flow/tmp/plan-sync.XXXXXX") || exit 2
GLOSSARY_JSON_FILE="$SYNC_CONTEXT/glossary.json"
DECISIONS_JSON_FILE="$SYNC_CONTEXT/decisions.json"
STRATEGY_CONTENT_FILE="$SYNC_CONTEXT/strategy.json"
("$FLOWCTL" glossary list --json > "$GLOSSARY_JSON_FILE" 2>/dev/null && [ -s "$GLOSSARY_JSON_FILE" ]) || printf
Установить flow-next-sync в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл flow-next-sync?
Manually trigger plan-sync to update downstream task specs after implementation drift. Use when code changes outpace specs.
Как установить скилл flow-next-sync?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл flow-next-sync запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic