fix: add CLI read/list, docs, fix test, complete example#349
Conversation
1. Add 8 new CLI commands for reading and listing approved artifacts
(read-{claim,page,entity,relation}, list-{claims,pages,entities,relations})
2. Document self-approval prevention in getting-started guide with
config option for local testing (approver_role: trusted-agent)
3. Parameterize jsonl-quickstart test to support dynamic method count
4. Complete decision-log example with 5 approved decisions and full KB
Fixes discovered during end-to-end installation testing.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR expands the vouch CLI’s read-only ergonomics by adding commands to read/list approved artifacts, updates docs to explain the review gate and new reads, loosens the JSONL quickstart’s brittle method-count assertion, and refreshes the decision-log example KB to be complete and end-to-end realistic.
Changes:
- Add
read-*/list-*CLI commands for approved claims/pages/entities/relations. - Update docs/README and JSONL quickstart to reflect current review-gate behavior and capabilities discovery.
- Add/refresh a complete
examples/decision-logKB fixture (sources, claims, decided proposals, audit log).
Reviewed changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/vouch/cli.py | Adds new read-* and list-* commands for approved artifacts. |
| README.md | Documents the newly added CLI commands in the command list. |
| examples/jsonl-quickstart/run.sh | Makes the quickstart validation resilient to method-count growth by asserting required methods instead. |
| examples/decision-log/vouch/sources/be7aec64b0fc803a33cb3d610f67ae95e636877db20231ef72440a7cbe6b69d2/meta.yaml | Adds starter “vouch:init” source metadata to the decision-log example KB. |
| examples/decision-log/vouch/sources/be7aec64b0fc803a33cb3d610f67ae95e636877db20231ef72440a7cbe6b69d2/content | Adds starter “vouch:init” source content to the decision-log example KB. |
| examples/decision-log/vouch/sources/3131367abbcefab105fa2fcaa36617bfdda15511cc8880145af113731e95ad6d/meta.yaml | Adds pricing-policy source metadata to the example KB. |
| examples/decision-log/vouch/sources/3131367abbcefab105fa2fcaa36617bfdda15511cc8880145af113731e95ad6d/content | Adds pricing-policy source content to the example KB. |
| examples/decision-log/vouch/sources/1f8ef21996a0f59eeb5174071f5293fc3b864defe928b9ce7879022a8230dbc8/meta.yaml | Adds Q1 decision-log source metadata to the example KB. |
| examples/decision-log/vouch/sources/1f8ef21996a0f59eeb5174071f5293fc3b864defe928b9ce7879022a8230dbc8/content | Adds Q1 decision-log source content to the example KB. |
| examples/decision-log/vouch/schema_version | Stamps the example KB’s schema version. |
| examples/decision-log/vouch/pages/edit-in-obsidian.md | Adds an approved page demonstrating Obsidian workflow for the example KB. |
| examples/decision-log/vouch/decided/20260703-091453-4ca258b5.yaml | Adds an approved “decided” record for the free-tier baseline decision. |
| examples/decision-log/vouch/decided/20260703-091452-976471f3.yaml | Adds an approved “decided” record for the incident-response SLA decision. |
| examples/decision-log/vouch/decided/20260703-091452-4ffb9687.yaml | Adds an approved “decided” record for the billing storage ACID decision. |
| examples/decision-log/vouch/decided/20260703-091452-063145f6.yaml | Adds an approved “decided” record for the Postgres 15 decision. |
| examples/decision-log/vouch/config.yaml | Adds a full example KB config (including review settings) for the decision-log fixture. |
| examples/decision-log/vouch/claims/vouch-starter-reviewed-knowledge.yaml | Adds the starter approved claim to the example KB. |
| examples/decision-log/vouch/claims/use-postgresql-15-for-enhanced-replication-and-monitoring-fe.yaml | Adds an approved claim representing a Postgres 15 decision. |
| examples/decision-log/vouch/claims/use-postgres-for-billing.yaml | Removes an older placeholder billing claim from the example KB. |
| examples/decision-log/vouch/claims/incident-response-15min-sla.yaml | Removes an older placeholder incident-response claim from the example KB. |
| examples/decision-log/vouch/claims/free-tier-gets-100-requests-per-day-as-baseline.yaml | Adds an approved claim representing the free-tier baseline decision. |
| examples/decision-log/vouch/claims/free-tier-500-req.yaml | Removes an older placeholder “500 req/day” claim from the example KB. |
| examples/decision-log/vouch/claims/free-tier-100-req-superseded.yaml | Removes an older placeholder superseded free-tier claim from the example KB. |
| examples/decision-log/vouch/claims/critical-system-incidents-must-have-a-15-minute-response-sla.yaml | Adds an approved claim representing the 15-minute response SLA decision. |
| examples/decision-log/vouch/claims/billing-data-requires-acid-guarantees-postgresql-is-the-prim.yaml | Adds an approved claim representing the billing ACID/Postgres decision. |
| examples/decision-log/vouch/audit.log.jsonl | Adds an example audit log showing init/source adds/proposal approvals. |
| examples/decision-log/vouch/.gitignore | Ignores volatile example-KB runtime state (proposals, captures, db files). |
| docs/getting-started.md | Documents self-approval prevention and adds a section on reading approved artifacts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| for relation in relations: | ||
| rel_type = relation.relation_type or "unknown" | ||
| click.echo(f"{relation.id:50} {relation.from_id} -> {rel_type} -> {relation.to_id}") |
| click.echo("no entities found") | ||
| return | ||
| for entity in entities: | ||
| click.echo(f"{entity.id:50} {entity.name} ({entity.type})") |
| **Note on approval:** By default, vouch requires human approval and | ||
| prevents self-approval (a proposer cannot approve their own proposal). | ||
| For local testing, you can add `approver_role: trusted-agent` to | ||
| `.vouch/config.yaml`. Production deployments should keep the default | ||
| `require_human_approval: true` to preserve the review gate. |
the relation model uses source/relation/target but the list-relations command was incorrectly trying to access from_id/relation_type/to_id. this caused mypy errors that failed the ci type-check step.
Add 8 new CLI commands for reading and listing approved artifacts (read-{claim,page,entity,relation}, list-{claims,pages,entities,relations})
Document self-approval prevention in getting-started guide with config option for local testing (approver_role: trusted-agent)
Parameterize jsonl-quickstart test to support dynamic method count
Complete decision-log example with 5 approved decisions and full KB
Fixes discovered during end-to-end installation testing.
What changed
Why
What might break
VEP
Tests
make checkpasses locally (lint + mypy + pytest)CHANGELOG.mdupdated under## [Unreleased]