Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Jul 24, 2025

This PR implements a new custom mode called Codebase Documentation Generator as requested in #6169.

What it does

The codebase-doc mode helps users generate comprehensive project documentation by:

  • Analyzing project structure using existing tools (list_files, read_file, etc.)
  • Detecting project type, languages, and frameworks
  • Identifying dependencies and build tools
  • Creating a structured PROJECT_DOC.md file

Implementation Details

  • Added new mode configuration in src/shared/modes.ts
  • The mode uses existing tools rather than implementing custom analysis logic
  • Provides detailed instructions for the AI to follow when generating documentation
  • Includes a comprehensive template for the PROJECT_DOC.md output

Testing

  • Added comprehensive tests in src/shared/tests/modes.spec.ts
  • All tests pass ✅
  • Linting checks pass ✅
  • Type checks pass ✅

Example Usage

When in codebase-doc mode, users can simply ask:

  • "Generate project documentation"
  • "Create a PROJECT_DOC.md file"
  • "Analyze this codebase and document it"

The mode will then use the available tools to analyze the project and generate comprehensive documentation.

Closes #6169


Important

Introduces codebase-doc mode for generating project documentation using existing tools, with configuration and tests added to ensure functionality.

  • Behavior:
    • Adds codebase-doc mode in modes.ts for generating PROJECT_DOC.md by analyzing project structure, environment, and dependencies.
    • Uses existing tools like list_files, read_file, and write_to_file for analysis and documentation.
  • Configuration:
    • Adds codebase-doc mode configuration in modes.ts with specific instructions and workflow.
  • Testing:
    • Adds tests for codebase-doc mode in modes.spec.ts to verify tool permissions and mode configuration.
    • Ensures codebase-doc mode allows read, edit, and browser tools but not command or mcp tools.

This description was created by Ellipsis for 8fc5f80. You can customize this summary. It will automatically update as commits are pushed.

- Add new mode configuration for generating PROJECT_DOC.md files
- Mode analyzes project structure using existing tools (list_files, read_file, etc.)
- Generates comprehensive documentation including:
  - Project overview and type detection
  - Environment setup instructions
  - Project structure visualization
  - Dependencies and build tools
  - Common commands and workflows
- Add comprehensive tests for the new mode
- Closes #6169
@roomote roomote bot requested review from cte, jr and mrubens as code owners July 24, 2025 14:31
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. documentation Improvements or additions to documentation enhancement New feature or request labels Jul 24, 2025
@roomote roomote bot mentioned this pull request Jul 24, 2025
1 task
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jul 24, 2025
@daniel-lxs
Copy link
Member

The instructions are too specific and only cover a few type of projects and languages

@daniel-lxs daniel-lxs closed this Jul 25, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jul 25, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Jul 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

codebase-doc

4 participants