Flow next map

From gmickel/flow-next · View interactive version

Flow next map is an AI agent skill from the GitHub repository gmickel/flow-next. Build a semantic feature index of the repo via clawpatch map (opt-in). Use when asked to map the repo.

How to use this skill

Skill file

/flow-next:map — wrap `clawpatch map` for a semantic feature index

Read workflow.md for the bundled-script invocation and summary.

Wrap the upstream CODE0 CLI's map subcommand. Default invocation is provider-free (--source heuristic) — zero LLM calls, zero API spend, deterministic mapper. Output lands at .clawpatch/features/*.json (Zod-validated upstream, schemaVersion: 1). Scout enrichment and the /flow-next:prime DE7 nudge read the resulting index; this skill is the install/init/invoke surface.

Role: thin shell-out wrapper. flowctl never imports or requires clawpatch; the skill is the only flow-next surface that touches it.

Preamble

CRITICAL: flowctl is BUNDLED — NOT installed globally. which flowctl will fail (expected). Define once; subsequent blocks (here and in workflow.md) 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"

Inline skill (no context: fork) — the map skill is fully non-interactive: install detection, version-range guard, clawpatch init, .clawpatch/.gitignore skeleton, and clawpatch map invocation all proceed without prompting the user. No plain-text numbered prompt is required or used.

Input

Arguments: $ARGUMENTS

Format: [--source <heuristic|auto|agent>] [-- <extra clawpatch args>]

Passthrough boundary. The slash-command host delivers $ARGUMENTS as a single string; the skill word-splits on whitespace. Passthrough is therefore token-level (whitespace-separated), not full shell-verbatim — tokens containing literal spaces or shell metacharacters that require shell quoting will not survive. Globs (*, ?) are protected from expansion (set -f before the parse) so they reach clawpatch untouched. Users needing complex quoting should run clawpatch map directly.

flow-next's review backend config (codex / copilot / cursor / claude / host / none) stays out of clawpatch. clawpatch's provider matrix (codex / acpx / claude / cursor / grok / opencode / pi) is orthogonal — a run that sets CLAWPATCH_PROVIDER from the flow-next backend has broken this. The script echo reports the backend as informational only.

Version pin

The supported clawpatch range lives in one place, SUPPORTED_MIN and SUPPORTED_MAX_EXCL in the

bundled script (scripts/map.sh). It parses clawpatch --version with a tolerant (\d+\.\d+\.\d+) regex and compares against this range. Outside-range → warn one line to stderr and degrade (continue). Never block. Re-verify on each clawpatch minor release.

clawpatch is pre-1.0 with frequent minor releases. The README forecasts breaking changes between minor releases — tolerant parsing matters.

Workflow

Invoke the bundled script as workflow.md directs. It handles

install detection, the version warning, init, ignore skeleton, streaming map

and mechanical counts. The host explains the result and optional next steps.

Sharing contract — local-only by design

The .clawpatch/.gitignore skeleton this skill writes is * + !.gitignore — everything under .clawpatch/ is git-ignored; only the .gitignore itself is tracked. The feature index is local-per-developer, not committed.

This is a deliberate design choice for a pre-1.0 mapper:

Teams that want a shared, in-repo feature index can edit .clawpatch/.gitignore directly (e.g. !features/, !project.json, ignore only .cache/ and *.log). The skill is idempotent and won't clobber a customized .gitignore on re-run. This is unsupported — be prepared for review noise and merge conflicts; document the choice in your team's CLAUDE.md / AGENTS.md. See flow-next.dev/skills/map for the full trade-off table.

Forbidden

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.