jwalsh / jwalsh/cprr

feat: add `cprr doctor` command to validate store integrity

Open
#3 0 comments 0 reactions 0 assignees View on GitHub
cprr enhancement
Dominant language
Go
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

## Summary

Add a `cprr doctor` subcommand that validates `.cprr/conjectures.json` integrity.

## Motivation

Across 30+ projects using cprr, we found:
- **Corrupted JSON** in qwen3-steering (trailing `{` after array close — unparseable)
- **7 empty/unused stores** (initialized but never populated)
- **Unrecognized extended fields** in http-axiom (`assigned_agent`, `review_gate`, `priority`) — silently preserved but not validated

There's no way to detect these issues without manually inspecting the JSON.

## Proposed Behavior

```bash
cprr doctor # validate current .cprr store
cprr doctor --all # scan all .cprr dirs under cwd
```

Checks:
- [ ] JSON parses without error
- [ ] Required fields present on all conjectures (`id`, `title`, `status`, `created_at`)
- [ ] Status values are valid enum members
- [ ] `next_id` is consistent with max conjecture ID
- [ ] Warn on unrecognized fields (don't fail — they may be intentional extensions)
- [ ] Report empty stores

## Evidence

Found via audit of `.cprr/` directories across `aygp-dr/*` and `jwalsh/*` repos on 2026-03-28.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.