@afterxleep/doc-bot 1.22.0 → 1.23.0

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +11 -14
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@afterxleep/doc-bot",
3
- "version": "1.22.0",
3
+ "version": "1.23.0",
4
4
  "description": "Generic MCP server for intelligent documentation access in any project",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/index.js CHANGED
@@ -166,7 +166,7 @@ class DocsServer {
166
166
  tools: [
167
167
  {
168
168
  name: 'check_project_rules',
169
- description: 'Get mandatory coding standards for your task. Always call before writing code. Returns architecture patterns, security requirements, and performance guidelines specific to this codebase. Critical for maintaining code quality and consistency.',
169
+ description: 'Get mandatory coding standards for your task. Call BEFORE writing code AND whenever you start a new component/feature/file. Returns architecture patterns, security requirements, and performance guidelines specific to this codebase. Prevents rework by catching violations early. Use this repeatedly: before each major code block, when switching contexts, or when unsure about approach.',
170
170
  inputSchema: {
171
171
  type: 'object',
172
172
  properties: {
@@ -180,7 +180,7 @@ class DocsServer {
180
180
  },
181
181
  {
182
182
  name: 'search_documentation',
183
- description: 'Search codebase documentation and API references. Searches project patterns, architecture decisions, and API docs. Best results with technical terms like class names, not descriptions. Examples: search "Widget" not "iOS 18 features". Supports pagination for large result sets.',
183
+ description: 'Search codebase documentation and API references - use THROUGHOUT your work, not just at the start. Call whenever you encounter unfamiliar code patterns, before implementing any feature, when debugging issues, or when you need examples. Searches project patterns, architecture decisions, and API docs. Best results with technical terms (class names, API names), not natural language descriptions. Example: search "Widget" NOT "iOS 18 features". If your first search doesn\'t help, search again with different terms - the docs are there to help you continuously.',
184
184
  inputSchema: {
185
185
  type: 'object',
186
186
  properties: {
@@ -210,7 +210,7 @@ class DocsServer {
210
210
  },
211
211
  {
212
212
  name: 'get_global_rules',
213
- description: 'Get comprehensive coding standards and architecture guidelines. Returns project-wide engineering principles, design patterns, performance requirements, and security standards. Essential reading for understanding the codebase philosophy.',
213
+ description: 'Get comprehensive coding standards and architecture guidelines - reference this when making ANY architectural decision, not just at project start. Returns project-wide engineering principles, design patterns, performance requirements, and security standards that override general best practices. Call when: starting work, making design decisions, resolving conflicts between approaches, or when implementation feels uncertain. These rules represent hard-learned lessons specific to THIS codebase.',
214
214
  inputSchema: {
215
215
  type: 'object',
216
216
  properties: {
@@ -224,7 +224,7 @@ class DocsServer {
224
224
  },
225
225
  {
226
226
  name: 'get_file_docs',
227
- description: 'Get file-specific coding patterns and conventions. Returns contextual guidelines, performance considerations, and architectural decisions for specific files or directories. Use before modifying existing code.',
227
+ description: 'Get file-specific coding patterns and conventions for ANY file you work with. Call BEFORE modifying code AND when you encounter a new file during implementation. Returns contextual guidelines, performance considerations, and architectural decisions for specific files or directories. Each file/directory may have unique rules that override general patterns. Use whenever: editing existing files, creating files in a new directory, implementing features that touch multiple files, or debugging file-specific issues.',
228
228
  inputSchema: {
229
229
  type: 'object',
230
230
  properties: {
@@ -238,7 +238,7 @@ class DocsServer {
238
238
  },
239
239
  {
240
240
  name: 'read_specific_document',
241
- description: 'Read full documentation file content. Use after search_documentation to get complete implementation details, code examples, and architectural decisions. Only for project docs, not API docs.',
241
+ description: 'Read full documentation file content - dive deep WHENEVER search results point you here. Use after search_documentation identifies relevant docs, when you need complete context before implementing, or when revisiting a topic mid-work. Returns complete implementation details, code examples, and architectural decisions. Don\'t just skim search results - read the full docs to avoid missing critical details. Project docs contain battle-tested patterns; API docs show framework usage.',
242
242
  inputSchema: {
243
243
  type: 'object',
244
244
  properties: {
@@ -256,7 +256,7 @@ class DocsServer {
256
256
  },
257
257
  {
258
258
  name: 'explore_api',
259
- description: 'Deep dive into any API, framework, or class. Returns all methods, properties, protocols, and usage examples. Essential for understanding how to implement features correctly. Much faster than multiple searches.',
259
+ description: 'Deep dive into any API, framework, or class - check this EVERY time you use an unfamiliar API, not just once. Returns all methods, properties, protocols, and usage examples. Essential when: implementing features with new frameworks, encountering unknown classes mid-work, choosing between similar APIs, or verifying correct API usage. Much faster than multiple searches. If you\'re writing import statements or instantiating classes you haven\'t used before, explore them first to avoid misuse.',
260
260
  inputSchema: {
261
261
  type: 'object',
262
262
  properties: {
@@ -274,7 +274,7 @@ class DocsServer {
274
274
  },
275
275
  {
276
276
  name: 'create_or_update_rule',
277
- description: 'Document new coding patterns or architectural decisions. Captures lessons learned, design patterns, and team conventions as searchable knowledge. Great for preserving tribal knowledge.',
277
+ description: 'Document new coding patterns or architectural decisions AS YOU DISCOVER THEM during work. Call this when: you solve a tricky problem, establish a new pattern, learn a gotcha, make an architectural decision, or implement something that should be standardized. Captures lessons learned, design patterns, and team conventions as searchable knowledge for future work. Don\'t wait until the end - document insights immediately while context is fresh.',
278
278
  inputSchema: {
279
279
  type: 'object',
280
280
  properties: {
@@ -309,7 +309,7 @@ class DocsServer {
309
309
  },
310
310
  {
311
311
  name: 'refresh_documentation',
312
- description: 'Reload all project documentation from disk. Use when documentation files have been modified outside of this session. Re-indexes all documents and updates search index.',
312
+ description: 'Reload all project documentation from disk when docs are updated externally. Call when: documentation files are modified outside this session, after creating new docs manually, when search results seem stale, or if you suspect docs have changed. Re-indexes all documents and updates search index. If you created new documentation and it\'s not appearing in searches, refresh first.',
313
313
  inputSchema: {
314
314
  type: 'object',
315
315
  properties: {},
@@ -318,7 +318,7 @@ class DocsServer {
318
318
  },
319
319
  {
320
320
  name: 'get_document_index',
321
- description: 'List all available project documentation files. Returns index with titles, descriptions, and metadata. Use to see what documentation exists without searching.',
321
+ description: 'List all available project documentation files - check periodically to discover new docs added during your work. Returns index with titles, descriptions, and metadata. Use when: starting work (to see what\'s available), search fails to find what you need (browse instead), exploring unfamiliar codebases, or checking if docs exist for a topic. Helps you discover documentation you didn\'t know existed.',
322
322
  inputSchema: {
323
323
  type: 'object',
324
324
  properties: {},
@@ -364,7 +364,7 @@ class DocsServer {
364
364
  },
365
365
  {
366
366
  name: 'doc_bot',
367
- description: 'ALWAYS call this first for any task. Returns mandatory project standards (alwaysApply rules) that must be followed, plus a catalog of available documentation tools. Provides intelligent guidance while trusting your judgment on what additional context you need based on your familiarity with the codebase. Supports pagination for large rule sets.',
367
+ description: 'ALWAYS call this FIRST for ANY task, AND consult again when switching contexts or starting new features. Returns mandatory project standards (alwaysApply rules) that must be followed, plus a catalog of documentation tools. This is your entry point - it tells you what rules are non-negotiable AND which other tools to use for deeper dives. Call whenever: beginning any task, switching to a different feature/component, facing uncertainty, or needing to verify compliance. Think of this as your "project compass" - use it repeatedly to stay aligned.',
368
368
  inputSchema: {
369
369
  type: 'object',
370
370
  properties: {
@@ -408,10 +408,7 @@ class DocsServer {
408
408
  }
409
409
  const searchPage = args?.page || 1;
410
410
  const searchLimit = args?.limit || 20;
411
-
412
- // Calculate offset for pagination
413
- const searchOffset = (searchPage - 1) * searchLimit;
414
-
411
+
415
412
  const unifiedOptions = {
416
413
  limit: searchLimit * 3, // Get more results for pagination
417
414
  docsetId: args?.docsetId,