Claude/refine local demo flow 35rbjc#18
Merged
Merged
Conversation
demo.py: - Align per-call output with demo_style.md vocabulary (ALLOW / CHECKPOINT / BLOCK) and show only observable behavior: mapped policy action, requested tool name, gate result, returned tool result. No inner/model reasoning. - Compute plan-box and section-rule widths so borders always line up; add a Scope summary row. - Add a one-line flow legend (plan -> gate -> tools -> receipts -> verify). - Show the mapped action per receipt in the VERIFY list. - Reduce duplication: shared clip() helper, single end-state footer, drop tool_call_label in favor of the action string. - Export audit pack with ensure_ascii=False for readable em-dashes (receipt signatures are computed in-memory and are unaffected). run_demo.sh: - Trim inter-section pauses and tighten the signing notes prose. Enforcement semantics, real SHA-256 receipt hashing, chain verification, the signed plan box, the 3s blocked pause, and live-Qwen fallback are all preserved. demo.py stays stdlib-only and under 400 lines. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CHN9wc1BVmttLHqMpsYLU4
chunks.py splits the demo into five standalone, individually recordable segments that reuse demo.py's logic (no duplication, no weakened enforcement): 1. baseline — without AgentMint: ungated agent reads another patient's record (PT-9914) and behavioral-health, submits/writes with no human checkpoint, leaves no audit trail. Bad outcome stated from observable behavior only. 2. plan — plan creation via the CLI (init + plan create + plan show). 3. enforce — with AgentMint: each call gated against the signed plan (ALLOW/CHECKPOINT/BLOCK), writes the signed receipt chain to audit_pack.json. 4. verify — independent verification that reads audit_pack.json and recomputes signatures and chain links with stdlib only, no runtime. 5. tamper — edits a receipt in a copy, re-verifies, and shows the signature + chain link break; the on-disk pack is left unchanged. Run one chunk (python3 chunks.py verify) for per-segment recording, or all of them (python3 chunks.py all). stdlib-only; demo.py untouched. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CHN9wc1BVmttLHqMpsYLU4
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.
What changed?
Why?
Tests
Breaking changes?