Multi-line block comments don't fire markers #1
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
[claude 2026-04-29] v1 limitation surfaced during manual smoke and discussion.
What's broken
Markers in multi-line block comments are silently ignored. Examples:
The scanner only matches single-line comments and single-line block comments (open and close on the same line). See `internal/scanner/scanner.go`: the loop checks each line independently. Multi-line block-comment spans never get a chance to be evaluated as marker text.
Why it bites users
A user trying a multi-line ask sees no response and has no diagnostic — looks identical to "the watcher didn't notice my save."
Two ways to fix
A. State machine (recommended for v1.1)
Track `/* ... */` and `` open/close across lines per-language. When a span closes, evaluate its accumulated body for an `@claude` marker. Stamping inserts the UUID after the first `@claude` token within the span (single-line or multi-line).
B. Tree-sitter (defer)
Per-language grammar gives proper "is this a comment?" AST nodes including multi-line spans.
Recommendation
Ship A as v1.1. Revisit B in a v2 that does something genuinely AST-aware.
Files involved
Migrated from git-collab issue
e65f975003a5cc8bad8c80651df46f7dd8875362.Original author: a73x dev@a73x.sh.