feat: add #bm:links_to directive for ambiguous relations - #1306
feat: add #bm:links_to directive for ambiguous relations#1306mikemikimike wants to merge 8 commits into
Conversation
|
hi @mikemikimike thanks for the PR. Would you mind doing and force pushing to the branch again? We require commits to be signed off (-s) for our DCO. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 69783a0be6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # those bracket prefixes stay ordinary content (issue #1219). | ||
| _TIMESTAMP_VALUE = r"\d{1,3}:\d{2}(?::\d{2})?(?:[.,]\d{1,3})?" | ||
| _TIMESTAMP_CATEGORY = re.compile(rf"^{_TIMESTAMP_VALUE}(?:\s+-\s+{_TIMESTAMP_VALUE})?$") | ||
| _LINKS_TO_DIRECTIVE = re.compile(r"\s+#bm:links_to\s*$") |
There was a problem hiding this comment.
Document the new relation directive
This introduces the only way to disambiguate a single-token prose prefix such as Mother [[Alice]], but neither the canonical docs/NOTE-FORMAT.md relation reference nor the write_note tool description mentions #bm:links_to. Those user-facing surfaces still state that any single token before [[ becomes a relation type, so users and tool-calling models cannot discover the new escape hatch and will continue producing unintended typed relations.
Useful? React with 👍 / 👎.
04d6c9d to
f1fdcd0
Compare
Signed-off-by: Mike Mikemikike <mikemikimike@users.noreply.github.com> Signed-off-by: mikemikimike <13286568797@163.com> Signed-off-by: mikemikimike <13286568797@163.com>
Add regression coverage for preserving the directive in source and excluding it from observation semantics. Signed-off-by: Mike Mikemikike <mikemikimike@users.noreply.github.com> Signed-off-by: mikemikimike <13286568797@163.com> Signed-off-by: mikemikimike <13286568797@163.com>
Signed-off-by: phernandez <paul@basicmachines.co> Signed-off-by: mikemikimike <13286568797@163.com>
…icmachines-co#1309) Signed-off-by: phernandez <paul@basicmachines.co> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: mikemikimike <13286568797@163.com>
Signed-off-by: phernandez <paul@basicmachines.co> Signed-off-by: mikemikimike <13286568797@163.com>
Signed-off-by: mikemikimike <13286568797@163.com>
…cmachines-co#1310) Signed-off-by: phernandez <paul@basicmachines.co> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: mikemikimike <13286568797@163.com>
f1fdcd0 to
f57ea66
Compare
Summary
#bm:links_todirective for ambiguous relation-shaped bullets.Implementation
The markdown relation plugin strips only the exact terminal directive before inline wikilink parsing. Such lines emit
links_tofor every wikilink; explicit relation syntax and non-terminal lookalikes remain unchanged.Tests
python -m pytest -p no:cov -o addopts='' --confcutdir=tests/markdown -q tests/markdown/test_relation_edge_cases.py tests/markdown/test_markdown_plugins.py(24 passed)python -m ruff check src/basic_memory/markdown/plugins.py tests/markdown/test_relation_edge_cases.py(passed)The repository-wide test suite and full
just checkwere not run because the local dependency bootstrap was incomplete and the GitHub transport was unstable; the focused parser tests and Ruff check ran successfully.