github OthmanAdi/planning-with-files v2.18.2
v2.18.2 - Mastra Code Hooks Fix

latest releases: v3.1.3, v3.1.2, v3.1.1...
3 months ago

Fixed

Mastra Code hooks were silently doing nothing

Mastra Code reads lifecycle hooks from .mastracode/hooks.json, not from SKILL.md frontmatter (which is Claude Code's format). The existing Mastra integration had hooks defined only in SKILL.md, meaning all three hooks (PreToolUse, PostToolUse, Stop) were completely non-functional in Mastra Code. Plan enforcement, context injection, and completion checking were all silently skipped.

What changed

  • Added .mastracode/hooks.json with proper Mastra Code format (matcher objects, timeouts, descriptions)
  • Fixed MASTRACODE_SKILL_ROOT env var in SKILL.md Stop hook (variable does not exist in Mastra Code, replaced with $HOME fallback to local path)
  • Corrected docs/mastra.md to accurately describe the hooks.json system (removed false claim about "same hook system as Claude Code")
  • Fixed personal installation instructions to include the hooks.json copy step
  • Bumped Mastra SKILL.md metadata version to 2.18.1

Files changed

  • .mastracode/hooks.json (new)
  • .mastracode/skills/planning-with-files/SKILL.md
  • docs/mastra.md
  • CHANGELOG.md
  • README.md

Contributors

Self-caught during integration audit. Shoutout to the Mastra team for building Claude Code compatibility into their skill discovery while keeping hooks in their own format.

Don't miss a new planning-with-files release

NewReleases is sending notifications on new releases.