Skip to content

feat(agents): ship memd skills + a self-healing SessionStart hook - #6

Merged
qdequele merged 1 commit into
mainfrom
qdequele/mystifying-allen-c30716
Jun 17, 2026
Merged

feat(agents): ship memd skills + a self-healing SessionStart hook#6
qdequele merged 1 commit into
mainfrom
qdequele/mystifying-allen-c30716

Conversation

@qdequele

Copy link
Copy Markdown
Owner

What

Operational tooling so memd is easier to run and use on a machine — all installed automatically by memd setup.

Skills (bundled in the binary, written to ~/.claude/skills/)

  • /memd-doctor — ordered diagnose-and-repair playbook wrapping memd doctor / status / logs (daemon down → memd up, db mismatch → memd doctor --fix, agent unwired → memd setup).
  • /memd-memory — recall-and-save usage playbook mapping each action to its MCP tool and CLI equivalent (recall before acting, search-before-save to dedupe, scope/type correctly).

Self-healing SessionStart hook

  • New fast, silent memd ensure command — no-ops if healthy, otherwise kicks launchd / spawns the daemon and waits briefly. Never writes to stdout or errors the caller.
  • SessionStart hook now runs memd ensure; memd context …, so recall keeps working even if the daemon crashed or was never started. Existing installs upgrade cleanly on the next memd setup.

Plumbing

  • skills: bool field on the agent registry; memd setup installs skills for Claude Code (regardless of --no-hooks, since skills are inert until invoked).
  • New memd skills install/uninstall commands for manual control.
  • Skills embedded via include_str! so the prebuilt binary needs no extra files.
  • README + docs/cli.mdx updated.

Testing

  • cargo fmt --check, cargo clippy (clean), cargo build — all pass.
  • cargo test56 passing (2 new skill tests: install/remove roundtrip + idempotency, frontmatter validity).
  • End-to-end memd skills install verified: files land in ~/.claude/skills/, re-run is idempotent.

Add two Claude Code skills, bundled in the binary and installed into
~/.claude/skills/ by `memd setup`:

- /memd-doctor: ordered diagnose-and-repair playbook wrapping
  `memd doctor`/`status`/`logs`.
- /memd-memory: recall-and-save usage playbook mapping each action to
  its MCP tool and CLI equivalent.

Add a fast, silent `memd ensure` command and run it before `memd context`
in the SessionStart hook, so recall self-heals if the daemon crashed or
was never started.

Also add `memd skills install/uninstall` for manual control, a `skills`
flag on the agent registry, and matching README/docs updates.
@qdequele
qdequele merged commit c7aefb3 into main Jun 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant