Skip to content

feat: record checklist steps with steplock step done and evidence - #238

Merged
tupe12334 merged 1 commit into
mainfrom
feat/step-done-evidence
Oct 29, 2026
Merged

tupe12334 merged 1 commit into
mainfrom
feat/step-done-evidence

Conversation

@tupe12334

Copy link
Copy Markdown
Member

Summary

  • Problem: block messages said When finished, run: sh ~/.config/steplock/sessions/<id>/<flow>/ack.sh. Claude Code auto mode flags this as "Auto-Mode Bypass", because the agent runs an opaque script that approves its own gate. Agents in auto mode cannot finish any steplock checklist.
  • New flow: the block reads as a checklist step: Checklist step 2 of 18. Do what it asks, then record the result: steplock step done <checklist> <step> --session <id> --evidence "<what you did and what you saw>". steplock checks that the step is the current one and that the --next outcome is valid. It writes the evidence to audit.log as a step_done event. A wrong or repeated step fails and changes nothing.
  • Gates never block a plain steplock step ... command, so evidence that quotes git push or gh pr merge does not deadlock. Commands with ;&|<>$, backtick or newline are gated as usual.
  • allow_preview_request = true now lists every step in the first block message. Before, it pointed to preview.sh, and the agent had to read a file under ~/.config/steplock.
  • Back-compat: ack.sh and preview.sh are still written to each session dir (deprecated, documented in Architecture.md). Old sessions keep working.
  • Docs updated: README, Architecture, Installation, CONTRIBUTING, core docs, schemas, examples, CHANGELOG. Also promotes clippy::unused_self to deny (ratchet rule).

Test plan

  • cargo test passes (new step_tests.rs unit tests plus a CLI end-to-end test: block, then step done with git push in the evidence, then the retry is approved and the evidence is in the audit log)
  • cargo clippy --all-targets -- -D warnings passes
  • cargo fmt -- --check passes
  • Manual smoke test: rendered a branching block message from the debug binary in a temp .steplock/

🤖 Generated with Claude Code

Block messages told the agent to run `sh .../ack.sh`. Claude Code auto
mode reads that as the agent approving its own safety gate and refuses
it, so agents in auto mode could not finish any checklist.

- New `steplock step done <checklist> <step> --session <id> --evidence`
  checks the step is current and the outcome is valid, advances state,
  and logs the evidence to audit.log as a `step_done` event.
- Block messages read as a checklist step and show that command. With
  allow_preview_request, the first block lists every step inline.
- Gates never block a plain `steplock step ...` command (no shell
  control characters), so evidence that quotes a gated command works.
- ack.sh and preview.sh are still written (deprecated) for old sessions.
- Promote clippy::unused_self to deny.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tupe12334
tupe12334 merged commit cccbd3f into main Oct 29, 2026
13 checks passed
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.

1 participant