handoff: write to Argus KB by default, fall back to clipboard#285
Merged
handoff: write to Argus KB by default, fall back to clipboard#285
Conversation
Save handoffs as markdown files under memory/handoff/ in the Argus KB so the receiving agent can pull them with kb_read or kb_search across thread boundaries. Only fall back to pbcopy when the KB tool is unavailable.
- Require YAML frontmatter (title, tags) — Argus KB schema mandates it.
- Sanitize the slug to lowercase kebab-case so a hostile title can't
traverse out of memory/handoff/.
- Switch to seconds in the timestamp so two same-minute invocations
don't collide on the same path.
- Use a timestamped temp file (/tmp/handoff-<ts>.md) instead of a
fixed name so concurrent invocations don't overwrite each other.
- Specify a primary tool name (mcp__argus__kb_ingest) and document
the alternate (mcp__argus-kb__kb_ingest) instead of asking Claude
to introspect which is registered — it can't.
- Replace the escaped-backtick confirmation template with prose so
it survives layered markdown quoting.
- Add a date-failure fallback (random hex suffix).
- Document the receiving-agent UX: kb_list("memory/handoff/") sorts
by timestamp prefix so the latest is highest-sorted.
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.
Handoff prompts now save as YAML-frontmatter markdown to memory/handoff/-.md in the Argus knowledge base so the receiving agent can fetch them with kb_read or kb_list across thread boundaries. The clipboard path remains as the fallback when the Argus KB MCP server isn't running.
The skill sanitizes slugs to prevent path traversal, uses second-level timestamps + per-invocation temp files to avoid collisions, and specifies a primary tool name (mcp__argus__kb_ingest) with a documented alternate (mcp__argus-kb__kb_ingest) for harnesses that register the server under either name.
Co-Authored-By: Claude noreply@anthropic.com