@ginkoai/cli 1.0.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -0
- package/dist/analysis/project-analyzer.d.ts.map +1 -1
- package/dist/analysis/project-analyzer.js +68 -4
- package/dist/analysis/project-analyzer.js.map +1 -1
- package/dist/commands/architecture/architecture-pipeline-enhanced.d.ts.map +1 -1
- package/dist/commands/architecture/architecture-pipeline-enhanced.js +10 -6
- package/dist/commands/architecture/architecture-pipeline-enhanced.js.map +1 -1
- package/dist/commands/backlog/base.d.ts.map +1 -1
- package/dist/commands/backlog/base.js +3 -0
- package/dist/commands/backlog/base.js.map +1 -1
- package/dist/commands/backlog/create.js +20 -20
- package/dist/commands/backlog/create.js.map +1 -1
- package/dist/commands/backlog/index.d.ts.map +1 -1
- package/dist/commands/backlog/index.js +6 -1
- package/dist/commands/backlog/index.js.map +1 -1
- package/dist/commands/changelog/changelog-reflection.d.ts.map +1 -1
- package/dist/commands/changelog/changelog-reflection.js +7 -3
- package/dist/commands/changelog/changelog-reflection.js.map +1 -1
- package/dist/commands/charter.d.ts +28 -0
- package/dist/commands/charter.d.ts.map +1 -0
- package/dist/commands/charter.js +434 -0
- package/dist/commands/charter.js.map +1 -0
- package/dist/commands/documentation/documentation-pipeline.d.ts.map +1 -1
- package/dist/commands/documentation/documentation-pipeline.js +15 -7
- package/dist/commands/documentation/documentation-pipeline.js.map +1 -1
- package/dist/commands/git/git-pipeline.d.ts.map +1 -1
- package/dist/commands/git/git-pipeline.js +3 -2
- package/dist/commands/git/git-pipeline.js.map +1 -1
- package/dist/commands/graph/api-client.d.ts +212 -0
- package/dist/commands/graph/api-client.d.ts.map +1 -0
- package/dist/commands/graph/api-client.js +143 -0
- package/dist/commands/graph/api-client.js.map +1 -0
- package/dist/commands/graph/config.d.ts +82 -0
- package/dist/commands/graph/config.d.ts.map +1 -0
- package/dist/commands/graph/config.js +113 -0
- package/dist/commands/graph/config.js.map +1 -0
- package/dist/commands/graph/explore.d.ts +19 -0
- package/dist/commands/graph/explore.d.ts.map +1 -0
- package/dist/commands/graph/explore.js +117 -0
- package/dist/commands/graph/explore.js.map +1 -0
- package/dist/commands/graph/index.d.ts +17 -0
- package/dist/commands/graph/index.d.ts.map +1 -0
- package/dist/commands/graph/index.js +104 -0
- package/dist/commands/graph/index.js.map +1 -0
- package/dist/commands/graph/init.d.ts +21 -0
- package/dist/commands/graph/init.d.ts.map +1 -0
- package/dist/commands/graph/init.js +173 -0
- package/dist/commands/graph/init.js.map +1 -0
- package/dist/commands/graph/load.d.ts +21 -0
- package/dist/commands/graph/load.d.ts.map +1 -0
- package/dist/commands/graph/load.js +224 -0
- package/dist/commands/graph/load.js.map +1 -0
- package/dist/commands/graph/query.d.ts +23 -0
- package/dist/commands/graph/query.d.ts.map +1 -0
- package/dist/commands/graph/query.js +145 -0
- package/dist/commands/graph/query.js.map +1 -0
- package/dist/commands/graph/status.d.ts +15 -0
- package/dist/commands/graph/status.d.ts.map +1 -0
- package/dist/commands/graph/status.js +88 -0
- package/dist/commands/graph/status.js.map +1 -0
- package/dist/commands/handoff.d.ts +14 -5
- package/dist/commands/handoff.d.ts.map +1 -1
- package/dist/commands/handoff.js +84 -142
- package/dist/commands/handoff.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +88 -41
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/knowledge/create.d.ts +24 -0
- package/dist/commands/knowledge/create.d.ts.map +1 -0
- package/dist/commands/knowledge/create.js +180 -0
- package/dist/commands/knowledge/create.js.map +1 -0
- package/dist/commands/knowledge/graph.d.ts +21 -0
- package/dist/commands/knowledge/graph.d.ts.map +1 -0
- package/dist/commands/knowledge/graph.js +199 -0
- package/dist/commands/knowledge/graph.js.map +1 -0
- package/dist/commands/knowledge/index.d.ts +25 -0
- package/dist/commands/knowledge/index.d.ts.map +1 -0
- package/dist/commands/knowledge/index.js +121 -0
- package/dist/commands/knowledge/index.js.map +1 -0
- package/dist/commands/knowledge/search.d.ts +23 -0
- package/dist/commands/knowledge/search.d.ts.map +1 -0
- package/dist/commands/knowledge/search.js +157 -0
- package/dist/commands/knowledge/search.js.map +1 -0
- package/dist/commands/knowledge/sync.d.ts +28 -0
- package/dist/commands/knowledge/sync.d.ts.map +1 -0
- package/dist/commands/knowledge/sync.js +251 -0
- package/dist/commands/knowledge/sync.js.map +1 -0
- package/dist/commands/log.d.ts +32 -0
- package/dist/commands/log.d.ts.map +1 -0
- package/dist/commands/log.js +632 -0
- package/dist/commands/log.js.map +1 -0
- package/dist/commands/login.d.ts +27 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +177 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/logout.d.ts +15 -0
- package/dist/commands/logout.d.ts.map +1 -0
- package/dist/commands/logout.js +31 -0
- package/dist/commands/logout.js.map +1 -0
- package/dist/commands/project/create.d.ts +22 -0
- package/dist/commands/project/create.d.ts.map +1 -0
- package/dist/commands/project/create.js +69 -0
- package/dist/commands/project/create.js.map +1 -0
- package/dist/commands/project/delete.d.ts +19 -0
- package/dist/commands/project/delete.d.ts.map +1 -0
- package/dist/commands/project/delete.js +73 -0
- package/dist/commands/project/delete.js.map +1 -0
- package/dist/commands/project/index.d.ts +22 -0
- package/dist/commands/project/index.d.ts.map +1 -0
- package/dist/commands/project/index.js +134 -0
- package/dist/commands/project/index.js.map +1 -0
- package/dist/commands/project/info.d.ts +15 -0
- package/dist/commands/project/info.d.ts.map +1 -0
- package/dist/commands/project/info.js +92 -0
- package/dist/commands/project/info.js.map +1 -0
- package/dist/commands/project/list.d.ts +20 -0
- package/dist/commands/project/list.d.ts.map +1 -0
- package/dist/commands/project/list.js +82 -0
- package/dist/commands/project/list.js.map +1 -0
- package/dist/commands/project/members.d.ts +27 -0
- package/dist/commands/project/members.d.ts.map +1 -0
- package/dist/commands/project/members.js +140 -0
- package/dist/commands/project/members.js.map +1 -0
- package/dist/commands/project/update.d.ts +24 -0
- package/dist/commands/project/update.d.ts.map +1 -0
- package/dist/commands/project/update.js +83 -0
- package/dist/commands/project/update.js.map +1 -0
- package/dist/commands/reflect.js +0 -3
- package/dist/commands/reflect.js.map +1 -1
- package/dist/commands/ship.d.ts +3 -1
- package/dist/commands/ship.d.ts.map +1 -1
- package/dist/commands/ship.js +100 -9
- package/dist/commands/ship.js.map +1 -1
- package/dist/commands/start/index.d.ts.map +1 -1
- package/dist/commands/start/index.js +5 -3
- package/dist/commands/start/index.js.map +1 -1
- package/dist/commands/start/start-reflection.d.ts +2 -1
- package/dist/commands/start/start-reflection.d.ts.map +1 -1
- package/dist/commands/start/start-reflection.js +265 -43
- package/dist/commands/start/start-reflection.js.map +1 -1
- package/dist/commands/status.d.ts +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +41 -1
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/team/create.d.ts +15 -0
- package/dist/commands/team/create.d.ts.map +1 -0
- package/dist/commands/team/create.js +48 -0
- package/dist/commands/team/create.js.map +1 -0
- package/dist/commands/team/index.d.ts +22 -0
- package/dist/commands/team/index.d.ts.map +1 -0
- package/dist/commands/team/index.js +109 -0
- package/dist/commands/team/index.js.map +1 -0
- package/dist/commands/team/list.d.ts +15 -0
- package/dist/commands/team/list.d.ts.map +1 -0
- package/dist/commands/team/list.js +67 -0
- package/dist/commands/team/list.js.map +1 -0
- package/dist/commands/team/members.d.ts +27 -0
- package/dist/commands/team/members.d.ts.map +1 -0
- package/dist/commands/team/members.js +135 -0
- package/dist/commands/team/members.js.map +1 -0
- package/dist/commands/team/projects.d.ts +19 -0
- package/dist/commands/team/projects.d.ts.map +1 -0
- package/dist/commands/team/projects.js +107 -0
- package/dist/commands/team/projects.js.map +1 -0
- package/dist/commands/team.d.ts +22 -0
- package/dist/commands/team.d.ts.map +1 -0
- package/dist/commands/team.js +238 -0
- package/dist/commands/team.js.map +1 -0
- package/dist/commands/testing/testing-pipeline-enhanced.d.ts.map +1 -1
- package/dist/commands/testing/testing-pipeline-enhanced.js +5 -3
- package/dist/commands/testing/testing-pipeline-enhanced.js.map +1 -1
- package/dist/commands/testing/testing-pipeline.d.ts.map +1 -1
- package/dist/commands/testing/testing-pipeline.js +5 -3
- package/dist/commands/testing/testing-pipeline.js.map +1 -1
- package/dist/commands/whoami.d.ts +15 -0
- package/dist/commands/whoami.d.ts.map +1 -0
- package/dist/commands/whoami.js +38 -0
- package/dist/commands/whoami.js.map +1 -0
- package/dist/core/reflection-pattern.d.ts +1 -1
- package/dist/core/reflection-pattern.d.ts.map +1 -1
- package/dist/core/reflection-pattern.js +2 -12
- package/dist/core/reflection-pattern.js.map +1 -1
- package/dist/core/session-log-manager.d.ts +44 -4
- package/dist/core/session-log-manager.d.ts.map +1 -1
- package/dist/core/session-log-manager.js +132 -31
- package/dist/core/session-log-manager.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +116 -17
- package/dist/index.js.map +1 -1
- package/dist/lib/api/projects-client.d.ts +119 -0
- package/dist/lib/api/projects-client.d.ts.map +1 -0
- package/dist/lib/api/projects-client.js +125 -0
- package/dist/lib/api/projects-client.js.map +1 -0
- package/dist/lib/api/teams-client.d.ts +73 -0
- package/dist/lib/api/teams-client.d.ts.map +1 -0
- package/dist/lib/api/teams-client.js +68 -0
- package/dist/lib/api/teams-client.js.map +1 -0
- package/dist/lib/charter/charter-editor.d.ts +60 -0
- package/dist/lib/charter/charter-editor.d.ts.map +1 -0
- package/dist/lib/charter/charter-editor.js +559 -0
- package/dist/lib/charter/charter-editor.js.map +1 -0
- package/dist/lib/charter/charter-storage.d.ts +92 -0
- package/dist/lib/charter/charter-storage.d.ts.map +1 -0
- package/dist/lib/charter/charter-storage.js +501 -0
- package/dist/lib/charter/charter-storage.js.map +1 -0
- package/dist/lib/charter/charter-synthesizer.d.ts +94 -0
- package/dist/lib/charter/charter-synthesizer.d.ts.map +1 -0
- package/dist/lib/charter/charter-synthesizer.js +521 -0
- package/dist/lib/charter/charter-synthesizer.js.map +1 -0
- package/dist/lib/charter/charter-versioning.d.ts +57 -0
- package/dist/lib/charter/charter-versioning.d.ts.map +1 -0
- package/dist/lib/charter/charter-versioning.js +283 -0
- package/dist/lib/charter/charter-versioning.js.map +1 -0
- package/dist/lib/charter/confidence-scorer.d.ts +263 -0
- package/dist/lib/charter/confidence-scorer.d.ts.map +1 -0
- package/dist/lib/charter/confidence-scorer.js +737 -0
- package/dist/lib/charter/confidence-scorer.js.map +1 -0
- package/dist/lib/charter/conversation-context.d.ts +99 -0
- package/dist/lib/charter/conversation-context.d.ts.map +1 -0
- package/dist/lib/charter/conversation-context.js +297 -0
- package/dist/lib/charter/conversation-context.js.map +1 -0
- package/dist/lib/charter/conversation-facilitator.d.ts +117 -0
- package/dist/lib/charter/conversation-facilitator.d.ts.map +1 -0
- package/dist/lib/charter/conversation-facilitator.js +360 -0
- package/dist/lib/charter/conversation-facilitator.js.map +1 -0
- package/dist/lib/charter/question-templates.d.ts +82 -0
- package/dist/lib/charter/question-templates.d.ts.map +1 -0
- package/dist/lib/charter/question-templates.js +355 -0
- package/dist/lib/charter/question-templates.js.map +1 -0
- package/dist/lib/charter/signal-detection.d.ts +49 -0
- package/dist/lib/charter/signal-detection.d.ts.map +1 -0
- package/dist/lib/charter/signal-detection.js +338 -0
- package/dist/lib/charter/signal-detection.js.map +1 -0
- package/dist/lib/context-loader-events.d.ts +111 -0
- package/dist/lib/context-loader-events.d.ts.map +1 -0
- package/dist/lib/context-loader-events.js +475 -0
- package/dist/lib/context-loader-events.js.map +1 -0
- package/dist/lib/event-logger.d.ts +64 -0
- package/dist/lib/event-logger.d.ts.map +1 -0
- package/dist/lib/event-logger.js +197 -0
- package/dist/lib/event-logger.js.map +1 -0
- package/dist/lib/event-queue.d.ts +104 -0
- package/dist/lib/event-queue.d.ts.map +1 -0
- package/dist/lib/event-queue.js +274 -0
- package/dist/lib/event-queue.js.map +1 -0
- package/dist/lib/session-cursor.d.ts +80 -0
- package/dist/lib/session-cursor.d.ts.map +1 -0
- package/dist/lib/session-cursor.js +250 -0
- package/dist/lib/session-cursor.js.map +1 -0
- package/dist/lib/sync/conflict-detector.d.ts +41 -0
- package/dist/lib/sync/conflict-detector.d.ts.map +1 -0
- package/dist/lib/sync/conflict-detector.js +124 -0
- package/dist/lib/sync/conflict-detector.js.map +1 -0
- package/dist/lib/sync/logger.d.ts +89 -0
- package/dist/lib/sync/logger.d.ts.map +1 -0
- package/dist/lib/sync/logger.js +202 -0
- package/dist/lib/sync/logger.js.map +1 -0
- package/dist/lib/sync/parser.d.ts +32 -0
- package/dist/lib/sync/parser.d.ts.map +1 -0
- package/dist/lib/sync/parser.js +180 -0
- package/dist/lib/sync/parser.js.map +1 -0
- package/dist/lib/sync/scanner.d.ts +34 -0
- package/dist/lib/sync/scanner.d.ts.map +1 -0
- package/dist/lib/sync/scanner.js +97 -0
- package/dist/lib/sync/scanner.js.map +1 -0
- package/dist/lib/sync/uploader.d.ts +33 -0
- package/dist/lib/sync/uploader.d.ts.map +1 -0
- package/dist/lib/sync/uploader.js +188 -0
- package/dist/lib/sync/uploader.js.map +1 -0
- package/dist/lib/write-dispatcher/adapters/graph-adapter.d.ts +77 -0
- package/dist/lib/write-dispatcher/adapters/graph-adapter.d.ts.map +1 -0
- package/dist/lib/write-dispatcher/adapters/graph-adapter.js +178 -0
- package/dist/lib/write-dispatcher/adapters/graph-adapter.js.map +1 -0
- package/dist/lib/write-dispatcher/adapters/local-adapter.d.ts +133 -0
- package/dist/lib/write-dispatcher/adapters/local-adapter.d.ts.map +1 -0
- package/dist/lib/write-dispatcher/adapters/local-adapter.js +324 -0
- package/dist/lib/write-dispatcher/adapters/local-adapter.js.map +1 -0
- package/dist/lib/write-dispatcher/write-dispatcher.d.ts +151 -0
- package/dist/lib/write-dispatcher/write-dispatcher.d.ts.map +1 -0
- package/dist/lib/write-dispatcher/write-dispatcher.js +197 -0
- package/dist/lib/write-dispatcher/write-dispatcher.js.map +1 -0
- package/dist/types/charter.d.ts +330 -0
- package/dist/types/charter.d.ts.map +1 -0
- package/dist/types/charter.js +76 -0
- package/dist/types/charter.js.map +1 -0
- package/dist/types/config.d.ts +65 -17
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/config.js +50 -21
- package/dist/types/config.js.map +1 -1
- package/dist/utils/api-client.d.ts +36 -0
- package/dist/utils/api-client.d.ts.map +1 -0
- package/dist/utils/api-client.js +97 -0
- package/dist/utils/api-client.js.map +1 -0
- package/dist/utils/auth-storage.d.ts +56 -0
- package/dist/utils/auth-storage.d.ts.map +1 -0
- package/dist/utils/auth-storage.js +133 -0
- package/dist/utils/auth-storage.js.map +1 -0
- package/dist/utils/cleanup.d.ts +21 -0
- package/dist/utils/cleanup.d.ts.map +1 -0
- package/dist/utils/cleanup.js +122 -0
- package/dist/utils/cleanup.js.map +1 -0
- package/dist/utils/config-loader.d.ts +76 -0
- package/dist/utils/config-loader.d.ts.map +1 -0
- package/dist/utils/config-loader.js +269 -0
- package/dist/utils/config-loader.js.map +1 -0
- package/dist/utils/context-loader.d.ts +154 -0
- package/dist/utils/context-loader.d.ts.map +1 -0
- package/dist/utils/context-loader.js +411 -0
- package/dist/utils/context-loader.js.map +1 -0
- package/dist/utils/dispatcher-logger.d.ts +30 -0
- package/dist/utils/dispatcher-logger.d.ts.map +1 -0
- package/dist/utils/dispatcher-logger.js +128 -0
- package/dist/utils/dispatcher-logger.js.map +1 -0
- package/dist/utils/ginko-root.d.ts +3 -2
- package/dist/utils/ginko-root.d.ts.map +1 -1
- package/dist/utils/ginko-root.js +35 -2
- package/dist/utils/ginko-root.js.map +1 -1
- package/dist/utils/helpers.d.ts +1 -0
- package/dist/utils/helpers.d.ts.map +1 -1
- package/dist/utils/helpers.js +3 -0
- package/dist/utils/helpers.js.map +1 -1
- package/dist/utils/log-quality.d.ts +55 -0
- package/dist/utils/log-quality.d.ts.map +1 -0
- package/dist/utils/log-quality.js +297 -0
- package/dist/utils/log-quality.js.map +1 -0
- package/dist/utils/reference-parser.d.ts +164 -0
- package/dist/utils/reference-parser.d.ts.map +1 -0
- package/dist/utils/reference-parser.js +363 -0
- package/dist/utils/reference-parser.js.map +1 -0
- package/dist/utils/synthesis.d.ts +180 -0
- package/dist/utils/synthesis.d.ts.map +1 -0
- package/dist/utils/synthesis.js +724 -0
- package/dist/utils/synthesis.js.map +1 -0
- package/dist/utils/team-awareness.d.ts +127 -0
- package/dist/utils/team-awareness.d.ts.map +1 -0
- package/dist/utils/team-awareness.js +385 -0
- package/dist/utils/team-awareness.js.map +1 -0
- package/package.json +6 -4
- package/dist/commands/handoff/handoff-reflection-pipeline.d.ts +0 -106
- package/dist/commands/handoff/handoff-reflection-pipeline.d.ts.map +0 -1
- package/dist/commands/handoff/handoff-reflection-pipeline.js +0 -534
- package/dist/commands/handoff/handoff-reflection-pipeline.js.map +0 -1
- package/dist/commands/handoff/handoff-save.d.ts +0 -16
- package/dist/commands/handoff/handoff-save.d.ts.map +0 -1
- package/dist/commands/handoff/handoff-save.js +0 -72
- package/dist/commands/handoff/handoff-save.js.map +0 -1
- package/dist/commands/handoff/index.d.ts +0 -19
- package/dist/commands/handoff/index.d.ts.map +0 -1
- package/dist/commands/handoff/index.js +0 -55
- package/dist/commands/handoff/index.js.map +0 -1
- package/dist/commands/handoff-ai-orig.d.ts +0 -27
- package/dist/commands/handoff-ai-orig.d.ts.map +0 -1
- package/dist/commands/handoff-ai-orig.js +0 -405
- package/dist/commands/handoff-ai-orig.js.map +0 -1
- package/dist/commands/handoff-ai.d.ts +0 -27
- package/dist/commands/handoff-ai.d.ts.map +0 -1
- package/dist/commands/handoff-ai.js +0 -405
- package/dist/commands/handoff-ai.js.map +0 -1
- package/dist/commands/handoff-enhanced-orig.d.ts +0 -25
- package/dist/commands/handoff-enhanced-orig.d.ts.map +0 -1
- package/dist/commands/handoff-enhanced-orig.js +0 -349
- package/dist/commands/handoff-enhanced-orig.js.map +0 -1
- package/dist/commands/handoff-enhanced.d.ts +0 -25
- package/dist/commands/handoff-enhanced.d.ts.map +0 -1
- package/dist/commands/handoff-enhanced.js +0 -349
- package/dist/commands/handoff-enhanced.js.map +0 -1
- package/dist/commands/handoff-orig.d.ts +0 -10
- package/dist/commands/handoff-orig.d.ts.map +0 -1
- package/dist/commands/handoff-orig.js +0 -167
- package/dist/commands/handoff-orig.js.map +0 -1
- package/dist/commands/init-enhanced.d.ts +0 -20
- package/dist/commands/init-enhanced.d.ts.map +0 -1
- package/dist/commands/init-enhanced.js +0 -430
- package/dist/commands/init-enhanced.js.map +0 -1
- package/dist/commands/prd/prd-reflection-enhanced.d.ts +0 -63
- package/dist/commands/prd/prd-reflection-enhanced.d.ts.map +0 -1
- package/dist/commands/prd/prd-reflection-enhanced.js +0 -310
- package/dist/commands/prd/prd-reflection-enhanced.js.map +0 -1
- package/dist/commands/start-enhanced.d.ts +0 -19
- package/dist/commands/start-enhanced.d.ts.map +0 -1
- package/dist/commands/start-enhanced.js +0 -434
- package/dist/commands/start-enhanced.js.map +0 -1
- package/dist/commands/start.d.ts +0 -10
- package/dist/commands/start.d.ts.map +0 -1
- package/dist/commands/start.js +0 -119
- package/dist/commands/start.js.map +0 -1
- package/dist/core/config/config-aware-reflection.d.ts +0 -37
- package/dist/core/config/config-aware-reflection.d.ts.map +0 -1
- package/dist/core/config/config-aware-reflection.js +0 -97
- package/dist/core/config/config-aware-reflection.js.map +0 -1
- package/dist/core/config/config-loader.d.ts +0 -154
- package/dist/core/config/config-loader.d.ts.map +0 -1
- package/dist/core/config/config-loader.js +0 -424
- package/dist/core/config/config-loader.js.map +0 -1
- package/dist/core/config/config-migrator.d.ts +0 -150
- package/dist/core/config/config-migrator.d.ts.map +0 -1
- package/dist/core/config/config-migrator.js +0 -423
- package/dist/core/config/config-migrator.js.map +0 -1
- package/dist/core/config/config-schema.d.ts +0 -276
- package/dist/core/config/config-schema.d.ts.map +0 -1
- package/dist/core/config/config-schema.js +0 -277
- package/dist/core/config/config-schema.js.map +0 -1
- package/dist/core/config/index.d.ts +0 -260
- package/dist/core/config/index.d.ts.map +0 -1
- package/dist/core/config/index.js +0 -283
- package/dist/core/config/index.js.map +0 -1
- package/dist/core/config/interactive-config.d.ts +0 -76
- package/dist/core/config/interactive-config.d.ts.map +0 -1
- package/dist/core/config/interactive-config.js +0 -315
- package/dist/core/config/interactive-config.js.map +0 -1
- package/dist/core/config/path-config.d.ts +0 -121
- package/dist/core/config/path-config.d.ts.map +0 -1
- package/dist/core/config/path-config.js +0 -210
- package/dist/core/config/path-config.js.map +0 -1
- package/dist/core/config/path-resolver.d.ts +0 -151
- package/dist/core/config/path-resolver.d.ts.map +0 -1
- package/dist/core/config/path-resolver.js +0 -343
- package/dist/core/config/path-resolver.js.map +0 -1
- package/dist/core/config/project-detector.d.ts +0 -58
- package/dist/core/config/project-detector.d.ts.map +0 -1
- package/dist/core/config/project-detector.js +0 -310
- package/dist/core/config/project-detector.js.map +0 -1
- package/dist/core/config-backup/config-aware-reflection.d.ts +0 -37
- package/dist/core/config-backup/config-aware-reflection.d.ts.map +0 -1
- package/dist/core/config-backup/config-aware-reflection.js +0 -97
- package/dist/core/config-backup/config-aware-reflection.js.map +0 -1
- package/dist/core/config-backup/config-loader.d.ts +0 -71
- package/dist/core/config-backup/config-loader.d.ts.map +0 -1
- package/dist/core/config-backup/config-loader.js +0 -288
- package/dist/core/config-backup/config-loader.js.map +0 -1
- package/dist/core/config-backup/interactive-config.d.ts +0 -76
- package/dist/core/config-backup/interactive-config.d.ts.map +0 -1
- package/dist/core/config-backup/interactive-config.js +0 -315
- package/dist/core/config-backup/interactive-config.js.map +0 -1
- package/dist/core/config-backup/path-config.d.ts +0 -121
- package/dist/core/config-backup/path-config.d.ts.map +0 -1
- package/dist/core/config-backup/path-config.js +0 -210
- package/dist/core/config-backup/path-config.js.map +0 -1
- package/dist/core/config-backup/project-detector.d.ts +0 -58
- package/dist/core/config-backup/project-detector.d.ts.map +0 -1
- package/dist/core/config-backup/project-detector.js +0 -310
- package/dist/core/config-backup/project-detector.js.map +0 -1
- package/dist/core/documents/document-manager.d.ts +0 -97
- package/dist/core/documents/document-manager.d.ts.map +0 -1
- package/dist/core/documents/document-manager.js +0 -441
- package/dist/core/documents/document-manager.js.map +0 -1
- package/dist/core/documents/document-migrator.d.ts +0 -138
- package/dist/core/documents/document-migrator.d.ts.map +0 -1
- package/dist/core/documents/document-migrator.js +0 -349
- package/dist/core/documents/document-migrator.js.map +0 -1
- package/dist/core/documents/document-namer.d.ts +0 -111
- package/dist/core/documents/document-namer.d.ts.map +0 -1
- package/dist/core/documents/document-namer.js +0 -225
- package/dist/core/documents/document-namer.js.map +0 -1
- package/dist/core/documents/examples.d.ts +0 -74
- package/dist/core/documents/examples.d.ts.map +0 -1
- package/dist/core/documents/examples.js +0 -273
- package/dist/core/documents/examples.js.map +0 -1
- package/dist/core/documents/file-system.d.ts +0 -93
- package/dist/core/documents/file-system.d.ts.map +0 -1
- package/dist/core/documents/file-system.js +0 -432
- package/dist/core/documents/file-system.js.map +0 -1
- package/dist/core/documents/index.d.ts +0 -97
- package/dist/core/documents/index.d.ts.map +0 -1
- package/dist/core/documents/index.js +0 -119
- package/dist/core/documents/index.js.map +0 -1
- package/dist/core/documents/markdown-processor.d.ts +0 -84
- package/dist/core/documents/markdown-processor.d.ts.map +0 -1
- package/dist/core/documents/markdown-processor.js +0 -302
- package/dist/core/documents/markdown-processor.js.map +0 -1
- package/dist/core/documents/sequence-manager.d.ts +0 -107
- package/dist/core/documents/sequence-manager.d.ts.map +0 -1
- package/dist/core/documents/sequence-manager.js +0 -246
- package/dist/core/documents/sequence-manager.js.map +0 -1
- package/dist/core/documents/template-engine.d.ts +0 -101
- package/dist/core/documents/template-engine.d.ts.map +0 -1
- package/dist/core/documents/template-engine.js +0 -440
- package/dist/core/documents/template-engine.js.map +0 -1
- package/dist/core/platform/hook-migration.d.ts +0 -73
- package/dist/core/platform/hook-migration.d.ts.map +0 -1
- package/dist/core/platform/hook-migration.js +0 -339
- package/dist/core/platform/hook-migration.js.map +0 -1
- package/dist/core/platform/hook-migrator.d.ts +0 -49
- package/dist/core/platform/hook-migrator.d.ts.map +0 -1
- package/dist/core/platform/hook-migrator.js +0 -305
- package/dist/core/platform/hook-migrator.js.map +0 -1
- package/dist/core/platform/path-resolver.d.ts +0 -120
- package/dist/core/platform/path-resolver.d.ts.map +0 -1
- package/dist/core/platform/path-resolver.js +0 -339
- package/dist/core/platform/path-resolver.js.map +0 -1
- package/dist/core/platform/platform-templates.d.ts +0 -62
- package/dist/core/platform/platform-templates.d.ts.map +0 -1
- package/dist/core/platform/platform-templates.js +0 -364
- package/dist/core/platform/platform-templates.js.map +0 -1
- package/dist/core/pressure-monitor.d.ts +0 -76
- package/dist/core/pressure-monitor.d.ts.map +0 -1
- package/dist/core/pressure-monitor.js +0 -156
- package/dist/core/pressure-monitor.js.map +0 -1
- package/dist/core/validators/git-validator.test.d.ts +0 -12
- package/dist/core/validators/git-validator.test.d.ts.map +0 -1
- package/dist/core/validators/git-validator.test.js +0 -40
- package/dist/core/validators/git-validator.test.js.map +0 -1
- package/dist/core/validators/temp_index.d.ts +0 -56
- package/dist/core/validators/temp_index.d.ts.map +0 -1
- package/dist/core/validators/temp_index.js +0 -94
- package/dist/core/validators/temp_index.js.map +0 -1
|
@@ -0,0 +1,737 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileType: utility
|
|
3
|
+
* @status: specification
|
|
4
|
+
* @updated: 2025-11-10
|
|
5
|
+
* @tags: [charter, confidence-scoring, conversation-quality, design-spec]
|
|
6
|
+
* @related: [conversation-facilitator.ts, charter-synthesizer.ts]
|
|
7
|
+
* @priority: critical
|
|
8
|
+
* @complexity: high
|
|
9
|
+
* @dependencies: []
|
|
10
|
+
*/
|
|
11
|
+
// ============================================================================
|
|
12
|
+
// Signal Detection Patterns
|
|
13
|
+
// ============================================================================
|
|
14
|
+
/**
|
|
15
|
+
* Keyword patterns for detecting understanding in each aspect
|
|
16
|
+
*/
|
|
17
|
+
export const SIGNAL_PATTERNS = {
|
|
18
|
+
purpose: {
|
|
19
|
+
// Problem indicators
|
|
20
|
+
problem: [
|
|
21
|
+
'problem',
|
|
22
|
+
'pain',
|
|
23
|
+
'frustration',
|
|
24
|
+
'challenge',
|
|
25
|
+
'issue',
|
|
26
|
+
'difficulty',
|
|
27
|
+
'bottleneck',
|
|
28
|
+
'blocker',
|
|
29
|
+
'friction',
|
|
30
|
+
],
|
|
31
|
+
// Value indicators
|
|
32
|
+
value: [
|
|
33
|
+
'value',
|
|
34
|
+
'benefit',
|
|
35
|
+
'impact',
|
|
36
|
+
'improve',
|
|
37
|
+
'save',
|
|
38
|
+
'enable',
|
|
39
|
+
'unlock',
|
|
40
|
+
'empower',
|
|
41
|
+
'efficiency',
|
|
42
|
+
],
|
|
43
|
+
// Motivation indicators
|
|
44
|
+
motivation: [
|
|
45
|
+
'because',
|
|
46
|
+
'why',
|
|
47
|
+
'need',
|
|
48
|
+
'want',
|
|
49
|
+
'goal',
|
|
50
|
+
'vision',
|
|
51
|
+
'mission',
|
|
52
|
+
'opportunity',
|
|
53
|
+
],
|
|
54
|
+
// Urgency indicators
|
|
55
|
+
urgency: ['now', 'urgent', 'critical', 'blocking', 'immediately', 'asap'],
|
|
56
|
+
},
|
|
57
|
+
users: {
|
|
58
|
+
// User type indicators
|
|
59
|
+
userTypes: [
|
|
60
|
+
'users',
|
|
61
|
+
'developers',
|
|
62
|
+
'team',
|
|
63
|
+
'engineers',
|
|
64
|
+
'designers',
|
|
65
|
+
'customers',
|
|
66
|
+
'clients',
|
|
67
|
+
'people',
|
|
68
|
+
'myself',
|
|
69
|
+
'we',
|
|
70
|
+
'they',
|
|
71
|
+
],
|
|
72
|
+
// User needs indicators
|
|
73
|
+
needs: [
|
|
74
|
+
'needs',
|
|
75
|
+
'wants',
|
|
76
|
+
'requires',
|
|
77
|
+
'looking for',
|
|
78
|
+
'expects',
|
|
79
|
+
'jobs to be done',
|
|
80
|
+
'use cases',
|
|
81
|
+
],
|
|
82
|
+
// User outcomes indicators
|
|
83
|
+
outcomes: [
|
|
84
|
+
'achieve',
|
|
85
|
+
'accomplish',
|
|
86
|
+
'complete',
|
|
87
|
+
'finish',
|
|
88
|
+
'succeed',
|
|
89
|
+
'get',
|
|
90
|
+
'make',
|
|
91
|
+
'do',
|
|
92
|
+
],
|
|
93
|
+
},
|
|
94
|
+
success: {
|
|
95
|
+
// Qualitative criteria
|
|
96
|
+
qualitative: [
|
|
97
|
+
'happy',
|
|
98
|
+
'satisfied',
|
|
99
|
+
'delighted',
|
|
100
|
+
'easy',
|
|
101
|
+
'fast',
|
|
102
|
+
'simple',
|
|
103
|
+
'intuitive',
|
|
104
|
+
'reliable',
|
|
105
|
+
'quality',
|
|
106
|
+
],
|
|
107
|
+
// Quantitative criteria
|
|
108
|
+
quantitative: [
|
|
109
|
+
'time',
|
|
110
|
+
'minutes',
|
|
111
|
+
'hours',
|
|
112
|
+
'seconds',
|
|
113
|
+
'faster',
|
|
114
|
+
'reduce',
|
|
115
|
+
'increase',
|
|
116
|
+
'percent',
|
|
117
|
+
'number',
|
|
118
|
+
'count',
|
|
119
|
+
'metric',
|
|
120
|
+
],
|
|
121
|
+
// Outcome indicators
|
|
122
|
+
outcomes: [
|
|
123
|
+
'results in',
|
|
124
|
+
'leads to',
|
|
125
|
+
'enables',
|
|
126
|
+
'allows',
|
|
127
|
+
'means',
|
|
128
|
+
'demonstrates',
|
|
129
|
+
'proves',
|
|
130
|
+
],
|
|
131
|
+
},
|
|
132
|
+
scope: {
|
|
133
|
+
// In-scope indicators
|
|
134
|
+
inScope: [
|
|
135
|
+
'includes',
|
|
136
|
+
'covers',
|
|
137
|
+
'handles',
|
|
138
|
+
'supports',
|
|
139
|
+
'provides',
|
|
140
|
+
'features',
|
|
141
|
+
'capabilities',
|
|
142
|
+
'building',
|
|
143
|
+
'creating',
|
|
144
|
+
'implementing',
|
|
145
|
+
],
|
|
146
|
+
// Out-of-scope indicators
|
|
147
|
+
outOfScope: [
|
|
148
|
+
'not',
|
|
149
|
+
'excluding',
|
|
150
|
+
'skip',
|
|
151
|
+
'defer',
|
|
152
|
+
'later',
|
|
153
|
+
'phase 2',
|
|
154
|
+
'future',
|
|
155
|
+
'won\'t',
|
|
156
|
+
'don\'t',
|
|
157
|
+
],
|
|
158
|
+
// Boundary indicators
|
|
159
|
+
boundaries: [
|
|
160
|
+
'only',
|
|
161
|
+
'just',
|
|
162
|
+
'limited to',
|
|
163
|
+
'focused on',
|
|
164
|
+
'specifically',
|
|
165
|
+
'explicitly',
|
|
166
|
+
'solely',
|
|
167
|
+
],
|
|
168
|
+
},
|
|
169
|
+
};
|
|
170
|
+
/**
|
|
171
|
+
* Work mode detection patterns
|
|
172
|
+
*/
|
|
173
|
+
export const WORK_MODE_SIGNALS = {
|
|
174
|
+
hackShip: [
|
|
175
|
+
'quick',
|
|
176
|
+
'prototype',
|
|
177
|
+
'mvp',
|
|
178
|
+
'proof of concept',
|
|
179
|
+
'poc',
|
|
180
|
+
'weekend',
|
|
181
|
+
'hackathon',
|
|
182
|
+
'experiment',
|
|
183
|
+
'validate',
|
|
184
|
+
'test',
|
|
185
|
+
'ship',
|
|
186
|
+
'launch',
|
|
187
|
+
'try',
|
|
188
|
+
'explore',
|
|
189
|
+
],
|
|
190
|
+
thinkBuild: [
|
|
191
|
+
'team',
|
|
192
|
+
'process',
|
|
193
|
+
'testing',
|
|
194
|
+
'architecture',
|
|
195
|
+
'maintainable',
|
|
196
|
+
'scalable',
|
|
197
|
+
'quality',
|
|
198
|
+
'users',
|
|
199
|
+
'feedback',
|
|
200
|
+
'iteration',
|
|
201
|
+
'production',
|
|
202
|
+
'release',
|
|
203
|
+
],
|
|
204
|
+
fullPlanning: [
|
|
205
|
+
'stakeholders',
|
|
206
|
+
'governance',
|
|
207
|
+
'approval',
|
|
208
|
+
'risks',
|
|
209
|
+
'mitigations',
|
|
210
|
+
'alternatives',
|
|
211
|
+
'enterprise',
|
|
212
|
+
'compliance',
|
|
213
|
+
'security',
|
|
214
|
+
'roadmap',
|
|
215
|
+
'quarters',
|
|
216
|
+
'phases',
|
|
217
|
+
'strategy',
|
|
218
|
+
],
|
|
219
|
+
};
|
|
220
|
+
/**
|
|
221
|
+
* User stop signals (wants to conclude conversation)
|
|
222
|
+
*/
|
|
223
|
+
export const STOP_SIGNALS = [
|
|
224
|
+
'that\'s enough',
|
|
225
|
+
'let\'s move on',
|
|
226
|
+
'good enough',
|
|
227
|
+
'skip',
|
|
228
|
+
'skip this',
|
|
229
|
+
'not sure',
|
|
230
|
+
'don\'t know',
|
|
231
|
+
'can we continue',
|
|
232
|
+
'let\'s just start',
|
|
233
|
+
'i\'ll figure it out',
|
|
234
|
+
];
|
|
235
|
+
// ============================================================================
|
|
236
|
+
// Confidence Scoring Algorithm
|
|
237
|
+
// ============================================================================
|
|
238
|
+
/**
|
|
239
|
+
* Core confidence scorer class
|
|
240
|
+
*/
|
|
241
|
+
export class ConfidenceScorer {
|
|
242
|
+
context;
|
|
243
|
+
scores;
|
|
244
|
+
constructor(context) {
|
|
245
|
+
this.context = context;
|
|
246
|
+
this.scores = this.initializeScores();
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Initialize confidence scores with zero state
|
|
250
|
+
*/
|
|
251
|
+
initializeScores() {
|
|
252
|
+
return {
|
|
253
|
+
purpose: this.createEmptyScore(),
|
|
254
|
+
users: this.createEmptyScore(),
|
|
255
|
+
success: this.createEmptyScore(),
|
|
256
|
+
scope: this.createEmptyScore(),
|
|
257
|
+
overall: 0,
|
|
258
|
+
qualityLevel: 'insufficient',
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
createEmptyScore() {
|
|
262
|
+
return {
|
|
263
|
+
score: 0,
|
|
264
|
+
signals: [],
|
|
265
|
+
missing: [],
|
|
266
|
+
needsProbing: false,
|
|
267
|
+
markedTBD: false,
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Update all confidence scores based on current conversation context
|
|
272
|
+
*/
|
|
273
|
+
update() {
|
|
274
|
+
// Score each aspect
|
|
275
|
+
this.scores.purpose = this.scorePurpose();
|
|
276
|
+
this.scores.users = this.scoreUsers();
|
|
277
|
+
this.scores.success = this.scoreSuccess();
|
|
278
|
+
this.scores.scope = this.scoreScope();
|
|
279
|
+
// Calculate overall confidence
|
|
280
|
+
this.scores.overall = this.calculateOverall();
|
|
281
|
+
// Determine quality level
|
|
282
|
+
this.scores.qualityLevel = this.determineQualityLevel(this.scores.overall);
|
|
283
|
+
// Detect work mode
|
|
284
|
+
this.scores.workMode = this.detectWorkMode();
|
|
285
|
+
return this.scores;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Get current confidence scores
|
|
289
|
+
*/
|
|
290
|
+
getScores() {
|
|
291
|
+
return this.scores;
|
|
292
|
+
}
|
|
293
|
+
// ==========================================================================
|
|
294
|
+
// Aspect-Specific Scoring
|
|
295
|
+
// ==========================================================================
|
|
296
|
+
/**
|
|
297
|
+
* Score purpose & value understanding
|
|
298
|
+
*
|
|
299
|
+
* Signals:
|
|
300
|
+
* - Problem statement mentioned
|
|
301
|
+
* - Business value articulated
|
|
302
|
+
* - Motivation clear
|
|
303
|
+
* - Urgency/timing indicated
|
|
304
|
+
*
|
|
305
|
+
* Scoring:
|
|
306
|
+
* - 0-20: No clear problem or value
|
|
307
|
+
* - 20-40: Problem mentioned, value implied
|
|
308
|
+
* - 40-60: Problem clear, value mentioned
|
|
309
|
+
* - 60-80: Problem, value, and motivation all clear
|
|
310
|
+
* - 80-100: Comprehensive with urgency and impact
|
|
311
|
+
*/
|
|
312
|
+
scorePurpose() {
|
|
313
|
+
const answers = this.getAnswersForAspect('purpose');
|
|
314
|
+
const allText = this.getAllConversationText();
|
|
315
|
+
// Check for TBD marking
|
|
316
|
+
if (this.isMarkedTBD('purpose')) {
|
|
317
|
+
return {
|
|
318
|
+
score: 0,
|
|
319
|
+
signals: [],
|
|
320
|
+
missing: ['Marked as TBD by user'],
|
|
321
|
+
needsProbing: false,
|
|
322
|
+
markedTBD: true,
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
// Detect signals
|
|
326
|
+
const problemMentioned = this.detectSignals(allText, SIGNAL_PATTERNS.purpose.problem);
|
|
327
|
+
const valueMentioned = this.detectSignals(allText, SIGNAL_PATTERNS.purpose.value);
|
|
328
|
+
const motivationClear = this.detectSignals(allText, SIGNAL_PATTERNS.purpose.motivation);
|
|
329
|
+
const urgencyIndicated = this.detectSignals(allText, SIGNAL_PATTERNS.purpose.urgency);
|
|
330
|
+
// Calculate score
|
|
331
|
+
let score = 0;
|
|
332
|
+
const signals = [];
|
|
333
|
+
const missing = [];
|
|
334
|
+
if (problemMentioned.length > 0) {
|
|
335
|
+
score += 30;
|
|
336
|
+
signals.push('Problem identified');
|
|
337
|
+
}
|
|
338
|
+
else {
|
|
339
|
+
missing.push('Problem statement unclear');
|
|
340
|
+
}
|
|
341
|
+
if (valueMentioned.length > 0) {
|
|
342
|
+
score += 30;
|
|
343
|
+
signals.push('Value articulated');
|
|
344
|
+
}
|
|
345
|
+
else {
|
|
346
|
+
missing.push('Business value not explicit');
|
|
347
|
+
}
|
|
348
|
+
if (motivationClear.length > 0) {
|
|
349
|
+
score += 25;
|
|
350
|
+
signals.push('Motivation clear');
|
|
351
|
+
}
|
|
352
|
+
else {
|
|
353
|
+
missing.push('Motivation not stated');
|
|
354
|
+
}
|
|
355
|
+
if (urgencyIndicated.length > 0) {
|
|
356
|
+
score += 15;
|
|
357
|
+
signals.push('Urgency indicated');
|
|
358
|
+
}
|
|
359
|
+
// Check if probing needed
|
|
360
|
+
const needsProbing = score < 40 && !this.hasBeenNudged('purpose');
|
|
361
|
+
return {
|
|
362
|
+
score,
|
|
363
|
+
signals,
|
|
364
|
+
missing,
|
|
365
|
+
needsProbing,
|
|
366
|
+
markedTBD: false,
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* Score user & persona understanding
|
|
371
|
+
*
|
|
372
|
+
* Signals:
|
|
373
|
+
* - User types identified
|
|
374
|
+
* - User needs described
|
|
375
|
+
* - User outcomes mentioned
|
|
376
|
+
*
|
|
377
|
+
* Scoring:
|
|
378
|
+
* - 0-20: No user identification
|
|
379
|
+
* - 20-40: Vague user mention ("users", "people")
|
|
380
|
+
* - 40-60: Specific user type identified
|
|
381
|
+
* - 60-80: User type + needs described
|
|
382
|
+
* - 80-100: Multiple users with clear needs and outcomes
|
|
383
|
+
*/
|
|
384
|
+
scoreUsers() {
|
|
385
|
+
const allText = this.getAllConversationText();
|
|
386
|
+
if (this.isMarkedTBD('users')) {
|
|
387
|
+
return {
|
|
388
|
+
score: 0,
|
|
389
|
+
signals: [],
|
|
390
|
+
missing: ['Marked as TBD by user'],
|
|
391
|
+
needsProbing: false,
|
|
392
|
+
markedTBD: true,
|
|
393
|
+
};
|
|
394
|
+
}
|
|
395
|
+
// Detect signals
|
|
396
|
+
const userTypesMentioned = this.detectSignals(allText, SIGNAL_PATTERNS.users.userTypes);
|
|
397
|
+
const needsMentioned = this.detectSignals(allText, SIGNAL_PATTERNS.users.needs);
|
|
398
|
+
const outcomesMentioned = this.detectSignals(allText, SIGNAL_PATTERNS.users.outcomes);
|
|
399
|
+
let score = 0;
|
|
400
|
+
const signals = [];
|
|
401
|
+
const missing = [];
|
|
402
|
+
if (userTypesMentioned.length > 0) {
|
|
403
|
+
score += 40;
|
|
404
|
+
signals.push(`User types: ${userTypesMentioned.join(', ')}`);
|
|
405
|
+
}
|
|
406
|
+
else {
|
|
407
|
+
missing.push('User types not identified');
|
|
408
|
+
}
|
|
409
|
+
if (needsMentioned.length > 0) {
|
|
410
|
+
score += 30;
|
|
411
|
+
signals.push('User needs described');
|
|
412
|
+
}
|
|
413
|
+
else {
|
|
414
|
+
missing.push('User needs unclear');
|
|
415
|
+
}
|
|
416
|
+
if (outcomesMentioned.length > 0) {
|
|
417
|
+
score += 30;
|
|
418
|
+
signals.push('User outcomes mentioned');
|
|
419
|
+
}
|
|
420
|
+
// Bonus for multiple user types
|
|
421
|
+
if (userTypesMentioned.length > 2) {
|
|
422
|
+
score = Math.min(100, score + 10);
|
|
423
|
+
signals.push('Multiple user types identified');
|
|
424
|
+
}
|
|
425
|
+
const needsProbing = score < 40 && !this.hasBeenNudged('users');
|
|
426
|
+
return {
|
|
427
|
+
score,
|
|
428
|
+
signals,
|
|
429
|
+
missing,
|
|
430
|
+
needsProbing,
|
|
431
|
+
markedTBD: false,
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
/**
|
|
435
|
+
* Score success criteria understanding
|
|
436
|
+
*
|
|
437
|
+
* Signals:
|
|
438
|
+
* - Qualitative criteria mentioned
|
|
439
|
+
* - Quantitative criteria mentioned
|
|
440
|
+
* - User outcomes described
|
|
441
|
+
*
|
|
442
|
+
* Scoring:
|
|
443
|
+
* - 0-20: No success criteria
|
|
444
|
+
* - 20-40: Vague success mention
|
|
445
|
+
* - 40-60: Qualitative criteria clear
|
|
446
|
+
* - 60-80: Both qualitative and quantitative
|
|
447
|
+
* - 80-100: Comprehensive with timeframes and user outcomes
|
|
448
|
+
*/
|
|
449
|
+
scoreSuccess() {
|
|
450
|
+
const allText = this.getAllConversationText();
|
|
451
|
+
if (this.isMarkedTBD('success')) {
|
|
452
|
+
return {
|
|
453
|
+
score: 0,
|
|
454
|
+
signals: [],
|
|
455
|
+
missing: ['Marked as TBD by user'],
|
|
456
|
+
needsProbing: false,
|
|
457
|
+
markedTBD: true,
|
|
458
|
+
};
|
|
459
|
+
}
|
|
460
|
+
const qualitativeMentioned = this.detectSignals(allText, SIGNAL_PATTERNS.success.qualitative);
|
|
461
|
+
const quantitativeMentioned = this.detectSignals(allText, SIGNAL_PATTERNS.success.quantitative);
|
|
462
|
+
const outcomesMentioned = this.detectSignals(allText, SIGNAL_PATTERNS.success.outcomes);
|
|
463
|
+
let score = 0;
|
|
464
|
+
const signals = [];
|
|
465
|
+
const missing = [];
|
|
466
|
+
if (qualitativeMentioned.length > 0) {
|
|
467
|
+
score += 35;
|
|
468
|
+
signals.push('Qualitative criteria mentioned');
|
|
469
|
+
}
|
|
470
|
+
else {
|
|
471
|
+
missing.push('Qualitative criteria unclear');
|
|
472
|
+
}
|
|
473
|
+
if (quantitativeMentioned.length > 0) {
|
|
474
|
+
score += 35;
|
|
475
|
+
signals.push('Quantitative criteria mentioned');
|
|
476
|
+
}
|
|
477
|
+
else {
|
|
478
|
+
missing.push('Quantitative criteria unclear');
|
|
479
|
+
}
|
|
480
|
+
if (outcomesMentioned.length > 0) {
|
|
481
|
+
score += 30;
|
|
482
|
+
signals.push('User outcomes described');
|
|
483
|
+
}
|
|
484
|
+
const needsProbing = score < 40 && !this.hasBeenNudged('success');
|
|
485
|
+
return {
|
|
486
|
+
score,
|
|
487
|
+
signals,
|
|
488
|
+
missing,
|
|
489
|
+
needsProbing,
|
|
490
|
+
markedTBD: false,
|
|
491
|
+
};
|
|
492
|
+
}
|
|
493
|
+
/**
|
|
494
|
+
* Score scope & boundaries understanding
|
|
495
|
+
*
|
|
496
|
+
* Signals:
|
|
497
|
+
* - In-scope features mentioned
|
|
498
|
+
* - Out-of-scope explicitly stated
|
|
499
|
+
* - Boundaries clear
|
|
500
|
+
*
|
|
501
|
+
* Scoring:
|
|
502
|
+
* - 0-20: No scope definition
|
|
503
|
+
* - 20-40: Vague scope mention
|
|
504
|
+
* - 40-60: In-scope features clear
|
|
505
|
+
* - 60-80: In-scope + some out-of-scope
|
|
506
|
+
* - 80-100: Both in/out scope with clear boundaries
|
|
507
|
+
*/
|
|
508
|
+
scoreScope() {
|
|
509
|
+
const allText = this.getAllConversationText();
|
|
510
|
+
if (this.isMarkedTBD('scope')) {
|
|
511
|
+
return {
|
|
512
|
+
score: 0,
|
|
513
|
+
signals: [],
|
|
514
|
+
missing: ['Marked as TBD by user'],
|
|
515
|
+
needsProbing: false,
|
|
516
|
+
markedTBD: true,
|
|
517
|
+
};
|
|
518
|
+
}
|
|
519
|
+
const inScopeMentioned = this.detectSignals(allText, SIGNAL_PATTERNS.scope.inScope);
|
|
520
|
+
const outOfScopeMentioned = this.detectSignals(allText, SIGNAL_PATTERNS.scope.outOfScope);
|
|
521
|
+
const boundariesMentioned = this.detectSignals(allText, SIGNAL_PATTERNS.scope.boundaries);
|
|
522
|
+
let score = 0;
|
|
523
|
+
const signals = [];
|
|
524
|
+
const missing = [];
|
|
525
|
+
if (inScopeMentioned.length > 0) {
|
|
526
|
+
score += 40;
|
|
527
|
+
signals.push('In-scope features mentioned');
|
|
528
|
+
}
|
|
529
|
+
else {
|
|
530
|
+
missing.push('In-scope features unclear');
|
|
531
|
+
}
|
|
532
|
+
if (outOfScopeMentioned.length > 0) {
|
|
533
|
+
score += 40;
|
|
534
|
+
signals.push('Out-of-scope explicitly stated');
|
|
535
|
+
}
|
|
536
|
+
else {
|
|
537
|
+
missing.push('Out-of-scope boundaries unclear');
|
|
538
|
+
}
|
|
539
|
+
if (boundariesMentioned.length > 0) {
|
|
540
|
+
score += 20;
|
|
541
|
+
signals.push('Clear boundaries defined');
|
|
542
|
+
}
|
|
543
|
+
const needsProbing = score < 40 && !this.hasBeenNudged('scope');
|
|
544
|
+
return {
|
|
545
|
+
score,
|
|
546
|
+
signals,
|
|
547
|
+
missing,
|
|
548
|
+
needsProbing,
|
|
549
|
+
markedTBD: false,
|
|
550
|
+
};
|
|
551
|
+
}
|
|
552
|
+
// ==========================================================================
|
|
553
|
+
// Overall Scoring & Quality
|
|
554
|
+
// ==========================================================================
|
|
555
|
+
/**
|
|
556
|
+
* Calculate overall confidence as weighted average
|
|
557
|
+
*
|
|
558
|
+
* Weights:
|
|
559
|
+
* - Purpose: 30% (most critical)
|
|
560
|
+
* - Scope: 25% (prevents drift)
|
|
561
|
+
* - Success: 25% (measurability)
|
|
562
|
+
* - Users: 20% (important but can be inferred)
|
|
563
|
+
*/
|
|
564
|
+
calculateOverall() {
|
|
565
|
+
const weights = {
|
|
566
|
+
purpose: 0.3,
|
|
567
|
+
users: 0.2,
|
|
568
|
+
success: 0.25,
|
|
569
|
+
scope: 0.25,
|
|
570
|
+
};
|
|
571
|
+
const weightedSum = this.scores.purpose.score * weights.purpose +
|
|
572
|
+
this.scores.users.score * weights.users +
|
|
573
|
+
this.scores.success.score * weights.success +
|
|
574
|
+
this.scores.scope.score * weights.scope;
|
|
575
|
+
return Math.round(weightedSum);
|
|
576
|
+
}
|
|
577
|
+
/**
|
|
578
|
+
* Determine quality level from overall score
|
|
579
|
+
*/
|
|
580
|
+
determineQualityLevel(overall) {
|
|
581
|
+
if (overall < 40)
|
|
582
|
+
return 'insufficient';
|
|
583
|
+
if (overall < 70)
|
|
584
|
+
return 'workable';
|
|
585
|
+
if (overall < 85)
|
|
586
|
+
return 'good';
|
|
587
|
+
return 'excellent';
|
|
588
|
+
}
|
|
589
|
+
// ==========================================================================
|
|
590
|
+
// Work Mode Detection
|
|
591
|
+
// ==========================================================================
|
|
592
|
+
/**
|
|
593
|
+
* Detect work mode from conversation signals
|
|
594
|
+
*/
|
|
595
|
+
detectWorkMode() {
|
|
596
|
+
const signals = this.context.workModeSignals;
|
|
597
|
+
// Find mode with most signals
|
|
598
|
+
const modes = [
|
|
599
|
+
{ mode: 'hack-ship', count: signals.hackShip },
|
|
600
|
+
{ mode: 'think-build', count: signals.thinkBuild },
|
|
601
|
+
{ mode: 'full-planning', count: signals.fullPlanning },
|
|
602
|
+
];
|
|
603
|
+
modes.sort((a, b) => b.count - a.count);
|
|
604
|
+
// Default to think-build if no clear signals
|
|
605
|
+
if (modes[0].count === 0)
|
|
606
|
+
return 'think-build';
|
|
607
|
+
return modes[0].mode;
|
|
608
|
+
}
|
|
609
|
+
// ==========================================================================
|
|
610
|
+
// Decision Logic
|
|
611
|
+
// ==========================================================================
|
|
612
|
+
/**
|
|
613
|
+
* Check if conversation needs more depth for critical aspects
|
|
614
|
+
*/
|
|
615
|
+
needsAdditionalProbing() {
|
|
616
|
+
const critical = [
|
|
617
|
+
this.scores.purpose,
|
|
618
|
+
this.scores.users,
|
|
619
|
+
this.scores.success,
|
|
620
|
+
this.scores.scope,
|
|
621
|
+
];
|
|
622
|
+
return critical.some((aspect) => aspect.needsProbing);
|
|
623
|
+
}
|
|
624
|
+
/**
|
|
625
|
+
* Get the aspect that most needs probing
|
|
626
|
+
*/
|
|
627
|
+
getMostUnclearAspect() {
|
|
628
|
+
const aspects = [
|
|
629
|
+
{ aspect: 'purpose', score: this.scores.purpose.score },
|
|
630
|
+
{ aspect: 'users', score: this.scores.users.score },
|
|
631
|
+
{ aspect: 'success', score: this.scores.success.score },
|
|
632
|
+
{ aspect: 'scope', score: this.scores.scope.score },
|
|
633
|
+
];
|
|
634
|
+
// Filter to aspects that need probing
|
|
635
|
+
const needsProbing = aspects.filter((a) => this.scores[a.aspect].needsProbing);
|
|
636
|
+
if (needsProbing.length === 0)
|
|
637
|
+
return null;
|
|
638
|
+
// Return lowest scoring aspect that needs probing
|
|
639
|
+
needsProbing.sort((a, b) => a.score - b.score);
|
|
640
|
+
return needsProbing[0].aspect;
|
|
641
|
+
}
|
|
642
|
+
/**
|
|
643
|
+
* Check if ready to synthesize charter
|
|
644
|
+
*/
|
|
645
|
+
isReadyToSynthesize() {
|
|
646
|
+
// Ready if:
|
|
647
|
+
// 1. Overall confidence > 70%, OR
|
|
648
|
+
// 2. All critical aspects > 40% (workable minimum), OR
|
|
649
|
+
// 3. User showing stop signals, OR
|
|
650
|
+
// 4. Max nudges reached
|
|
651
|
+
if (this.scores.overall > 70)
|
|
652
|
+
return true;
|
|
653
|
+
if (this.allCriticalAspectsCovered())
|
|
654
|
+
return true;
|
|
655
|
+
if (this.hasUserStopSignals())
|
|
656
|
+
return true;
|
|
657
|
+
if (this.maxNudgesReached())
|
|
658
|
+
return true;
|
|
659
|
+
return false;
|
|
660
|
+
}
|
|
661
|
+
allCriticalAspectsCovered() {
|
|
662
|
+
return (this.scores.purpose.score > 40 &&
|
|
663
|
+
this.scores.users.score > 40 &&
|
|
664
|
+
this.scores.success.score > 40 &&
|
|
665
|
+
this.scores.scope.score > 40);
|
|
666
|
+
}
|
|
667
|
+
hasUserStopSignals() {
|
|
668
|
+
return this.context.userStopSignals.length > 0;
|
|
669
|
+
}
|
|
670
|
+
maxNudgesReached() {
|
|
671
|
+
return this.context.nudgeHistory.length >= 3;
|
|
672
|
+
}
|
|
673
|
+
// ==========================================================================
|
|
674
|
+
// Helper Methods
|
|
675
|
+
// ==========================================================================
|
|
676
|
+
/**
|
|
677
|
+
* Get all answers for a specific aspect
|
|
678
|
+
*/
|
|
679
|
+
getAnswersForAspect(aspect) {
|
|
680
|
+
return this.context.exchanges
|
|
681
|
+
.filter((e) => e.aspect === aspect)
|
|
682
|
+
.map((e) => e.answer);
|
|
683
|
+
}
|
|
684
|
+
/**
|
|
685
|
+
* Get all conversation text (questions + answers)
|
|
686
|
+
*/
|
|
687
|
+
getAllConversationText() {
|
|
688
|
+
return this.context.exchanges
|
|
689
|
+
.map((e) => `${e.question} ${e.answer}`)
|
|
690
|
+
.join(' ')
|
|
691
|
+
.toLowerCase();
|
|
692
|
+
}
|
|
693
|
+
/**
|
|
694
|
+
* Detect signal keywords in text
|
|
695
|
+
*/
|
|
696
|
+
detectSignals(text, patterns) {
|
|
697
|
+
const found = [];
|
|
698
|
+
const lowerText = text.toLowerCase();
|
|
699
|
+
for (const pattern of patterns) {
|
|
700
|
+
if (lowerText.includes(pattern.toLowerCase())) {
|
|
701
|
+
found.push(pattern);
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
return found;
|
|
705
|
+
}
|
|
706
|
+
/**
|
|
707
|
+
* Check if aspect has been marked TBD by user
|
|
708
|
+
*/
|
|
709
|
+
isMarkedTBD(aspect) {
|
|
710
|
+
return this.scores[aspect]?.markedTBD || false;
|
|
711
|
+
}
|
|
712
|
+
/**
|
|
713
|
+
* Check if aspect has already been nudged
|
|
714
|
+
*/
|
|
715
|
+
hasBeenNudged(aspect) {
|
|
716
|
+
return this.context.nudgeHistory.some((n) => n.aspect === aspect);
|
|
717
|
+
}
|
|
718
|
+
/**
|
|
719
|
+
* Get human-readable confidence summary
|
|
720
|
+
*/
|
|
721
|
+
getConfidenceSummary() {
|
|
722
|
+
const level = this.scores.qualityLevel;
|
|
723
|
+
const overall = this.scores.overall;
|
|
724
|
+
const summaries = {
|
|
725
|
+
insufficient: 'Missing critical information - needs more conversation',
|
|
726
|
+
workable: 'Good enough to start - can refine later',
|
|
727
|
+
good: 'Strong understanding - ready to build',
|
|
728
|
+
excellent: 'Comprehensive clarity - excellent foundation',
|
|
729
|
+
};
|
|
730
|
+
return `${overall}% - ${summaries[level]}`;
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
// ============================================================================
|
|
734
|
+
// Exports
|
|
735
|
+
// ============================================================================
|
|
736
|
+
export default ConfidenceScorer;
|
|
737
|
+
//# sourceMappingURL=confidence-scorer.js.map
|