@weavelogic/knowledge-graph-agent 0.1.0 → 0.3.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.
- package/README.md +733 -152
- package/dist/_virtual/_commonjsHelpers.js +7 -0
- package/dist/_virtual/_commonjsHelpers.js.map +1 -0
- package/dist/_virtual/additionalItems.js +5 -0
- package/dist/_virtual/additionalItems.js.map +1 -0
- package/dist/_virtual/additionalProperties.js +5 -0
- package/dist/_virtual/additionalProperties.js.map +1 -0
- package/dist/_virtual/ajv.js +6 -0
- package/dist/_virtual/ajv.js.map +1 -0
- package/dist/_virtual/ajv2.js +5 -0
- package/dist/_virtual/ajv2.js.map +1 -0
- package/dist/_virtual/allOf.js +5 -0
- package/dist/_virtual/allOf.js.map +1 -0
- package/dist/_virtual/anyOf.js +5 -0
- package/dist/_virtual/anyOf.js.map +1 -0
- package/dist/_virtual/applicability.js +5 -0
- package/dist/_virtual/applicability.js.map +1 -0
- package/dist/_virtual/boolSchema.js +5 -0
- package/dist/_virtual/boolSchema.js.map +1 -0
- package/dist/_virtual/code.js +5 -0
- package/dist/_virtual/code.js.map +1 -0
- package/dist/_virtual/code2.js +5 -0
- package/dist/_virtual/code2.js.map +1 -0
- package/dist/_virtual/const.js +5 -0
- package/dist/_virtual/const.js.map +1 -0
- package/dist/_virtual/contains.js +5 -0
- package/dist/_virtual/contains.js.map +1 -0
- package/dist/_virtual/core.js +5 -0
- package/dist/_virtual/core.js.map +1 -0
- package/dist/_virtual/dataType.js +5 -0
- package/dist/_virtual/dataType.js.map +1 -0
- package/dist/_virtual/defaults.js +5 -0
- package/dist/_virtual/defaults.js.map +1 -0
- package/dist/_virtual/dependencies.js +5 -0
- package/dist/_virtual/dependencies.js.map +1 -0
- package/dist/_virtual/draft7.js +5 -0
- package/dist/_virtual/draft7.js.map +1 -0
- package/dist/_virtual/enum.js +5 -0
- package/dist/_virtual/enum.js.map +1 -0
- package/dist/_virtual/equal.js +5 -0
- package/dist/_virtual/equal.js.map +1 -0
- package/dist/_virtual/errors.js +5 -0
- package/dist/_virtual/errors.js.map +1 -0
- package/dist/_virtual/format.js +5 -0
- package/dist/_virtual/format.js.map +1 -0
- package/dist/_virtual/formats.js +5 -0
- package/dist/_virtual/formats.js.map +1 -0
- package/dist/_virtual/id.js +5 -0
- package/dist/_virtual/id.js.map +1 -0
- package/dist/_virtual/if.js +5 -0
- package/dist/_virtual/if.js.map +1 -0
- package/dist/_virtual/index.js +8 -0
- package/dist/_virtual/index.js.map +1 -0
- package/dist/_virtual/index10.js +5 -0
- package/dist/_virtual/index10.js.map +1 -0
- package/dist/_virtual/index11.js +5 -0
- package/dist/_virtual/index11.js.map +1 -0
- package/dist/_virtual/index12.js +5 -0
- package/dist/_virtual/index12.js.map +1 -0
- package/dist/_virtual/index2.js +5 -0
- package/dist/_virtual/index2.js.map +1 -0
- package/dist/_virtual/index3.js +5 -0
- package/dist/_virtual/index3.js.map +1 -0
- package/dist/_virtual/index4.js +5 -0
- package/dist/_virtual/index4.js.map +1 -0
- package/dist/_virtual/index5.js +5 -0
- package/dist/_virtual/index5.js.map +1 -0
- package/dist/_virtual/index6.js +5 -0
- package/dist/_virtual/index6.js.map +1 -0
- package/dist/_virtual/index7.js +5 -0
- package/dist/_virtual/index7.js.map +1 -0
- package/dist/_virtual/index8.js +5 -0
- package/dist/_virtual/index8.js.map +1 -0
- package/dist/_virtual/index9.js +5 -0
- package/dist/_virtual/index9.js.map +1 -0
- package/dist/_virtual/items.js +5 -0
- package/dist/_virtual/items.js.map +1 -0
- package/dist/_virtual/items2020.js +5 -0
- package/dist/_virtual/items2020.js.map +1 -0
- package/dist/_virtual/keyword.js +5 -0
- package/dist/_virtual/keyword.js.map +1 -0
- package/dist/_virtual/limit.js +5 -0
- package/dist/_virtual/limit.js.map +1 -0
- package/dist/_virtual/limitItems.js +5 -0
- package/dist/_virtual/limitItems.js.map +1 -0
- package/dist/_virtual/limitLength.js +5 -0
- package/dist/_virtual/limitLength.js.map +1 -0
- package/dist/_virtual/limitNumber.js +5 -0
- package/dist/_virtual/limitNumber.js.map +1 -0
- package/dist/_virtual/limitProperties.js +5 -0
- package/dist/_virtual/limitProperties.js.map +1 -0
- package/dist/_virtual/metadata.js +5 -0
- package/dist/_virtual/metadata.js.map +1 -0
- package/dist/_virtual/multipleOf.js +5 -0
- package/dist/_virtual/multipleOf.js.map +1 -0
- package/dist/_virtual/names.js +5 -0
- package/dist/_virtual/names.js.map +1 -0
- package/dist/_virtual/not.js +5 -0
- package/dist/_virtual/not.js.map +1 -0
- package/dist/_virtual/oneOf.js +5 -0
- package/dist/_virtual/oneOf.js.map +1 -0
- package/dist/_virtual/pattern.js +5 -0
- package/dist/_virtual/pattern.js.map +1 -0
- package/dist/_virtual/patternProperties.js +5 -0
- package/dist/_virtual/patternProperties.js.map +1 -0
- package/dist/_virtual/prefixItems.js +5 -0
- package/dist/_virtual/prefixItems.js.map +1 -0
- package/dist/_virtual/properties.js +5 -0
- package/dist/_virtual/properties.js.map +1 -0
- package/dist/_virtual/propertyNames.js +5 -0
- package/dist/_virtual/propertyNames.js.map +1 -0
- package/dist/_virtual/ref.js +5 -0
- package/dist/_virtual/ref.js.map +1 -0
- package/dist/_virtual/ref_error.js +5 -0
- package/dist/_virtual/ref_error.js.map +1 -0
- package/dist/_virtual/required.js +5 -0
- package/dist/_virtual/required.js.map +1 -0
- package/dist/_virtual/resolve.js +5 -0
- package/dist/_virtual/resolve.js.map +1 -0
- package/dist/_virtual/rules.js +5 -0
- package/dist/_virtual/rules.js.map +1 -0
- package/dist/_virtual/scope.js +5 -0
- package/dist/_virtual/scope.js.map +1 -0
- package/dist/_virtual/subschema.js +5 -0
- package/dist/_virtual/subschema.js.map +1 -0
- package/dist/_virtual/thenElse.js +5 -0
- package/dist/_virtual/thenElse.js.map +1 -0
- package/dist/_virtual/types.js +5 -0
- package/dist/_virtual/types.js.map +1 -0
- package/dist/_virtual/ucs2length.js +5 -0
- package/dist/_virtual/ucs2length.js.map +1 -0
- package/dist/_virtual/uniqueItems.js +5 -0
- package/dist/_virtual/uniqueItems.js.map +1 -0
- package/dist/_virtual/uri.js +5 -0
- package/dist/_virtual/uri.js.map +1 -0
- package/dist/_virtual/util.js +5 -0
- package/dist/_virtual/util.js.map +1 -0
- package/dist/_virtual/validation_error.js +5 -0
- package/dist/_virtual/validation_error.js.map +1 -0
- package/dist/agents/analyst-agent.d.ts +230 -0
- package/dist/agents/analyst-agent.d.ts.map +1 -0
- package/dist/agents/analyst-agent.js +793 -0
- package/dist/agents/analyst-agent.js.map +1 -0
- package/dist/agents/architect-agent.d.ts +248 -0
- package/dist/agents/architect-agent.d.ts.map +1 -0
- package/dist/agents/architect-agent.js +685 -0
- package/dist/agents/architect-agent.js.map +1 -0
- package/dist/agents/base-agent.d.ts +169 -0
- package/dist/agents/base-agent.d.ts.map +1 -0
- package/dist/agents/base-agent.js +441 -0
- package/dist/agents/base-agent.js.map +1 -0
- package/dist/agents/coder-agent.d.ts +191 -0
- package/dist/agents/coder-agent.d.ts.map +1 -0
- package/dist/agents/coder-agent.js +1008 -0
- package/dist/agents/coder-agent.js.map +1 -0
- package/dist/agents/index.d.ts +18 -0
- package/dist/agents/index.d.ts.map +1 -0
- package/dist/agents/index.js +40 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/agents/registry.d.ts +213 -0
- package/dist/agents/registry.d.ts.map +1 -0
- package/dist/agents/registry.js +419 -0
- package/dist/agents/registry.js.map +1 -0
- package/dist/agents/researcher-agent.d.ts +226 -0
- package/dist/agents/researcher-agent.d.ts.map +1 -0
- package/dist/agents/researcher-agent.js +572 -0
- package/dist/agents/researcher-agent.js.map +1 -0
- package/dist/agents/rules-engine.d.ts +320 -0
- package/dist/agents/rules-engine.d.ts.map +1 -0
- package/dist/agents/rules-engine.js +552 -0
- package/dist/agents/rules-engine.js.map +1 -0
- package/dist/agents/tester-agent.d.ts +219 -0
- package/dist/agents/tester-agent.d.ts.map +1 -0
- package/dist/agents/tester-agent.js +683 -0
- package/dist/agents/tester-agent.js.map +1 -0
- package/dist/agents/types.d.ts +425 -0
- package/dist/agents/types.d.ts.map +1 -0
- package/dist/agents/types.js +57 -0
- package/dist/agents/types.js.map +1 -0
- package/dist/caching/index.d.ts +55 -0
- package/dist/caching/index.d.ts.map +1 -0
- package/dist/caching/index.js +206 -0
- package/dist/caching/index.js.map +1 -0
- package/dist/caching/lru-cache.d.ts +254 -0
- package/dist/caching/lru-cache.d.ts.map +1 -0
- package/dist/caching/types.d.ts +95 -0
- package/dist/caching/types.d.ts.map +1 -0
- package/dist/chunking/chunker.d.ts +94 -0
- package/dist/chunking/chunker.d.ts.map +1 -0
- package/dist/chunking/index.d.ts +125 -0
- package/dist/chunking/index.d.ts.map +1 -0
- package/dist/chunking/index.js +283 -0
- package/dist/chunking/index.js.map +1 -0
- package/dist/chunking/types.d.ts +92 -0
- package/dist/chunking/types.d.ts.map +1 -0
- package/dist/cli/commands/analyze.d.ts +12 -0
- package/dist/cli/commands/analyze.d.ts.map +1 -0
- package/dist/cli/commands/analyze.js +269 -0
- package/dist/cli/commands/analyze.js.map +1 -0
- package/dist/cli/commands/commit.d.ts +11 -0
- package/dist/cli/commands/commit.d.ts.map +1 -0
- package/dist/cli/commands/commit.js +379 -0
- package/dist/cli/commands/commit.js.map +1 -0
- package/dist/cli/commands/config.d.ts +8 -0
- package/dist/cli/commands/config.d.ts.map +1 -0
- package/dist/cli/commands/config.js +107 -0
- package/dist/cli/commands/config.js.map +1 -0
- package/dist/cli/commands/convert.d.ts +15 -0
- package/dist/cli/commands/convert.d.ts.map +1 -0
- package/dist/cli/commands/convert.js +203 -0
- package/dist/cli/commands/convert.js.map +1 -0
- package/dist/cli/commands/cultivate.d.ts +16 -0
- package/dist/cli/commands/cultivate.d.ts.map +1 -0
- package/dist/cli/commands/cultivate.js +254 -0
- package/dist/cli/commands/cultivate.js.map +1 -0
- package/dist/cli/commands/diagnostics.d.ts +8 -0
- package/dist/cli/commands/diagnostics.d.ts.map +1 -0
- package/dist/cli/commands/diagnostics.js +140 -0
- package/dist/cli/commands/diagnostics.js.map +1 -0
- package/dist/cli/commands/generate.d.ts +13 -0
- package/dist/cli/commands/generate.d.ts.map +1 -0
- package/dist/cli/commands/init-primitives.d.ts +19 -0
- package/dist/cli/commands/init-primitives.d.ts.map +1 -0
- package/dist/cli/commands/init-primitives.js +208 -0
- package/dist/cli/commands/init-primitives.js.map +1 -0
- package/dist/cli/commands/sop.d.ts +14 -0
- package/dist/cli/commands/sop.d.ts.map +1 -0
- package/dist/cli/commands/sop.js +598 -0
- package/dist/cli/commands/sop.js.map +1 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +52 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/config/index.d.ts +153 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +141 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/manager.d.ts +136 -0
- package/dist/config/manager.d.ts.map +1 -0
- package/dist/config/types.d.ts +127 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/core/cache.d.ts +185 -0
- package/dist/core/cache.d.ts.map +1 -0
- package/dist/core/cache.js +435 -0
- package/dist/core/cache.js.map +1 -0
- package/dist/cultivation/deep-analyzer.d.ts +129 -0
- package/dist/cultivation/deep-analyzer.d.ts.map +1 -0
- package/dist/cultivation/deep-analyzer.js +322 -0
- package/dist/cultivation/deep-analyzer.js.map +1 -0
- package/dist/cultivation/index.d.ts +13 -0
- package/dist/cultivation/index.d.ts.map +1 -0
- package/dist/cultivation/seed-generator.d.ts +92 -0
- package/dist/cultivation/seed-generator.d.ts.map +1 -0
- package/dist/cultivation/seed-generator.js +1033 -0
- package/dist/cultivation/seed-generator.js.map +1 -0
- package/dist/cultivation/types.d.ts +230 -0
- package/dist/cultivation/types.d.ts.map +1 -0
- package/dist/generators/claude-md.d.ts +7 -0
- package/dist/generators/claude-md.d.ts.map +1 -1
- package/dist/generators/claude-md.js.map +1 -1
- package/dist/generators/docs-analyzer.d.ts +75 -0
- package/dist/generators/docs-analyzer.d.ts.map +1 -0
- package/dist/generators/docs-analyzer.js +567 -0
- package/dist/generators/docs-analyzer.js.map +1 -0
- package/dist/generators/docs-convert.d.ts +91 -0
- package/dist/generators/docs-convert.d.ts.map +1 -0
- package/dist/generators/docs-convert.js +474 -0
- package/dist/generators/docs-convert.js.map +1 -0
- package/dist/generators/docs-init.d.ts +6 -0
- package/dist/generators/docs-init.d.ts.map +1 -1
- package/dist/generators/docs-init.js.map +1 -1
- package/dist/health/checks.d.ts +135 -0
- package/dist/health/checks.d.ts.map +1 -0
- package/dist/health/index.d.ts +119 -0
- package/dist/health/index.d.ts.map +1 -0
- package/dist/health/index.js +191 -0
- package/dist/health/index.js.map +1 -0
- package/dist/health/monitor.d.ts +146 -0
- package/dist/health/monitor.d.ts.map +1 -0
- package/dist/health/types.d.ts +135 -0
- package/dist/health/types.d.ts.map +1 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +179 -1
- package/dist/index.js.map +1 -1
- package/dist/integrations/auto-commit.d.ts +175 -0
- package/dist/integrations/auto-commit.d.ts.map +1 -0
- package/dist/integrations/auto-commit.js +399 -0
- package/dist/integrations/auto-commit.js.map +1 -0
- package/dist/integrations/git.d.ts +299 -0
- package/dist/integrations/git.d.ts.map +1 -0
- package/dist/integrations/git.js +465 -0
- package/dist/integrations/git.js.map +1 -0
- package/dist/mcp-server/bin.d.ts +11 -0
- package/dist/mcp-server/bin.d.ts.map +1 -0
- package/dist/mcp-server/handlers/index.d.ts +57 -0
- package/dist/mcp-server/handlers/index.d.ts.map +1 -0
- package/dist/mcp-server/handlers/index.js +235 -0
- package/dist/mcp-server/handlers/index.js.map +1 -0
- package/dist/mcp-server/index.d.ts +28 -0
- package/dist/mcp-server/index.d.ts.map +1 -0
- package/dist/mcp-server/server.d.ts +133 -0
- package/dist/mcp-server/server.d.ts.map +1 -0
- package/dist/mcp-server/server.js +280 -0
- package/dist/mcp-server/server.js.map +1 -0
- package/dist/mcp-server/tools/agents/index.d.ts +10 -0
- package/dist/mcp-server/tools/agents/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/agents/list.d.ts +19 -0
- package/dist/mcp-server/tools/agents/list.d.ts.map +1 -0
- package/dist/mcp-server/tools/agents/spawn.d.ts +19 -0
- package/dist/mcp-server/tools/agents/spawn.d.ts.map +1 -0
- package/dist/mcp-server/tools/graph/generate.d.ts +21 -0
- package/dist/mcp-server/tools/graph/generate.d.ts.map +1 -0
- package/dist/mcp-server/tools/graph/index.d.ts +11 -0
- package/dist/mcp-server/tools/graph/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/graph/query.d.ts +22 -0
- package/dist/mcp-server/tools/graph/query.d.ts.map +1 -0
- package/dist/mcp-server/tools/graph/stats.d.ts +22 -0
- package/dist/mcp-server/tools/graph/stats.d.ts.map +1 -0
- package/dist/mcp-server/tools/health.d.ts +21 -0
- package/dist/mcp-server/tools/health.d.ts.map +1 -0
- package/dist/mcp-server/tools/index.d.ts +13 -0
- package/dist/mcp-server/tools/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/registry.d.ts +90 -0
- package/dist/mcp-server/tools/registry.d.ts.map +1 -0
- package/dist/mcp-server/tools/registry.js +663 -0
- package/dist/mcp-server/tools/registry.js.map +1 -0
- package/dist/mcp-server/tools/search/index.d.ts +10 -0
- package/dist/mcp-server/tools/search/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/search/nodes.d.ts +22 -0
- package/dist/mcp-server/tools/search/nodes.d.ts.map +1 -0
- package/dist/mcp-server/tools/search/tags.d.ts +22 -0
- package/dist/mcp-server/tools/search/tags.d.ts.map +1 -0
- package/dist/mcp-server/types/index.d.ts +286 -0
- package/dist/mcp-server/types/index.d.ts.map +1 -0
- package/dist/memory/index.d.ts +10 -0
- package/dist/memory/index.d.ts.map +1 -0
- package/dist/memory/vault-sync.d.ts +212 -0
- package/dist/memory/vault-sync.d.ts.map +1 -0
- package/dist/memory/vault-sync.js +463 -0
- package/dist/memory/vault-sync.js.map +1 -0
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js +296 -0
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js.map +1 -0
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js +71 -0
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js.map +1 -0
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js +26 -0
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js.map +1 -0
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js +407 -0
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js.map +1 -0
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js +1332 -0
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js.map +1 -0
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js +71 -0
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js.map +1 -0
- package/dist/node_modules/ajv/dist/ajv.js +84 -0
- package/dist/node_modules/ajv/dist/ajv.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/codegen/code.js +160 -0
- package/dist/node_modules/ajv/dist/compile/codegen/code.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/codegen/index.js +728 -0
- package/dist/node_modules/ajv/dist/compile/codegen/index.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/codegen/scope.js +152 -0
- package/dist/node_modules/ajv/dist/compile/codegen/scope.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/errors.js +131 -0
- package/dist/node_modules/ajv/dist/compile/errors.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/index.js +234 -0
- package/dist/node_modules/ajv/dist/compile/index.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/names.js +44 -0
- package/dist/node_modules/ajv/dist/compile/names.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/ref_error.js +22 -0
- package/dist/node_modules/ajv/dist/compile/ref_error.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/resolve.js +163 -0
- package/dist/node_modules/ajv/dist/compile/resolve.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/rules.js +35 -0
- package/dist/node_modules/ajv/dist/compile/rules.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/util.js +173 -0
- package/dist/node_modules/ajv/dist/compile/util.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/validate/applicability.js +27 -0
- package/dist/node_modules/ajv/dist/compile/validate/applicability.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/validate/boolSchema.js +58 -0
- package/dist/node_modules/ajv/dist/compile/validate/boolSchema.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/validate/dataType.js +193 -0
- package/dist/node_modules/ajv/dist/compile/validate/dataType.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/validate/defaults.js +43 -0
- package/dist/node_modules/ajv/dist/compile/validate/defaults.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/validate/index.js +522 -0
- package/dist/node_modules/ajv/dist/compile/validate/index.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/validate/keyword.js +126 -0
- package/dist/node_modules/ajv/dist/compile/validate/keyword.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/validate/subschema.js +89 -0
- package/dist/node_modules/ajv/dist/compile/validate/subschema.js.map +1 -0
- package/dist/node_modules/ajv/dist/core.js +628 -0
- package/dist/node_modules/ajv/dist/core.js.map +1 -0
- package/dist/node_modules/ajv/dist/refs/data.json.js +24 -0
- package/dist/node_modules/ajv/dist/refs/data.json.js.map +1 -0
- package/dist/node_modules/ajv/dist/refs/json-schema-draft-07.json.js +25 -0
- package/dist/node_modules/ajv/dist/refs/json-schema-draft-07.json.js.map +1 -0
- package/dist/node_modules/ajv/dist/runtime/equal.js +16 -0
- package/dist/node_modules/ajv/dist/runtime/equal.js.map +1 -0
- package/dist/node_modules/ajv/dist/runtime/ucs2length.js +30 -0
- package/dist/node_modules/ajv/dist/runtime/ucs2length.js.map +1 -0
- package/dist/node_modules/ajv/dist/runtime/uri.js +16 -0
- package/dist/node_modules/ajv/dist/runtime/uri.js.map +1 -0
- package/dist/node_modules/ajv/dist/runtime/validation_error.js +20 -0
- package/dist/node_modules/ajv/dist/runtime/validation_error.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +59 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +114 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/allOf.js +32 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +22 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/anyOf.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/contains.js +100 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/contains.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +103 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/if.js +75 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/if.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/index.js +68 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/index.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/items.js +64 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/items.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/items2020.js +43 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/items2020.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/not.js +36 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/not.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +64 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +81 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +22 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/properties.js +66 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/properties.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +49 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +23 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/thenElse.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/code.js +140 -0
- package/dist/node_modules/ajv/dist/vocabularies/code.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/core/id.js +19 -0
- package/dist/node_modules/ajv/dist/vocabularies/core/id.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/core/index.js +27 -0
- package/dist/node_modules/ajv/dist/vocabularies/core/index.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/core/ref.js +132 -0
- package/dist/node_modules/ajv/dist/vocabularies/core/ref.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/discriminator/index.js +114 -0
- package/dist/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/discriminator/types.js +18 -0
- package/dist/node_modules/ajv/dist/vocabularies/discriminator/types.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/draft7.js +31 -0
- package/dist/node_modules/ajv/dist/vocabularies/draft7.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/format/format.js +95 -0
- package/dist/node_modules/ajv/dist/vocabularies/format/format.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/format/index.js +16 -0
- package/dist/node_modules/ajv/dist/vocabularies/format/index.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/metadata.js +27 -0
- package/dist/node_modules/ajv/dist/vocabularies/metadata.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/const.js +36 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/const.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/enum.js +56 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/enum.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/index.js +52 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/index.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitItems.js +34 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitItems.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitLength.js +39 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitLength.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +37 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitNumber.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +34 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +33 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/multipleOf.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/pattern.js +34 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/pattern.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/required.js +89 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/required.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +75 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js.map +1 -0
- package/dist/node_modules/ajv-formats/dist/formats.js +209 -0
- package/dist/node_modules/ajv-formats/dist/formats.js.map +1 -0
- package/dist/node_modules/ajv-formats/dist/index.js +51 -0
- package/dist/node_modules/ajv-formats/dist/index.js.map +1 -0
- package/dist/node_modules/ajv-formats/dist/limit.js +80 -0
- package/dist/node_modules/ajv-formats/dist/limit.js.map +1 -0
- package/dist/node_modules/fast-deep-equal/index.js +39 -0
- package/dist/node_modules/fast-deep-equal/index.js.map +1 -0
- package/dist/node_modules/fast-uri/index.js +261 -0
- package/dist/node_modules/fast-uri/index.js.map +1 -0
- package/dist/node_modules/fast-uri/lib/schemes.js +215 -0
- package/dist/node_modules/fast-uri/lib/schemes.js.map +1 -0
- package/dist/node_modules/fast-uri/lib/utils.js +261 -0
- package/dist/node_modules/fast-uri/lib/utils.js.map +1 -0
- package/dist/node_modules/json-schema-traverse/index.js +92 -0
- package/dist/node_modules/json-schema-traverse/index.js.map +1 -0
- package/dist/node_modules/zod/v4/classic/errors.js +37 -0
- package/dist/node_modules/zod/v4/classic/errors.js.map +1 -0
- package/dist/node_modules/zod/v4/classic/iso.js +43 -0
- package/dist/node_modules/zod/v4/classic/iso.js.map +1 -0
- package/dist/node_modules/zod/v4/classic/parse.js +13 -0
- package/dist/node_modules/zod/v4/classic/parse.js.map +1 -0
- package/dist/node_modules/zod/v4/classic/schemas.js +688 -0
- package/dist/node_modules/zod/v4/classic/schemas.js.map +1 -0
- package/dist/node_modules/zod/v4/core/api.js +492 -0
- package/dist/node_modules/zod/v4/core/api.js.map +1 -0
- package/dist/node_modules/zod/v4/core/checks.js +405 -0
- package/dist/node_modules/zod/v4/core/checks.js.map +1 -0
- package/dist/node_modules/zod/v4/core/core.js +58 -0
- package/dist/node_modules/zod/v4/core/core.js.map +1 -0
- package/dist/node_modules/zod/v4/core/doc.js +38 -0
- package/dist/node_modules/zod/v4/core/doc.js.map +1 -0
- package/dist/node_modules/zod/v4/core/errors.js +82 -0
- package/dist/node_modules/zod/v4/core/errors.js.map +1 -0
- package/dist/node_modules/zod/v4/core/parse.js +60 -0
- package/dist/node_modules/zod/v4/core/parse.js.map +1 -0
- package/dist/node_modules/zod/v4/core/regexes.js +87 -0
- package/dist/node_modules/zod/v4/core/regexes.js.map +1 -0
- package/dist/node_modules/zod/v4/core/registries.js +52 -0
- package/dist/node_modules/zod/v4/core/registries.js.map +1 -0
- package/dist/node_modules/zod/v4/core/schemas.js +1283 -0
- package/dist/node_modules/zod/v4/core/schemas.js.map +1 -0
- package/dist/node_modules/zod/v4/core/util.js +341 -0
- package/dist/node_modules/zod/v4/core/util.js.map +1 -0
- package/dist/node_modules/zod/v4/core/versions.js +9 -0
- package/dist/node_modules/zod/v4/core/versions.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/string.js +2 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/string.js.map +1 -0
- package/dist/reasoning/index.d.ts +74 -0
- package/dist/reasoning/index.d.ts.map +1 -0
- package/dist/reasoning/index.js +124 -0
- package/dist/reasoning/index.js.map +1 -0
- package/dist/reasoning/tracker.d.ts +210 -0
- package/dist/reasoning/tracker.d.ts.map +1 -0
- package/dist/reasoning/types.d.ts +146 -0
- package/dist/reasoning/types.d.ts.map +1 -0
- package/dist/recovery/backup.d.ts +110 -0
- package/dist/recovery/backup.d.ts.map +1 -0
- package/dist/recovery/index.d.ts +70 -0
- package/dist/recovery/index.d.ts.map +1 -0
- package/dist/recovery/index.js +186 -0
- package/dist/recovery/index.js.map +1 -0
- package/dist/recovery/integrity.d.ts +74 -0
- package/dist/recovery/integrity.d.ts.map +1 -0
- package/dist/recovery/types.d.ts +94 -0
- package/dist/recovery/types.d.ts.map +1 -0
- package/dist/services/index.d.ts +130 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +134 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/manager.d.ts +140 -0
- package/dist/services/manager.d.ts.map +1 -0
- package/dist/services/types.d.ts +106 -0
- package/dist/services/types.d.ts.map +1 -0
- package/dist/services/watchers.d.ts +95 -0
- package/dist/services/watchers.d.ts.map +1 -0
- package/dist/sops/compliance-checker.d.ts +83 -0
- package/dist/sops/compliance-checker.d.ts.map +1 -0
- package/dist/sops/compliance-checker.js +399 -0
- package/dist/sops/compliance-checker.js.map +1 -0
- package/dist/sops/gap-analyzer.d.ts +124 -0
- package/dist/sops/gap-analyzer.d.ts.map +1 -0
- package/dist/sops/gap-analyzer.js +313 -0
- package/dist/sops/gap-analyzer.js.map +1 -0
- package/dist/sops/index.d.ts +14 -0
- package/dist/sops/index.d.ts.map +1 -0
- package/dist/sops/overlay-manager.d.ts +115 -0
- package/dist/sops/overlay-manager.d.ts.map +1 -0
- package/dist/sops/overlay-manager.js +394 -0
- package/dist/sops/overlay-manager.js.map +1 -0
- package/dist/sops/registry.d.ts +73 -0
- package/dist/sops/registry.d.ts.map +1 -0
- package/dist/sops/registry.js +919 -0
- package/dist/sops/registry.js.map +1 -0
- package/dist/sops/types.d.ts +377 -0
- package/dist/sops/types.d.ts.map +1 -0
- package/dist/sops/types.js +46 -0
- package/dist/sops/types.js.map +1 -0
- package/dist/utils/error-recovery.d.ts +230 -0
- package/dist/utils/error-recovery.d.ts.map +1 -0
- package/dist/utils/error-recovery.js +228 -0
- package/dist/utils/error-recovery.js.map +1 -0
- package/dist/utils/error-taxonomy.d.ts +149 -0
- package/dist/utils/error-taxonomy.d.ts.map +1 -0
- package/dist/utils/error-taxonomy.js +260 -0
- package/dist/utils/error-taxonomy.js.map +1 -0
- package/dist/utils/index.d.ts +11 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/logger.d.ts +139 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +311 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/workflows/index.d.ts +11 -0
- package/dist/workflows/index.d.ts.map +1 -0
- package/dist/workflows/registry.d.ts +118 -0
- package/dist/workflows/registry.d.ts.map +1 -0
- package/dist/workflows/registry.js +575 -0
- package/dist/workflows/registry.js.map +1 -0
- package/dist/workflows/types.d.ts +322 -0
- package/dist/workflows/types.d.ts.map +1 -0
- package/dist/workflows/types.js +16 -0
- package/dist/workflows/types.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Docs Converter
|
|
3
|
+
*
|
|
4
|
+
* Converts existing documentation to weave-nn structure with proper
|
|
5
|
+
* frontmatter and directory organization.
|
|
6
|
+
*/
|
|
7
|
+
import type { NodeType, NodeStatus } from '../core/types.js';
|
|
8
|
+
/**
|
|
9
|
+
* Conversion options
|
|
10
|
+
*/
|
|
11
|
+
export interface ConvertOptions {
|
|
12
|
+
/** Source directory with existing docs */
|
|
13
|
+
sourceDir: string;
|
|
14
|
+
/** Target directory (default: docs-nn) */
|
|
15
|
+
targetDir?: string;
|
|
16
|
+
/** Project root for path resolution */
|
|
17
|
+
projectRoot: string;
|
|
18
|
+
/** Preserve original files (copy instead of move) */
|
|
19
|
+
preserveOriginal?: boolean;
|
|
20
|
+
/** Overwrite existing files in target */
|
|
21
|
+
force?: boolean;
|
|
22
|
+
/** Auto-categorize based on content analysis */
|
|
23
|
+
autoCategory?: boolean;
|
|
24
|
+
/** Dry run - show what would be done */
|
|
25
|
+
dryRun?: boolean;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Frontmatter options
|
|
29
|
+
*/
|
|
30
|
+
export interface FrontmatterOptions {
|
|
31
|
+
/** Target file or directory */
|
|
32
|
+
target: string;
|
|
33
|
+
/** Project root */
|
|
34
|
+
projectRoot: string;
|
|
35
|
+
/** Override type detection */
|
|
36
|
+
type?: NodeType;
|
|
37
|
+
/** Override status */
|
|
38
|
+
status?: NodeStatus;
|
|
39
|
+
/** Additional tags to add */
|
|
40
|
+
tags?: string[];
|
|
41
|
+
/** Force overwrite existing frontmatter */
|
|
42
|
+
force?: boolean;
|
|
43
|
+
/** Dry run */
|
|
44
|
+
dryRun?: boolean;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Conversion result
|
|
48
|
+
*/
|
|
49
|
+
export interface ConvertResult {
|
|
50
|
+
success: boolean;
|
|
51
|
+
filesProcessed: number;
|
|
52
|
+
filesConverted: number;
|
|
53
|
+
filesSkipped: number;
|
|
54
|
+
errors: string[];
|
|
55
|
+
converted: Array<{
|
|
56
|
+
source: string;
|
|
57
|
+
target: string;
|
|
58
|
+
type: NodeType;
|
|
59
|
+
}>;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Frontmatter result
|
|
63
|
+
*/
|
|
64
|
+
export interface FrontmatterResult {
|
|
65
|
+
success: boolean;
|
|
66
|
+
filesProcessed: number;
|
|
67
|
+
filesUpdated: number;
|
|
68
|
+
filesSkipped: number;
|
|
69
|
+
errors: string[];
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Convert existing docs to weave-nn structure
|
|
73
|
+
*/
|
|
74
|
+
export declare function convertDocs(options: ConvertOptions): Promise<ConvertResult>;
|
|
75
|
+
/**
|
|
76
|
+
* Add or update frontmatter in existing files
|
|
77
|
+
*/
|
|
78
|
+
export declare function addFrontmatter(options: FrontmatterOptions): Promise<FrontmatterResult>;
|
|
79
|
+
/**
|
|
80
|
+
* Validate frontmatter in files
|
|
81
|
+
*/
|
|
82
|
+
export declare function validateFrontmatter(target: string, projectRoot: string): Promise<{
|
|
83
|
+
valid: number;
|
|
84
|
+
invalid: number;
|
|
85
|
+
missing: number;
|
|
86
|
+
issues: Array<{
|
|
87
|
+
file: string;
|
|
88
|
+
issues: string[];
|
|
89
|
+
}>;
|
|
90
|
+
}>;
|
|
91
|
+
//# sourceMappingURL=docs-convert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs-convert.d.ts","sourceRoot":"","sources":["../../src/generators/docs-convert.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAmB,MAAM,kBAAkB,CAAC;AAE9E;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,0CAA0C;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,yCAAyC;IACzC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,gDAAgD;IAChD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,wCAAwC;IACxC,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,+BAA+B;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,mBAAmB;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,8BAA8B;IAC9B,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,sBAAsB;IACtB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,6BAA6B;IAC7B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,2CAA2C;IAC3C,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,cAAc;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,KAAK,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,QAAQ,CAAC;KAChB,CAAC,CAAC;CACJ;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAoED;;GAEG;AACH,wBAAsB,WAAW,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,CA6FjF;AAED;;GAEG;AACH,wBAAsB,cAAc,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAiF5F;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC;IACT,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,CAAC;CACnD,CAAC,CA6DD"}
|
|
@@ -0,0 +1,474 @@
|
|
|
1
|
+
import { existsSync, readFileSync, mkdirSync, writeFileSync } from "fs";
|
|
2
|
+
import { join, basename, dirname, relative } from "path";
|
|
3
|
+
import fg from "fast-glob";
|
|
4
|
+
import matter from "gray-matter";
|
|
5
|
+
const CATEGORY_DIRS = {
|
|
6
|
+
concept: "concepts",
|
|
7
|
+
technical: "components",
|
|
8
|
+
feature: "features",
|
|
9
|
+
primitive: "integrations",
|
|
10
|
+
service: "services",
|
|
11
|
+
guide: "guides",
|
|
12
|
+
standard: "standards",
|
|
13
|
+
integration: "integrations"
|
|
14
|
+
};
|
|
15
|
+
const CATEGORY_KEYWORDS = {
|
|
16
|
+
concept: [
|
|
17
|
+
"overview",
|
|
18
|
+
"introduction",
|
|
19
|
+
"theory",
|
|
20
|
+
"principle",
|
|
21
|
+
"concept",
|
|
22
|
+
"philosophy",
|
|
23
|
+
"approach",
|
|
24
|
+
"methodology",
|
|
25
|
+
"paradigm",
|
|
26
|
+
"model"
|
|
27
|
+
],
|
|
28
|
+
technical: [
|
|
29
|
+
"component",
|
|
30
|
+
"implementation",
|
|
31
|
+
"class",
|
|
32
|
+
"function",
|
|
33
|
+
"module",
|
|
34
|
+
"algorithm",
|
|
35
|
+
"data structure",
|
|
36
|
+
"interface",
|
|
37
|
+
"abstract",
|
|
38
|
+
"utility"
|
|
39
|
+
],
|
|
40
|
+
feature: [
|
|
41
|
+
"feature",
|
|
42
|
+
"capability",
|
|
43
|
+
"functionality",
|
|
44
|
+
"use case",
|
|
45
|
+
"user story",
|
|
46
|
+
"requirement",
|
|
47
|
+
"specification",
|
|
48
|
+
"product",
|
|
49
|
+
"roadmap"
|
|
50
|
+
],
|
|
51
|
+
primitive: [
|
|
52
|
+
"library",
|
|
53
|
+
"framework",
|
|
54
|
+
"dependency",
|
|
55
|
+
"package",
|
|
56
|
+
"tool",
|
|
57
|
+
"sdk",
|
|
58
|
+
"runtime",
|
|
59
|
+
"platform",
|
|
60
|
+
"language"
|
|
61
|
+
],
|
|
62
|
+
service: [
|
|
63
|
+
"api",
|
|
64
|
+
"endpoint",
|
|
65
|
+
"service",
|
|
66
|
+
"server",
|
|
67
|
+
"backend",
|
|
68
|
+
"microservice",
|
|
69
|
+
"rest",
|
|
70
|
+
"graphql",
|
|
71
|
+
"webhook",
|
|
72
|
+
"worker",
|
|
73
|
+
"queue"
|
|
74
|
+
],
|
|
75
|
+
guide: [
|
|
76
|
+
"how to",
|
|
77
|
+
"tutorial",
|
|
78
|
+
"guide",
|
|
79
|
+
"walkthrough",
|
|
80
|
+
"step by step",
|
|
81
|
+
"getting started",
|
|
82
|
+
"setup",
|
|
83
|
+
"installation",
|
|
84
|
+
"configuration"
|
|
85
|
+
],
|
|
86
|
+
standard: [
|
|
87
|
+
"standard",
|
|
88
|
+
"convention",
|
|
89
|
+
"best practice",
|
|
90
|
+
"rule",
|
|
91
|
+
"policy",
|
|
92
|
+
"guideline",
|
|
93
|
+
"coding style",
|
|
94
|
+
"lint",
|
|
95
|
+
"format"
|
|
96
|
+
],
|
|
97
|
+
integration: [
|
|
98
|
+
"integration",
|
|
99
|
+
"connect",
|
|
100
|
+
"plugin",
|
|
101
|
+
"adapter",
|
|
102
|
+
"bridge",
|
|
103
|
+
"sync",
|
|
104
|
+
"import",
|
|
105
|
+
"export",
|
|
106
|
+
"webhook"
|
|
107
|
+
]
|
|
108
|
+
};
|
|
109
|
+
const PATH_PATTERNS = [
|
|
110
|
+
{ pattern: /\/(api|endpoints?|routes?)\//i, type: "service" },
|
|
111
|
+
{ pattern: /\/(guide|tutorial|howto|getting-started)\//i, type: "guide" },
|
|
112
|
+
{ pattern: /\/(component|ui|widget)\//i, type: "technical" },
|
|
113
|
+
{ pattern: /\/(feature|capability)\//i, type: "feature" },
|
|
114
|
+
{ pattern: /\/(standard|convention|style)\//i, type: "standard" },
|
|
115
|
+
{ pattern: /\/(integration|plugin|adapter)\//i, type: "integration" },
|
|
116
|
+
{ pattern: /\/(service|worker|job)\//i, type: "service" },
|
|
117
|
+
{ pattern: /\/(concept|architecture|design)\//i, type: "concept" }
|
|
118
|
+
];
|
|
119
|
+
async function convertDocs(options) {
|
|
120
|
+
const {
|
|
121
|
+
sourceDir,
|
|
122
|
+
targetDir = "docs-nn",
|
|
123
|
+
projectRoot,
|
|
124
|
+
preserveOriginal = true,
|
|
125
|
+
force = false,
|
|
126
|
+
autoCategory = true,
|
|
127
|
+
dryRun = false
|
|
128
|
+
} = options;
|
|
129
|
+
const result = {
|
|
130
|
+
success: true,
|
|
131
|
+
filesProcessed: 0,
|
|
132
|
+
filesConverted: 0,
|
|
133
|
+
filesSkipped: 0,
|
|
134
|
+
errors: [],
|
|
135
|
+
converted: []
|
|
136
|
+
};
|
|
137
|
+
const sourcePath = join(projectRoot, sourceDir);
|
|
138
|
+
const targetPath = join(projectRoot, targetDir);
|
|
139
|
+
if (!existsSync(sourcePath)) {
|
|
140
|
+
result.success = false;
|
|
141
|
+
result.errors.push(`Source directory not found: ${sourcePath}`);
|
|
142
|
+
return result;
|
|
143
|
+
}
|
|
144
|
+
if (!dryRun) {
|
|
145
|
+
createTargetStructure(targetPath);
|
|
146
|
+
}
|
|
147
|
+
const files = await fg("**/*.md", {
|
|
148
|
+
cwd: sourcePath,
|
|
149
|
+
ignore: ["node_modules/**", ".git/**", "_templates/**"]
|
|
150
|
+
});
|
|
151
|
+
for (const file of files) {
|
|
152
|
+
result.filesProcessed++;
|
|
153
|
+
const sourceFile = join(sourcePath, file);
|
|
154
|
+
try {
|
|
155
|
+
const content = readFileSync(sourceFile, "utf-8");
|
|
156
|
+
const { data: existingFrontmatter, content: body } = matter(content);
|
|
157
|
+
const nodeType = autoCategory ? detectNodeType(file, body, existingFrontmatter) : existingFrontmatter.type || "concept";
|
|
158
|
+
const targetSubdir = CATEGORY_DIRS[nodeType];
|
|
159
|
+
const targetFile = join(targetPath, targetSubdir, basename(file));
|
|
160
|
+
if (existsSync(targetFile) && !force) {
|
|
161
|
+
result.filesSkipped++;
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
const frontmatter = generateFrontmatter(file, body, nodeType, existingFrontmatter);
|
|
165
|
+
const newContent = buildMarkdownWithFrontmatter(frontmatter, body);
|
|
166
|
+
if (!dryRun) {
|
|
167
|
+
mkdirSync(dirname(targetFile), { recursive: true });
|
|
168
|
+
writeFileSync(targetFile, newContent, "utf-8");
|
|
169
|
+
}
|
|
170
|
+
result.filesConverted++;
|
|
171
|
+
result.converted.push({
|
|
172
|
+
source: file,
|
|
173
|
+
target: relative(projectRoot, targetFile),
|
|
174
|
+
type: nodeType
|
|
175
|
+
});
|
|
176
|
+
} catch (error) {
|
|
177
|
+
result.errors.push(`Failed to convert ${file}: ${error}`);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
result.success = result.errors.length === 0;
|
|
181
|
+
return result;
|
|
182
|
+
}
|
|
183
|
+
async function addFrontmatter(options) {
|
|
184
|
+
const {
|
|
185
|
+
target,
|
|
186
|
+
projectRoot,
|
|
187
|
+
type,
|
|
188
|
+
status = "active",
|
|
189
|
+
tags = [],
|
|
190
|
+
force = false,
|
|
191
|
+
dryRun = false
|
|
192
|
+
} = options;
|
|
193
|
+
const result = {
|
|
194
|
+
success: true,
|
|
195
|
+
filesProcessed: 0,
|
|
196
|
+
filesUpdated: 0,
|
|
197
|
+
filesSkipped: 0,
|
|
198
|
+
errors: []
|
|
199
|
+
};
|
|
200
|
+
const targetPath = join(projectRoot, target);
|
|
201
|
+
let files;
|
|
202
|
+
if (existsSync(targetPath) && !targetPath.endsWith(".md")) {
|
|
203
|
+
files = await fg("**/*.md", {
|
|
204
|
+
cwd: targetPath,
|
|
205
|
+
ignore: ["node_modules/**", ".git/**", "_templates/**"],
|
|
206
|
+
absolute: true
|
|
207
|
+
});
|
|
208
|
+
} else if (existsSync(targetPath)) {
|
|
209
|
+
files = [targetPath];
|
|
210
|
+
} else {
|
|
211
|
+
result.success = false;
|
|
212
|
+
result.errors.push(`Target not found: ${targetPath}`);
|
|
213
|
+
return result;
|
|
214
|
+
}
|
|
215
|
+
for (const file of files) {
|
|
216
|
+
result.filesProcessed++;
|
|
217
|
+
try {
|
|
218
|
+
const content = readFileSync(file, "utf-8");
|
|
219
|
+
const { data: existingFrontmatter, content: body } = matter(content);
|
|
220
|
+
if (Object.keys(existingFrontmatter).length > 0 && !force) {
|
|
221
|
+
result.filesSkipped++;
|
|
222
|
+
continue;
|
|
223
|
+
}
|
|
224
|
+
const relPath = relative(projectRoot, file);
|
|
225
|
+
const nodeType = type || detectNodeType(relPath, body, existingFrontmatter);
|
|
226
|
+
const frontmatter = generateFrontmatter(
|
|
227
|
+
relPath,
|
|
228
|
+
body,
|
|
229
|
+
nodeType,
|
|
230
|
+
force ? {} : existingFrontmatter,
|
|
231
|
+
status,
|
|
232
|
+
tags
|
|
233
|
+
);
|
|
234
|
+
const newContent = buildMarkdownWithFrontmatter(frontmatter, body);
|
|
235
|
+
if (!dryRun) {
|
|
236
|
+
writeFileSync(file, newContent, "utf-8");
|
|
237
|
+
}
|
|
238
|
+
result.filesUpdated++;
|
|
239
|
+
} catch (error) {
|
|
240
|
+
result.errors.push(`Failed to update ${file}: ${error}`);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
result.success = result.errors.length === 0;
|
|
244
|
+
return result;
|
|
245
|
+
}
|
|
246
|
+
async function validateFrontmatter(target, projectRoot) {
|
|
247
|
+
const result = {
|
|
248
|
+
valid: 0,
|
|
249
|
+
invalid: 0,
|
|
250
|
+
missing: 0,
|
|
251
|
+
issues: []
|
|
252
|
+
};
|
|
253
|
+
const targetPath = join(projectRoot, target);
|
|
254
|
+
const files = await fg("**/*.md", {
|
|
255
|
+
cwd: targetPath,
|
|
256
|
+
ignore: ["node_modules/**", ".git/**", "_templates/**"],
|
|
257
|
+
absolute: true
|
|
258
|
+
});
|
|
259
|
+
const validTypes = [
|
|
260
|
+
"concept",
|
|
261
|
+
"technical",
|
|
262
|
+
"feature",
|
|
263
|
+
"primitive",
|
|
264
|
+
"service",
|
|
265
|
+
"guide",
|
|
266
|
+
"standard",
|
|
267
|
+
"integration"
|
|
268
|
+
];
|
|
269
|
+
const validStatuses = ["draft", "active", "deprecated", "archived"];
|
|
270
|
+
for (const file of files) {
|
|
271
|
+
const content = readFileSync(file, "utf-8");
|
|
272
|
+
const { data: frontmatter } = matter(content);
|
|
273
|
+
const fileIssues = [];
|
|
274
|
+
if (Object.keys(frontmatter).length === 0) {
|
|
275
|
+
result.missing++;
|
|
276
|
+
fileIssues.push("Missing frontmatter");
|
|
277
|
+
} else {
|
|
278
|
+
if (!frontmatter.title) {
|
|
279
|
+
fileIssues.push("Missing title");
|
|
280
|
+
}
|
|
281
|
+
if (!frontmatter.type) {
|
|
282
|
+
fileIssues.push("Missing type");
|
|
283
|
+
} else if (!validTypes.includes(frontmatter.type)) {
|
|
284
|
+
fileIssues.push(`Invalid type: ${frontmatter.type}`);
|
|
285
|
+
}
|
|
286
|
+
if (frontmatter.status && !validStatuses.includes(frontmatter.status)) {
|
|
287
|
+
fileIssues.push(`Invalid status: ${frontmatter.status}`);
|
|
288
|
+
}
|
|
289
|
+
if (!frontmatter.created) {
|
|
290
|
+
fileIssues.push("Missing created date");
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
if (fileIssues.length > 0) {
|
|
294
|
+
result.invalid++;
|
|
295
|
+
result.issues.push({
|
|
296
|
+
file: relative(projectRoot, file),
|
|
297
|
+
issues: fileIssues
|
|
298
|
+
});
|
|
299
|
+
} else if (Object.keys(frontmatter).length > 0) {
|
|
300
|
+
result.valid++;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
return result;
|
|
304
|
+
}
|
|
305
|
+
function createTargetStructure(targetPath) {
|
|
306
|
+
const dirs = [
|
|
307
|
+
"",
|
|
308
|
+
"concepts",
|
|
309
|
+
"concepts/architecture",
|
|
310
|
+
"concepts/patterns",
|
|
311
|
+
"components",
|
|
312
|
+
"components/ui",
|
|
313
|
+
"components/utilities",
|
|
314
|
+
"services",
|
|
315
|
+
"services/api",
|
|
316
|
+
"services/workers",
|
|
317
|
+
"features",
|
|
318
|
+
"features/core",
|
|
319
|
+
"features/advanced",
|
|
320
|
+
"integrations",
|
|
321
|
+
"integrations/databases",
|
|
322
|
+
"integrations/auth",
|
|
323
|
+
"standards",
|
|
324
|
+
"standards/coding",
|
|
325
|
+
"standards/documentation",
|
|
326
|
+
"guides",
|
|
327
|
+
"guides/getting-started",
|
|
328
|
+
"guides/tutorials",
|
|
329
|
+
"references",
|
|
330
|
+
"references/api",
|
|
331
|
+
"_templates",
|
|
332
|
+
"_attachments"
|
|
333
|
+
];
|
|
334
|
+
for (const dir of dirs) {
|
|
335
|
+
const fullPath = join(targetPath, dir);
|
|
336
|
+
if (!existsSync(fullPath)) {
|
|
337
|
+
mkdirSync(fullPath, { recursive: true });
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
function detectNodeType(filePath, content, existingFrontmatter) {
|
|
342
|
+
const validTypes = [
|
|
343
|
+
"concept",
|
|
344
|
+
"technical",
|
|
345
|
+
"feature",
|
|
346
|
+
"primitive",
|
|
347
|
+
"service",
|
|
348
|
+
"guide",
|
|
349
|
+
"standard",
|
|
350
|
+
"integration"
|
|
351
|
+
];
|
|
352
|
+
if (existingFrontmatter.type && validTypes.includes(existingFrontmatter.type)) {
|
|
353
|
+
return existingFrontmatter.type;
|
|
354
|
+
}
|
|
355
|
+
for (const { pattern, type } of PATH_PATTERNS) {
|
|
356
|
+
if (pattern.test(filePath)) {
|
|
357
|
+
return type;
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
const lowerContent = content.toLowerCase();
|
|
361
|
+
const scores = {
|
|
362
|
+
concept: 0,
|
|
363
|
+
technical: 0,
|
|
364
|
+
feature: 0,
|
|
365
|
+
primitive: 0,
|
|
366
|
+
service: 0,
|
|
367
|
+
guide: 0,
|
|
368
|
+
standard: 0,
|
|
369
|
+
integration: 0
|
|
370
|
+
};
|
|
371
|
+
for (const [nodeType, keywords] of Object.entries(CATEGORY_KEYWORDS)) {
|
|
372
|
+
for (const keyword of keywords) {
|
|
373
|
+
const regex = new RegExp(`\\b${keyword}\\b`, "gi");
|
|
374
|
+
const matches = lowerContent.match(regex);
|
|
375
|
+
if (matches) {
|
|
376
|
+
scores[nodeType] += matches.length;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
let maxScore = 0;
|
|
381
|
+
let detectedType = "concept";
|
|
382
|
+
for (const [nodeType, score] of Object.entries(scores)) {
|
|
383
|
+
if (score > maxScore) {
|
|
384
|
+
maxScore = score;
|
|
385
|
+
detectedType = nodeType;
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
return detectedType;
|
|
389
|
+
}
|
|
390
|
+
function generateFrontmatter(filePath, content, nodeType, existing = {}, status = "active", additionalTags = []) {
|
|
391
|
+
const filename = basename(filePath, ".md");
|
|
392
|
+
const title = existing.title || formatTitle(filename);
|
|
393
|
+
const extractedTags = extractTags(content);
|
|
394
|
+
const allTags = [.../* @__PURE__ */ new Set([
|
|
395
|
+
...existing.tags || [],
|
|
396
|
+
...extractedTags,
|
|
397
|
+
...additionalTags
|
|
398
|
+
])];
|
|
399
|
+
const now = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
|
|
400
|
+
const created = existing.created || now;
|
|
401
|
+
return {
|
|
402
|
+
title,
|
|
403
|
+
type: nodeType,
|
|
404
|
+
status: existing.status || status,
|
|
405
|
+
tags: allTags.length > 0 ? allTags : void 0,
|
|
406
|
+
category: existing.category || void 0,
|
|
407
|
+
description: existing.description || extractDescription(content),
|
|
408
|
+
created,
|
|
409
|
+
updated: now,
|
|
410
|
+
aliases: existing.aliases || void 0,
|
|
411
|
+
related: existing.related || void 0
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
function formatTitle(filename) {
|
|
415
|
+
return filename.replace(/[-_]/g, " ").replace(/\b\w/g, (c) => c.toUpperCase()).trim();
|
|
416
|
+
}
|
|
417
|
+
function extractTags(content) {
|
|
418
|
+
const tags = [];
|
|
419
|
+
const tagMatches = content.match(/#[\w-]+/g);
|
|
420
|
+
if (tagMatches) {
|
|
421
|
+
tags.push(...tagMatches.map((t) => t.slice(1)));
|
|
422
|
+
}
|
|
423
|
+
return tags.slice(0, 10);
|
|
424
|
+
}
|
|
425
|
+
function extractDescription(content) {
|
|
426
|
+
const lines = content.split("\n");
|
|
427
|
+
let description = "";
|
|
428
|
+
for (const line of lines) {
|
|
429
|
+
const trimmed = line.trim();
|
|
430
|
+
if (trimmed && !trimmed.startsWith("#") && !trimmed.startsWith("```")) {
|
|
431
|
+
description = trimmed;
|
|
432
|
+
break;
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
if (description.length > 200) {
|
|
436
|
+
description = description.slice(0, 197) + "...";
|
|
437
|
+
}
|
|
438
|
+
return description || void 0;
|
|
439
|
+
}
|
|
440
|
+
function buildMarkdownWithFrontmatter(frontmatter, content) {
|
|
441
|
+
const cleanFrontmatter = {};
|
|
442
|
+
for (const [key, value] of Object.entries(frontmatter)) {
|
|
443
|
+
if (value !== void 0) {
|
|
444
|
+
cleanFrontmatter[key] = value;
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
const yamlLines = ["---"];
|
|
448
|
+
const orderedKeys = ["title", "type", "status", "tags", "category", "description", "created", "updated", "aliases", "related"];
|
|
449
|
+
for (const key of orderedKeys) {
|
|
450
|
+
if (cleanFrontmatter[key] !== void 0) {
|
|
451
|
+
yamlLines.push(formatYamlLine(key, cleanFrontmatter[key]));
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
yamlLines.push("---");
|
|
455
|
+
yamlLines.push("");
|
|
456
|
+
return yamlLines.join("\n") + content.trim() + "\n";
|
|
457
|
+
}
|
|
458
|
+
function formatYamlLine(key, value) {
|
|
459
|
+
if (Array.isArray(value)) {
|
|
460
|
+
if (value.length === 0) return "";
|
|
461
|
+
return `${key}:
|
|
462
|
+
${value.map((v) => ` - ${v}`).join("\n")}`;
|
|
463
|
+
}
|
|
464
|
+
if (typeof value === "string" && (value.includes(":") || value.includes("#"))) {
|
|
465
|
+
return `${key}: "${value}"`;
|
|
466
|
+
}
|
|
467
|
+
return `${key}: ${value}`;
|
|
468
|
+
}
|
|
469
|
+
export {
|
|
470
|
+
addFrontmatter,
|
|
471
|
+
convertDocs,
|
|
472
|
+
validateFrontmatter
|
|
473
|
+
};
|
|
474
|
+
//# sourceMappingURL=docs-convert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs-convert.js","sources":["../../src/generators/docs-convert.ts"],"sourcesContent":["/**\n * Docs Converter\n *\n * Converts existing documentation to weave-nn structure with proper\n * frontmatter and directory organization.\n */\n\nimport { existsSync, mkdirSync, readFileSync, writeFileSync, copyFileSync } from 'fs';\nimport { join, basename, dirname, relative, extname } from 'path';\nimport fg from 'fast-glob';\nimport matter from 'gray-matter';\nimport type { NodeType, NodeStatus, NodeFrontmatter } from '../core/types.js';\n\n/**\n * Conversion options\n */\nexport interface ConvertOptions {\n /** Source directory with existing docs */\n sourceDir: string;\n /** Target directory (default: docs-nn) */\n targetDir?: string;\n /** Project root for path resolution */\n projectRoot: string;\n /** Preserve original files (copy instead of move) */\n preserveOriginal?: boolean;\n /** Overwrite existing files in target */\n force?: boolean;\n /** Auto-categorize based on content analysis */\n autoCategory?: boolean;\n /** Dry run - show what would be done */\n dryRun?: boolean;\n}\n\n/**\n * Frontmatter options\n */\nexport interface FrontmatterOptions {\n /** Target file or directory */\n target: string;\n /** Project root */\n projectRoot: string;\n /** Override type detection */\n type?: NodeType;\n /** Override status */\n status?: NodeStatus;\n /** Additional tags to add */\n tags?: string[];\n /** Force overwrite existing frontmatter */\n force?: boolean;\n /** Dry run */\n dryRun?: boolean;\n}\n\n/**\n * Conversion result\n */\nexport interface ConvertResult {\n success: boolean;\n filesProcessed: number;\n filesConverted: number;\n filesSkipped: number;\n errors: string[];\n converted: Array<{\n source: string;\n target: string;\n type: NodeType;\n }>;\n}\n\n/**\n * Frontmatter result\n */\nexport interface FrontmatterResult {\n success: boolean;\n filesProcessed: number;\n filesUpdated: number;\n filesSkipped: number;\n errors: string[];\n}\n\n/**\n * Weave-NN directory structure mapping\n */\nconst CATEGORY_DIRS: Record<NodeType, string> = {\n concept: 'concepts',\n technical: 'components',\n feature: 'features',\n primitive: 'integrations',\n service: 'services',\n guide: 'guides',\n standard: 'standards',\n integration: 'integrations',\n};\n\n/**\n * Keywords for content-based categorization\n */\nconst CATEGORY_KEYWORDS: Record<NodeType, string[]> = {\n concept: [\n 'overview', 'introduction', 'theory', 'principle', 'concept',\n 'philosophy', 'approach', 'methodology', 'paradigm', 'model',\n ],\n technical: [\n 'component', 'implementation', 'class', 'function', 'module',\n 'algorithm', 'data structure', 'interface', 'abstract', 'utility',\n ],\n feature: [\n 'feature', 'capability', 'functionality', 'use case', 'user story',\n 'requirement', 'specification', 'product', 'roadmap',\n ],\n primitive: [\n 'library', 'framework', 'dependency', 'package', 'tool',\n 'sdk', 'runtime', 'platform', 'language',\n ],\n service: [\n 'api', 'endpoint', 'service', 'server', 'backend', 'microservice',\n 'rest', 'graphql', 'webhook', 'worker', 'queue',\n ],\n guide: [\n 'how to', 'tutorial', 'guide', 'walkthrough', 'step by step',\n 'getting started', 'setup', 'installation', 'configuration',\n ],\n standard: [\n 'standard', 'convention', 'best practice', 'rule', 'policy',\n 'guideline', 'coding style', 'lint', 'format',\n ],\n integration: [\n 'integration', 'connect', 'plugin', 'adapter', 'bridge',\n 'sync', 'import', 'export', 'webhook',\n ],\n};\n\n/**\n * Path-based categorization patterns\n */\nconst PATH_PATTERNS: Array<{ pattern: RegExp; type: NodeType }> = [\n { pattern: /\\/(api|endpoints?|routes?)\\//i, type: 'service' },\n { pattern: /\\/(guide|tutorial|howto|getting-started)\\//i, type: 'guide' },\n { pattern: /\\/(component|ui|widget)\\//i, type: 'technical' },\n { pattern: /\\/(feature|capability)\\//i, type: 'feature' },\n { pattern: /\\/(standard|convention|style)\\//i, type: 'standard' },\n { pattern: /\\/(integration|plugin|adapter)\\//i, type: 'integration' },\n { pattern: /\\/(service|worker|job)\\//i, type: 'service' },\n { pattern: /\\/(concept|architecture|design)\\//i, type: 'concept' },\n];\n\n/**\n * Convert existing docs to weave-nn structure\n */\nexport async function convertDocs(options: ConvertOptions): Promise<ConvertResult> {\n const {\n sourceDir,\n targetDir = 'docs-nn',\n projectRoot,\n preserveOriginal = true,\n force = false,\n autoCategory = true,\n dryRun = false,\n } = options;\n\n const result: ConvertResult = {\n success: true,\n filesProcessed: 0,\n filesConverted: 0,\n filesSkipped: 0,\n errors: [],\n converted: [],\n };\n\n const sourcePath = join(projectRoot, sourceDir);\n const targetPath = join(projectRoot, targetDir);\n\n // Validate source exists\n if (!existsSync(sourcePath)) {\n result.success = false;\n result.errors.push(`Source directory not found: ${sourcePath}`);\n return result;\n }\n\n // Create target structure\n if (!dryRun) {\n createTargetStructure(targetPath);\n }\n\n // Find all markdown files\n const files = await fg('**/*.md', {\n cwd: sourcePath,\n ignore: ['node_modules/**', '.git/**', '_templates/**'],\n });\n\n for (const file of files) {\n result.filesProcessed++;\n const sourceFile = join(sourcePath, file);\n\n try {\n // Read and parse file\n const content = readFileSync(sourceFile, 'utf-8');\n const { data: existingFrontmatter, content: body } = matter(content);\n\n // Determine node type\n const nodeType = autoCategory\n ? detectNodeType(file, body, existingFrontmatter)\n : (existingFrontmatter.type as NodeType) || 'concept';\n\n // Determine target path\n const targetSubdir = CATEGORY_DIRS[nodeType];\n const targetFile = join(targetPath, targetSubdir, basename(file));\n\n // Check if target exists\n if (existsSync(targetFile) && !force) {\n result.filesSkipped++;\n continue;\n }\n\n // Generate frontmatter\n const frontmatter = generateFrontmatter(file, body, nodeType, existingFrontmatter);\n\n // Build new content\n const newContent = buildMarkdownWithFrontmatter(frontmatter, body);\n\n if (!dryRun) {\n // Ensure directory exists\n mkdirSync(dirname(targetFile), { recursive: true });\n\n // Write converted file\n writeFileSync(targetFile, newContent, 'utf-8');\n }\n\n result.filesConverted++;\n result.converted.push({\n source: file,\n target: relative(projectRoot, targetFile),\n type: nodeType,\n });\n\n } catch (error) {\n result.errors.push(`Failed to convert ${file}: ${error}`);\n }\n }\n\n result.success = result.errors.length === 0;\n return result;\n}\n\n/**\n * Add or update frontmatter in existing files\n */\nexport async function addFrontmatter(options: FrontmatterOptions): Promise<FrontmatterResult> {\n const {\n target,\n projectRoot,\n type,\n status = 'active',\n tags = [],\n force = false,\n dryRun = false,\n } = options;\n\n const result: FrontmatterResult = {\n success: true,\n filesProcessed: 0,\n filesUpdated: 0,\n filesSkipped: 0,\n errors: [],\n };\n\n const targetPath = join(projectRoot, target);\n\n // Handle single file or directory\n let files: string[];\n if (existsSync(targetPath) && !targetPath.endsWith('.md')) {\n // Directory - find all markdown files\n files = await fg('**/*.md', {\n cwd: targetPath,\n ignore: ['node_modules/**', '.git/**', '_templates/**'],\n absolute: true,\n });\n } else if (existsSync(targetPath)) {\n files = [targetPath];\n } else {\n result.success = false;\n result.errors.push(`Target not found: ${targetPath}`);\n return result;\n }\n\n for (const file of files) {\n result.filesProcessed++;\n\n try {\n const content = readFileSync(file, 'utf-8');\n const { data: existingFrontmatter, content: body } = matter(content);\n\n // Skip if has frontmatter and not forcing\n if (Object.keys(existingFrontmatter).length > 0 && !force) {\n result.filesSkipped++;\n continue;\n }\n\n // Detect type if not specified\n const relPath = relative(projectRoot, file);\n const nodeType = type || detectNodeType(relPath, body, existingFrontmatter);\n\n // Generate frontmatter\n const frontmatter = generateFrontmatter(\n relPath,\n body,\n nodeType,\n force ? {} : existingFrontmatter,\n status,\n tags\n );\n\n // Build new content\n const newContent = buildMarkdownWithFrontmatter(frontmatter, body);\n\n if (!dryRun) {\n writeFileSync(file, newContent, 'utf-8');\n }\n\n result.filesUpdated++;\n\n } catch (error) {\n result.errors.push(`Failed to update ${file}: ${error}`);\n }\n }\n\n result.success = result.errors.length === 0;\n return result;\n}\n\n/**\n * Validate frontmatter in files\n */\nexport async function validateFrontmatter(\n target: string,\n projectRoot: string\n): Promise<{\n valid: number;\n invalid: number;\n missing: number;\n issues: Array<{ file: string; issues: string[] }>;\n}> {\n const result = {\n valid: 0,\n invalid: 0,\n missing: 0,\n issues: [] as Array<{ file: string; issues: string[] }>,\n };\n\n const targetPath = join(projectRoot, target);\n\n const files = await fg('**/*.md', {\n cwd: targetPath,\n ignore: ['node_modules/**', '.git/**', '_templates/**'],\n absolute: true,\n });\n\n const validTypes: NodeType[] = [\n 'concept', 'technical', 'feature', 'primitive',\n 'service', 'guide', 'standard', 'integration',\n ];\n\n const validStatuses: NodeStatus[] = ['draft', 'active', 'deprecated', 'archived'];\n\n for (const file of files) {\n const content = readFileSync(file, 'utf-8');\n const { data: frontmatter } = matter(content);\n const fileIssues: string[] = [];\n\n if (Object.keys(frontmatter).length === 0) {\n result.missing++;\n fileIssues.push('Missing frontmatter');\n } else {\n // Check required fields\n if (!frontmatter.title) {\n fileIssues.push('Missing title');\n }\n if (!frontmatter.type) {\n fileIssues.push('Missing type');\n } else if (!validTypes.includes(frontmatter.type)) {\n fileIssues.push(`Invalid type: ${frontmatter.type}`);\n }\n if (frontmatter.status && !validStatuses.includes(frontmatter.status)) {\n fileIssues.push(`Invalid status: ${frontmatter.status}`);\n }\n if (!frontmatter.created) {\n fileIssues.push('Missing created date');\n }\n }\n\n if (fileIssues.length > 0) {\n result.invalid++;\n result.issues.push({\n file: relative(projectRoot, file),\n issues: fileIssues,\n });\n } else if (Object.keys(frontmatter).length > 0) {\n result.valid++;\n }\n }\n\n return result;\n}\n\n// ============================================================================\n// Helper Functions\n// ============================================================================\n\n/**\n * Create target directory structure\n */\nfunction createTargetStructure(targetPath: string): void {\n const dirs = [\n '',\n 'concepts',\n 'concepts/architecture',\n 'concepts/patterns',\n 'components',\n 'components/ui',\n 'components/utilities',\n 'services',\n 'services/api',\n 'services/workers',\n 'features',\n 'features/core',\n 'features/advanced',\n 'integrations',\n 'integrations/databases',\n 'integrations/auth',\n 'standards',\n 'standards/coding',\n 'standards/documentation',\n 'guides',\n 'guides/getting-started',\n 'guides/tutorials',\n 'references',\n 'references/api',\n '_templates',\n '_attachments',\n ];\n\n for (const dir of dirs) {\n const fullPath = join(targetPath, dir);\n if (!existsSync(fullPath)) {\n mkdirSync(fullPath, { recursive: true });\n }\n }\n}\n\n/**\n * Detect node type from file path and content\n */\nfunction detectNodeType(\n filePath: string,\n content: string,\n existingFrontmatter: Record<string, unknown>\n): NodeType {\n // Use existing type if valid\n const validTypes: NodeType[] = [\n 'concept', 'technical', 'feature', 'primitive',\n 'service', 'guide', 'standard', 'integration',\n ];\n\n if (existingFrontmatter.type && validTypes.includes(existingFrontmatter.type as NodeType)) {\n return existingFrontmatter.type as NodeType;\n }\n\n // Check path patterns\n for (const { pattern, type } of PATH_PATTERNS) {\n if (pattern.test(filePath)) {\n return type;\n }\n }\n\n // Analyze content\n const lowerContent = content.toLowerCase();\n const scores: Record<NodeType, number> = {\n concept: 0,\n technical: 0,\n feature: 0,\n primitive: 0,\n service: 0,\n guide: 0,\n standard: 0,\n integration: 0,\n };\n\n for (const [nodeType, keywords] of Object.entries(CATEGORY_KEYWORDS)) {\n for (const keyword of keywords) {\n const regex = new RegExp(`\\\\b${keyword}\\\\b`, 'gi');\n const matches = lowerContent.match(regex);\n if (matches) {\n scores[nodeType as NodeType] += matches.length;\n }\n }\n }\n\n // Find highest scoring type\n let maxScore = 0;\n let detectedType: NodeType = 'concept';\n\n for (const [nodeType, score] of Object.entries(scores)) {\n if (score > maxScore) {\n maxScore = score;\n detectedType = nodeType as NodeType;\n }\n }\n\n return detectedType;\n}\n\n/**\n * Generate frontmatter for a file\n */\nfunction generateFrontmatter(\n filePath: string,\n content: string,\n nodeType: NodeType,\n existing: Record<string, unknown> = {},\n status: NodeStatus = 'active',\n additionalTags: string[] = []\n): NodeFrontmatter {\n const filename = basename(filePath, '.md');\n const title = existing.title as string || formatTitle(filename);\n\n // Extract tags from content\n const extractedTags = extractTags(content);\n const allTags = [...new Set([\n ...(existing.tags as string[] || []),\n ...extractedTags,\n ...additionalTags,\n ])];\n\n // Get dates\n const now = new Date().toISOString().split('T')[0];\n const created = existing.created as string || now;\n\n return {\n title,\n type: nodeType,\n status: existing.status as NodeStatus || status,\n tags: allTags.length > 0 ? allTags : undefined,\n category: existing.category as string || undefined,\n description: existing.description as string || extractDescription(content),\n created,\n updated: now,\n aliases: existing.aliases as string[] || undefined,\n related: existing.related as string[] || undefined,\n };\n}\n\n/**\n * Format filename as title\n */\nfunction formatTitle(filename: string): string {\n return filename\n .replace(/[-_]/g, ' ')\n .replace(/\\b\\w/g, c => c.toUpperCase())\n .trim();\n}\n\n/**\n * Extract tags from content\n */\nfunction extractTags(content: string): string[] {\n const tags: string[] = [];\n\n // Look for #tags in content\n const tagMatches = content.match(/#[\\w-]+/g);\n if (tagMatches) {\n tags.push(...tagMatches.map(t => t.slice(1)));\n }\n\n return tags.slice(0, 10); // Limit to 10 tags\n}\n\n/**\n * Extract description from first paragraph\n */\nfunction extractDescription(content: string): string | undefined {\n // Skip headers and find first paragraph\n const lines = content.split('\\n');\n let description = '';\n\n for (const line of lines) {\n const trimmed = line.trim();\n if (trimmed && !trimmed.startsWith('#') && !trimmed.startsWith('```')) {\n description = trimmed;\n break;\n }\n }\n\n if (description.length > 200) {\n description = description.slice(0, 197) + '...';\n }\n\n return description || undefined;\n}\n\n/**\n * Build markdown content with frontmatter\n */\nfunction buildMarkdownWithFrontmatter(\n frontmatter: NodeFrontmatter,\n content: string\n): string {\n // Clean undefined values\n const cleanFrontmatter: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(frontmatter)) {\n if (value !== undefined) {\n cleanFrontmatter[key] = value;\n }\n }\n\n // Build YAML frontmatter\n const yamlLines = ['---'];\n\n // Order: title, type, status, tags, description, dates, others\n const orderedKeys = ['title', 'type', 'status', 'tags', 'category', 'description', 'created', 'updated', 'aliases', 'related'];\n\n for (const key of orderedKeys) {\n if (cleanFrontmatter[key] !== undefined) {\n yamlLines.push(formatYamlLine(key, cleanFrontmatter[key]));\n }\n }\n\n yamlLines.push('---');\n yamlLines.push('');\n\n return yamlLines.join('\\n') + content.trim() + '\\n';\n}\n\n/**\n * Format a YAML line\n */\nfunction formatYamlLine(key: string, value: unknown): string {\n if (Array.isArray(value)) {\n if (value.length === 0) return '';\n return `${key}:\\n${value.map(v => ` - ${v}`).join('\\n')}`;\n }\n if (typeof value === 'string' && (value.includes(':') || value.includes('#'))) {\n return `${key}: \"${value}\"`;\n }\n return `${key}: ${value}`;\n}\n"],"names":[],"mappings":";;;;AAmFA,MAAM,gBAA0C;AAAA,EAC9C,SAAS;AAAA,EAC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AO,CAAC,EAAE,EAAE,KAAK,IAAI,CAAC;AAAA,EAC1D;AACA,MAAI,OAAO,UAAU,aAAa,MAAM,SAAS,GAAG,KAAK,MAAM,SAAS,GAAG,IAAI;AAC7E,WAAO,GAAG,GAAG,MAAM,KAAK;AAAA,EAC1B;AACA,SAAO,GAAG,GAAG,KAAK,KAAK;AACzB;"}
|
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Creates the initial docs directory structure following the weave-nn
|
|
5
5
|
* methodology with proper PRIMITIVES.md taxonomy.
|
|
6
|
+
*
|
|
7
|
+
* SECURITY NOTES (Handlebars Templates):
|
|
8
|
+
* - All templates use double-braces {{}} which HTML-escapes output
|
|
9
|
+
* - Triple-braces {{{raw}}} are NOT used, preventing injection attacks
|
|
10
|
+
* - Template variables come from internal sources (project analysis), not direct user input
|
|
11
|
+
* - See: https://handlebarsjs.com/guide/#html-escaping
|
|
6
12
|
*/
|
|
7
13
|
import type { DocsInitOptions, DocsInitResult } from '../core/types.js';
|
|
8
14
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs-init.d.ts","sourceRoot":"","sources":["../../src/generators/docs-init.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"docs-init.d.ts","sourceRoot":"","sources":["../../src/generators/docs-init.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EAEf,MAAM,kBAAkB,CAAC;AA2X1B;;GAEG;AACH,wBAAsB,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,cAAc,CAAC,CA6FhF;AAmPD;;GAEG;AACH,wBAAgB,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,SAAS,GAAG,OAAO,CAEzE;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAW9D"}
|