Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
93d4ec2
Add 2.0 internal document model with partition invariants
coddingtonbear Jul 19, 2026
ba2c132
Add public map projection derived from the 2.0 model
coddingtonbear Jul 19, 2026
fa0cac5
Add Obsidian conformance harness and capture tooling
coddingtonbear Jul 19, 2026
173b684
Match Obsidian's block-span rules in the 2.0 model
coddingtonbear Jul 19, 2026
0dce2b0
Freeze Obsidian conformance goldens and assert block spans exactly
coddingtonbear Jul 19, 2026
058b2d5
Add 2.0 instruction types and cell-validity matrix
coddingtonbear Jul 19, 2026
a1b99ee
Add the 2.0 address resolver
coddingtonbear Jul 19, 2026
ccd3885
Add the splice primitive and node range geometry
coddingtonbear Jul 19, 2026
7a4a007
Add relative heading level rebasing
coddingtonbear Jul 19, 2026
f41a45c
Add the 2.0 engine core for plain-string write cells
coddingtonbear Jul 19, 2026
e7cf738
Add the 2.0 engine's structural cells (move, dissolve, deletes)
coddingtonbear Jul 19, 2026
c972ce1
Add the 2.0 engine's frontmatter cells
coddingtonbear Jul 19, 2026
2ccfe99
Add createTargetIfMissing support across heading, block, and frontmatter
coddingtonbear Jul 19, 2026
cfc2c22
Generalize rejectIfContentPreexists and export the 2.0 engine
coddingtonbear Jul 19, 2026
0c9a113
Add map/patch symmetry and splice-locality property tests
coddingtonbear Jul 19, 2026
6af2029
Make heading content scope address the whole subtree below the heading
coddingtonbear Jul 19, 2026
57b5e8b
Rename the move carrier from `value` to `destination`
coddingtonbear Jul 19, 2026
8e19b47
Carry frontmatter JSON values in `value`, keeping `content` a string
coddingtonbear Jul 19, 2026
dc77a1c
Default an omitted scope to content
coddingtonbear Jul 19, 2026
f89ce67
Set version to 2.0.0 for the 2.0 development line
coddingtonbear Jul 19, 2026
bfe6e6d
Export map/model surface and add readTarget helper
coddingtonbear Jul 19, 2026
48f8f4a
Document the instruction engine as the library's API
coddingtonbear Jul 19, 2026
c8a77a4
Clarify what markerAndContent covers and how it re-levels
coddingtonbear Jul 19, 2026
4f84d89
Correct the documented whitespace behavior
coddingtonbear Jul 20, 2026
22821ca
Document that marker renames take plain text, never `#` characters
coddingtonbear Jul 20, 2026
fcdd874
Address headings by containment path, not null-padded level
coddingtonbear Jul 21, 2026
130c5a5
Publish a Zod schema for a patch instruction
coddingtonbear Jul 21, 2026
49a361b
List a repeated heading's descendants in the document map
coddingtonbear Jul 21, 2026
0fe12a9
De-level a heading's content on read, matching a content-scope write
coddingtonbear Jul 22, 2026
fcb01fa
Add failing tests for table-row writes on a block target
coddingtonbear Jul 22, 2026
2985c04
Add table-row support to the 2.0 engine's block content cell
coddingtonbear Jul 22, 2026
cabec0a
Add failing tests for rejectIfContentPreexists on heading content
coddingtonbear Jul 22, 2026
5167de5
Rebase heading levels before the rejectIfContentPreexists comparison
coddingtonbear Jul 22, 2026
37366bf
Relocate FrontmatterParseError into the 2.0 engine's error hierarchy
coddingtonbear Jul 22, 2026
39f6b7e
Add failing tests for malformed frontmatter and key-collision handling
coddingtonbear Jul 22, 2026
92932e9
Reject malformed frontmatter YAML and colliding frontmatter keys
coddingtonbear Jul 22, 2026
24b4687
Rename SectionNode.content to SectionNode.body
coddingtonbear Jul 22, 2026
157369d
Add failing tests for unvalidated block ids and heading marker renames
coddingtonbear Jul 22, 2026
0cbfc4b
Validate block ids and reject newlines in heading marker renames
coddingtonbear Jul 22, 2026
e9007e3
Add failing tests for a heading literally named __proto__
coddingtonbear Jul 22, 2026
77df34c
Give heading-tree nodes a null prototype to fix the __proto__ collision
coddingtonbear Jul 22, 2026
24cc518
Add a failing test for findBlocks mis-anchoring identical blocks
coddingtonbear Jul 22, 2026
4db394d
Fix findBlocks mis-anchoring byte-identical sibling blocks
coddingtonbear Jul 22, 2026
fb139ba
Add failing tests for duplicate sibling heading addressing
coddingtonbear Jul 22, 2026
c04b8ce
Give every duplicate sibling heading its own address
coddingtonbear Jul 22, 2026
efbfc3e
Document the duplicate-heading marker suffix in the target field desc…
coddingtonbear Jul 22, 2026
75c6aab
Add failing tests for duplicate block-id addressing
coddingtonbear Jul 22, 2026
8343a3c
Give every duplicate block id its own address
coddingtonbear Jul 22, 2026
5ea9d05
Allow a disambiguated block target through schema validation
coddingtonbear Jul 22, 2026
053e86e
Document the duplicate-block-id marker suffix in the target field des…
coddingtonbear Jul 22, 2026
e0c00b5
Add failing tests for unescaped table cell content
coddingtonbear Jul 22, 2026
f81a923
Escape pipes and reject line breaks in table cells
coddingtonbear Jul 22, 2026
629227e
Remove the 1.x engine and port the CLI to the 2.0 engine
coddingtonbear Jul 23, 2026
dff09d3
Fill in package metadata for the 2.0 release
coddingtonbear Jul 23, 2026
d1069cb
Widen zod to ^3.25.76 and add the ISC LICENSE file
coddingtonbear Jul 23, 2026
8fcd4f4
Relicense from ISC to MIT
coddingtonbear Jul 23, 2026
20c0908
Make whitespace library-owned for heading writes, honoring Design Pri…
coddingtonbear Jul 23, 2026
cdd0b72
Surface each section's ordered body blocks as bodyChildren
coddingtonbear Jul 23, 2026
0cde65a
Resolve a within index to a section's Nth body block
coddingtonbear Jul 23, 2026
1bbf589
Add the within field: edit a section's Nth body block without a ^id
coddingtonbear Jul 23, 2026
dd435cf
Document the within field across README, overview, and how-to
coddingtonbear Jul 23, 2026
990d3ba
Capture the Obsidian golden for the body-children fixture
coddingtonbear Jul 23, 2026
86a70f3
Guarantee insertions begin at a line start
coddingtonbear Jul 23, 2026
a3bdd09
Start created heading chains at a line start
coddingtonbear Jul 23, 2026
d58f766
Re-level adjacent-destination moves in place
coddingtonbear Jul 23, 2026
d4f2684
Strip the pipeline's trailing newline from CLI marker payloads
coddingtonbear Jul 23, 2026
6c59ff7
Build frontmatter entries from the positioned YAML AST
coddingtonbear Jul 23, 2026
c34b054
Add scope to readTarget, mirroring the patch scopes
coddingtonbear Jul 23, 2026
fd49efc
Expose read scope through the CLI query command
coddingtonbear Jul 23, 2026
aeb0b3b
Document read scopes, table rows, and duplicate addressing in the README
coddingtonbear Jul 24, 2026
e4e6b0c
Restructure the README top around a worked example and a Why section
coddingtonbear Jul 24, 2026
9448135
Adding demo image.
coddingtonbear Jul 24, 2026
fa6a761
Add a generated table of contents to the README
coddingtonbear Jul 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dist/*
node_modules/*
docs/*
demo.gif
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024-2026 Adam Coddington <me@adamcoddington.net>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
432 changes: 349 additions & 83 deletions README.md

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions demo.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Regenerate demo.gif (requires https://github.com/charmbracelet/vhs):
# npm run build && vhs demo.tape
Output demo.gif
Require git
Require node

Set FontSize 20
Set Width 1460
Set Height 720
Set Padding 16
Set TypingSpeed 30ms
Set Theme "Jellybeans"

Hide
Type `REPO="$PWD"; cd "$(mktemp -d)"; printf '# Weekly Sync\n\n## Notes\n\nKim walked through the Q3 timeline.\n\n## Attendees\n\n- Adam\n- Kim\n' > notes.md; git init -q; git add notes.md; git commit -qm baseline; mdpatch() { node "$REPO/dist/cli.js" "$@"; }; clear`
Enter
Sleep 3s
Show

Type "cat notes.md"
Enter
Sleep 2.5s

Type 'echo "Decided: we ship on Thursday." | mdpatch patch append heading "Weekly Sync::Notes" notes.md'
Enter
Sleep 2.5s

Type "git --no-pager diff"
Enter
Sleep 5s
Loading
Loading