feat(#60): integrate OpenDeepWiki code context layer into Research Supervisor#68
feat(#60): integrate OpenDeepWiki code context layer into Research Supervisor#68Benmuiruri wants to merge 4 commits intomainfrom
Conversation
…pervisor Add CodeContextAgent that queries OpenDeepWiki MCP endpoints for code architecture insights, module relationships, and diagrams. Wire it into the Research Supervisor's LangGraph pipeline between doc search and context analysis. Save combined research output to outputs/context-results/. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@Hareet two comments related to this work.
Previously, when a node failed (e.g., doc search), it set I made the change to have error cases consistently set
|
|
@Benmuiruri Thanks for the PR!! Just wanted to drop a note that I saw this, and I'll begin my review during my tomorrow and should be ready for you early next week. |
|
Sorry for the delay! Did a preliminary review run through of this PR, and have finished deploying opendeepwiki I'll edit my notes and finish the review early next week |
| const allDiagrams: string[] = []; | ||
| const warnings: string[] = []; | ||
|
|
||
| for (const repo of repos) { |
There was a problem hiding this comment.
Should we change this to Promise.allSettled to parallelize during real MCP calls?
Hareet
left a comment
There was a problem hiding this comment.
Awesome @Benmuiruri !! Thanks for adding all this in, and keeping things consistent with the DocumentationSearchAgent. A pleasure to navigate.
Agree on the error propagation change and your flagging of the duplicated display logic in research.ts and the example. Do you want to open a new issue to extract that into a shared display utility?
I'm going to approve this PR, and wasn't sure if you wanted to add the following parts in this particular branch or open a new one after merging this work. Some things have changed since our self-hosted OpenDeepWiki has been deployed, but I didn't want to request changes on things that were not present during time of this work.
Our main changes we want to immediately implement:
- This PR mocks 3 different tools (
get_wiki_structure, search_code, get_architecture)- We now know the tools exposed: (
get_document_catalog, search_documents, read_document, list_repositories) - the real integration will need to call search_documents/read_document and then parse the wiki content into ArchitectureInsight/ModuleRelationship structures. That parsing step and the
OpenDeepWikiMCPToolCallandOpenDeepWikiMCPResponsetypes will need to be redesigned around the actual API.
- We now know the tools exposed: (
- Unrelated to PR, but all this work is impacted by research-supervisor.ts:
- buildPhases returns 4 hardcoded phases regardless of research findings
- How do we want to refactor that?
- OpenDeepWiki is configured to return 200 words per page. That will be increased immediately.
- buildPhases returns 4 hardcoded phases regardless of research findings
Next priority fixes after above:
- Should we extract this mock data and move it to fixtures in tests? (
/tests/fixtures/) - Extract shared display utility
- ZOD validation for MCP responses
|
Hi @Hareet Thanks for the review! Although you approved the PR, my suggestion on how to complete this PR: We open separate issues for:
For this PR I would like to:
That seems a better approach than merge this PR to main then have another one do the clean up of the mocked data. Do you agree with my plan ? |
Sounds good! Sorry I missed the question at the end. |
|
@Hareet rebased and ready to merge with the outstanding work to be created as separate issues. Apologies for the delay with this. |
|
Do you want me to get this passing the new CI before we merge or just admin-merge this? |
|
Hey @Hareet, the lint failure here is the Node 20 EOL |
Description
CodeContextAgentthat queries OpenDeepWiki MCP endpoints for code architecture insights, module relationships, and Mermaid diagrams across CHT repos (cht-core,cht-conf,cht-watchdog)research-resultsutility to save combined research output tooutputs/context-results/Closes #60
Code review checklist
License
The software is provided under AGPL-3.0. Contributions to this project are accepted under the same license.