flow-next-tracker-sync
The flow-next-tracker-sync skill projects a flow-next spec to a tracker issue (Linear or GitHub) and reconciles body, status, and comments bidirectionally, keeping the spec as the source of truth while mirroring it in the tracker. Use it to configure the bridge between specs and issues, link or unlink a spec to an issue, and push, pull, or reconcile changes in either direction via commands like "/flow-next:tracker-sync" or "sync to linear."
git clone --depth 1 https://github.com/gmickel/flow-next /tmp/flow-next-tracker-sync && cp -r /tmp/flow-next-tracker-sync/plugins/flow-next/skills/flow-next-tracker-sync ~/.claude/skills/flow-next-tracker-syncSKILL.md
# flow-next-tracker-sync
The flow spec is the source of truth and quality layer. The tracker is a
co-editable projection. Tracker activity never starts agents or changes Flow
task state.
## Load the reached path
Read [steps.md](steps.md) for the operation sequence and
[references/adapter-interface.md](references/adapter-interface.md) for the
normalized contract. Load only references needed by the reached path:
- Body comparison or conflict:
[references/body-merge.md](references/body-merge.md).
- Status projection: [references/status-sync.md](references/status-sync.md).
- Comment or question-valve content:
[references/comments-sync.md](references/comments-sync.md).
- Hybrid identifiers: [references/identity.md](references/identity.md).
- Linear transport shape: [references/linear-ladder.md](references/linear-ladder.md),
then only the reached MCP or GraphQL reference.
- GitHub, GitLab, or Jira transport shape: the matching provider reference only.
Never load an unselected provider merely because another reference links it.
## Deterministic boundary
`flowctl tracker` owns tracker transport, normalization, credentials, retries,
capability degradation, lifecycle ordering, receipts, and atomic local state.
The skill supplies only approved semantic inputs and reacts to the structured
result. Do not reconstruct provider requests in skill prose or shell.
Use the lifecycle facade for event-driven projection:
```bash
FLOWCTL="${DROID_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/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"
$FLOWCTL tracker sync "$SPEC_ID" --op "$OP" --event "$EVENT" \
--flow-file "$FLOW_FILE" --body-file "$BODY_FILE" \
--comments-file "$COMMENTS_FILE" --source-body-file "$SOURCE_BODY_FILE"
```
Pass only flags legal for the selected operation. [steps.md](steps.md) lists
the file contract. For discovery, create-first, link, unlink, status, relation,
attachment, and direct wire maintenance, use the matching `flowctl tracker`
verb. `flowctl tracker --help` is the executable source of truth.
Every command returns one JSON object on stdout. Success has `success: true`,
`data`, `degraded`, and `probe`. Failure has `success: false`, `class`, `error`,
`retryable`, and typed `details`. Branch on `class`, never provider text.
## Exactly five judgment surfaces
These are the only five surfaces intentionally retained in the host agent:
1. **MCP rung.** MCP tools exist only in the host tool environment, so flowctl
cannot invoke them. The agent may perform the explicitly requested Linear
MCP action, then hands the returned identity to `tracker persist-external`.
2. **Discovery ceremony.** Choosing a tracker, project or team, and enabling
lifecycle events is an ambiguous one-time product decision. The agent
surfaces detected choices and asks before persisting configuration.
3. **Body-merge conflict adjudication.** A three-way body conflict is semantic
because equivalent prose, intent, and requirement meaning cannot be resolved
from hashes or syntax alone. The agent adjudicates only conflicting sections,
while flowctl owns snapshots and atomic persistence.
4. **Comment content synthesis.** Lifecycle comments communicate human context.
The caller decides what the comment should say and supplies a stable
occurrence identity as the first file line, `evidence=<token>`. Flowctl
rejects missing/placeholder evidence, strips that line from visible content,
and owns marker dedup, transport, and the receipt.
5. **Recovery routing from a structured error.** A typed conflict,
`external_action_required`, or non-retryable capability result can require a
user choice, an MCP continuation, a local correction, or a defer. The agent
selects that next action from the structured envelope instead of parsing
error prose.
No other tracker operation is agentic. In particular, request construction,
pagination, provider field mapping, status policy, relation projection,
comment dedup, credential selection, retry timing, and receipt writes remain
deterministic.
## Discovery ceremony
The bridge is off until the user confirms it. Surface available and unavailable
provider signals, the proposed project or team, and lifecycle defaults. Resolve
environment overrides before stored configuration. If the destination is
ambiguous, ask. If the user declines, write nothing.
After confirmation, use `flowctl config set` for the selected provider and
`flowctl tracker resolve` to persist `tracker.resolved`. Credentials remain in
the environment. Never copy credentials into config, a prompt, argv, receipt,
or error note.
Linear MCP is discovery/create only. All later shell-reachable operations use
the deterministic GraphQL route. If an MCP create returns only a display key,
`tracker persist-external` resolves and stores its durable identity.
## Operating rules
- One Flow spec maps to one tracker issue. Tasks remain Flow-local.
- Tracker-first creation uses the hybrid identifier rules in `identity.md`.
Never rename an existing Flow-first spec.
- Callers retain their bridge-active and `perEvent` gates. An inactive bridge
remains silent because the lifecycle facade is not invoked.
- Event-driven callers use `tracker sync`, not granular tracker verbs.
- Comment text and merged body text travel through mode `0600` temporary files,
never argv. Delete temporary files after the call.
- The facade writes one aggregate receipt. Do not add a second receipt.
- A pull or reconcile may update Flow prose, but never Flow task status.
- Dependency projection is additive and provenance-led. Never delete or
recreate a user-controlled relation without evidence that Flow owns it.
- `inactive` is a silent no-op for lifecycle callers.
- `raSynthesize 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; `--from-compacted-ok` overrides the incomplete-evidence refusal after compaction; `--override-strategy` proceeds despite a contradiction with an active STRATEGY.md track (and prompts to record the override as a decision); `--no-plan` sets the spec-level `no_plan` field after the write (explicit opt-in — never inferred).
Render a cognitive-aid PR body from flow-next state and open via gh. Triggers on /flow-next:make-pr with optional spec id and flags (--draft, --ready, --no-mermaid, --base <ref>, --memory, --dry-run). Auto-detects spec from current branch when no id given. NOT Ralph-blocked — autonomous loops can surface a draft PR for human review.
Audit `.flow/memory/` entries against the current codebase and decide Keep / Update / Consolidate / Replace / Delete / Harden per entry. Triggers on /flow-next:audit, "audit memory", "review memory", "refresh learnings", "sweep stale memory", "consolidate overlapping memory entries", "graduate a recurring lesson into a gate". Optional `mode:autofix` token in arguments runs without questions and marks ambiguous as stale (Harden is never auto-applied). Optional scope hint after the mode token (concept, category, module, or path) narrows what gets audited.
Show spec dependency graph and execution order. Use when asking 'what's blocking what', 'execution order', 'dependency graph', 'what order should specs run', 'critical path', 'which specs can run in parallel'.
Drive any UI surface like a real user - a web app, a Chromium-backed desktop app (Electron / WebView2, reached over CDP), or a genuinely native app (macOS AppKit/SwiftUI, or a non-CDP webview) reached via the Cua Driver / Computer Use. Detects the surface, picks the best available driver, degrades gracefully. Use to navigate sites, verify deployed UI, test web or desktop apps, capture baseline screenshots, drive a sign-in flow, scrape data, fill forms, run an e2e check, or inspect current page state. Triggers on "check the page", "verify UI", "test the site", "test this app", "drive the app", "automate this desktop app", "read docs at", "look up API", "visit URL", "browse", "screenshot", "scrape", "e2e test", "login flow", "capture baseline", "see how it looks", "inspect current", "before redesign", "Electron app", "native app".
[deprecated alias] Renamed to flow-next-spec-completion-review in flow-next 1.0 — invoke the new skill. Removed in 2.0.
Export RepoPrompt context to a markdown file for review with an external LLM (ChatGPT, Claude web, etc.). Use when you want Carmack-level review but prefer an external model. Triggers on "export context", "export for external review", "export plan for ChatGPT", "export impl review context", "review with an external model", "export review context".