Local source: coven-github/issues/08-add-marker-backed-comments-and-maintainer-command-protocol.md
Summary
Bot status comments should be marker-backed and edited in place, and maintainer commands should be parsed through an explicit command protocol. The current worker posts start/progress comments, and mention matching is simple substring detection.
Current Evidence
crates/worker/src/lib.rs posts a starting comment for issue tasks.
DESIGN.md cites ClawSweeper as the reference pattern for conservative GitHub automation, including durable state, marker-backed comments edited in place, maintainer steering commands, and deterministic gates before repair or merge work.
ROADMAP.md says to borrow ClawSweeper's edited status comments, maintainer steering commands, and live-state rechecks before mutation.
crates/webhook/src/routes.rs detects mentions by checking whether the comment body contains @{bot_username} after trimming [bot].
Problem
Repeated bot comments clutter issues and PRs. Simple mention matching is not enough to separate casual mentions from commands with consequences. A hosted coding agent needs a stable command grammar and a single mutable status surface per task or target.
Impact
- Issues and PRs can accumulate duplicate status comments.
- Bot behavior can be triggered by ambiguous or accidental mentions.
- Maintainers cannot reliably steer, pause, cancel, deepen, retry, or approve memory/write behavior.
- Cave and GitHub comments can diverge as status sources.
Proposed Design
Implement marker-backed comments:
- A hidden HTML marker identifies the task, target, and bot/familiar.
- The worker searches for an existing marker before creating a new comment.
- Status transitions edit the existing comment.
- Completed tasks summarize outcome and link to Check Run, PR, or Cave session.
Implement explicit commands:
@familiar review
@familiar fix
@familiar deepen
@familiar retry
@familiar cancel
@familiar remember
@familiar forget
@familiar status
Commands should be parsed into typed task intents. Unknown or ambiguous commands should receive a safe clarification response rather than launching work.
Acceptance Criteria
- Re-running the same task updates an existing marker-backed comment instead of creating duplicates.
- Mention parsing recognizes explicit commands and ignores plain text that is not a command.
- Self-comments continue to be ignored.
- Maintainer permission checks gate commands that mutate code, memory, or publication.
- Tests cover duplicate status updates, command parsing, unknown commands, and self-comment loops.
- Documentation lists supported commands and their effects.
Test Notes
Add parser tests independent of GitHub transport. Add mocked GitHub API tests for finding/updating marker comments. Add route tests for ambiguous mention text that should not create a task.
Local source:
coven-github/issues/08-add-marker-backed-comments-and-maintainer-command-protocol.mdSummary
Bot status comments should be marker-backed and edited in place, and maintainer commands should be parsed through an explicit command protocol. The current worker posts start/progress comments, and mention matching is simple substring detection.
Current Evidence
crates/worker/src/lib.rsposts a starting comment for issue tasks.DESIGN.mdcites ClawSweeper as the reference pattern for conservative GitHub automation, including durable state, marker-backed comments edited in place, maintainer steering commands, and deterministic gates before repair or merge work.ROADMAP.mdsays to borrow ClawSweeper's edited status comments, maintainer steering commands, and live-state rechecks before mutation.crates/webhook/src/routes.rsdetects mentions by checking whether the comment body contains@{bot_username}after trimming[bot].Problem
Repeated bot comments clutter issues and PRs. Simple mention matching is not enough to separate casual mentions from commands with consequences. A hosted coding agent needs a stable command grammar and a single mutable status surface per task or target.
Impact
Proposed Design
Implement marker-backed comments:
Implement explicit commands:
@familiar review@familiar fix@familiar deepen@familiar retry@familiar cancel@familiar remember@familiar forget@familiar statusCommands should be parsed into typed task intents. Unknown or ambiguous commands should receive a safe clarification response rather than launching work.
Acceptance Criteria
Test Notes
Add parser tests independent of GitHub transport. Add mocked GitHub API tests for finding/updating marker comments. Add route tests for ambiguous mention text that should not create a task.