Debug worklog-projio agent_instructions integration¶
Goal¶
Verify and debug the new worklog → projio agent_instructions() integration end-to-end.
Context¶
What was done (projio session, 2026-03-18)¶
New projio MCP tools added:
- biblio_merge, biblio_docling, biblio_grobid, biblio_grobid_check — post-ingestion pipeline (previously CLI-only)
- indexio_build — rebuild search index via MCP
- agent_instructions — returns tool routing table + workflow conventions for the project
projio add claude updated:
- .claude/settings.json now includes mcp__projio__* wildcard
- CLAUDE.md is generated dynamically from enabled packages with a three-column tool routing table (Intent / MCP tool / Do NOT)
Worklog code wired up:
- dispatch.py — _fetch_agent_instructions() calls projio before execution, passes result as --append-system-prompt
- plan.py — _fetch_tool_context() injects projio tool routing into the synthesis prompt so Claude generates tool-aware prompts
Worklog docs updated:
- workflow.md — added projio to MCP table, "Division of labor: what vs how" section, updated agent permissions
- mcp.md — added "Integration with projio MCP" section with handoff pattern
- specs/worklog.md — updated execution flow, marked projio integration done in roadmap
Key files to check¶
| Repo | File | What |
|---|---|---|
| projio | src/projio/mcp/context.py |
agent_instructions() implementation |
| projio | src/projio/init.py |
_generate_claude_md() — dynamic CLAUDE.md generation |
| projio | src/projio/mcp/biblio.py |
New tools: biblio_merge, biblio_docling, biblio_grobid, biblio_grobid_check |
| projio | src/projio/mcp/rag.py |
New tool: indexio_build |
| projio | src/projio/mcp/server.py |
All tools registered |
| worklog | src/worklog/execute/dispatch.py |
_fetch_agent_instructions() + wiring |
| worklog | src/worklog/execute/plan.py |
_fetch_tool_context() + synthesis prompt injection |
| worklog | docs/workflow.md |
Updated architecture docs |
| worklog | docs/mcp.md |
Projio integration section |
Architecture principle¶
- Worklog = cross-project orchestrator (what to do, where, when)
- Projio = project orchestrator (how to do it, with what tools)
- Handoff: worklog calls
agent_instructions(), projio returns tool routing, worklog injects into prompts
Prompt¶
Debug the worklog-projio integration end-to-end. Verify:
1. worklog plan <project> calls _fetch_tool_context() and the synthesis prompt includes projio tool routing
2. worklog execute <task> calls _fetch_agent_instructions() and passes it as --append-system-prompt
3. Test with a real project that has projio configured — the generated prompts should reference MCP tools by name
4. Check graceful fallback when projio is not configured for a project
Acceptance Criteria¶
- [ ]
worklog plangenerates prompts that name specific MCP tools - [ ]
worklog executepasses projio instructions as system prompt - [ ] Fallback works cleanly when projio is absent
- [ ] Docs in worklog match the implemented behavior
Result¶
(Filled in after execution)