@decibelsystems/tools 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 +342 -0
- package/dist/agentic/compiler.d.ts +21 -0
- package/dist/agentic/compiler.d.ts.map +1 -0
- package/dist/agentic/compiler.js +267 -0
- package/dist/agentic/compiler.js.map +1 -0
- package/dist/agentic/golden.d.ts +25 -0
- package/dist/agentic/golden.d.ts.map +1 -0
- package/dist/agentic/golden.js +255 -0
- package/dist/agentic/golden.js.map +1 -0
- package/dist/agentic/index.d.ts +17 -0
- package/dist/agentic/index.d.ts.map +1 -0
- package/dist/agentic/index.js +153 -0
- package/dist/agentic/index.js.map +1 -0
- package/dist/agentic/linter.d.ts +20 -0
- package/dist/agentic/linter.d.ts.map +1 -0
- package/dist/agentic/linter.js +340 -0
- package/dist/agentic/linter.js.map +1 -0
- package/dist/agentic/renderer.d.ts +17 -0
- package/dist/agentic/renderer.d.ts.map +1 -0
- package/dist/agentic/renderer.js +277 -0
- package/dist/agentic/renderer.js.map +1 -0
- package/dist/agentic/types.d.ts +199 -0
- package/dist/agentic/types.d.ts.map +1 -0
- package/dist/agentic/types.js +8 -0
- package/dist/agentic/types.js.map +1 -0
- package/dist/architectAdrs.d.ts +32 -0
- package/dist/architectAdrs.d.ts.map +1 -0
- package/dist/architectAdrs.js +162 -0
- package/dist/architectAdrs.js.map +1 -0
- package/dist/client/facade-client.d.ts +41 -0
- package/dist/client/facade-client.d.ts.map +1 -0
- package/dist/client/facade-client.js +243 -0
- package/dist/client/facade-client.js.map +1 -0
- package/dist/client/index.d.ts +4 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +18 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/transports.d.ts +78 -0
- package/dist/client/transports.d.ts.map +1 -0
- package/dist/client/transports.js +258 -0
- package/dist/client/transports.js.map +1 -0
- package/dist/client/types.d.ts +49 -0
- package/dist/client/types.d.ts.map +1 -0
- package/dist/client/types.js +8 -0
- package/dist/client/types.js.map +1 -0
- package/dist/config.d.ts +8 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +19 -0
- package/dist/config.js.map +1 -0
- package/dist/daemon.d.ts +77 -0
- package/dist/daemon.d.ts.map +1 -0
- package/dist/daemon.js +374 -0
- package/dist/daemon.js.map +1 -0
- package/dist/daemonConfig.d.ts +43 -0
- package/dist/daemonConfig.d.ts.map +1 -0
- package/dist/daemonConfig.js +113 -0
- package/dist/daemonConfig.js.map +1 -0
- package/dist/dataRoot.d.ts +5 -0
- package/dist/dataRoot.d.ts.map +1 -0
- package/dist/dataRoot.js +23 -0
- package/dist/dataRoot.js.map +1 -0
- package/dist/decibelPaths.d.ts +42 -0
- package/dist/decibelPaths.d.ts.map +1 -0
- package/dist/decibelPaths.js +150 -0
- package/dist/decibelPaths.js.map +1 -0
- package/dist/facades/definitions.d.ts +6 -0
- package/dist/facades/definitions.d.ts.map +1 -0
- package/dist/facades/definitions.js +450 -0
- package/dist/facades/definitions.js.map +1 -0
- package/dist/facades/index.d.ts +27 -0
- package/dist/facades/index.d.ts.map +1 -0
- package/dist/facades/index.js +124 -0
- package/dist/facades/index.js.map +1 -0
- package/dist/facades/types.d.ts +38 -0
- package/dist/facades/types.d.ts.map +1 -0
- package/dist/facades/types.js +8 -0
- package/dist/facades/types.js.map +1 -0
- package/dist/httpServer.d.ts +66 -0
- package/dist/httpServer.d.ts.map +1 -0
- package/dist/httpServer.js +1723 -0
- package/dist/httpServer.js.map +1 -0
- package/dist/kernel.d.ts +87 -0
- package/dist/kernel.d.ts.map +1 -0
- package/dist/kernel.js +256 -0
- package/dist/kernel.js.map +1 -0
- package/dist/lib/agent-services/assumptions.d.ts +16 -0
- package/dist/lib/agent-services/assumptions.d.ts.map +1 -0
- package/dist/lib/agent-services/assumptions.js +284 -0
- package/dist/lib/agent-services/assumptions.js.map +1 -0
- package/dist/lib/agent-services/context-pack.d.ts +6 -0
- package/dist/lib/agent-services/context-pack.d.ts.map +1 -0
- package/dist/lib/agent-services/context-pack.js +354 -0
- package/dist/lib/agent-services/context-pack.js.map +1 -0
- package/dist/lib/agent-services/drift-guard.d.ts +14 -0
- package/dist/lib/agent-services/drift-guard.d.ts.map +1 -0
- package/dist/lib/agent-services/drift-guard.js +355 -0
- package/dist/lib/agent-services/drift-guard.js.map +1 -0
- package/dist/lib/agent-services/index.d.ts +5 -0
- package/dist/lib/agent-services/index.d.ts.map +1 -0
- package/dist/lib/agent-services/index.js +10 -0
- package/dist/lib/agent-services/index.js.map +1 -0
- package/dist/lib/benchmark.d.ts +110 -0
- package/dist/lib/benchmark.d.ts.map +1 -0
- package/dist/lib/benchmark.js +338 -0
- package/dist/lib/benchmark.js.map +1 -0
- package/dist/lib/supabase.d.ts +123 -0
- package/dist/lib/supabase.d.ts.map +1 -0
- package/dist/lib/supabase.js +91 -0
- package/dist/lib/supabase.js.map +1 -0
- package/dist/license.d.ts +30 -0
- package/dist/license.d.ts.map +1 -0
- package/dist/license.js +131 -0
- package/dist/license.js.map +1 -0
- package/dist/projectPaths.d.ts +27 -0
- package/dist/projectPaths.d.ts.map +1 -0
- package/dist/projectPaths.js +86 -0
- package/dist/projectPaths.js.map +1 -0
- package/dist/projectRegistry.d.ts +97 -0
- package/dist/projectRegistry.d.ts.map +1 -0
- package/dist/projectRegistry.js +374 -0
- package/dist/projectRegistry.js.map +1 -0
- package/dist/sentinelIssues.d.ts +65 -0
- package/dist/sentinelIssues.d.ts.map +1 -0
- package/dist/sentinelIssues.js +297 -0
- package/dist/sentinelIssues.js.map +1 -0
- package/dist/server.d.ts +3 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +195 -0
- package/dist/server.js.map +1 -0
- package/dist/test.d.ts +7 -0
- package/dist/test.d.ts.map +1 -0
- package/dist/test.js +77 -0
- package/dist/test.js.map +1 -0
- package/dist/tools/agentic/index.d.ts +7 -0
- package/dist/tools/agentic/index.d.ts.map +1 -0
- package/dist/tools/agentic/index.js +203 -0
- package/dist/tools/agentic/index.js.map +1 -0
- package/dist/tools/architect/index.d.ts +11 -0
- package/dist/tools/architect/index.d.ts.map +1 -0
- package/dist/tools/architect/index.js +506 -0
- package/dist/tools/architect/index.js.map +1 -0
- package/dist/tools/architect.d.ts +19 -0
- package/dist/tools/architect.d.ts.map +1 -0
- package/dist/tools/architect.js +88 -0
- package/dist/tools/architect.js.map +1 -0
- package/dist/tools/auditor/index.d.ts +10 -0
- package/dist/tools/auditor/index.d.ts.map +1 -0
- package/dist/tools/auditor/index.js +310 -0
- package/dist/tools/auditor/index.js.map +1 -0
- package/dist/tools/auditor.d.ts +149 -0
- package/dist/tools/auditor.d.ts.map +1 -0
- package/dist/tools/auditor.js +775 -0
- package/dist/tools/auditor.js.map +1 -0
- package/dist/tools/bench/index.d.ts +3 -0
- package/dist/tools/bench/index.d.ts.map +1 -0
- package/dist/tools/bench/index.js +220 -0
- package/dist/tools/bench/index.js.map +1 -0
- package/dist/tools/bench.d.ts +89 -0
- package/dist/tools/bench.d.ts.map +1 -0
- package/dist/tools/bench.js +826 -0
- package/dist/tools/bench.js.map +1 -0
- package/dist/tools/context/index.d.ts +11 -0
- package/dist/tools/context/index.d.ts.map +1 -0
- package/dist/tools/context/index.js +482 -0
- package/dist/tools/context/index.js.map +1 -0
- package/dist/tools/context.d.ts +146 -0
- package/dist/tools/context.d.ts.map +1 -0
- package/dist/tools/context.js +481 -0
- package/dist/tools/context.js.map +1 -0
- package/dist/tools/coordinator/coordinator.d.ts +168 -0
- package/dist/tools/coordinator/coordinator.d.ts.map +1 -0
- package/dist/tools/coordinator/coordinator.js +535 -0
- package/dist/tools/coordinator/coordinator.js.map +1 -0
- package/dist/tools/coordinator/index.d.ts +12 -0
- package/dist/tools/coordinator/index.d.ts.map +1 -0
- package/dist/tools/coordinator/index.js +381 -0
- package/dist/tools/coordinator/index.js.map +1 -0
- package/dist/tools/corpus/index.d.ts +5 -0
- package/dist/tools/corpus/index.d.ts.map +1 -0
- package/dist/tools/corpus/index.js +105 -0
- package/dist/tools/corpus/index.js.map +1 -0
- package/dist/tools/corpus.d.ts +33 -0
- package/dist/tools/corpus.d.ts.map +1 -0
- package/dist/tools/corpus.js +180 -0
- package/dist/tools/corpus.js.map +1 -0
- package/dist/tools/crit.d.ts +63 -0
- package/dist/tools/crit.d.ts.map +1 -0
- package/dist/tools/crit.js +159 -0
- package/dist/tools/crit.js.map +1 -0
- package/dist/tools/data-inspector.d.ts +189 -0
- package/dist/tools/data-inspector.d.ts.map +1 -0
- package/dist/tools/data-inspector.js +669 -0
- package/dist/tools/data-inspector.js.map +1 -0
- package/dist/tools/deck.d.ts +11 -0
- package/dist/tools/deck.d.ts.map +1 -0
- package/dist/tools/deck.js +188 -0
- package/dist/tools/deck.js.map +1 -0
- package/dist/tools/designer/index.d.ts +11 -0
- package/dist/tools/designer/index.d.ts.map +1 -0
- package/dist/tools/designer/index.js +442 -0
- package/dist/tools/designer/index.js.map +1 -0
- package/dist/tools/designer/lateral-tools.d.ts +6 -0
- package/dist/tools/designer/lateral-tools.d.ts.map +1 -0
- package/dist/tools/designer/lateral-tools.js +190 -0
- package/dist/tools/designer/lateral-tools.js.map +1 -0
- package/dist/tools/designer.d.ts +122 -0
- package/dist/tools/designer.d.ts.map +1 -0
- package/dist/tools/designer.js +495 -0
- package/dist/tools/designer.js.map +1 -0
- package/dist/tools/dojo/index.d.ts +13 -0
- package/dist/tools/dojo/index.d.ts.map +1 -0
- package/dist/tools/dojo/index.js +613 -0
- package/dist/tools/dojo/index.js.map +1 -0
- package/dist/tools/dojo.d.ts +254 -0
- package/dist/tools/dojo.d.ts.map +1 -0
- package/dist/tools/dojo.js +933 -0
- package/dist/tools/dojo.js.map +1 -0
- package/dist/tools/dojoBench.d.ts +49 -0
- package/dist/tools/dojoBench.d.ts.map +1 -0
- package/dist/tools/dojoBench.js +205 -0
- package/dist/tools/dojoBench.js.map +1 -0
- package/dist/tools/dojoGraduated.d.ts +50 -0
- package/dist/tools/dojoGraduated.d.ts.map +1 -0
- package/dist/tools/dojoGraduated.js +174 -0
- package/dist/tools/dojoGraduated.js.map +1 -0
- package/dist/tools/dojoPolicy.d.ts +65 -0
- package/dist/tools/dojoPolicy.d.ts.map +1 -0
- package/dist/tools/dojoPolicy.js +263 -0
- package/dist/tools/dojoPolicy.js.map +1 -0
- package/dist/tools/feedback/index.d.ts +5 -0
- package/dist/tools/feedback/index.d.ts.map +1 -0
- package/dist/tools/feedback/index.js +153 -0
- package/dist/tools/feedback/index.js.map +1 -0
- package/dist/tools/feedback.d.ts +61 -0
- package/dist/tools/feedback.d.ts.map +1 -0
- package/dist/tools/feedback.js +209 -0
- package/dist/tools/feedback.js.map +1 -0
- package/dist/tools/forecast/index.d.ts +8 -0
- package/dist/tools/forecast/index.d.ts.map +1 -0
- package/dist/tools/forecast/index.js +283 -0
- package/dist/tools/forecast/index.js.map +1 -0
- package/dist/tools/forecast.d.ts +147 -0
- package/dist/tools/forecast.d.ts.map +1 -0
- package/dist/tools/forecast.js +417 -0
- package/dist/tools/forecast.js.map +1 -0
- package/dist/tools/friction/index.d.ts +7 -0
- package/dist/tools/friction/index.d.ts.map +1 -0
- package/dist/tools/friction/index.js +265 -0
- package/dist/tools/friction/index.js.map +1 -0
- package/dist/tools/friction.d.ts +82 -0
- package/dist/tools/friction.d.ts.map +1 -0
- package/dist/tools/friction.js +331 -0
- package/dist/tools/friction.js.map +1 -0
- package/dist/tools/git/index.d.ts +9 -0
- package/dist/tools/git/index.d.ts.map +1 -0
- package/dist/tools/git/index.js +237 -0
- package/dist/tools/git/index.js.map +1 -0
- package/dist/tools/git-sentinel/index.d.ts +7 -0
- package/dist/tools/git-sentinel/index.d.ts.map +1 -0
- package/dist/tools/git-sentinel/index.js +178 -0
- package/dist/tools/git-sentinel/index.js.map +1 -0
- package/dist/tools/git-sentinel.d.ts +78 -0
- package/dist/tools/git-sentinel.d.ts.map +1 -0
- package/dist/tools/git-sentinel.js +391 -0
- package/dist/tools/git-sentinel.js.map +1 -0
- package/dist/tools/git.d.ts +134 -0
- package/dist/tools/git.d.ts.map +1 -0
- package/dist/tools/git.js +374 -0
- package/dist/tools/git.js.map +1 -0
- package/dist/tools/guardian/index.d.ts +8 -0
- package/dist/tools/guardian/index.d.ts.map +1 -0
- package/dist/tools/guardian/index.js +171 -0
- package/dist/tools/guardian/index.js.map +1 -0
- package/dist/tools/guardian.d.ts +62 -0
- package/dist/tools/guardian.d.ts.map +1 -0
- package/dist/tools/guardian.js +332 -0
- package/dist/tools/guardian.js.map +1 -0
- package/dist/tools/hygiene/codebase-scanner.d.ts +38 -0
- package/dist/tools/hygiene/codebase-scanner.d.ts.map +1 -0
- package/dist/tools/hygiene/codebase-scanner.js +411 -0
- package/dist/tools/hygiene/codebase-scanner.js.map +1 -0
- package/dist/tools/hygiene/config-scanner.d.ts +33 -0
- package/dist/tools/hygiene/config-scanner.d.ts.map +1 -0
- package/dist/tools/hygiene/config-scanner.js +482 -0
- package/dist/tools/hygiene/config-scanner.js.map +1 -0
- package/dist/tools/hygiene/coverage-scanner.d.ts +41 -0
- package/dist/tools/hygiene/coverage-scanner.d.ts.map +1 -0
- package/dist/tools/hygiene/coverage-scanner.js +331 -0
- package/dist/tools/hygiene/coverage-scanner.js.map +1 -0
- package/dist/tools/hygiene/index.d.ts +7 -0
- package/dist/tools/hygiene/index.d.ts.map +1 -0
- package/dist/tools/hygiene/index.js +291 -0
- package/dist/tools/hygiene/index.js.map +1 -0
- package/dist/tools/hygiene/oracle-hygiene.d.ts +68 -0
- package/dist/tools/hygiene/oracle-hygiene.d.ts.map +1 -0
- package/dist/tools/hygiene/oracle-hygiene.js +324 -0
- package/dist/tools/hygiene/oracle-hygiene.js.map +1 -0
- package/dist/tools/index.d.ts +6 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +130 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/lateral.d.ts +114 -0
- package/dist/tools/lateral.d.ts.map +1 -0
- package/dist/tools/lateral.js +536 -0
- package/dist/tools/lateral.js.map +1 -0
- package/dist/tools/learnings/index.d.ts +5 -0
- package/dist/tools/learnings/index.d.ts.map +1 -0
- package/dist/tools/learnings/index.js +138 -0
- package/dist/tools/learnings/index.js.map +1 -0
- package/dist/tools/learnings.d.ts +41 -0
- package/dist/tools/learnings.d.ts.map +1 -0
- package/dist/tools/learnings.js +149 -0
- package/dist/tools/learnings.js.map +1 -0
- package/dist/tools/oracle/index.d.ts +6 -0
- package/dist/tools/oracle/index.d.ts.map +1 -0
- package/dist/tools/oracle/index.js +217 -0
- package/dist/tools/oracle/index.js.map +1 -0
- package/dist/tools/oracle.d.ts +90 -0
- package/dist/tools/oracle.d.ts.map +1 -0
- package/dist/tools/oracle.js +529 -0
- package/dist/tools/oracle.js.map +1 -0
- package/dist/tools/policy.d.ts +119 -0
- package/dist/tools/policy.d.ts.map +1 -0
- package/dist/tools/policy.js +406 -0
- package/dist/tools/policy.js.map +1 -0
- package/dist/tools/provenance/index.d.ts +4 -0
- package/dist/tools/provenance/index.d.ts.map +1 -0
- package/dist/tools/provenance/index.js +63 -0
- package/dist/tools/provenance/index.js.map +1 -0
- package/dist/tools/provenance.d.ts +75 -0
- package/dist/tools/provenance.d.ts.map +1 -0
- package/dist/tools/provenance.js +224 -0
- package/dist/tools/provenance.js.map +1 -0
- package/dist/tools/rateLimiter.d.ts +45 -0
- package/dist/tools/rateLimiter.d.ts.map +1 -0
- package/dist/tools/rateLimiter.js +91 -0
- package/dist/tools/rateLimiter.js.map +1 -0
- package/dist/tools/registry/index.d.ts +10 -0
- package/dist/tools/registry/index.d.ts.map +1 -0
- package/dist/tools/registry/index.js +506 -0
- package/dist/tools/registry/index.js.map +1 -0
- package/dist/tools/registry.d.ts +3 -0
- package/dist/tools/registry.d.ts.map +1 -0
- package/dist/tools/registry.js +189 -0
- package/dist/tools/registry.js.map +1 -0
- package/dist/tools/roadmap/index.d.ts +11 -0
- package/dist/tools/roadmap/index.d.ts.map +1 -0
- package/dist/tools/roadmap/index.js +364 -0
- package/dist/tools/roadmap/index.js.map +1 -0
- package/dist/tools/roadmap.d.ts +103 -0
- package/dist/tools/roadmap.d.ts.map +1 -0
- package/dist/tools/roadmap.js +407 -0
- package/dist/tools/roadmap.js.map +1 -0
- package/dist/tools/senken.d.ts +11 -0
- package/dist/tools/senken.d.ts.map +1 -0
- package/dist/tools/senken.js +482 -0
- package/dist/tools/senken.js.map +1 -0
- package/dist/tools/sentinel/index.d.ts +21 -0
- package/dist/tools/sentinel/index.d.ts.map +1 -0
- package/dist/tools/sentinel/index.js +1067 -0
- package/dist/tools/sentinel/index.js.map +1 -0
- package/dist/tools/sentinel-scan-data.d.ts +90 -0
- package/dist/tools/sentinel-scan-data.d.ts.map +1 -0
- package/dist/tools/sentinel-scan-data.js +122 -0
- package/dist/tools/sentinel-scan-data.js.map +1 -0
- package/dist/tools/sentinel.d.ts +156 -0
- package/dist/tools/sentinel.d.ts.map +1 -0
- package/dist/tools/sentinel.js +603 -0
- package/dist/tools/sentinel.js.map +1 -0
- package/dist/tools/shared/index.d.ts +5 -0
- package/dist/tools/shared/index.d.ts.map +1 -0
- package/dist/tools/shared/index.js +8 -0
- package/dist/tools/shared/index.js.map +1 -0
- package/dist/tools/shared/project.d.ts +17 -0
- package/dist/tools/shared/project.d.ts.map +1 -0
- package/dist/tools/shared/project.js +36 -0
- package/dist/tools/shared/project.js.map +1 -0
- package/dist/tools/shared/response.d.ts +15 -0
- package/dist/tools/shared/response.d.ts.map +1 -0
- package/dist/tools/shared/response.js +77 -0
- package/dist/tools/shared/response.js.map +1 -0
- package/dist/tools/shared/runTracker.d.ts +87 -0
- package/dist/tools/shared/runTracker.d.ts.map +1 -0
- package/dist/tools/shared/runTracker.js +225 -0
- package/dist/tools/shared/runTracker.js.map +1 -0
- package/dist/tools/shared/validation.d.ts +10 -0
- package/dist/tools/shared/validation.d.ts.map +1 -0
- package/dist/tools/shared/validation.js +26 -0
- package/dist/tools/shared/validation.js.map +1 -0
- package/dist/tools/studio/cloud-spine.d.ts +27 -0
- package/dist/tools/studio/cloud-spine.d.ts.map +1 -0
- package/dist/tools/studio/cloud-spine.js +845 -0
- package/dist/tools/studio/cloud-spine.js.map +1 -0
- package/dist/tools/studio/index.d.ts +154 -0
- package/dist/tools/studio/index.d.ts.map +1 -0
- package/dist/tools/studio/index.js +541 -0
- package/dist/tools/studio/index.js.map +1 -0
- package/dist/tools/testSpec.d.ts +122 -0
- package/dist/tools/testSpec.d.ts.map +1 -0
- package/dist/tools/testSpec.js +525 -0
- package/dist/tools/testSpec.js.map +1 -0
- package/dist/tools/toolsIndex.d.ts +5 -0
- package/dist/tools/toolsIndex.d.ts.map +1 -0
- package/dist/tools/toolsIndex.js +37 -0
- package/dist/tools/toolsIndex.js.map +1 -0
- package/dist/tools/types.d.ts +47 -0
- package/dist/tools/types.d.ts.map +1 -0
- package/dist/tools/types.js +7 -0
- package/dist/tools/types.js.map +1 -0
- package/dist/tools/vector/index.d.ts +13 -0
- package/dist/tools/vector/index.d.ts.map +1 -0
- package/dist/tools/vector/index.js +592 -0
- package/dist/tools/vector/index.js.map +1 -0
- package/dist/tools/vector.d.ts +189 -0
- package/dist/tools/vector.d.ts.map +1 -0
- package/dist/tools/vector.js +570 -0
- package/dist/tools/vector.js.map +1 -0
- package/dist/tools/velocity/index.d.ts +9 -0
- package/dist/tools/velocity/index.d.ts.map +1 -0
- package/dist/tools/velocity/index.js +306 -0
- package/dist/tools/velocity/index.js.map +1 -0
- package/dist/tools/velocity.d.ts +143 -0
- package/dist/tools/velocity.d.ts.map +1 -0
- package/dist/tools/velocity.js +628 -0
- package/dist/tools/velocity.js.map +1 -0
- package/dist/tools/voice/index.d.ts +8 -0
- package/dist/tools/voice/index.d.ts.map +1 -0
- package/dist/tools/voice/index.js +203 -0
- package/dist/tools/voice/index.js.map +1 -0
- package/dist/tools/voice.d.ts +291 -0
- package/dist/tools/voice.d.ts.map +1 -0
- package/dist/tools/voice.js +734 -0
- package/dist/tools/voice.js.map +1 -0
- package/dist/tools/workflow/index.d.ts +8 -0
- package/dist/tools/workflow/index.d.ts.map +1 -0
- package/dist/tools/workflow/index.js +199 -0
- package/dist/tools/workflow/index.js.map +1 -0
- package/dist/tools/workflow.d.ts +123 -0
- package/dist/tools/workflow.d.ts.map +1 -0
- package/dist/tools/workflow.js +647 -0
- package/dist/tools/workflow.js.map +1 -0
- package/dist/transports/bridge.d.ts +22 -0
- package/dist/transports/bridge.d.ts.map +1 -0
- package/dist/transports/bridge.js +177 -0
- package/dist/transports/bridge.js.map +1 -0
- package/dist/transports/http.d.ts +9 -0
- package/dist/transports/http.d.ts.map +1 -0
- package/dist/transports/http.js +35 -0
- package/dist/transports/http.js.map +1 -0
- package/dist/transports/index.d.ts +6 -0
- package/dist/transports/index.d.ts.map +1 -0
- package/dist/transports/index.js +8 -0
- package/dist/transports/index.js.map +1 -0
- package/dist/transports/mcp.d.ts +9 -0
- package/dist/transports/mcp.d.ts.map +1 -0
- package/dist/transports/mcp.js +51 -0
- package/dist/transports/mcp.js.map +1 -0
- package/dist/transports/stdio.d.ts +9 -0
- package/dist/transports/stdio.d.ts.map +1 -0
- package/dist/transports/stdio.js +26 -0
- package/dist/transports/stdio.js.map +1 -0
- package/dist/transports/types.d.ts +27 -0
- package/dist/transports/types.d.ts.map +1 -0
- package/dist/transports/types.js +8 -0
- package/dist/transports/types.js.map +1 -0
- package/dist/types/agent-services.d.ts +193 -0
- package/dist/types/agent-services.d.ts.map +1 -0
- package/dist/types/agent-services.js +8 -0
- package/dist/types/agent-services.js.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +7 -0
- package/dist/types/index.js.map +1 -0
- package/package.json +72 -0
- package/templates/AGENT.md +87 -0
- package/templates/com.decibel.daemon.plist +47 -0
- package/templates/sentinel/ISSUE_TEMPLATE.md +20 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
export type Technique = 'six_hats' | 'provocation' | 'random_entry' | 'challenge' | 'alternatives' | 'reversal';
|
|
2
|
+
export declare const VALID_TECHNIQUES: Technique[];
|
|
3
|
+
export type HatColor = 'white' | 'red' | 'black' | 'yellow' | 'green' | 'blue';
|
|
4
|
+
export declare const VALID_HATS: HatColor[];
|
|
5
|
+
export interface LateralError {
|
|
6
|
+
error: string;
|
|
7
|
+
message: string;
|
|
8
|
+
hint?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function isLateralError(result: unknown): result is LateralError;
|
|
11
|
+
export interface SixHatsInput {
|
|
12
|
+
hat: HatColor;
|
|
13
|
+
thinking: string;
|
|
14
|
+
}
|
|
15
|
+
export interface ProvocationInput {
|
|
16
|
+
po_statement: string;
|
|
17
|
+
movement: string;
|
|
18
|
+
insights: string[];
|
|
19
|
+
}
|
|
20
|
+
export interface RandomEntryInput {
|
|
21
|
+
stimulus?: string;
|
|
22
|
+
connections: string[];
|
|
23
|
+
promising_leads: string[];
|
|
24
|
+
}
|
|
25
|
+
export interface ChallengeInput {
|
|
26
|
+
assumption: string;
|
|
27
|
+
why_exists: string;
|
|
28
|
+
what_if_false: string;
|
|
29
|
+
alternative_framing: string;
|
|
30
|
+
}
|
|
31
|
+
export interface AlternativesInput {
|
|
32
|
+
focus: string;
|
|
33
|
+
concept_level: string;
|
|
34
|
+
alternatives: Array<{
|
|
35
|
+
idea: string;
|
|
36
|
+
approach: string;
|
|
37
|
+
}>;
|
|
38
|
+
}
|
|
39
|
+
export interface ReversalInput {
|
|
40
|
+
original: string;
|
|
41
|
+
reversed: string;
|
|
42
|
+
insights_from_reversal: string[];
|
|
43
|
+
}
|
|
44
|
+
export type TechniqueInput = SixHatsInput | ProvocationInput | RandomEntryInput | ChallengeInput | AlternativesInput | ReversalInput;
|
|
45
|
+
export interface TechniqueEntry {
|
|
46
|
+
entry_id: string;
|
|
47
|
+
technique: Technique;
|
|
48
|
+
timestamp: string;
|
|
49
|
+
data: TechniqueInput;
|
|
50
|
+
}
|
|
51
|
+
export interface LateralSession {
|
|
52
|
+
session_id: string;
|
|
53
|
+
project_id: string;
|
|
54
|
+
problem: string;
|
|
55
|
+
context?: string;
|
|
56
|
+
status: 'open' | 'closed';
|
|
57
|
+
created_at: string;
|
|
58
|
+
closed_at?: string;
|
|
59
|
+
entries: TechniqueEntry[];
|
|
60
|
+
synthesis?: string;
|
|
61
|
+
action_items?: string[];
|
|
62
|
+
linked_to?: string[];
|
|
63
|
+
}
|
|
64
|
+
export interface StartSessionInput {
|
|
65
|
+
projectId?: string;
|
|
66
|
+
session_id?: string;
|
|
67
|
+
problem?: string;
|
|
68
|
+
context?: string;
|
|
69
|
+
}
|
|
70
|
+
export interface StartSessionOutput {
|
|
71
|
+
session_id: string;
|
|
72
|
+
problem: string;
|
|
73
|
+
status: 'open' | 'closed';
|
|
74
|
+
techniques_applied: string[];
|
|
75
|
+
path: string;
|
|
76
|
+
}
|
|
77
|
+
export interface ApplyTechniqueInput {
|
|
78
|
+
projectId?: string;
|
|
79
|
+
session_id: string;
|
|
80
|
+
technique: Technique;
|
|
81
|
+
input: Record<string, unknown>;
|
|
82
|
+
}
|
|
83
|
+
export interface ApplyTechniqueOutput {
|
|
84
|
+
entry_id: string;
|
|
85
|
+
recorded: boolean;
|
|
86
|
+
guidance: string;
|
|
87
|
+
session_progress: {
|
|
88
|
+
techniques_applied: string[];
|
|
89
|
+
entry_count: number;
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
export interface CloseSessionInput {
|
|
93
|
+
projectId?: string;
|
|
94
|
+
session_id: string;
|
|
95
|
+
synthesis: string;
|
|
96
|
+
action_items?: string[];
|
|
97
|
+
link_to?: string[];
|
|
98
|
+
}
|
|
99
|
+
export interface CloseSessionOutput {
|
|
100
|
+
session_id: string;
|
|
101
|
+
path: string;
|
|
102
|
+
summary_path: string;
|
|
103
|
+
techniques_applied: number;
|
|
104
|
+
}
|
|
105
|
+
/** Recommended Six Hats sequence: Blue > White > Red > Black > Yellow > Green > Blue */
|
|
106
|
+
export declare const HAT_ORDER: HatColor[];
|
|
107
|
+
/** Guidance for each hat color (de Bono's parallel thinking) */
|
|
108
|
+
export declare const HAT_GUIDANCE: Record<HatColor, string>;
|
|
109
|
+
/** ~100 concrete nouns for random entry technique */
|
|
110
|
+
export declare const RANDOM_STIMULI: string[];
|
|
111
|
+
export declare function startSession(input: StartSessionInput): Promise<StartSessionOutput | LateralError>;
|
|
112
|
+
export declare function applyTechnique(input: ApplyTechniqueInput): Promise<ApplyTechniqueOutput | LateralError>;
|
|
113
|
+
export declare function closeSession(input: CloseSessionInput): Promise<CloseSessionOutput | LateralError>;
|
|
114
|
+
//# sourceMappingURL=lateral.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lateral.d.ts","sourceRoot":"","sources":["../../src/tools/lateral.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,536 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// Lateral Design Thinking
|
|
3
|
+
// ============================================================================
|
|
4
|
+
// Structured lateral thinking sessions inspired by Edward de Bono's methods.
|
|
5
|
+
// Sessions persist as YAML artifacts in .decibel/designer/lateral/.
|
|
6
|
+
// ============================================================================
|
|
7
|
+
import fs from 'fs/promises';
|
|
8
|
+
import path from 'path';
|
|
9
|
+
import YAML from 'yaml';
|
|
10
|
+
import { log } from '../config.js';
|
|
11
|
+
import { ensureDir } from '../dataRoot.js';
|
|
12
|
+
import { resolveProjectPaths, validateWritePath } from '../projectRegistry.js';
|
|
13
|
+
import { emitCreateProvenance } from './provenance.js';
|
|
14
|
+
export const VALID_TECHNIQUES = [
|
|
15
|
+
'six_hats', 'provocation', 'random_entry', 'challenge', 'alternatives', 'reversal',
|
|
16
|
+
];
|
|
17
|
+
export const VALID_HATS = ['white', 'red', 'black', 'yellow', 'green', 'blue'];
|
|
18
|
+
export function isLateralError(result) {
|
|
19
|
+
return typeof result === 'object' && result !== null && 'error' in result && 'message' in result;
|
|
20
|
+
}
|
|
21
|
+
// ============================================================================
|
|
22
|
+
// Constants
|
|
23
|
+
// ============================================================================
|
|
24
|
+
/** Recommended Six Hats sequence: Blue > White > Red > Black > Yellow > Green > Blue */
|
|
25
|
+
export const HAT_ORDER = ['blue', 'white', 'red', 'black', 'yellow', 'green', 'blue'];
|
|
26
|
+
/** Guidance for each hat color (de Bono's parallel thinking) */
|
|
27
|
+
export const HAT_GUIDANCE = {
|
|
28
|
+
blue: 'PROCESS: Define the focus, set the agenda, summarise, and decide next steps. What are we thinking about? What sequence of hats should we use?',
|
|
29
|
+
white: 'FACTS: State known information and data neutrally. No opinions or interpretations. What do we know? What data is missing? What questions do we need answered?',
|
|
30
|
+
red: 'FEELINGS: Share gut feelings, emotions, and intuitions without justification. What does your instinct say? What feels right or wrong? No need to explain why.',
|
|
31
|
+
black: 'CAUTION: Identify risks, weaknesses, and reasons something may fail. Be specific about dangers. What could go wrong? What are the logical flaws? Where are the vulnerabilities?',
|
|
32
|
+
yellow: 'VALUE: Find benefits, value, and feasibility optimistically but logically. What are the advantages? Why could this work? What is the best-case outcome?',
|
|
33
|
+
green: 'CREATIVITY: Generate new ideas, alternatives, and possibilities. No judgement. Propose modifications, variations, and entirely new approaches. Use "po" provocations freely.',
|
|
34
|
+
};
|
|
35
|
+
/** ~100 concrete nouns for random entry technique */
|
|
36
|
+
export const RANDOM_STIMULI = [
|
|
37
|
+
'bridge', 'mirror', 'seed', 'clock', 'river', 'ladder', 'envelope', 'compass',
|
|
38
|
+
'anchor', 'lantern', 'thread', 'volcano', 'puzzle', 'telescope', 'mushroom',
|
|
39
|
+
'cathedral', 'iceberg', 'nest', 'waterfall', 'prism', 'anvil', 'lighthouse',
|
|
40
|
+
'fossil', 'tapestry', 'pendulum', 'canyon', 'beehive', 'circuit', 'origami',
|
|
41
|
+
'glacier', 'mosaic', 'windmill', 'coral', 'blueprint', 'hourglass', 'labyrinth',
|
|
42
|
+
'aurora', 'root', 'constellation', 'furnace', 'kaleidoscope', 'membrane',
|
|
43
|
+
'reservoir', 'scaffold', 'tide', 'valve', 'web', 'yeast', 'zipper', 'arch',
|
|
44
|
+
'bamboo', 'canopy', 'delta', 'ember', 'feather', 'gateway', 'hinge', 'island',
|
|
45
|
+
'junction', 'keystone', 'lens', 'magnet', 'nucleus', 'orbit', 'pillar',
|
|
46
|
+
'quarry', 'ripple', 'sieve', 'threshold', 'umbrella', 'vortex', 'wheel',
|
|
47
|
+
'crystal', 'drum', 'echo', 'flame', 'grove', 'harbor', 'inkwell', 'jewel',
|
|
48
|
+
'knot', 'leaf', 'mountain', 'needle', 'oasis', 'parachute', 'quilt', 'rope',
|
|
49
|
+
'satellite', 'tunnel', 'urn', 'vine', 'wave', 'xylophone', 'yarn', 'zenith',
|
|
50
|
+
'bell', 'chimney', 'dome', 'engine', 'fountain',
|
|
51
|
+
];
|
|
52
|
+
// ============================================================================
|
|
53
|
+
// Helpers
|
|
54
|
+
// ============================================================================
|
|
55
|
+
function makeProjectError(operation) {
|
|
56
|
+
return {
|
|
57
|
+
error: 'PROJECT_NOT_FOUND',
|
|
58
|
+
message: `Cannot ${operation}: No project context available.`,
|
|
59
|
+
hint: 'Specify projectId parameter, set DECIBEL_PROJECT_ROOT env var, or run from a directory with .decibel/',
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function generateSessionId() {
|
|
63
|
+
const now = new Date();
|
|
64
|
+
const ts = now.toISOString().replace(/[-:]/g, '').replace(/\.\d{3}Z$/, '');
|
|
65
|
+
return `LAT-${ts}`;
|
|
66
|
+
}
|
|
67
|
+
function generateEntryId(sessionId, technique, data) {
|
|
68
|
+
const suffix = technique === 'six_hats' ? data.hat : '';
|
|
69
|
+
return suffix ? `${sessionId}-${technique.replace('_', '-')}-${suffix}` : `${sessionId}-${technique.replace('_', '-')}-${Date.now()}`;
|
|
70
|
+
}
|
|
71
|
+
function lateralDir(resolved) {
|
|
72
|
+
return resolved.subPath('designer', 'lateral');
|
|
73
|
+
}
|
|
74
|
+
function sessionFilePath(dir, sessionId) {
|
|
75
|
+
return path.join(dir, `${sessionId}.yaml`);
|
|
76
|
+
}
|
|
77
|
+
function summaryFilePath(dir, sessionId) {
|
|
78
|
+
return path.join(dir, `${sessionId}-summary.md`);
|
|
79
|
+
}
|
|
80
|
+
function pickRandomStimulus() {
|
|
81
|
+
return RANDOM_STIMULI[Math.floor(Math.random() * RANDOM_STIMULI.length)];
|
|
82
|
+
}
|
|
83
|
+
async function loadSession(filePath) {
|
|
84
|
+
const content = await fs.readFile(filePath, 'utf-8');
|
|
85
|
+
return YAML.parse(content);
|
|
86
|
+
}
|
|
87
|
+
async function saveSession(filePath, session, resolved) {
|
|
88
|
+
validateWritePath(filePath, resolved);
|
|
89
|
+
await fs.writeFile(filePath, YAML.stringify(session, { lineWidth: 0 }), 'utf-8');
|
|
90
|
+
}
|
|
91
|
+
function techniquesApplied(session) {
|
|
92
|
+
const seen = new Set();
|
|
93
|
+
for (const entry of session.entries) {
|
|
94
|
+
if (entry.technique === 'six_hats') {
|
|
95
|
+
seen.add(`six_hats:${entry.data.hat}`);
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
seen.add(entry.technique);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return [...seen];
|
|
102
|
+
}
|
|
103
|
+
// ============================================================================
|
|
104
|
+
// Guidance Generators
|
|
105
|
+
// ============================================================================
|
|
106
|
+
function guidanceForSixHats(hat, session) {
|
|
107
|
+
const hatsUsed = session.entries
|
|
108
|
+
.filter(e => e.technique === 'six_hats')
|
|
109
|
+
.map(e => e.data.hat);
|
|
110
|
+
const currentIndex = HAT_ORDER.indexOf(hat);
|
|
111
|
+
const nextHats = HAT_ORDER.filter((h, i) => i > currentIndex && !hatsUsed.includes(h));
|
|
112
|
+
const nextSuggestion = nextHats.length > 0
|
|
113
|
+
? `Suggested next hat: ${nextHats[0]} (${HAT_GUIDANCE[nextHats[0]].split(':')[0]})`
|
|
114
|
+
: 'All hats explored. Consider closing with blue hat summary or applying another technique.';
|
|
115
|
+
return `${HAT_GUIDANCE[hat]}\n\n${nextSuggestion}`;
|
|
116
|
+
}
|
|
117
|
+
function guidanceForProvocation() {
|
|
118
|
+
return 'PROVOCATION recorded. Now apply "movement" — don\'t judge the Po statement, instead extract useful concepts from it. Look for: what principle is operating? What happens at the boundary? What would the world need to look like for this to make sense?';
|
|
119
|
+
}
|
|
120
|
+
function guidanceForRandomEntry(stimulus) {
|
|
121
|
+
return `Random stimulus: "${stimulus}". Force connections between this word and your problem. What properties does "${stimulus}" have? How do those properties relate to your design challenge? List at least 3 associations, then identify which connections open new avenues.`;
|
|
122
|
+
}
|
|
123
|
+
function guidanceForChallenge() {
|
|
124
|
+
return 'CHALLENGE recorded. You\'ve questioned an assumption. Now explore: What designs become possible if this assumption is removed? What new constraints emerge? Consider using the "alternatives" technique to fan out from this new framing.';
|
|
125
|
+
}
|
|
126
|
+
function guidanceForAlternatives() {
|
|
127
|
+
return 'ALTERNATIVES captured. You\'ve broadened the concept fan. Before narrowing, ask: Are there concepts at a higher abstraction level we haven\'t explored? Can any two ideas be combined? Consider applying "reversal" to your top candidate.';
|
|
128
|
+
}
|
|
129
|
+
function guidanceForReversal() {
|
|
130
|
+
return 'REVERSAL recorded. The flipped perspective often reveals hidden assumptions. Look for insights that wouldn\'t have surfaced from the original framing. Consider: which insights from the reversal can be integrated back into the original direction?';
|
|
131
|
+
}
|
|
132
|
+
function getGuidance(technique, data, session, stimulus) {
|
|
133
|
+
switch (technique) {
|
|
134
|
+
case 'six_hats': return guidanceForSixHats(data.hat, session);
|
|
135
|
+
case 'provocation': return guidanceForProvocation();
|
|
136
|
+
case 'random_entry': return guidanceForRandomEntry(stimulus || data.stimulus || 'unknown');
|
|
137
|
+
case 'challenge': return guidanceForChallenge();
|
|
138
|
+
case 'alternatives': return guidanceForAlternatives();
|
|
139
|
+
case 'reversal': return guidanceForReversal();
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
// ============================================================================
|
|
143
|
+
// Core Functions
|
|
144
|
+
// ============================================================================
|
|
145
|
+
export async function startSession(input) {
|
|
146
|
+
let resolved;
|
|
147
|
+
try {
|
|
148
|
+
resolved = resolveProjectPaths(input.projectId);
|
|
149
|
+
}
|
|
150
|
+
catch {
|
|
151
|
+
return makeProjectError('start lateral session');
|
|
152
|
+
}
|
|
153
|
+
const dir = lateralDir(resolved);
|
|
154
|
+
ensureDir(dir);
|
|
155
|
+
// Resume existing session
|
|
156
|
+
if (input.session_id) {
|
|
157
|
+
const fp = sessionFilePath(dir, input.session_id);
|
|
158
|
+
try {
|
|
159
|
+
const session = await loadSession(fp);
|
|
160
|
+
return {
|
|
161
|
+
session_id: session.session_id,
|
|
162
|
+
problem: session.problem,
|
|
163
|
+
status: session.status,
|
|
164
|
+
techniques_applied: techniquesApplied(session),
|
|
165
|
+
path: fp,
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
catch {
|
|
169
|
+
return {
|
|
170
|
+
error: 'SESSION_NOT_FOUND',
|
|
171
|
+
message: `Session ${input.session_id} not found.`,
|
|
172
|
+
hint: 'Check the session_id or create a new session by providing a problem statement.',
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
// New session requires problem
|
|
177
|
+
if (!input.problem) {
|
|
178
|
+
return {
|
|
179
|
+
error: 'MISSING_PROBLEM',
|
|
180
|
+
message: 'A problem statement is required to start a new session.',
|
|
181
|
+
hint: 'Provide the "problem" field describing the design challenge.',
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
const sessionId = generateSessionId();
|
|
185
|
+
const now = new Date().toISOString();
|
|
186
|
+
const session = {
|
|
187
|
+
session_id: sessionId,
|
|
188
|
+
project_id: resolved.id,
|
|
189
|
+
problem: input.problem,
|
|
190
|
+
context: input.context,
|
|
191
|
+
status: 'open',
|
|
192
|
+
created_at: now,
|
|
193
|
+
entries: [],
|
|
194
|
+
};
|
|
195
|
+
const fp = sessionFilePath(dir, sessionId);
|
|
196
|
+
await saveSession(fp, session, resolved);
|
|
197
|
+
log(`Lateral: Created session ${sessionId} at ${fp}`);
|
|
198
|
+
return {
|
|
199
|
+
session_id: sessionId,
|
|
200
|
+
problem: input.problem,
|
|
201
|
+
status: 'open',
|
|
202
|
+
techniques_applied: [],
|
|
203
|
+
path: fp,
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
export async function applyTechnique(input) {
|
|
207
|
+
let resolved;
|
|
208
|
+
try {
|
|
209
|
+
resolved = resolveProjectPaths(input.projectId);
|
|
210
|
+
}
|
|
211
|
+
catch {
|
|
212
|
+
return makeProjectError('apply lateral technique');
|
|
213
|
+
}
|
|
214
|
+
const dir = lateralDir(resolved);
|
|
215
|
+
const fp = sessionFilePath(dir, input.session_id);
|
|
216
|
+
let session;
|
|
217
|
+
try {
|
|
218
|
+
session = await loadSession(fp);
|
|
219
|
+
}
|
|
220
|
+
catch {
|
|
221
|
+
return {
|
|
222
|
+
error: 'SESSION_NOT_FOUND',
|
|
223
|
+
message: `Session ${input.session_id} not found.`,
|
|
224
|
+
hint: 'Start a session first with designer_lateral_session.',
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
if (session.status === 'closed') {
|
|
228
|
+
return {
|
|
229
|
+
error: 'SESSION_CLOSED',
|
|
230
|
+
message: `Session ${input.session_id} is already closed.`,
|
|
231
|
+
hint: 'Start a new session to continue lateral thinking.',
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
// Build technique-specific data with validation
|
|
235
|
+
let data;
|
|
236
|
+
let effectiveStimulus;
|
|
237
|
+
const raw = input.input;
|
|
238
|
+
switch (input.technique) {
|
|
239
|
+
case 'six_hats': {
|
|
240
|
+
const hat = raw.hat;
|
|
241
|
+
if (!hat || !VALID_HATS.includes(hat)) {
|
|
242
|
+
return { error: 'INVALID_INPUT', message: `Invalid hat color. Must be one of: ${VALID_HATS.join(', ')}` };
|
|
243
|
+
}
|
|
244
|
+
if (!raw.thinking) {
|
|
245
|
+
return { error: 'INVALID_INPUT', message: 'six_hats requires "thinking" field.' };
|
|
246
|
+
}
|
|
247
|
+
data = { hat: hat, thinking: raw.thinking };
|
|
248
|
+
break;
|
|
249
|
+
}
|
|
250
|
+
case 'provocation': {
|
|
251
|
+
if (!raw.po_statement)
|
|
252
|
+
return { error: 'INVALID_INPUT', message: 'provocation requires "po_statement" field.' };
|
|
253
|
+
if (!raw.movement)
|
|
254
|
+
return { error: 'INVALID_INPUT', message: 'provocation requires "movement" field.' };
|
|
255
|
+
data = {
|
|
256
|
+
po_statement: raw.po_statement,
|
|
257
|
+
movement: raw.movement,
|
|
258
|
+
insights: raw.insights || [],
|
|
259
|
+
};
|
|
260
|
+
break;
|
|
261
|
+
}
|
|
262
|
+
case 'random_entry': {
|
|
263
|
+
effectiveStimulus = raw.stimulus || pickRandomStimulus();
|
|
264
|
+
data = {
|
|
265
|
+
stimulus: effectiveStimulus,
|
|
266
|
+
connections: raw.connections || [],
|
|
267
|
+
promising_leads: raw.promising_leads || [],
|
|
268
|
+
};
|
|
269
|
+
break;
|
|
270
|
+
}
|
|
271
|
+
case 'challenge': {
|
|
272
|
+
if (!raw.assumption)
|
|
273
|
+
return { error: 'INVALID_INPUT', message: 'challenge requires "assumption" field.' };
|
|
274
|
+
if (!raw.why_exists)
|
|
275
|
+
return { error: 'INVALID_INPUT', message: 'challenge requires "why_exists" field.' };
|
|
276
|
+
if (!raw.what_if_false)
|
|
277
|
+
return { error: 'INVALID_INPUT', message: 'challenge requires "what_if_false" field.' };
|
|
278
|
+
if (!raw.alternative_framing)
|
|
279
|
+
return { error: 'INVALID_INPUT', message: 'challenge requires "alternative_framing" field.' };
|
|
280
|
+
data = {
|
|
281
|
+
assumption: raw.assumption,
|
|
282
|
+
why_exists: raw.why_exists,
|
|
283
|
+
what_if_false: raw.what_if_false,
|
|
284
|
+
alternative_framing: raw.alternative_framing,
|
|
285
|
+
};
|
|
286
|
+
break;
|
|
287
|
+
}
|
|
288
|
+
case 'alternatives': {
|
|
289
|
+
if (!raw.focus)
|
|
290
|
+
return { error: 'INVALID_INPUT', message: 'alternatives requires "focus" field.' };
|
|
291
|
+
if (!raw.concept_level)
|
|
292
|
+
return { error: 'INVALID_INPUT', message: 'alternatives requires "concept_level" field.' };
|
|
293
|
+
data = {
|
|
294
|
+
focus: raw.focus,
|
|
295
|
+
concept_level: raw.concept_level,
|
|
296
|
+
alternatives: raw.alternatives || [],
|
|
297
|
+
};
|
|
298
|
+
break;
|
|
299
|
+
}
|
|
300
|
+
case 'reversal': {
|
|
301
|
+
if (!raw.original)
|
|
302
|
+
return { error: 'INVALID_INPUT', message: 'reversal requires "original" field.' };
|
|
303
|
+
if (!raw.reversed)
|
|
304
|
+
return { error: 'INVALID_INPUT', message: 'reversal requires "reversed" field.' };
|
|
305
|
+
data = {
|
|
306
|
+
original: raw.original,
|
|
307
|
+
reversed: raw.reversed,
|
|
308
|
+
insights_from_reversal: raw.insights_from_reversal || [],
|
|
309
|
+
};
|
|
310
|
+
break;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
const entryId = generateEntryId(input.session_id, input.technique, data);
|
|
314
|
+
const entry = {
|
|
315
|
+
entry_id: entryId,
|
|
316
|
+
technique: input.technique,
|
|
317
|
+
timestamp: new Date().toISOString(),
|
|
318
|
+
data,
|
|
319
|
+
};
|
|
320
|
+
session.entries.push(entry);
|
|
321
|
+
await saveSession(fp, session, resolved);
|
|
322
|
+
const guidance = getGuidance(input.technique, data, session, effectiveStimulus);
|
|
323
|
+
log(`Lateral: Applied ${input.technique} to session ${input.session_id} (entry ${entryId})`);
|
|
324
|
+
return {
|
|
325
|
+
entry_id: entryId,
|
|
326
|
+
recorded: true,
|
|
327
|
+
guidance,
|
|
328
|
+
session_progress: {
|
|
329
|
+
techniques_applied: techniquesApplied(session),
|
|
330
|
+
entry_count: session.entries.length,
|
|
331
|
+
},
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
export async function closeSession(input) {
|
|
335
|
+
let resolved;
|
|
336
|
+
try {
|
|
337
|
+
resolved = resolveProjectPaths(input.projectId);
|
|
338
|
+
}
|
|
339
|
+
catch {
|
|
340
|
+
return makeProjectError('close lateral session');
|
|
341
|
+
}
|
|
342
|
+
const dir = lateralDir(resolved);
|
|
343
|
+
const fp = sessionFilePath(dir, input.session_id);
|
|
344
|
+
let session;
|
|
345
|
+
try {
|
|
346
|
+
session = await loadSession(fp);
|
|
347
|
+
}
|
|
348
|
+
catch {
|
|
349
|
+
return {
|
|
350
|
+
error: 'SESSION_NOT_FOUND',
|
|
351
|
+
message: `Session ${input.session_id} not found.`,
|
|
352
|
+
};
|
|
353
|
+
}
|
|
354
|
+
if (session.status === 'closed') {
|
|
355
|
+
return {
|
|
356
|
+
error: 'SESSION_ALREADY_CLOSED',
|
|
357
|
+
message: `Session ${input.session_id} is already closed.`,
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
// Update session
|
|
361
|
+
session.status = 'closed';
|
|
362
|
+
session.closed_at = new Date().toISOString();
|
|
363
|
+
session.synthesis = input.synthesis;
|
|
364
|
+
session.action_items = input.action_items;
|
|
365
|
+
session.linked_to = input.link_to;
|
|
366
|
+
await saveSession(fp, session, resolved);
|
|
367
|
+
// Generate markdown summary
|
|
368
|
+
const summaryPath = summaryFilePath(dir, input.session_id);
|
|
369
|
+
const markdown = generateSummaryMarkdown(session);
|
|
370
|
+
validateWritePath(summaryPath, resolved);
|
|
371
|
+
await fs.writeFile(summaryPath, markdown, 'utf-8');
|
|
372
|
+
// Emit provenance
|
|
373
|
+
await emitCreateProvenance(`designer:lateral:${input.session_id}`, markdown, `Closed lateral thinking session: ${session.problem}`, input.projectId);
|
|
374
|
+
log(`Lateral: Closed session ${input.session_id}, summary at ${summaryPath}`);
|
|
375
|
+
return {
|
|
376
|
+
session_id: input.session_id,
|
|
377
|
+
path: fp,
|
|
378
|
+
summary_path: summaryPath,
|
|
379
|
+
techniques_applied: session.entries.length,
|
|
380
|
+
};
|
|
381
|
+
}
|
|
382
|
+
// ============================================================================
|
|
383
|
+
// Summary Markdown Generator
|
|
384
|
+
// ============================================================================
|
|
385
|
+
function generateSummaryMarkdown(session) {
|
|
386
|
+
const lines = [];
|
|
387
|
+
// Frontmatter
|
|
388
|
+
lines.push('---');
|
|
389
|
+
lines.push(`session_id: ${session.session_id}`);
|
|
390
|
+
lines.push(`project_id: ${session.project_id}`);
|
|
391
|
+
lines.push(`status: ${session.status}`);
|
|
392
|
+
lines.push(`created_at: ${session.created_at}`);
|
|
393
|
+
if (session.closed_at)
|
|
394
|
+
lines.push(`closed_at: ${session.closed_at}`);
|
|
395
|
+
lines.push(`techniques_count: ${session.entries.length}`);
|
|
396
|
+
if (session.linked_to?.length)
|
|
397
|
+
lines.push(`linked_to: [${session.linked_to.join(', ')}]`);
|
|
398
|
+
lines.push('---');
|
|
399
|
+
lines.push('');
|
|
400
|
+
// Title
|
|
401
|
+
lines.push(`# Lateral Thinking Session: ${session.session_id}`);
|
|
402
|
+
lines.push('');
|
|
403
|
+
lines.push(`**Problem:** ${session.problem}`);
|
|
404
|
+
if (session.context) {
|
|
405
|
+
lines.push('');
|
|
406
|
+
lines.push(`**Context:** ${session.context}`);
|
|
407
|
+
}
|
|
408
|
+
lines.push('');
|
|
409
|
+
// Group entries by technique
|
|
410
|
+
const grouped = new Map();
|
|
411
|
+
for (const entry of session.entries) {
|
|
412
|
+
const key = entry.technique;
|
|
413
|
+
if (!grouped.has(key))
|
|
414
|
+
grouped.set(key, []);
|
|
415
|
+
grouped.get(key).push(entry);
|
|
416
|
+
}
|
|
417
|
+
for (const [technique, entries] of grouped) {
|
|
418
|
+
lines.push(`## ${formatTechniqueName(technique)}`);
|
|
419
|
+
lines.push('');
|
|
420
|
+
for (const entry of entries) {
|
|
421
|
+
lines.push(`### ${entry.entry_id}`);
|
|
422
|
+
lines.push(`*${entry.timestamp}*`);
|
|
423
|
+
lines.push('');
|
|
424
|
+
lines.push(formatEntryData(entry));
|
|
425
|
+
lines.push('');
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
// Synthesis
|
|
429
|
+
if (session.synthesis) {
|
|
430
|
+
lines.push('## Synthesis');
|
|
431
|
+
lines.push('');
|
|
432
|
+
lines.push(session.synthesis);
|
|
433
|
+
lines.push('');
|
|
434
|
+
}
|
|
435
|
+
// Action items
|
|
436
|
+
if (session.action_items?.length) {
|
|
437
|
+
lines.push('## Action Items');
|
|
438
|
+
lines.push('');
|
|
439
|
+
for (const item of session.action_items) {
|
|
440
|
+
lines.push(`- [ ] ${item}`);
|
|
441
|
+
}
|
|
442
|
+
lines.push('');
|
|
443
|
+
}
|
|
444
|
+
return lines.join('\n');
|
|
445
|
+
}
|
|
446
|
+
function formatTechniqueName(technique) {
|
|
447
|
+
const names = {
|
|
448
|
+
six_hats: 'Six Thinking Hats',
|
|
449
|
+
provocation: 'Provocation (Po)',
|
|
450
|
+
random_entry: 'Random Entry',
|
|
451
|
+
challenge: 'Challenge',
|
|
452
|
+
alternatives: 'Alternatives (Concept Fan)',
|
|
453
|
+
reversal: 'Reversal',
|
|
454
|
+
};
|
|
455
|
+
return names[technique] || technique;
|
|
456
|
+
}
|
|
457
|
+
function formatEntryData(entry) {
|
|
458
|
+
const lines = [];
|
|
459
|
+
switch (entry.technique) {
|
|
460
|
+
case 'six_hats': {
|
|
461
|
+
const d = entry.data;
|
|
462
|
+
lines.push(`**Hat:** ${d.hat.toUpperCase()}`);
|
|
463
|
+
lines.push('');
|
|
464
|
+
lines.push(d.thinking);
|
|
465
|
+
break;
|
|
466
|
+
}
|
|
467
|
+
case 'provocation': {
|
|
468
|
+
const d = entry.data;
|
|
469
|
+
lines.push(`**Po:** ${d.po_statement}`);
|
|
470
|
+
lines.push('');
|
|
471
|
+
lines.push(`**Movement:** ${d.movement}`);
|
|
472
|
+
if (d.insights.length) {
|
|
473
|
+
lines.push('');
|
|
474
|
+
lines.push('**Insights:**');
|
|
475
|
+
for (const i of d.insights)
|
|
476
|
+
lines.push(`- ${i}`);
|
|
477
|
+
}
|
|
478
|
+
break;
|
|
479
|
+
}
|
|
480
|
+
case 'random_entry': {
|
|
481
|
+
const d = entry.data;
|
|
482
|
+
lines.push(`**Stimulus:** ${d.stimulus}`);
|
|
483
|
+
if (d.connections.length) {
|
|
484
|
+
lines.push('');
|
|
485
|
+
lines.push('**Connections:**');
|
|
486
|
+
for (const c of d.connections)
|
|
487
|
+
lines.push(`- ${c}`);
|
|
488
|
+
}
|
|
489
|
+
if (d.promising_leads.length) {
|
|
490
|
+
lines.push('');
|
|
491
|
+
lines.push('**Promising Leads:**');
|
|
492
|
+
for (const l of d.promising_leads)
|
|
493
|
+
lines.push(`- ${l}`);
|
|
494
|
+
}
|
|
495
|
+
break;
|
|
496
|
+
}
|
|
497
|
+
case 'challenge': {
|
|
498
|
+
const d = entry.data;
|
|
499
|
+
lines.push(`**Assumption:** ${d.assumption}`);
|
|
500
|
+
lines.push('');
|
|
501
|
+
lines.push(`**Why it exists:** ${d.why_exists}`);
|
|
502
|
+
lines.push('');
|
|
503
|
+
lines.push(`**What if false:** ${d.what_if_false}`);
|
|
504
|
+
lines.push('');
|
|
505
|
+
lines.push(`**Alternative framing:** ${d.alternative_framing}`);
|
|
506
|
+
break;
|
|
507
|
+
}
|
|
508
|
+
case 'alternatives': {
|
|
509
|
+
const d = entry.data;
|
|
510
|
+
lines.push(`**Focus:** ${d.focus}`);
|
|
511
|
+
lines.push(`**Concept level:** ${d.concept_level}`);
|
|
512
|
+
if (d.alternatives.length) {
|
|
513
|
+
lines.push('');
|
|
514
|
+
for (const a of d.alternatives) {
|
|
515
|
+
lines.push(`- **${a.idea}**: ${a.approach}`);
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
break;
|
|
519
|
+
}
|
|
520
|
+
case 'reversal': {
|
|
521
|
+
const d = entry.data;
|
|
522
|
+
lines.push(`**Original:** ${d.original}`);
|
|
523
|
+
lines.push('');
|
|
524
|
+
lines.push(`**Reversed:** ${d.reversed}`);
|
|
525
|
+
if (d.insights_from_reversal.length) {
|
|
526
|
+
lines.push('');
|
|
527
|
+
lines.push('**Insights from reversal:**');
|
|
528
|
+
for (const i of d.insights_from_reversal)
|
|
529
|
+
lines.push(`- ${i}`);
|
|
530
|
+
}
|
|
531
|
+
break;
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
return lines.join('\n');
|
|
535
|
+
}
|
|
536
|
+
//# sourceMappingURL=lateral.js.map
|