skills/agent-readiness/SKILL.md
Assess and improve codebase readiness for AI coding agents across style, tests, docs, architecture, CI, observability, security, and dev setup. Produces a scored report, prioritizes remediation, then executes the highest-impact fixes. Use when: "agent readiness", "is this codebase agent-ready", "readiness report", "make this codebase agent-friendly", "agent-ready assessment", "readiness audit", "prepare for agents". Trigger: /agent-readiness, /readiness.
npx skillsauth add phrazzld/spellbook agent-readinessInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Assess how well this codebase supports autonomous AI coding agents. Then fix the highest-impact gaps.
Target: $ARGUMENTS
You are the executive orchestrator.
delegate on judgment per the shared Roster contract: native subagents
by default; add cross-model critics, roster providers, or sprite lanes
(/sprites) only when they answer a distinct question. See
harnesses/shared/AGENTS.md (Roster).
Local lane guidance: Use specialized assessor lanes per readiness pillar and separate remediation-builder lanes for approved fixes. Split by pillar or ecosystem, prefer provider diversity for architecture/security/CI judgment, and record waivers when profile CRUD is purely mechanical.
The agent is not broken. The environment is. A codebase with fast feedback loops and clear instructions makes any agent dramatically more effective. A codebase with poor feedback loops defeats any agent you throw at it.
Assessment mode scores the repo. Profile mode manages the durable SDLC
contract at .harness-kit/agent-readiness.yaml. Route profile create,
profile read, profile update, profile delete, and profile validate to
cargo run --locked -p harness-kit-checks -- agent-readiness-profile; the schema lives in
references/profile-schema.yaml. Missing profiles degrade to assessment-only
behavior, but stale, expired, blank, or placeholder-only waivers are invalid
once a profile exists.
If the user asks to create, read, update, delete, or validate the readiness profile, run the deterministic profile script first and stop after reporting the result. Do not run a pillar assessment just to mutate the profile.
Dispatch parallel subagents — one per pillar — to evaluate the codebase.
Each subagent runs the checks from references/pillar-checks.md for its
assigned pillar and returns a structured verdict.
Launch all pillar assessments simultaneously:
| Subagent | Pillar | What it checks | |----------|--------|---------------| | 1 | Style & Validation | Linters, formatters, type checkers, pre-commit hooks | | 2 | Build & CI | Build commands, dependency pinning, CI config, feedback speed | | 3 | Testing | Coverage, speed, local execution, unit/integration/E2E layers | | 4 | Documentation | CLAUDE.md/AGENTS.md, README, setup guide, architecture docs, ADRs | | 5 | Dev Environment | Reproducibility, env templates, devcontainers, isolated workspaces | | 6 | Code Quality | Modularity, complexity, file organization, coupling, dead code | | 7 | Observability | Structured logging, error handling, metrics, tracing | | 8 | Security & Governance | Branch protection, CODEOWNERS, secret scanning, dependency audit | | 9 | Agent-Legible Source Of Truth | External state inventory, agent access path, verification command, waiver expiry |
Each subagent uses Explore agent type and reads references/pillar-checks.md
for its pillar's specific pass/fail criteria. Output format per subagent:
## [Pillar Name]
Score: X/Y checks passed
Maturity: L1-L5
### Passing
- [check]: [evidence]
### Failing
- [check]: [what's missing] → [recommended fix]
### Highest-Impact Fix
[The single change that would most improve this pillar]
Synthesize subagent results into a single readiness report:
# Agent Readiness Report: [project-name]
## Overall: Level X — [Maturity Name] (XX%)
| Pillar | Score | Level | Top Fix |
|--------|-------|-------|---------|
| Style & Validation | 4/6 | L3 | Add pre-commit hooks |
| Testing | 2/7 | L1 | Add unit test runner |
| ... | ... | ... | ... |
## Maturity Levels
- L1 Functional: Code runs, but agents need hand-holding
- L2 Documented: Processes written down, some automation
- L3 Standardized: Enforced automation, agents handle routine work
- L4 Optimized: Fast feedback, data-driven improvement
- L5 Autonomous: Self-improving, sophisticated orchestration
## Top 5 Recommendations (by impact)
1. [highest impact fix across all pillars]
2. ...
## Detailed Findings
[per-pillar sections from subagents]
Maturity level is gated: must pass 80% of criteria at current level and all previous levels before advancing. This prevents cherry-picking.
Present the report and top 5 recommendations to the user. Ask:
One question at a time. Don't dump all three at once.
For each approved recommendation, spawn a builder subagent (or use worktrees for parallel fixes on disjoint files). Each fix follows the project's existing patterns — don't introduce new tools the team hasn't chosen.
Typical fix categories:
| Fix type | Example | Subagent approach |
|----------|---------|-------------------|
| Config addition | Add .editorconfig, pre-commit hooks | Single builder, quick |
| Documentation | Create/update CLAUDE.md, AGENTS.md | Single builder |
| Test infrastructure | Add test runner, coverage config | Builder + TDD cycle |
| CI enhancement | Add lint/typecheck/test to CI | Single builder, verify locally |
| Architecture doc | Create ADR, architecture overview | Builder reads codebase first |
| Security hardening | Add CODEOWNERS, branch protection | Builder + gh CLI |
After fixes: re-run the failing checks to verify improvement. Report the before/after delta.
If --fix was used, re-run the full assessment to show the improved score.
Present the before/after comparison.
When fixes or approved waivers change the durable readiness contract, update
the profile with harness-kit-checks agent-readiness-profile and re-run
profile validate.
Report whether the profile was improved, preserved, or regressed. Regressions
require an explicit contract-change note and waiver expiry.
| Argument | Behavior |
|----------|----------|
| (none) | Full assess → report → clarify → fix cycle |
| --assess-only | Assess and report only, no fixes |
| --fix | Skip clarification, fix all top 5 recommendations |
| --pillar <name> | Assess only the named pillar |
| profile <create|read|update|delete|validate> | Manage .harness-kit/agent-readiness.yaml through harness-kit-checks agent-readiness-profile |
All specific checks are in references/pillar-checks.md. Each check is:
See references/agent-readiness-principles.md for the deeper "why" behind
each pillar — useful when explaining recommendations to the user.
meta/INTEGRATION_GUIDE.md before choosing a mechanism.tools
Enumerates the peer AI agent CLIs installed on this machine (codex, claude, pi, opencode, cursor-agent, grok, agy, hermes, thinktank) and how to invoke each headlessly. A capability map, not a quota: useful for fresh-context adversarial review on a different model family, second opinions, competing attempts, and wide benches. Use when: "ask codex", "ask another model", "second opinion", "cross-model review", "what AI tools do I have", "other agents", "different model family", "adversarial critique from another provider". Trigger: /roster.
development
Run lane cards on Fly Sprites: remote, isolated, scale-to-zero sandboxes for heavy or parallel agent work. Golden-checkpoint provisioning so lanes start on a ready sprite with zero setup tokens. Use when: "run this on a sprite", "remote lane", "offload to a sandbox", "dispatch to sprites", "bake a sprite", "sprite fleet", heavy/long-running/parallel sub-agent work that should not run on this machine. Trigger: /sprites, /sprite-lane.
testing
Compose and launch roster-backed specialist lanes with prompt-native lane cards and receipts. Use when: "dispatch agents", "use subagents", "compose a team", "run provider lanes", "make lane cards". Trigger: /dispatch, /subagents, /lanes.
tools
Fast session-start repository orientation from live local evidence. Use when: "orient yourself", "start of session", "new session", "where are we", "catch me up before acting", "what should I do next", after compaction, after switching worktrees, or before choosing a Harness Kit workflow. Trigger: /orient, /ground, /session-start.