Skip to content

feat: agent readiness evaluation and upload - #197

Open
oadtq wants to merge 17 commits into
mainfrom
feature/agent-readiness
Open

feat: agent readiness evaluation and upload#197
oadtq wants to merge 17 commits into
mainfrom
feature/agent-readiness

Conversation

@oadtq

@oadtq oadtq commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds the agent readiness feature to the CoDev CLI and integrates the latest main (26 commits, including the codevcodevhub command rename and the ~/.codev~/.codev-hub config-dir rename).

Feature: agent readiness

  • One-command readiness scan + upload for the current repository (codevhub readiness).
  • Agent-driven, read-only evaluation across supported harnesses (Claude Code, Codex, OpenCode) with a versioned rubric and closed JSON schema.
  • Deterministic scoring, evidence normalization, and safe progress reporting from provider event streams.

Merge integration (main → feature)

Resolved two conflicts:

  • src/lib/const.ts — took main's renamed production backend route (codev-backend); kept the localhost:8787 dev override as a comment.
  • src/lib/help.ts — kept the new readiness help line and adopted main's reworded restore line.

Rename-compatibility fixes for the readiness feature

The feature was authored before main's codevcodevhub rename, so its user-facing command references were stale and were updated:

  • src/lib/readiness-agent.tscodev install / codev login / codev configcodevhub …
  • src/ReadinessApp.tsxcodev installcodevhub install
  • tests/lib/readiness-contract.test.ts — updated the shim-dir PATH fixture (~/.codev/bin~/.codev-hub/bin) and the renamed command expectations.

Testing

  • pnpm run typecheck — passes
  • pnpm run check (biome) — passes
  • pnpm test — 915 passing. 8 failures remain, all pre-existing and environment-dependent, not introduced by this branch:
    • 7 (InstallApp, ModelApp, RemoveApp, Confirm) fail identically on pristine origin/main — ink terminal-rendering in the local env.
    • 1 readiness codex-harness test fails only on machines with leftover pre-rename ~/.codev/bin shims; verified to pass 14/14 with a clean PATH (i.e., on CI).

How to test

  1. cd codev/codev && pnpm install && pnpm run build
  2. In a target repo: codevhub readiness — runs the scan and uploads the report.
  3. Verify the readiness command appears in codevhub --help.

oadtq added 15 commits July 14, 2026 11:52
- Analyze the current repository and upload its readiness snapshot by default\n- Reject legacy readiness arguments to keep the workflow unambiguous\n- Preserve the existing local backend override outside this commit
# Conflicts:
#	src/lib/const.ts
#	src/lib/help.ts
- Mock spawnSync so the Codex availability probe is deterministic on CI
  runners that don't install a codex binary (was throwing 'not configured').
- Use the OS path delimiter in the shim-strip PATH test so it passes on
  Windows (was hardcoding ':' and POSIX paths).
…ll agents

     - stripShimDirFromPath only stripped ~/.codev-hub/bin (current shim dir),
       not ~/.codev/bin (pre-0.4 shim dir). Old shims there exec the bare `codev`
       command which no longer exists, so isAgentAvailable resolved the stale
       shim instead of the real binary for codex/opencode, marking them
       "(unavailable)" in the readiness selector. With only one available agent
       arrow-key navigation cycled back to the same row, appearing unresponsive.
     - Add regression tests for legacy dir stripping and arrow-key navigation.
- Add first-class built-in scanner decisions while keeping static and AI-assisted evaluation paths explicit.
- Support any, all, none, and minimum evidence-locator aggregation for deterministic rules.
- Validate profile definitions before execution and preserve immutable profile identity during report upload.
- Fix the isolated OpenCode readiness configuration to resolve a concrete gateway URL.
- Add focused coverage for built-in routing, aggregation behavior, validation, and upload metadata.

Decisions and assumptions:
- Built-in scanners remain tested CoDev implementations selected by stable rule keys; users do not author arbitrary scanner code.
- Deterministic custom rules operate only on bounded repository evidence locators.
- Existing published profile revisions remain immutable; new contract shapes apply to successor revisions.
- remove hardcoded recommendation templates from profile criteria\n- accept zero to three scan-generated next steps without generic filler\n- filter malformed placeholder actions and use display names in warnings\n- update focused readiness contract, plan, rule, and upload coverage
- provide an explicit gateway base URL in the OpenCode readiness fixture\n- remove dependence on a developer's local auth.json during CI\n- assert that the configured gateway URL is preserved exactly
@oadtq
oadtq marked this pull request as ready for review July 23, 2026 09:23
oadtq and others added 2 commits July 23, 2026 16:34
- require agents to return criterion keys separately from remediation text\n- validate recommendation keys against the selected profile and failed criteria\n- resolve authoritative display names in the CLI before upload\n- preserve the existing web report API without another deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants