You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement comprehensive JSDoc documentation across all components using the modern docdash template to enhance developer experience and maintain consistency with our existing API documentation infrastructure.
π― Scope
Add JSDoc documentation generation for:
MCP Server (.mjs) - Model Context Protocol implementation
HTTP Bridge (.mjs) - Middleware layer between Chrome extension and MCP server
Chrome Extension (.js) - Browser-based monitoring and communication layer
Documentation Server (.mjs) - API documentation hosting and aggregation service
π Requirements
Core Implementation
Install and configure JSDoc with docdash template
Create JSDoc configuration file (jsdoc.conf.json)
Add comprehensive JSDoc comments to all modules
Generate static documentation site
Integrate with existing documentation server at localhost:3020
Documentation Coverage
MCP Server: Document all MCP protocol implementations, tool definitions, and AI client compatibility
Rationale: Chrome extensions use their own module system via manifest.json and run in browser context, while Node.js components benefit from explicit ES module declaration.
# Simple startup commands
./start_all.sh # Start everything
npm start # Alias for start_all.sh
npm run dev # Development mode with doc watching
2. Type Annotations
Use JSDoc for type safety without TypeScript:
javascript/**
* @param {string} elementSelector - CSS selector for DOM element
* @param {Object} options - Configuration options
* @param {number} options.maxTokens - Maximum token limit
* @param {boolean} options.includeCookies - Whether to include cookies
* @returns {Promise<Object>} Processed element data
*/
2. Service Orchestration
Dependency checking before startup
Health checks to verify service readiness
Graceful shutdown handling with proper cleanup
Process management with PID tracking
Colored output for better developer experience
3. Documentation Server Specific Coverage
Document the documentation server's:
Route handlers for each endpoint (/docs, /rest-docs, /ws-docs, etc.)
Static file serving logic for OpenAPI/AsyncAPI specs
Health endpoint metadata aggregation
CORS configuration for cross-origin access
Content-type handling for different documentation formats
4. Cross-Component Documentation
Link related functions across components using @see tags
Document data flow: Chrome extension β HTTP bridge β MCP server
Document how documentation server aggregates and serves all specs
Include startup and shutdown procedures in JSDoc
5. AI-Friendly Documentation
Ensure JSDoc output is accessible via /health endpoint metadata
Include service orchestration patterns for AI clients
Document the complete startup pipeline for automated deployment
π― Success Criteria
All public APIs documented with JSDoc across all four components
Single command startup (./start_all.sh) works reliably
Documentation integrates seamlessly with existing portal
Build process is automated and includes health checks
Documentation is discoverable by AI agents via existing endpoints
Service dependencies and startup order are properly managed
Overview
Implement comprehensive JSDoc documentation across all components using the modern docdash template to enhance developer experience and maintain consistency with our existing API documentation infrastructure.
π― Scope
Add JSDoc documentation generation for:
π Requirements
Core Implementation
Documentation Coverage
Integration Requirements
π οΈ Technical Specifications
JSDoc Configuration
package.json Updates
Documentation Standards
π§ File Extension Best Practices
Recommended structure:
Rationale: Chrome extensions use their own module system via
manifest.jsonand run in browser context, while Node.js components benefit from explicit ES module declaration.π Integration with Existing Docs
Update documentation portal to include:
β¨ Best Practice Recommendations
1. Unified Development Experience
2. Type Annotations
Use JSDoc for type safety without TypeScript:
2. Service Orchestration
3. Documentation Server Specific Coverage
Document the documentation server's:
4. Cross-Component Documentation
5. AI-Friendly Documentation
π― Success Criteria
π Related Documentation