@afterxleep/doc-bot 1.7.0 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -14
- package/bin/doc-bot.js +3 -3
- package/package.json +5 -5
- package/src/index.js +2 -2
package/README.md
CHANGED
|
@@ -97,7 +97,19 @@ Traditional AI assistants use static rule files (like Cursor Rules or Copilot's
|
|
|
97
97
|
"mcpServers": {
|
|
98
98
|
"docbot": {
|
|
99
99
|
"command": "npx",
|
|
100
|
-
"args": ["@afterxleep/doc-bot"
|
|
100
|
+
"args": ["@afterxleep/doc-bot"]
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
**Note:** By default, doc-bot looks for a `.doc-bot` folder. To use a different folder:
|
|
107
|
+
```json
|
|
108
|
+
{
|
|
109
|
+
"mcpServers": {
|
|
110
|
+
"docbot": {
|
|
111
|
+
"command": "npx",
|
|
112
|
+
"args": ["@afterxleep/doc-bot", "--docs", "./my-custom-docs"]
|
|
101
113
|
}
|
|
102
114
|
}
|
|
103
115
|
}
|
|
@@ -107,11 +119,11 @@ Traditional AI assistants use static rule files (like Cursor Rules or Copilot's
|
|
|
107
119
|
|
|
108
120
|
## How to organize your documentation
|
|
109
121
|
|
|
110
|
-
Create a
|
|
122
|
+
Create a `.doc-bot/` folder in your project root with markdown files using frontmatter:
|
|
111
123
|
|
|
112
124
|
```
|
|
113
125
|
your-project/
|
|
114
|
-
├── doc-bot/
|
|
126
|
+
├── .doc-bot/
|
|
115
127
|
│ ├── coding-standards.md # Global rule (alwaysApply: true)
|
|
116
128
|
│ ├── security.md # Global rule (alwaysApply: true)
|
|
117
129
|
│ ├── testing.md # Contextual rule (alwaysApply: false)
|
|
@@ -120,10 +132,7 @@ your-project/
|
|
|
120
132
|
└── package.json
|
|
121
133
|
```
|
|
122
134
|
|
|
123
|
-
**Note:** You can use any folder name
|
|
124
|
-
```json
|
|
125
|
-
"args": ["@afterxleep/doc-bot", "--docs", "./my-custom-docs"]
|
|
126
|
-
```
|
|
135
|
+
**Note:** The `.doc-bot` folder is the default location. You can use any folder name by specifying it with the `--docs` option.
|
|
127
136
|
|
|
128
137
|
### Documentation types:
|
|
129
138
|
|
|
@@ -132,7 +141,7 @@ your-project/
|
|
|
132
141
|
|
|
133
142
|
### Example documentation files:
|
|
134
143
|
|
|
135
|
-
**Global Rule Example** (
|
|
144
|
+
**Global Rule Example** (`.doc-bot/coding-standards.md`):
|
|
136
145
|
```markdown
|
|
137
146
|
---
|
|
138
147
|
alwaysApply: true
|
|
@@ -150,7 +159,7 @@ keywords: ["code-quality", "standards", "best-practices"]
|
|
|
150
159
|
- Write descriptive variable names
|
|
151
160
|
```
|
|
152
161
|
|
|
153
|
-
**Contextual Rule Example** (
|
|
162
|
+
**Contextual Rule Example** (`.doc-bot/testing.md`):
|
|
154
163
|
```markdown
|
|
155
164
|
---
|
|
156
165
|
alwaysApply: false
|
|
@@ -254,7 +263,7 @@ Ask your AI assistant something like "What documentation is available?" to test
|
|
|
254
263
|
doc-bot [options]
|
|
255
264
|
|
|
256
265
|
Options:
|
|
257
|
-
-d, --docs <path> Path to docs folder (
|
|
266
|
+
-d, --docs <path> Path to docs folder (default: .doc-bot)
|
|
258
267
|
-c, --config <path> Path to manifest file (optional, for backward compatibility)
|
|
259
268
|
-v, --verbose Enable verbose logging
|
|
260
269
|
-w, --watch Watch for file changes
|
|
@@ -263,14 +272,17 @@ Options:
|
|
|
263
272
|
|
|
264
273
|
**Example usage:**
|
|
265
274
|
```bash
|
|
266
|
-
# Basic usage
|
|
275
|
+
# Basic usage with default .doc-bot folder
|
|
276
|
+
doc-bot
|
|
277
|
+
|
|
278
|
+
# Specify a custom docs folder
|
|
267
279
|
doc-bot --docs ./my-docs
|
|
268
280
|
|
|
269
281
|
# With verbose logging and file watching
|
|
270
|
-
doc-bot --
|
|
282
|
+
doc-bot --verbose --watch
|
|
271
283
|
|
|
272
284
|
# With optional manifest for backward compatibility
|
|
273
|
-
doc-bot --
|
|
285
|
+
doc-bot --config ./manifest.json
|
|
274
286
|
```
|
|
275
287
|
|
|
276
288
|
## Publishing and Development
|
|
@@ -298,7 +310,7 @@ doc-bot --docs ./my-docs --config ./manifest.json
|
|
|
298
310
|
"mcpServers": {
|
|
299
311
|
"docs": {
|
|
300
312
|
"command": "node",
|
|
301
|
-
"args": ["/path/to/doc-bot/bin/doc-bot.js", "--
|
|
313
|
+
"args": ["/path/to/doc-bot/bin/doc-bot.js", "--watch"]
|
|
302
314
|
}
|
|
303
315
|
}
|
|
304
316
|
}
|
package/bin/doc-bot.js
CHANGED
|
@@ -9,7 +9,7 @@ program
|
|
|
9
9
|
.name('doc-bot')
|
|
10
10
|
.description('Generic MCP server for intelligent documentation access')
|
|
11
11
|
.version('1.5.0')
|
|
12
|
-
.
|
|
12
|
+
.option('-d, --docs <path>', 'Path to docs folder', '.doc-bot')
|
|
13
13
|
.option('-c, --config <path>', 'Path to manifest file')
|
|
14
14
|
.option('-v, --verbose', 'Enable verbose logging')
|
|
15
15
|
.option('-w, --watch', 'Watch for file changes')
|
|
@@ -33,9 +33,9 @@ async function main() {
|
|
|
33
33
|
console.log('📋 Use frontmatter in your markdown files:');
|
|
34
34
|
console.log(' alwaysApply: true (for global rules)');
|
|
35
35
|
console.log(' alwaysApply: false (for contextual rules)');
|
|
36
|
-
console.log(' filePatterns: ["*.js", "src/**/*"] (when to apply contextual rules)');
|
|
37
36
|
console.log('');
|
|
38
|
-
console.log('
|
|
37
|
+
console.log('💡 Tip: By default, doc-bot looks for a .doc-bot folder.');
|
|
38
|
+
console.log(' Use --docs to specify a different folder.');
|
|
39
39
|
process.exit(1);
|
|
40
40
|
}
|
|
41
41
|
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@afterxleep/doc-bot",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.1",
|
|
4
4
|
"description": "Generic MCP server for intelligent documentation access in any project",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"doc-bot": "bin/doc-bot.js"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
|
-
"start": "node bin/doc-bot.js --
|
|
11
|
-
"start:watch": "node bin/doc-bot.js --
|
|
12
|
-
"start:examples": "node bin/doc-bot.js --docs ./
|
|
13
|
-
"dev": "node bin/doc-bot.js --
|
|
10
|
+
"start": "node bin/doc-bot.js --verbose",
|
|
11
|
+
"start:watch": "node bin/doc-bot.js --verbose --watch",
|
|
12
|
+
"start:examples": "node bin/doc-bot.js --docs ./samples --verbose",
|
|
13
|
+
"dev": "node bin/doc-bot.js --verbose --watch",
|
|
14
14
|
"test": "jest",
|
|
15
15
|
"test:watch": "jest --watch",
|
|
16
16
|
"test:coverage": "jest --coverage",
|
package/src/index.js
CHANGED
|
@@ -11,8 +11,8 @@ const fs = require('fs').promises;
|
|
|
11
11
|
class DocsServer {
|
|
12
12
|
constructor(options = {}) {
|
|
13
13
|
this.options = {
|
|
14
|
-
docsPath: options.docsPath || '
|
|
15
|
-
configPath: options.configPath || '
|
|
14
|
+
docsPath: options.docsPath || './.doc-bot',
|
|
15
|
+
configPath: options.configPath || './.doc-bot/manifest.json', // Optional, for backward compatibility
|
|
16
16
|
verbose: options.verbose || false,
|
|
17
17
|
watch: options.watch || false,
|
|
18
18
|
...options
|