Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.

Commit f1d69f0

Browse files
committed
feat: migrate Roo-Code-Docs into monorepo as apps/docs
- Move all documentation files from standalone repo to apps/docs - Create @roo-code/docs package with workspace dependencies - Update docusaurus.config.ts editUrl to point to apps/docs path - Fix @roo-code/types package.json to export built files instead of source - Add missing dependencies (@docusaurus/plugin-content-docs, @docusaurus/theme-common, @easyops-cn/autocomplete.js) - Update turbo.json to include docs build outputs - Add comprehensive README with setup instructions - Add .gitignore to exclude build artifacts - Fix TypeScript error with inert attribute This migration consolidates the docs into the main repository for better integration and streamlined deployment via Vercel. Note: GitHub Actions workflows for deployment will be added manually due to repository permissions.
1 parent c7910a9 commit f1d69f0

965 files changed

Lines changed: 57911 additions & 7741 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/docs/.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Dependencies
2+
node_modules/
3+
4+
# Production
5+
build/
6+
.docusaurus/
7+
8+
# Generated files
9+
.cache/
10+
.DS_Store
11+
12+
# Misc
13+
.env.local
14+
.env

apps/docs/.roomodes

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
customModes:
2+
- slug: release-notes-writer
3+
name: 📝 Release Notes Writer
4+
roleDefinition: "You are a technical writer for Roo Code release notes. Your job is to: - Automate release note creation. - Fetch and analyze GitHub pull requests. - Convert technical changes into user benefits. - Ensure updates align with documentation standards. - Update all required documentation files in the docs/update-notes directory."
5+
whenToUse: |-
6+
Use this mode to create or update release notes from GitHub PRs and existing docs.
7+
Triggers: "Create release notes for X.Y.Z", "vX.Y.Z", bare version (e.g., "3.25.1"), "latest",
8+
"Discord release notes for X.Y.Z", "Combined Discord announcement for X.Y.Z, X.Y.Z".
9+
It automates PR fetching/analysis, changelog alignment, file generation (vX.Y or vX.Y.Z),
10+
index/sidebar updates, and Discord formatting with approval gates.
11+
description: Release notes files and sidebar configuration
12+
groups:
13+
- read
14+
- command
15+
- - edit
16+
- fileRegex: (docs/update-notes/.*\.(md|mdx)$|sidebars\.ts$|\.roo/tmp/release-notes/.*\.(md|json)$)
17+
source: project
18+
- slug: documentation-writer
19+
name: 📖 Documentation Writer
20+
roleDefinition: |-
21+
You are Roo Code, a documentation specialist who writes only what matters.
22+
Core behaviors:
23+
- Explanatory first: tell users why, why not, and how to recover (troubleshooting).
24+
- Minimal ToC noise: H2 for primary sections; H3 only for jump-worthy anchors (max 4 per page, typically <= 2); prefer H4 for in-body sub-chunking; disallow H5/H6.
25+
- Merge thin subsections and convert step chains into numbered lists under their H2.
26+
- Bold, honest, human voice with contractions; informal and clear, not professoral.
27+
- Selective screenshots: only for complex states/decisions; require outcome-focused alt text and a one-line "why this matters" caption.
28+
- Prefer consolidation over duplication; link to the single source of truth.
29+
- Enforce .roo/rules-documentation-writer/ policies (writing style, headings/structure, Docusaurus conventions, validation gates).
30+
whenToUse: |-
31+
Use this mode to create or refine technical docs (.md/.mdx) with an explanatory, value-first approach and a clean, minimal ToC.
32+
Triggers:
33+
- Pages with noisy right-sidebar ToCs or overuse of H3s
34+
- Requests to restructure into H2 sections with H4 sub-chunks and numbered lists
35+
- Need to add "Why it matters / What you can't do (and why) / Troubleshooting"
36+
- Requests to add or prune screenshots for complex states/decisions
37+
description: Creates and maintains Roo technical docs.
38+
groups:
39+
- read
40+
- command
41+
- - edit
42+
- fileRegex: (\.(md|mdx)$|sidebars\.ts$|docusaurus\.config\.ts$)
43+
description: Documentation files and sidebar configuration
44+
- mcp
45+
source: project

