feat: research agent for onboarding existing codebases #175
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this does
Adds a complete workflow for bringing existing projects into AutoForge. Instead of starting from scratch with a spec, the research agent first analyzes the codebase and generates documentation, which then gets converted into an app spec.
This is useful when you have an existing project and want AutoForge to continue development on it — the agent needs to understand what's already there before it can add features.
Workflow
.planning/codebase/:STACK.md— frameworks, languages, dependenciesARCHITECTURE.md— design patterns, data flowSTRUCTURE.md— directory layout, key filesCONVENTIONS.md— naming, imports, code styleINTEGRATIONS.md— external APIs, servicesThere's also a Re-analyze button (microscope icon) on existing projects for when the codebase has changed outside of AutoForge.
What's included
Backend
mcp_server/research_mcp.py) with 6 tools: scan files, detect stack, add findings, get context, finalize, get statsserver/routers/git.py) — list, create, checkout branches with protected branch detectionserver/routers/agent.py— start/stop/status for research agentsserver/routers/projects.py— serve generated markdownFrontend
AnalyzeCodebaseModal— folder browser + project name inputResearchProgressView— real-time progress with phase tracking and activity logResearchResultsView— tabbed markdown viewer for the 5 doc typesMarkdownViewer— syntax-highlighted markdown rendererBranchSelectionModal— git branch picker with protected branch warningsReanalyzeCodebaseModal— confirmation dialog for re-analysisReinitializeFeaturesModal— clear old features when converting research to spec/research/:projectNameroutesBug fixes bundled in
force=Trueso newer specs overwrite old onesChanges
Test plan
.planning/codebase/