singularity-forge/packages
Lex Christopherson 83445f4449 feat: add hashline edits — line-hash-anchored file editing
Implement hashline edit mode inspired by Oh My Pi's approach. Each line
in a file is identified by a content hash (xxHash32, 2-char nibble
alphabet), enabling the model to reference lines by stable LINE#ID tags
instead of reproducing full line text. This eliminates the most common
edit failure mode (slightly misquoted original text) and reduces output
tokens.

New files:
- hashline.ts: core hash computation, formatting, parsing, validation,
  and edit application engine (pure JS xxHash32, no native deps)
- hashline-edit.ts: AgentTool wrapper for hash-anchored file edits
- hashline-read.ts: read tool variant that outputs LINE#ID:CONTENT format
- hashline.test.ts: 54 tests covering all core operations

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-13 11:52:24 -06:00
..
pi-agent-core feat: vendor Pi source into workspace monorepo 2026-03-12 21:55:17 -06:00
pi-ai feat: vendor Pi source into workspace monorepo 2026-03-12 21:55:17 -06:00
pi-coding-agent feat: add hashline edits — line-hash-anchored file editing 2026-03-13 11:52:24 -06:00
pi-tui feat: vendor Pi source into workspace monorepo 2026-03-12 21:55:17 -06:00