apps/docs/.roorules

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Roo Code Documentation Rules
2+
3+
## Documentation Links
4+
- Do not include .md extensions in documentation links
5+
- Use absolute paths starting from the `/docs/` root for internal documentation links
6+
- Example: [link text](/basic-usage/how-tools-work) NOT [link text](basic-usage/how-tools-work.md) or [link text](../../basic-usage/how-tools-work)
7+
8+
This ensures links work correctly in the built documentation while maintaining clean URLs.
9+
10+
## Context7 MCP
11+
When making structural or formatting changes beyond simple .md or .mdx files, always check the Context7 MCP, the `context7CompatibleLibraryID` will be `/facebook/docusaurus`
12+
13+
## Release Notes "thank you" exclusions
14+
Do not thank daniel-lxs, cte, hannesrudolph, jr, roomote, app/roomote, dleffel, brunobergher or mrubens in release notes
15+
16+
17+
## Misc
18+
When moving a section, make sure to add the forwarding link in docusaurus.config.ts
19+
20+
## Image Tag Format
21+
example: `<img src="<PATH>" alt="<ALT>" width="<WIDTH>" />`

apps/docs/AGENTS.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# AGENTS.md
2+
3+
This file provides guidance to agents when working with code in this repository.
4+
5+
Non-obvious, project-specific rules:
6+
7+
- Start/build preload dotenv; analytics plugin is enabled only when POSTHOG_API_KEY is set. Use .env based on [.env.example](.env.example). CI injects it in [.github/workflows/docusaurus-build.yml](.github/workflows/docusaurus-build.yml). See [package.json](package.json) and [docusaurus.config.ts](docusaurus.config.ts).
8+
- Use Node 20 locally to match CI; engines allow >=18 but CI runs 20.
9+
- Linting targets only /src; docs content is not linted. Use "pnpm run lint:unused" to enforce unused import removal. Type checking uses "tsc" only (no emit); [tsconfig.json](tsconfig.json) is editor-focused.
10+
- When moving/renaming docs, you must add an explicit redirect in [docusaurus.config.ts](docusaurus.config.ts) under plugin-client-redirects. This is required by [.roorules](.roorules).
11+
- Internal doc links must be absolute and extensionless per [.roorules](.roorules) (example: /basic-usage/how-tools-work). Do not include ".md".
12+
- Images in docs must use HTML tags per [.roorules](.roorules): <img src="/img/...png" alt="..." width="600" />.
13+
- Sitemap: preset sitemap is disabled; a custom plugin is configured in [docusaurus.config.ts](docusaurus.config.ts) to filter URLs containing "/page/". Do not re-enable the preset sitemap.
14+
- Local search plugin is configured with docsRouteBasePath "/". Keep routeBasePath "/" consistent when adding content or links.
15+
- "Tutorial Videos" sidebar is generated from [docs/tutorial-videos.json](docs/tutorial-videos.json); titles are truncated to 40 chars in [sidebars.ts](sidebars.ts). Modify the JSON to add/remove videos.
16+
- Navigation/footer links are centralized in [src/constants.ts](src/constants.ts) and consumed by [docusaurus.config.ts](docusaurus.config.ts). Update constants rather than hardcoding URLs.
17+
- Legacy [Rakefile](Rakefile) is unrelated (Jekyll). Do not use it; all builds run through Docusaurus scripts.
18+
- For structural/formatting research, use Context7 MCP (ID "/facebook/docusaurus") via [.roo/mcp.json](.roo/mcp.json); see [.roorules](.roorules).
19+
- CI runs build and check-types (no lint). Run lint locally to catch issues CI won't.

