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
Two-Tier Assessment
| Category |
Pillars |
What Happens |
| Agent Readiness |
1-5 (30 criteria) |
Scored, maturity level calculated, fixes offered |
| Production Readiness |
6-8 (18 criteria) |
Reported for awareness, no fixes offered |
This gives you full visibility while keeping remediation focused on what actually helps agents work.
Why This Matters
Agents waste cycles when:
- No pre-commit hooks → waits 10min for CI instead of 5sec local feedback
- Undocumented env vars → guesses, fails, guesses again
- No CLAUDE.md → doesn't know project conventions
- Missing test commands → can't verify changes work
These are environment problems, not agent problems. Prime helps fix them.
Input
Full request: $ARGUMENTS
Accepts:
- No arguments (scans current repo)
--report-only or report only (skip remediation, just show report)
--fix-all or fix all (apply all agent readiness fixes without asking)
- Path to different repo root
Examples:
/flow-next:prime
/flow-next:prime --report-only
/flow-next:prime ~/other-project
The Eight Pillars
Agent Readiness (Pillars 1-5) — Fixes Offered
| Pillar |
What It Checks |
| 1. Style & Validation |
Linters, formatters, type checking, pre-commit hooks |
| 2. Build System |
Build tools, commands, lock files, monorepo tooling |
| 3. Testing |
Test framework, commands, coverage, verification |
| 4. Documentation |
README, CLAUDE.md, setup docs, architecture |
| 5. Dev Environment |
.env.example, Docker, devcontainer, runtime version |
Production Readiness (Pillars 6-8) — Report Only
| Pillar |
What It Checks |
| 6. Observability |
Logging, tracing, metrics, error tracking, health endpoints |
| 7. Security |
Branch protection, secret scanning, CODEOWNERS, Dependabot |
| 8. Workflow & Process |
CI/CD, PR templates, issue templates, release automation |
Workflow
Read workflow.md and execute each phase in order.
Key phases:
- Parallel Assessment — 9 scouts run in parallel (~15-20 seconds)
- Verification — Verify test commands actually work
- Score & Synthesize — Calculate scores, determine maturity level
- Present Report — Full report with all 8 pillars
- Interactive Remediation — AskUserQuestion for agent readiness fixes only
- Apply Fixes — Create/modify files based on selections
- Summary — Show what was changed
Maturity Levels (Agent Readiness)
| Level |
Name |
Description |
Score |
| 1 |
Minimal |
Basic project structure only |
<30% |
| 2 |
Functional |
Can build and run, limited docs |
30-49% |
| 3 |
Standardized |
Agent-ready for routine work |
50-69% |
| 4 |
Optimized |
Fast feedback loops, comprehensive docs |
70-84% |
| 5 |
Autonomous |
Full autonomous operation capable |
85%+ |
Level 3 is the target for most teams. Don't over-engineer.
What Gets Fixed vs Reported
| Pillars |
Category |
Remediation |
| 1-5 |
Agent Readiness |
✅ Fixes offered via AskUserQuestion |
| 6-8 |
Production Readiness |
❌ Reported only, address independently |
Guardrails
General
- Never modify code files (only config, docs, scripts)
- Never commit changes (leave for user to review)
- Never delete files
- Respect .gitignore patterns
User Consent
- MUST use AskUserQuestion tool for consent — never just print questions as text
- Always ask before modifying existing files
- Don't add dependencies without consent
Scope Control
- Never create LICENSE files — license choice requires explicit user decision
- Never offer Pillar 6-8 fixes — production readiness is informational only
- Focus fixes on what helps agents work (not team governance)
Scouts
Agent Readiness (fast)
tooling-scout — linters, formatters, pre-commit, type checking
claude-md-scout — CLAUDE.md/AGENTS.md analysis
env-scout — environment setup
testing-scout — test infrastructure
build-scout — build system
docs-gap-scout — README, ADRs, architecture
Production Readiness (fast)
observability-scout — logging, tracing, metrics, health
security-scout — GitHub settings, CODEOWNERS, secrets
workflow-scout — CI/CD, templates, automation
All 9 scouts run in parallel for speed.
1---2name: flow-next-opencode-prime3description: Comprehensive codebase assessment for agent and production readiness. Scans 8 pillars (48 criteria), verifies commands work, checks GitHub settings. Reports everything, fixes agent readiness only. Triggers on /flow-next:prime.4---56# Flow Prime78Comprehensive codebase assessment inspired by [Factory.ai's Agent Readiness framework](https://factory.ai/news/agent-readiness).910**Role**: readiness assessor, improvement proposer11**Goal**: full visibility into codebase health, targeted fixes for agent readiness1213## Two-Tier Assessment1415| Category | Pillars | What Happens |16|----------|---------|--------------|17| **Agent Readiness** | 1-5 (30 criteria) | Scored, maturity level calculated, fixes offered |18| **Production Readiness** | 6-8 (18 criteria) | Reported for awareness, no fixes offered |1920This gives you **full visibility** while keeping remediation focused on what actually helps agents work.2122## Why This Matters2324Agents waste cycles when:25- No pre-commit hooks → waits 10min for CI instead of 5sec local feedback26- Undocumented env vars → guesses, fails, guesses again27- No CLAUDE.md → doesn't know project conventions28- Missing test commands → can't verify changes work2930These are **environment problems**, not agent problems. Prime helps fix them.3132## Input3334Full request: $ARGUMENTS3536Accepts:37- No arguments (scans current repo)38- `--report-only` or `report only` (skip remediation, just show report)39- `--fix-all` or `fix all` (apply all agent readiness fixes without asking)40- Path to different repo root4142Examples:43- `/flow-next:prime`44- `/flow-next:prime --report-only`45- `/flow-next:prime ~/other-project`4647## The Eight Pillars4849### Agent Readiness (Pillars 1-5) — Fixes Offered5051| Pillar | What It Checks |52|--------|----------------|53| **1. Style & Validation** | Linters, formatters, type checking, pre-commit hooks |54| **2. Build System** | Build tools, commands, lock files, monorepo tooling |55| **3. Testing** | Test framework, commands, coverage, verification |56| **4. Documentation** | README, CLAUDE.md, setup docs, architecture |57| **5. Dev Environment** | .env.example, Docker, devcontainer, runtime version |5859### Production Readiness (Pillars 6-8) — Report Only6061| Pillar | What It Checks |62|--------|----------------|63| **6. Observability** | Logging, tracing, metrics, error tracking, health endpoints |64| **7. Security** | Branch protection, secret scanning, CODEOWNERS, Dependabot |65| **8. Workflow & Process** | CI/CD, PR templates, issue templates, release automation |6667## Workflow6869Read [workflow.md](workflow.md) and execute each phase in order.7071**Key phases:**721. **Parallel Assessment** — 9 scouts run in parallel (~15-20 seconds)732. **Verification** — Verify test commands actually work743. **Score & Synthesize** — Calculate scores, determine maturity level754. **Present Report** — Full report with all 8 pillars765. **Interactive Remediation** — AskUserQuestion for agent readiness fixes only776. **Apply Fixes** — Create/modify files based on selections787. **Summary** — Show what was changed7980## Maturity Levels (Agent Readiness)8182| Level | Name | Description | Score |83|-------|------|-------------|-------|84| 1 | Minimal | Basic project structure only | <30% |85| 2 | Functional | Can build and run, limited docs | 30-49% |86| 3 | **Standardized** | Agent-ready for routine work | 50-69% |87| 4 | Optimized | Fast feedback loops, comprehensive docs | 70-84% |88| 5 | Autonomous | Full autonomous operation capable | 85%+ |8990**Level 3 is the target** for most teams. Don't over-engineer.9192## What Gets Fixed vs Reported9394| Pillars | Category | Remediation |95|---------|----------|-------------|96| 1-5 | Agent Readiness | ✅ Fixes offered via AskUserQuestion |97| 6-8 | Production Readiness | ❌ Reported only, address independently |9899## Guardrails100101### General102- Never modify code files (only config, docs, scripts)103- Never commit changes (leave for user to review)104- Never delete files105- Respect .gitignore patterns106107### User Consent108- **MUST use AskUserQuestion tool** for consent — never just print questions as text109- Always ask before modifying existing files110- Don't add dependencies without consent111112### Scope Control113- **Never create LICENSE files** — license choice requires explicit user decision114- **Never offer Pillar 6-8 fixes** — production readiness is informational only115- Focus fixes on what helps agents work (not team governance)116117## Scouts118119### Agent Readiness (fast)120- `tooling-scout` — linters, formatters, pre-commit, type checking121- `claude-md-scout` — CLAUDE.md/AGENTS.md analysis122- `env-scout` — environment setup123- `testing-scout` — test infrastructure124- `build-scout` — build system125- `docs-gap-scout` — README, ADRs, architecture126127### Production Readiness (fast)128- `observability-scout` — logging, tracing, metrics, health129- `security-scout` — GitHub settings, CODEOWNERS, secrets130- `workflow-scout` — CI/CD, templates, automation131132All 9 scouts run in parallel for speed.