codehere 0.3.0 → 0.5.0-alpha
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 +1 -1
- package/README.md +329 -65
- package/dist/application/agents/documentation-agent.d.ts +24 -0
- package/dist/application/agents/documentation-agent.d.ts.map +1 -0
- package/dist/application/agents/documentation-agent.js +399 -0
- package/dist/application/agents/documentation-agent.js.map +1 -0
- package/dist/application/agents/execution-agent.d.ts +11 -0
- package/dist/application/agents/execution-agent.d.ts.map +1 -1
- package/dist/application/agents/execution-agent.js +289 -80
- package/dist/application/agents/execution-agent.js.map +1 -1
- package/dist/application/agents/multi-agent-orchestrator.d.ts +4 -0
- package/dist/application/agents/multi-agent-orchestrator.d.ts.map +1 -1
- package/dist/application/agents/multi-agent-orchestrator.js +95 -2
- package/dist/application/agents/multi-agent-orchestrator.js.map +1 -1
- package/dist/application/agents/planning-agent.d.ts +3 -0
- package/dist/application/agents/planning-agent.d.ts.map +1 -1
- package/dist/application/agents/planning-agent.js +151 -71
- package/dist/application/agents/planning-agent.js.map +1 -1
- package/dist/application/agents/product-requirements-agent.d.ts +21 -0
- package/dist/application/agents/product-requirements-agent.d.ts.map +1 -0
- package/dist/application/agents/product-requirements-agent.js +247 -0
- package/dist/application/agents/product-requirements-agent.js.map +1 -0
- package/dist/application/agents/validation-agent.d.ts +5 -1
- package/dist/application/agents/validation-agent.d.ts.map +1 -1
- package/dist/application/agents/validation-agent.js +156 -21
- package/dist/application/agents/validation-agent.js.map +1 -1
- package/dist/application/reasoning/multi-model-planning-strategy.d.ts +21 -0
- package/dist/application/reasoning/multi-model-planning-strategy.d.ts.map +1 -0
- package/dist/application/reasoning/multi-model-planning-strategy.js +158 -0
- package/dist/application/reasoning/multi-model-planning-strategy.js.map +1 -0
- package/dist/application/reasoning/reasoning-config.d.ts +15 -0
- package/dist/application/reasoning/reasoning-config.d.ts.map +1 -0
- package/dist/application/reasoning/reasoning-config.js +50 -0
- package/dist/application/reasoning/reasoning-config.js.map +1 -0
- package/dist/application/reasoning/reasoning-orchestrator.d.ts +18 -0
- package/dist/application/reasoning/reasoning-orchestrator.d.ts.map +1 -0
- package/dist/application/reasoning/reasoning-orchestrator.js +170 -0
- package/dist/application/reasoning/reasoning-orchestrator.js.map +1 -0
- package/dist/application/reasoning/reasoning-strategy.interface.d.ts +24 -0
- package/dist/application/reasoning/reasoning-strategy.interface.d.ts.map +1 -0
- package/dist/application/reasoning/reasoning-strategy.interface.js +6 -0
- package/dist/application/reasoning/reasoning-strategy.interface.js.map +1 -0
- package/dist/application/reasoning/role-provider-resolver.d.ts +36 -0
- package/dist/application/reasoning/role-provider-resolver.d.ts.map +1 -0
- package/dist/application/reasoning/role-provider-resolver.js +74 -0
- package/dist/application/reasoning/role-provider-resolver.js.map +1 -0
- package/dist/application/reasoning/simple-planning-strategy.d.ts +22 -0
- package/dist/application/reasoning/simple-planning-strategy.d.ts.map +1 -0
- package/dist/application/reasoning/simple-planning-strategy.js +217 -0
- package/dist/application/reasoning/simple-planning-strategy.js.map +1 -0
- package/dist/application/reasoning/types.d.ts +65 -0
- package/dist/application/reasoning/types.d.ts.map +1 -0
- package/dist/application/reasoning/types.js +6 -0
- package/dist/application/reasoning/types.js.map +1 -0
- package/dist/application/reasoning/validator-strategy.d.ts +56 -0
- package/dist/application/reasoning/validator-strategy.d.ts.map +1 -0
- package/dist/application/reasoning/validator-strategy.js +103 -0
- package/dist/application/reasoning/validator-strategy.js.map +1 -0
- package/dist/application/services/dependency-container.d.ts +46 -2
- package/dist/application/services/dependency-container.d.ts.map +1 -1
- package/dist/application/services/dependency-container.js +198 -8
- package/dist/application/services/dependency-container.js.map +1 -1
- package/dist/application/services/intelligent-router.d.ts +19 -0
- package/dist/application/services/intelligent-router.d.ts.map +1 -1
- package/dist/application/services/intelligent-router.js +393 -91
- package/dist/application/services/intelligent-router.js.map +1 -1
- package/dist/application/use-cases/ask-question-use-case.d.ts +20 -0
- package/dist/application/use-cases/ask-question-use-case.d.ts.map +1 -1
- package/dist/application/use-cases/ask-question-use-case.js +129 -49
- package/dist/application/use-cases/ask-question-use-case.js.map +1 -1
- package/dist/application/use-cases/edit-file-use-case.d.ts.map +1 -1
- package/dist/application/use-cases/edit-file-use-case.js +16 -1
- package/dist/application/use-cases/edit-file-use-case.js.map +1 -1
- package/dist/application/use-cases/planning-use-case.d.ts +14 -1
- package/dist/application/use-cases/planning-use-case.d.ts.map +1 -1
- package/dist/application/use-cases/planning-use-case.js +109 -2
- package/dist/application/use-cases/planning-use-case.js.map +1 -1
- package/dist/domain/entities/documentation.d.ts +35 -0
- package/dist/domain/entities/documentation.d.ts.map +1 -0
- package/dist/domain/entities/documentation.js +6 -0
- package/dist/domain/entities/documentation.js.map +1 -0
- package/dist/domain/entities/memory.d.ts.map +1 -1
- package/dist/domain/entities/product-requirements.d.ts +50 -0
- package/dist/domain/entities/product-requirements.d.ts.map +1 -0
- package/dist/domain/entities/product-requirements.js +6 -0
- package/dist/domain/entities/product-requirements.js.map +1 -0
- package/dist/domain/entities/task.d.ts +152 -0
- package/dist/domain/entities/task.d.ts.map +1 -0
- package/dist/domain/entities/task.js +61 -0
- package/dist/domain/entities/task.js.map +1 -0
- package/dist/domain/errors/embeddings-not-found-error.d.ts +9 -0
- package/dist/domain/errors/embeddings-not-found-error.d.ts.map +1 -0
- package/dist/domain/errors/embeddings-not-found-error.js +13 -0
- package/dist/domain/errors/embeddings-not-found-error.js.map +1 -0
- package/dist/domain/interfaces/agent.interface.d.ts +15 -0
- package/dist/domain/interfaces/agent.interface.d.ts.map +1 -0
- package/dist/domain/interfaces/agent.interface.js +6 -0
- package/dist/domain/interfaces/agent.interface.js.map +1 -0
- package/dist/domain/interfaces/embedding-repository.interface.d.ts +5 -0
- package/dist/domain/interfaces/embedding-repository.interface.d.ts.map +1 -1
- package/dist/domain/services/environment-mode-manager.d.ts +12 -0
- package/dist/domain/services/environment-mode-manager.d.ts.map +1 -0
- package/dist/domain/services/environment-mode-manager.js +22 -0
- package/dist/domain/services/environment-mode-manager.js.map +1 -0
- package/dist/domain/services/query-intent-classifier.d.ts.map +1 -1
- package/dist/domain/services/query-intent-classifier.js +20 -1
- package/dist/domain/services/query-intent-classifier.js.map +1 -1
- package/dist/domain/services/risk-tier-detector.d.ts +17 -0
- package/dist/domain/services/risk-tier-detector.d.ts.map +1 -0
- package/dist/domain/services/risk-tier-detector.js +78 -0
- package/dist/domain/services/risk-tier-detector.js.map +1 -0
- package/dist/embed.d.ts.map +1 -1
- package/dist/embed.js +18 -8
- package/dist/embed.js.map +1 -1
- package/dist/formatter.d.ts.map +1 -1
- package/dist/formatter.js +10 -3
- package/dist/formatter.js.map +1 -1
- package/dist/index.js +494 -167
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/ai/cohere-ai-service.d.ts.map +1 -1
- package/dist/infrastructure/ai/cohere-ai-service.js +19 -6
- package/dist/infrastructure/ai/cohere-ai-service.js.map +1 -1
- package/dist/infrastructure/ai/fake-ai-service.d.ts +22 -0
- package/dist/infrastructure/ai/fake-ai-service.d.ts.map +1 -0
- package/dist/infrastructure/ai/fake-ai-service.js +59 -0
- package/dist/infrastructure/ai/fake-ai-service.js.map +1 -0
- package/dist/infrastructure/ai/provider-ai-service.d.ts +59 -0
- package/dist/infrastructure/ai/provider-ai-service.d.ts.map +1 -0
- package/dist/infrastructure/ai/provider-ai-service.js +477 -0
- package/dist/infrastructure/ai/provider-ai-service.js.map +1 -0
- package/dist/infrastructure/cache/embedding-cache.d.ts +13 -1
- package/dist/infrastructure/cache/embedding-cache.d.ts.map +1 -1
- package/dist/infrastructure/cache/embedding-cache.js +80 -9
- package/dist/infrastructure/cache/embedding-cache.js.map +1 -1
- package/dist/infrastructure/cache/query-result-cache.d.ts +14 -55
- package/dist/infrastructure/cache/query-result-cache.d.ts.map +1 -1
- package/dist/infrastructure/cache/query-result-cache.js +40 -112
- package/dist/infrastructure/cache/query-result-cache.js.map +1 -1
- package/dist/infrastructure/cache/response-cache.d.ts +18 -0
- package/dist/infrastructure/cache/response-cache.d.ts.map +1 -0
- package/dist/infrastructure/cache/response-cache.js +48 -0
- package/dist/infrastructure/cache/response-cache.js.map +1 -0
- package/dist/infrastructure/cache/security-scan-cache.d.ts +8 -49
- package/dist/infrastructure/cache/security-scan-cache.d.ts.map +1 -1
- package/dist/infrastructure/cache/security-scan-cache.js +25 -102
- package/dist/infrastructure/cache/security-scan-cache.js.map +1 -1
- package/dist/infrastructure/completion/bash-completion.d.ts +2 -3
- package/dist/infrastructure/completion/bash-completion.d.ts.map +1 -1
- package/dist/infrastructure/completion/bash-completion.js +11 -87
- package/dist/infrastructure/completion/bash-completion.js.map +1 -1
- package/dist/infrastructure/completion/fish-completion.d.ts +2 -3
- package/dist/infrastructure/completion/fish-completion.d.ts.map +1 -1
- package/dist/infrastructure/completion/fish-completion.js +15 -58
- package/dist/infrastructure/completion/fish-completion.js.map +1 -1
- package/dist/infrastructure/completion/zsh-completion.d.ts +2 -3
- package/dist/infrastructure/completion/zsh-completion.d.ts.map +1 -1
- package/dist/infrastructure/completion/zsh-completion.js +18 -73
- package/dist/infrastructure/completion/zsh-completion.js.map +1 -1
- package/dist/infrastructure/config/config-manager.d.ts +10 -0
- package/dist/infrastructure/config/config-manager.d.ts.map +1 -1
- package/dist/infrastructure/config/config-manager.js +13 -2
- package/dist/infrastructure/config/config-manager.js.map +1 -1
- package/dist/infrastructure/context/conversation-context.d.ts +54 -0
- package/dist/infrastructure/context/conversation-context.d.ts.map +1 -0
- package/dist/infrastructure/context/conversation-context.js +129 -0
- package/dist/infrastructure/context/conversation-context.js.map +1 -0
- package/dist/infrastructure/context/session-manager.d.ts +42 -0
- package/dist/infrastructure/context/session-manager.d.ts.map +1 -0
- package/dist/infrastructure/context/session-manager.js +94 -0
- package/dist/infrastructure/context/session-manager.js.map +1 -0
- package/dist/infrastructure/cost/cost-tracker.d.ts +1 -0
- package/dist/infrastructure/cost/cost-tracker.d.ts.map +1 -1
- package/dist/infrastructure/cost/cost-tracker.js +12 -5
- package/dist/infrastructure/cost/cost-tracker.js.map +1 -1
- package/dist/infrastructure/governance/nist-ai-rmf.d.ts +6 -8
- package/dist/infrastructure/governance/nist-ai-rmf.d.ts.map +1 -1
- package/dist/infrastructure/governance/nist-ai-rmf.js +6 -8
- package/dist/infrastructure/governance/nist-ai-rmf.js.map +1 -1
- package/dist/infrastructure/governance/policy-as-code.d.ts +6 -8
- package/dist/infrastructure/governance/policy-as-code.d.ts.map +1 -1
- package/dist/infrastructure/governance/policy-as-code.js +6 -8
- package/dist/infrastructure/governance/policy-as-code.js.map +1 -1
- package/dist/infrastructure/governance/prompt-to-code-lineage.d.ts +7 -9
- package/dist/infrastructure/governance/prompt-to-code-lineage.d.ts.map +1 -1
- package/dist/infrastructure/governance/prompt-to-code-lineage.js +7 -9
- package/dist/infrastructure/governance/prompt-to-code-lineage.js.map +1 -1
- package/dist/infrastructure/protocols/a2a-metadata.js +1 -1
- package/dist/infrastructure/protocols/mcp-oauth.js +1 -1
- package/dist/infrastructure/providers/cohere-provider.d.ts +39 -0
- package/dist/infrastructure/providers/cohere-provider.d.ts.map +1 -0
- package/dist/infrastructure/providers/cohere-provider.js +444 -0
- package/dist/infrastructure/providers/cohere-provider.js.map +1 -0
- package/dist/infrastructure/providers/fake-provider.d.ts +43 -0
- package/dist/infrastructure/providers/fake-provider.d.ts.map +1 -0
- package/dist/infrastructure/providers/fake-provider.js +130 -0
- package/dist/infrastructure/providers/fake-provider.js.map +1 -0
- package/dist/infrastructure/providers/local-llm-provider.d.ts +49 -0
- package/dist/infrastructure/providers/local-llm-provider.d.ts.map +1 -0
- package/dist/infrastructure/providers/local-llm-provider.js +330 -0
- package/dist/infrastructure/providers/local-llm-provider.js.map +1 -0
- package/dist/infrastructure/providers/model-config.types.d.ts +70 -0
- package/dist/infrastructure/providers/model-config.types.d.ts.map +1 -0
- package/dist/infrastructure/providers/model-config.types.js +9 -0
- package/dist/infrastructure/providers/model-config.types.js.map +1 -0
- package/dist/infrastructure/providers/model-provider.interface.d.ts +113 -0
- package/dist/infrastructure/providers/model-provider.interface.d.ts.map +1 -0
- package/dist/infrastructure/providers/model-provider.interface.js +8 -0
- package/dist/infrastructure/providers/model-provider.interface.js.map +1 -0
- package/dist/infrastructure/providers/openai-provider.d.ts +38 -0
- package/dist/infrastructure/providers/openai-provider.d.ts.map +1 -0
- package/dist/infrastructure/providers/openai-provider.js +413 -0
- package/dist/infrastructure/providers/openai-provider.js.map +1 -0
- package/dist/infrastructure/providers/openrouter-provider.d.ts +42 -0
- package/dist/infrastructure/providers/openrouter-provider.d.ts.map +1 -0
- package/dist/infrastructure/providers/openrouter-provider.js +401 -0
- package/dist/infrastructure/providers/openrouter-provider.js.map +1 -0
- package/dist/infrastructure/providers/operation-provider-resolver.d.ts +48 -0
- package/dist/infrastructure/providers/operation-provider-resolver.d.ts.map +1 -0
- package/dist/infrastructure/providers/operation-provider-resolver.js +131 -0
- package/dist/infrastructure/providers/operation-provider-resolver.js.map +1 -0
- package/dist/infrastructure/providers/provider-config-loader.d.ts +37 -0
- package/dist/infrastructure/providers/provider-config-loader.d.ts.map +1 -0
- package/dist/infrastructure/providers/provider-config-loader.js +120 -0
- package/dist/infrastructure/providers/provider-config-loader.js.map +1 -0
- package/dist/infrastructure/providers/provider-registry.d.ts +53 -0
- package/dist/infrastructure/providers/provider-registry.d.ts.map +1 -0
- package/dist/infrastructure/providers/provider-registry.js +88 -0
- package/dist/infrastructure/providers/provider-registry.js.map +1 -0
- package/dist/infrastructure/security/input-validator.d.ts.map +1 -1
- package/dist/infrastructure/security/input-validator.js +19 -6
- package/dist/infrastructure/security/input-validator.js.map +1 -1
- package/dist/infrastructure/serialization/toon-serializer.d.ts +45 -0
- package/dist/infrastructure/serialization/toon-serializer.d.ts.map +1 -0
- package/dist/infrastructure/serialization/toon-serializer.js +119 -0
- package/dist/infrastructure/serialization/toon-serializer.js.map +1 -0
- package/dist/infrastructure/storage/embeddings-path.d.ts +18 -0
- package/dist/infrastructure/storage/embeddings-path.d.ts.map +1 -0
- package/dist/infrastructure/storage/embeddings-path.js +37 -0
- package/dist/infrastructure/storage/embeddings-path.js.map +1 -0
- package/dist/infrastructure/storage/plan-repository.d.ts +2 -0
- package/dist/infrastructure/storage/plan-repository.d.ts.map +1 -1
- package/dist/infrastructure/storage/plan-repository.js +36 -73
- package/dist/infrastructure/storage/plan-repository.js.map +1 -1
- package/dist/infrastructure/storage/sqlite-embedding-repository.d.ts +10 -1
- package/dist/infrastructure/storage/sqlite-embedding-repository.d.ts.map +1 -1
- package/dist/infrastructure/storage/sqlite-embedding-repository.js +37 -3
- package/dist/infrastructure/storage/sqlite-embedding-repository.js.map +1 -1
- package/dist/infrastructure/storage/task-helpers.d.ts +69 -0
- package/dist/infrastructure/storage/task-helpers.d.ts.map +1 -0
- package/dist/infrastructure/storage/task-helpers.js +197 -0
- package/dist/infrastructure/storage/task-helpers.js.map +1 -0
- package/dist/infrastructure/storage/task-repository.d.ts +68 -0
- package/dist/infrastructure/storage/task-repository.d.ts.map +1 -0
- package/dist/infrastructure/storage/task-repository.js +216 -0
- package/dist/infrastructure/storage/task-repository.js.map +1 -0
- package/dist/infrastructure/telemetry/telemetry-service.d.ts +74 -0
- package/dist/infrastructure/telemetry/telemetry-service.d.ts.map +1 -0
- package/dist/infrastructure/telemetry/telemetry-service.js +167 -0
- package/dist/infrastructure/telemetry/telemetry-service.js.map +1 -0
- package/dist/infrastructure/ux/bi-directional-learning.d.ts +22 -0
- package/dist/infrastructure/ux/bi-directional-learning.d.ts.map +1 -1
- package/dist/infrastructure/ux/bi-directional-learning.js +144 -7
- package/dist/infrastructure/ux/bi-directional-learning.js.map +1 -1
- package/dist/infrastructure/ux/capability-boundaries.d.ts +22 -0
- package/dist/infrastructure/ux/capability-boundaries.d.ts.map +1 -0
- package/dist/infrastructure/ux/capability-boundaries.js +42 -0
- package/dist/infrastructure/ux/capability-boundaries.js.map +1 -0
- package/dist/infrastructure/ux/comprehensive-formatter.d.ts +21 -0
- package/dist/infrastructure/ux/comprehensive-formatter.d.ts.map +1 -0
- package/dist/infrastructure/ux/comprehensive-formatter.js +117 -0
- package/dist/infrastructure/ux/comprehensive-formatter.js.map +1 -0
- package/dist/infrastructure/ux/contextual-feature-discovery.d.ts +5 -18
- package/dist/infrastructure/ux/contextual-feature-discovery.d.ts.map +1 -1
- package/dist/infrastructure/ux/contextual-feature-discovery.js +5 -139
- package/dist/infrastructure/ux/contextual-feature-discovery.js.map +1 -1
- package/dist/infrastructure/ux/feature-discovery.d.ts +3 -33
- package/dist/infrastructure/ux/feature-discovery.d.ts.map +1 -1
- package/dist/infrastructure/ux/feature-discovery.js +5 -181
- package/dist/infrastructure/ux/feature-discovery.js.map +1 -1
- package/dist/infrastructure/ux/feedback-prompt.d.ts +26 -0
- package/dist/infrastructure/ux/feedback-prompt.d.ts.map +1 -0
- package/dist/infrastructure/ux/feedback-prompt.js +45 -0
- package/dist/infrastructure/ux/feedback-prompt.js.map +1 -0
- package/dist/infrastructure/ux/hitl-review-portal.d.ts.map +1 -1
- package/dist/infrastructure/ux/hitl-review-portal.js +4 -1
- package/dist/infrastructure/ux/hitl-review-portal.js.map +1 -1
- package/dist/infrastructure/ux/hitl-validation.d.ts +35 -0
- package/dist/infrastructure/ux/hitl-validation.d.ts.map +1 -1
- package/dist/infrastructure/ux/hitl-validation.js +86 -0
- package/dist/infrastructure/ux/hitl-validation.js.map +1 -1
- package/dist/infrastructure/ux/progress-indicator.d.ts +5 -6
- package/dist/infrastructure/ux/progress-indicator.d.ts.map +1 -1
- package/dist/infrastructure/ux/progress-indicator.js +36 -41
- package/dist/infrastructure/ux/progress-indicator.js.map +1 -1
- package/dist/infrastructure/ux/proportional-friction.d.ts +73 -0
- package/dist/infrastructure/ux/proportional-friction.d.ts.map +1 -0
- package/dist/infrastructure/ux/proportional-friction.js +200 -0
- package/dist/infrastructure/ux/proportional-friction.js.map +1 -0
- package/dist/infrastructure/ux/review-checkpoint.d.ts +3 -1
- package/dist/infrastructure/ux/review-checkpoint.d.ts.map +1 -1
- package/dist/infrastructure/ux/review-checkpoint.js +33 -80
- package/dist/infrastructure/ux/review-checkpoint.js.map +1 -1
- package/dist/infrastructure/ux/staged-feature-intro.d.ts +14 -39
- package/dist/infrastructure/ux/staged-feature-intro.d.ts.map +1 -1
- package/dist/infrastructure/ux/staged-feature-intro.js +12 -132
- package/dist/infrastructure/ux/staged-feature-intro.js.map +1 -1
- package/dist/infrastructure/ux/syntax-highlighter.d.ts +1 -2
- package/dist/infrastructure/ux/syntax-highlighter.d.ts.map +1 -1
- package/dist/infrastructure/ux/syntax-highlighter.js +67 -148
- package/dist/infrastructure/ux/syntax-highlighter.js.map +1 -1
- package/dist/infrastructure/validation/agent-feedback.d.ts +51 -0
- package/dist/infrastructure/validation/agent-feedback.d.ts.map +1 -0
- package/dist/infrastructure/validation/agent-feedback.js +55 -0
- package/dist/infrastructure/validation/agent-feedback.js.map +1 -0
- package/dist/infrastructure/validation/agent-validation-helper.d.ts +75 -0
- package/dist/infrastructure/validation/agent-validation-helper.d.ts.map +1 -0
- package/dist/infrastructure/validation/agent-validation-helper.js +137 -0
- package/dist/infrastructure/validation/agent-validation-helper.js.map +1 -0
- package/dist/infrastructure/validation/feedback-stats.d.ts +99 -0
- package/dist/infrastructure/validation/feedback-stats.d.ts.map +1 -0
- package/dist/infrastructure/validation/feedback-stats.js +173 -0
- package/dist/infrastructure/validation/feedback-stats.js.map +1 -0
- package/dist/infrastructure/validation/review-handler.d.ts +26 -0
- package/dist/infrastructure/validation/review-handler.d.ts.map +1 -0
- package/dist/infrastructure/validation/review-handler.js +40 -0
- package/dist/infrastructure/validation/review-handler.js.map +1 -0
- package/dist/infrastructure/validation/summary-aggregator.d.ts +45 -0
- package/dist/infrastructure/validation/summary-aggregator.d.ts.map +1 -0
- package/dist/infrastructure/validation/summary-aggregator.js +70 -0
- package/dist/infrastructure/validation/summary-aggregator.js.map +1 -0
- package/dist/infrastructure/validation/summary-extractor.d.ts +24 -0
- package/dist/infrastructure/validation/summary-extractor.d.ts.map +1 -0
- package/dist/infrastructure/validation/summary-extractor.js +45 -0
- package/dist/infrastructure/validation/summary-extractor.js.map +1 -0
- package/dist/infrastructure/validation/trace-summary.d.ts +45 -0
- package/dist/infrastructure/validation/trace-summary.d.ts.map +1 -0
- package/dist/infrastructure/validation/trace-summary.js +52 -0
- package/dist/infrastructure/validation/trace-summary.js.map +1 -0
- package/dist/infrastructure/validation/trust-config.d.ts +27 -0
- package/dist/infrastructure/validation/trust-config.d.ts.map +1 -0
- package/dist/infrastructure/validation/trust-config.js +113 -0
- package/dist/infrastructure/validation/trust-config.js.map +1 -0
- package/dist/infrastructure/xai/attention-visualizer.d.ts +6 -8
- package/dist/infrastructure/xai/attention-visualizer.d.ts.map +1 -1
- package/dist/infrastructure/xai/attention-visualizer.js +6 -8
- package/dist/infrastructure/xai/attention-visualizer.js.map +1 -1
- package/dist/infrastructure/xai/cot-visualizer.d.ts +6 -9
- package/dist/infrastructure/xai/cot-visualizer.d.ts.map +1 -1
- package/dist/infrastructure/xai/cot-visualizer.js +6 -9
- package/dist/infrastructure/xai/cot-visualizer.js.map +1 -1
- package/dist/infrastructure/xai/decision-tree-log.d.ts +6 -10
- package/dist/infrastructure/xai/decision-tree-log.d.ts.map +1 -1
- package/dist/infrastructure/xai/decision-tree-log.js +6 -10
- package/dist/infrastructure/xai/decision-tree-log.js.map +1 -1
- package/dist/infrastructure/xai/interactive-xai.d.ts +6 -8
- package/dist/infrastructure/xai/interactive-xai.d.ts.map +1 -1
- package/dist/infrastructure/xai/interactive-xai.js +6 -8
- package/dist/infrastructure/xai/interactive-xai.js.map +1 -1
- package/dist/infrastructure/xai/uncertainty-quantifier.d.ts +6 -9
- package/dist/infrastructure/xai/uncertainty-quantifier.d.ts.map +1 -1
- package/dist/infrastructure/xai/uncertainty-quantifier.js +6 -9
- package/dist/infrastructure/xai/uncertainty-quantifier.js.map +1 -1
- package/dist/monitoring.d.ts +1 -1
- package/dist/monitoring.d.ts.map +1 -1
- package/dist/monitoring.js +12 -9
- package/dist/monitoring.js.map +1 -1
- package/dist/parallel-processor.d.ts.map +1 -1
- package/dist/parallel-processor.js +124 -45
- package/dist/parallel-processor.js.map +1 -1
- package/dist/presentation/cli/commands/ask-command.d.ts +2 -0
- package/dist/presentation/cli/commands/ask-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/ask-command.js +356 -87
- package/dist/presentation/cli/commands/ask-command.js.map +1 -1
- package/dist/presentation/cli/commands/config-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/config-command.js +22 -8
- package/dist/presentation/cli/commands/config-command.js.map +1 -1
- package/dist/presentation/cli/commands/decision-command.js +23 -6
- package/dist/presentation/cli/commands/decision-command.js.map +1 -1
- package/dist/presentation/cli/commands/docs-command.d.ts +14 -0
- package/dist/presentation/cli/commands/docs-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/docs-command.js +25 -0
- package/dist/presentation/cli/commands/docs-command.js.map +1 -0
- package/dist/presentation/cli/commands/fix-command.d.ts +10 -0
- package/dist/presentation/cli/commands/fix-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/fix-command.js +94 -0
- package/dist/presentation/cli/commands/fix-command.js.map +1 -0
- package/dist/presentation/cli/commands/help-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/help-command.js +23 -1
- package/dist/presentation/cli/commands/help-command.js.map +1 -1
- package/dist/presentation/cli/commands/memory-command.d.ts +17 -0
- package/dist/presentation/cli/commands/memory-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/memory-command.js +252 -0
- package/dist/presentation/cli/commands/memory-command.js.map +1 -0
- package/dist/presentation/cli/commands/models-command.d.ts +13 -0
- package/dist/presentation/cli/commands/models-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/models-command.js +194 -0
- package/dist/presentation/cli/commands/models-command.js.map +1 -0
- package/dist/presentation/cli/commands/orchestrate-command.d.ts +2 -0
- package/dist/presentation/cli/commands/orchestrate-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/orchestrate-command.js +182 -14
- package/dist/presentation/cli/commands/orchestrate-command.js.map +1 -1
- package/dist/presentation/cli/commands/plan-command.d.ts +2 -0
- package/dist/presentation/cli/commands/plan-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/plan-command.js +212 -26
- package/dist/presentation/cli/commands/plan-command.js.map +1 -1
- package/dist/presentation/cli/commands/product-command.d.ts +14 -0
- package/dist/presentation/cli/commands/product-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/product-command.js +22 -0
- package/dist/presentation/cli/commands/product-command.js.map +1 -0
- package/dist/presentation/cli/commands/react-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/react-command.js +8 -2
- package/dist/presentation/cli/commands/react-command.js.map +1 -1
- package/dist/presentation/cli/commands/review-command.d.ts +14 -0
- package/dist/presentation/cli/commands/review-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/review-command.js +173 -0
- package/dist/presentation/cli/commands/review-command.js.map +1 -0
- package/dist/presentation/cli/commands/run-command.d.ts +13 -0
- package/dist/presentation/cli/commands/run-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/run-command.js +188 -0
- package/dist/presentation/cli/commands/run-command.js.map +1 -0
- package/dist/presentation/cli/commands/setup-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/setup-command.js +15 -0
- package/dist/presentation/cli/commands/setup-command.js.map +1 -1
- package/dist/presentation/cli/commands/smart-command.d.ts +3 -1
- package/dist/presentation/cli/commands/smart-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/smart-command.js +165 -11
- package/dist/presentation/cli/commands/smart-command.js.map +1 -1
- package/dist/presentation/cli/commands/status-command.d.ts +14 -0
- package/dist/presentation/cli/commands/status-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/status-command.js +171 -0
- package/dist/presentation/cli/commands/status-command.js.map +1 -0
- package/dist/presentation/cli/commands/suggest-command.d.ts +11 -0
- package/dist/presentation/cli/commands/suggest-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/suggest-command.js +138 -0
- package/dist/presentation/cli/commands/suggest-command.js.map +1 -0
- package/dist/presentation/cli/error-display.d.ts.map +1 -1
- package/dist/presentation/cli/error-display.js +118 -17
- package/dist/presentation/cli/error-display.js.map +1 -1
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js +6 -1
- package/dist/search.js.map +1 -1
- package/dist/session.d.ts +1 -0
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +69 -4
- package/dist/session.js.map +1 -1
- package/dist/tools/bash.d.ts.map +1 -1
- package/dist/tools/bash.js +3 -0
- package/dist/tools/bash.js.map +1 -1
- package/dist/tools/git-tool.js +7 -7
- package/dist/tools/git-tool.js.map +1 -1
- package/dist/ui.d.ts +11 -0
- package/dist/ui.d.ts.map +1 -1
- package/dist/ui.js +62 -6
- package/dist/ui.js.map +1 -1
- package/package.json +22 -4
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
# codehere
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> **Status:** v0.5 Solo Dev Alpha – CLI agent focused on solo developer workflows and safe editing with review gates.
|
|
4
|
+
|
|
5
|
+
> A governed, measurable AI coding OS that plans, edits, validates, and measures its own reliability. Every change is traceable, reviewable, and scored – so you can trust it on real code.
|
|
6
|
+
|
|
7
|
+
Codehere is a multi-agent coding system designed for **solo developers working on their own repositories**. Unlike simple AI assistants, Codehere orchestrates specialized agents (Planning, Execution, Validation) to handle complex tasks while maintaining full transparency and control through review gates and trust metrics.
|
|
8
|
+
|
|
9
|
+
**v0.5 Scope**: Single developer, single repository, local workflows. Not yet validated for team/enterprise use.
|
|
10
|
+
|
|
11
|
+
**📖 [Documentation →](docs/GETTING_STARTED.md)**
|
|
4
12
|
|
|
5
13
|
[](https://www.typescriptlang.org/)
|
|
6
14
|
[](https://nodejs.org/)
|
|
@@ -22,9 +30,13 @@ npm install -g .
|
|
|
22
30
|
codehere --version
|
|
23
31
|
```
|
|
24
32
|
|
|
25
|
-
**Option 2: Install from npm
|
|
33
|
+
**Option 2: Install from npm**
|
|
26
34
|
```bash
|
|
35
|
+
# Stable version
|
|
27
36
|
npm install -g codehere
|
|
37
|
+
|
|
38
|
+
# Latest alpha (includes OpenRouter & enhanced local LLM)
|
|
39
|
+
npm install -g codehere@alpha
|
|
28
40
|
```
|
|
29
41
|
|
|
30
42
|
Once installed globally, you can use `codehere` from any directory in your terminal.
|
|
@@ -50,19 +62,69 @@ codehere index
|
|
|
50
62
|
codehere "How does authentication work?"
|
|
51
63
|
```
|
|
52
64
|
|
|
65
|
+
### Switching Providers
|
|
66
|
+
|
|
67
|
+
Codehere supports multiple AI providers. By default, it uses **Cohere** (no configuration needed).
|
|
68
|
+
|
|
69
|
+
**Quick Options:**
|
|
70
|
+
|
|
71
|
+
**Default (Cohere):**
|
|
72
|
+
```bash
|
|
73
|
+
export COHERE_API_KEY=your-key
|
|
74
|
+
codehere status
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**OpenAI:**
|
|
78
|
+
```bash
|
|
79
|
+
export CODEHERE_AI_PROVIDER=openai
|
|
80
|
+
export CODEHERE_OPENAI_API_KEY=sk-...
|
|
81
|
+
codehere status
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**OpenRouter (400+ Models):**
|
|
85
|
+
```bash
|
|
86
|
+
export CODEHERE_AI_PROVIDER=openrouter
|
|
87
|
+
export OPENROUTER_API_KEY=sk-or-v1-...
|
|
88
|
+
codehere status
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**Local LLM (Ollama, LM Studio):**
|
|
92
|
+
```bash
|
|
93
|
+
export CODEHERE_AI_PROVIDER=local
|
|
94
|
+
export CODEHERE_LOCAL_BASE_URL=http://localhost:11434
|
|
95
|
+
codehere status
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**Fake Mode (Testing/Demo):**
|
|
99
|
+
```bash
|
|
100
|
+
export CODEHERE_FAKE_AI=1
|
|
101
|
+
codehere status # No API calls, deterministic outputs
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**Per-Operation Routing:**
|
|
105
|
+
|
|
106
|
+
Create `.codehere/providers.json` to route different operations to different providers. See [docs/PROVIDERS_QUICKSTART.md](docs/PROVIDERS_QUICKSTART.md) for complete setup guide.
|
|
107
|
+
|
|
108
|
+
**📖 [Complete Provider Guide →](docs/PROVIDERS_QUICKSTART.md)**
|
|
109
|
+
|
|
53
110
|
**Using Codehere:**
|
|
54
111
|
|
|
55
112
|
```bash
|
|
56
113
|
# Natural language queries (unified command)
|
|
57
114
|
codehere "explain this function"
|
|
58
|
-
codehere "add error handling to src/utils.ts"
|
|
59
|
-
codehere "refactor user service to use dependency injection"
|
|
115
|
+
codehere "add error handling to src/utils.ts" --review
|
|
116
|
+
codehere "refactor user service to use dependency injection" --review
|
|
60
117
|
|
|
61
118
|
# Or use explicit commands
|
|
62
119
|
codehere ask "How does authentication work?"
|
|
63
120
|
codehere explain src/utils.ts
|
|
64
121
|
codehere plan "implement user authentication system"
|
|
65
|
-
codehere orchestrate "add comprehensive logging"
|
|
122
|
+
codehere orchestrate "add comprehensive logging" --review
|
|
123
|
+
|
|
124
|
+
# Validation Mode: Review before applying changes
|
|
125
|
+
codehere fix src/utils.ts "Add error handling" --review
|
|
126
|
+
codehere orchestrate "Add authentication" --review
|
|
127
|
+
codehere plan "Refactor to DI" --execute --review
|
|
66
128
|
|
|
67
129
|
# Manage configuration
|
|
68
130
|
codehere config # Show current configuration
|
|
@@ -74,57 +136,229 @@ codehere --help
|
|
|
74
136
|
codehere help <command>
|
|
75
137
|
```
|
|
76
138
|
|
|
139
|
+
> **💡 Tip**: Use `--review` on destructive operations (edit, orchestrate, plan --execute) to see summaries and approve changes before they're applied. This builds trust and prevents mistakes.
|
|
140
|
+
|
|
141
|
+
### 🔍 Validation Mode & Trust Scores
|
|
142
|
+
|
|
143
|
+
Validation Mode makes every agent operation traceable, reviewable, and measurable. Use `--review` to pause before applying changes, review structured summaries, and approve or reject. Every operation generates feedback that feeds into trust scores.
|
|
144
|
+
|
|
145
|
+
**How it works:**
|
|
146
|
+
- Run commands with `--review` to enable feedback capture
|
|
147
|
+
- Review summaries show files changed, validation checks, and risk assessment
|
|
148
|
+
- Feedback is stored locally in `data/feedback/agent-feedback.jsonl`
|
|
149
|
+
- Trust scores are computed per agent: `(approved_success_runs / total_runs) × 100`
|
|
150
|
+
|
|
151
|
+
**Example:**
|
|
152
|
+
```bash
|
|
153
|
+
# Enable review & feedback capture
|
|
154
|
+
CODEHERE_AUTO_APPROVE=true codehere fix src/file.ts "add input validation" --review
|
|
155
|
+
|
|
156
|
+
# View trust scores
|
|
157
|
+
npm run analyze:feedback
|
|
158
|
+
codehere status
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
**Optional:** Configure minimum trust thresholds via `config/trust-config.json` to highlight agents that need more validation (warnings only, non-blocking).
|
|
162
|
+
|
|
163
|
+
**For CI/dashboards:** Export trust and feedback stats as JSON:
|
|
164
|
+
- `npm run analyze:feedback -- --json`
|
|
165
|
+
- `codehere status --json`
|
|
166
|
+
|
|
167
|
+
**For CI gates:** Enforce minimum trust scores:
|
|
168
|
+
- `npm run check:trust` - Fails if any agent is below its configured threshold
|
|
169
|
+
|
|
170
|
+
**📖 [Complete Guide →](docs/VALIDATION_MODE.md)**
|
|
171
|
+
|
|
172
|
+
### 💬 Feedback Collection
|
|
173
|
+
|
|
174
|
+
Codehere collects feedback after operations to improve responses. In interactive mode, you'll see a prompt asking for feedback. In non-interactive mode (scripts, CI), you can provide feedback via environment variables:
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
# Positive feedback (thumbs up)
|
|
178
|
+
CODEHERE_FEEDBACK=y codehere ask "What is main?"
|
|
179
|
+
|
|
180
|
+
# Negative feedback (thumbs down)
|
|
181
|
+
CODEHERE_FEEDBACK=n codehere ask "What is main?"
|
|
182
|
+
|
|
183
|
+
# Request refinement with message
|
|
184
|
+
CODEHERE_FEEDBACK=r CODEHERE_FEEDBACK_MESSAGE="Add more examples" codehere ask "What is main?"
|
|
185
|
+
|
|
186
|
+
# Alternative values
|
|
187
|
+
CODEHERE_FEEDBACK=positive codehere ask "What is main?"
|
|
188
|
+
CODEHERE_FEEDBACK=negative codehere ask "What is main?"
|
|
189
|
+
CODEHERE_FEEDBACK=yes codehere ask "What is main?"
|
|
190
|
+
CODEHERE_FEEDBACK=no codehere ask "What is main?"
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
**Environment Variables:**
|
|
194
|
+
- `CODEHERE_FEEDBACK`: `y`/`yes`/`positive` (thumbs up), `n`/`no`/`negative` (thumbs down), `r`/`refine`/`refinement` (request refinement)
|
|
195
|
+
- `CODEHERE_FEEDBACK_MESSAGE`: Optional message for refinement requests
|
|
196
|
+
|
|
77
197
|
## ✨ Features
|
|
78
198
|
|
|
79
|
-
###
|
|
80
|
-
|
|
81
|
-
-
|
|
82
|
-
-
|
|
199
|
+
### 🎯 Why Codehere vs Other Coding Agents?
|
|
200
|
+
|
|
201
|
+
- **Safe Editing with Review Gates**: Unlike agents that apply changes immediately, Codehere uses `--review` to pause, show summaries, and request approval before modifying files. **This is the strongest differentiator in v0.5.**
|
|
202
|
+
- **Automatic Backup & Rollback**: Every edit creates a backup. On failure, automatic rollback ensures your repo stays consistent.
|
|
203
|
+
- **Trust Scores & Analytics**: Every agent run is scored. Run `npm run analyze:feedback` to see which agents are most reliable in your workflow
|
|
204
|
+
- **Full Traceability**: Every operation generates a structured TraceSummary showing files changed, reasoning steps, validation checks, and risk assessment
|
|
205
|
+
- **Privacy-First Feedback**: All feedback stored locally in JSONL. No telemetry. Opt-out available. Your data stays yours
|
|
206
|
+
|
|
207
|
+
## What's Stable (Ready to Use)
|
|
208
|
+
|
|
209
|
+
These capabilities have been validated through comprehensive testing (Pack A, Real Repo, Pack B):
|
|
210
|
+
|
|
211
|
+
### 🧠 Autonomous Planning
|
|
212
|
+
- **Command**: `codehere plan "Implement X" --json`
|
|
213
|
+
- **Status**: ✅ Stable
|
|
214
|
+
- **What it does**: Generates structured task plans with hierarchical sub-plans, complexity assessment, and JSON export
|
|
215
|
+
|
|
216
|
+
### 🔍 Semantic Code Search & Understanding
|
|
217
|
+
- **Commands**:
|
|
218
|
+
- `codehere index` (may fail on 30K+ file repos - see limitations)
|
|
219
|
+
- `codehere ask "How does X work?" --json`
|
|
220
|
+
- `codehere explain path/to/file.ts`
|
|
221
|
+
- **Status**: ✅ Stable
|
|
222
|
+
- **What it does**: Uses semantic search + AST-aware explanations to answer questions about your codebase
|
|
223
|
+
|
|
224
|
+
### ✏️ Safe Code Editing with Review Gates
|
|
225
|
+
- **Command**: `codehere fix path/to/file.ts "Change spec" --review`
|
|
226
|
+
- **Status**: ✅ Stable (Key Differentiator)
|
|
227
|
+
- **What it does**:
|
|
228
|
+
- Shows review summary before applying changes
|
|
229
|
+
- Creates automatic backup
|
|
230
|
+
- Runs verification checks
|
|
231
|
+
- Automatic rollback on failure
|
|
232
|
+
|
|
233
|
+
### 💬 Natural Language Interface
|
|
234
|
+
- **Command**: `codehere "What files handle user authentication?"`
|
|
235
|
+
- **Status**: ✅ Stable
|
|
236
|
+
- **What it does**: Intelligently routes queries to planning, search, or editing workflows
|
|
237
|
+
|
|
238
|
+
### 📦 JSON-First Automation
|
|
239
|
+
- **Commands**: All main commands support `--json` flag
|
|
240
|
+
- **Status**: ✅ Stable
|
|
241
|
+
- **What it does**: Returns stable, machine-readable JSON schemas for scripts and tooling
|
|
242
|
+
|
|
243
|
+
### 📊 Operation History
|
|
244
|
+
- **Command**: `codehere memory --list --json`
|
|
245
|
+
- **Status**: ✅ Stable (for operation history)
|
|
246
|
+
- **What it does**: Provides structured operation history with JSON export
|
|
247
|
+
- **Note**: This is **operation history**, not full long-term conversational memory
|
|
248
|
+
|
|
249
|
+
## Beta / Experimental Features
|
|
250
|
+
|
|
251
|
+
These features exist and work, but behavior quality is not guaranteed:
|
|
252
|
+
|
|
253
|
+
### 🤖 Multi-Agent Orchestration
|
|
254
|
+
- **Command**: `codehere orchestrate "Add feature X" --json`
|
|
255
|
+
- **Status**: 🟡 Beta
|
|
256
|
+
- **What works**: JSON schema is stable (`plan`, `execution`, `validation`, `provider` always present)
|
|
257
|
+
- **Limitation**: Content quality depends on provider and is experimental. Fields may be `null` for some providers.
|
|
258
|
+
|
|
259
|
+
### 🔁 ReAct-Style Reasoning
|
|
260
|
+
- **Command**: `codehere react "Solve problem X"`
|
|
261
|
+
- **Status**: 🟡 Experimental
|
|
262
|
+
- **What works**: Executes Thought/Action/Observation loops
|
|
263
|
+
- **Limitation**: Not hardened for all repo sizes. Use with caution on large/complex codebases.
|
|
264
|
+
|
|
265
|
+
### 🛡️ Validation Mode & Review Gates
|
|
266
|
+
|
|
267
|
+
- **`--review` Flag**: Pause before applying changes, review structured summaries, approve or reject
|
|
268
|
+
- **TraceSummary Generation**: Every agent run produces a detailed summary (files, steps, checks, metrics, risk)
|
|
269
|
+
- **Composite Summaries**: Multi-agent operations merge all agent summaries into one reviewable report
|
|
270
|
+
- **Risk Assessment**: Automatic risk level calculation (low/medium/high/critical) with clear reasons
|
|
271
|
+
- **Environment Controls**: `CODEHERE_AUTO_APPROVE=true` for CI/CD, `CODEHERE_FEEDBACK_OPT_OUT=true` for privacy
|
|
272
|
+
|
|
273
|
+
### 📊 Trust & Reliability Metrics
|
|
274
|
+
|
|
275
|
+
- **Agent Feedback Analytics**: Run `npm run analyze:feedback` to see trust scores, success rates, and operation breakdowns
|
|
276
|
+
- **Trust Score Calculation**: `(approved_success_runs / total_runs) × 100` – measurable agent reliability
|
|
277
|
+
- **Outcome Tracking**: Success, failure, partial_success, cancelled, error – complete visibility
|
|
278
|
+
- **User Action Tracking**: Approved, rejected, modified – understand how users interact with agents
|
|
279
|
+
|
|
280
|
+
### 🧠 Semantic Code Search & Context
|
|
83
281
|
|
|
84
|
-
|
|
282
|
+
- Builds local embedding index using Cohere's embedding API
|
|
283
|
+
- Enhanced context with file relationships and dependencies (15+ chunks)
|
|
85
284
|
- Context-aware responses using retrieved code
|
|
86
|
-
- Natural language code explanations
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
- **
|
|
92
|
-
- **
|
|
93
|
-
- **
|
|
94
|
-
- **
|
|
95
|
-
|
|
96
|
-
### 🔧
|
|
97
|
-
|
|
98
|
-
- **
|
|
99
|
-
- **
|
|
100
|
-
- **
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
-
|
|
104
|
-
- TypeScript for type safety
|
|
105
|
-
- SQLite for local vector storage
|
|
106
|
-
- Comprehensive error handling
|
|
285
|
+
- Natural language code explanations and intelligent editing
|
|
286
|
+
|
|
287
|
+
### 🔒 Security & Privacy
|
|
288
|
+
|
|
289
|
+
- **Local-first**: All embeddings and feedback stored locally in SQLite
|
|
290
|
+
- **No code transmission**: Only chunks sent to API for embedding, never full files
|
|
291
|
+
- **Audit trail**: Complete JSONL logging of all operations
|
|
292
|
+
- **Policy enforcement**: Line limits, restricted folders, single-file safety checks
|
|
293
|
+
- **Privacy controls**: Opt-out available, anonymization by default
|
|
294
|
+
|
|
295
|
+
### 🔧 Reliability Features
|
|
296
|
+
|
|
297
|
+
- **Automatic error recovery**: Retry with exponential backoff
|
|
298
|
+
- **Circuit breaker**: Protects against API failures
|
|
299
|
+
- **Health monitoring**: System health checks and metrics
|
|
300
|
+
- **Robust error handling**: Graceful degradation and recovery
|
|
301
|
+
|
|
302
|
+
**Note**: v0.5 targets solo dev workflows. Enterprise-grade reliability guarantees are not yet validated. See limitations section below.
|
|
107
303
|
|
|
108
304
|
## 🏗️ Architecture
|
|
109
305
|
|
|
306
|
+
### Multi-Agent System
|
|
307
|
+
|
|
110
308
|
```
|
|
111
|
-
|
|
112
|
-
│
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
309
|
+
┌─────────────────────────────────────────────────┐
|
|
310
|
+
│ Intelligent Router │
|
|
311
|
+
│ (Routes queries to appropriate workflow) │
|
|
312
|
+
└───────────────┬─────────────────────────────────┘
|
|
313
|
+
│
|
|
314
|
+
┌───────────┼───────────┐
|
|
315
|
+
│ │ │
|
|
316
|
+
┌───▼───┐ ┌───▼────┐ ┌───▼──────────────┐
|
|
317
|
+
│ Simple│ │ ReAct │ │ Multi-Agent │
|
|
318
|
+
│ Work │ │ Agent │ │ Orchestrator │
|
|
319
|
+
└───────┘ └────────┘ └──────┬───────────┘
|
|
320
|
+
│
|
|
321
|
+
┌──────────┼──────────┐
|
|
322
|
+
│ │ │
|
|
323
|
+
┌───────▼──┐ ┌───▼──────┐ ┌▼────────────┐
|
|
324
|
+
│ Planning │ │Execution │ │ Validation │
|
|
325
|
+
│ Agent │→ │ Agent │→ │ Agent │
|
|
326
|
+
└──────────┘ └──────────┘ └─────────────┘
|
|
327
|
+
│ │ │
|
|
328
|
+
└──────────┼──────────┘
|
|
329
|
+
│
|
|
330
|
+
┌──────────▼──────────┐
|
|
331
|
+
│ Composite Summary │
|
|
332
|
+
│ + Review Gate │
|
|
333
|
+
│ + AgentFeedback │
|
|
334
|
+
└─────────────────────┘
|
|
120
335
|
```
|
|
121
336
|
|
|
337
|
+
### Core Components
|
|
338
|
+
|
|
339
|
+
- **Intelligent Router**: Analyzes query intent, selects optimal workflow
|
|
340
|
+
- **Planning Agent**: Creates hierarchical plans with risk assessment
|
|
341
|
+
- **Execution Agent**: Executes plans, tracks changes, handles rollbacks
|
|
342
|
+
- **Validation Agent**: Compiles, tests, analyzes quality
|
|
343
|
+
- **Multi-Agent Orchestrator**: Coordinates all agents, creates unified run context
|
|
344
|
+
- **Validation Layer**: TraceSummary generation, AgentFeedback recording, review handler
|
|
345
|
+
|
|
346
|
+
### Data Flow
|
|
347
|
+
|
|
348
|
+
1. **Query** → Router determines intent
|
|
349
|
+
2. **Planning** → Agent creates plan with complexity tracking
|
|
350
|
+
3. **Execution** → Agent executes with file change tracking
|
|
351
|
+
4. **Validation** → Agent runs checks with pass/fail tracking
|
|
352
|
+
5. **Summary** → Composite summary aggregated from all agents
|
|
353
|
+
6. **Review** → User reviews summary, approves/rejects
|
|
354
|
+
7. **Feedback** → Outcome recorded to local JSONL, trust scores updated
|
|
355
|
+
|
|
122
356
|
**Tech Stack:**
|
|
123
357
|
- **TypeScript** - Type-safe development
|
|
124
|
-
- **Cohere AI** - Embeddings
|
|
125
|
-
- **
|
|
358
|
+
- **Cohere AI** - Embeddings, chat completion, reranking
|
|
359
|
+
- **SQLite** - Local vector storage and feedback persistence
|
|
126
360
|
- **Commander.js** - CLI interface
|
|
127
|
-
- **
|
|
361
|
+
- **Clean Architecture** - Domain, application, infrastructure layers
|
|
128
362
|
|
|
129
363
|
## 📊 Performance
|
|
130
364
|
|
|
@@ -133,36 +367,40 @@ codehere help <command>
|
|
|
133
367
|
- **Chat:** ~2-5 seconds per query
|
|
134
368
|
- **Storage:** ~13KB per chunk (1024-dim embeddings)
|
|
135
369
|
|
|
370
|
+
## 🎯 Trust & Reliability Dashboard
|
|
371
|
+
|
|
372
|
+
Codehere measures and reports its own reliability. Every operation with `--review` generates feedback that feeds into trust scores.
|
|
373
|
+
|
|
374
|
+
### Run Analytics
|
|
375
|
+
|
|
376
|
+
```bash
|
|
377
|
+
npm run analyze:feedback
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
Shows trust scores per agent, success rates, and operation breakdowns. See `docs/VALIDATION_MODE_USAGE_GUIDE.md` for details.
|
|
381
|
+
|
|
136
382
|
## 🔒 Security & Privacy
|
|
137
383
|
|
|
138
|
-
- **Local-first:** All embeddings stored locally in SQLite
|
|
139
|
-
- **No code transmission:** Only chunks sent to API for embedding
|
|
140
|
-
- **
|
|
141
|
-
- **
|
|
384
|
+
- **Local-first storage:** All embeddings and feedback stored locally in SQLite – nothing leaves your machine
|
|
385
|
+
- **No code transmission:** Only chunks sent to API for embedding, never full files
|
|
386
|
+
- **Privacy-first feedback:** All AgentFeedback stored locally in `data/feedback/agent-feedback.jsonl`. No telemetry. Opt out with `CODEHERE_FEEDBACK_OPT_OUT=true`
|
|
387
|
+
- **Audit trail:** Complete JSONL logging of all operations with full traceability
|
|
388
|
+
- **Policy enforcement:** Line limits, restricted folders, single-file safety checks
|
|
389
|
+
- **Review gates:** Explicit approval required before applying destructive changes
|
|
142
390
|
|
|
143
|
-
## 📈 Use Cases
|
|
391
|
+
## 📈 Use Cases (v0.5 Solo Dev Alpha)
|
|
144
392
|
|
|
145
|
-
Codehere helps developers
|
|
393
|
+
Codehere helps **solo developers** working on their own repositories:
|
|
146
394
|
|
|
147
|
-
### For Developers
|
|
395
|
+
### For Solo Developers
|
|
148
396
|
- **Onboard faster**: Understand new codebases in hours, not days
|
|
149
397
|
- **Debug smarter**: AI-powered reasoning to find root causes
|
|
150
|
-
- **Refactor safely**: Automatic verification and rollback
|
|
398
|
+
- **Refactor safely**: Automatic verification and rollback with review gates
|
|
151
399
|
- **Learn continuously**: Get explanations of any code
|
|
400
|
+
- **Plan work**: Generate structured task plans with JSON export
|
|
401
|
+
- **Safe editing**: Review gates, backup, and automatic rollback on failure
|
|
152
402
|
|
|
153
|
-
|
|
154
|
-
- **Better documentation**: Auto-generate accurate, up-to-date docs
|
|
155
|
-
- **Faster code reviews**: AI-assisted review catches issues early
|
|
156
|
-
- **Consistent patterns**: Learn and apply team conventions automatically
|
|
157
|
-
- **Knowledge sharing**: Preserve and share patterns across projects
|
|
158
|
-
|
|
159
|
-
### For Enterprises
|
|
160
|
-
- **Secure by default**: Built-in security scanning and audit trails
|
|
161
|
-
- **Privacy-first**: Local processing, code never leaves your machine
|
|
162
|
-
- **Productivity metrics**: Track ROI and developer productivity
|
|
163
|
-
- **Organizational memory**: Build knowledge that survives team changes
|
|
164
|
-
|
|
165
|
-
**See [docs/USE_CASES.md](../docs/USE_CASES.md) for detailed scenarios and examples.**
|
|
403
|
+
**Note**: v0.5 is not yet validated for team workflows, enterprise use, or multi-repo orchestration.
|
|
166
404
|
|
|
167
405
|
## 🧪 Testing
|
|
168
406
|
|
|
@@ -224,6 +462,32 @@ MIT License - see [LICENSE](LICENSE) for details.
|
|
|
224
462
|
|
|
225
463
|
Contributions welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
226
464
|
|
|
465
|
+
## Known Limitations (v0.5 Solo Dev Alpha)
|
|
466
|
+
|
|
467
|
+
### 🧱 Large Repos Indexing
|
|
468
|
+
- **Issue**: Full `codehere index` can hit heap/memory limits on very large codebases (~30–40k+ files)
|
|
469
|
+
- **Impact**: You may not be able to fully index very large repositories
|
|
470
|
+
- **Workaround**: Semantic search still works with partial/cached results. You don't need full indexing for most operations.
|
|
471
|
+
|
|
472
|
+
### 🧠 Memory Scope
|
|
473
|
+
- **Issue**: `codehere memory --list --json` provides **operation history**, not full long-term conversational memory
|
|
474
|
+
- **Impact**: No strong guarantees around cross-session, long-horizon memory semantics
|
|
475
|
+
- **What you get**: Structured operation history with JSON export for tooling
|
|
476
|
+
- **What you don't get**: "Remembers everything you say forever" - that's not v0.5
|
|
477
|
+
|
|
478
|
+
### 👥 Not Enterprise-Ready
|
|
479
|
+
- **Issue**: v0.5 targets **solo devs on single repos**
|
|
480
|
+
- **Impact**: No guarantees (yet) for:
|
|
481
|
+
- Team workflows
|
|
482
|
+
- Multi-repo orchestration
|
|
483
|
+
- Governance/audit requirements
|
|
484
|
+
- Production CI/CD reliability guarantees
|
|
485
|
+
|
|
486
|
+
### 🤖 Orchestration Behavior
|
|
487
|
+
- **Issue**: Multi-agent orchestration JSON schema is stable, but content quality depends on provider
|
|
488
|
+
- **Impact**: `plan`, `execution`, `validation` fields may be `null` for some providers
|
|
489
|
+
- **Workaround**: Check JSON structure - if fields are `null`, orchestration didn't produce rich content (expected for fake provider, may vary for real providers)
|
|
490
|
+
|
|
227
491
|
---
|
|
228
492
|
|
|
229
|
-
**Built with ❤️ for developers who want AI assistance without sacrificing control.**
|
|
493
|
+
**Built with ❤️ for solo developers who want AI assistance without sacrificing control.**
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Application Agent: Documentation Agent
|
|
3
|
+
* Generates and maintains documentation (README, API docs)
|
|
4
|
+
*/
|
|
5
|
+
import type { IAIService } from '../../domain/interfaces/ai-service.interface.js';
|
|
6
|
+
import type { MemoryStreamService } from '../../infrastructure/storage/memory-stream-service.js';
|
|
7
|
+
import type { IAgent } from '../../domain/interfaces/agent.interface.js';
|
|
8
|
+
import type { DocumentationRequest, DocumentationResponse } from '../../domain/entities/documentation.js';
|
|
9
|
+
export declare class DocumentationAgent implements IAgent<DocumentationRequest, DocumentationResponse> {
|
|
10
|
+
private aiService;
|
|
11
|
+
private memoryStream?;
|
|
12
|
+
private cwd;
|
|
13
|
+
name: string;
|
|
14
|
+
type: "non-engineering";
|
|
15
|
+
constructor(aiService: IAIService, memoryStream?: MemoryStreamService | undefined, cwd?: string);
|
|
16
|
+
execute(request: DocumentationRequest): Promise<DocumentationResponse>;
|
|
17
|
+
private generateREADME;
|
|
18
|
+
private generateAPIDocs;
|
|
19
|
+
private analyzeFolderStructure;
|
|
20
|
+
private findSourceFiles;
|
|
21
|
+
private buildReadmePrompt;
|
|
22
|
+
private buildAPIDocsContent;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=documentation-agent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documentation-agent.d.ts","sourceRoot":"","sources":["../../../src/application/agents/documentation-agent.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;AAClF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uDAAuD,CAAC;AACjG,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4CAA4C,CAAC;AACzE,OAAO,KAAK,EACV,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,wCAAwC,CAAC;AAOhD,qBAAa,kBAAmB,YAAW,MAAM,CAAC,oBAAoB,EAAE,qBAAqB,CAAC;IAK1F,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,YAAY,CAAC;IACrB,OAAO,CAAC,GAAG;IANb,IAAI,SAAyB;IAC7B,IAAI,EAAG,iBAAiB,CAAU;gBAGxB,SAAS,EAAE,UAAU,EACrB,YAAY,CAAC,EAAE,mBAAmB,YAAA,EAClC,GAAG,GAAE,MAAsB;IAG/B,OAAO,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC;YAuD9D,cAAc;YA2Gd,eAAe;IAgG7B,OAAO,CAAC,sBAAsB;IAwC9B,OAAO,CAAC,eAAe;IA8BvB,OAAO,CAAC,iBAAiB;YA2BX,mBAAmB;CA6DlC"}
|