openlore 2.0.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/LICENSE +21 -0
- package/README.md +268 -0
- package/dist/api/analyze.d.ts +17 -0
- package/dist/api/analyze.d.ts.map +1 -0
- package/dist/api/analyze.js +143 -0
- package/dist/api/analyze.js.map +1 -0
- package/dist/api/audit.d.ts +10 -0
- package/dist/api/audit.d.ts.map +1 -0
- package/dist/api/audit.js +117 -0
- package/dist/api/audit.js.map +1 -0
- package/dist/api/decisions.d.ts +55 -0
- package/dist/api/decisions.d.ts.map +1 -0
- package/dist/api/decisions.js +157 -0
- package/dist/api/decisions.js.map +1 -0
- package/dist/api/drift.d.ts +21 -0
- package/dist/api/drift.d.ts.map +1 -0
- package/dist/api/drift.js +152 -0
- package/dist/api/drift.js.map +1 -0
- package/dist/api/generate.d.ts +18 -0
- package/dist/api/generate.d.ts.map +1 -0
- package/dist/api/generate.js +259 -0
- package/dist/api/generate.js.map +1 -0
- package/dist/api/index.d.ts +41 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +34 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/init.d.ts +18 -0
- package/dist/api/init.d.ts.map +1 -0
- package/dist/api/init.js +83 -0
- package/dist/api/init.js.map +1 -0
- package/dist/api/run.d.ts +19 -0
- package/dist/api/run.d.ts.map +1 -0
- package/dist/api/run.js +312 -0
- package/dist/api/run.js.map +1 -0
- package/dist/api/specs.d.ts +49 -0
- package/dist/api/specs.d.ts.map +1 -0
- package/dist/api/specs.js +137 -0
- package/dist/api/specs.js.map +1 -0
- package/dist/api/types.d.ts +201 -0
- package/dist/api/types.d.ts.map +1 -0
- package/dist/api/types.js +9 -0
- package/dist/api/types.js.map +1 -0
- package/dist/api/verify.d.ts +20 -0
- package/dist/api/verify.d.ts.map +1 -0
- package/dist/api/verify.js +117 -0
- package/dist/api/verify.js.map +1 -0
- package/dist/cli/commands/analyze.d.ts +30 -0
- package/dist/cli/commands/analyze.d.ts.map +1 -0
- package/dist/cli/commands/analyze.js +683 -0
- package/dist/cli/commands/analyze.js.map +1 -0
- package/dist/cli/commands/audit.d.ts +9 -0
- package/dist/cli/commands/audit.d.ts.map +1 -0
- package/dist/cli/commands/audit.js +98 -0
- package/dist/cli/commands/audit.js.map +1 -0
- package/dist/cli/commands/decisions.d.ts +16 -0
- package/dist/cli/commands/decisions.d.ts.map +1 -0
- package/dist/cli/commands/decisions.js +864 -0
- package/dist/cli/commands/decisions.js.map +1 -0
- package/dist/cli/commands/digest.d.ts +9 -0
- package/dist/cli/commands/digest.d.ts.map +1 -0
- package/dist/cli/commands/digest.js +61 -0
- package/dist/cli/commands/digest.js.map +1 -0
- package/dist/cli/commands/doctor.d.ts +9 -0
- package/dist/cli/commands/doctor.d.ts.map +1 -0
- package/dist/cli/commands/doctor.js +398 -0
- package/dist/cli/commands/doctor.js.map +1 -0
- package/dist/cli/commands/drift.d.ts +9 -0
- package/dist/cli/commands/drift.d.ts.map +1 -0
- package/dist/cli/commands/drift.js +550 -0
- package/dist/cli/commands/drift.js.map +1 -0
- package/dist/cli/commands/generate.d.ts +9 -0
- package/dist/cli/commands/generate.d.ts.map +1 -0
- package/dist/cli/commands/generate.js +565 -0
- package/dist/cli/commands/generate.js.map +1 -0
- package/dist/cli/commands/init.d.ts +9 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +173 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/mcp.d.ts +2235 -0
- package/dist/cli/commands/mcp.d.ts.map +1 -0
- package/dist/cli/commands/mcp.js +1384 -0
- package/dist/cli/commands/mcp.js.map +1 -0
- package/dist/cli/commands/refresh-stories.d.ts +10 -0
- package/dist/cli/commands/refresh-stories.d.ts.map +1 -0
- package/dist/cli/commands/refresh-stories.js +314 -0
- package/dist/cli/commands/refresh-stories.js.map +1 -0
- package/dist/cli/commands/run.d.ts +9 -0
- package/dist/cli/commands/run.d.ts.map +1 -0
- package/dist/cli/commands/run.js +459 -0
- package/dist/cli/commands/run.js.map +1 -0
- package/dist/cli/commands/setup.d.ts +19 -0
- package/dist/cli/commands/setup.d.ts.map +1 -0
- package/dist/cli/commands/setup.js +355 -0
- package/dist/cli/commands/setup.js.map +1 -0
- package/dist/cli/commands/test.d.ts +22 -0
- package/dist/cli/commands/test.d.ts.map +1 -0
- package/dist/cli/commands/test.js +180 -0
- package/dist/cli/commands/test.js.map +1 -0
- package/dist/cli/commands/verify.d.ts +9 -0
- package/dist/cli/commands/verify.d.ts.map +1 -0
- package/dist/cli/commands/verify.js +383 -0
- package/dist/cli/commands/verify.js.map +1 -0
- package/dist/cli/commands/view.d.ts +13 -0
- package/dist/cli/commands/view.d.ts.map +1 -0
- package/dist/cli/commands/view.js +547 -0
- package/dist/cli/commands/view.js.map +1 -0
- package/dist/cli/index.d.ts +9 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +118 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/tui-approval.d.ts +11 -0
- package/dist/cli/tui-approval.d.ts.map +1 -0
- package/dist/cli/tui-approval.js +129 -0
- package/dist/cli/tui-approval.js.map +1 -0
- package/dist/constants.d.ts +314 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +382 -0
- package/dist/constants.js.map +1 -0
- package/dist/core/analyzer/ai-config-generator.d.ts +54 -0
- package/dist/core/analyzer/ai-config-generator.d.ts.map +1 -0
- package/dist/core/analyzer/ai-config-generator.js +98 -0
- package/dist/core/analyzer/ai-config-generator.js.map +1 -0
- package/dist/core/analyzer/architecture-writer.d.ts +67 -0
- package/dist/core/analyzer/architecture-writer.d.ts.map +1 -0
- package/dist/core/analyzer/architecture-writer.js +209 -0
- package/dist/core/analyzer/architecture-writer.js.map +1 -0
- package/dist/core/analyzer/artifact-generator.d.ts +261 -0
- package/dist/core/analyzer/artifact-generator.d.ts.map +1 -0
- package/dist/core/analyzer/artifact-generator.js +909 -0
- package/dist/core/analyzer/artifact-generator.js.map +1 -0
- package/dist/core/analyzer/ast-chunker.d.ts +24 -0
- package/dist/core/analyzer/ast-chunker.d.ts.map +1 -0
- package/dist/core/analyzer/ast-chunker.js +198 -0
- package/dist/core/analyzer/ast-chunker.js.map +1 -0
- package/dist/core/analyzer/call-graph.d.ts +162 -0
- package/dist/core/analyzer/call-graph.d.ts.map +1 -0
- package/dist/core/analyzer/call-graph.js +2040 -0
- package/dist/core/analyzer/call-graph.js.map +1 -0
- package/dist/core/analyzer/code-shaper.d.ts +33 -0
- package/dist/core/analyzer/code-shaper.d.ts.map +1 -0
- package/dist/core/analyzer/code-shaper.js +154 -0
- package/dist/core/analyzer/code-shaper.js.map +1 -0
- package/dist/core/analyzer/codebase-digest.d.ts +40 -0
- package/dist/core/analyzer/codebase-digest.d.ts.map +1 -0
- package/dist/core/analyzer/codebase-digest.js +195 -0
- package/dist/core/analyzer/codebase-digest.js.map +1 -0
- package/dist/core/analyzer/cpp-header-resolver.d.ts +30 -0
- package/dist/core/analyzer/cpp-header-resolver.d.ts.map +1 -0
- package/dist/core/analyzer/cpp-header-resolver.js +71 -0
- package/dist/core/analyzer/cpp-header-resolver.js.map +1 -0
- package/dist/core/analyzer/dependency-graph.d.ts +230 -0
- package/dist/core/analyzer/dependency-graph.d.ts.map +1 -0
- package/dist/core/analyzer/dependency-graph.js +752 -0
- package/dist/core/analyzer/dependency-graph.js.map +1 -0
- package/dist/core/analyzer/duplicate-detector.d.ts +52 -0
- package/dist/core/analyzer/duplicate-detector.d.ts.map +1 -0
- package/dist/core/analyzer/duplicate-detector.js +289 -0
- package/dist/core/analyzer/duplicate-detector.js.map +1 -0
- package/dist/core/analyzer/embedding-service.d.ts +56 -0
- package/dist/core/analyzer/embedding-service.d.ts.map +1 -0
- package/dist/core/analyzer/embedding-service.js +118 -0
- package/dist/core/analyzer/embedding-service.js.map +1 -0
- package/dist/core/analyzer/env-extractor.d.ts +33 -0
- package/dist/core/analyzer/env-extractor.d.ts.map +1 -0
- package/dist/core/analyzer/env-extractor.js +196 -0
- package/dist/core/analyzer/env-extractor.js.map +1 -0
- package/dist/core/analyzer/external-packages.d.ts +20 -0
- package/dist/core/analyzer/external-packages.d.ts.map +1 -0
- package/dist/core/analyzer/external-packages.js +175 -0
- package/dist/core/analyzer/external-packages.js.map +1 -0
- package/dist/core/analyzer/file-walker.d.ts +78 -0
- package/dist/core/analyzer/file-walker.d.ts.map +1 -0
- package/dist/core/analyzer/file-walker.js +532 -0
- package/dist/core/analyzer/file-walker.js.map +1 -0
- package/dist/core/analyzer/function-registry-trie.d.ts +21 -0
- package/dist/core/analyzer/function-registry-trie.d.ts.map +1 -0
- package/dist/core/analyzer/function-registry-trie.js +39 -0
- package/dist/core/analyzer/function-registry-trie.js.map +1 -0
- package/dist/core/analyzer/http-route-parser.d.ts +152 -0
- package/dist/core/analyzer/http-route-parser.d.ts.map +1 -0
- package/dist/core/analyzer/http-route-parser.js +971 -0
- package/dist/core/analyzer/http-route-parser.js.map +1 -0
- package/dist/core/analyzer/import-parser.d.ts +100 -0
- package/dist/core/analyzer/import-parser.d.ts.map +1 -0
- package/dist/core/analyzer/import-parser.js +952 -0
- package/dist/core/analyzer/import-parser.js.map +1 -0
- package/dist/core/analyzer/import-resolver-bridge.d.ts +25 -0
- package/dist/core/analyzer/import-resolver-bridge.d.ts.map +1 -0
- package/dist/core/analyzer/import-resolver-bridge.js +99 -0
- package/dist/core/analyzer/import-resolver-bridge.js.map +1 -0
- package/dist/core/analyzer/index.d.ts +10 -0
- package/dist/core/analyzer/index.d.ts.map +1 -0
- package/dist/core/analyzer/index.js +10 -0
- package/dist/core/analyzer/index.js.map +1 -0
- package/dist/core/analyzer/middleware-extractor.d.ts +29 -0
- package/dist/core/analyzer/middleware-extractor.d.ts.map +1 -0
- package/dist/core/analyzer/middleware-extractor.js +195 -0
- package/dist/core/analyzer/middleware-extractor.js.map +1 -0
- package/dist/core/analyzer/refactor-analyzer.d.ts +83 -0
- package/dist/core/analyzer/refactor-analyzer.d.ts.map +1 -0
- package/dist/core/analyzer/refactor-analyzer.js +351 -0
- package/dist/core/analyzer/refactor-analyzer.js.map +1 -0
- package/dist/core/analyzer/repository-mapper.d.ts +150 -0
- package/dist/core/analyzer/repository-mapper.d.ts.map +1 -0
- package/dist/core/analyzer/repository-mapper.js +740 -0
- package/dist/core/analyzer/repository-mapper.js.map +1 -0
- package/dist/core/analyzer/schema-extractor.d.ts +41 -0
- package/dist/core/analyzer/schema-extractor.d.ts.map +1 -0
- package/dist/core/analyzer/schema-extractor.js +229 -0
- package/dist/core/analyzer/schema-extractor.js.map +1 -0
- package/dist/core/analyzer/signature-extractor.d.ts +31 -0
- package/dist/core/analyzer/signature-extractor.d.ts.map +1 -0
- package/dist/core/analyzer/signature-extractor.js +675 -0
- package/dist/core/analyzer/signature-extractor.js.map +1 -0
- package/dist/core/analyzer/significance-scorer.d.ts +79 -0
- package/dist/core/analyzer/significance-scorer.d.ts.map +1 -0
- package/dist/core/analyzer/significance-scorer.js +407 -0
- package/dist/core/analyzer/significance-scorer.js.map +1 -0
- package/dist/core/analyzer/spec-snapshot-generator.d.ts +17 -0
- package/dist/core/analyzer/spec-snapshot-generator.d.ts.map +1 -0
- package/dist/core/analyzer/spec-snapshot-generator.js +201 -0
- package/dist/core/analyzer/spec-snapshot-generator.js.map +1 -0
- package/dist/core/analyzer/spec-vector-index.d.ts +68 -0
- package/dist/core/analyzer/spec-vector-index.d.ts.map +1 -0
- package/dist/core/analyzer/spec-vector-index.js +340 -0
- package/dist/core/analyzer/spec-vector-index.js.map +1 -0
- package/dist/core/analyzer/subgraph-extractor.d.ts +51 -0
- package/dist/core/analyzer/subgraph-extractor.d.ts.map +1 -0
- package/dist/core/analyzer/subgraph-extractor.js +147 -0
- package/dist/core/analyzer/subgraph-extractor.js.map +1 -0
- package/dist/core/analyzer/type-inference-engine.d.ts +23 -0
- package/dist/core/analyzer/type-inference-engine.d.ts.map +1 -0
- package/dist/core/analyzer/type-inference-engine.js +130 -0
- package/dist/core/analyzer/type-inference-engine.js.map +1 -0
- package/dist/core/analyzer/ui-component-extractor.d.ts +43 -0
- package/dist/core/analyzer/ui-component-extractor.d.ts.map +1 -0
- package/dist/core/analyzer/ui-component-extractor.js +245 -0
- package/dist/core/analyzer/ui-component-extractor.js.map +1 -0
- package/dist/core/analyzer/unified-search.d.ts +116 -0
- package/dist/core/analyzer/unified-search.d.ts.map +1 -0
- package/dist/core/analyzer/unified-search.js +231 -0
- package/dist/core/analyzer/unified-search.js.map +1 -0
- package/dist/core/analyzer/vector-index.d.ts +92 -0
- package/dist/core/analyzer/vector-index.d.ts.map +1 -0
- package/dist/core/analyzer/vector-index.js +451 -0
- package/dist/core/analyzer/vector-index.js.map +1 -0
- package/dist/core/decisions/consolidator.d.ts +14 -0
- package/dist/core/decisions/consolidator.d.ts.map +1 -0
- package/dist/core/decisions/consolidator.js +169 -0
- package/dist/core/decisions/consolidator.js.map +1 -0
- package/dist/core/decisions/extractor.d.ts +26 -0
- package/dist/core/decisions/extractor.d.ts.map +1 -0
- package/dist/core/decisions/extractor.js +156 -0
- package/dist/core/decisions/extractor.js.map +1 -0
- package/dist/core/decisions/index.d.ts +19 -0
- package/dist/core/decisions/index.d.ts.map +1 -0
- package/dist/core/decisions/index.js +16 -0
- package/dist/core/decisions/index.js.map +1 -0
- package/dist/core/decisions/store.d.ts +36 -0
- package/dist/core/decisions/store.d.ts.map +1 -0
- package/dist/core/decisions/store.js +109 -0
- package/dist/core/decisions/store.js.map +1 -0
- package/dist/core/decisions/syncer.d.ts +27 -0
- package/dist/core/decisions/syncer.d.ts.map +1 -0
- package/dist/core/decisions/syncer.js +214 -0
- package/dist/core/decisions/syncer.js.map +1 -0
- package/dist/core/decisions/verifier.d.ts +20 -0
- package/dist/core/decisions/verifier.d.ts.map +1 -0
- package/dist/core/decisions/verifier.js +115 -0
- package/dist/core/decisions/verifier.js.map +1 -0
- package/dist/core/digest/digest-generator.d.ts +29 -0
- package/dist/core/digest/digest-generator.d.ts.map +1 -0
- package/dist/core/digest/digest-generator.js +181 -0
- package/dist/core/digest/digest-generator.js.map +1 -0
- package/dist/core/drift/drift-detector.d.ts +102 -0
- package/dist/core/drift/drift-detector.d.ts.map +1 -0
- package/dist/core/drift/drift-detector.js +598 -0
- package/dist/core/drift/drift-detector.js.map +1 -0
- package/dist/core/drift/git-diff.d.ts +60 -0
- package/dist/core/drift/git-diff.d.ts.map +1 -0
- package/dist/core/drift/git-diff.js +383 -0
- package/dist/core/drift/git-diff.js.map +1 -0
- package/dist/core/drift/index.d.ts +12 -0
- package/dist/core/drift/index.d.ts.map +1 -0
- package/dist/core/drift/index.js +9 -0
- package/dist/core/drift/index.js.map +1 -0
- package/dist/core/drift/spec-mapper.d.ts +73 -0
- package/dist/core/drift/spec-mapper.d.ts.map +1 -0
- package/dist/core/drift/spec-mapper.js +353 -0
- package/dist/core/drift/spec-mapper.js.map +1 -0
- package/dist/core/drift/test-suggester.d.ts +18 -0
- package/dist/core/drift/test-suggester.d.ts.map +1 -0
- package/dist/core/drift/test-suggester.js +107 -0
- package/dist/core/drift/test-suggester.js.map +1 -0
- package/dist/core/generator/adr-generator.d.ts +32 -0
- package/dist/core/generator/adr-generator.d.ts.map +1 -0
- package/dist/core/generator/adr-generator.js +192 -0
- package/dist/core/generator/adr-generator.js.map +1 -0
- package/dist/core/generator/index.d.ts +9 -0
- package/dist/core/generator/index.d.ts.map +1 -0
- package/dist/core/generator/index.js +12 -0
- package/dist/core/generator/index.js.map +1 -0
- package/dist/core/generator/mapping-generator.d.ts +54 -0
- package/dist/core/generator/mapping-generator.d.ts.map +1 -0
- package/dist/core/generator/mapping-generator.js +240 -0
- package/dist/core/generator/mapping-generator.js.map +1 -0
- package/dist/core/generator/openspec-compat.d.ts +160 -0
- package/dist/core/generator/openspec-compat.d.ts.map +1 -0
- package/dist/core/generator/openspec-compat.js +524 -0
- package/dist/core/generator/openspec-compat.js.map +1 -0
- package/dist/core/generator/openspec-format-generator.d.ts +131 -0
- package/dist/core/generator/openspec-format-generator.d.ts.map +1 -0
- package/dist/core/generator/openspec-format-generator.js +963 -0
- package/dist/core/generator/openspec-format-generator.js.map +1 -0
- package/dist/core/generator/openspec-writer.d.ts +130 -0
- package/dist/core/generator/openspec-writer.d.ts.map +1 -0
- package/dist/core/generator/openspec-writer.js +404 -0
- package/dist/core/generator/openspec-writer.js.map +1 -0
- package/dist/core/generator/prompts.d.ts +35 -0
- package/dist/core/generator/prompts.d.ts.map +1 -0
- package/dist/core/generator/prompts.js +212 -0
- package/dist/core/generator/prompts.js.map +1 -0
- package/dist/core/generator/rag-manifest-generator.d.ts +37 -0
- package/dist/core/generator/rag-manifest-generator.d.ts.map +1 -0
- package/dist/core/generator/rag-manifest-generator.js +134 -0
- package/dist/core/generator/rag-manifest-generator.js.map +1 -0
- package/dist/core/generator/schemas.d.ts +365 -0
- package/dist/core/generator/schemas.d.ts.map +1 -0
- package/dist/core/generator/schemas.js +190 -0
- package/dist/core/generator/schemas.js.map +1 -0
- package/dist/core/generator/spec-pipeline.d.ts +123 -0
- package/dist/core/generator/spec-pipeline.d.ts.map +1 -0
- package/dist/core/generator/spec-pipeline.js +699 -0
- package/dist/core/generator/spec-pipeline.js.map +1 -0
- package/dist/core/generator/stages/stage1-survey.d.ts +19 -0
- package/dist/core/generator/stages/stage1-survey.d.ts.map +1 -0
- package/dist/core/generator/stages/stage1-survey.js +171 -0
- package/dist/core/generator/stages/stage1-survey.js.map +1 -0
- package/dist/core/generator/stages/stage2-entities.d.ts +11 -0
- package/dist/core/generator/stages/stage2-entities.d.ts.map +1 -0
- package/dist/core/generator/stages/stage2-entities.js +74 -0
- package/dist/core/generator/stages/stage2-entities.js.map +1 -0
- package/dist/core/generator/stages/stage3-services.d.ts +11 -0
- package/dist/core/generator/stages/stage3-services.d.ts.map +1 -0
- package/dist/core/generator/stages/stage3-services.js +85 -0
- package/dist/core/generator/stages/stage3-services.js.map +1 -0
- package/dist/core/generator/stages/stage4-api.d.ts +11 -0
- package/dist/core/generator/stages/stage4-api.d.ts.map +1 -0
- package/dist/core/generator/stages/stage4-api.js +72 -0
- package/dist/core/generator/stages/stage4-api.js.map +1 -0
- package/dist/core/generator/stages/stage5-architecture.d.ts +11 -0
- package/dist/core/generator/stages/stage5-architecture.d.ts.map +1 -0
- package/dist/core/generator/stages/stage5-architecture.js +75 -0
- package/dist/core/generator/stages/stage5-architecture.js.map +1 -0
- package/dist/core/generator/stages/stage6-adr.d.ts +8 -0
- package/dist/core/generator/stages/stage6-adr.d.ts.map +1 -0
- package/dist/core/generator/stages/stage6-adr.js +47 -0
- package/dist/core/generator/stages/stage6-adr.js.map +1 -0
- package/dist/core/services/chat-agent.d.ts +50 -0
- package/dist/core/services/chat-agent.d.ts.map +1 -0
- package/dist/core/services/chat-agent.js +369 -0
- package/dist/core/services/chat-agent.js.map +1 -0
- package/dist/core/services/chat-tools.d.ts +32 -0
- package/dist/core/services/chat-tools.d.ts.map +1 -0
- package/dist/core/services/chat-tools.js +494 -0
- package/dist/core/services/chat-tools.js.map +1 -0
- package/dist/core/services/config-manager.d.ts +61 -0
- package/dist/core/services/config-manager.d.ts.map +1 -0
- package/dist/core/services/config-manager.js +149 -0
- package/dist/core/services/config-manager.js.map +1 -0
- package/dist/core/services/edge-store.d.ts +57 -0
- package/dist/core/services/edge-store.d.ts.map +1 -0
- package/dist/core/services/edge-store.js +419 -0
- package/dist/core/services/edge-store.js.map +1 -0
- package/dist/core/services/gitignore-manager.d.ts +29 -0
- package/dist/core/services/gitignore-manager.d.ts.map +1 -0
- package/dist/core/services/gitignore-manager.js +95 -0
- package/dist/core/services/gitignore-manager.js.map +1 -0
- package/dist/core/services/index.d.ts +8 -0
- package/dist/core/services/index.d.ts.map +1 -0
- package/dist/core/services/index.js +8 -0
- package/dist/core/services/index.js.map +1 -0
- package/dist/core/services/llm-service.d.ts +379 -0
- package/dist/core/services/llm-service.d.ts.map +1 -0
- package/dist/core/services/llm-service.js +1553 -0
- package/dist/core/services/llm-service.js.map +1 -0
- package/dist/core/services/mcp-handlers/analysis.d.ts +127 -0
- package/dist/core/services/mcp-handlers/analysis.d.ts.map +1 -0
- package/dist/core/services/mcp-handlers/analysis.js +1185 -0
- package/dist/core/services/mcp-handlers/analysis.js.map +1 -0
- package/dist/core/services/mcp-handlers/change.d.ts +14 -0
- package/dist/core/services/mcp-handlers/change.d.ts.map +1 -0
- package/dist/core/services/mcp-handlers/change.js +416 -0
- package/dist/core/services/mcp-handlers/change.js.map +1 -0
- package/dist/core/services/mcp-handlers/decisions.d.ts +16 -0
- package/dist/core/services/mcp-handlers/decisions.d.ts.map +1 -0
- package/dist/core/services/mcp-handlers/decisions.js +239 -0
- package/dist/core/services/mcp-handlers/decisions.js.map +1 -0
- package/dist/core/services/mcp-handlers/graph.d.ts +94 -0
- package/dist/core/services/mcp-handlers/graph.d.ts.map +1 -0
- package/dist/core/services/mcp-handlers/graph.js +693 -0
- package/dist/core/services/mcp-handlers/graph.js.map +1 -0
- package/dist/core/services/mcp-handlers/orient.d.ts +17 -0
- package/dist/core/services/mcp-handlers/orient.d.ts.map +1 -0
- package/dist/core/services/mcp-handlers/orient.js +357 -0
- package/dist/core/services/mcp-handlers/orient.js.map +1 -0
- package/dist/core/services/mcp-handlers/semantic.d.ts +66 -0
- package/dist/core/services/mcp-handlers/semantic.d.ts.map +1 -0
- package/dist/core/services/mcp-handlers/semantic.js +432 -0
- package/dist/core/services/mcp-handlers/semantic.js.map +1 -0
- package/dist/core/services/mcp-handlers/utils.d.ts +85 -0
- package/dist/core/services/mcp-handlers/utils.d.ts.map +1 -0
- package/dist/core/services/mcp-handlers/utils.js +262 -0
- package/dist/core/services/mcp-handlers/utils.js.map +1 -0
- package/dist/core/services/mcp-watcher.d.ts +41 -0
- package/dist/core/services/mcp-watcher.d.ts.map +1 -0
- package/dist/core/services/mcp-watcher.js +254 -0
- package/dist/core/services/mcp-watcher.js.map +1 -0
- package/dist/core/services/project-detector.d.ts +32 -0
- package/dist/core/services/project-detector.d.ts.map +1 -0
- package/dist/core/services/project-detector.js +100 -0
- package/dist/core/services/project-detector.js.map +1 -0
- package/dist/core/test-generator/coverage-analyzer.d.ts +27 -0
- package/dist/core/test-generator/coverage-analyzer.d.ts.map +1 -0
- package/dist/core/test-generator/coverage-analyzer.js +285 -0
- package/dist/core/test-generator/coverage-analyzer.js.map +1 -0
- package/dist/core/test-generator/framework-detector.d.ts +17 -0
- package/dist/core/test-generator/framework-detector.d.ts.map +1 -0
- package/dist/core/test-generator/framework-detector.js +65 -0
- package/dist/core/test-generator/framework-detector.js.map +1 -0
- package/dist/core/test-generator/index.d.ts +14 -0
- package/dist/core/test-generator/index.d.ts.map +1 -0
- package/dist/core/test-generator/index.js +11 -0
- package/dist/core/test-generator/index.js.map +1 -0
- package/dist/core/test-generator/renderers/catch2.d.ts +8 -0
- package/dist/core/test-generator/renderers/catch2.d.ts.map +1 -0
- package/dist/core/test-generator/renderers/catch2.js +47 -0
- package/dist/core/test-generator/renderers/catch2.js.map +1 -0
- package/dist/core/test-generator/renderers/gtest.d.ts +8 -0
- package/dist/core/test-generator/renderers/gtest.d.ts.map +1 -0
- package/dist/core/test-generator/renderers/gtest.js +45 -0
- package/dist/core/test-generator/renderers/gtest.js.map +1 -0
- package/dist/core/test-generator/renderers/index.d.ts +20 -0
- package/dist/core/test-generator/renderers/index.d.ts.map +1 -0
- package/dist/core/test-generator/renderers/index.js +35 -0
- package/dist/core/test-generator/renderers/index.js.map +1 -0
- package/dist/core/test-generator/renderers/playwright.d.ts +8 -0
- package/dist/core/test-generator/renderers/playwright.d.ts.map +1 -0
- package/dist/core/test-generator/renderers/playwright.js +44 -0
- package/dist/core/test-generator/renderers/playwright.js.map +1 -0
- package/dist/core/test-generator/renderers/pytest.d.ts +8 -0
- package/dist/core/test-generator/renderers/pytest.d.ts.map +1 -0
- package/dist/core/test-generator/renderers/pytest.js +44 -0
- package/dist/core/test-generator/renderers/pytest.js.map +1 -0
- package/dist/core/test-generator/renderers/shared.d.ts +21 -0
- package/dist/core/test-generator/renderers/shared.d.ts.map +1 -0
- package/dist/core/test-generator/renderers/shared.js +56 -0
- package/dist/core/test-generator/renderers/shared.js.map +1 -0
- package/dist/core/test-generator/renderers/vitest.d.ts +8 -0
- package/dist/core/test-generator/renderers/vitest.d.ts.map +1 -0
- package/dist/core/test-generator/renderers/vitest.js +52 -0
- package/dist/core/test-generator/renderers/vitest.js.map +1 -0
- package/dist/core/test-generator/scenario-parser.d.ts +33 -0
- package/dist/core/test-generator/scenario-parser.d.ts.map +1 -0
- package/dist/core/test-generator/scenario-parser.js +244 -0
- package/dist/core/test-generator/scenario-parser.js.map +1 -0
- package/dist/core/test-generator/test-generator.d.ts +30 -0
- package/dist/core/test-generator/test-generator.d.ts.map +1 -0
- package/dist/core/test-generator/test-generator.js +174 -0
- package/dist/core/test-generator/test-generator.js.map +1 -0
- package/dist/core/test-generator/test-writer.d.ts +25 -0
- package/dist/core/test-generator/test-writer.d.ts.map +1 -0
- package/dist/core/test-generator/test-writer.js +128 -0
- package/dist/core/test-generator/test-writer.js.map +1 -0
- package/dist/core/test-generator/then-matchers.d.ts +35 -0
- package/dist/core/test-generator/then-matchers.d.ts.map +1 -0
- package/dist/core/test-generator/then-matchers.js +211 -0
- package/dist/core/test-generator/then-matchers.js.map +1 -0
- package/dist/core/verifier/index.d.ts +5 -0
- package/dist/core/verifier/index.d.ts.map +1 -0
- package/dist/core/verifier/index.js +5 -0
- package/dist/core/verifier/index.js.map +1 -0
- package/dist/core/verifier/verification-engine.d.ts +293 -0
- package/dist/core/verifier/verification-engine.d.ts.map +1 -0
- package/dist/core/verifier/verification-engine.js +919 -0
- package/dist/core/verifier/verification-engine.js.map +1 -0
- package/dist/types/index.d.ts +368 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +5 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/pipeline.d.ts +167 -0
- package/dist/types/pipeline.d.ts.map +1 -0
- package/dist/types/pipeline.js +5 -0
- package/dist/types/pipeline.js.map +1 -0
- package/dist/types/test-generator.d.ts +103 -0
- package/dist/types/test-generator.d.ts.map +1 -0
- package/dist/types/test-generator.js +17 -0
- package/dist/types/test-generator.js.map +1 -0
- package/dist/utils/command-helpers.d.ts +68 -0
- package/dist/utils/command-helpers.d.ts.map +1 -0
- package/dist/utils/command-helpers.js +150 -0
- package/dist/utils/command-helpers.js.map +1 -0
- package/dist/utils/errors.d.ts +51 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +129 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/logger.d.ts +149 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +342 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/misc.d.ts +10 -0
- package/dist/utils/misc.d.ts.map +1 -0
- package/dist/utils/misc.js +21 -0
- package/dist/utils/misc.js.map +1 -0
- package/dist/utils/progress.d.ts +142 -0
- package/dist/utils/progress.d.ts.map +1 -0
- package/dist/utils/progress.js +283 -0
- package/dist/utils/progress.js.map +1 -0
- package/dist/utils/prompts.d.ts +53 -0
- package/dist/utils/prompts.d.ts.map +1 -0
- package/dist/utils/prompts.js +199 -0
- package/dist/utils/prompts.js.map +1 -0
- package/dist/utils/shutdown.d.ts +89 -0
- package/dist/utils/shutdown.d.ts.map +1 -0
- package/dist/utils/shutdown.js +238 -0
- package/dist/utils/shutdown.js.map +1 -0
- package/examples/bmad/README.md +113 -0
- package/examples/bmad/agents/architect.md +226 -0
- package/examples/bmad/agents/dev-brownfield.md +69 -0
- package/examples/bmad/setup/architect.customize.yaml +14 -0
- package/examples/bmad/tasks/implement-story.md +254 -0
- package/examples/bmad/tasks/onboarding.md +169 -0
- package/examples/bmad/tasks/refactor.md +178 -0
- package/examples/bmad/tasks/sprint-planning.md +168 -0
- package/examples/bmad/templates/story.md +108 -0
- package/examples/cline-workflows/openlore-analyze-codebase.md +101 -0
- package/examples/cline-workflows/openlore-check-spec-drift.md +102 -0
- package/examples/cline-workflows/openlore-execute-refactor.md +212 -0
- package/examples/cline-workflows/openlore-implement-feature.md +266 -0
- package/examples/cline-workflows/openlore-plan-refactor.md +279 -0
- package/examples/cline-workflows/openlore-refactor-codebase.md +16 -0
- package/examples/cline-workflows/openlore-write-tests.md +177 -0
- package/examples/drift-demo/openspec/config.yaml +14 -0
- package/examples/drift-demo/openspec/specs/architecture/spec.md +30 -0
- package/examples/drift-demo/openspec/specs/auth/spec.md +71 -0
- package/examples/drift-demo/openspec/specs/database/spec.md +33 -0
- package/examples/drift-demo/openspec/specs/overview/spec.md +20 -0
- package/examples/drift-demo/openspec/specs/projects/spec.md +55 -0
- package/examples/drift-demo/openspec/specs/tasks/spec.md +78 -0
- package/examples/drift-demo/package.json +21 -0
- package/examples/drift-demo/src/auth/auth-middleware.ts +30 -0
- package/examples/drift-demo/src/auth/auth-routes.ts +29 -0
- package/examples/drift-demo/src/auth/auth-service.ts +45 -0
- package/examples/drift-demo/src/database/connection.ts +27 -0
- package/examples/drift-demo/src/index.ts +16 -0
- package/examples/drift-demo/src/projects/project-model.ts +15 -0
- package/examples/drift-demo/src/projects/project-service.ts +34 -0
- package/examples/drift-demo/src/tasks/task-model.ts +37 -0
- package/examples/drift-demo/src/tasks/task-routes.ts +53 -0
- package/examples/drift-demo/src/tasks/task-service.ts +60 -0
- package/examples/drift-demo/src/utils/validation.ts +11 -0
- package/examples/drift-demo/tests/auth.test.ts +4 -0
- package/examples/drift-demo/tests/tasks.test.ts +4 -0
- package/examples/drift-demo/tsconfig.json +10 -0
- package/examples/drift-test/run-drift-test.sh +1087 -0
- package/examples/gsd/README.md +119 -0
- package/examples/gsd/commands/gsd/openlore-drift.md +111 -0
- package/examples/gsd/commands/gsd/openlore-orient.md +191 -0
- package/examples/mistral-vibe/README.md +101 -0
- package/examples/mistral-vibe/antipatterns-template.md +18 -0
- package/examples/mistral-vibe/skills/openlore-analyze-codebase/SKILL.md +124 -0
- package/examples/mistral-vibe/skills/openlore-brainstorm/SKILL.md +379 -0
- package/examples/mistral-vibe/skills/openlore-debug/SKILL.md +330 -0
- package/examples/mistral-vibe/skills/openlore-execute-refactor/SKILL.md +291 -0
- package/examples/mistral-vibe/skills/openlore-generate/SKILL.md +245 -0
- package/examples/mistral-vibe/skills/openlore-implement-story/SKILL.md +326 -0
- package/examples/mistral-vibe/skills/openlore-plan-refactor/SKILL.md +365 -0
- package/examples/mistral-vibe/skills/openlore-review-changes/SKILL.md +128 -0
- package/examples/mistral-vibe/skills/openlore-write-tests/SKILL.md +261 -0
- package/examples/opencode/agent-guard.ts +170 -0
- package/examples/opencode/plugins/anti-laziness.ts +202 -0
- package/examples/opencode/plugins/lib/openlore-context-injector-helpers.ts +116 -0
- package/examples/opencode/plugins/lib/openlore-decision-extractor-helpers.ts +65 -0
- package/examples/opencode/plugins/openlore-context-injector.test.ts +211 -0
- package/examples/opencode/plugins/openlore-context-injector.ts +165 -0
- package/examples/opencode/plugins/openlore-decision-extractor.test.ts +131 -0
- package/examples/opencode/plugins/openlore-decision-extractor.ts +322 -0
- package/examples/opencode/plugins/openlore-enforcer.ts +227 -0
- package/examples/opencode/prompts/sisyphus-sdd.md +150 -0
- package/examples/opencode-skills/openlore-analyze-codebase/SKILL.md +101 -0
- package/examples/opencode-skills/openlore-brainstorm/SKILL.md +354 -0
- package/examples/opencode-skills/openlore-debug/SKILL.md +291 -0
- package/examples/opencode-skills/openlore-execute-refactor/SKILL.md +241 -0
- package/examples/opencode-skills/openlore-generate/SKILL.md +236 -0
- package/examples/opencode-skills/openlore-implement-story/SKILL.md +251 -0
- package/examples/opencode-skills/openlore-plan-refactor/SKILL.md +298 -0
- package/examples/opencode-skills/openlore-review-changes/SKILL.md +134 -0
- package/examples/opencode-skills/openlore-write-tests/SKILL.md +230 -0
- package/examples/openspec-analysis/README.md +59 -0
- package/examples/openspec-analysis/SUMMARY.md +72 -0
- package/examples/openspec-analysis/config.json +16 -0
- package/examples/openspec-analysis/dependencies.mermaid +35 -0
- package/examples/openspec-analysis/dependency-graph.json +12116 -0
- package/examples/openspec-analysis/llm-context.json +119 -0
- package/examples/openspec-analysis/repo-structure.json +871 -0
- package/examples/openspec-cli/README.md +67 -0
- package/examples/openspec-cli/openspec/config.yaml +26 -0
- package/examples/openspec-cli/openspec/specs/architecture/spec.md +178 -0
- package/examples/openspec-cli/openspec/specs/artifact-graph/spec.md +143 -0
- package/examples/openspec-cli/openspec/specs/cli/spec.md +138 -0
- package/examples/openspec-cli/openspec/specs/overview/spec.md +60 -0
- package/examples/openspec-cli/openspec/specs/parsing/spec.md +123 -0
- package/examples/openspec-cli/openspec/specs/validation/spec.md +108 -0
- package/examples/spec-kit/README.md +104 -0
- package/examples/spec-kit/commands/drift.md +87 -0
- package/examples/spec-kit/commands/orient.md +138 -0
- package/examples/spec-kit/extension.yml +54 -0
- package/package.json +125 -0
- package/src/viewer/InteractiveGraphViewer.jsx +1600 -0
- package/src/viewer/app/index.html +17 -0
- package/src/viewer/app/main.jsx +13 -0
- package/src/viewer/components/ArchitectureView.jsx +177 -0
- package/src/viewer/components/ChatPanel.jsx +450 -0
- package/src/viewer/components/ClassGraph.jsx +782 -0
- package/src/viewer/components/ClusterGraph.jsx +469 -0
- package/src/viewer/components/FilterBar.jsx +179 -0
- package/src/viewer/components/FlatGraph.jsx +282 -0
- package/src/viewer/components/MicroComponents.jsx +85 -0
- package/src/viewer/hooks/usePanZoom.js +79 -0
- package/src/viewer/utils/constants.js +64 -0
- package/src/viewer/utils/graph-helpers.js +303 -0
- package/src/viewer/utils/graph-helpers.test.ts +39 -0
- package/src/viewer/utils/themes.js +206 -0
- package/stubs/tree-sitter-cli-stub/package.json +6 -0
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
# openlore: Implement Feature
|
|
2
|
+
|
|
3
|
+
Plan and implement a new feature with full architectural context:
|
|
4
|
+
architecture overview → OpenSpec requirements → insertion points → implementation → drift check.
|
|
5
|
+
|
|
6
|
+
No code is written until Step 6. Steps 1–5 are read-only analysis.
|
|
7
|
+
|
|
8
|
+
## Step 1: Get the project directory and feature description
|
|
9
|
+
|
|
10
|
+
Ask the user:
|
|
11
|
+
|
|
12
|
+
<ask_followup_question>
|
|
13
|
+
<question>Which project directory and what feature should I implement?</question>
|
|
14
|
+
<options>["Current workspace root", "Enter a different path"]</options>
|
|
15
|
+
</ask_followup_question>
|
|
16
|
+
|
|
17
|
+
Also ask for a brief description of the feature if not already provided (1–3 sentences).
|
|
18
|
+
Store it as `$FEATURE_DESCRIPTION`.
|
|
19
|
+
|
|
20
|
+
If `.claude/antipatterns.md` exists in the project, read it and store as `$ANTIPATTERNS`.
|
|
21
|
+
This list will be cross-checked at Step 5b.
|
|
22
|
+
|
|
23
|
+
## Step 2: Get the architecture overview
|
|
24
|
+
|
|
25
|
+
Orient yourself before touching any code.
|
|
26
|
+
|
|
27
|
+
<use_mcp_tool>
|
|
28
|
+
<server_name>openlore</server_name>
|
|
29
|
+
<tool_name>get_architecture_overview</tool_name>
|
|
30
|
+
<arguments>{"directory": "$DIRECTORY"}</arguments>
|
|
31
|
+
</use_mcp_tool>
|
|
32
|
+
|
|
33
|
+
From the result, note:
|
|
34
|
+
- Which cluster(s) the feature most likely belongs to (based on role and name)
|
|
35
|
+
- Critical hub functions to avoid touching unnecessarily (high fan-in → high blast radius)
|
|
36
|
+
- Existing entry points — the feature may need to hook in at one of them
|
|
37
|
+
|
|
38
|
+
If analysis data is missing (`{ "error": "..." }`), run `analyze_codebase` first:
|
|
39
|
+
|
|
40
|
+
<use_mcp_tool>
|
|
41
|
+
<server_name>openlore</server_name>
|
|
42
|
+
<tool_name>analyze_codebase</tool_name>
|
|
43
|
+
<arguments>{"directory": "$DIRECTORY"}</arguments>
|
|
44
|
+
</use_mcp_tool>
|
|
45
|
+
|
|
46
|
+
Then retry `get_architecture_overview`.
|
|
47
|
+
|
|
48
|
+
## Step 2.5: Stack inventory (conditional)
|
|
49
|
+
|
|
50
|
+
Based on the feature description and architecture overview results, call the relevant inventory tool(s) before reading any source file. Skip if the feature clearly involves none of these areas.
|
|
51
|
+
|
|
52
|
+
| Feature involves | Tool |
|
|
53
|
+
|---|---|
|
|
54
|
+
| Data models / ORM / database / tables | `get_schema_inventory` |
|
|
55
|
+
| HTTP routes / API / endpoints | `get_route_inventory` |
|
|
56
|
+
| Config / env vars / secrets | `get_env_vars` |
|
|
57
|
+
| UI components | `get_ui_components` |
|
|
58
|
+
|
|
59
|
+
<use_mcp_tool>
|
|
60
|
+
<server_name>openlore</server_name>
|
|
61
|
+
<tool_name>get_schema_inventory</tool_name>
|
|
62
|
+
<arguments>{"directory": "$DIRECTORY"}</arguments>
|
|
63
|
+
</use_mcp_tool>
|
|
64
|
+
|
|
65
|
+
Use results to ground the implementation plan in existing schemas/routes — don't re-create what already exists.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Step 2.6: Audit spec coverage of the target domain
|
|
70
|
+
|
|
71
|
+
Run a parity audit to check if the domain you're about to touch has spec gaps.
|
|
72
|
+
|
|
73
|
+
<use_mcp_tool>
|
|
74
|
+
<server_name>openlore</server_name>
|
|
75
|
+
<tool_name>audit_spec_coverage</tool_name>
|
|
76
|
+
<arguments>{"directory": "$DIRECTORY"}</arguments>
|
|
77
|
+
</use_mcp_tool>
|
|
78
|
+
|
|
79
|
+
From the result, check:
|
|
80
|
+
- `staleDomains` — if the target domain appears here, its spec is outdated.
|
|
81
|
+
Recommend running `openlore generate --domains $DOMAIN` before implementing.
|
|
82
|
+
- `hubGaps` — uncovered hub functions. If the feature touches one of these,
|
|
83
|
+
add it to the adversarial check in Step 5b (high blast radius + no spec = risk).
|
|
84
|
+
|
|
85
|
+
If both are clean, continue to Step 3 without action.
|
|
86
|
+
|
|
87
|
+
## Step 3: Search the OpenSpec specifications (if available)
|
|
88
|
+
|
|
89
|
+
Discover which spec domains exist, then search for requirements relevant to the feature.
|
|
90
|
+
|
|
91
|
+
<use_mcp_tool>
|
|
92
|
+
<server_name>openlore</server_name>
|
|
93
|
+
<tool_name>list_spec_domains</tool_name>
|
|
94
|
+
<arguments>{"directory": "$DIRECTORY"}</arguments>
|
|
95
|
+
</use_mcp_tool>
|
|
96
|
+
|
|
97
|
+
If domains are found, search the specs semantically:
|
|
98
|
+
|
|
99
|
+
<use_mcp_tool>
|
|
100
|
+
<server_name>openlore</server_name>
|
|
101
|
+
<tool_name>search_specs</tool_name>
|
|
102
|
+
<arguments>{"directory": "$DIRECTORY", "query": "$FEATURE_DESCRIPTION", "limit": 5}</arguments>
|
|
103
|
+
</use_mcp_tool>
|
|
104
|
+
|
|
105
|
+
From the results, extract:
|
|
106
|
+
- Existing requirements that relate to the feature (note their `id` for drift tracking)
|
|
107
|
+
- Any constraints or acceptance criteria already documented
|
|
108
|
+
- The `linkedFiles` — these are the source files already mapped to those requirements
|
|
109
|
+
(will be highlighted in the diagram viewer)
|
|
110
|
+
|
|
111
|
+
If `search_specs` returns an index-not-found error, fall back to reading the spec file
|
|
112
|
+
directly: `openspec/specs/<domain>/spec.md`.
|
|
113
|
+
|
|
114
|
+
If no spec exists yet, note it — the feature will be "uncovered" and `check_spec_drift`
|
|
115
|
+
will flag it after implementation. That is expected: propose running `openlore generate`
|
|
116
|
+
after the feature lands.
|
|
117
|
+
|
|
118
|
+
## Step 4: Find insertion points
|
|
119
|
+
|
|
120
|
+
Identify the best functions and files to extend or hook into.
|
|
121
|
+
|
|
122
|
+
<use_mcp_tool>
|
|
123
|
+
<server_name>openlore</server_name>
|
|
124
|
+
<tool_name>suggest_insertion_points</tool_name>
|
|
125
|
+
<arguments>{"directory": "$DIRECTORY", "query": "$FEATURE_DESCRIPTION", "limit": 5}</arguments>
|
|
126
|
+
</use_mcp_tool>
|
|
127
|
+
|
|
128
|
+
For each candidate, present:
|
|
129
|
+
- Rank, name, file, role, strategy, reason
|
|
130
|
+
- Whether it appears in the relevant cluster identified in Step 2
|
|
131
|
+
|
|
132
|
+
Then pick the top 1–2 candidates and get minimal context (callers, callees, body, test coverage — ~300 tokens):
|
|
133
|
+
|
|
134
|
+
<use_mcp_tool>
|
|
135
|
+
<server_name>openlore</server_name>
|
|
136
|
+
<tool_name>get_minimal_context</tool_name>
|
|
137
|
+
<arguments>{"directory": "$DIRECTORY", "functionName": "$TOP_CANDIDATE"}</arguments>
|
|
138
|
+
</use_mcp_tool>
|
|
139
|
+
|
|
140
|
+
If the function has high fanIn (>10), also check its community to understand broader blast radius:
|
|
141
|
+
|
|
142
|
+
<use_mcp_tool>
|
|
143
|
+
<server_name>openlore</server_name>
|
|
144
|
+
<tool_name>get_cluster</tool_name>
|
|
145
|
+
<arguments>{"directory": "$DIRECTORY", "functionName": "$TOP_CANDIDATE"}</arguments>
|
|
146
|
+
</use_mcp_tool>
|
|
147
|
+
|
|
148
|
+
Present callers, callees, community label, and test coverage. Ask the user to confirm the chosen insertion point.
|
|
149
|
+
|
|
150
|
+
## Step 5: Read the skeleton of the target file(s)
|
|
151
|
+
|
|
152
|
+
Get a noise-stripped structural view of the file(s) you will modify.
|
|
153
|
+
|
|
154
|
+
<use_mcp_tool>
|
|
155
|
+
<server_name>openlore</server_name>
|
|
156
|
+
<tool_name>get_function_skeleton</tool_name>
|
|
157
|
+
<arguments>{"directory": "$DIRECTORY", "filePath": "$TARGET_FILE"}</arguments>
|
|
158
|
+
</use_mcp_tool>
|
|
159
|
+
|
|
160
|
+
Use the skeleton to:
|
|
161
|
+
- Confirm the insertion strategy (extend existing function vs. add new function)
|
|
162
|
+
- Identify the exact line range where new code will be added
|
|
163
|
+
- Spot any existing error handling or type patterns to follow
|
|
164
|
+
|
|
165
|
+
Ask the user to confirm the implementation approach before writing any code:
|
|
166
|
+
|
|
167
|
+
> "I plan to [extend / add / hook into] `$TOP_CANDIDATE` in `$TARGET_FILE` by [brief description].
|
|
168
|
+
> Does this match your intent?"
|
|
169
|
+
|
|
170
|
+
## Step 5b: Adversarial self-check
|
|
171
|
+
|
|
172
|
+
Before writing any code, state explicitly what could break with this approach.
|
|
173
|
+
If `$ANTIPATTERNS` was loaded in Step 1, include any applicable patterns.
|
|
174
|
+
|
|
175
|
+
> "Risk check on `$TOP_CANDIDATE`:
|
|
176
|
+
> - `$CALLER_A` and `$CALLER_B` depend on this function — verify their assumptions hold after the change.
|
|
177
|
+
> - `$EDGE_CASE` is not covered by the current test suite — add it in Step 6.
|
|
178
|
+
> - [if antipatterns apply] AP-NNN (`$PATTERN_NAME`) — `$RULE` — applies here because `$REASON`."
|
|
179
|
+
|
|
180
|
+
This is not a gate — do not wait for user input. It is a mandatory self-check
|
|
181
|
+
that must appear in the output before the first line of code is written.
|
|
182
|
+
|
|
183
|
+
## Step 5c: Record the design decision
|
|
184
|
+
|
|
185
|
+
Before writing any code, record the implementation approach if it represents a significant architectural choice:
|
|
186
|
+
|
|
187
|
+
```xml
|
|
188
|
+
<use_mcp_tool>
|
|
189
|
+
<server_name>openlore</server_name>
|
|
190
|
+
<tool_name>record_decision</tool_name>
|
|
191
|
+
<arguments>{
|
|
192
|
+
"directory": "$DIRECTORY",
|
|
193
|
+
"title": "$APPROACH_TITLE",
|
|
194
|
+
"rationale": "$WHY_THIS_APPROACH",
|
|
195
|
+
"consequences": "$TRADE_OFFS",
|
|
196
|
+
"affectedFiles": ["$TARGET_FILE"]
|
|
197
|
+
}</arguments>
|
|
198
|
+
</use_mcp_tool>
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
Call this for: a non-obvious insertion point, a pattern chosen over alternatives, a new dependency introduced, or an interface contract established. Skip for trivial changes where the approach is self-evident (a one-liner, a config flag, an obvious helper).
|
|
202
|
+
|
|
203
|
+
## Step 6: Implement the feature
|
|
204
|
+
|
|
205
|
+
Apply the changes incrementally:
|
|
206
|
+
|
|
207
|
+
1. **Add new types / interfaces first** (if needed) — separate commit
|
|
208
|
+
2. **Implement the core logic** at the chosen insertion point
|
|
209
|
+
3. **Update callers** if the insertion requires updating call sites
|
|
210
|
+
4. **Add or update tests** — at minimum one test covering the new behaviour
|
|
211
|
+
5. **Run the test suite** to confirm nothing is broken
|
|
212
|
+
|
|
213
|
+
Follow existing code style (naming conventions, error handling, import style) observed
|
|
214
|
+
in the skeleton from Step 5.
|
|
215
|
+
|
|
216
|
+
## Step 7: Check spec drift
|
|
217
|
+
|
|
218
|
+
After implementing, verify the feature is covered by specs (or flag missing coverage).
|
|
219
|
+
|
|
220
|
+
<use_mcp_tool>
|
|
221
|
+
<server_name>openlore</server_name>
|
|
222
|
+
<tool_name>check_spec_drift</tool_name>
|
|
223
|
+
<arguments>{"directory": "$DIRECTORY"}</arguments>
|
|
224
|
+
</use_mcp_tool>
|
|
225
|
+
|
|
226
|
+
### If drift is detected
|
|
227
|
+
|
|
228
|
+
Present the issues table (see `/openlore-check-spec-drift` for format).
|
|
229
|
+
|
|
230
|
+
For `uncovered` issues on the new files: this is expected if no spec existed.
|
|
231
|
+
Offer to run `openlore generate` to create/update the spec:
|
|
232
|
+
|
|
233
|
+
> "The new file `$NEW_FILE` has no matching spec. Run `openlore generate` to infer
|
|
234
|
+
> one from the implementation, or edit the spec manually if the domain spec already
|
|
235
|
+
> partially covers it."
|
|
236
|
+
|
|
237
|
+
For `gap` issues on existing specs: the new code changed the public API of a covered
|
|
238
|
+
domain. Run `openlore generate --domains $DOMAIN` to regenerate.
|
|
239
|
+
|
|
240
|
+
### If no drift
|
|
241
|
+
|
|
242
|
+
> ✅ All changed files are covered by up-to-date specs.
|
|
243
|
+
|
|
244
|
+
## Step 8: Summarise
|
|
245
|
+
|
|
246
|
+
Present a brief implementation summary:
|
|
247
|
+
|
|
248
|
+
- **Feature**: $FEATURE_DESCRIPTION
|
|
249
|
+
- **Files changed**: list with line counts
|
|
250
|
+
- **Insertion point**: $TOP_CANDIDATE in $TARGET_FILE (role: $ROLE, strategy: $STRATEGY)
|
|
251
|
+
- **Tests**: N added / N updated
|
|
252
|
+
- **Spec drift**: ✅ clean / ⚠️ N issues (remediation: …)
|
|
253
|
+
|
|
254
|
+
Suggest follow-up actions if applicable:
|
|
255
|
+
- Regenerate specs (`openlore generate`)
|
|
256
|
+
- Re-run analysis to update call graph (`analyze_codebase`)
|
|
257
|
+
- If the feature touches a hub function, suggest `/openlore-plan-refactor` to
|
|
258
|
+
track growing complexity
|
|
259
|
+
|
|
260
|
+
## Absolute constraints
|
|
261
|
+
|
|
262
|
+
- **No code written before Step 6** — analysis and user confirmation come first
|
|
263
|
+
- Always confirm the insertion point with the user before implementing
|
|
264
|
+
- Step 5b adversarial self-check is mandatory — never skip it
|
|
265
|
+
- Run tests after implementation — never skip
|
|
266
|
+
- Run `check_spec_drift` as the final verification step
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
# openlore: Plan Refactor
|
|
2
|
+
|
|
3
|
+
Identify the highest-priority refactoring target using static analysis, assess
|
|
4
|
+
its blast radius, and produce a detailed written plan — saved to
|
|
5
|
+
`.openlore/refactor-plan.md` — that `/openlore-execute-refactor` can follow
|
|
6
|
+
step by step without losing context.
|
|
7
|
+
|
|
8
|
+
This workflow makes **no code changes**. It only reads and writes the plan file.
|
|
9
|
+
|
|
10
|
+
## Step 1: Confirm the project directory
|
|
11
|
+
|
|
12
|
+
Ask the user which project to analyse, or confirm the current workspace root.
|
|
13
|
+
|
|
14
|
+
<ask_followup_question>
|
|
15
|
+
<question>Which project directory should I plan the refactor for?</question>
|
|
16
|
+
<options>["Current workspace root", "Enter a different path"]</options>
|
|
17
|
+
</ask_followup_question>
|
|
18
|
+
|
|
19
|
+
## Step 2: Run static analysis
|
|
20
|
+
|
|
21
|
+
Analyse the project. If analysis already ran recently, skip unless the user
|
|
22
|
+
requests a fresh run.
|
|
23
|
+
|
|
24
|
+
<use_mcp_tool>
|
|
25
|
+
<server_name>openlore</server_name>
|
|
26
|
+
<tool_name>analyze_codebase</tool_name>
|
|
27
|
+
<arguments>{"directory": "$DIRECTORY"}</arguments>
|
|
28
|
+
</use_mcp_tool>
|
|
29
|
+
|
|
30
|
+
## Step 3: Get the full refactoring report
|
|
31
|
+
|
|
32
|
+
Retrieve the prioritised list of functions with structural issues.
|
|
33
|
+
|
|
34
|
+
<use_mcp_tool>
|
|
35
|
+
<server_name>openlore</server_name>
|
|
36
|
+
<tool_name>get_refactor_report</tool_name>
|
|
37
|
+
<arguments>{"directory": "$DIRECTORY"}</arguments>
|
|
38
|
+
</use_mcp_tool>
|
|
39
|
+
|
|
40
|
+
Present the top 5 candidates in a table: function, file, issues, priority score.
|
|
41
|
+
|
|
42
|
+
## Step 3b: Check for duplicate code (optional enrichment)
|
|
43
|
+
|
|
44
|
+
Call `get_duplicate_report` to surface clones that overlap with the top candidates.
|
|
45
|
+
If the target function (or any callee) appears in a clone group, note it in the plan:
|
|
46
|
+
consolidated duplicates reduce blast radius before extracting logic.
|
|
47
|
+
|
|
48
|
+
<use_mcp_tool>
|
|
49
|
+
<server_name>openlore</server_name>
|
|
50
|
+
<tool_name>get_duplicate_report</tool_name>
|
|
51
|
+
<arguments>{"directory": "$DIRECTORY"}</arguments>
|
|
52
|
+
</use_mcp_tool>
|
|
53
|
+
|
|
54
|
+
If a top candidate appears in a clone group, prepend a **Deduplication note** to the plan:
|
|
55
|
+
> "⚠️ `<function>` has N near-clones. Consolidate them first to reduce the blast radius
|
|
56
|
+
> of this refactor."
|
|
57
|
+
|
|
58
|
+
Before asking the user to pick a target, **check test coverage for the files
|
|
59
|
+
containing the top candidates**. Detect the coverage tool from the project
|
|
60
|
+
(look for `package.json` scripts, `pytest.ini`, `Cargo.toml`, `go.mod`, etc.)
|
|
61
|
+
and run it scoped to those files only:
|
|
62
|
+
|
|
63
|
+
- Node.js → `npm test -- --coverage --collectCoverageFrom="<files>"`
|
|
64
|
+
- Python → `pytest --cov=<module> --cov-report=term-missing`
|
|
65
|
+
- Rust → `cargo tarpaulin --include-files <files>`
|
|
66
|
+
- Go → `go test -cover ./...` (filter relevant packages)
|
|
67
|
+
|
|
68
|
+
For each candidate file, present a compact coverage badge:
|
|
69
|
+
|
|
70
|
+
| Function | File | Priority | Coverage |
|
|
71
|
+
|---|---|---|---|
|
|
72
|
+
| ... | ... | ... | 72% ✅ / 35% ⚠️ / 0% 🚫 |
|
|
73
|
+
|
|
74
|
+
Apply these thresholds to annotate each row:
|
|
75
|
+
|
|
76
|
+
| Coverage | Badge | Meaning |
|
|
77
|
+
|---|---|---|
|
|
78
|
+
| ≥ 70% lines | ✅ | Safe to refactor |
|
|
79
|
+
| 40–69% lines | ⚠️ | Write characterisation tests first |
|
|
80
|
+
| < 40% lines | 🛑 | Strongly discouraged — recommend tests first |
|
|
81
|
+
| 0% (no tests) | 🚫 | Blocked — propose a test harness before proceeding |
|
|
82
|
+
|
|
83
|
+
If **all top candidates are below 40%**, tell the user:
|
|
84
|
+
> "Every high-priority target has insufficient test coverage (< 40%). Refactoring
|
|
85
|
+
> without tests risks introducing silent regressions. I recommend writing a
|
|
86
|
+
> minimal test harness for at least one target before proceeding. Would you like
|
|
87
|
+
> me to suggest test cases based on the function signatures?"
|
|
88
|
+
|
|
89
|
+
Then ask the user which one to tackle first, or pick the top one by default.
|
|
90
|
+
Prefer candidates with higher coverage when scores are otherwise close.
|
|
91
|
+
|
|
92
|
+
## Step 4: Assess impact
|
|
93
|
+
|
|
94
|
+
First, get condensed view (callers, callees, body, test coverage in one call):
|
|
95
|
+
|
|
96
|
+
<use_mcp_tool>
|
|
97
|
+
<server_name>openlore</server_name>
|
|
98
|
+
<tool_name>get_minimal_context</tool_name>
|
|
99
|
+
<arguments>{"directory": "$DIRECTORY", "functionName": "$FUNCTION_NAME"}</arguments>
|
|
100
|
+
</use_mcp_tool>
|
|
101
|
+
|
|
102
|
+
Then get the full impact analysis:
|
|
103
|
+
|
|
104
|
+
<use_mcp_tool>
|
|
105
|
+
<server_name>openlore</server_name>
|
|
106
|
+
<tool_name>analyze_impact</tool_name>
|
|
107
|
+
<arguments>{"directory": "$DIRECTORY", "symbol": "$FUNCTION_NAME"}</arguments>
|
|
108
|
+
</use_mcp_tool>
|
|
109
|
+
|
|
110
|
+
Note:
|
|
111
|
+
- Risk score (0–100) and what it means
|
|
112
|
+
- Recommended strategy (extract / split / facade / delegate)
|
|
113
|
+
- Upstream callers and downstream callees (keep the top 5 of each for the plan)
|
|
114
|
+
|
|
115
|
+
## Step 5: Visualise the call neighbourhood
|
|
116
|
+
|
|
117
|
+
Render the subgraph to map callers and callees precisely.
|
|
118
|
+
|
|
119
|
+
<use_mcp_tool>
|
|
120
|
+
<server_name>openlore</server_name>
|
|
121
|
+
<tool_name>get_subgraph</tool_name>
|
|
122
|
+
<arguments>{"directory": "$DIRECTORY", "functionName": "$FUNCTION_NAME", "direction": "both", "format": "mermaid"}</arguments>
|
|
123
|
+
</use_mcp_tool>
|
|
124
|
+
|
|
125
|
+
Show the Mermaid diagram to the user.
|
|
126
|
+
|
|
127
|
+
## Step 6: Find safe entry points
|
|
128
|
+
|
|
129
|
+
Identify low-risk leaf functions that can be extracted first (bottom-up).
|
|
130
|
+
|
|
131
|
+
<use_mcp_tool>
|
|
132
|
+
<server_name>openlore</server_name>
|
|
133
|
+
<tool_name>get_low_risk_refactor_candidates</tool_name>
|
|
134
|
+
<arguments>{"directory": "$DIRECTORY", "filePattern": "$TARGET_FILE", "limit": 5}</arguments>
|
|
135
|
+
</use_mcp_tool>
|
|
136
|
+
|
|
137
|
+
Cross-reference with the subgraph from Step 5: a candidate is a good first
|
|
138
|
+
extraction if it already appears as a callee of the target function.
|
|
139
|
+
|
|
140
|
+
## Step 6b: Find insertion points for extracted helpers
|
|
141
|
+
|
|
142
|
+
Before designing the change sequence, identify where extracted functions should land.
|
|
143
|
+
This avoids creating helpers in the wrong file or layer.
|
|
144
|
+
|
|
145
|
+
<use_mcp_tool>
|
|
146
|
+
<server_name>openlore</server_name>
|
|
147
|
+
<tool_name>suggest_insertion_points</tool_name>
|
|
148
|
+
<arguments>{"directory": "$DIRECTORY", "query": "extract helper from $FUNCTION_NAME", "limit": 5}</arguments>
|
|
149
|
+
</use_mcp_tool>
|
|
150
|
+
|
|
151
|
+
For each candidate returned, note its role (entry_point / orchestrator / hub / utility / internal)
|
|
152
|
+
and the suggested strategy. Cross-reference with the subgraph from Step 5: prefer candidates
|
|
153
|
+
that already call into — or are called by — the target function.
|
|
154
|
+
|
|
155
|
+
## Step 7: Design the change sequence
|
|
156
|
+
|
|
157
|
+
Based on the recommended strategy from Step 4, design an ordered sequence of
|
|
158
|
+
atomic changes. Each change must specify:
|
|
159
|
+
|
|
160
|
+
- **What**: the exact block of logic to move (line range or description)
|
|
161
|
+
- **New name**: the function or method name to give it
|
|
162
|
+
- **Target file**: the file where it will live after the move
|
|
163
|
+
- If the logic belongs to an existing module: name that file
|
|
164
|
+
- If no suitable module exists: propose a new file path (e.g.
|
|
165
|
+
`src/services/validation.ts`) and justify the choice
|
|
166
|
+
- **Target class** (if applicable): the class or namespace to place it in
|
|
167
|
+
- **Callers to update**: list every call site that will need updating
|
|
168
|
+
|
|
169
|
+
For each strategy, apply these rules:
|
|
170
|
+
|
|
171
|
+
- **split**: decompose the function into N sub-functions; each sub-function
|
|
172
|
+
stays in the same file unless it clearly belongs elsewhere
|
|
173
|
+
- **extract**: pull out a helper; place it in the nearest cohesive module or
|
|
174
|
+
create a new file if none exists
|
|
175
|
+
- **facade**: keep the original signature, delegate body to smaller functions;
|
|
176
|
+
create a private companion module if the file would exceed 300 lines
|
|
177
|
+
- **delegate**: move ownership logic to callers; update each caller file listed
|
|
178
|
+
in the upstream chain
|
|
179
|
+
|
|
180
|
+
Present the full change sequence to the user for review and ask for confirmation
|
|
181
|
+
before writing the plan file.
|
|
182
|
+
|
|
183
|
+
## Step 8: Write the plan file
|
|
184
|
+
|
|
185
|
+
Create `.openlore/refactor-plan.md` in the project directory with the following
|
|
186
|
+
structure (fill every section — leave nothing as "TBD"):
|
|
187
|
+
|
|
188
|
+
```markdown
|
|
189
|
+
# Refactor Plan
|
|
190
|
+
|
|
191
|
+
Generated: <ISO date>
|
|
192
|
+
Workflow: /openlore-plan-refactor → /openlore-execute-refactor
|
|
193
|
+
|
|
194
|
+
## Target
|
|
195
|
+
|
|
196
|
+
- **Function**: <name>
|
|
197
|
+
- **File**: <relative path>
|
|
198
|
+
- **Lines**: <start>–<end> (read the file to confirm)
|
|
199
|
+
- **Risk score**: <0–100>
|
|
200
|
+
- **Strategy**: <extract | split | facade | delegate>
|
|
201
|
+
- **Priority score before refactor**: <value>
|
|
202
|
+
|
|
203
|
+
## Why
|
|
204
|
+
|
|
205
|
+
- <issue 1 from refactor report>
|
|
206
|
+
- <issue 2>
|
|
207
|
+
- ...
|
|
208
|
+
|
|
209
|
+
## Callers (upstream — must not break)
|
|
210
|
+
|
|
211
|
+
| Caller | File |
|
|
212
|
+
|---|---|
|
|
213
|
+
| <name> | <path> |
|
|
214
|
+
|
|
215
|
+
## Callees (downstream — candidates for extraction)
|
|
216
|
+
|
|
217
|
+
| Callee | File |
|
|
218
|
+
|---|---|
|
|
219
|
+
| <name> | <path> |
|
|
220
|
+
|
|
221
|
+
## Coverage baseline
|
|
222
|
+
|
|
223
|
+
- **File**: <target file>
|
|
224
|
+
- **Coverage**: <X>% lines, <Y>% branches
|
|
225
|
+
- **Status**: ✅ safe / ⚠️ caution / 🛑 discouraged
|
|
226
|
+
- **Test command**: <exact command to run>
|
|
227
|
+
|
|
228
|
+
## Change sequence
|
|
229
|
+
|
|
230
|
+
Apply in order. Do not skip ahead. Run tests after each step.
|
|
231
|
+
|
|
232
|
+
### Change 1 — <short label>
|
|
233
|
+
|
|
234
|
+
- **What**: extract lines <start>–<end> (logic: <one-line description>)
|
|
235
|
+
- **New function name**: `<name>`
|
|
236
|
+
- **Target file**: `<path>` (<new file | existing file — reason>)
|
|
237
|
+
- **Target class**: `<ClassName>` or none
|
|
238
|
+
- **Call sites to update**: <list each file:line>
|
|
239
|
+
- **Expected diff**: +<N> lines in <new/existing file>, -<M> lines in <source file>
|
|
240
|
+
|
|
241
|
+
### Change 2 — <short label>
|
|
242
|
+
|
|
243
|
+
...
|
|
244
|
+
|
|
245
|
+
## Acceptance criteria
|
|
246
|
+
|
|
247
|
+
- Priority score drops below <target score> in `get_refactor_report`
|
|
248
|
+
- Function exits the top-5 list
|
|
249
|
+
- Full test suite passes (green)
|
|
250
|
+
- `git diff --stat` shows only the expected files
|
|
251
|
+
|
|
252
|
+
## Restore point
|
|
253
|
+
|
|
254
|
+
Run before starting execute:
|
|
255
|
+
```bash
|
|
256
|
+
git log --oneline -1
|
|
257
|
+
```
|
|
258
|
+
Note the hash here: <to be filled by execute workflow>
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
Once the file is written, record the refactoring decision so it appears in the decisions workflow at commit time:
|
|
262
|
+
|
|
263
|
+
```xml
|
|
264
|
+
<use_mcp_tool>
|
|
265
|
+
<server_name>openlore</server_name>
|
|
266
|
+
<tool_name>record_decision</tool_name>
|
|
267
|
+
<arguments>{
|
|
268
|
+
"directory": "$DIRECTORY",
|
|
269
|
+
"title": "Refactor $TARGET_FUNCTION into smaller units ($STRATEGY)",
|
|
270
|
+
"rationale": "$PRIMARY_REASON from the Why section above",
|
|
271
|
+
"consequences": "Callers unchanged; complexity distributed across $N extracted helpers",
|
|
272
|
+
"affectedFiles": ["$TARGET_FILE"]
|
|
273
|
+
}</arguments>
|
|
274
|
+
</use_mcp_tool>
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
Then tell the user:
|
|
278
|
+
> "Plan written to `.openlore/refactor-plan.md`. Review it, then run
|
|
279
|
+
> `/openlore-execute-refactor` to apply the changes."
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# openlore: Refactor Codebase (redirected)
|
|
2
|
+
|
|
3
|
+
This workflow has been split into two focused workflows for better reliability
|
|
4
|
+
with limited models:
|
|
5
|
+
|
|
6
|
+
- **`/openlore-plan-refactor`** — static analysis, impact assessment, and
|
|
7
|
+
written plan saved to `.openlore/refactor-plan.md` (no code changes)
|
|
8
|
+
- **`/openlore-execute-refactor`** — reads the plan and applies changes
|
|
9
|
+
incrementally, with tests after each step
|
|
10
|
+
|
|
11
|
+
Tell the user:
|
|
12
|
+
> "The `/openlore-refactor-codebase` workflow has been split. Please use:
|
|
13
|
+
> 1. `/openlore-plan-refactor` to analyse the codebase and write a plan
|
|
14
|
+
> 2. `/openlore-execute-refactor` to apply the plan
|
|
15
|
+
>
|
|
16
|
+
> This two-step approach is more reliable, especially with smaller models."
|