Scenarios
Step-by-step workflows for common Attestack situations.
Scenario 1: AI-assisted feature work
Section titled “Scenario 1: AI-assisted feature work”Goal: Record a full development session and share evidence with reviewers.
attestack initattestack start "auth middleware refactor"attestack agent tool-call --tool read_file --input-hash sha256:abc… --summary "Read auth module"attestack run -- cargo testattestack note "Reviewed token validation path manually"attestack agent decision --summary "Use existing JWT helper" --rationale "Matches repo conventions"attestack snapshotattestack stopattestack bundle create --redact-pathsattestack verify .attestack/bundles/*.attestack.zipAttach the bundle to your PR description or upload as a CI artifact.
Scenario 2: Reviewer verifying a bundle
Section titled “Scenario 2: Reviewer verifying a bundle”Goal: Confirm evidence was not tampered with.
attestack verify ./evidence/fix-auth.attestack.zipattestack report --output /tmp/review.mdIf verification fails, the CLI lists digest mismatches or hash-chain breaks. Do not trust the bundle.
Scenario 3: CI test run with evidence export
Section titled “Scenario 3: CI test run with evidence export”Goal: Capture CI test execution in a signed bundle.
See CI integration and examples/github-actions/attestack-evidence.yml.
Summary:
attestack ci start— opens a session titled fromGITHUB_*env varsattestack ci run -- npm test— records the test commandattestack ci finish— stops session, creates bundle, uploads artifact
Scenario 4: Agent via MCP (Cursor, Claude Desktop, etc.)
Section titled “Scenario 4: Agent via MCP (Cursor, Claude Desktop, etc.)”Goal: Let an MCP-capable agent append notes and tool-call hashes without shell wrappers.
- Build
attestack-mcp - Add to your MCP config (see
examples/mcp/cursor-mcp.json) - Agent calls
attestack_note,attestack_agent_tool_call, etc.
The MCP server never executes arbitrary shell commands from agent input.
Scenario 5: Non-Git project
Section titled “Scenario 5: Non-Git project”Goal: Use Attestack outside a Git repository.
attestack initattestack start "config migration" --no-gitattestack run -- make checkattestack note "Validated migration script output"attestack stopsnapshot will fail with a clear message; other commands work normally.
Scenario 6: Parallel sessions (advanced)
Section titled “Scenario 6: Parallel sessions (advanced)”attestack start "experiment A" --allow-parallelattestack start "experiment B" --allow-parallelattestack note "A only" --session ses_…Use --session <id> to target a specific open session.
Scenario 7: Tamper detection demo
Section titled “Scenario 7: Tamper detection demo”- Create and verify a valid bundle
- Copy the zip and edit
events.jsonlinside - Run
attestack verifyon the copy — verification must fail
This demonstrates fail-closed verification.
Scenario 8: Health check before a demo
Section titled “Scenario 8: Health check before a demo”attestack doctor --jsonFix any [fail] items before recording a session (missing identity, broken chain, etc.).