

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1# src/tools/hashline-edit/ — Hash-Anchored File Edit Tool23**Generated:** 2026-05-1545## OVERVIEW6724 files. Implements the `hashline_edit` tool — hash-anchored file editing where every line reference includes a content hash (`LINE#ID`). Validates hashes before applying edits, rejecting stale references.89## THREE-OP MODEL1011All edits use exactly 3 operations:1213| Op | pos | end | lines | Effect |14|----|-----|-----|-------|--------|15| `replace` | required | optional | required | Replace single line or range pos..end |16| `append` | optional | optional | required | Insert after anchor (or EOF if no anchor) |17| `prepend` | optional | optional | required | Insert before anchor (or BOF if no anchor) |1819`lines: null` or `lines: []` with `replace` = delete. `delete: true` at tool level = delete file.2021## EXECUTION PIPELINE2223```24hashline-edit-executor.ts25 → normalize-edits.ts # Parse RawHashlineEdit → HashlineEdit (validate op schema)26 → validation.ts # Validate LINE#ID references (hash match, line exists)27 → edit-ordering.ts # Sort bottom-up (by line number, descending)28 → edit-deduplication.ts # Remove duplicate ops29 → edit-operations.ts # Apply each op using edit-operation-primitives.ts30 → autocorrect-replacement-lines.ts # Auto-fix indentation/formatting31 → hashline-edit-diff.ts # Build diff output using diff-utils.ts32```3334## KEY FILES3536| File | Purpose |37|------|---------|38| `tools.ts` | `createHashlineEditTool()` factory — tool schema + entry point |39| `hashline-edit-executor.ts` | Main execution: normalize → validate → order → apply → diff |40| `normalize-edits.ts` | Parse `RawHashlineEdit[]` (allows string `op` variants) → typed `HashlineEdit[]` |41| `validation.ts` | Validate LINE#ID: parse hash, verify line content matches stored hash |42| `hash-computation.ts` | `computeLineHash(line)` → 2-char CID from set `ZPMQVRWSNKTXJBYH` |43| `edit-operations.ts` | Apply replace/append/prepend to file lines array |44| `edit-operation-primitives.ts` | Low-level line array mutation primitives |45| `edit-ordering.ts` | Sort edits bottom-up to preserve line numbers during multi-edit |46| `edit-deduplication.ts` | Deduplicate overlapping/identical operations |47| `edit-text-normalization.ts` | Normalize line content (CRLF, BOM, trailing whitespace) |48| `file-text-canonicalization.ts` | Canonicalize full file content before hashing |49| `autocorrect-replacement-lines.ts` | Auto-restore indentation from original lines |50| `hashline-edit-diff.ts` | Generate unified diff for error/success messages |51| `diff-utils.ts` | Thin wrapper around `diff` npm library |52| `hashline-chunk-formatter.ts` | Format line chunks with `LINE#ID` tags |53| `tool-description.ts` | `HASHLINE_EDIT_DESCRIPTION` constant |54| `types.ts` | `HashlineEdit`, `ReplaceEdit`, `AppendEdit`, `PrependEdit` |55| `constants.ts` | Hash alphabet, separator character (`#`), pipe separator (`|`) |5657## LINE#ID FORMAT5859```60{line_number}#{hash_id}61```6263- `hash_id`: two chars from `ZPMQVRWSNKTXJBYH` (CID letters)64- Example: `42#VK` means line 42 with hash `VK`65- Validation: recompute hash of current line content → must match stored hash66- Content separator: `|` (pipe) between hash tag and content in read output6768## AUTOCORRECT BEHAVIORS (built-in)6970- Merged lines auto-expanded back to original count71- Indentation restored from original lines72- BOM and CRLF line endings preserved73- `>>>` prefix and diff markers in `lines` text auto-stripped7475## ERROR CASES7677- Hash mismatch → edit rejected, diff shown with current state78- Overlapping ranges → detected and rejected79- Missing `pos` for `replace` → schema error80- `lines: null` with `append`/`prepend` → schema error8182## HOW LINE HASHES WORK8384```typescript85// Reading: every line gets tagged86"42#VK| function hello() {"8788// Editing: reference by tag89{ op: "replace", pos: "42#VK", lines: "function hello(name: string) {" }9091// If file changed since read: hash won't match → rejected before corruption92```93
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| code-yeongyu/oh-my-openagentpackages/omo-opencode/src/tools/look-at/AGENTS.md · 68k | AGENTS.md | arch | 68/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentassets/AGENTS.md · 68k | AGENTS.md | buildteststylearch | 88/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/AGENTS.md · 68k | AGENTS.md | buildtestlint-formatstyle+3 | 83/100 | today | |
| code-yeongyu/oh-my-openagentpackages/omo-codex/plugin/components/ultrawork/AGENTS.md · 68k | AGENTS.md | buildteststylearch+1 | 77/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/omo-opencode/src/tools/background-task/AGENTS.md · 68k | AGENTS.md | arch | 70/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/omo-opencode/src/agents/sisyphus/AGENTS.md · 68k | AGENTS.md | arch | 56/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/omo-opencode/src/hooks/ralph-loop/AGENTS.md · 68k | AGENTS.md | arch | 62/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/omo-opencode/src/hooks/rules-injector/AGENTS.md · 68k | AGENTS.md | archdo-not | 69/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/omo-opencode/src/hooks/runtime-fallback/AGENTS.md · 68k | AGENTS.md | stylearchtypes | 70/100 | 13 days ago | |
| code-yeongyu/oh-my-openagent.agents/AGENTS.md · 68k | AGENTS.md | stylearchtesting-strategydatabase | 64/100 | 13 days ago | |
| code-yeongyu/oh-my-openagent.opencode/AGENTS.md · 68k | AGENTS.md | stylearchdo-not | 71/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentAGENTS.md · 68k | AGENTS.md | setupbuildtestlint-format+11 | 84/100 | today | |
| code-yeongyu/oh-my-openagentpackages/agents-md-core/AGENTS.md · 68k | AGENTS.md | archdependenciesapi | 48/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/ast-grep-mcp/AGENTS.md · 68k | AGENTS.md | buildstylearchdependencies+1 | 78/100 | 7 days ago | |
| code-yeongyu/oh-my-openagentpackages/boulder-state/AGENTS.md · 68k | AGENTS.md | archapi | 48/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/claude-code-compat-core/AGENTS.md · 68k | AGENTS.md | archagent-behaviour | 56/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/comment-checker-core/AGENTS.md · 68k | AGENTS.md | archdependenciesapi | 48/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/delegate-core/AGENTS.md · 68k | AGENTS.md | stylearchdependenciesapi | 60/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/git-bash-mcp/AGENTS.md · 68k | AGENTS.md | buildtestlint-formatarch+1 | 82/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/hashline-core/AGENTS.md · 68k | AGENTS.md | archtypesdependenciesapi | 48/100 | 13 days ago |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| n8n-io/n8npackages/@n8n/agents/AGENTS.md · 201k | AGENTS.md | buildteststylearch+3 | 100/100 | 14 days ago | |
| aaif-goose/gooseAGENTS.md · 53k | AGENTS.md | setupbuildtestlint-format+7 | 100/100 | 8 days ago | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 14 days ago | |
| deepseek-ai/deepseek-harnessnative/landlock-run/AGENTS.md · 104k | AGENTS.md | setupteststylearch+3 | 100/100 | today | |
| code-yeongyu/oh-my-openagentpackages/web/AGENTS.md · 68k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 13 days ago | |
| TryGhost/Ghoste2e/AGENTS.md · 55k | AGENTS.md | setupteststylearch+2 | 100/100 | today | |
| mui/material-uiAGENTS.md · 99k | AGENTS.md | setupbuildtestlint-format+9 | 100/100 | 14 days ago | |
| elastic/elasticsearchx-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/AGENTS.md · 78k | AGENTS.md | buildtestlint-formatstyle+2 | 100/100 | 14 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/code-yeongyu-oh-my-openagent-packages-omo-opencode-src-tools-hashline-edit-agents)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.