Skip to content

Prime

/flow-next:prime runs a structured assessment of how ready a repo is for agentic work.

It is inspired by Factory.ai’s Agent Readiness framework. Nine sonnet scouts run in parallel, verify that test and build commands actually execute, score the repo across eight pillars, and produce a maturity level. Agent-readiness gaps get an interactive remediation step; production-readiness gaps are reported for awareness.

Agents waste cycles when the environment fights them:

  • No pre-commit hooks → 10-minute CI wait instead of 5-second local feedback.
  • Undocumented env vars → guesses, fails, guesses again.
  • Missing CLAUDE.md → re-discovers conventions on every run.
  • No reliable test command → cannot verify changes work.

These are environment problems, not agent problems. Prime helps fix them.

Agent readiness (1-5) is scored and fixed. Production readiness (6-8) is reported only.

#PillarWhat it checks
1Style & validationLinters, formatters, type checking, pre-commit hooks.
2Build systemBuild tools, commands, lock files, monorepo tooling.
3TestingTest framework, commands, coverage, verification.
4DocumentationREADME, CLAUDE.md, setup docs, architecture.
5Dev environment.env.example, Docker, devcontainer, runtime version.
6ObservabilityLogging, tracing, metrics, error tracking, health endpoints.
7SecurityBranch protection, secret scanning, CODEOWNERS, Dependabot.
8Workflow & processCI/CD, PR templates, issue templates, release automation.
LevelNameScoreDescription
1Minimal<30%Basic project structure only.
2Functional30–49%Can build and run; limited docs.
3Standardized50–69%Agent-ready for routine work.
4Optimized70–84%Fast feedback, comprehensive docs.
5Autonomous85%+Capable of full autonomous operation.

Level 3 is the target for most teams. Higher levels have diminishing returns relative to the engineering cost.

The Pillar 7 security scout checks for branch protection on the default branch.

From Flow-Next 1.1.6, SE1 accepts both classic GitHub branch protection and ruleset-based enforcement. GHE Enterprise repos protected via repo / org / enterprise rulesets correctly show SE1 ✅ instead of a false-negative gap.

ModeBehavior
DefaultFull scan, interactive remediation for pillars 1–5.
--report-onlyScan and report; offer no fixes.
--fix-allApply every agent-readiness fix without asking.

A path argument scans a different repo root.

PillarsCategoryRemediation
1–5Agent readinessFixes offered via blocking questions.
6–8Production readinessReported only; address independently.

After remediation, re-run prime to confirm the score improved. Then move on to whatever spec the readiness gap was blocking.