kynjal-cli 3.1.4 → 4.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/.claude/agents/core/coder.md +1 -1
- package/.claude/agents/core/planner.md +2 -2
- package/.claude/agents/core/researcher.md +1 -1
- package/.claude/agents/core/reviewer.md +1 -1
- package/.claude/agents/core/tester.md +1 -1
- package/.claude/agents/data/data-ml-model.md +4 -4
- package/.claude/agents/development/dev-backend-api.md +4 -4
- package/.claude/agents/documentation/docs-api-openapi.md +4 -4
- package/.claude/agents/github/code-review-swarm.md +2 -2
- package/.claude/agents/github/issue-tracker.md +2 -2
- package/.claude/agents/github/pr-manager.md +2 -2
- package/.claude/agents/github/release-manager.md +2 -2
- package/.claude/agents/github/workflow-automation.md +2 -2
- package/.claude/agents/sparc/architecture.md +3 -3
- package/.claude/agents/sparc/pseudocode.md +2 -2
- package/.claude/agents/sparc/refinement.md +3 -3
- package/.claude/agents/sparc/specification.md +2 -2
- package/.claude/agents/swarm/adaptive-coordinator.md +1 -1
- package/.claude/agents/swarm/hierarchical-coordinator.md +1 -1
- package/.claude/agents/swarm/mesh-coordinator.md +1 -1
- package/.claude/agents/templates/base-template-generator.md +25 -4
- package/.claude/agents/templates/sparc-coordinator.md +3 -3
- package/.claude/helpers/auto-commit.sh +1 -1
- package/.claude/helpers/auto-memory-hook.mjs +27 -9
- package/.claude/helpers/hook-handler.cjs +58 -18
- package/.claude/helpers/statusline.cjs +420 -613
- package/.claude/helpers/statusline.js +3 -3
- package/.claude/settings.json +9 -9
- package/.claude/skills/reasoningbank-intelligence/SKILL.md +2 -2
- package/.claude/skills/swarm-orchestration/SKILL.md +1 -1
- package/README.md +383 -170
- package/bin/cli.js +6 -6
- package/bin/mcp-server.js +1 -1
- package/bin/preinstall.cjs +2 -0
- package/dist/src/appliance/gguf-engine.js +664 -0
- package/dist/src/appliance/gguf-engine.js.map +1 -0
- package/dist/src/appliance/ruvllm-bridge.js +492 -0
- package/dist/src/appliance/ruvllm-bridge.js.map +1 -0
- package/dist/src/appliance/rvfa-builder.js +383 -0
- package/dist/src/appliance/rvfa-builder.js.map +1 -0
- package/dist/src/appliance/rvfa-distribution.js +533 -0
- package/dist/src/appliance/rvfa-distribution.js.map +1 -0
- package/dist/src/appliance/rvfa-format.js +465 -0
- package/dist/src/appliance/rvfa-format.js.map +1 -0
- package/dist/src/appliance/rvfa-runner.js +373 -0
- package/dist/src/appliance/rvfa-runner.js.map +1 -0
- package/dist/src/appliance/rvfa-signing.js +469 -0
- package/dist/src/appliance/rvfa-signing.js.map +1 -0
- package/dist/src/benchmarks/pretrain/index.js +542 -331
- package/dist/src/benchmarks/pretrain/index.js.map +1 -1
- package/dist/src/commands/agent.d.ts.map +1 -1
- package/dist/src/commands/agent.js +725 -502
- package/dist/src/commands/agent.js.map +1 -1
- package/dist/src/commands/analyze.js +1548 -1218
- package/dist/src/commands/analyze.js.map +1 -1
- package/dist/src/commands/appliance-advanced.d.ts +9 -0
- package/dist/src/commands/appliance-advanced.d.ts.map +1 -0
- package/dist/src/commands/appliance-advanced.js +324 -0
- package/dist/src/commands/appliance-advanced.js.map +1 -0
- package/dist/src/commands/appliance.d.ts +8 -0
- package/dist/src/commands/appliance.d.ts.map +1 -0
- package/dist/src/commands/appliance.js +581 -0
- package/dist/src/commands/appliance.js.map +1 -0
- package/dist/src/commands/benchmark.js +523 -372
- package/dist/src/commands/benchmark.js.map +1 -1
- package/dist/src/commands/claims.js +364 -274
- package/dist/src/commands/claims.js.map +1 -1
- package/dist/src/commands/cleanup.d.ts +13 -0
- package/dist/src/commands/cleanup.d.ts.map +1 -0
- package/dist/src/commands/cleanup.js +262 -0
- package/dist/src/commands/cleanup.js.map +1 -0
- package/dist/src/commands/completions.js +118 -477
- package/dist/src/commands/completions.js.map +1 -1
- package/dist/src/commands/config.js +303 -237
- package/dist/src/commands/config.js.map +1 -1
- package/dist/src/commands/daemon.d.ts.map +1 -1
- package/dist/src/commands/daemon.js +597 -425
- package/dist/src/commands/daemon.js.map +1 -1
- package/dist/src/commands/deployment.js +275 -194
- package/dist/src/commands/deployment.js.map +1 -1
- package/dist/src/commands/doctor.d.ts.map +1 -1
- package/dist/src/commands/doctor.js +690 -460
- package/dist/src/commands/doctor.js.map +1 -1
- package/dist/src/commands/embeddings.js +1543 -1293
- package/dist/src/commands/embeddings.js.map +1 -1
- package/dist/src/commands/guidance.js +596 -449
- package/dist/src/commands/guidance.js.map +1 -1
- package/dist/src/commands/hive-mind.js +938 -854
- package/dist/src/commands/hive-mind.js.map +1 -1
- package/dist/src/commands/hooks.d.ts.map +1 -1
- package/dist/src/commands/hooks.js +3677 -2570
- package/dist/src/commands/hooks.js.map +1 -1
- package/dist/src/commands/index.js +322 -122
- package/dist/src/commands/index.js.map +1 -1
- package/dist/src/commands/init.d.ts +1 -1
- package/dist/src/commands/init.d.ts.map +1 -1
- package/dist/src/commands/init.js +943 -787
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/issues.js +558 -383
- package/dist/src/commands/issues.js.map +1 -1
- package/dist/src/commands/mcp.d.ts.map +1 -1
- package/dist/src/commands/mcp.js +605 -475
- package/dist/src/commands/mcp.js.map +1 -1
- package/dist/src/commands/memory.d.ts.map +1 -1
- package/dist/src/commands/memory.js +1031 -814
- package/dist/src/commands/memory.js.map +1 -1
- package/dist/src/commands/migrate.js +347 -282
- package/dist/src/commands/migrate.js.map +1 -1
- package/dist/src/commands/neural.d.ts.map +1 -1
- package/dist/src/commands/neural.js +1563 -1283
- package/dist/src/commands/neural.js.map +1 -1
- package/dist/src/commands/performance.js +643 -497
- package/dist/src/commands/performance.js.map +1 -1
- package/dist/src/commands/plugins.js +841 -668
- package/dist/src/commands/plugins.js.map +1 -1
- package/dist/src/commands/process.js +447 -392
- package/dist/src/commands/process.js.map +1 -1
- package/dist/src/commands/progress.js +256 -162
- package/dist/src/commands/progress.js.map +1 -1
- package/dist/src/commands/providers.js +220 -150
- package/dist/src/commands/providers.js.map +1 -1
- package/dist/src/commands/route.js +665 -520
- package/dist/src/commands/route.js.map +1 -1
- package/dist/src/commands/ruvector/backup.js +651 -505
- package/dist/src/commands/ruvector/backup.js.map +1 -1
- package/dist/src/commands/ruvector/benchmark.js +401 -349
- package/dist/src/commands/ruvector/benchmark.js.map +1 -1
- package/dist/src/commands/ruvector/import.js +267 -225
- package/dist/src/commands/ruvector/import.js.map +1 -1
- package/dist/src/commands/ruvector/index.js +75 -37
- package/dist/src/commands/ruvector/index.js.map +1 -1
- package/dist/src/commands/ruvector/init.js +359 -336
- package/dist/src/commands/ruvector/init.js.map +1 -1
- package/dist/src/commands/ruvector/migrate.js +322 -335
- package/dist/src/commands/ruvector/migrate.js.map +1 -1
- package/dist/src/commands/ruvector/optimize.js +431 -375
- package/dist/src/commands/ruvector/optimize.js.map +1 -1
- package/dist/src/commands/ruvector/setup.js +117 -703
- package/dist/src/commands/ruvector/setup.js.map +1 -1
- package/dist/src/commands/ruvector/status.js +419 -364
- package/dist/src/commands/ruvector/status.js.map +1 -1
- package/dist/src/commands/security.d.ts.map +1 -1
- package/dist/src/commands/security.js +610 -456
- package/dist/src/commands/security.js.map +1 -1
- package/dist/src/commands/session.d.ts +1 -1
- package/dist/src/commands/session.js +627 -505
- package/dist/src/commands/session.js.map +1 -1
- package/dist/src/commands/start.d.ts +1 -1
- package/dist/src/commands/start.js +368 -271
- package/dist/src/commands/start.js.map +1 -1
- package/dist/src/commands/status.d.ts +1 -1
- package/dist/src/commands/status.d.ts.map +1 -1
- package/dist/src/commands/status.js +492 -379
- package/dist/src/commands/status.js.map +1 -1
- package/dist/src/commands/swarm.js +488 -408
- package/dist/src/commands/swarm.js.map +1 -1
- package/dist/src/commands/task.d.ts +1 -1
- package/dist/src/commands/task.js +539 -424
- package/dist/src/commands/task.js.map +1 -1
- package/dist/src/commands/transfer-store.js +412 -322
- package/dist/src/commands/transfer-store.js.map +1 -1
- package/dist/src/commands/update.js +291 -196
- package/dist/src/commands/update.js.map +1 -1
- package/dist/src/commands/workflow.js +486 -386
- package/dist/src/commands/workflow.js.map +1 -1
- package/dist/src/config-adapter.js +40 -39
- package/dist/src/config-adapter.js.map +1 -1
- package/dist/src/index.js +416 -312
- package/dist/src/index.js.map +1 -1
- package/dist/src/infrastructure/in-memory-repositories.js +507 -246
- package/dist/src/infrastructure/in-memory-repositories.js.map +1 -1
- package/dist/src/init/claudemd-generator.js +78 -368
- package/dist/src/init/claudemd-generator.js.map +1 -1
- package/dist/src/init/executor.js +1019 -1345
- package/dist/src/init/executor.js.map +1 -1
- package/dist/src/init/helpers-generator.js +60 -635
- package/dist/src/init/helpers-generator.js.map +1 -1
- package/dist/src/init/index.d.ts +1 -1
- package/dist/src/init/index.d.ts.map +1 -1
- package/dist/src/init/index.js +1 -1
- package/dist/src/init/index.js.map +1 -1
- package/dist/src/init/mcp-generator.d.ts +0 -1
- package/dist/src/init/mcp-generator.d.ts.map +1 -1
- package/dist/src/init/mcp-generator.js +62 -42
- package/dist/src/init/mcp-generator.js.map +1 -1
- package/dist/src/init/settings-generator.d.ts.map +1 -1
- package/dist/src/init/settings-generator.js +167 -100
- package/dist/src/init/settings-generator.js.map +1 -1
- package/dist/src/init/statusline-generator.d.ts +16 -8
- package/dist/src/init/statusline-generator.d.ts.map +1 -1
- package/dist/src/init/statusline-generator.js +20 -1300
- package/dist/src/init/statusline-generator.js.map +1 -1
- package/dist/src/init/types.d.ts +15 -5
- package/dist/src/init/types.d.ts.map +1 -1
- package/dist/src/init/types.js +66 -76
- package/dist/src/init/types.js.map +1 -1
- package/dist/src/mcp-client.js +130 -76
- package/dist/src/mcp-client.js.map +1 -1
- package/dist/src/mcp-server.js +758 -445
- package/dist/src/mcp-server.js.map +1 -1
- package/dist/src/mcp-tools/agent-tools.js +492 -391
- package/dist/src/mcp-tools/agent-tools.js.map +1 -1
- package/dist/src/mcp-tools/agentdb-tools.d.ts +30 -0
- package/dist/src/mcp-tools/agentdb-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/agentdb-tools.js +758 -0
- package/dist/src/mcp-tools/agentdb-tools.js.map +1 -0
- package/dist/src/mcp-tools/analyze-tools.js +236 -172
- package/dist/src/mcp-tools/analyze-tools.js.map +1 -1
- package/dist/src/mcp-tools/auto-install.js +142 -80
- package/dist/src/mcp-tools/auto-install.js.map +1 -1
- package/dist/src/mcp-tools/browser-tools.js +375 -252
- package/dist/src/mcp-tools/browser-tools.js.map +1 -1
- package/dist/src/mcp-tools/claims-tools.js +565 -473
- package/dist/src/mcp-tools/claims-tools.js.map +1 -1
- package/dist/src/mcp-tools/config-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/config-tools.js +284 -190
- package/dist/src/mcp-tools/config-tools.js.map +1 -1
- package/dist/src/mcp-tools/coordination-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/coordination-tools.js +600 -349
- package/dist/src/mcp-tools/coordination-tools.js.map +1 -1
- package/dist/src/mcp-tools/daa-tools.js +367 -289
- package/dist/src/mcp-tools/daa-tools.js.map +1 -1
- package/dist/src/mcp-tools/embeddings-tools.js +693 -582
- package/dist/src/mcp-tools/embeddings-tools.js.map +1 -1
- package/dist/src/mcp-tools/github-tools.js +312 -261
- package/dist/src/mcp-tools/github-tools.js.map +1 -1
- package/dist/src/mcp-tools/hive-mind-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/hive-mind-tools.js +718 -423
- package/dist/src/mcp-tools/hive-mind-tools.js.map +1 -1
- package/dist/src/mcp-tools/hooks-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/hooks-tools.js +2726 -1978
- package/dist/src/mcp-tools/hooks-tools.js.map +1 -1
- package/dist/src/mcp-tools/index.d.ts +2 -0
- package/dist/src/mcp-tools/index.d.ts.map +1 -1
- package/dist/src/mcp-tools/index.js +2 -0
- package/dist/src/mcp-tools/index.js.map +1 -1
- package/dist/src/mcp-tools/memory-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/memory-tools.js +514 -329
- package/dist/src/mcp-tools/memory-tools.js.map +1 -1
- package/dist/src/mcp-tools/neural-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/neural-tools.js +428 -326
- package/dist/src/mcp-tools/neural-tools.js.map +1 -1
- package/dist/src/mcp-tools/performance-tools.js +480 -420
- package/dist/src/mcp-tools/performance-tools.js.map +1 -1
- package/dist/src/mcp-tools/progress-tools.js +278 -204
- package/dist/src/mcp-tools/progress-tools.js.map +1 -1
- package/dist/src/mcp-tools/ruvllm-tools.d.ts +9 -0
- package/dist/src/mcp-tools/ruvllm-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/ruvllm-tools.js +399 -0
- package/dist/src/mcp-tools/ruvllm-tools.js.map +1 -0
- package/dist/src/mcp-tools/security-tools.js +429 -297
- package/dist/src/mcp-tools/security-tools.js.map +1 -1
- package/dist/src/mcp-tools/session-tools.js +234 -185
- package/dist/src/mcp-tools/session-tools.js.map +1 -1
- package/dist/src/mcp-tools/swarm-tools.d.ts +2 -1
- package/dist/src/mcp-tools/swarm-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/swarm-tools.js +303 -64
- package/dist/src/mcp-tools/swarm-tools.js.map +1 -1
- package/dist/src/mcp-tools/system-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/system-tools.js +352 -200
- package/dist/src/mcp-tools/system-tools.js.map +1 -1
- package/dist/src/mcp-tools/task-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/task-tools.js +357 -189
- package/dist/src/mcp-tools/task-tools.js.map +1 -1
- package/dist/src/mcp-tools/terminal-tools.js +196 -148
- package/dist/src/mcp-tools/terminal-tools.js.map +1 -1
- package/dist/src/mcp-tools/transfer-tools.js +333 -186
- package/dist/src/mcp-tools/transfer-tools.js.map +1 -1
- package/dist/src/mcp-tools/wasm-agent-tools.d.ts +9 -0
- package/dist/src/mcp-tools/wasm-agent-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/wasm-agent-tools.js +377 -0
- package/dist/src/mcp-tools/wasm-agent-tools.js.map +1 -0
- package/dist/src/mcp-tools/workflow-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/workflow-tools.js +471 -335
- package/dist/src/mcp-tools/workflow-tools.js.map +1 -1
- package/dist/src/memory/ewc-consolidation.js +345 -173
- package/dist/src/memory/ewc-consolidation.js.map +1 -1
- package/dist/src/memory/intelligence.js +841 -359
- package/dist/src/memory/intelligence.js.map +1 -1
- package/dist/src/memory/memory-bridge.js +1964 -0
- package/dist/src/memory/memory-bridge.js.map +1 -0
- package/dist/src/memory/memory-initializer.js +1895 -1602
- package/dist/src/memory/memory-initializer.js.map +1 -1
- package/dist/src/memory/sona-optimizer.js +329 -199
- package/dist/src/memory/sona-optimizer.js.map +1 -1
- package/dist/src/output.d.ts +2 -2
- package/dist/src/output.d.ts.map +1 -1
- package/dist/src/output.js +273 -242
- package/dist/src/output.js.map +1 -1
- package/dist/src/parser.js +217 -124
- package/dist/src/parser.js.map +1 -1
- package/dist/src/plugins/manager.js +531 -278
- package/dist/src/plugins/manager.js.map +1 -1
- package/dist/src/plugins/store/discovery.js +362 -275
- package/dist/src/plugins/store/discovery.js.map +1 -1
- package/dist/src/plugins/store/index.js +105 -48
- package/dist/src/plugins/store/index.js.map +1 -1
- package/dist/src/plugins/store/search.js +107 -69
- package/dist/src/plugins/store/search.js.map +1 -1
- package/dist/src/plugins/tests/demo-plugin-store.js +160 -113
- package/dist/src/plugins/tests/demo-plugin-store.js.map +1 -1
- package/dist/src/plugins/tests/standalone-test.js +223 -172
- package/dist/src/plugins/tests/standalone-test.js.map +1 -1
- package/dist/src/plugins/tests/test-plugin-store.js +228 -190
- package/dist/src/plugins/tests/test-plugin-store.js.map +1 -1
- package/dist/src/production/circuit-breaker.js +126 -62
- package/dist/src/production/circuit-breaker.js.map +1 -1
- package/dist/src/production/error-handler.js +156 -86
- package/dist/src/production/error-handler.js.map +1 -1
- package/dist/src/production/monitoring.js +220 -139
- package/dist/src/production/monitoring.js.map +1 -1
- package/dist/src/production/rate-limiter.js +93 -74
- package/dist/src/production/rate-limiter.js.map +1 -1
- package/dist/src/production/retry.js +167 -75
- package/dist/src/production/retry.js.map +1 -1
- package/dist/src/prompt.js +560 -436
- package/dist/src/prompt.js.map +1 -1
- package/dist/src/runtime/headless.js +289 -200
- package/dist/src/runtime/headless.js.map +1 -1
- package/dist/src/ruvector/agent-wasm.js +511 -0
- package/dist/src/ruvector/agent-wasm.js.map +1 -0
- package/dist/src/ruvector/ast-analyzer.js +232 -145
- package/dist/src/ruvector/ast-analyzer.js.map +1 -1
- package/dist/src/ruvector/coverage-router.js +419 -287
- package/dist/src/ruvector/coverage-router.js.map +1 -1
- package/dist/src/ruvector/coverage-tools.js +101 -56
- package/dist/src/ruvector/coverage-tools.js.map +1 -1
- package/dist/src/ruvector/diff-classifier.js +451 -324
- package/dist/src/ruvector/diff-classifier.js.map +1 -1
- package/dist/src/ruvector/enhanced-model-router.js +337 -251
- package/dist/src/ruvector/enhanced-model-router.js.map +1 -1
- package/dist/src/ruvector/flash-attention.js +254 -223
- package/dist/src/ruvector/flash-attention.js.map +1 -1
- package/dist/src/ruvector/graph-analyzer.js +680 -486
- package/dist/src/ruvector/graph-analyzer.js.map +1 -1
- package/dist/src/ruvector/index.js +113 -27
- package/dist/src/ruvector/index.js.map +1 -1
- package/dist/src/ruvector/lora-adapter.js +248 -155
- package/dist/src/ruvector/lora-adapter.js.map +1 -1
- package/dist/src/ruvector/model-router.js +248 -175
- package/dist/src/ruvector/model-router.js.map +1 -1
- package/dist/src/ruvector/moe-router.js +286 -228
- package/dist/src/ruvector/moe-router.js.map +1 -1
- package/dist/src/ruvector/q-learning-router.js +338 -257
- package/dist/src/ruvector/q-learning-router.js.map +1 -1
- package/dist/src/ruvector/ruvllm-wasm.js +527 -0
- package/dist/src/ruvector/ruvllm-wasm.js.map +1 -0
- package/dist/src/ruvector/semantic-router.js +67 -60
- package/dist/src/ruvector/semantic-router.js.map +1 -1
- package/dist/src/ruvector/vector-db.js +205 -119
- package/dist/src/ruvector/vector-db.js.map +1 -1
- package/dist/src/services/agentic-flow-bridge.js +168 -0
- package/dist/src/services/agentic-flow-bridge.js.map +1 -0
- package/dist/src/services/claim-service.js +940 -615
- package/dist/src/services/claim-service.js.map +1 -1
- package/dist/src/services/container-worker-pool.js +669 -399
- package/dist/src/services/container-worker-pool.js.map +1 -1
- package/dist/src/services/headless-worker-executor.js +467 -441
- package/dist/src/services/headless-worker-executor.js.map +1 -1
- package/dist/src/services/index.d.ts +5 -5
- package/dist/src/services/index.d.ts.map +1 -1
- package/dist/src/services/index.js +4 -4
- package/dist/src/services/index.js.map +1 -1
- package/dist/src/services/registry-api.js +201 -93
- package/dist/src/services/registry-api.js.map +1 -1
- package/dist/src/services/ruvector-training.js +414 -144
- package/dist/src/services/ruvector-training.js.map +1 -1
- package/dist/src/services/worker-daemon.js +928 -531
- package/dist/src/services/worker-daemon.js.map +1 -1
- package/dist/src/services/worker-queue.js +550 -331
- package/dist/src/services/worker-queue.js.map +1 -1
- package/dist/src/suggest.js +55 -45
- package/dist/src/suggest.js.map +1 -1
- package/dist/src/transfer/anonymization/index.js +37 -29
- package/dist/src/transfer/anonymization/index.js.map +1 -1
- package/dist/src/transfer/deploy-seraphine.d.ts +1 -1
- package/dist/src/transfer/deploy-seraphine.js +156 -129
- package/dist/src/transfer/deploy-seraphine.js.map +1 -1
- package/dist/src/transfer/export.js +142 -84
- package/dist/src/transfer/export.js.map +1 -1
- package/dist/src/transfer/index.d.ts +1 -1
- package/dist/src/transfer/index.d.ts.map +1 -1
- package/dist/src/transfer/index.js +2 -0
- package/dist/src/transfer/index.js.map +1 -1
- package/dist/src/transfer/ipfs/client.js +337 -179
- package/dist/src/transfer/ipfs/client.js.map +1 -1
- package/dist/src/transfer/ipfs/upload.js +434 -290
- package/dist/src/transfer/ipfs/upload.js.map +1 -1
- package/dist/src/transfer/models/seraphine.js +58 -58
- package/dist/src/transfer/models/seraphine.js.map +1 -1
- package/dist/src/transfer/serialization/cfp.js +37 -33
- package/dist/src/transfer/serialization/cfp.js.map +1 -1
- package/dist/src/transfer/storage/gcs.js +248 -139
- package/dist/src/transfer/storage/gcs.js.map +1 -1
- package/dist/src/transfer/store/discovery.js +353 -243
- package/dist/src/transfer/store/discovery.js.map +1 -1
- package/dist/src/transfer/store/download.js +365 -243
- package/dist/src/transfer/store/download.js.map +1 -1
- package/dist/src/transfer/store/index.js +130 -63
- package/dist/src/transfer/store/index.js.map +1 -1
- package/dist/src/transfer/store/publish.js +258 -184
- package/dist/src/transfer/store/publish.js.map +1 -1
- package/dist/src/transfer/store/registry.js +73 -51
- package/dist/src/transfer/store/registry.js.map +1 -1
- package/dist/src/transfer/store/search.js +96 -64
- package/dist/src/transfer/store/search.js.map +1 -1
- package/dist/src/transfer/store/tests/standalone-test.js +231 -174
- package/dist/src/transfer/store/tests/standalone-test.js.map +1 -1
- package/dist/src/transfer/test-seraphine.js +130 -95
- package/dist/src/transfer/test-seraphine.js.map +1 -1
- package/dist/src/transfer/tests/test-store.js +239 -194
- package/dist/src/transfer/tests/test-store.js.map +1 -1
- package/dist/src/types.js +56 -27
- package/dist/src/types.js.map +1 -1
- package/dist/src/update/checker.js +183 -106
- package/dist/src/update/checker.js.map +1 -1
- package/dist/src/update/executor.js +198 -135
- package/dist/src/update/executor.js.map +1 -1
- package/dist/src/update/index.js +85 -38
- package/dist/src/update/index.js.map +1 -1
- package/dist/src/update/rate-limiter.js +31 -19
- package/dist/src/update/rate-limiter.js.map +1 -1
- package/dist/src/update/validator.js +64 -38
- package/dist/src/update/validator.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +13 -10
- package/.claude/agents/custom/accessibility-auditor.yaml +0 -56
- package/.claude/agents/custom/design-architect.yaml +0 -48
- package/.claude/agents/custom/ui-developer.yaml +0 -46
- package/.claude/agents/custom/ux-researcher.yaml +0 -60
- package/dist/src/benchmarks/pretrain/index.d.ts +0 -58
- package/dist/src/benchmarks/pretrain/index.d.ts.map +0 -1
- package/dist/src/commands/index.d.ts +0 -108
- package/dist/src/commands/index.d.ts.map +0 -1
- package/dist/src/config-adapter.d.ts +0 -15
- package/dist/src/config-adapter.d.ts.map +0 -1
- package/dist/src/index.d.ts +0 -76
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/infrastructure/in-memory-repositories.d.ts +0 -68
- package/dist/src/infrastructure/in-memory-repositories.d.ts.map +0 -1
- package/dist/src/init/claudemd-generator.d.ts +0 -25
- package/dist/src/init/claudemd-generator.d.ts.map +0 -1
- package/dist/src/init/executor.d.ts +0 -41
- package/dist/src/init/executor.d.ts.map +0 -1
- package/dist/src/init/helpers-generator.d.ts +0 -60
- package/dist/src/init/helpers-generator.d.ts.map +0 -1
- package/dist/src/mcp-client.d.ts +0 -92
- package/dist/src/mcp-client.d.ts.map +0 -1
- package/dist/src/mcp-server.d.ts +0 -161
- package/dist/src/mcp-server.d.ts.map +0 -1
- package/dist/src/mcp-tools/auto-install.d.ts +0 -83
- package/dist/src/mcp-tools/auto-install.d.ts.map +0 -1
- package/dist/src/mcp-tools/types.d.ts +0 -31
- package/dist/src/mcp-tools/types.d.ts.map +0 -1
- package/dist/src/memory/ewc-consolidation.d.ts +0 -271
- package/dist/src/memory/ewc-consolidation.d.ts.map +0 -1
- package/dist/src/memory/intelligence.d.ts +0 -285
- package/dist/src/memory/intelligence.d.ts.map +0 -1
- package/dist/src/memory/memory-initializer.d.ts +0 -396
- package/dist/src/memory/memory-initializer.d.ts.map +0 -1
- package/dist/src/memory/sona-optimizer.d.ts +0 -227
- package/dist/src/memory/sona-optimizer.d.ts.map +0 -1
- package/dist/src/parser.d.ts +0 -41
- package/dist/src/parser.d.ts.map +0 -1
- package/dist/src/plugins/manager.d.ts +0 -133
- package/dist/src/plugins/manager.d.ts.map +0 -1
- package/dist/src/plugins/store/discovery.d.ts +0 -88
- package/dist/src/plugins/store/discovery.d.ts.map +0 -1
- package/dist/src/plugins/store/index.d.ts +0 -76
- package/dist/src/plugins/store/index.d.ts.map +0 -1
- package/dist/src/plugins/store/search.d.ts +0 -46
- package/dist/src/plugins/store/search.d.ts.map +0 -1
- package/dist/src/plugins/store/types.d.ts +0 -274
- package/dist/src/plugins/store/types.d.ts.map +0 -1
- package/dist/src/production/circuit-breaker.d.ts +0 -101
- package/dist/src/production/circuit-breaker.d.ts.map +0 -1
- package/dist/src/production/error-handler.d.ts +0 -92
- package/dist/src/production/error-handler.d.ts.map +0 -1
- package/dist/src/production/monitoring.d.ts +0 -161
- package/dist/src/production/monitoring.d.ts.map +0 -1
- package/dist/src/production/rate-limiter.d.ts +0 -80
- package/dist/src/production/rate-limiter.d.ts.map +0 -1
- package/dist/src/production/retry.d.ts +0 -48
- package/dist/src/production/retry.d.ts.map +0 -1
- package/dist/src/prompt.d.ts +0 -44
- package/dist/src/prompt.d.ts.map +0 -1
- package/dist/src/runtime/headless.d.ts +0 -60
- package/dist/src/runtime/headless.d.ts.map +0 -1
- package/dist/src/ruvector/ast-analyzer.d.ts +0 -67
- package/dist/src/ruvector/ast-analyzer.d.ts.map +0 -1
- package/dist/src/ruvector/coverage-router.d.ts +0 -160
- package/dist/src/ruvector/coverage-router.d.ts.map +0 -1
- package/dist/src/ruvector/diff-classifier.d.ts +0 -175
- package/dist/src/ruvector/diff-classifier.d.ts.map +0 -1
- package/dist/src/ruvector/enhanced-model-router.d.ts +0 -146
- package/dist/src/ruvector/enhanced-model-router.d.ts.map +0 -1
- package/dist/src/ruvector/flash-attention.d.ts +0 -195
- package/dist/src/ruvector/flash-attention.d.ts.map +0 -1
- package/dist/src/ruvector/graph-analyzer.d.ts +0 -187
- package/dist/src/ruvector/graph-analyzer.d.ts.map +0 -1
- package/dist/src/ruvector/index.d.ts +0 -34
- package/dist/src/ruvector/index.d.ts.map +0 -1
- package/dist/src/ruvector/lora-adapter.d.ts +0 -218
- package/dist/src/ruvector/lora-adapter.d.ts.map +0 -1
- package/dist/src/ruvector/model-router.d.ts +0 -220
- package/dist/src/ruvector/model-router.d.ts.map +0 -1
- package/dist/src/ruvector/moe-router.d.ts +0 -206
- package/dist/src/ruvector/moe-router.d.ts.map +0 -1
- package/dist/src/ruvector/q-learning-router.d.ts +0 -211
- package/dist/src/ruvector/q-learning-router.d.ts.map +0 -1
- package/dist/src/ruvector/semantic-router.d.ts +0 -77
- package/dist/src/ruvector/semantic-router.d.ts.map +0 -1
- package/dist/src/ruvector/vector-db.d.ts +0 -69
- package/dist/src/ruvector/vector-db.d.ts.map +0 -1
- package/dist/src/services/claim-service.d.ts +0 -204
- package/dist/src/services/claim-service.d.ts.map +0 -1
- package/dist/src/services/container-worker-pool.d.ts +0 -197
- package/dist/src/services/container-worker-pool.d.ts.map +0 -1
- package/dist/src/services/headless-worker-executor.d.ts +0 -304
- package/dist/src/services/headless-worker-executor.d.ts.map +0 -1
- package/dist/src/services/registry-api.d.ts +0 -58
- package/dist/src/services/registry-api.d.ts.map +0 -1
- package/dist/src/services/ruvector-training.d.ts +0 -213
- package/dist/src/services/ruvector-training.d.ts.map +0 -1
- package/dist/src/services/worker-daemon.d.ts +0 -203
- package/dist/src/services/worker-daemon.d.ts.map +0 -1
- package/dist/src/services/worker-queue.d.ts +0 -194
- package/dist/src/services/worker-queue.d.ts.map +0 -1
- package/dist/src/suggest.d.ts +0 -53
- package/dist/src/suggest.d.ts.map +0 -1
- package/dist/src/transfer/export.d.ts +0 -25
- package/dist/src/transfer/export.d.ts.map +0 -1
- package/dist/src/transfer/ipfs/client.d.ts +0 -109
- package/dist/src/transfer/ipfs/client.d.ts.map +0 -1
- package/dist/src/transfer/ipfs/upload.d.ts +0 -95
- package/dist/src/transfer/ipfs/upload.d.ts.map +0 -1
- package/dist/src/transfer/models/seraphine.d.ts +0 -72
- package/dist/src/transfer/models/seraphine.d.ts.map +0 -1
- package/dist/src/transfer/serialization/cfp.d.ts +0 -49
- package/dist/src/transfer/serialization/cfp.d.ts.map +0 -1
- package/dist/src/transfer/storage/gcs.d.ts +0 -82
- package/dist/src/transfer/storage/gcs.d.ts.map +0 -1
- package/dist/src/transfer/store/discovery.d.ts +0 -84
- package/dist/src/transfer/store/discovery.d.ts.map +0 -1
- package/dist/src/transfer/store/download.d.ts +0 -70
- package/dist/src/transfer/store/download.d.ts.map +0 -1
- package/dist/src/transfer/store/index.d.ts +0 -84
- package/dist/src/transfer/store/index.d.ts.map +0 -1
- package/dist/src/transfer/store/publish.d.ts +0 -76
- package/dist/src/transfer/store/publish.d.ts.map +0 -1
- package/dist/src/transfer/store/search.d.ts +0 -54
- package/dist/src/transfer/store/search.d.ts.map +0 -1
- package/dist/src/transfer/types.d.ts +0 -245
- package/dist/src/transfer/types.d.ts.map +0 -1
- package/dist/src/types.d.ts +0 -198
- package/dist/src/types.d.ts.map +0 -1
- package/dist/src/update/checker.d.ts +0 -34
- package/dist/src/update/checker.d.ts.map +0 -1
- package/dist/src/update/executor.d.ts +0 -32
- package/dist/src/update/executor.d.ts.map +0 -1
- package/dist/src/update/index.d.ts +0 -33
- package/dist/src/update/index.d.ts.map +0 -1
- package/dist/src/update/rate-limiter.d.ts +0 -20
- package/dist/src/update/rate-limiter.d.ts.map +0 -1
- package/dist/src/update/validator.d.ts +0 -17
- package/dist/src/update/validator.d.ts.map +0 -1
|
@@ -2,316 +2,425 @@
|
|
|
2
2
|
* V3 CLI Guidance Command
|
|
3
3
|
* Guidance Control Plane - compile, retrieve, enforce, optimize
|
|
4
4
|
*/
|
|
5
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
6
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
7
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
8
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
9
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
10
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
11
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
15
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
16
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
17
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
18
|
+
function step(op) {
|
|
19
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
20
|
+
while (_) try {
|
|
21
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
22
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
23
|
+
switch (op[0]) {
|
|
24
|
+
case 0: case 1: t = op; break;
|
|
25
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
26
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
27
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
28
|
+
default:
|
|
29
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
30
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
31
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
32
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
33
|
+
if (t[2]) _.ops.pop();
|
|
34
|
+
_.trys.pop(); continue;
|
|
35
|
+
}
|
|
36
|
+
op = body.call(thisArg, _);
|
|
37
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
38
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
39
|
+
}
|
|
40
|
+
};
|
|
5
41
|
import { output } from '../output.js';
|
|
6
42
|
// compile subcommand
|
|
7
|
-
|
|
43
|
+
var compileCommand = {
|
|
8
44
|
name: 'compile',
|
|
9
45
|
description: 'Compile CLAUDE.md into a policy bundle (constitution + shards + manifest)',
|
|
10
46
|
options: [
|
|
11
|
-
{ name: 'root', short: 'r', type: 'string', description: 'Root guidance file path', default: './CLAUDE.md' },
|
|
47
|
+
{ name: 'root', short: 'r', type: 'string', description: 'Root guidance file path', "default": './CLAUDE.md' },
|
|
12
48
|
{ name: 'local', short: 'l', type: 'string', description: 'Local guidance overlay file path' },
|
|
13
49
|
{ name: 'output', short: 'o', type: 'string', description: 'Output directory for compiled bundle' },
|
|
14
|
-
{ name: 'json', type: 'boolean', description: 'Output as JSON', default: 'false' },
|
|
50
|
+
{ name: 'json', type: 'boolean', description: 'Output as JSON', "default": 'false' },
|
|
15
51
|
],
|
|
16
52
|
examples: [
|
|
17
53
|
{ command: 'claude-flow guidance compile', description: 'Compile default CLAUDE.md' },
|
|
18
54
|
{ command: 'claude-flow guidance compile -r ./CLAUDE.md -l ./CLAUDE.local.md', description: 'Compile with local overlay' },
|
|
19
55
|
{ command: 'claude-flow guidance compile --json', description: 'Output compiled bundle as JSON' },
|
|
20
56
|
],
|
|
21
|
-
action:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
57
|
+
action: function (ctx) { return __awaiter(void 0, void 0, Promise, function () {
|
|
58
|
+
var rootPath, localPath, jsonOutput, readFile, existsSync, rootContent, localContent, GuidanceCompiler, compiler, bundle, _i, _a, rule, risk, error_1, msg;
|
|
59
|
+
return __generator(this, function (_b) {
|
|
60
|
+
switch (_b.label) {
|
|
61
|
+
case 0:
|
|
62
|
+
rootPath = ctx.flags.root || './CLAUDE.md';
|
|
63
|
+
localPath = ctx.flags.local;
|
|
64
|
+
jsonOutput = ctx.flags.json === true;
|
|
65
|
+
output.writeln();
|
|
66
|
+
output.writeln(output.bold('Guidance Compiler'));
|
|
67
|
+
output.writeln(output.dim('─'.repeat(50)));
|
|
68
|
+
_b.label = 1;
|
|
69
|
+
case 1:
|
|
70
|
+
_b.trys.push([1, 8, , 9]);
|
|
71
|
+
return [4 /*yield*/, import('node:fs/promises')];
|
|
72
|
+
case 2:
|
|
73
|
+
readFile = (_b.sent()).readFile;
|
|
74
|
+
return [4 /*yield*/, import('node:fs')];
|
|
75
|
+
case 3:
|
|
76
|
+
existsSync = (_b.sent()).existsSync;
|
|
77
|
+
if (!existsSync(rootPath)) {
|
|
78
|
+
output.writeln(output.error("Root guidance file not found: " + rootPath));
|
|
79
|
+
return [2 /*return*/, { success: false, message: "File not found: " + rootPath }];
|
|
80
|
+
}
|
|
81
|
+
return [4 /*yield*/, readFile(rootPath, 'utf-8')];
|
|
82
|
+
case 4:
|
|
83
|
+
rootContent = _b.sent();
|
|
84
|
+
localContent = void 0;
|
|
85
|
+
if (!(localPath && existsSync(localPath))) return [3 /*break*/, 6];
|
|
86
|
+
return [4 /*yield*/, readFile(localPath, 'utf-8')];
|
|
87
|
+
case 5:
|
|
88
|
+
localContent = _b.sent();
|
|
89
|
+
_b.label = 6;
|
|
90
|
+
case 6: return [4 /*yield*/, import('@claude-flow/guidance/compiler')];
|
|
91
|
+
case 7:
|
|
92
|
+
GuidanceCompiler = (_b.sent()).GuidanceCompiler;
|
|
93
|
+
compiler = new GuidanceCompiler();
|
|
94
|
+
bundle = compiler.compile(rootContent, localContent);
|
|
95
|
+
if (jsonOutput) {
|
|
96
|
+
output.writeln(JSON.stringify(bundle, null, 2));
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
output.writeln(output.success('Compiled successfully'));
|
|
100
|
+
output.writeln();
|
|
101
|
+
output.writeln(" Constitution rules: " + output.bold(String(bundle.constitution.rules.length)));
|
|
102
|
+
output.writeln(" Constitution hash: " + output.dim(bundle.constitution.hash));
|
|
103
|
+
output.writeln(" Shard count: " + output.bold(String(bundle.shards.length)));
|
|
104
|
+
output.writeln(" Total rules: " + output.bold(String(bundle.manifest.totalRules)));
|
|
105
|
+
output.writeln(" Compiled at: " + output.dim(new Date(bundle.manifest.compiledAt).toISOString()));
|
|
106
|
+
if (localContent) {
|
|
107
|
+
output.writeln(" Local overlay: " + output.success('applied'));
|
|
108
|
+
}
|
|
109
|
+
output.writeln();
|
|
110
|
+
output.writeln(output.dim('Rule summary:'));
|
|
111
|
+
for (_i = 0, _a = bundle.manifest.rules.slice(0, 10); _i < _a.length; _i++) {
|
|
112
|
+
rule = _a[_i];
|
|
113
|
+
risk = rule.riskClass === 'critical' ? output.error(rule.riskClass) :
|
|
114
|
+
rule.riskClass === 'high' ? output.warning(rule.riskClass) :
|
|
115
|
+
output.dim(rule.riskClass);
|
|
116
|
+
output.writeln(" " + output.bold(rule.id) + " [" + risk + "] " + rule.source.slice(0, 60) + (rule.source.length > 60 ? '...' : ''));
|
|
117
|
+
}
|
|
118
|
+
if (bundle.manifest.rules.length > 10) {
|
|
119
|
+
output.writeln(output.dim(" ... and " + (bundle.manifest.rules.length - 10) + " more"));
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
return [2 /*return*/, { success: true, data: bundle }];
|
|
123
|
+
case 8:
|
|
124
|
+
error_1 = _b.sent();
|
|
125
|
+
msg = error_1 instanceof Error ? error_1.message : String(error_1);
|
|
126
|
+
output.writeln(output.error("Compilation failed: " + msg));
|
|
127
|
+
return [2 /*return*/, { success: false, message: msg }];
|
|
128
|
+
case 9: return [2 /*return*/];
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
}); }
|
|
77
132
|
};
|
|
78
133
|
// retrieve subcommand
|
|
79
|
-
|
|
134
|
+
var retrieveCommand = {
|
|
80
135
|
name: 'retrieve',
|
|
81
136
|
description: 'Retrieve task-relevant guidance shards for a given task description',
|
|
82
137
|
options: [
|
|
83
138
|
{ name: 'task', short: 't', type: 'string', description: 'Task description', required: true },
|
|
84
|
-
{ name: 'root', short: 'r', type: 'string', description: 'Root guidance file path', default: './CLAUDE.md' },
|
|
139
|
+
{ name: 'root', short: 'r', type: 'string', description: 'Root guidance file path', "default": './CLAUDE.md' },
|
|
85
140
|
{ name: 'local', short: 'l', type: 'string', description: 'Local overlay file path' },
|
|
86
|
-
{ name: 'max-shards', short: 'n', type: 'number', description: 'Maximum number of shards to retrieve', default: '5' },
|
|
141
|
+
{ name: 'max-shards', short: 'n', type: 'number', description: 'Maximum number of shards to retrieve', "default": '5' },
|
|
87
142
|
{ name: 'intent', short: 'i', type: 'string', description: 'Override detected intent' },
|
|
88
|
-
{ name: 'json', type: 'boolean', description: 'Output as JSON', default: 'false' },
|
|
143
|
+
{ name: 'json', type: 'boolean', description: 'Output as JSON', "default": 'false' },
|
|
89
144
|
],
|
|
90
145
|
examples: [
|
|
91
146
|
{ command: 'claude-flow guidance retrieve -t "Fix SQL injection in user search"', description: 'Retrieve guidance for a security task' },
|
|
92
147
|
{ command: 'claude-flow guidance retrieve -t "Add unit tests" -n 3', description: 'Retrieve top 3 shards for testing' },
|
|
93
148
|
],
|
|
94
|
-
action:
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
try {
|
|
109
|
-
const { readFile } = await import('node:fs/promises');
|
|
110
|
-
const { existsSync } = await import('node:fs');
|
|
111
|
-
const { GuidanceCompiler } = await import('@claude-flow/guidance/compiler');
|
|
112
|
-
const { ShardRetriever, HashEmbeddingProvider } = await import('@claude-flow/guidance/retriever');
|
|
113
|
-
if (!existsSync(rootPath)) {
|
|
114
|
-
output.writeln(output.error(`Root guidance file not found: ${rootPath}`));
|
|
115
|
-
return { success: false, message: `File not found: ${rootPath}` };
|
|
116
|
-
}
|
|
117
|
-
const rootContent = await readFile(rootPath, 'utf-8');
|
|
118
|
-
let localContent;
|
|
119
|
-
if (localPath && existsSync(localPath)) {
|
|
120
|
-
localContent = await readFile(localPath, 'utf-8');
|
|
121
|
-
}
|
|
122
|
-
const compiler = new GuidanceCompiler();
|
|
123
|
-
const bundle = compiler.compile(rootContent, localContent);
|
|
124
|
-
const retriever = new ShardRetriever(new HashEmbeddingProvider(128));
|
|
125
|
-
await retriever.loadBundle(bundle);
|
|
126
|
-
const result = await retriever.retrieve({
|
|
127
|
-
taskDescription: task,
|
|
128
|
-
maxShards,
|
|
129
|
-
intent: intentOverride,
|
|
130
|
-
});
|
|
131
|
-
if (jsonOutput) {
|
|
132
|
-
output.writeln(JSON.stringify(result, null, 2));
|
|
133
|
-
}
|
|
134
|
-
else {
|
|
135
|
-
output.writeln(` Detected intent: ${output.bold(result.detectedIntent)}`);
|
|
136
|
-
output.writeln(` Retrieval time: ${output.dim(result.latencyMs + 'ms')}`);
|
|
137
|
-
output.writeln(` Constitution: ${output.bold(String(result.constitution.rules.length))} rules`);
|
|
138
|
-
output.writeln(` Shards: ${output.bold(String(result.shards.length))} retrieved`);
|
|
139
|
-
output.writeln();
|
|
140
|
-
if (result.shards.length > 0) {
|
|
141
|
-
output.writeln(output.dim('Retrieved shards:'));
|
|
142
|
-
for (const shard of result.shards) {
|
|
143
|
-
output.writeln(` ${output.bold(shard.shard.rule.id)} [${shard.shard.rule.riskClass}] ${shard.shard.rule.text.slice(0, 60)}`);
|
|
149
|
+
action: function (ctx) { return __awaiter(void 0, void 0, Promise, function () {
|
|
150
|
+
var task, rootPath, localPath, maxShards, intentOverride, jsonOutput, readFile, existsSync, GuidanceCompiler, _a, ShardRetriever, HashEmbeddingProvider, rootContent, localContent, compiler, bundle, retriever, result, _i, _b, shard, lines, _c, lines_1, line, error_2, msg;
|
|
151
|
+
return __generator(this, function (_d) {
|
|
152
|
+
switch (_d.label) {
|
|
153
|
+
case 0:
|
|
154
|
+
task = ctx.flags.task;
|
|
155
|
+
rootPath = ctx.flags.root || './CLAUDE.md';
|
|
156
|
+
localPath = ctx.flags.local;
|
|
157
|
+
maxShards = parseInt(ctx.flags['max-shards'] || '5', 10);
|
|
158
|
+
intentOverride = ctx.flags.intent;
|
|
159
|
+
jsonOutput = ctx.flags.json === true;
|
|
160
|
+
if (!task) {
|
|
161
|
+
output.writeln(output.error('Task description is required (-t "...")'));
|
|
162
|
+
return [2 /*return*/, { success: false, message: 'Missing task description' }];
|
|
144
163
|
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
+
output.writeln();
|
|
165
|
+
output.writeln(output.bold('Guidance Retriever'));
|
|
166
|
+
output.writeln(output.dim('─'.repeat(50)));
|
|
167
|
+
_d.label = 1;
|
|
168
|
+
case 1:
|
|
169
|
+
_d.trys.push([1, 11, , 12]);
|
|
170
|
+
return [4 /*yield*/, import('node:fs/promises')];
|
|
171
|
+
case 2:
|
|
172
|
+
readFile = (_d.sent()).readFile;
|
|
173
|
+
return [4 /*yield*/, import('node:fs')];
|
|
174
|
+
case 3:
|
|
175
|
+
existsSync = (_d.sent()).existsSync;
|
|
176
|
+
return [4 /*yield*/, import('@claude-flow/guidance/compiler')];
|
|
177
|
+
case 4:
|
|
178
|
+
GuidanceCompiler = (_d.sent()).GuidanceCompiler;
|
|
179
|
+
return [4 /*yield*/, import('@claude-flow/guidance/retriever')];
|
|
180
|
+
case 5:
|
|
181
|
+
_a = _d.sent(), ShardRetriever = _a.ShardRetriever, HashEmbeddingProvider = _a.HashEmbeddingProvider;
|
|
182
|
+
if (!existsSync(rootPath)) {
|
|
183
|
+
output.writeln(output.error("Root guidance file not found: " + rootPath));
|
|
184
|
+
return [2 /*return*/, { success: false, message: "File not found: " + rootPath }];
|
|
185
|
+
}
|
|
186
|
+
return [4 /*yield*/, readFile(rootPath, 'utf-8')];
|
|
187
|
+
case 6:
|
|
188
|
+
rootContent = _d.sent();
|
|
189
|
+
localContent = void 0;
|
|
190
|
+
if (!(localPath && existsSync(localPath))) return [3 /*break*/, 8];
|
|
191
|
+
return [4 /*yield*/, readFile(localPath, 'utf-8')];
|
|
192
|
+
case 7:
|
|
193
|
+
localContent = _d.sent();
|
|
194
|
+
_d.label = 8;
|
|
195
|
+
case 8:
|
|
196
|
+
compiler = new GuidanceCompiler();
|
|
197
|
+
bundle = compiler.compile(rootContent, localContent);
|
|
198
|
+
retriever = new ShardRetriever(new HashEmbeddingProvider(128));
|
|
199
|
+
return [4 /*yield*/, retriever.loadBundle(bundle)];
|
|
200
|
+
case 9:
|
|
201
|
+
_d.sent();
|
|
202
|
+
return [4 /*yield*/, retriever.retrieve({
|
|
203
|
+
taskDescription: task,
|
|
204
|
+
maxShards: maxShards,
|
|
205
|
+
intent: intentOverride
|
|
206
|
+
})];
|
|
207
|
+
case 10:
|
|
208
|
+
result = _d.sent();
|
|
209
|
+
if (jsonOutput) {
|
|
210
|
+
output.writeln(JSON.stringify(result, null, 2));
|
|
211
|
+
}
|
|
212
|
+
else {
|
|
213
|
+
output.writeln(" Detected intent: " + output.bold(result.detectedIntent));
|
|
214
|
+
output.writeln(" Retrieval time: " + output.dim(result.latencyMs + 'ms'));
|
|
215
|
+
output.writeln(" Constitution: " + output.bold(String(result.constitution.rules.length)) + " rules");
|
|
216
|
+
output.writeln(" Shards: " + output.bold(String(result.shards.length)) + " retrieved");
|
|
217
|
+
output.writeln();
|
|
218
|
+
if (result.shards.length > 0) {
|
|
219
|
+
output.writeln(output.dim('Retrieved shards:'));
|
|
220
|
+
for (_i = 0, _b = result.shards; _i < _b.length; _i++) {
|
|
221
|
+
shard = _b[_i];
|
|
222
|
+
output.writeln(" " + output.bold(shard.shard.rule.id) + " [" + shard.shard.rule.riskClass + "] " + shard.shard.rule.text.slice(0, 60));
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
output.writeln();
|
|
226
|
+
output.writeln(output.dim('Policy text preview:'));
|
|
227
|
+
lines = result.policyText.split('\n').slice(0, 15);
|
|
228
|
+
for (_c = 0, lines_1 = lines; _c < lines_1.length; _c++) {
|
|
229
|
+
line = lines_1[_c];
|
|
230
|
+
output.writeln(" " + line);
|
|
231
|
+
}
|
|
232
|
+
if (result.policyText.split('\n').length > 15) {
|
|
233
|
+
output.writeln(output.dim(' ...'));
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
return [2 /*return*/, { success: true, data: result }];
|
|
237
|
+
case 11:
|
|
238
|
+
error_2 = _d.sent();
|
|
239
|
+
msg = error_2 instanceof Error ? error_2.message : String(error_2);
|
|
240
|
+
output.writeln(output.error("Retrieval failed: " + msg));
|
|
241
|
+
return [2 /*return*/, { success: false, message: msg }];
|
|
242
|
+
case 12: return [2 /*return*/];
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
}); }
|
|
164
246
|
};
|
|
165
247
|
// gates subcommand
|
|
166
|
-
|
|
248
|
+
var gatesCommand = {
|
|
167
249
|
name: 'gates',
|
|
168
250
|
description: 'Evaluate enforcement gates against a command or content',
|
|
169
251
|
options: [
|
|
170
252
|
{ name: 'command', short: 'c', type: 'string', description: 'Command to evaluate' },
|
|
171
253
|
{ name: 'content', type: 'string', description: 'Content to check for secrets' },
|
|
172
254
|
{ name: 'tool', short: 't', type: 'string', description: 'Tool name to check against allowlist' },
|
|
173
|
-
{ name: 'json', type: 'boolean', description: 'Output as JSON', default: 'false' },
|
|
255
|
+
{ name: 'json', type: 'boolean', description: 'Output as JSON', "default": 'false' },
|
|
174
256
|
],
|
|
175
257
|
examples: [
|
|
176
258
|
{ command: 'claude-flow guidance gates -c "rm -rf /tmp"', description: 'Check if a command is destructive' },
|
|
177
259
|
{ command: 'claude-flow guidance gates --content "api_key=sk-abc123..."', description: 'Check content for secrets' },
|
|
178
260
|
],
|
|
179
|
-
action:
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
}
|
|
203
|
-
if (results.length === 0) {
|
|
204
|
-
output.writeln(output.warning('No input provided. Use -c, --content, or -t to evaluate.'));
|
|
205
|
-
return { success: false, message: 'No input' };
|
|
206
|
-
}
|
|
207
|
-
if (jsonOutput) {
|
|
208
|
-
output.writeln(JSON.stringify(results, null, 2));
|
|
209
|
-
}
|
|
210
|
-
else {
|
|
211
|
-
for (const { type, result } of results) {
|
|
212
|
-
output.writeln(` ${output.bold(type)}:`);
|
|
213
|
-
if (result === null) {
|
|
214
|
-
output.writeln(` ${output.success('ALLOW')} - No gate triggered`);
|
|
261
|
+
action: function (ctx) { return __awaiter(void 0, void 0, Promise, function () {
|
|
262
|
+
var command, content, tool, jsonOutput, EnforcementGates, gates, results, gateResults, secretResult, toolResult, _i, results_1, _a, type, result, _b, result_1, r, color, color, error_3, msg;
|
|
263
|
+
return __generator(this, function (_c) {
|
|
264
|
+
switch (_c.label) {
|
|
265
|
+
case 0:
|
|
266
|
+
command = ctx.flags.command;
|
|
267
|
+
content = ctx.flags.content;
|
|
268
|
+
tool = ctx.flags.tool;
|
|
269
|
+
jsonOutput = ctx.flags.json === true;
|
|
270
|
+
output.writeln();
|
|
271
|
+
output.writeln(output.bold('Enforcement Gates'));
|
|
272
|
+
output.writeln(output.dim('─'.repeat(50)));
|
|
273
|
+
_c.label = 1;
|
|
274
|
+
case 1:
|
|
275
|
+
_c.trys.push([1, 3, , 4]);
|
|
276
|
+
return [4 /*yield*/, import('@claude-flow/guidance/gates')];
|
|
277
|
+
case 2:
|
|
278
|
+
EnforcementGates = (_c.sent()).EnforcementGates;
|
|
279
|
+
gates = new EnforcementGates();
|
|
280
|
+
results = [];
|
|
281
|
+
if (command) {
|
|
282
|
+
gateResults = gates.evaluateCommand(command);
|
|
283
|
+
results.push({ type: 'command', result: gateResults });
|
|
215
284
|
}
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
285
|
+
if (content) {
|
|
286
|
+
secretResult = gates.evaluateSecrets(content);
|
|
287
|
+
results.push({ type: 'secrets', result: secretResult });
|
|
288
|
+
}
|
|
289
|
+
if (tool) {
|
|
290
|
+
toolResult = gates.evaluateToolAllowlist(tool);
|
|
291
|
+
results.push({ type: 'tool-allowlist', result: toolResult });
|
|
292
|
+
}
|
|
293
|
+
if (results.length === 0) {
|
|
294
|
+
output.writeln(output.warning('No input provided. Use -c, --content, or -t to evaluate.'));
|
|
295
|
+
return [2 /*return*/, { success: false, message: 'No input' }];
|
|
296
|
+
}
|
|
297
|
+
if (jsonOutput) {
|
|
298
|
+
output.writeln(JSON.stringify(results, null, 2));
|
|
299
|
+
}
|
|
300
|
+
else {
|
|
301
|
+
for (_i = 0, results_1 = results; _i < results_1.length; _i++) {
|
|
302
|
+
_a = results_1[_i], type = _a.type, result = _a.result;
|
|
303
|
+
output.writeln(" " + output.bold(type) + ":");
|
|
304
|
+
if (result === null) {
|
|
305
|
+
output.writeln(" " + output.success('ALLOW') + " - No gate triggered");
|
|
306
|
+
}
|
|
307
|
+
else if (Array.isArray(result)) {
|
|
308
|
+
if (result.length === 0) {
|
|
309
|
+
output.writeln(" " + output.success('ALLOW') + " - All gates passed");
|
|
310
|
+
}
|
|
311
|
+
else {
|
|
312
|
+
for (_b = 0, result_1 = result; _b < result_1.length; _b++) {
|
|
313
|
+
r = result_1[_b];
|
|
314
|
+
color = r.decision === 'block' ? output.error.bind(output) :
|
|
315
|
+
r.decision === 'require-confirmation' ? output.warning.bind(output) :
|
|
316
|
+
output.dim.bind(output);
|
|
317
|
+
output.writeln(" " + color(r.decision.toUpperCase()) + " [" + r.gateName + "] " + r.reason);
|
|
318
|
+
if (r.remediation) {
|
|
319
|
+
output.writeln(" Remediation: " + output.dim(r.remediation));
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
else {
|
|
325
|
+
color = result.decision === 'block' ? output.error.bind(output) :
|
|
326
|
+
result.decision === 'require-confirmation' ? output.warning.bind(output) :
|
|
224
327
|
output.dim.bind(output);
|
|
225
|
-
output.writeln(
|
|
226
|
-
if (
|
|
227
|
-
output.writeln(
|
|
328
|
+
output.writeln(" " + color(result.decision.toUpperCase()) + " [" + result.gateName + "] " + result.reason);
|
|
329
|
+
if (result.remediation) {
|
|
330
|
+
output.writeln(" Remediation: " + output.dim(result.remediation));
|
|
228
331
|
}
|
|
229
332
|
}
|
|
230
333
|
}
|
|
231
334
|
}
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
}
|
|
243
|
-
return { success: true, data: results };
|
|
244
|
-
}
|
|
245
|
-
catch (error) {
|
|
246
|
-
const msg = error instanceof Error ? error.message : String(error);
|
|
247
|
-
output.writeln(output.error(`Gate evaluation failed: ${msg}`));
|
|
248
|
-
return { success: false, message: msg };
|
|
249
|
-
}
|
|
250
|
-
},
|
|
335
|
+
return [2 /*return*/, { success: true, data: results }];
|
|
336
|
+
case 3:
|
|
337
|
+
error_3 = _c.sent();
|
|
338
|
+
msg = error_3 instanceof Error ? error_3.message : String(error_3);
|
|
339
|
+
output.writeln(output.error("Gate evaluation failed: " + msg));
|
|
340
|
+
return [2 /*return*/, { success: false, message: msg }];
|
|
341
|
+
case 4: return [2 /*return*/];
|
|
342
|
+
}
|
|
343
|
+
});
|
|
344
|
+
}); }
|
|
251
345
|
};
|
|
252
346
|
// status subcommand
|
|
253
|
-
|
|
347
|
+
var statusCommand = {
|
|
254
348
|
name: 'status',
|
|
255
349
|
description: 'Show guidance control plane status and metrics',
|
|
256
350
|
options: [
|
|
257
|
-
{ name: 'json', type: 'boolean', description: 'Output as JSON', default: 'false' },
|
|
351
|
+
{ name: 'json', type: 'boolean', description: 'Output as JSON', "default": 'false' },
|
|
258
352
|
],
|
|
259
|
-
action:
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
353
|
+
action: function (ctx) { return __awaiter(void 0, void 0, Promise, function () {
|
|
354
|
+
var jsonOutput, existsSync, rootExists, localExists, statusData, readFile, GuidanceCompiler, rootContent, compiler, bundle, error_4, msg;
|
|
355
|
+
return __generator(this, function (_a) {
|
|
356
|
+
switch (_a.label) {
|
|
357
|
+
case 0:
|
|
358
|
+
jsonOutput = ctx.flags.json === true;
|
|
359
|
+
output.writeln();
|
|
360
|
+
output.writeln(output.bold('Guidance Control Plane Status'));
|
|
361
|
+
output.writeln(output.dim('─'.repeat(50)));
|
|
362
|
+
_a.label = 1;
|
|
363
|
+
case 1:
|
|
364
|
+
_a.trys.push([1, 8, , 9]);
|
|
365
|
+
return [4 /*yield*/, import('node:fs')];
|
|
366
|
+
case 2:
|
|
367
|
+
existsSync = (_a.sent()).existsSync;
|
|
368
|
+
rootExists = existsSync('./CLAUDE.md');
|
|
369
|
+
localExists = existsSync('./CLAUDE.local.md');
|
|
370
|
+
statusData = {
|
|
371
|
+
rootGuidance: rootExists ? 'found' : 'not found',
|
|
372
|
+
localOverlay: localExists ? 'found' : 'not configured',
|
|
373
|
+
dataDir: existsSync('./.claude-flow/guidance') ? 'exists' : 'not created'
|
|
374
|
+
};
|
|
375
|
+
if (!jsonOutput) return [3 /*break*/, 3];
|
|
376
|
+
output.writeln(JSON.stringify(statusData, null, 2));
|
|
377
|
+
return [3 /*break*/, 7];
|
|
378
|
+
case 3:
|
|
379
|
+
output.writeln(" Root guidance: " + (rootExists ? output.success('CLAUDE.md found') : output.warning('CLAUDE.md not found')));
|
|
380
|
+
output.writeln(" Local overlay: " + (localExists ? output.success('CLAUDE.local.md found') : output.dim('not configured')));
|
|
381
|
+
output.writeln(" Data directory: " + (statusData.dataDir === 'exists' ? output.success('exists') : output.dim('not created')));
|
|
382
|
+
if (!rootExists) return [3 /*break*/, 7];
|
|
383
|
+
return [4 /*yield*/, import('node:fs/promises')];
|
|
384
|
+
case 4:
|
|
385
|
+
readFile = (_a.sent()).readFile;
|
|
386
|
+
return [4 /*yield*/, import('@claude-flow/guidance/compiler')];
|
|
387
|
+
case 5:
|
|
388
|
+
GuidanceCompiler = (_a.sent()).GuidanceCompiler;
|
|
389
|
+
return [4 /*yield*/, readFile('./CLAUDE.md', 'utf-8')];
|
|
390
|
+
case 6:
|
|
391
|
+
rootContent = _a.sent();
|
|
392
|
+
compiler = new GuidanceCompiler();
|
|
393
|
+
bundle = compiler.compile(rootContent);
|
|
286
394
|
output.writeln();
|
|
287
395
|
output.writeln(output.dim('Compiled bundle:'));
|
|
288
|
-
output.writeln(
|
|
289
|
-
output.writeln(
|
|
290
|
-
output.writeln(
|
|
291
|
-
output.writeln(
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
396
|
+
output.writeln(" Constitution rules: " + output.bold(String(bundle.constitution.rules.length)));
|
|
397
|
+
output.writeln(" Shard count: " + output.bold(String(bundle.shards.length)));
|
|
398
|
+
output.writeln(" Total rules: " + output.bold(String(bundle.manifest.totalRules)));
|
|
399
|
+
output.writeln(" Hash: " + output.dim(bundle.constitution.hash));
|
|
400
|
+
_a.label = 7;
|
|
401
|
+
case 7: return [2 /*return*/, { success: true, data: statusData }];
|
|
402
|
+
case 8:
|
|
403
|
+
error_4 = _a.sent();
|
|
404
|
+
msg = error_4 instanceof Error ? error_4.message : String(error_4);
|
|
405
|
+
output.writeln(output.error("Status check failed: " + msg));
|
|
406
|
+
return [2 /*return*/, { success: false, message: msg }];
|
|
407
|
+
case 9: return [2 /*return*/];
|
|
408
|
+
}
|
|
409
|
+
});
|
|
410
|
+
}); }
|
|
302
411
|
};
|
|
303
412
|
// optimize subcommand
|
|
304
|
-
|
|
413
|
+
var optimizeCommand = {
|
|
305
414
|
name: 'optimize',
|
|
306
415
|
description: 'Analyze and optimize a CLAUDE.md file for structure, coverage, and enforceability',
|
|
307
416
|
options: [
|
|
308
|
-
{ name: 'root', short: 'r', type: 'string', description: 'Root guidance file path', default: './CLAUDE.md' },
|
|
417
|
+
{ name: 'root', short: 'r', type: 'string', description: 'Root guidance file path', "default": './CLAUDE.md' },
|
|
309
418
|
{ name: 'local', short: 'l', type: 'string', description: 'Local overlay file path' },
|
|
310
|
-
{ name: 'apply', short: 'a', type: 'boolean', description: 'Apply optimizations to the file', default: 'false' },
|
|
311
|
-
{ name: 'context-size', short: 's', type: 'string', description: 'Target context size: compact, standard, full', default: 'standard' },
|
|
312
|
-
{ name: 'target-score', type: 'number', description: 'Target composite score (0-100)', default: '90' },
|
|
313
|
-
{ name: 'max-iterations', type: 'number', description: 'Maximum optimization iterations', default: '5' },
|
|
314
|
-
{ name: 'json', type: 'boolean', description: 'Output as JSON', default: 'false' },
|
|
419
|
+
{ name: 'apply', short: 'a', type: 'boolean', description: 'Apply optimizations to the file', "default": 'false' },
|
|
420
|
+
{ name: 'context-size', short: 's', type: 'string', description: 'Target context size: compact, standard, full', "default": 'standard' },
|
|
421
|
+
{ name: 'target-score', type: 'number', description: 'Target composite score (0-100)', "default": '90' },
|
|
422
|
+
{ name: 'max-iterations', type: 'number', description: 'Maximum optimization iterations', "default": '5' },
|
|
423
|
+
{ name: 'json', type: 'boolean', description: 'Output as JSON', "default": 'false' },
|
|
315
424
|
],
|
|
316
425
|
examples: [
|
|
317
426
|
{ command: 'claude-flow guidance optimize', description: 'Analyze current CLAUDE.md and show suggestions' },
|
|
@@ -319,102 +428,121 @@ const optimizeCommand = {
|
|
|
319
428
|
{ command: 'claude-flow guidance optimize -s compact --apply', description: 'Optimize for compact context window' },
|
|
320
429
|
{ command: 'claude-flow guidance optimize --target-score 95', description: 'Optimize until score reaches 95' },
|
|
321
430
|
],
|
|
322
|
-
action:
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
431
|
+
action: function (ctx) { return __awaiter(void 0, void 0, Promise, function () {
|
|
432
|
+
var rootPath, localPath, applyChanges, contextSize, targetScore, maxIterations, jsonOutput, _a, readFile, writeFile, existsSync, rootContent, localContent, _b, analyze, formatReport, optimizeForSize, formatBenchmark, analysis, result, _i, _c, step, error_5, msg;
|
|
433
|
+
return __generator(this, function (_d) {
|
|
434
|
+
switch (_d.label) {
|
|
435
|
+
case 0:
|
|
436
|
+
rootPath = ctx.flags.root || './CLAUDE.md';
|
|
437
|
+
localPath = ctx.flags.local;
|
|
438
|
+
applyChanges = ctx.flags.apply === true;
|
|
439
|
+
contextSize = (ctx.flags['context-size'] || 'standard');
|
|
440
|
+
targetScore = parseInt(ctx.flags['target-score'] || '90', 10);
|
|
441
|
+
maxIterations = parseInt(ctx.flags['max-iterations'] || '5', 10);
|
|
442
|
+
jsonOutput = ctx.flags.json === true;
|
|
443
|
+
output.writeln();
|
|
444
|
+
output.writeln(output.bold('Guidance Optimizer'));
|
|
445
|
+
output.writeln(output.dim('─'.repeat(50)));
|
|
446
|
+
_d.label = 1;
|
|
447
|
+
case 1:
|
|
448
|
+
_d.trys.push([1, 11, , 12]);
|
|
449
|
+
return [4 /*yield*/, import('node:fs/promises')];
|
|
450
|
+
case 2:
|
|
451
|
+
_a = _d.sent(), readFile = _a.readFile, writeFile = _a.writeFile;
|
|
452
|
+
return [4 /*yield*/, import('node:fs')];
|
|
453
|
+
case 3:
|
|
454
|
+
existsSync = (_d.sent()).existsSync;
|
|
455
|
+
if (!existsSync(rootPath)) {
|
|
456
|
+
output.writeln(output.error("Root guidance file not found: " + rootPath));
|
|
457
|
+
return [2 /*return*/, { success: false, message: "File not found: " + rootPath }];
|
|
458
|
+
}
|
|
459
|
+
return [4 /*yield*/, readFile(rootPath, 'utf-8')];
|
|
460
|
+
case 4:
|
|
461
|
+
rootContent = _d.sent();
|
|
462
|
+
localContent = void 0;
|
|
463
|
+
if (!(localPath && existsSync(localPath))) return [3 /*break*/, 6];
|
|
464
|
+
return [4 /*yield*/, readFile(localPath, 'utf-8')];
|
|
465
|
+
case 5:
|
|
466
|
+
localContent = _d.sent();
|
|
467
|
+
_d.label = 6;
|
|
468
|
+
case 6: return [4 /*yield*/, import('@claude-flow/guidance/analyzer')];
|
|
469
|
+
case 7:
|
|
470
|
+
_b = _d.sent(), analyze = _b.analyze, formatReport = _b.formatReport, optimizeForSize = _b.optimizeForSize, formatBenchmark = _b.formatBenchmark;
|
|
471
|
+
analysis = analyze(rootContent, localContent);
|
|
472
|
+
if (jsonOutput && !applyChanges) {
|
|
473
|
+
output.writeln(JSON.stringify(analysis, null, 2));
|
|
474
|
+
return [2 /*return*/, { success: true, data: analysis }];
|
|
475
|
+
}
|
|
476
|
+
// Show current analysis
|
|
477
|
+
output.writeln(formatReport(analysis));
|
|
478
|
+
output.writeln();
|
|
479
|
+
if (analysis.compositeScore >= targetScore) {
|
|
480
|
+
output.writeln(output.success("Score " + analysis.compositeScore + "/100 already meets target " + targetScore + ". No optimization needed."));
|
|
481
|
+
return [2 /*return*/, { success: true, data: analysis }];
|
|
482
|
+
}
|
|
483
|
+
// Step 2: Run optimization
|
|
484
|
+
output.writeln(output.dim("Optimizing (target: " + targetScore + ", context: " + contextSize + ", max iterations: " + maxIterations + ")..."));
|
|
485
|
+
result = optimizeForSize(rootContent, {
|
|
486
|
+
contextSize: contextSize,
|
|
487
|
+
localContent: localContent,
|
|
488
|
+
maxIterations: maxIterations,
|
|
489
|
+
targetScore: targetScore
|
|
490
|
+
});
|
|
491
|
+
if (jsonOutput) {
|
|
492
|
+
output.writeln(JSON.stringify({
|
|
493
|
+
before: analysis,
|
|
494
|
+
after: result.benchmark.after,
|
|
495
|
+
delta: result.benchmark.delta,
|
|
496
|
+
steps: result.appliedSteps
|
|
497
|
+
}, null, 2));
|
|
498
|
+
return [2 /*return*/, { success: true, data: result }];
|
|
499
|
+
}
|
|
500
|
+
// Show benchmark comparison
|
|
501
|
+
output.writeln();
|
|
502
|
+
output.writeln(formatBenchmark(result.benchmark));
|
|
503
|
+
output.writeln();
|
|
504
|
+
if (result.appliedSteps.length > 0) {
|
|
505
|
+
output.writeln("Applied " + output.bold(String(result.appliedSteps.length)) + " optimization steps:");
|
|
506
|
+
for (_i = 0, _c = result.appliedSteps; _i < _c.length; _i++) {
|
|
507
|
+
step = _c[_i];
|
|
508
|
+
output.writeln(" " + output.success('+') + " " + step);
|
|
509
|
+
}
|
|
510
|
+
output.writeln();
|
|
511
|
+
}
|
|
512
|
+
if (!applyChanges) return [3 /*break*/, 9];
|
|
513
|
+
return [4 /*yield*/, writeFile(rootPath, result.optimized, 'utf-8')];
|
|
514
|
+
case 8:
|
|
515
|
+
_d.sent();
|
|
516
|
+
output.writeln(output.success("Optimized CLAUDE.md written to " + rootPath));
|
|
517
|
+
output.writeln(" Before: " + analysis.compositeScore + "/100 (" + analysis.grade + ")");
|
|
518
|
+
output.writeln(" After: " + result.benchmark.after.compositeScore + "/100 (" + result.benchmark.after.grade + ")");
|
|
519
|
+
output.writeln(" Delta: " + (result.benchmark.delta >= 0 ? '+' : '') + result.benchmark.delta);
|
|
520
|
+
return [3 /*break*/, 10];
|
|
521
|
+
case 9:
|
|
522
|
+
output.writeln(output.warning('Dry run - use --apply to write changes.'));
|
|
523
|
+
output.writeln(" Projected: " + analysis.compositeScore + " \u2192 " + result.benchmark.after.compositeScore + "/100");
|
|
524
|
+
_d.label = 10;
|
|
525
|
+
case 10: return [2 /*return*/, { success: true, data: result }];
|
|
526
|
+
case 11:
|
|
527
|
+
error_5 = _d.sent();
|
|
528
|
+
msg = error_5 instanceof Error ? error_5.message : String(error_5);
|
|
529
|
+
output.writeln(output.error("Optimization failed: " + msg));
|
|
530
|
+
return [2 /*return*/, { success: false, message: msg }];
|
|
531
|
+
case 12: return [2 /*return*/];
|
|
532
|
+
}
|
|
533
|
+
});
|
|
534
|
+
}); }
|
|
407
535
|
};
|
|
408
536
|
// ab-test subcommand
|
|
409
|
-
|
|
537
|
+
var abTestCommand = {
|
|
410
538
|
name: 'ab-test',
|
|
411
539
|
description: 'Run A/B behavioral comparison between two CLAUDE.md versions',
|
|
412
540
|
options: [
|
|
413
541
|
{ name: 'config-a', short: 'a', type: 'string', description: 'Path to Config A (baseline CLAUDE.md). Defaults to no guidance.' },
|
|
414
|
-
{ name: 'config-b', short: 'b', type: 'string', description: 'Path to Config B (candidate CLAUDE.md)', default: './CLAUDE.md' },
|
|
542
|
+
{ name: 'config-b', short: 'b', type: 'string', description: 'Path to Config B (candidate CLAUDE.md)', "default": './CLAUDE.md' },
|
|
415
543
|
{ name: 'tasks', short: 't', type: 'string', description: 'Path to custom task JSON file (array of ABTask objects)' },
|
|
416
544
|
{ name: 'work-dir', short: 'w', type: 'string', description: 'Working directory for test execution' },
|
|
417
|
-
{ name: 'json', type: 'boolean', description: 'Output as JSON', default: 'false' },
|
|
545
|
+
{ name: 'json', type: 'boolean', description: 'Output as JSON', "default": 'false' },
|
|
418
546
|
],
|
|
419
547
|
examples: [
|
|
420
548
|
{ command: 'claude-flow guidance ab-test', description: 'Run default A/B test (no guidance vs ./CLAUDE.md)' },
|
|
@@ -422,103 +550,120 @@ const abTestCommand = {
|
|
|
422
550
|
{ command: 'claude-flow guidance ab-test --tasks custom-tasks.json', description: 'Run with custom test tasks' },
|
|
423
551
|
{ command: 'claude-flow guidance ab-test --json', description: 'Output full report as JSON' },
|
|
424
552
|
],
|
|
425
|
-
action:
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
553
|
+
action: function (ctx) { return __awaiter(void 0, void 0, Promise, function () {
|
|
554
|
+
var configAPath, configBPath, tasksPath, workDir, jsonOutput, readFile, existsSync, _a, abBenchmark, getDefaultABTasks, configBContent, configALabel, customTasks, tasksJson, report, delta, error_6, msg;
|
|
555
|
+
return __generator(this, function (_b) {
|
|
556
|
+
switch (_b.label) {
|
|
557
|
+
case 0:
|
|
558
|
+
configAPath = ctx.flags['config-a'];
|
|
559
|
+
configBPath = ctx.flags['config-b'] || './CLAUDE.md';
|
|
560
|
+
tasksPath = ctx.flags.tasks;
|
|
561
|
+
workDir = ctx.flags['work-dir'];
|
|
562
|
+
jsonOutput = ctx.flags.json === true;
|
|
563
|
+
output.writeln();
|
|
564
|
+
output.writeln(output.bold('A/B Behavioral Benchmark'));
|
|
565
|
+
output.writeln(output.dim('─'.repeat(50)));
|
|
566
|
+
_b.label = 1;
|
|
567
|
+
case 1:
|
|
568
|
+
_b.trys.push([1, 9, , 10]);
|
|
569
|
+
return [4 /*yield*/, import('node:fs/promises')];
|
|
570
|
+
case 2:
|
|
571
|
+
readFile = (_b.sent()).readFile;
|
|
572
|
+
return [4 /*yield*/, import('node:fs')];
|
|
573
|
+
case 3:
|
|
574
|
+
existsSync = (_b.sent()).existsSync;
|
|
575
|
+
return [4 /*yield*/, import('@claude-flow/guidance/analyzer')];
|
|
576
|
+
case 4:
|
|
577
|
+
_a = _b.sent(), abBenchmark = _a.abBenchmark, getDefaultABTasks = _a.getDefaultABTasks;
|
|
578
|
+
// Load Config B (candidate) content
|
|
579
|
+
if (!existsSync(configBPath)) {
|
|
580
|
+
output.writeln(output.error("Config B file not found: " + configBPath));
|
|
581
|
+
return [2 /*return*/, { success: false, message: "File not found: " + configBPath }];
|
|
582
|
+
}
|
|
583
|
+
return [4 /*yield*/, readFile(configBPath, 'utf-8')];
|
|
584
|
+
case 5:
|
|
585
|
+
configBContent = _b.sent();
|
|
586
|
+
configALabel = 'No control plane (baseline)';
|
|
587
|
+
if (configAPath) {
|
|
588
|
+
if (!existsSync(configAPath)) {
|
|
589
|
+
output.writeln(output.error("Config A file not found: " + configAPath));
|
|
590
|
+
return [2 /*return*/, { success: false, message: "File not found: " + configAPath }];
|
|
591
|
+
}
|
|
592
|
+
configALabel = configAPath;
|
|
593
|
+
}
|
|
594
|
+
customTasks = void 0;
|
|
595
|
+
if (!tasksPath) return [3 /*break*/, 7];
|
|
596
|
+
if (!existsSync(tasksPath)) {
|
|
597
|
+
output.writeln(output.error("Tasks file not found: " + tasksPath));
|
|
598
|
+
return [2 /*return*/, { success: false, message: "File not found: " + tasksPath }];
|
|
599
|
+
}
|
|
600
|
+
return [4 /*yield*/, readFile(tasksPath, 'utf-8')];
|
|
601
|
+
case 6:
|
|
602
|
+
tasksJson = _b.sent();
|
|
603
|
+
customTasks = JSON.parse(tasksJson);
|
|
604
|
+
output.writeln(" Custom tasks: " + output.bold(String(customTasks.length)) + " loaded from " + tasksPath);
|
|
605
|
+
_b.label = 7;
|
|
606
|
+
case 7:
|
|
607
|
+
output.writeln(" Config A: " + output.dim(configALabel));
|
|
608
|
+
output.writeln(" Config B: " + output.dim(configBPath));
|
|
609
|
+
output.writeln(" Tasks: " + output.dim(customTasks ? customTasks.length + " custom" : getDefaultABTasks().length + " default"));
|
|
610
|
+
output.writeln();
|
|
611
|
+
output.writeln(output.dim('Running benchmark...'));
|
|
612
|
+
return [4 /*yield*/, abBenchmark(configBContent, {
|
|
613
|
+
tasks: customTasks,
|
|
614
|
+
workDir: workDir
|
|
615
|
+
})];
|
|
616
|
+
case 8:
|
|
617
|
+
report = _b.sent();
|
|
618
|
+
if (jsonOutput) {
|
|
619
|
+
output.writeln(JSON.stringify({
|
|
620
|
+
configA: { label: configALabel, metrics: report.configA.metrics },
|
|
621
|
+
configB: { label: configBPath, metrics: report.configB.metrics },
|
|
622
|
+
compositeDelta: report.compositeDelta,
|
|
623
|
+
classDeltas: report.classDeltas,
|
|
624
|
+
categoryShift: report.categoryShift,
|
|
625
|
+
taskResults: {
|
|
626
|
+
configA: report.configA.taskResults.map(function (r) { return ({
|
|
627
|
+
taskId: r.taskId, taskClass: r.taskClass, passed: r.passed,
|
|
628
|
+
violations: r.violations.length, toolCalls: r.toolCalls
|
|
629
|
+
}); }),
|
|
630
|
+
configB: report.configB.taskResults.map(function (r) { return ({
|
|
631
|
+
taskId: r.taskId, taskClass: r.taskClass, passed: r.passed,
|
|
632
|
+
violations: r.violations.length, toolCalls: r.toolCalls
|
|
633
|
+
}); })
|
|
634
|
+
}
|
|
635
|
+
}, null, 2));
|
|
636
|
+
return [2 /*return*/, { success: true, data: report }];
|
|
637
|
+
}
|
|
638
|
+
// Print formatted report
|
|
639
|
+
output.writeln(report.report);
|
|
640
|
+
output.writeln();
|
|
641
|
+
delta = report.compositeDelta;
|
|
642
|
+
if (delta > 0.05) {
|
|
643
|
+
output.writeln(output.success("Config B is better (+" + delta + " composite delta)"));
|
|
644
|
+
}
|
|
645
|
+
else if (delta < -0.05) {
|
|
646
|
+
output.writeln(output.error("Config B is worse (" + delta + " composite delta)"));
|
|
647
|
+
}
|
|
648
|
+
else {
|
|
649
|
+
output.writeln(output.warning("No significant difference (" + delta + " composite delta)"));
|
|
650
|
+
}
|
|
651
|
+
if (report.categoryShift) {
|
|
652
|
+
output.writeln(output.success('Category shift detected: 3+ task classes improved by 20%+'));
|
|
653
|
+
}
|
|
654
|
+
return [2 /*return*/, { success: true, data: report }];
|
|
655
|
+
case 9:
|
|
656
|
+
error_6 = _b.sent();
|
|
657
|
+
msg = error_6 instanceof Error ? error_6.message : String(error_6);
|
|
658
|
+
output.writeln(output.error("A/B benchmark failed: " + msg));
|
|
659
|
+
return [2 /*return*/, { success: false, message: msg }];
|
|
660
|
+
case 10: return [2 /*return*/];
|
|
661
|
+
}
|
|
662
|
+
});
|
|
663
|
+
}); }
|
|
519
664
|
};
|
|
520
665
|
// Main guidance command
|
|
521
|
-
export
|
|
666
|
+
export var guidanceCommand = {
|
|
522
667
|
name: 'guidance',
|
|
523
668
|
description: 'Guidance Control Plane - compile, retrieve, enforce, and optimize guidance rules',
|
|
524
669
|
aliases: ['guide', 'policy'],
|
|
@@ -539,22 +684,24 @@ export const guidanceCommand = {
|
|
|
539
684
|
{ command: 'claude-flow guidance optimize', description: 'Analyze and optimize CLAUDE.md' },
|
|
540
685
|
{ command: 'claude-flow guidance ab-test', description: 'Run A/B behavioral comparison' },
|
|
541
686
|
],
|
|
542
|
-
action:
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
687
|
+
action: function (ctx) { return __awaiter(void 0, void 0, Promise, function () {
|
|
688
|
+
return __generator(this, function (_a) {
|
|
689
|
+
output.writeln();
|
|
690
|
+
output.writeln(output.bold('Guidance Control Plane'));
|
|
691
|
+
output.writeln(output.dim('─'.repeat(50)));
|
|
692
|
+
output.writeln();
|
|
693
|
+
output.writeln('Available subcommands:');
|
|
694
|
+
output.writeln(" " + output.bold('compile') + " Compile CLAUDE.md into policy bundle");
|
|
695
|
+
output.writeln(" " + output.bold('retrieve') + " Retrieve task-relevant guidance shards");
|
|
696
|
+
output.writeln(" " + output.bold('gates') + " Evaluate enforcement gates");
|
|
697
|
+
output.writeln(" " + output.bold('status') + " Show control plane status");
|
|
698
|
+
output.writeln(" " + output.bold('optimize') + " Analyze and optimize CLAUDE.md");
|
|
699
|
+
output.writeln(" " + output.bold('ab-test') + " Run A/B behavioral comparison");
|
|
700
|
+
output.writeln();
|
|
701
|
+
output.writeln(output.dim('Use claude-flow guidance <subcommand> --help for details'));
|
|
702
|
+
return [2 /*return*/, { success: true }];
|
|
703
|
+
});
|
|
704
|
+
}); }
|
|
558
705
|
};
|
|
559
706
|
export default guidanceCommand;
|
|
560
707
|
//# sourceMappingURL=guidance.js.map
|