feat(kb): Comment for Scout — marker vocabulary, parser chip, block affordance (KB phase) - #77
Open
jordanrburger wants to merge 3 commits into
Open
feat(kb): Comment for Scout — marker vocabulary, parser chip, block affordance (KB phase)#77jordanrburger wants to merge 3 commits into
jordanrburger wants to merge 3 commits into
Conversation
…ract) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…, immediate save Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the approved "Comment for Scout" (KB phase) design + plan from #72 (
docs/superpowers/specs/2026-07-06-kb-comment-for-scout-design.md,docs/superpowers/plans/2026-07-06-kb-comment-for-scout.md), following the plan's 3-task TDD sequence.What
Select (hover) a block in a Knowledge Base note in Read mode and leave a comment for Scout to act on during its next dreaming session. The comment is persisted as an inline
//==<< … >>==//marker line beneath the block via the existing guarded + git-committedKnowledgeBaseFileWriter.savepath. Dreaming already consumes and strips these markers — no plugin-side changes.Tasks (as planned)
ScoutMarkervocabulary (Scout/KnowledgeBase/Models/ScoutMarker.swift) — single source of truth for the marker syntax:format(trims, collapses newlines, rejects empty),isMarkerLine,body(of:). 6 unit tests.KBDocSegment) — new.scoutCommentkind; a standalone marker line parses as its own segment (never absorbed into an adjacent paragraph or table row; a marker inside a code fence stays code). New whole-line splicersinsertLine(in:afterLineEnd:line:)/removeLines(in:start:end:)— only ever add/remove whole lines, so every other byte (incl. plugin structured tokens) stays untouched. 9 unit tests.KBEditableView/KBEditorView) — hover a block → "💬 Comment for Scout" → inline composer (Cancel / Send to Scout, ⌘↵, empty-input disabled). Send splices the marker after the block and persists immediately throughKBEditorView.save()(baseline conflict guard + scoped git commit +.commitFailedhandling all reused as-is). Marker segments render as a "for Scout · pending" chip with a × to retract (whole-line delete + save). When dreaming strips the marker, the FSEvent reparse makes the chip disappear.Scope guards (per spec)
scoutctlmarker command).Verification
ScoutTeststarget: 438 tests in 79 suites, 0 failures (platform=macOS).rg -F '//==<<'shows the marker on its own line → scoped commit diff adds exactly one line → × retract removes it. This needs a human driving the app; @jordanrburger please run this before merging.🤖 Generated with Claude Code