apps/docs/README.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Roo Code Documentation
2+
3+
This directory contains the official documentation site for Roo Code, built with [Docusaurus](https://docusaurus.io/).
4+
5+
## Development
6+
7+
```bash
8+
# From the monorepo root
9+
pnpm install
10+
11+
# Start the development server
12+
pnpm --filter @roo-code/docs start
13+
14+
# Build the site
15+
pnpm --filter @roo-code/docs build
16+
17+
# Serve the built site locally
18+
pnpm --filter @roo-code/docs serve
19+
```
20+
21+
## Environment Variables
22+
23+
Create a `.env` file based on `.env.example`:
24+
25+
- `POSTHOG_API_KEY`: Analytics key for PostHog (optional)
26+
- `INTERCOM_APP_ID`: Intercom widget ID (optional)
27+
28+
## Vercel Deployment Setup
29+
30+
The docs are deployed to Vercel automatically on push to `main`. To set up:
31+
32+
### Required Secrets
33+
34+
Add these secrets to the GitHub repository settings:
35+
36+
1. **VERCEL_TOKEN**: Personal Access Token from Vercel
37+
38+
- Go to Vercel → Settings → Tokens
39+
- Create a new token with appropriate permissions
40+
41+
2. **VERCEL_ORG_ID**: Organization ID from Vercel
42+
43+
- Run `vercel link` in the docs directory
44+
- Find the ID in `.vercel/project.json`
45+
46+
3. **VERCEL_DOCS_PROJECT_ID**: Project ID for the docs
47+
48+
- Same as above, from `.vercel/project.json`
49+
50+
4. **POSTHOG_API_KEY**: PostHog analytics key (optional)
51+
52+
5. **INTERCOM_APP_ID**: Intercom widget ID (optional)
53+
54+
### Vercel Project Configuration
55+
56+
In the Vercel project settings:
57+
58+
- **Root Directory**: `apps/docs`
59+
- **Build Command**: `pnpm build`
60+
- **Output Directory**: `build`
61+
- **Install Command**: `pnpm install --frozen-lockfile`
62+
- **Framework Preset**: Other
63+
- **Node Version**: 20.x
64+
65+
### Custom Domain
66+
67+
Configure the custom domain `docs.roocode.com` in Vercel project settings.
68+
69+
## Structure
70+
71+
- `docs/`: Markdown documentation files
72+
- `src/`: Custom React components and theme overrides
73+
- `static/`: Static assets (images, etc.)
74+
- `docusaurus.config.ts`: Main configuration file
75+
- `sidebars.ts`: Sidebar navigation structure
76+
77+
## Writing Documentation
78+
79+
- Use absolute, extensionless paths for internal links: `/basic-usage/how-tools-work`
80+
- Use HTML `<img>` tags for images: `<img src="/img/example.png" alt="Description" width="600" />`
81+
- Add redirects in `docusaurus.config.ts` when moving/renaming pages
82+
83+
## Migration Notes
84+
85+
This documentation was migrated from the standalone `Roo-Code-Docs` repository into the monorepo as `apps/docs`.
86+
87+
Key changes:
88+
89+
- Package name changed to `@roo-code/docs`
90+
- `@roo-code/types` dependency uses `workspace:^` protocol
91+
- Edit URLs now point to `apps/docs/` path in the Roo-Code repository
92+
- Deployment moved from standalone repo to monorepo workflows
Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
---
2+
description: Learn how the access_mcp_resource tool retrieves data from Model Context Protocol servers for additional context in Roo Code tasks.
3+
keywords:
4+
- access_mcp_resource
5+
- MCP
6+
- Model Context Protocol
7+
- MCP resources
8+
- Roo Code tools
9+
- context retrieval
10+
- API integration
11+
---
12+
13+
# access_mcp_resource
14+
15+
The `access_mcp_resource` tool retrieves data from resources exposed by connected Model Context Protocol (MCP) servers. It allows Roo to access files, API responses, documentation, or system information that provides additional context for tasks.
16+
17+
---
18+
19+
## Parameters
20+
21+
The tool accepts these parameters:
22+
23+
- `server_name` (required): The name of the MCP server providing the resource
24+
- `uri` (required): The URI identifying the specific resource to access
25+
26+
---
27+
28+
## What It Does
29+
30+
This tool connects to MCP servers and fetches data from their exposed resources. Unlike `use_mcp_tool` which executes actions, this tool specifically retrieves information that serves as context for tasks.
31+
32+
---
33+
34+
## When is it used?
35+
36+
- When Roo needs additional context from external systems
37+
- When Roo needs to access domain-specific data from specialized MCP servers
38+
- When Roo needs to retrieve reference documentation hosted by MCP servers
39+
- When Roo needs to integrate real-time data from external APIs via MCP
40+
41+
---
42+
43+
## Key Features
44+
45+
- Retrieves both text and image data from MCP resources
46+
- Requires user approval before executing resource access
47+
- Uses URI-based addressing to precisely identify resources
48+
- Integrates with the Model Context Protocol SDK
49+
- Displays resource content appropriately based on content type
50+
- Supports timeouts for reliable network operations
51+
- Handles server connection states (connected, connecting, disconnected)
52+
- Discovers available resources from connected servers
53+
- Processes structured response data with metadata
54+
- Handles image content special rendering
55+
56+
---
57+
58+
## Limitations
59+
60+
- Depends on external MCP servers being available and connected
61+
- Limited to the resources provided by connected servers
62+
- Cannot access resources from disabled servers
63+
- Network issues can affect reliability and performance
64+
- Resource access subject to configured timeouts
65+
- URI formats are determined by the specific MCP server implementation
66+
- No offline or cached resource access capabilities
67+
68+
---
69+
70+
## How It Works
71+
72+
When the `access_mcp_resource` tool is invoked, it follows this process:
73+
74+
1. **Connection Validation**:
75+
76+
- Verifies that an MCP hub is available and initialized
77+
- Confirms the specified server exists in the connection list
78+
- Checks if the server is disabled (returns an error if it is)
79+
80+
2. **User Approval**:
81+
82+
- Presents the resource access request to the user for approval
83+
- Provides server name and resource URI for user verification
84+
- Proceeds only if the user approves the resource access
85+
86+
3. **Resource Request**:
87+
88+
- Uses the Model Context Protocol SDK to communicate with servers
89+
- Makes a `resources/read` request to the server through the MCP hub
90+
- Applies configured timeouts to prevent hanging on unresponsive servers
91+
92+
4. **Response Processing**:
93+
- Receives a structured response with metadata and content arrays
94+
- Processes text content for display to the user
95+
- Handles image data specially for appropriate display
96+
- Returns the processed resource data to Roo for use in the current task
97+
98+
---
99+
100+
## Resource Types
101+
102+
MCP servers can provide two main types of resources:
103+
104+
1. **Standard Resources**:
105+
106+
- Fixed resources with specific URIs
107+
- Defined name, description, and MIME type
108+
- Direct access without parameters
109+
- Typically represent static data or real-time information
110+
111+
2. **Resource Templates**:
112+
- Parameterized resources with placeholder values in URIs
113+
- Allow dynamic resource generation based on provided parameters
114+
- Can represent queries or filtered views of data
115+
- More flexible but require additional URI formatting
116+
117+
---
118+
119+
## Examples When Used
120+
121+
- When helping with API development, Roo retrieves endpoint specifications from MCP resources to ensure correct implementation.
122+
- When assisting with data visualization, Roo accesses current data samples from connected MCP servers.
123+
- When working in specialized domains, Roo retrieves technical documentation to provide accurate guidance.
124+
- When generating industry-specific code, Roo references compliance requirements from documentation resources.
125+
126+
---
127+
128+
## Usage Examples
129+
130+
Accessing current weather data:
131+
132+
```
133+
<access_mcp_resource>
134+
<server_name>weather-server</server_name>
135+
<uri>weather://san-francisco/current</uri>
136+
</access_mcp_resource>
137+
```
138+
139+
Retrieving API documentation:
140+
141+
```
142+
<access_mcp_resource>
143+
<server_name>api-docs</server_name>
144+
<uri>docs://payment-service/endpoints</uri>
145+
</access_mcp_resource>
146+
```
147+
148+
Accessing domain-specific knowledge:
149+
150+
```
151+
<access_mcp_resource>
152+
<server_name>knowledge-base</server_name>
153+
<uri>kb://medical/terminology/common</uri>
154+
</access_mcp_resource>
155+
```
156+
157+
Fetching system configuration:
158+
159+
```
160+
<access_mcp_resource>
161+
<server_name>infra-monitor</server_name>
162+
<uri>config://production/database</uri>
163+
</access_mcp_resource>
164+
```

0 commit comments

Comments
 (0)