Repository navigation
feat(hooks): retire the Claude Code mod and hand lich's edit note through the touched report - #110
Merged
Merged
Conversation
…ough the touched report The plugin is hooks and skills. The mod's controls, usage, errands footer, compacting bracket, self-run commands and prompt catalogs go with lich's /mod/* contracts. The edit guard becomes the session-touched contract at lich c62b0796: report-touched.sh names the files a write touched (absolute, each once) and hands lich's note to the model in each harness's shape; Antigravity and Kiro hold it and collect it before the next model call or prompt. The opencode and omp modules do the same in process. Antigravity's matcher names its 1.5.15 write tools too.
Merged
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.
Cut 2 of the Claude Code mod's removal, and the edit guard as a hook on every harness, against lich's reborn c62b0796 (
docs/hooks/session-touched.md, which removed the/mod/*contracts and extended session-touched withpaths,hold,collectand a200 {"note"}).Removed
The whole mod:
hooks/lich.jsand themodulesentry,mod-control.js,mod-status.js,mod-usage.js,mod-compacting.js,self-command.js,status-line.js,edit-guard.js,prompt-text.js, their tests and engine tests,docs/mod-*.md,docs/edit-guard.md,docs/self-command.md, and the vendoredmod-control,mod-commands,mod-usageandmod-statusfixtures with their refresh lines. The plugin is hooks and skills. lich's chat drives Claude Code withclaude -pover stream-json, where every one of these mods but the edit guard was already inert.The edit note, per harness
report-touched.shonPostToolUsetool_input.file_pathhookSpecificOutput.additionalContextwin-veto.cmd, which keeps stdout)cwdadditionalContextPostToolUsefrom v0.99.0tool_input.file_path{"version":1,"context":note}; on an older Crush'sPreToolUse, no paths and nothing printedPostToolUsereport-touched.sh hold,PreInvocationreport-touched.sh collecttoolCall.args.PathinjectStepssystem message; the matcher nameswrite_file/edit_filebeside the old pair, fixing the 1.5.15 renameholdonpostToolUseandcollectonuserPromptSubmittool_input.path, relative tocwdtool.execute.afterforwrite,edit,apply_patch,bashargs.filePath;metadata.files[].filePathoutput.outputtool_resultdetails.resolvedPath/details.path{additionalContext}Paths are absolute with
.and..folded, each once. opencode no longer reportsfile.edited, which fires before the same write'stool.execute.after, so one edit is never sent twice. opencode'swriteandeditwere measured on 1.19.4 (DeepSeek) before this change. The plugin writes no text of its own: the note is lich's envelope, passed on byte for byte.tests/fixtures/session-touched.jsonlis read at lich c62b0796, which no release ships yet; the version spots stay 0.22.0.Not measured: Claude Code's
NotebookEditpayload, Cursor's edit through a tool other thanWrite, opencode 2 (which keeps its path-less refresh), and Windows.Test plan
node --test tests/*.test.mjs: 462 pass. The newtests/touched.test.mjsruns every harness's client against a stub answering with the fixture's notes: the body each sends,holdandcollect, the note in each harness's shape byte for byte, nothing on a 204, a held touch or an old Crush'sPreToolUse, and fail-open (outside lich, refused connection, 500, non-JSON, no note).claude plugin validate .claude-plugin/plugin.jsonandagy plugin validate .pass with their usual warnings.tests/refresh-fixtures.shleaves no diff.