[claude-hackernews] draft: regent VCS-for-agents (rewind vs record)#60
[claude-hackernews] draft: regent VCS-for-agents (rewind vs record)#60NiveditJain wants to merge 1 commit intomainfrom
Conversation
…ntent intercept) Reply on https://news.ycombinator.com/item?id=48049431 (Show HN: Git for AI Agents by `doshay`). OP enumerates "why did you delete this folder?", /rewind after /compact, and bisect-by-session as the failure modes the tool addresses, and explicitly solicits other ideas or solutions. Angle: snapshot-versioned FS catches the consequence; a PreToolUse intercept catches the intent before dispatch. For the rm case, `block-rm-rf` never lets the call leave the agent process so there is nothing to rewind; when a call is allowed, the same intercept records what was attempted and which policy let it through, which is the "why" without trawling a transcript. Closes with a substantive design question routing back to the OP's filesystem-snapshot-vs-tool-call-history choice. One policy named (block-rm-rf), no snippet, ~140 words, single repo URL in the disclosure line, ASCII punctuation only. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
📝 WalkthroughWalkthroughA new Markdown draft file is added to ChangesShow HN Draft on Intent-Level Audit vs State-Level Rewind
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@drafts/2026-05-08T111136Z.md`:
- Around line 29-37: The fenced code block beginning with ``` (the long quoted
paragraph starting “(disclosure: I work on FailProof AI…”) lacks a language hint
and triggers markdownlint MD040; update that opening fence to ```text so the
block is treated as plain text (i.e., change ``` to ```text) and leave the block
content unchanged to satisfy the linter.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 706afeb1-80a7-4f00-8501-beecdd34d4d5
📒 Files selected for processing (1)
drafts/2026-05-08T111136Z.md
| ``` | ||
| (disclosure: I work on FailProof AI: https://github.com/exospherehost/failproofai) | ||
|
|
||
| The "why did you delete this folder?" question splits along a useful seam: state-level rewind (what your tool provides) is different from intent-level audit (which tool call was attempted, what allowed it). Both matter, at different moments. | ||
|
|
||
| A snapshot-versioned FS catches the consequence; a PreToolUse intercept catches the intent before dispatch. For the rm case, a `block-rm-rf` policy never lets the call leave the agent process, so there is nothing to rewind. When you do allow a call, the same intercept can record what was attempted and which policy let it through, which is the "why" you want without trawling a transcript. | ||
|
|
||
| Curious whether your VCS layer would expose tool-call input + decision as the unit of history, or stay filesystem-snapshot only. | ||
| ``` |
There was a problem hiding this comment.
Add a language hint to the fenced block (Line 29).
markdownlint MD040 is triggered because the code fence has no language. Use text to keep the draft content unchanged while satisfying lint.
Suggested diff
-```
+```text
(disclosure: I work on FailProof AI: https://github.com/exospherehost/failproofai)
...
-```
+```🧰 Tools
🪛 markdownlint-cli2 (0.22.1)
[warning] 29-29: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@drafts/2026-05-08T111136Z.md` around lines 29 - 37, The fenced code block
beginning with ``` (the long quoted paragraph starting “(disclosure: I work on
FailProof AI…”) lacks a language hint and triggers markdownlint MD040; update
that opening fence to ```text so the block is treated as plain text (i.e.,
change ``` to ```text) and leave the block content unchanged to satisfy the
linter.
Summary
doshay). The OP's first comment (id=48049432) lays out the failure modes the tool addresses:why did you do it?,when did u delete this folder? why?,/rewind (after a /compact...),bisect ... in the current / previous session, plus an explicit invitation:would love to get feedback, contribution or maybe other ideas or solutions you find for those problems.block-rm-rfnever lets the call leave the agent process, so there is nothing to rewind. When a call is allowed, the same intercept records what was attempted and which policy let it through - the "why" without trawling a transcript.block-rm-rf), no custom snippet, ~140 words. Single repo URL in the disclosure line. ASCII punctuation only.Discovery
/ask,/show,/newestsweeps for 2026-05-08 (none of those surfaced a tighter fit than already-covered IDs). Then ranhn.algolia.com/?q=claude+code+deleted&dateRange=last24h&sort=byDate&type=commentwhich returneddoshay's OP-comment on this thread as the only match. Verified the parent thread (48049431) is not in the open-PR coverage list and not incomments/.Cross-thread fingerprint check
block-rm-rf(tied to OP's literal "delete this folder" example), which has not been the named policy in those prior drafts.drafts/andcomments/for paraphrase overlap; the "state-level rewind ... intent-level audit" framing is unique to this draft.Status
Draft file
drafts/2026-05-08T111136Z.md🤖 Generated with Claude Code
Summary by CodeRabbit