Flow next prime

From gmickel/flow-next · View interactive version

Flow next prime is an AI agent skill from the GitHub repository gmickel/flow-next. Comprehensive codebase assessment for agent and production readiness. Classifies the project (lifecycle, topology, size, stack, shape), scans 8 pillars, verifies commands actually run, checks GitHub settings. Leads with a verdict + ranked next-actions; fixes agent readiness only. Triggers on /flow-n

How to use this skill

Skill file

Flow Prime

Comprehensive codebase assessment inspired by Factory.ai's Agent Readiness framework.

Role: readiness assessor, improvement proposer

Goal: full visibility into codebase health, targeted fixes for agent readiness

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

Two-Tier Assessment

| Category | Pillars | What Happens |

|----------|---------|--------------|

| Agent Readiness | 1-5 | Scored, maturity level calculated, fixes offered |

| Production Readiness | 6-8 | Reported for awareness, no fixes offered |

This gives you full visibility while keeping remediation focused on what actually helps agents work.

Criteria counts live in pillars.md, never here. pillars.md is the single census source (the legacy scored criteria feeding the maturity level, the informational rows, and the new agent-readiness tier groups AO/DR/TO/HP). Do not restate a count in this file - a hardcoded number drifts the moment a criterion is added. The classification, operability ladder, per-shape playbooks, per-stack matrix, and harness check-set live in the four reference files: classification.md, playbooks.md, stacks.md, harness.md.

Why This Matters

Existence checks lie. A repo can carry a CLAUDE.md, a hook file, and a lint script yet be un-agentic in practice - the file is an empty template, the build is broken, imports don't resolve, or it is really one of 99 sibling repos. Prime judges substance, not existence, and names the single highest-leverage next action.

Agents waste cycles when:

These are environment problems, not agent problems. Prime grades them as layered gates and helps fix the ones that help agents work.

Input

Full request: $ARGUMENTS

Accepts:

Examples:

Resolve ROOT from $ARGUMENTS (the first non-flag token; default .). If ROOT is not the

cwd, resolve it first (ROOT=$(cd "$ROOT" && pwd)), then it MUST thread through everything: cd "$ROOT" before the .flow/meta.json pre-check, the

Phase 0.5 classification probes (the flowctl prime classify emitter takes ROOT as its positional

argument, e.g. flowctl prime classify --json "$ROOT"), and the Phase 2 verification commands; and

every scout dispatch prompt in Phase 1 starts "Assess the repo at ROOT" (scouts scan cwd by default

threading ROOT isn't feasible, error rather than silently scan cwd.

Route Before Reading References

Parse the mode before loading any reference:

run its emitter + judgment-layer contract, print its fixed classification block,

and EXIT. Do not read workflow.md, pillars.md, playbooks.md, or

remediation.md; never ask, dispatch scouts, verify, report, or remediate.

workflow loads classification, pillars, playbooks, stacks, harness, and

remediation guidance only at their consuming phases. --report-only stops

after the report and must never load remediation templates.

This dispatch is fail-open for an unknown/malformed mode: use the full workflow,

never silently skip assessment or safety instructions.

Workflow

The mode router above selects the entry reference. Do not pre-read references

for branches that will not execute.

Guardrails

General

User Consent

`--fix-all` boundaries

--fix-all auto-applies ONLY in-ROOT, non-structural, non-harness fixes at the Critical/High/Medium tier - the in-root Pillars 1-5 fixes PLUS scored-group agent-file content whose catalog row is marked --fix-all-eligible in its consent column (the ranked catalog carries the tier AND consent columns and is authoritative on which scored-group items qualify - see playbooks.md). It NEVER waives consent for:

Scope Control

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.