Skip to content

Commit 59b4a33

Browse files
committed
docs: Update architecture docs and add CLI usage examples
ARCHITECTURE.md: - Add Document Storage Design section with mermaid diagram - Document context-aware search capabilities - Update future considerations for data relationships - Enhance tools section description README.md: - Add CLI usage section with command examples - Improve command documentation accessibility - Show how to access help for specific commands These updates improve documentation clarity and reflect recent feature additions.
1 parent 93c47f1 commit 59b4a33

File tree

3 files changed

+34
-4
lines changed

3 files changed

+34
-4
lines changed

.clinerules

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- When importing a relative path, avoid using file extensions like ".js" and ".ts".
99
- NEVER update any files in the following directories: .git, node_modules
1010
- Add and update TSDoc for all classes, methods and functions. Focus on functionality and reasoning. Avoid documenting individual parameters or return values if their use can easily be derived from their name.
11+
- Git commit messages must be formatted as markdown
1112

1213
## Architecture Documentation Guidelines
1314

ARCHITECTURE.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,24 @@ The project maintains a `tools/` directory containing modular implementations of
4040
Current tools include:
4141

4242
- Documentation scraping functionality
43-
- Search capabilities
43+
- Search capabilities with context-aware results
4444
- Library version management
4545
- Document management operations
4646

47+
### Document Storage Design
48+
49+
Documents are stored with URLs and sequential ordering to maintain source context:
50+
51+
```mermaid
52+
graph LR
53+
D1[Previous Doc] --> D2[Current Doc] --> D3[Next Doc]
54+
subgraph Same URL/Version
55+
D1 & D2 & D3
56+
end
57+
```
58+
59+
Search results include surrounding content to provide more complete responses, while maintaining efficient retrieval through compound indexing.
60+
4761
### Interface-Specific Adapters
4862

4963
#### CLI (cli.ts)
@@ -119,6 +133,8 @@ This hierarchy ensures:
119133
When adding new functionality:
120134

121135
1. Implement core logic in a new tool under `tools/`
122-
2. Add CLI command in `cli.ts`
123-
3. Add MCP tool in `index.ts`
124-
4. Maintain consistent error handling and progress reporting
136+
2. Consider data relationships and context requirements
137+
3. Design for efficient retrieval patterns
138+
4. Add CLI command in `cli.ts`
139+
5. Add MCP tool in `index.ts`
140+
6. Maintain consistent error handling and progress reporting

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,19 @@ This server supports partial version matching, selecting the best available vers
1717
- If a partial version (e.g., `1.2`) is specified, the latest matching version (e.g., `1.2.5`) is used.
1818
- If the specified version (full or partial) is not found, the server will attempt to find the closest preceding version.
1919

20+
## CLI Usage
21+
22+
The `docs-mcp` CLI provides commands for managing documentation. To see available commands and options:
23+
24+
```bash
25+
# Show all commands
26+
docs-mcp --help
27+
28+
# Show help for a specific command
29+
docs-mcp scrape --help
30+
docs-mcp search --help
31+
```
32+
2033
## Development
2134

2235
Install dependencies:

0 commit comments

Comments
 (0)