Repository navigation
Conversation
README, LAUNCH, install.sh, and READY-TO-PASTE were still pointing at the git+https install. vera-clerk has been live on PyPI since 0.1.0; the ship.sh patching step was never run. Align the four surfaces now so visitors see the canonical install command.
chat() now returns (text, usage). USD_PER_MTOK carries public rates for the handful of models Vera actually dispatches to; unknown models get usd=None rather than a fabricated number. log_usage() appends a USAGE kind to the provenance JSONL per call (chat / chat-retry / audit). vera status reads the last 30 days of USAGE entries and prints 'Spend (30d): $X over N calls' when any exist. Hidden cost is the fastest route to a deleted tool; this makes it visible without coupling Vera to a particular billing endpoint.
Rule violations previously triggered a silent second call; the user saw only a longer wait and a different response. Now we: - print '⟲ regenerating: <violation>' (dim) before the retry so the user knows why the turn took extra time - if attempt 2 also violates, append a '⚠ rule layer disagreed twice' footer to the response so the user knows the model ignored the rule layer rather than silently pretending it complied Hidden retries kill trust. Seeing the rule layer work is the point.
Two linked changes so memory stays useful past month one.
vera prune [--older-than N --keep N --dry-run]
Move transcripts older than N days (mtime, default 90) into
MEMORY_DIR/_archive/, always retaining the most-recent --keep
(default 50). --dry-run lists targets without moving. vera status
surfaces 'Archive: N transcripts' when the dir exists.
load_memory_summary()
Previously last 10 files × first 200 chars (mid-word truncation,
no durability). Now two layers:
1. Durable facts: dedup of RULE / OBSERVED provenance entries
from the last 30 days (bullet per entry, 160-char cap).
2. Recent transcripts: the last 5 transcripts, one-line headline
each.
Falls back cleanly when the log / dir are missing.
vera audit previously hardcoded [-5:] and the provider's default audit_model. Users with deeper history or cheaper-model preferences had no lever. This adds three levers: --last N audit last N transcripts by mtime (default 5) --since YYYY-MM-DD only transcripts on/after this date --model MODEL override the audit model for this run plus a VERA_AUDIT_MODEL env var read in detect_provider() so power users can set their preferred auditor once per shell. run_audit() grows matching kwargs; --since uses mtime rather than filename so copied or hand-placed transcripts still work.
The previous parser required the marker and field lines in exact
form — unindented, no prefix, three lines. Real model outputs wrap
captures in markdown blockquotes, list bullets, or extra whitespace,
and those silently dropped.
Now parse_captures:
- strips blockquote '>', list '-'/'*', and arbitrary indent before
the marker and each field
- accepts case-insensitive 'kind:' / 'content:'
- scans up to 6 lines after the marker (was 3)
- tolerates a blank line between marker and fields
- returns (captures, warnings); the chat loop prints a dim notice
and logs a MALFORMED provenance entry per warning so the user
knows something was dropped instead of silent data loss.
Adds MALFORMED to ProvenanceKind. Seven new regression tests cover
blockquote, list, indentation, case, blank-line-separator cases.
0.2.0 ships 'visibility and control': cost tracking, visible regenerate, vera prune + smarter memory summary, audit controls, lenient VERA-CAPTURE parsing, and the install-drift cleanup. 47 tests (+23 since 0.1.0). Build + twine check clean in a fresh venv (local debian-pinned 'packaging' rejects the 2.4 Metadata header; CI uses fresh tooling).
Merged
Owner
Author
|
Superseded by #8. The 0.2.0 durability cycle worked (47 tests passing), but the wind-down decision makes it moot — Vera is archiving at 0.1.1 rather than shipping 0.2.0. The seven feature commits remain in branch history for reference. Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
0.2.0 is a durability-for-daily-use cycle sitting before the public launch. 0.1.0 worked; 0.2.0 makes the four primitives trustworthy for week-over-week use. Seven commits, each leaving tests green (47 passing, up from 24).
vera.llm.chat()now returns(text, usage). Every chat / chat-retry / audit call writes aUSAGEentry to the provenance JSONL with tokens + estimated USD.vera statusprintsSpend (30d): $X over N callswhen any USAGE entries exist.⟲ regenerating: <violation>and, if the rule layer disagrees twice, appends a⚠ rule layer disagreed twicefooter instead of silently accepting the second draft.vera prune. Moves transcripts older than N days (mtime, default 90) intoMEMORY_DIR/_archive/, always retaining the most-recent--keep(default 50). Supports--dry-run.vera statussurfaces archive counts.load_memory_summary()now layers dedupedRULE/OBSERVEDcaptures from the last 30 days on top of headlines from the last 5 transcripts. No mid-word truncation.--last N,--since YYYY-MM-DD,--model MODEL, plusVERA_AUDIT_MODELenv var.>, list-/*, arbitrary indent, case-insensitive keys, and blank-line separators. Malformed blocks produce a console warning plus aMALFORMEDprovenance entry instead of silent drops.pipx install vera-clerk(PyPI) rather than the stalegit+https://github.com/iamitp/vera.Version bump
0.1.0 → 0.2.0. Not publishing to PyPI in this cycle — that ships when the launch is greenlit.Test plan
pytest -qlocally — 47 passed.python3 -m build+python3 -m twine check dist/*in a fresh venv — both PASSED.vera init --quick && vera chatwith a realANTHROPIC_API_KEYon a clean shell. Confirm:⟲ regenerating:prints when a rule violation is caught.Ctrl-D,vera statusshows the spend line.vera audit --last 1 --model claude-haiku-4-5-20251001respects the override.vera prune --older-than 30 --dry-runlists candidates; without--dry-runmoves them into_archive/.Planned in
/root/.claude/plans/evaluate-where-we-are-glistening-waffle.md.