@weavelogic/knowledge-graph-agent 0.8.4 → 0.8.5
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/dist/cli/commands/docs.d.ts.map +1 -1
- package/dist/cli/commands/docs.js +39 -1
- package/dist/cli/commands/docs.js.map +1 -1
- package/dist/generators/doc-generator-agents.d.ts +46 -0
- package/dist/generators/doc-generator-agents.d.ts.map +1 -0
- package/dist/generators/doc-generator-agents.js +563 -0
- package/dist/generators/doc-generator-agents.js.map +1 -0
- package/dist/generators/docs-init.d.ts.map +1 -1
- package/dist/generators/docs-init.js +510 -0
- package/dist/generators/docs-init.js.map +1 -1
- package/dist/node_modules/@typescript-eslint/types/dist/index.js +1 -1
- package/dist/node_modules/@typescript-eslint/visitor-keys/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs-init.js","sources":["../../src/generators/docs-init.ts"],"sourcesContent":["/**\n * Docs Directory Initializer\n *\n * Creates the initial docs directory structure following the weave-nn\n * methodology with proper PRIMITIVES.md taxonomy.\n *\n * SECURITY NOTES (Handlebars Templates):\n * - All templates use double-braces {{}} which HTML-escapes output\n * - Triple-braces {{{raw}}} are NOT used, preventing injection attacks\n * - Template variables come from internal sources (project analysis), not direct user input\n * - See: https://handlebarsjs.com/guide/#html-escaping\n */\n\nimport { existsSync, mkdirSync, writeFileSync, readFileSync } from 'fs';\nimport { join, basename } from 'path';\nimport fg from 'fast-glob';\nimport Handlebars from 'handlebars';\nimport type {\n DocsInitOptions,\n DocsInitResult,\n NodeType,\n} from '../core/types.js';\n\n/**\n * Default docs structure based on PRIMITIVES.md taxonomy\n */\nconst DEFAULT_STRUCTURE = {\n directories: [\n // Core concepts\n 'concepts',\n 'concepts/architecture',\n 'concepts/patterns',\n\n // Components\n 'components',\n 'components/ui',\n 'components/utilities',\n\n // Services\n 'services',\n 'services/api',\n 'services/workers',\n\n // Features\n 'features',\n 'features/core',\n 'features/advanced',\n\n // Integrations\n 'integrations',\n 'integrations/databases',\n 'integrations/auth-providers',\n 'integrations/storage',\n 'integrations/monitoring',\n\n // Standards\n 'standards',\n 'standards/coding-standards',\n 'standards/programming-languages',\n 'standards/build-tools',\n\n // Guides\n 'guides',\n 'guides/getting-started',\n 'guides/testing',\n 'guides/deployment',\n\n // References\n 'references',\n 'references/api',\n 'references/cli',\n\n // Meta\n '_templates',\n '_attachments',\n ],\n files: {\n // Root files\n 'README.md': 'readme',\n 'PRIMITIVES.md': 'primitives',\n 'MOC.md': 'moc',\n\n // Directory index files (_MOC.md is the local map of content)\n 'concepts/_MOC.md': 'moc-concepts',\n 'components/_MOC.md': 'moc-components',\n 'services/_MOC.md': 'moc-services',\n 'features/_MOC.md': 'moc-features',\n 'integrations/_MOC.md': 'moc-integrations',\n 'standards/_MOC.md': 'moc-standards',\n 'guides/_MOC.md': 'moc-guides',\n 'references/_MOC.md': 'moc-references',\n\n // Templates\n '_templates/concept.md': 'template-concept',\n '_templates/technical.md': 'template-technical',\n '_templates/feature.md': 'template-feature',\n '_templates/service.md': 'template-service',\n '_templates/guide.md': 'template-guide',\n },\n};\n\n/**\n * Template content for docs files\n */\nconst TEMPLATES: Record<string, string> = {\n readme: `# {{projectName}} Documentation\n\nWelcome to the {{projectName}} knowledge base.\n\n## Quick Navigation\n\n- [[MOC|Map of Content]] - Overview of all documentation\n- [[PRIMITIVES|Primitives]] - Core building blocks and technologies\n\n## Structure\n\nThis documentation follows the Weave-NN knowledge graph methodology:\n\n\\`\\`\\`\ndocs/\n├── concepts/ # Abstract concepts and ideas\n├── components/ # Reusable components and utilities\n├── services/ # Backend services and APIs\n├── features/ # Product features and capabilities\n├── integrations/ # External integrations\n├── standards/ # Coding standards and conventions\n├── guides/ # How-to guides and tutorials\n└── references/ # API and CLI references\n\\`\\`\\`\n\n## Getting Started\n\n1. Browse the [[MOC|Map of Content]] for an overview\n2. Check [[PRIMITIVES]] for technology decisions\n3. Read [[guides/getting-started/index|Getting Started Guide]]\n\n---\n*Generated by @weave-nn/knowledge-graph-agent*\n`,\n\n primitives: `# Primitives\n\nCore building blocks and technology decisions for {{projectName}}.\n\n## Overview\n\nPrimitives are the foundational technologies that power this project. Each primitive represents a key technology choice with its rationale and usage patterns.\n\n## Categories\n\n### Languages\n{{#each languages}}\n- [[standards/programming-languages/{{this}}|{{this}}]]\n{{/each}}\n\n### Frameworks\n{{#each frameworks}}\n- [[{{category}}/{{slug}}|{{name}}]]\n{{/each}}\n\n### Key Dependencies\n{{#each dependencies}}\n- [[{{category}}/{{slug}}|{{name}}]] - {{description}}\n{{/each}}\n\n## Technology Decisions\n\n| Category | Choice | Rationale |\n|----------|--------|-----------|\n| Runtime | Node.js | Modern JavaScript runtime |\n| Language | TypeScript | Type safety and DX |\n| Package Manager | npm/bun | Fast, reliable |\n\n---\n*Generated by @weave-nn/knowledge-graph-agent*\n`,\n\n moc: `# Map of Content\n\nCentral navigation hub for {{projectName}} documentation.\n\n## Core Concepts\n- [[concepts/_MOC|Concepts Index]]\n\n## Components\n- [[components/_MOC|Components Index]]\n\n## Services\n- [[services/_MOC|Services Index]]\n\n## Features\n- [[features/_MOC|Features Index]]\n\n## Integrations\n- [[integrations/_MOC|Integrations Index]]\n\n## Standards\n- [[standards/_MOC|Standards Index]]\n\n## Guides\n- [[guides/_MOC|Guides Index]]\n\n## References\n- [[references/_MOC|References Index]]\n\n---\n*Last updated: {{date}}*\n`,\n\n 'moc-concepts': `---\ntitle: Concepts\ntype: concept\nstatus: active\ntags: [moc, concepts]\ncreated: {{date}}\n---\n\n# Concepts\n\nAbstract concepts and architectural patterns for {{projectName}}.\n\n## Architecture\n- [[concepts/architecture/index|Architecture Overview]]\n\n## Patterns\n*Add design patterns and abstractions here*\n\n## Mental Models\n*Add key mental models for understanding the system*\n\n---\n> Use template: [[_templates/concept|Concept Template]]\n`,\n\n 'moc-components': `---\ntitle: Components\ntype: technical\nstatus: active\ntags: [moc, components]\ncreated: {{date}}\n---\n\n# Components\n\nReusable components and utilities for {{projectName}}.\n\n## UI Components\n*Add UI components here*\n\n## Utilities\n*Add utility functions and helpers*\n\n## Shared Libraries\n*Add shared code libraries*\n\n---\n> Use template: [[_templates/technical|Technical Template]]\n`,\n\n 'moc-services': `---\ntitle: Services\ntype: service\nstatus: active\ntags: [moc, services]\ncreated: {{date}}\n---\n\n# Services\n\nBackend services and APIs for {{projectName}}.\n\n## API Services\n*Add API service documentation*\n\n## Background Workers\n*Add worker/job documentation*\n\n## External Services\n*Add third-party service integrations*\n\n---\n> Use template: [[_templates/service|Service Template]]\n`,\n\n 'moc-features': `---\ntitle: Features\ntype: feature\nstatus: active\ntags: [moc, features]\ncreated: {{date}}\n---\n\n# Features\n\nProduct features and capabilities for {{projectName}}.\n\n## Core Features\n*Add core feature documentation*\n\n## Advanced Features\n*Add advanced feature documentation*\n\n## Upcoming Features\n*Add planned features*\n\n---\n> Use template: [[_templates/feature|Feature Template]]\n`,\n\n 'moc-integrations': `---\ntitle: Integrations\ntype: integration\nstatus: active\ntags: [moc, integrations]\ncreated: {{date}}\n---\n\n# Integrations\n\nExternal integrations and third-party services for {{projectName}}.\n\n## Databases\n*Add database integrations*\n\n## Authentication\n*Add auth provider integrations*\n\n## Storage\n*Add storage integrations*\n\n## Monitoring\n*Add monitoring/observability integrations*\n\n---\n> Use template: [[_templates/technical|Technical Template]]\n`,\n\n 'moc-standards': `---\ntitle: Standards\ntype: standard\nstatus: active\ntags: [moc, standards]\ncreated: {{date}}\n---\n\n# Standards\n\nCoding standards and conventions for {{projectName}}.\n\n## Coding Standards\n*Add coding style guides*\n\n## Programming Languages\n{{#each languages}}\n- [[standards/programming-languages/{{this}}|{{this}}]]\n{{/each}}\n\n## Build Tools\n*Add build tool documentation*\n\n---\n> See also: [[PRIMITIVES|Technology Primitives]]\n`,\n\n 'moc-guides': `---\ntitle: Guides\ntype: guide\nstatus: active\ntags: [moc, guides]\ncreated: {{date}}\n---\n\n# Guides\n\nHow-to guides and tutorials for {{projectName}}.\n\n## Getting Started\n- [[guides/getting-started/index|Getting Started Guide]]\n\n## Testing\n*Add testing guides*\n\n## Deployment\n*Add deployment guides*\n\n## Troubleshooting\n*Add troubleshooting guides*\n\n---\n> Use template: [[_templates/guide|Guide Template]]\n`,\n\n 'moc-references': `---\ntitle: References\ntype: technical\nstatus: active\ntags: [moc, references]\ncreated: {{date}}\n---\n\n# References\n\nAPI and CLI references for {{projectName}}.\n\n## API Reference\n*Add API documentation*\n\n## CLI Reference\n*Add CLI documentation*\n\n## Configuration Reference\n*Add configuration options*\n\n---\n> See also: [[PRIMITIVES|Technology Primitives]]\n`,\n\n 'template-concept': `---\ntitle: {{title}}\ntype: concept\nstatus: draft\ntags: [concept]\ncreated: {{date}}\nupdated: {{date}}\n---\n\n# {{title}}\n\n## Overview\n\nBrief description of this concept.\n\n## Key Ideas\n\n- Point 1\n- Point 2\n- Point 3\n\n## Related Concepts\n\n- [[related-concept-1]]\n- [[related-concept-2]]\n\n## References\n\n- External reference 1\n- External reference 2\n`,\n\n 'template-technical': `---\ntitle: {{title}}\ntype: technical\nstatus: draft\ntags: [technical]\ncreated: {{date}}\nupdated: {{date}}\n---\n\n# {{title}}\n\n## Overview\n\nBrief description of this technical component.\n\n## Implementation\n\n\\`\\`\\`typescript\n// Code example\n\\`\\`\\`\n\n## Usage\n\nHow to use this component.\n\n## Configuration\n\nAvailable configuration options.\n\n## Related\n\n- [[related-technical-1]]\n`,\n\n 'template-feature': `---\ntitle: {{title}}\ntype: feature\nstatus: draft\ntags: [feature]\ncreated: {{date}}\nupdated: {{date}}\n---\n\n# {{title}}\n\n## Overview\n\nBrief description of this feature.\n\n## User Story\n\nAs a [user type], I want [goal] so that [benefit].\n\n## Acceptance Criteria\n\n- [ ] Criterion 1\n- [ ] Criterion 2\n- [ ] Criterion 3\n\n## Technical Implementation\n\nHow this feature is implemented.\n\n## Related Features\n\n- [[related-feature-1]]\n`,\n\n 'template-service': `---\ntitle: {{title}}\ntype: service\nstatus: draft\ntags: [service, api]\ncreated: {{date}}\nupdated: {{date}}\n---\n\n# {{title}}\n\n## Overview\n\nBrief description of this service.\n\n## Endpoints\n\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /api/... | Description |\n| POST | /api/... | Description |\n\n## Configuration\n\nEnvironment variables and configuration options.\n\n## Dependencies\n\n- [[dependency-1]]\n- [[dependency-2]]\n\n## Deployment\n\nDeployment instructions.\n`,\n\n 'template-guide': `---\ntitle: {{title}}\ntype: guide\nstatus: draft\ntags: [guide, tutorial]\ncreated: {{date}}\nupdated: {{date}}\n---\n\n# {{title}}\n\n## Prerequisites\n\n- Prerequisite 1\n- Prerequisite 2\n\n## Steps\n\n### Step 1: Title\n\nInstructions for step 1.\n\n### Step 2: Title\n\nInstructions for step 2.\n\n### Step 3: Title\n\nInstructions for step 3.\n\n## Troubleshooting\n\nCommon issues and solutions.\n\n## Next Steps\n\n- [[next-guide-1]]\n- [[next-guide-2]]\n`,\n};\n\n/**\n * Framework detection result\n */\ninterface FrameworkInfo {\n name: string;\n slug: string;\n category: string;\n version?: string;\n}\n\n/**\n * Initialize docs directory\n */\nexport async function initDocs(options: DocsInitOptions): Promise<DocsInitResult> {\n const result: DocsInitResult = {\n success: true,\n docsPath: '',\n filesCreated: [],\n errors: [],\n };\n\n try {\n const { projectRoot, docsPath = 'docs', includeExamples = true, detectFramework = true } = options;\n const fullDocsPath = join(projectRoot, docsPath);\n result.docsPath = fullDocsPath;\n\n // Detect project information\n const projectName = await detectProjectName(projectRoot);\n const frameworks = detectFramework ? await detectFrameworks(projectRoot) : [];\n const languages = detectFramework ? await detectLanguages(projectRoot) : [];\n const dependencies = detectFramework ? await detectDependencies(projectRoot) : [];\n\n // Create template context\n const context = {\n projectName,\n date: new Date().toISOString().split('T')[0],\n frameworks,\n languages,\n dependencies,\n concepts: [],\n components: [],\n services: [],\n features: [],\n };\n\n // Create directories\n for (const dir of DEFAULT_STRUCTURE.directories) {\n const dirPath = join(fullDocsPath, dir);\n if (!existsSync(dirPath)) {\n mkdirSync(dirPath, { recursive: true });\n result.filesCreated.push(dirPath);\n }\n }\n\n // Create files from templates\n for (const [filePath, templateName] of Object.entries(DEFAULT_STRUCTURE.files)) {\n const fullPath = join(fullDocsPath, filePath);\n\n // Skip if file exists\n if (existsSync(fullPath)) {\n continue;\n }\n\n // Get template and compile\n const template = TEMPLATES[templateName];\n if (!template) {\n result.errors.push(`Template not found: ${templateName}`);\n continue;\n }\n\n try {\n const compiled = Handlebars.compile(template);\n const content = compiled(context);\n writeFileSync(fullPath, content, 'utf-8');\n result.filesCreated.push(fullPath);\n } catch (error) {\n result.errors.push(`Failed to create ${filePath}: ${error}`);\n }\n }\n\n // Create example files if requested\n if (includeExamples) {\n await createExampleFiles(fullDocsPath, context, result);\n }\n\n // Create .obsidian folder for vault detection\n const obsidianPath = join(fullDocsPath, '.obsidian');\n if (!existsSync(obsidianPath)) {\n mkdirSync(obsidianPath, { recursive: true });\n\n // Create minimal app.json for Obsidian\n const appJson = {\n \"legacyEditor\": false,\n \"livePreview\": true,\n };\n writeFileSync(join(obsidianPath, 'app.json'), JSON.stringify(appJson, null, 2));\n result.filesCreated.push(obsidianPath);\n }\n\n result.success = result.errors.length === 0;\n } catch (error) {\n result.success = false;\n result.errors.push(`Init failed: ${error}`);\n }\n\n return result;\n}\n\n/**\n * Detect project name from package.json or directory\n */\nasync function detectProjectName(projectRoot: string): Promise<string> {\n try {\n const pkgPath = join(projectRoot, 'package.json');\n if (existsSync(pkgPath)) {\n const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));\n if (pkg.name) {\n // Remove scope if present\n return pkg.name.replace(/^@[^/]+\\//, '');\n }\n }\n } catch {\n // Ignore errors\n }\n\n // Fall back to directory name\n return basename(projectRoot);\n}\n\n/**\n * Detect frameworks from project files\n */\nasync function detectFrameworks(projectRoot: string): Promise<FrameworkInfo[]> {\n const frameworks: FrameworkInfo[] = [];\n\n try {\n const pkgPath = join(projectRoot, 'package.json');\n if (existsSync(pkgPath)) {\n const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));\n const deps = { ...pkg.dependencies, ...pkg.devDependencies };\n\n // Framework detection patterns\n const patterns: Array<{ name: string; packages: string[]; category: string }> = [\n { name: 'React', packages: ['react'], category: 'components/ui' },\n { name: 'Next.js', packages: ['next'], category: 'services/api' },\n { name: 'Vue', packages: ['vue'], category: 'components/ui' },\n { name: 'Express', packages: ['express'], category: 'services/api' },\n { name: 'Fastify', packages: ['fastify'], category: 'services/api' },\n { name: 'Prisma', packages: ['@prisma/client', 'prisma'], category: 'integrations/databases' },\n { name: 'TypeORM', packages: ['typeorm'], category: 'integrations/databases' },\n { name: 'Jest', packages: ['jest'], category: 'guides/testing' },\n { name: 'Vitest', packages: ['vitest'], category: 'guides/testing' },\n { name: 'Vite', packages: ['vite'], category: 'standards/build-tools' },\n { name: 'Webpack', packages: ['webpack'], category: 'standards/build-tools' },\n ];\n\n for (const pattern of patterns) {\n for (const pkg of pattern.packages) {\n if (deps[pkg]) {\n frameworks.push({\n name: pattern.name,\n slug: pattern.name.toLowerCase().replace(/[^a-z0-9]+/g, '-'),\n category: pattern.category,\n version: deps[pkg],\n });\n break;\n }\n }\n }\n }\n } catch {\n // Ignore errors\n }\n\n return frameworks;\n}\n\n/**\n * Detect programming languages used\n */\nasync function detectLanguages(projectRoot: string): Promise<string[]> {\n const languages: Set<string> = new Set();\n\n try {\n // Check for TypeScript\n if (existsSync(join(projectRoot, 'tsconfig.json'))) {\n languages.add('typescript');\n }\n\n // Check for package.json (JavaScript/Node.js)\n if (existsSync(join(projectRoot, 'package.json'))) {\n languages.add('javascript');\n }\n\n // Check for Python\n if (existsSync(join(projectRoot, 'requirements.txt')) ||\n existsSync(join(projectRoot, 'pyproject.toml'))) {\n languages.add('python');\n }\n\n // Check for Rust\n if (existsSync(join(projectRoot, 'Cargo.toml'))) {\n languages.add('rust');\n }\n\n // Check for Go\n if (existsSync(join(projectRoot, 'go.mod'))) {\n languages.add('go');\n }\n } catch {\n // Ignore errors\n }\n\n return Array.from(languages);\n}\n\n/**\n * Detect major dependencies\n */\nasync function detectDependencies(projectRoot: string): Promise<Array<{ name: string; slug: string; category: string; description: string }>> {\n const deps: Array<{ name: string; slug: string; category: string; description: string }> = [];\n\n try {\n const pkgPath = join(projectRoot, 'package.json');\n if (existsSync(pkgPath)) {\n const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));\n const allDeps = { ...pkg.dependencies };\n\n // Top dependencies to document\n const topDeps = Object.keys(allDeps).slice(0, 10);\n\n for (const dep of topDeps) {\n deps.push({\n name: dep,\n slug: dep.replace(/^@/, '').replace(/[^a-z0-9]+/g, '-'),\n category: 'components/utilities',\n description: `Version ${allDeps[dep]}`,\n });\n }\n }\n } catch {\n // Ignore errors\n }\n\n return deps;\n}\n\n/**\n * Create example documentation files\n */\nasync function createExampleFiles(\n docsPath: string,\n context: Record<string, unknown>,\n result: DocsInitResult\n): Promise<void> {\n const examples = [\n {\n path: 'guides/getting-started/index.md',\n content: `---\ntitle: Getting Started\ntype: guide\nstatus: active\ntags: [guide, getting-started]\ncreated: ${context.date}\nupdated: ${context.date}\n---\n\n# Getting Started with ${context.projectName}\n\nWelcome! This guide will help you get up and running.\n\n## Prerequisites\n\n- Node.js 20+\n- npm or bun\n\n## Installation\n\n\\`\\`\\`bash\nnpm install\n\\`\\`\\`\n\n## Quick Start\n\n1. Clone the repository\n2. Install dependencies\n3. Run the development server\n\n## Next Steps\n\n- Explore the [[MOC|Map of Content]]\n- Review [[PRIMITIVES|Technology Primitives]]\n`,\n },\n {\n path: 'concepts/architecture/index.md',\n content: `---\ntitle: Architecture Overview\ntype: concept\nstatus: active\ntags: [architecture, concept]\ncreated: ${context.date}\nupdated: ${context.date}\n---\n\n# Architecture Overview\n\nHigh-level architecture of ${context.projectName}.\n\n## System Diagram\n\n\\`\\`\\`\n┌──────────────┐ ┌──────────────┐\n│ Frontend │────▶│ Backend │\n└──────────────┘ └──────────────┘\n │\n ┌──────▼──────┐\n │ Database │\n └─────────────┘\n\\`\\`\\`\n\n## Key Components\n\n- **Frontend**: User interface\n- **Backend**: API and business logic\n- **Database**: Data persistence\n\n## Design Principles\n\n1. Separation of concerns\n2. Single responsibility\n3. Dependency injection\n`,\n },\n ];\n\n for (const example of examples) {\n const fullPath = join(docsPath, example.path);\n if (!existsSync(fullPath)) {\n const dir = join(fullPath, '..');\n if (!existsSync(dir)) {\n mkdirSync(dir, { recursive: true });\n }\n writeFileSync(fullPath, example.content, 'utf-8');\n result.filesCreated.push(fullPath);\n }\n }\n}\n\n/**\n * Check if docs directory exists\n */\nexport function docsExist(projectRoot: string, docsPath = 'docs'): boolean {\n return existsSync(join(projectRoot, docsPath));\n}\n\n/**\n * Get docs path for a project\n */\nexport function getDocsPath(projectRoot: string): string | null {\n const possiblePaths = ['docs', 'documentation', 'doc', 'wiki'];\n\n for (const path of possiblePaths) {\n const fullPath = join(projectRoot, path);\n if (existsSync(fullPath)) {\n return fullPath;\n }\n }\n\n return null;\n}\n"],"names":["pkg"],"mappings":";;;AA0BA,MAAM,oBAAoB;AAAA,EACxB,aAAa;AAAA;AAAA,IAEX;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAGA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAGA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAGA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAGA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAGA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAGA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAGA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAGA;AAAA,IACA;AAAA,EAAA;AAAA,EAEF,OAAO;AAAA;AAAA,IAEL,aAAa;AAAA,IACb,iBAAiB;AAAA,IACjB,UAAU;AAAA;AAAA,IAGV,oBAAoB;AAAA,IACpB,sBAAsB;AAAA,IACtB,oBAAoB;AA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AAAA;AAAA;AAAA;AAAA,WAKJ,QAAQ,IAAI;AAAA,WACZ,QAAQ,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA,6BAKM,QAAQ,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAA;AAAA,EA0B5C;AAGF,aAAW,WAAW,UAAU;AAC9B,UAAM,WAAW,KAAK,UAAU,QAAQ,IAAI;AAC5C,QAAI,CAAC,WAAW,QAAQ,GAAG;AACzB,YAAM,MAAM,KAAK,UAAU,IAAI;AAC/B,UAAI,CAAC,WAAW,GAAG,GAAG;AACpB,kBAAU,KAAK,EAAE,WAAW,KAAA,CAAM;AAAA,MACpC;AACA,oBAAc,UAAU,QAAQ,SAAS,OAAO;AAChD,aAAO,aAAa,KAAK,QAAQ;AAAA,IACnC;AAAA,EACF;AACF;AAKO,SAAS,UAAU,aAAqB,WAAW,QAAiB;AACzE,SAAO,WAAW,KAAK,aAAa,QAAQ,CAAC;AAC/C;AAKO,SAAS,YAAY,aAAoC;AAC9D,QAAM,gBAAgB,CAAC,QAAQ,iBAAiB,OAAO,MAAM;AAE7D,aAAW,QAAQ,eAAe;AAChC,UAAM,WAAW,KAAK,aAAa,IAAI;AACvC,QAAI,WAAW,QAAQ,GAAG;AACxB,aAAO;AAAA,IACT;AAAA,EACF;AAEA,SAAO;AACT;"}
|
|
1
|
+
{"version":3,"file":"docs-init.js","sources":["../../src/generators/docs-init.ts"],"sourcesContent":["/**\n * Docs Directory Initializer\n *\n * Creates the initial docs directory structure following the weave-nn\n * methodology with proper PRIMITIVES.md taxonomy.\n *\n * SECURITY NOTES (Handlebars Templates):\n * - All templates use double-braces {{}} which HTML-escapes output\n * - Triple-braces {{{raw}}} are NOT used, preventing injection attacks\n * - Template variables come from internal sources (project analysis), not direct user input\n * - See: https://handlebarsjs.com/guide/#html-escaping\n */\n\nimport { existsSync, mkdirSync, writeFileSync, readFileSync } from 'fs';\nimport { join, basename } from 'path';\nimport fg from 'fast-glob';\nimport Handlebars from 'handlebars';\nimport type {\n DocsInitOptions,\n DocsInitResult,\n NodeType,\n} from '../core/types.js';\n\n/**\n * Default docs structure based on PRIMITIVES.md taxonomy\n */\nconst DEFAULT_STRUCTURE = {\n directories: [\n // Core concepts\n 'concepts',\n 'concepts/architecture',\n 'concepts/patterns',\n\n // Components\n 'components',\n 'components/ui',\n 'components/utilities',\n\n // Services\n 'services',\n 'services/api',\n 'services/workers',\n\n // Features\n 'features',\n 'features/core',\n 'features/advanced',\n\n // Integrations\n 'integrations',\n 'integrations/databases',\n 'integrations/auth-providers',\n 'integrations/storage',\n 'integrations/monitoring',\n\n // Standards\n 'standards',\n 'standards/coding-standards',\n 'standards/programming-languages',\n 'standards/build-tools',\n\n // Guides\n 'guides',\n 'guides/getting-started',\n 'guides/testing',\n 'guides/deployment',\n\n // References\n 'references',\n 'references/api',\n 'references/cli',\n\n // Meta\n '_templates',\n '_attachments',\n ],\n files: {\n // Root files\n 'README.md': 'readme',\n 'PRIMITIVES.md': 'primitives',\n 'MOC.md': 'moc',\n\n // Directory index files (_MOC.md is the local map of content)\n 'concepts/_MOC.md': 'moc-concepts',\n 'concepts/architecture/_MOC.md': 'moc-concepts-architecture',\n 'concepts/patterns/_MOC.md': 'moc-concepts-patterns',\n\n 'components/_MOC.md': 'moc-components',\n 'components/ui/_MOC.md': 'moc-components-ui',\n 'components/utilities/_MOC.md': 'moc-components-utilities',\n\n 'services/_MOC.md': 'moc-services',\n 'services/api/_MOC.md': 'moc-services-api',\n 'services/workers/_MOC.md': 'moc-services-workers',\n\n 'features/_MOC.md': 'moc-features',\n 'features/core/_MOC.md': 'moc-features-core',\n 'features/advanced/_MOC.md': 'moc-features-advanced',\n\n 'integrations/_MOC.md': 'moc-integrations',\n 'integrations/databases/_MOC.md': 'moc-integrations-databases',\n 'integrations/auth-providers/_MOC.md': 'moc-integrations-auth',\n 'integrations/storage/_MOC.md': 'moc-integrations-storage',\n 'integrations/monitoring/_MOC.md': 'moc-integrations-monitoring',\n\n 'standards/_MOC.md': 'moc-standards',\n 'standards/coding-standards/_MOC.md': 'moc-standards-coding',\n 'standards/programming-languages/_MOC.md': 'moc-standards-languages',\n 'standards/build-tools/_MOC.md': 'moc-standards-build',\n\n 'guides/_MOC.md': 'moc-guides',\n 'guides/getting-started/_MOC.md': 'moc-guides-getting-started',\n 'guides/testing/_MOC.md': 'moc-guides-testing',\n 'guides/deployment/_MOC.md': 'moc-guides-deployment',\n\n 'references/_MOC.md': 'moc-references',\n 'references/api/_MOC.md': 'moc-references-api',\n 'references/cli/_MOC.md': 'moc-references-cli',\n\n // Templates\n '_templates/concept.md': 'template-concept',\n '_templates/technical.md': 'template-technical',\n '_templates/feature.md': 'template-feature',\n '_templates/service.md': 'template-service',\n '_templates/guide.md': 'template-guide',\n },\n};\n\n/**\n * Template content for docs files\n */\nconst TEMPLATES: Record<string, string> = {\n readme: `# {{projectName}} Documentation\n\nWelcome to the {{projectName}} knowledge base.\n\n## Quick Navigation\n\n- [[MOC|Map of Content]] - Overview of all documentation\n- [[PRIMITIVES|Primitives]] - Core building blocks and technologies\n\n## Structure\n\nThis documentation follows the Weave-NN knowledge graph methodology:\n\n\\`\\`\\`\ndocs/\n├── concepts/ # Abstract concepts and ideas\n├── components/ # Reusable components and utilities\n├── services/ # Backend services and APIs\n├── features/ # Product features and capabilities\n├── integrations/ # External integrations\n├── standards/ # Coding standards and conventions\n├── guides/ # How-to guides and tutorials\n└── references/ # API and CLI references\n\\`\\`\\`\n\n## Getting Started\n\n1. Browse the [[MOC|Map of Content]] for an overview\n2. Check [[PRIMITIVES]] for technology decisions\n3. Read [[guides/getting-started/index|Getting Started Guide]]\n\n---\n*Generated by @weave-nn/knowledge-graph-agent*\n`,\n\n primitives: `# Primitives\n\nCore building blocks and technology decisions for {{projectName}}.\n\n## Overview\n\nPrimitives are the foundational technologies that power this project. Each primitive represents a key technology choice with its rationale and usage patterns.\n\n## Categories\n\n### Languages\n{{#each languages}}\n- [[standards/programming-languages/{{this}}|{{this}}]]\n{{/each}}\n\n### Frameworks\n{{#each frameworks}}\n- [[{{category}}/{{slug}}|{{name}}]]\n{{/each}}\n\n### Key Dependencies\n{{#each dependencies}}\n- [[{{category}}/{{slug}}|{{name}}]] - {{description}}\n{{/each}}\n\n## Technology Decisions\n\n| Category | Choice | Rationale |\n|----------|--------|-----------|\n| Runtime | Node.js | Modern JavaScript runtime |\n| Language | TypeScript | Type safety and DX |\n| Package Manager | npm/bun | Fast, reliable |\n\n---\n*Generated by @weave-nn/knowledge-graph-agent*\n`,\n\n moc: `# Map of Content\n\nCentral navigation hub for {{projectName}} documentation.\n\n## Core Concepts\n- [[concepts/_MOC|Concepts Index]]\n\n## Components\n- [[components/_MOC|Components Index]]\n\n## Services\n- [[services/_MOC|Services Index]]\n\n## Features\n- [[features/_MOC|Features Index]]\n\n## Integrations\n- [[integrations/_MOC|Integrations Index]]\n\n## Standards\n- [[standards/_MOC|Standards Index]]\n\n## Guides\n- [[guides/_MOC|Guides Index]]\n\n## References\n- [[references/_MOC|References Index]]\n\n---\n*Last updated: {{date}}*\n`,\n\n 'moc-concepts': `---\ntitle: Concepts\ntype: concept\nstatus: active\ntags: [moc, concepts]\ncreated: {{date}}\n---\n\n# Concepts\n\nAbstract concepts and architectural patterns for {{projectName}}.\n\n## Architecture\n- [[concepts/architecture/index|Architecture Overview]]\n\n## Patterns\n*Add design patterns and abstractions here*\n\n## Mental Models\n*Add key mental models for understanding the system*\n\n---\n> Use template: [[_templates/concept|Concept Template]]\n`,\n\n 'moc-components': `---\ntitle: Components\ntype: technical\nstatus: active\ntags: [moc, components]\ncreated: {{date}}\n---\n\n# Components\n\nReusable components and utilities for {{projectName}}.\n\n## UI Components\n*Add UI components here*\n\n## Utilities\n*Add utility functions and helpers*\n\n## Shared Libraries\n*Add shared code libraries*\n\n---\n> Use template: [[_templates/technical|Technical Template]]\n`,\n\n 'moc-services': `---\ntitle: Services\ntype: service\nstatus: active\ntags: [moc, services]\ncreated: {{date}}\n---\n\n# Services\n\nBackend services and APIs for {{projectName}}.\n\n## API Services\n*Add API service documentation*\n\n## Background Workers\n*Add worker/job documentation*\n\n## External Services\n*Add third-party service integrations*\n\n---\n> Use template: [[_templates/service|Service Template]]\n`,\n\n 'moc-features': `---\ntitle: Features\ntype: feature\nstatus: active\ntags: [moc, features]\ncreated: {{date}}\n---\n\n# Features\n\nProduct features and capabilities for {{projectName}}.\n\n## Core Features\n*Add core feature documentation*\n\n## Advanced Features\n*Add advanced feature documentation*\n\n## Upcoming Features\n*Add planned features*\n\n---\n> Use template: [[_templates/feature|Feature Template]]\n`,\n\n 'moc-integrations': `---\ntitle: Integrations\ntype: integration\nstatus: active\ntags: [moc, integrations]\ncreated: {{date}}\n---\n\n# Integrations\n\nExternal integrations and third-party services for {{projectName}}.\n\n## Databases\n*Add database integrations*\n\n## Authentication\n*Add auth provider integrations*\n\n## Storage\n*Add storage integrations*\n\n## Monitoring\n*Add monitoring/observability integrations*\n\n---\n> Use template: [[_templates/technical|Technical Template]]\n`,\n\n 'moc-standards': `---\ntitle: Standards\ntype: standard\nstatus: active\ntags: [moc, standards]\ncreated: {{date}}\n---\n\n# Standards\n\nCoding standards and conventions for {{projectName}}.\n\n## Coding Standards\n*Add coding style guides*\n\n## Programming Languages\n{{#each languages}}\n- [[standards/programming-languages/{{this}}|{{this}}]]\n{{/each}}\n\n## Build Tools\n*Add build tool documentation*\n\n---\n> See also: [[PRIMITIVES|Technology Primitives]]\n`,\n\n 'moc-guides': `---\ntitle: Guides\ntype: guide\nstatus: active\ntags: [moc, guides]\ncreated: {{date}}\n---\n\n# Guides\n\nHow-to guides and tutorials for {{projectName}}.\n\n## Getting Started\n- [[guides/getting-started/index|Getting Started Guide]]\n\n## Testing\n*Add testing guides*\n\n## Deployment\n*Add deployment guides*\n\n## Troubleshooting\n*Add troubleshooting guides*\n\n---\n> Use template: [[_templates/guide|Guide Template]]\n`,\n\n 'moc-references': `---\ntitle: References\ntype: technical\nstatus: active\ntags: [moc, references]\ncreated: {{date}}\n---\n\n# References\n\nAPI and CLI references for {{projectName}}.\n\n## API Reference\n*Add API documentation*\n\n## CLI Reference\n*Add CLI documentation*\n\n## Configuration Reference\n*Add configuration options*\n\n---\n> See also: [[PRIMITIVES|Technology Primitives]]\n`,\n\n 'template-concept': `---\ntitle: {{title}}\ntype: concept\nstatus: draft\ntags: [concept]\ncreated: {{date}}\nupdated: {{date}}\n---\n\n# {{title}}\n\n## Overview\n\nBrief description of this concept.\n\n## Key Ideas\n\n- Point 1\n- Point 2\n- Point 3\n\n## Related Concepts\n\n- [[related-concept-1]]\n- [[related-concept-2]]\n\n## References\n\n- External reference 1\n- External reference 2\n`,\n\n 'template-technical': `---\ntitle: {{title}}\ntype: technical\nstatus: draft\ntags: [technical]\ncreated: {{date}}\nupdated: {{date}}\n---\n\n# {{title}}\n\n## Overview\n\nBrief description of this technical component.\n\n## Implementation\n\n\\`\\`\\`typescript\n// Code example\n\\`\\`\\`\n\n## Usage\n\nHow to use this component.\n\n## Configuration\n\nAvailable configuration options.\n\n## Related\n\n- [[related-technical-1]]\n`,\n\n 'template-feature': `---\ntitle: {{title}}\ntype: feature\nstatus: draft\ntags: [feature]\ncreated: {{date}}\nupdated: {{date}}\n---\n\n# {{title}}\n\n## Overview\n\nBrief description of this feature.\n\n## User Story\n\nAs a [user type], I want [goal] so that [benefit].\n\n## Acceptance Criteria\n\n- [ ] Criterion 1\n- [ ] Criterion 2\n- [ ] Criterion 3\n\n## Technical Implementation\n\nHow this feature is implemented.\n\n## Related Features\n\n- [[related-feature-1]]\n`,\n\n 'template-service': `---\ntitle: {{title}}\ntype: service\nstatus: draft\ntags: [service, api]\ncreated: {{date}}\nupdated: {{date}}\n---\n\n# {{title}}\n\n## Overview\n\nBrief description of this service.\n\n## Endpoints\n\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /api/... | Description |\n| POST | /api/... | Description |\n\n## Configuration\n\nEnvironment variables and configuration options.\n\n## Dependencies\n\n- [[dependency-1]]\n- [[dependency-2]]\n\n## Deployment\n\nDeployment instructions.\n`,\n\n 'template-guide': `---\ntitle: {{title}}\ntype: guide\nstatus: draft\ntags: [guide, tutorial]\ncreated: {{date}}\nupdated: {{date}}\n---\n\n# {{title}}\n\n## Prerequisites\n\n- Prerequisite 1\n- Prerequisite 2\n\n## Steps\n\n### Step 1: Title\n\nInstructions for step 1.\n\n### Step 2: Title\n\nInstructions for step 2.\n\n### Step 3: Title\n\nInstructions for step 3.\n\n## Troubleshooting\n\nCommon issues and solutions.\n\n## Next Steps\n\n- [[next-guide-1]]\n- [[next-guide-2]]\n`,\n\n // Subdirectory MOC templates\n 'moc-concepts-architecture': `---\ntitle: Architecture Concepts\ntype: concept\nstatus: active\ntags: [moc, concepts, architecture]\ncreated: {{date}}\n---\n\n# Architecture Concepts\n\nSystem architecture and design patterns for {{projectName}}.\n\n## Overview\n*Document high-level system architecture*\n\n## System Design\n*Add system design documents*\n\n## Decision Records\n*Architecture Decision Records (ADRs)*\n\n---\n> Parent: [[concepts/_MOC|Concepts Index]]\n`,\n\n 'moc-concepts-patterns': `---\ntitle: Design Patterns\ntype: concept\nstatus: active\ntags: [moc, concepts, patterns]\ncreated: {{date}}\n---\n\n# Design Patterns\n\nDesign patterns and abstractions used in {{projectName}}.\n\n## Creational Patterns\n*Factory, Builder, Singleton, etc.*\n\n## Structural Patterns\n*Adapter, Decorator, Facade, etc.*\n\n## Behavioral Patterns\n*Observer, Strategy, Command, etc.*\n\n---\n> Parent: [[concepts/_MOC|Concepts Index]]\n`,\n\n 'moc-components-ui': `---\ntitle: UI Components\ntype: technical\nstatus: active\ntags: [moc, components, ui]\ncreated: {{date}}\n---\n\n# UI Components\n\nUser interface components for {{projectName}}.\n\n## Layout Components\n*Headers, footers, sidebars, grids*\n\n## Form Components\n*Inputs, buttons, selects, checkboxes*\n\n## Display Components\n*Cards, modals, tooltips, alerts*\n\n## Navigation Components\n*Menus, tabs, breadcrumbs*\n\n---\n> Parent: [[components/_MOC|Components Index]]\n`,\n\n 'moc-components-utilities': `---\ntitle: Utility Components\ntype: technical\nstatus: active\ntags: [moc, components, utilities]\ncreated: {{date}}\n---\n\n# Utility Components\n\nReusable utility functions and helpers for {{projectName}}.\n\n## String Utilities\n*Formatting, validation, transformation*\n\n## Date Utilities\n*Parsing, formatting, calculations*\n\n## Data Utilities\n*Transformation, validation, filtering*\n\n## Hook Utilities\n*Custom React/Vue hooks*\n\n---\n> Parent: [[components/_MOC|Components Index]]\n`,\n\n 'moc-services-api': `---\ntitle: API Services\ntype: service\nstatus: active\ntags: [moc, services, api]\ncreated: {{date}}\n---\n\n# API Services\n\nBackend API services for {{projectName}}.\n\n## REST Endpoints\n*Document REST API endpoints*\n\n## GraphQL Schema\n*GraphQL types and resolvers*\n\n## Authentication\n*Auth middleware and flows*\n\n## Rate Limiting\n*Rate limiting and throttling*\n\n---\n> Parent: [[services/_MOC|Services Index]]\n`,\n\n 'moc-services-workers': `---\ntitle: Worker Services\ntype: service\nstatus: active\ntags: [moc, services, workers]\ncreated: {{date}}\n---\n\n# Worker Services\n\nBackground workers and job processors for {{projectName}}.\n\n## Job Queues\n*Queue processors and handlers*\n\n## Scheduled Tasks\n*Cron jobs and scheduled operations*\n\n## Event Handlers\n*Event-driven workers*\n\n---\n> Parent: [[services/_MOC|Services Index]]\n`,\n\n 'moc-features-core': `---\ntitle: Core Features\ntype: feature\nstatus: active\ntags: [moc, features, core]\ncreated: {{date}}\n---\n\n# Core Features\n\nEssential features that define {{projectName}}.\n\n## Primary Features\n*Main user-facing functionality*\n\n## MVP Features\n*Minimum viable product scope*\n\n---\n> Parent: [[features/_MOC|Features Index]]\n`,\n\n 'moc-features-advanced': `---\ntitle: Advanced Features\ntype: feature\nstatus: active\ntags: [moc, features, advanced]\ncreated: {{date}}\n---\n\n# Advanced Features\n\nAdvanced and power-user features for {{projectName}}.\n\n## Power User Features\n*Features for advanced users*\n\n## Extensibility\n*Plugin and extension capabilities*\n\n## Automation\n*Automated workflows and scripting*\n\n---\n> Parent: [[features/_MOC|Features Index]]\n`,\n\n 'moc-integrations-databases': `---\ntitle: Database Integrations\ntype: integration\nstatus: active\ntags: [moc, integrations, databases]\ncreated: {{date}}\n---\n\n# Database Integrations\n\nDatabase connections and ORMs for {{projectName}}.\n\n## Primary Database\n*Main data store configuration*\n\n## Caching Layer\n*Redis, Memcached, etc.*\n\n## Search Index\n*Elasticsearch, Algolia, etc.*\n\n---\n> Parent: [[integrations/_MOC|Integrations Index]]\n`,\n\n 'moc-integrations-auth': `---\ntitle: Authentication Providers\ntype: integration\nstatus: active\ntags: [moc, integrations, auth]\ncreated: {{date}}\n---\n\n# Authentication Providers\n\nAuthentication and identity providers for {{projectName}}.\n\n## OAuth Providers\n*Google, GitHub, etc.*\n\n## SSO Integration\n*SAML, OIDC configurations*\n\n## API Keys\n*API key management*\n\n---\n> Parent: [[integrations/_MOC|Integrations Index]]\n`,\n\n 'moc-integrations-storage': `---\ntitle: Storage Integrations\ntype: integration\nstatus: active\ntags: [moc, integrations, storage]\ncreated: {{date}}\n---\n\n# Storage Integrations\n\nFile and object storage for {{projectName}}.\n\n## Cloud Storage\n*S3, GCS, Azure Blob*\n\n## CDN\n*Content delivery networks*\n\n## Local Storage\n*File system storage*\n\n---\n> Parent: [[integrations/_MOC|Integrations Index]]\n`,\n\n 'moc-integrations-monitoring': `---\ntitle: Monitoring Integrations\ntype: integration\nstatus: active\ntags: [moc, integrations, monitoring]\ncreated: {{date}}\n---\n\n# Monitoring Integrations\n\nObservability and monitoring for {{projectName}}.\n\n## Logging\n*Structured logging setup*\n\n## Metrics\n*Application metrics and dashboards*\n\n## Alerting\n*Alert rules and notifications*\n\n## Tracing\n*Distributed tracing*\n\n---\n> Parent: [[integrations/_MOC|Integrations Index]]\n`,\n\n 'moc-standards-coding': `---\ntitle: Coding Standards\ntype: standard\nstatus: active\ntags: [moc, standards, coding]\ncreated: {{date}}\n---\n\n# Coding Standards\n\nCode style and conventions for {{projectName}}.\n\n## Style Guide\n*Formatting and naming conventions*\n\n## Linting Rules\n*ESLint, Prettier configuration*\n\n## Code Review Guidelines\n*PR review checklist*\n\n---\n> Parent: [[standards/_MOC|Standards Index]]\n`,\n\n 'moc-standards-languages': `---\ntitle: Programming Languages\ntype: standard\nstatus: active\ntags: [moc, standards, languages]\ncreated: {{date}}\n---\n\n# Programming Languages\n\nLanguage choices and configurations for {{projectName}}.\n\n## TypeScript\n*TypeScript configuration and patterns*\n\n## JavaScript\n*JavaScript standards and ES features*\n\n## Other Languages\n*Additional language documentation*\n\n---\n> Parent: [[standards/_MOC|Standards Index]]\n`,\n\n 'moc-standards-build': `---\ntitle: Build Tools\ntype: standard\nstatus: active\ntags: [moc, standards, build]\ncreated: {{date}}\n---\n\n# Build Tools\n\nBuild and bundling configuration for {{projectName}}.\n\n## Bundler\n*Vite, Webpack, Rollup configuration*\n\n## Compilation\n*TypeScript, Babel setup*\n\n## Build Scripts\n*npm scripts and build commands*\n\n---\n> Parent: [[standards/_MOC|Standards Index]]\n`,\n\n 'moc-guides-getting-started': `---\ntitle: Getting Started\ntype: guide\nstatus: active\ntags: [moc, guides, getting-started]\ncreated: {{date}}\n---\n\n# Getting Started\n\nQuick start guides for {{projectName}}.\n\n## Installation\n*Setup and installation steps*\n\n## Configuration\n*Initial configuration guide*\n\n## First Steps\n*Your first project walkthrough*\n\n---\n> Parent: [[guides/_MOC|Guides Index]]\n`,\n\n 'moc-guides-testing': `---\ntitle: Testing Guides\ntype: guide\nstatus: active\ntags: [moc, guides, testing]\ncreated: {{date}}\n---\n\n# Testing Guides\n\nTesting strategies and guides for {{projectName}}.\n\n## Unit Testing\n*Component and function tests*\n\n## Integration Testing\n*API and service tests*\n\n## E2E Testing\n*End-to-end test guides*\n\n---\n> Parent: [[guides/_MOC|Guides Index]]\n`,\n\n 'moc-guides-deployment': `---\ntitle: Deployment Guides\ntype: guide\nstatus: active\ntags: [moc, guides, deployment]\ncreated: {{date}}\n---\n\n# Deployment Guides\n\nDeployment and operations guides for {{projectName}}.\n\n## Local Development\n*Local environment setup*\n\n## Staging\n*Staging environment deployment*\n\n## Production\n*Production deployment checklist*\n\n---\n> Parent: [[guides/_MOC|Guides Index]]\n`,\n\n 'moc-references-api': `---\ntitle: API Reference\ntype: reference\nstatus: active\ntags: [moc, references, api]\ncreated: {{date}}\n---\n\n# API Reference\n\nAPI documentation for {{projectName}}.\n\n## REST API\n*Endpoint documentation*\n\n## GraphQL\n*Schema and query reference*\n\n## SDK\n*Client library documentation*\n\n---\n> Parent: [[references/_MOC|References Index]]\n`,\n\n 'moc-references-cli': `---\ntitle: CLI Reference\ntype: reference\nstatus: active\ntags: [moc, references, cli]\ncreated: {{date}}\n---\n\n# CLI Reference\n\nCommand line interface documentation for {{projectName}}.\n\n## Commands\n*Available CLI commands*\n\n## Options\n*Global and command options*\n\n## Configuration\n*CLI configuration files*\n\n---\n> Parent: [[references/_MOC|References Index]]\n`,\n};\n\n/**\n * Framework detection result\n */\ninterface FrameworkInfo {\n name: string;\n slug: string;\n category: string;\n version?: string;\n}\n\n/**\n * Initialize docs directory\n */\nexport async function initDocs(options: DocsInitOptions): Promise<DocsInitResult> {\n const result: DocsInitResult = {\n success: true,\n docsPath: '',\n filesCreated: [],\n errors: [],\n };\n\n try {\n const { projectRoot, docsPath = 'docs', includeExamples = true, detectFramework = true } = options;\n const fullDocsPath = join(projectRoot, docsPath);\n result.docsPath = fullDocsPath;\n\n // Detect project information\n const projectName = await detectProjectName(projectRoot);\n const frameworks = detectFramework ? await detectFrameworks(projectRoot) : [];\n const languages = detectFramework ? await detectLanguages(projectRoot) : [];\n const dependencies = detectFramework ? await detectDependencies(projectRoot) : [];\n\n // Create template context\n const context = {\n projectName,\n date: new Date().toISOString().split('T')[0],\n frameworks,\n languages,\n dependencies,\n concepts: [],\n components: [],\n services: [],\n features: [],\n };\n\n // Create directories\n for (const dir of DEFAULT_STRUCTURE.directories) {\n const dirPath = join(fullDocsPath, dir);\n if (!existsSync(dirPath)) {\n mkdirSync(dirPath, { recursive: true });\n result.filesCreated.push(dirPath);\n }\n }\n\n // Create files from templates\n for (const [filePath, templateName] of Object.entries(DEFAULT_STRUCTURE.files)) {\n const fullPath = join(fullDocsPath, filePath);\n\n // Skip if file exists\n if (existsSync(fullPath)) {\n continue;\n }\n\n // Get template and compile\n const template = TEMPLATES[templateName];\n if (!template) {\n result.errors.push(`Template not found: ${templateName}`);\n continue;\n }\n\n try {\n const compiled = Handlebars.compile(template);\n const content = compiled(context);\n writeFileSync(fullPath, content, 'utf-8');\n result.filesCreated.push(fullPath);\n } catch (error) {\n result.errors.push(`Failed to create ${filePath}: ${error}`);\n }\n }\n\n // Create example files if requested\n if (includeExamples) {\n await createExampleFiles(fullDocsPath, context, result);\n }\n\n // Create .obsidian folder for vault detection\n const obsidianPath = join(fullDocsPath, '.obsidian');\n if (!existsSync(obsidianPath)) {\n mkdirSync(obsidianPath, { recursive: true });\n\n // Create minimal app.json for Obsidian\n const appJson = {\n \"legacyEditor\": false,\n \"livePreview\": true,\n };\n writeFileSync(join(obsidianPath, 'app.json'), JSON.stringify(appJson, null, 2));\n result.filesCreated.push(obsidianPath);\n }\n\n result.success = result.errors.length === 0;\n } catch (error) {\n result.success = false;\n result.errors.push(`Init failed: ${error}`);\n }\n\n return result;\n}\n\n/**\n * Detect project name from package.json or directory\n */\nasync function detectProjectName(projectRoot: string): Promise<string> {\n try {\n const pkgPath = join(projectRoot, 'package.json');\n if (existsSync(pkgPath)) {\n const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));\n if (pkg.name) {\n // Remove scope if present\n return pkg.name.replace(/^@[^/]+\\//, '');\n }\n }\n } catch {\n // Ignore errors\n }\n\n // Fall back to directory name\n return basename(projectRoot);\n}\n\n/**\n * Detect frameworks from project files\n */\nasync function detectFrameworks(projectRoot: string): Promise<FrameworkInfo[]> {\n const frameworks: FrameworkInfo[] = [];\n\n try {\n const pkgPath = join(projectRoot, 'package.json');\n if (existsSync(pkgPath)) {\n const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));\n const deps = { ...pkg.dependencies, ...pkg.devDependencies };\n\n // Framework detection patterns\n const patterns: Array<{ name: string; packages: string[]; category: string }> = [\n { name: 'React', packages: ['react'], category: 'components/ui' },\n { name: 'Next.js', packages: ['next'], category: 'services/api' },\n { name: 'Vue', packages: ['vue'], category: 'components/ui' },\n { name: 'Express', packages: ['express'], category: 'services/api' },\n { name: 'Fastify', packages: ['fastify'], category: 'services/api' },\n { name: 'Prisma', packages: ['@prisma/client', 'prisma'], category: 'integrations/databases' },\n { name: 'TypeORM', packages: ['typeorm'], category: 'integrations/databases' },\n { name: 'Jest', packages: ['jest'], category: 'guides/testing' },\n { name: 'Vitest', packages: ['vitest'], category: 'guides/testing' },\n { name: 'Vite', packages: ['vite'], category: 'standards/build-tools' },\n { name: 'Webpack', packages: ['webpack'], category: 'standards/build-tools' },\n ];\n\n for (const pattern of patterns) {\n for (const pkg of pattern.packages) {\n if (deps[pkg]) {\n frameworks.push({\n name: pattern.name,\n slug: pattern.name.toLowerCase().replace(/[^a-z0-9]+/g, '-'),\n category: pattern.category,\n version: deps[pkg],\n });\n break;\n }\n }\n }\n }\n } catch {\n // Ignore errors\n }\n\n return frameworks;\n}\n\n/**\n * Detect programming languages used\n */\nasync function detectLanguages(projectRoot: string): Promise<string[]> {\n const languages: Set<string> = new Set();\n\n try {\n // Check for TypeScript\n if (existsSync(join(projectRoot, 'tsconfig.json'))) {\n languages.add('typescript');\n }\n\n // Check for package.json (JavaScript/Node.js)\n if (existsSync(join(projectRoot, 'package.json'))) {\n languages.add('javascript');\n }\n\n // Check for Python\n if (existsSync(join(projectRoot, 'requirements.txt')) ||\n existsSync(join(projectRoot, 'pyproject.toml'))) {\n languages.add('python');\n }\n\n // Check for Rust\n if (existsSync(join(projectRoot, 'Cargo.toml'))) {\n languages.add('rust');\n }\n\n // Check for Go\n if (existsSync(join(projectRoot, 'go.mod'))) {\n languages.add('go');\n }\n } catch {\n // Ignore errors\n }\n\n return Array.from(languages);\n}\n\n/**\n * Detect major dependencies\n */\nasync function detectDependencies(projectRoot: string): Promise<Array<{ name: string; slug: string; category: string; description: string }>> {\n const deps: Array<{ name: string; slug: string; category: string; description: string }> = [];\n\n try {\n const pkgPath = join(projectRoot, 'package.json');\n if (existsSync(pkgPath)) {\n const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));\n const allDeps = { ...pkg.dependencies };\n\n // Top dependencies to document\n const topDeps = Object.keys(allDeps).slice(0, 10);\n\n for (const dep of topDeps) {\n deps.push({\n name: dep,\n slug: dep.replace(/^@/, '').replace(/[^a-z0-9]+/g, '-'),\n category: 'components/utilities',\n description: `Version ${allDeps[dep]}`,\n });\n }\n }\n } catch {\n // Ignore errors\n }\n\n return deps;\n}\n\n/**\n * Create example documentation files\n */\nasync function createExampleFiles(\n docsPath: string,\n context: Record<string, unknown>,\n result: DocsInitResult\n): Promise<void> {\n const examples = [\n {\n path: 'guides/getting-started/index.md',\n content: `---\ntitle: Getting Started\ntype: guide\nstatus: active\ntags: [guide, getting-started]\ncreated: ${context.date}\nupdated: ${context.date}\n---\n\n# Getting Started with ${context.projectName}\n\nWelcome! This guide will help you get up and running.\n\n## Prerequisites\n\n- Node.js 20+\n- npm or bun\n\n## Installation\n\n\\`\\`\\`bash\nnpm install\n\\`\\`\\`\n\n## Quick Start\n\n1. Clone the repository\n2. Install dependencies\n3. Run the development server\n\n## Next Steps\n\n- Explore the [[MOC|Map of Content]]\n- Review [[PRIMITIVES|Technology Primitives]]\n`,\n },\n {\n path: 'concepts/architecture/index.md',\n content: `---\ntitle: Architecture Overview\ntype: concept\nstatus: active\ntags: [architecture, concept]\ncreated: ${context.date}\nupdated: ${context.date}\n---\n\n# Architecture Overview\n\nHigh-level architecture of ${context.projectName}.\n\n## System Diagram\n\n\\`\\`\\`\n┌──────────────┐ ┌──────────────┐\n│ Frontend │────▶│ Backend │\n└──────────────┘ └──────────────┘\n │\n ┌──────▼──────┐\n │ Database │\n └─────────────┘\n\\`\\`\\`\n\n## Key Components\n\n- **Frontend**: User interface\n- **Backend**: API and business logic\n- **Database**: Data persistence\n\n## Design Principles\n\n1. Separation of concerns\n2. Single responsibility\n3. Dependency injection\n`,\n },\n ];\n\n for (const example of examples) {\n const fullPath = join(docsPath, example.path);\n if (!existsSync(fullPath)) {\n const dir = join(fullPath, '..');\n if (!existsSync(dir)) {\n mkdirSync(dir, { recursive: true });\n }\n writeFileSync(fullPath, example.content, 'utf-8');\n result.filesCreated.push(fullPath);\n }\n }\n}\n\n/**\n * Check if docs directory exists\n */\nexport function docsExist(projectRoot: string, docsPath = 'docs'): boolean {\n return existsSync(join(projectRoot, docsPath));\n}\n\n/**\n * Get docs path for a project\n */\nexport function getDocsPath(projectRoot: string): string | null {\n const possiblePaths = ['docs', 'documentation', 'doc', 'wiki'];\n\n for (const path of possiblePaths) {\n const fullPath = join(projectRoot, path);\n if (existsSync(fullPath)) {\n return fullPath;\n }\n }\n\n return null;\n}\n"],"names":["pkg"],"mappings":";;;AA0BA,MAAM,oBAAoB;AAAA,EACxB,aAAa;AAAA;AAAA,IAEX;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAGA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAGA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAGA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAGA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAGA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAGA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAGA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAGA;AAAA,IACA;AAAA,EAAA;AAAA,EAEF,OAAO;AAAA;AAAA,IAEL,aAAa;AAAA,IACb,iBAAiB;AAAA,IACjB,UAAU;AAAA;A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AAA;AAAA,IAAA;AAAA,IA2BxC;AAAA,MACE,MAAM;AAAA,MACN,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA,WAKJ,QAAQ,IAAI;AAAA,WACZ,QAAQ,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA,6BAKM,QAAQ,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAA;AAAA,EA0B5C;AAGF,aAAW,WAAW,UAAU;AAC9B,UAAM,WAAW,KAAK,UAAU,QAAQ,IAAI;AAC5C,QAAI,CAAC,WAAW,QAAQ,GAAG;AACzB,YAAM,MAAM,KAAK,UAAU,IAAI;AAC/B,UAAI,CAAC,WAAW,GAAG,GAAG;AACpB,kBAAU,KAAK,EAAE,WAAW,KAAA,CAAM;AAAA,MACpC;AACA,oBAAc,UAAU,QAAQ,SAAS,OAAO;AAChD,aAAO,aAAa,KAAK,QAAQ;AAAA,IACnC;AAAA,EACF;AACF;AAKO,SAAS,UAAU,aAAqB,WAAW,QAAiB;AACzE,SAAO,WAAW,KAAK,aAAa,QAAQ,CAAC;AAC/C;AAKO,SAAS,YAAY,aAAoC;AAC9D,QAAM,gBAAgB,CAAC,QAAQ,iBAAiB,OAAO,MAAM;AAE7D,aAAW,QAAQ,eAAe;AAChC,UAAM,WAAW,KAAK,aAAa,IAAI;AACvC,QAAI,WAAW,QAAQ,GAAG;AACxB,aAAO;AAAA,IACT;AAAA,EACF;AAEA,SAAO;AACT;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as dist } from "../../../../_virtual/
|
|
1
|
+
import { __exports as dist } from "../../../../_virtual/index5.js";
|
|
2
2
|
import { __require as requireAstSpec } from "./generated/ast-spec.js";
|
|
3
3
|
import { __require as requireLib } from "./lib.js";
|
|
4
4
|
import { __require as requireParserOptions } from "./parser-options.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as dist } from "../../../../_virtual/
|
|
1
|
+
import { __exports as dist } from "../../../../_virtual/index6.js";
|
|
2
2
|
import { __require as requireGetKeys } from "./get-keys.js";
|
|
3
3
|
import { __require as requireVisitorKeys } from "./visitor-keys.js";
|
|
4
4
|
var hasRequiredDist;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weavelogic/knowledge-graph-agent",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.5",
|
|
4
4
|
"description": "Knowledge graph agent for Claude Code - generates knowledge graphs, initializes docs, and integrates with claude-flow",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|