Back to blog

Dev Diary #7

Standardized modules to orchestrator-driven generation, renamed agent components, hardened API integrations.

April 15, 2026

Dev Diary #7

I'm seventeen commits deep into refactoring the recipe and gym modules to stop polling and start generating on demand. The orchestrator now owns the scheduling, which means I can tear out all the onTick noise that was sitting in recipe/src/main and gym/src/main. Cleaner, but it also means I had to thread the OV context through the request path instead of having it baked into a persistent worker. That's a trade I'm willing to make.

The real friction started when I renamed gym to agent-gym, git-agent to agent-git, and activity to agent-activity. Forty-five files touched across package.json, Dockerfiles, and tsconfig. I missed updating package-lock.json on the first pass, which broke the Docker builds until I caught it. The @octokit/rest dependency wasn't declared anywhere, just assumed to exist in node_modules. That one burned time.

Then the notion-sync started rotating refresh tokens but never persisting them to the database. Tokens would disappear after they refreshed, and the next sync would fail. Added persistence to the token store in notion-sync/src/notion-mcp, but I'm still not confident about the rotation timing. The Notion API MCP had the wrong update-page call signature, which I fixed, but the directory sync has debug logs scattered everywhere now because page read/write failures weren't giving me anything to work with.

The JSON parser for AI responses kept exploding on trailing commentary—Claude would finish the JSON object fine but then add a line like "Hope this helps!" The fix was brutal: I tightened the classify-meeting prompt and wrapped the parser to strip anything after the closing brace. Works, but it's fragile. If the model changes its behavior, I'm back to firefighting.

I added force triggers for meeting prep and dev blog generation so I can test the full pipeline without waiting for schedules. The meeting prep pipeline now chains git-agent, research, and calendar in sequence. Still uncertain about error boundaries—if one component fails, the whole thing stalls. No retry logic yet, no partial recovery. I need to think about whether to fail hard or gracefully degrade.

Home
About
Resume
Projects
Blog
Press
Search