feat(debug): hypothesis-tracking journal + debugging workflows doc#55
Merged
Conversation
scripts/debug-journal.sh makes hypothesis-driven debugging auditable and resumable: `add` records a hypothesis (auto-sequenced, status pending), `resolve` sets confirmed/refuted + evidence by seq, `report` renders the session journal as markdown or JSON. Stored at logs/debug/<session>.tsv with the session name sanitized to a safe filename (no path traversal). Adds docs/debugging-workflows.md (root-cause templates, minimal-repro, regression-test-first guidance), promoted/generalized from the ideas draft. 9 bats tests. Completes the Later "debugging workflows" item. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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
Completes the Debugging workflows roadmap item with a concrete, tested tool plus a guidance doc.
scripts/debug-journal.sh— hypothesis-driven debugging made auditable/resumable:add --session S --hypothesis ... --test ...(auto-sequenced, statuspending)resolve --session S --seq N --result confirmed|refuted --evidence ...report --session S [--format markdown|json]logs/debug/<session>.tsv; session name sanitized to a safe filename (no path traversal).docs/debugging-workflows.md— root-cause templates table, minimal-repro discipline, and regression-test-first guidance; generalized from theideas/draft.Tests
9 bats tests (
tests/debug-journal.bats): add/sequence, resolve+evidence, markdown + JSON report, bad-result/unknown-seq/missing-session exit codes, invalid mode, and the filename-sanitization guard. Suite total: 71.Verification
bats tests/→ 71 pass;make check/security-scan/ link check → greenshellcheck/markdownlint-cli2→ clean🤖 Generated with Claude Code