Back to DevLog

Building a Multi-Agent Development System: Hooks, Nudges, and Session Handoffs

3 min read

Had an interesting development session today working on memstack-pro with a multi-agent setup. I was playing the Manager role, delegating tasks to a Builder agent - and honestly, it felt pretty smooth.

The main goal was fixing some hooks and creating what I'm calling "nudges" - basically smart prompts that guide users toward better workflows.

What Got Done

First up was a simple but important fix - converting all the python3 references to just python in our pre-tool-notify hook. Nothing fancy, but consistency matters when you're building tooling that others will use.

The more interesting work was around nudges. I created a new rules file that handles two scenarios:

  1. When someone asks vague research questions, it redirects them to research-mode
  2. When the Pro license key is missing, it nudges toward installation

But here's where it got tricky - I initially set up the install nudge as a passive rule, thinking Claude would just pick it up when needed. Turns out passive rules are unreliable at session start. They depend on the AI choosing to act, which isn't guaranteed.

So I pivoted and converted the install nudge into a proper SessionStart hook. Now it fires reliably every time, checking for the license key and prompting if it's missing.

The Multi-Agent Flow

What I found interesting was how the Manager/Builder delegation worked. As the Manager, I'd identify what needed doing and hand it off. The Builder would execute, commit, and report back. Three clean commits got pushed to master with no uncommitted changes left hanging.

It's not just about the code - it's about building systems that can hand off cleanly between different agents or developers.

Design Decisions

I made a conscious choice to keep the research-mode nudge as a passive rule. Unlike the install check, this one should trigger mid-conversation when someone asks something vague. That's exactly when passive rules shine.

There's still some cleanup to do - the nudges.md file has both the rule version and documents the hook version of the install nudge. The hook is now canonical, so I could trim the duplicate.

What's Next

I want to test the SessionStart nudge behavior when no key is set, and verify the research redirect actually fires on vague prompts. The infrastructure is there, now it's about making sure the user experience is smooth.

Building developer tooling is weird - you're constantly switching between being the implementer and the user, trying to anticipate what will actually be helpful versus what just adds noise.

Share this post