takt 0.44.0 → 0.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/builtins/en/config.yaml +9 -0
- package/builtins/en/facets/instructions/implement-maintenance.md +2 -0
- package/builtins/en/facets/instructions/implement.md +3 -2
- package/builtins/en/facets/instructions/review-arch.md +1 -1
- package/builtins/en/facets/instructions/review-coding.md +4 -3
- package/builtins/en/facets/instructions/review-cqrs-es.md +1 -1
- package/builtins/en/facets/instructions/review-pure.md +1 -0
- package/builtins/en/facets/instructions/review-qa.md +1 -0
- package/builtins/en/facets/instructions/review-terraform.md +1 -1
- package/builtins/en/facets/instructions/review-test.md +2 -0
- package/builtins/en/facets/instructions/supervise-maintenance.md +7 -5
- package/builtins/en/facets/instructions/supervise.md +11 -4
- package/builtins/en/facets/instructions/write-tests-maintenance.md +1 -0
- package/builtins/en/facets/knowledge/e2e-testing.md +11 -1
- package/builtins/en/facets/knowledge/unit-testing.md +11 -0
- package/builtins/en/facets/output-contracts/maintenance-scope.md +5 -0
- package/builtins/en/facets/output-contracts/pure-review.md +61 -0
- package/builtins/en/facets/output-contracts/qa-review.md +5 -0
- package/builtins/en/facets/output-contracts/supervisor-validation.md +1 -1
- package/builtins/en/facets/output-contracts/testing-review.md +6 -1
- package/builtins/en/facets/personas/ai-antipattern-reviewer.md +2 -2
- package/builtins/en/facets/personas/architecture-reviewer.md +1 -1
- package/builtins/en/facets/personas/pr-commenter.md +2 -2
- package/builtins/en/facets/personas/pure-reviewer.md +22 -0
- package/builtins/en/facets/personas/supervisor.md +1 -1
- package/builtins/en/facets/personas/terraform-reviewer.md +3 -3
- package/builtins/en/facets/policies/ai-antipattern.md +2 -0
- package/builtins/en/facets/policies/coding.md +36 -0
- package/builtins/en/facets/policies/review.md +26 -1
- package/builtins/en/facets/policies/testing.md +25 -0
- package/builtins/en/workflows/backend-cqrs.yaml +21 -0
- package/builtins/en/workflows/backend.yaml +21 -0
- package/builtins/en/workflows/default-high.yaml +1 -1
- package/builtins/en/workflows/default-peer-review.yaml +24 -3
- package/builtins/en/workflows/draft.yaml +4 -32
- package/builtins/en/workflows/dual-cqrs.yaml +21 -0
- package/builtins/en/workflows/dual.yaml +5 -5
- package/builtins/en/workflows/frontend-maintenance.yaml +21 -0
- package/builtins/en/workflows/frontend.yaml +21 -0
- package/builtins/en/workflows/peer-review.yaml +13 -70
- package/builtins/en/workflows/provider-options/edit.yaml +21 -0
- package/builtins/en/workflows/provider-options/review-files.yaml +10 -0
- package/builtins/en/workflows/provider-options/review-readonly.yaml +16 -0
- package/builtins/en/workflows/provider-options/review-web.yaml +14 -0
- package/builtins/en/workflows/review-backend-cqrs.yaml +21 -0
- package/builtins/en/workflows/review-backend.yaml +21 -0
- package/builtins/en/workflows/review-default.yaml +6 -6
- package/builtins/en/workflows/review-dual-cqrs.yaml +21 -0
- package/builtins/en/workflows/review-dual.yaml +21 -0
- package/builtins/en/workflows/review-fix-backend-cqrs.yaml +21 -0
- package/builtins/en/workflows/review-fix-backend.yaml +21 -0
- package/builtins/en/workflows/review-fix-default.yaml +6 -6
- package/builtins/en/workflows/review-fix-dual-cqrs.yaml +21 -0
- package/builtins/en/workflows/review-fix-dual.yaml +21 -0
- package/builtins/en/workflows/review-fix-frontend.yaml +21 -0
- package/builtins/en/workflows/review-fix-takt-default.yaml +5 -5
- package/builtins/en/workflows/review-frontend.yaml +21 -0
- package/builtins/en/workflows/review-takt-default.yaml +6 -6
- package/builtins/en/workflows/takt-default-refresh-all.yaml +6 -6
- package/builtins/en/workflows/takt-default-refresh-fast.yaml +5 -5
- package/builtins/en/workflows/takt-default.yaml +4 -27
- package/builtins/en/workflows/terraform.yaml +23 -2
- package/builtins/ja/config.yaml +9 -0
- package/builtins/ja/facets/instructions/implement-maintenance.md +2 -0
- package/builtins/ja/facets/instructions/implement.md +3 -2
- package/builtins/ja/facets/instructions/review-arch.md +1 -1
- package/builtins/ja/facets/instructions/review-coding.md +4 -3
- package/builtins/ja/facets/instructions/review-cqrs-es.md +1 -1
- package/builtins/ja/facets/instructions/review-pure.md +1 -0
- package/builtins/ja/facets/instructions/review-qa.md +1 -0
- package/builtins/ja/facets/instructions/review-terraform.md +1 -1
- package/builtins/ja/facets/instructions/review-test.md +2 -0
- package/builtins/ja/facets/instructions/supervise-maintenance.md +6 -4
- package/builtins/ja/facets/instructions/supervise.md +11 -4
- package/builtins/ja/facets/instructions/write-tests-maintenance.md +1 -0
- package/builtins/ja/facets/knowledge/e2e-testing.md +11 -1
- package/builtins/ja/facets/knowledge/unit-testing.md +11 -0
- package/builtins/ja/facets/output-contracts/maintenance-scope.md +5 -0
- package/builtins/ja/facets/output-contracts/pure-review.md +61 -0
- package/builtins/ja/facets/output-contracts/qa-review.md +5 -0
- package/builtins/ja/facets/output-contracts/supervisor-validation.md +1 -1
- package/builtins/ja/facets/output-contracts/testing-review.md +6 -1
- package/builtins/ja/facets/personas/ai-antipattern-reviewer.md +2 -2
- package/builtins/ja/facets/personas/architecture-reviewer.md +2 -2
- package/builtins/ja/facets/personas/pr-commenter.md +3 -3
- package/builtins/ja/facets/personas/pure-reviewer.md +22 -0
- package/builtins/ja/facets/personas/supervisor.md +1 -1
- package/builtins/ja/facets/personas/terraform-reviewer.md +3 -3
- package/builtins/ja/facets/policies/ai-antipattern.md +2 -0
- package/builtins/ja/facets/policies/coding.md +36 -0
- package/builtins/ja/facets/policies/review.md +26 -1
- package/builtins/ja/facets/policies/testing.md +25 -0
- package/builtins/ja/workflows/backend-cqrs.yaml +21 -0
- package/builtins/ja/workflows/backend.yaml +21 -0
- package/builtins/ja/workflows/default-high.yaml +1 -1
- package/builtins/ja/workflows/default-peer-review.yaml +24 -3
- package/builtins/ja/workflows/draft.yaml +4 -32
- package/builtins/ja/workflows/dual-cqrs.yaml +21 -0
- package/builtins/ja/workflows/dual.yaml +5 -5
- package/builtins/ja/workflows/frontend-maintenance.yaml +21 -0
- package/builtins/ja/workflows/frontend.yaml +21 -0
- package/builtins/ja/workflows/peer-review.yaml +13 -70
- package/builtins/ja/workflows/provider-options/edit.yaml +21 -0
- package/builtins/ja/workflows/provider-options/review-files.yaml +10 -0
- package/builtins/ja/workflows/provider-options/review-readonly.yaml +16 -0
- package/builtins/ja/workflows/provider-options/review-web.yaml +14 -0
- package/builtins/ja/workflows/review-backend-cqrs.yaml +21 -0
- package/builtins/ja/workflows/review-backend.yaml +21 -0
- package/builtins/ja/workflows/review-default.yaml +7 -7
- package/builtins/ja/workflows/review-dual-cqrs.yaml +21 -0
- package/builtins/ja/workflows/review-dual.yaml +21 -0
- package/builtins/ja/workflows/review-fix-backend-cqrs.yaml +21 -0
- package/builtins/ja/workflows/review-fix-backend.yaml +21 -0
- package/builtins/ja/workflows/review-fix-default.yaml +6 -6
- package/builtins/ja/workflows/review-fix-dual-cqrs.yaml +21 -0
- package/builtins/ja/workflows/review-fix-dual.yaml +21 -0
- package/builtins/ja/workflows/review-fix-frontend.yaml +21 -0
- package/builtins/ja/workflows/review-fix-takt-default.yaml +6 -6
- package/builtins/ja/workflows/review-frontend.yaml +21 -0
- package/builtins/ja/workflows/review-takt-default.yaml +7 -7
- package/builtins/ja/workflows/takt-default-refresh-all.yaml +6 -6
- package/builtins/ja/workflows/takt-default-refresh-fast.yaml +5 -5
- package/builtins/ja/workflows/takt-default.yaml +4 -27
- package/builtins/ja/workflows/terraform.yaml +22 -1
- package/dist/agents/decompose-task-usecase.d.ts +2 -1
- package/dist/agents/decompose-task-usecase.d.ts.map +1 -1
- package/dist/agents/decompose-task-usecase.js +7 -5
- package/dist/agents/decompose-task-usecase.js.map +1 -1
- package/dist/agents/judge-status-usecase.d.ts +21 -8
- package/dist/agents/judge-status-usecase.d.ts.map +1 -1
- package/dist/agents/judge-status-usecase.js +30 -13
- package/dist/agents/judge-status-usecase.js.map +1 -1
- package/dist/agents/runner-prompt.d.ts +3 -1
- package/dist/agents/runner-prompt.d.ts.map +1 -1
- package/dist/agents/runner-prompt.js +11 -4
- package/dist/agents/runner-prompt.js.map +1 -1
- package/dist/agents/runner.d.ts.map +1 -1
- package/dist/agents/runner.js +23 -5
- package/dist/agents/runner.js.map +1 -1
- package/dist/agents/structured-caller/capability-aware-structured-caller.d.ts +1 -1
- package/dist/agents/structured-caller/capability-aware-structured-caller.d.ts.map +1 -1
- package/dist/agents/structured-caller/capability-aware-structured-caller.js +3 -3
- package/dist/agents/structured-caller/capability-aware-structured-caller.js.map +1 -1
- package/dist/agents/structured-caller/contracts.d.ts +1 -1
- package/dist/agents/structured-caller/contracts.d.ts.map +1 -1
- package/dist/agents/structured-caller/default-structured-caller.d.ts +1 -1
- package/dist/agents/structured-caller/default-structured-caller.d.ts.map +1 -1
- package/dist/agents/structured-caller/default-structured-caller.js +2 -2
- package/dist/agents/structured-caller/default-structured-caller.js.map +1 -1
- package/dist/agents/structured-caller/prompt-based-structured-caller.d.ts +1 -1
- package/dist/agents/structured-caller/prompt-based-structured-caller.d.ts.map +1 -1
- package/dist/agents/structured-caller/prompt-based-structured-caller.js +16 -17
- package/dist/agents/structured-caller/prompt-based-structured-caller.js.map +1 -1
- package/dist/agents/team-leader-structured-output.d.ts +3 -3
- package/dist/agents/team-leader-structured-output.d.ts.map +1 -1
- package/dist/agents/team-leader-structured-output.js +14 -10
- package/dist/agents/team-leader-structured-output.js.map +1 -1
- package/dist/agents/types.d.ts +1 -0
- package/dist/agents/types.d.ts.map +1 -1
- package/dist/commands/analyze-usage.d.ts +26 -0
- package/dist/commands/analyze-usage.d.ts.map +1 -0
- package/dist/commands/analyze-usage.js +305 -0
- package/dist/commands/analyze-usage.js.map +1 -0
- package/dist/core/logging/contracts.d.ts +1 -0
- package/dist/core/logging/contracts.d.ts.map +1 -1
- package/dist/core/logging/contracts.js +1 -0
- package/dist/core/logging/contracts.js.map +1 -1
- package/dist/core/logging/phaseUsageEvent.d.ts +40 -0
- package/dist/core/logging/phaseUsageEvent.d.ts.map +1 -0
- package/dist/core/logging/phaseUsageEvent.js +195 -0
- package/dist/core/logging/phaseUsageEvent.js.map +1 -0
- package/dist/core/logging/providerEvent.d.ts +4 -0
- package/dist/core/logging/providerEvent.d.ts.map +1 -1
- package/dist/core/logging/providerEvent.js +31 -27
- package/dist/core/logging/providerEvent.js.map +1 -1
- package/dist/core/models/config-schemas.d.ts +16 -0
- package/dist/core/models/config-schemas.d.ts.map +1 -1
- package/dist/core/models/part.d.ts +2 -1
- package/dist/core/models/part.d.ts.map +1 -1
- package/dist/core/models/schema-base.d.ts +66 -0
- package/dist/core/models/schema-base.d.ts.map +1 -1
- package/dist/core/models/schema-base.js +7 -2
- package/dist/core/models/schema-base.js.map +1 -1
- package/dist/core/models/workflow-provider-options.d.ts +5 -0
- package/dist/core/models/workflow-provider-options.d.ts.map +1 -1
- package/dist/core/models/workflow-provider-options.js.map +1 -1
- package/dist/core/models/workflow-schemas.d.ts +165 -21
- package/dist/core/models/workflow-schemas.d.ts.map +1 -1
- package/dist/core/models/workflow-schemas.js +62 -18
- package/dist/core/models/workflow-schemas.js.map +1 -1
- package/dist/core/models/workflow-types.d.ts +1 -1
- package/dist/core/models/workflow-types.d.ts.map +1 -1
- package/dist/core/models/workflow-types.js.map +1 -1
- package/dist/core/workflow/arpeggio/types.d.ts +3 -0
- package/dist/core/workflow/arpeggio/types.d.ts.map +1 -1
- package/dist/core/workflow/engine/ArpeggioRunner.d.ts +2 -0
- package/dist/core/workflow/engine/ArpeggioRunner.d.ts.map +1 -1
- package/dist/core/workflow/engine/ArpeggioRunner.js +10 -0
- package/dist/core/workflow/engine/ArpeggioRunner.js.map +1 -1
- package/dist/core/workflow/engine/OptionsBuilder.d.ts.map +1 -1
- package/dist/core/workflow/engine/OptionsBuilder.js +2 -0
- package/dist/core/workflow/engine/OptionsBuilder.js.map +1 -1
- package/dist/core/workflow/engine/ParallelRunner.d.ts +1 -0
- package/dist/core/workflow/engine/ParallelRunner.d.ts.map +1 -1
- package/dist/core/workflow/engine/ParallelRunner.js +4 -0
- package/dist/core/workflow/engine/ParallelRunner.js.map +1 -1
- package/dist/core/workflow/engine/StepExecutor.d.ts.map +1 -1
- package/dist/core/workflow/engine/StepExecutor.js +2 -0
- package/dist/core/workflow/engine/StepExecutor.js.map +1 -1
- package/dist/core/workflow/engine/TeamLeaderRunner.d.ts.map +1 -1
- package/dist/core/workflow/engine/TeamLeaderRunner.js +9 -4
- package/dist/core/workflow/engine/TeamLeaderRunner.js.map +1 -1
- package/dist/core/workflow/engine/WorkflowEngineSetup.d.ts.map +1 -1
- package/dist/core/workflow/engine/WorkflowEngineSetup.js +2 -0
- package/dist/core/workflow/engine/WorkflowEngineSetup.js.map +1 -1
- package/dist/core/workflow/engine/WorkflowRunLoop.d.ts +1 -0
- package/dist/core/workflow/engine/WorkflowRunLoop.d.ts.map +1 -1
- package/dist/core/workflow/engine/WorkflowRunLoop.js +3 -0
- package/dist/core/workflow/engine/WorkflowRunLoop.js.map +1 -1
- package/dist/core/workflow/engine/engine-provider-options.d.ts.map +1 -1
- package/dist/core/workflow/engine/engine-provider-options.js +3 -3
- package/dist/core/workflow/engine/engine-provider-options.js.map +1 -1
- package/dist/core/workflow/engine/parallel-logger.d.ts +1 -1
- package/dist/core/workflow/engine/parallel-logger.d.ts.map +1 -1
- package/dist/core/workflow/engine/parallel-logger.js +3 -1
- package/dist/core/workflow/engine/parallel-logger.js.map +1 -1
- package/dist/core/workflow/engine/task-decomposer.d.ts +1 -1
- package/dist/core/workflow/engine/task-decomposer.d.ts.map +1 -1
- package/dist/core/workflow/engine/task-decomposer.js +3 -3
- package/dist/core/workflow/engine/task-decomposer.js.map +1 -1
- package/dist/core/workflow/engine/team-leader-budget-errors.d.ts +2 -0
- package/dist/core/workflow/engine/team-leader-budget-errors.d.ts.map +1 -0
- package/dist/core/workflow/engine/team-leader-budget-errors.js +12 -0
- package/dist/core/workflow/engine/team-leader-budget-errors.js.map +1 -0
- package/dist/core/workflow/engine/team-leader-execution.d.ts.map +1 -1
- package/dist/core/workflow/engine/team-leader-execution.js +16 -2
- package/dist/core/workflow/engine/team-leader-execution.js.map +1 -1
- package/dist/core/workflow/engine/team-leader-part-runner.d.ts.map +1 -1
- package/dist/core/workflow/engine/team-leader-part-runner.js +1 -0
- package/dist/core/workflow/engine/team-leader-part-runner.js.map +1 -1
- package/dist/core/workflow/evaluation/RuleEvaluator.d.ts +2 -0
- package/dist/core/workflow/evaluation/RuleEvaluator.d.ts.map +1 -1
- package/dist/core/workflow/evaluation/RuleEvaluator.js +1 -0
- package/dist/core/workflow/evaluation/RuleEvaluator.js.map +1 -1
- package/dist/core/workflow/observability/workflowSpans.d.ts +3 -0
- package/dist/core/workflow/observability/workflowSpans.d.ts.map +1 -1
- package/dist/core/workflow/observability/workflowSpans.js +61 -10
- package/dist/core/workflow/observability/workflowSpans.js.map +1 -1
- package/dist/core/workflow/phase-runner.d.ts +2 -0
- package/dist/core/workflow/phase-runner.d.ts.map +1 -1
- package/dist/core/workflow/phase-runner.js.map +1 -1
- package/dist/core/workflow/promotion/PromotionEvaluator.d.ts +2 -0
- package/dist/core/workflow/promotion/PromotionEvaluator.d.ts.map +1 -1
- package/dist/core/workflow/promotion/PromotionEvaluator.js +1 -0
- package/dist/core/workflow/promotion/PromotionEvaluator.js.map +1 -1
- package/dist/core/workflow/promotion/promotion-runtime.d.ts +2 -0
- package/dist/core/workflow/promotion/promotion-runtime.d.ts.map +1 -1
- package/dist/core/workflow/promotion/promotion-runtime.js +1 -0
- package/dist/core/workflow/promotion/promotion-runtime.js.map +1 -1
- package/dist/core/workflow/quality-gates/commandGateRunner.d.ts +1 -1
- package/dist/core/workflow/quality-gates/commandGateRunner.d.ts.map +1 -1
- package/dist/core/workflow/quality-gates/commandGateRunner.js +11 -6
- package/dist/core/workflow/quality-gates/commandGateRunner.js.map +1 -1
- package/dist/core/workflow/quality-gates/qualityGateRunner.d.ts +1 -1
- package/dist/core/workflow/quality-gates/qualityGateRunner.d.ts.map +1 -1
- package/dist/core/workflow/quality-gates/qualityGateRunner.js +2 -2
- package/dist/core/workflow/quality-gates/qualityGateRunner.js.map +1 -1
- package/dist/core/workflow/quality-gates/types.d.ts +2 -0
- package/dist/core/workflow/quality-gates/types.d.ts.map +1 -1
- package/dist/core/workflow/report-phase-runner.js +1 -0
- package/dist/core/workflow/report-phase-runner.js.map +1 -1
- package/dist/core/workflow/status-judgment-phase.d.ts.map +1 -1
- package/dist/core/workflow/status-judgment-phase.js +2 -0
- package/dist/core/workflow/status-judgment-phase.js.map +1 -1
- package/dist/core/workflow/types.d.ts +4 -0
- package/dist/core/workflow/types.d.ts.map +1 -1
- package/dist/features/interactive/aiCaller.d.ts +6 -1
- package/dist/features/interactive/aiCaller.d.ts.map +1 -1
- package/dist/features/interactive/aiCaller.js +14 -5
- package/dist/features/interactive/aiCaller.js.map +1 -1
- package/dist/features/interactive/clipboardImage.d.ts +3 -0
- package/dist/features/interactive/clipboardImage.d.ts.map +1 -0
- package/dist/features/interactive/clipboardImage.js +91 -0
- package/dist/features/interactive/clipboardImage.js.map +1 -0
- package/dist/features/interactive/clipboardImageFeedback.d.ts +2 -0
- package/dist/features/interactive/clipboardImageFeedback.d.ts.map +1 -0
- package/dist/features/interactive/clipboardImageFeedback.js +6 -0
- package/dist/features/interactive/clipboardImageFeedback.js.map +1 -0
- package/dist/features/interactive/conversationLoop.d.ts.map +1 -1
- package/dist/features/interactive/conversationLoop.js +8 -3
- package/dist/features/interactive/conversationLoop.js.map +1 -1
- package/dist/features/interactive/imageAttachments.d.ts +3 -0
- package/dist/features/interactive/imageAttachments.d.ts.map +1 -1
- package/dist/features/interactive/imageAttachments.js +18 -0
- package/dist/features/interactive/imageAttachments.js.map +1 -1
- package/dist/features/interactive/interactive.d.ts +1 -0
- package/dist/features/interactive/interactive.d.ts.map +1 -1
- package/dist/features/interactive/interactive.js.map +1 -1
- package/dist/features/interactive/interactiveInput.d.ts.map +1 -1
- package/dist/features/interactive/interactiveInput.js +4 -1
- package/dist/features/interactive/interactiveInput.js.map +1 -1
- package/dist/features/interactive/lineEditor.d.ts +18 -14
- package/dist/features/interactive/lineEditor.d.ts.map +1 -1
- package/dist/features/interactive/lineEditor.js +174 -80
- package/dist/features/interactive/lineEditor.js.map +1 -1
- package/dist/features/interactive/passthroughMode.d.ts.map +1 -1
- package/dist/features/interactive/passthroughMode.js +4 -1
- package/dist/features/interactive/passthroughMode.js.map +1 -1
- package/dist/features/interactive/quietMode.d.ts.map +1 -1
- package/dist/features/interactive/quietMode.js +5 -2
- package/dist/features/interactive/quietMode.js.map +1 -1
- package/dist/features/interactive/slashCommandRegistry.d.ts.map +1 -1
- package/dist/features/interactive/slashCommandRegistry.js +1 -0
- package/dist/features/interactive/slashCommandRegistry.js.map +1 -1
- package/dist/features/tasks/attachments.d.ts.map +1 -1
- package/dist/features/tasks/attachments.js +18 -1
- package/dist/features/tasks/attachments.js.map +1 -1
- package/dist/features/tasks/execute/runAllTasks.js +3 -3
- package/dist/features/tasks/execute/runAllTasks.js.map +1 -1
- package/dist/features/tasks/execute/selectAndExecute.d.ts.map +1 -1
- package/dist/features/tasks/execute/selectAndExecute.js +1 -2
- package/dist/features/tasks/execute/selectAndExecute.js.map +1 -1
- package/dist/features/tasks/execute/taskSpecContext.d.ts +1 -0
- package/dist/features/tasks/execute/taskSpecContext.d.ts.map +1 -1
- package/dist/features/tasks/execute/taskSpecContext.js +25 -1
- package/dist/features/tasks/execute/taskSpecContext.js.map +1 -1
- package/dist/features/tasks/execute/workflowExecution.d.ts.map +1 -1
- package/dist/features/tasks/execute/workflowExecution.js +30 -0
- package/dist/features/tasks/execute/workflowExecution.js.map +1 -1
- package/dist/features/tasks/execute/workflowExecutionBootstrap.d.ts.map +1 -1
- package/dist/features/tasks/execute/workflowExecutionBootstrap.js +13 -1
- package/dist/features/tasks/execute/workflowExecutionBootstrap.js.map +1 -1
- package/dist/features/tasks/execute/workflowExecutionEvents.d.ts.map +1 -1
- package/dist/features/tasks/execute/workflowExecutionEvents.js +6 -0
- package/dist/features/tasks/execute/workflowExecutionEvents.js.map +1 -1
- package/dist/features/tasks/watch/index.js +3 -3
- package/dist/features/tasks/watch/index.js.map +1 -1
- package/dist/infra/claude/client.d.ts.map +1 -1
- package/dist/infra/claude/client.js +2 -0
- package/dist/infra/claude/client.js.map +1 -1
- package/dist/infra/claude/executor.d.ts.map +1 -1
- package/dist/infra/claude/executor.js +5 -35
- package/dist/infra/claude/executor.js.map +1 -1
- package/dist/infra/claude/image-input.d.ts +4 -0
- package/dist/infra/claude/image-input.d.ts.map +1 -0
- package/dist/infra/claude/image-input.js +63 -0
- package/dist/infra/claude/image-input.js.map +1 -0
- package/dist/infra/claude/options-builder.d.ts.map +1 -1
- package/dist/infra/claude/options-builder.js +2 -3
- package/dist/infra/claude/options-builder.js.map +1 -1
- package/dist/infra/claude/types.d.ts +5 -0
- package/dist/infra/claude/types.d.ts.map +1 -1
- package/dist/infra/claude/usage.d.ts +3 -0
- package/dist/infra/claude/usage.d.ts.map +1 -0
- package/dist/infra/claude/usage.js +45 -0
- package/dist/infra/claude/usage.js.map +1 -0
- package/dist/infra/claude-headless/headless-spawn.d.ts.map +1 -1
- package/dist/infra/claude-headless/headless-spawn.js +2 -1
- package/dist/infra/claude-headless/headless-spawn.js.map +1 -1
- package/dist/infra/claude-headless/result-response.d.ts.map +1 -1
- package/dist/infra/claude-headless/result-response.js +1 -0
- package/dist/infra/claude-headless/result-response.js.map +1 -1
- package/dist/infra/claude-headless/stream-json-lines.d.ts +2 -0
- package/dist/infra/claude-headless/stream-json-lines.d.ts.map +1 -1
- package/dist/infra/claude-headless/stream-json-lines.js +4 -0
- package/dist/infra/claude-headless/stream-json-lines.js.map +1 -1
- package/dist/infra/claude-headless/types.d.ts +1 -0
- package/dist/infra/claude-headless/types.d.ts.map +1 -1
- package/dist/infra/claude-terminal/client.d.ts.map +1 -1
- package/dist/infra/claude-terminal/client.js +1 -0
- package/dist/infra/claude-terminal/client.js.map +1 -1
- package/dist/infra/claude-terminal/response-normalizer.js.map +1 -1
- package/dist/infra/claude-terminal/tmux-backend.d.ts.map +1 -1
- package/dist/infra/claude-terminal/tmux-backend.js +15 -1
- package/dist/infra/claude-terminal/tmux-backend.js.map +1 -1
- package/dist/infra/claude-terminal/types.d.ts +2 -0
- package/dist/infra/claude-terminal/types.d.ts.map +1 -1
- package/dist/infra/codex/client.d.ts.map +1 -1
- package/dist/infra/codex/client.js +14 -2
- package/dist/infra/codex/client.js.map +1 -1
- package/dist/infra/codex/types.d.ts +3 -0
- package/dist/infra/codex/types.d.ts.map +1 -1
- package/dist/infra/codex/types.js.map +1 -1
- package/dist/infra/config/configNormalizers.d.ts.map +1 -1
- package/dist/infra/config/configNormalizers.js +9 -1
- package/dist/infra/config/configNormalizers.js.map +1 -1
- package/dist/infra/config/loaders/workflowDiscovery.js +1 -1
- package/dist/infra/config/loaders/workflowDiscovery.js.map +1 -1
- package/dist/infra/config/loaders/workflowLoopMonitorNormalizer.d.ts.map +1 -1
- package/dist/infra/config/loaders/workflowLoopMonitorNormalizer.js +1 -1
- package/dist/infra/config/loaders/workflowLoopMonitorNormalizer.js.map +1 -1
- package/dist/infra/config/loaders/workflowParser.d.ts.map +1 -1
- package/dist/infra/config/loaders/workflowParser.js +1 -1
- package/dist/infra/config/loaders/workflowParser.js.map +1 -1
- package/dist/infra/config/loaders/workflowProviderOptionsResolver.d.ts +7 -0
- package/dist/infra/config/loaders/workflowProviderOptionsResolver.d.ts.map +1 -0
- package/dist/infra/config/loaders/workflowProviderOptionsResolver.js +68 -0
- package/dist/infra/config/loaders/workflowProviderOptionsResolver.js.map +1 -0
- package/dist/infra/config/loaders/workflowStepFeaturesNormalizer.d.ts.map +1 -1
- package/dist/infra/config/loaders/workflowStepFeaturesNormalizer.js +5 -3
- package/dist/infra/config/loaders/workflowStepFeaturesNormalizer.js.map +1 -1
- package/dist/infra/config/loaders/workflowStepNormalizer.d.ts +1 -1
- package/dist/infra/config/loaders/workflowStepNormalizer.d.ts.map +1 -1
- package/dist/infra/config/loaders/workflowStepNormalizer.js +41 -10
- package/dist/infra/config/loaders/workflowStepNormalizer.js.map +1 -1
- package/dist/infra/config/providerOptions.d.ts +6 -1
- package/dist/infra/config/providerOptions.d.ts.map +1 -1
- package/dist/infra/config/providerOptions.js +31 -3
- package/dist/infra/config/providerOptions.js.map +1 -1
- package/dist/infra/config/providerOptionsContract.d.ts +3 -3
- package/dist/infra/config/providerOptionsContract.d.ts.map +1 -1
- package/dist/infra/config/providerOptionsContract.js +8 -0
- package/dist/infra/config/providerOptionsContract.js.map +1 -1
- package/dist/infra/copilot/client.d.ts.map +1 -1
- package/dist/infra/copilot/client.js +7 -8
- package/dist/infra/copilot/client.js.map +1 -1
- package/dist/infra/copilot/types.d.ts +1 -0
- package/dist/infra/copilot/types.d.ts.map +1 -1
- package/dist/infra/cursor/client.d.ts.map +1 -1
- package/dist/infra/cursor/client.js +7 -8
- package/dist/infra/cursor/client.js.map +1 -1
- package/dist/infra/cursor/types.d.ts +1 -0
- package/dist/infra/cursor/types.d.ts.map +1 -1
- package/dist/infra/fs/index.d.ts +1 -0
- package/dist/infra/fs/index.d.ts.map +1 -1
- package/dist/infra/fs/index.js +1 -0
- package/dist/infra/fs/index.js.map +1 -1
- package/dist/infra/fs/jsonl.d.ts +2 -0
- package/dist/infra/fs/jsonl.d.ts.map +1 -0
- package/dist/infra/fs/jsonl.js +5 -0
- package/dist/infra/fs/jsonl.js.map +1 -0
- package/dist/infra/kiro/client.d.ts.map +1 -1
- package/dist/infra/kiro/client.js +10 -0
- package/dist/infra/kiro/client.js.map +1 -1
- package/dist/infra/kiro/process.d.ts.map +1 -1
- package/dist/infra/kiro/process.js +4 -2
- package/dist/infra/kiro/process.js.map +1 -1
- package/dist/infra/kiro/types.d.ts +2 -0
- package/dist/infra/kiro/types.d.ts.map +1 -1
- package/dist/infra/observability/otelFoundation.d.ts +2 -0
- package/dist/infra/observability/otelFoundation.d.ts.map +1 -1
- package/dist/infra/observability/otelFoundation.js +138 -25
- package/dist/infra/observability/otelFoundation.js.map +1 -1
- package/dist/infra/observability/usageEventsSpanProcessor.d.ts +19 -0
- package/dist/infra/observability/usageEventsSpanProcessor.d.ts.map +1 -0
- package/dist/infra/observability/usageEventsSpanProcessor.js +77 -0
- package/dist/infra/observability/usageEventsSpanProcessor.js.map +1 -0
- package/dist/infra/opencode/OpenCodeStreamHandler.d.ts +19 -0
- package/dist/infra/opencode/OpenCodeStreamHandler.d.ts.map +1 -1
- package/dist/infra/opencode/OpenCodeStreamHandler.js +10 -0
- package/dist/infra/opencode/OpenCodeStreamHandler.js.map +1 -1
- package/dist/infra/opencode/allowedTools.d.ts +2 -0
- package/dist/infra/opencode/allowedTools.d.ts.map +1 -0
- package/dist/infra/opencode/allowedTools.js +10 -0
- package/dist/infra/opencode/allowedTools.js.map +1 -0
- package/dist/infra/opencode/client.d.ts +4 -2
- package/dist/infra/opencode/client.d.ts.map +1 -1
- package/dist/infra/opencode/client.js +283 -124
- package/dist/infra/opencode/client.js.map +1 -1
- package/dist/infra/opencode/index.d.ts +1 -1
- package/dist/infra/opencode/index.d.ts.map +1 -1
- package/dist/infra/opencode/index.js +1 -1
- package/dist/infra/opencode/index.js.map +1 -1
- package/dist/infra/opencode/types.d.ts +12 -10
- package/dist/infra/opencode/types.d.ts.map +1 -1
- package/dist/infra/opencode/types.js +109 -40
- package/dist/infra/opencode/types.js.map +1 -1
- package/dist/infra/providers/allowed-tool-edit-policy.d.ts +3 -0
- package/dist/infra/providers/allowed-tool-edit-policy.d.ts.map +1 -0
- package/dist/infra/providers/allowed-tool-edit-policy.js +10 -0
- package/dist/infra/providers/allowed-tool-edit-policy.js.map +1 -0
- package/dist/infra/providers/claude-headless.d.ts +3 -0
- package/dist/infra/providers/claude-headless.d.ts.map +1 -1
- package/dist/infra/providers/claude-headless.js +9 -0
- package/dist/infra/providers/claude-headless.js.map +1 -1
- package/dist/infra/providers/claude-terminal.d.ts +3 -0
- package/dist/infra/providers/claude-terminal.d.ts.map +1 -1
- package/dist/infra/providers/claude-terminal.js +9 -0
- package/dist/infra/providers/claude-terminal.js.map +1 -1
- package/dist/infra/providers/claude.d.ts +3 -0
- package/dist/infra/providers/claude.d.ts.map +1 -1
- package/dist/infra/providers/claude.js +10 -0
- package/dist/infra/providers/claude.js.map +1 -1
- package/dist/infra/providers/codex.d.ts +3 -0
- package/dist/infra/providers/codex.d.ts.map +1 -1
- package/dist/infra/providers/codex.js +9 -0
- package/dist/infra/providers/codex.js.map +1 -1
- package/dist/infra/providers/copilot.d.ts +3 -0
- package/dist/infra/providers/copilot.d.ts.map +1 -1
- package/dist/infra/providers/copilot.js +8 -0
- package/dist/infra/providers/copilot.js.map +1 -1
- package/dist/infra/providers/cursor.d.ts +3 -0
- package/dist/infra/providers/cursor.d.ts.map +1 -1
- package/dist/infra/providers/cursor.js +8 -0
- package/dist/infra/providers/cursor.js.map +1 -1
- package/dist/infra/providers/imageAttachmentPrompt.d.ts +4 -0
- package/dist/infra/providers/imageAttachmentPrompt.d.ts.map +1 -0
- package/dist/infra/providers/imageAttachmentPrompt.js +10 -0
- package/dist/infra/providers/imageAttachmentPrompt.js.map +1 -0
- package/dist/infra/providers/kiro.d.ts +3 -0
- package/dist/infra/providers/kiro.d.ts.map +1 -1
- package/dist/infra/providers/kiro.js +12 -0
- package/dist/infra/providers/kiro.js.map +1 -1
- package/dist/infra/providers/mock.d.ts +3 -0
- package/dist/infra/providers/mock.d.ts.map +1 -1
- package/dist/infra/providers/mock.js +8 -0
- package/dist/infra/providers/mock.js.map +1 -1
- package/dist/infra/providers/opencode.d.ts +4 -1
- package/dist/infra/providers/opencode.d.ts.map +1 -1
- package/dist/infra/providers/opencode.js +17 -3
- package/dist/infra/providers/opencode.js.map +1 -1
- package/dist/infra/providers/provider-capabilities.d.ts +3 -0
- package/dist/infra/providers/provider-capabilities.d.ts.map +1 -1
- package/dist/infra/providers/provider-capabilities.js +19 -1
- package/dist/infra/providers/provider-capabilities.js.map +1 -1
- package/dist/infra/providers/runtimeSystemPrompt.d.ts +2 -0
- package/dist/infra/providers/runtimeSystemPrompt.d.ts.map +1 -0
- package/dist/infra/providers/runtimeSystemPrompt.js +11 -0
- package/dist/infra/providers/runtimeSystemPrompt.js.map +1 -0
- package/dist/infra/providers/types.d.ts +9 -0
- package/dist/infra/providers/types.d.ts.map +1 -1
- package/dist/infra/rate-limit/detection.d.ts +1 -1
- package/dist/infra/rate-limit/detection.d.ts.map +1 -1
- package/dist/infra/rate-limit/detection.js +6 -7
- package/dist/infra/rate-limit/detection.js.map +1 -1
- package/dist/infra/resources/schema-loader.d.ts +1 -1
- package/dist/infra/resources/schema-loader.d.ts.map +1 -1
- package/dist/infra/resources/schema-loader.js +8 -4
- package/dist/infra/resources/schema-loader.js.map +1 -1
- package/dist/infra/service/runSyncConflictResolver.d.ts.map +1 -1
- package/dist/infra/service/runSyncConflictResolver.js +3 -1
- package/dist/infra/service/runSyncConflictResolver.js.map +1 -1
- package/dist/infra/task/clone-exec.d.ts +2 -0
- package/dist/infra/task/clone-exec.d.ts.map +1 -1
- package/dist/infra/task/clone-exec.js +29 -0
- package/dist/infra/task/clone-exec.js.map +1 -1
- package/dist/infra/task/clone.d.ts.map +1 -1
- package/dist/infra/task/clone.js +3 -1
- package/dist/infra/task/clone.js.map +1 -1
- package/dist/infra/task/runner.d.ts +1 -1
- package/dist/infra/task/runner.d.ts.map +1 -1
- package/dist/infra/task/runner.js +2 -2
- package/dist/infra/task/runner.js.map +1 -1
- package/dist/infra/task/summarize.d.ts.map +1 -1
- package/dist/infra/task/summarize.js +3 -1
- package/dist/infra/task/summarize.js.map +1 -1
- package/dist/infra/task/taskLifecycleService.d.ts +1 -2
- package/dist/infra/task/taskLifecycleService.d.ts.map +1 -1
- package/dist/infra/task/taskLifecycleService.js +13 -19
- package/dist/infra/task/taskLifecycleService.js.map +1 -1
- package/dist/infra/task/taskRecordMutations.d.ts +0 -1
- package/dist/infra/task/taskRecordMutations.d.ts.map +1 -1
- package/dist/infra/task/taskRecordMutations.js +0 -12
- package/dist/infra/task/taskRecordMutations.js.map +1 -1
- package/dist/shared/constants.d.ts +3 -0
- package/dist/shared/constants.d.ts.map +1 -1
- package/dist/shared/constants.js +3 -0
- package/dist/shared/constants.js.map +1 -1
- package/dist/shared/i18n/labels_en.yaml +3 -1
- package/dist/shared/i18n/labels_ja.yaml +3 -1
- package/dist/shared/prompts/en/perform_agent_system_prompt.md +9 -1
- package/dist/shared/prompts/en/provider_runtime_system_prompt.md +18 -0
- package/dist/shared/prompts/index.d.ts +1 -1
- package/dist/shared/prompts/index.d.ts.map +1 -1
- package/dist/shared/prompts/index.js +7 -1
- package/dist/shared/prompts/index.js.map +1 -1
- package/dist/shared/prompts/ja/perform_agent_system_prompt.md +9 -1
- package/dist/shared/prompts/ja/provider_runtime_system_prompt.md +18 -0
- package/dist/shared/telemetry/childProcessEnv.d.ts +7 -0
- package/dist/shared/telemetry/childProcessEnv.d.ts.map +1 -0
- package/dist/shared/telemetry/childProcessEnv.js +176 -0
- package/dist/shared/telemetry/childProcessEnv.js.map +1 -0
- package/dist/shared/telemetry/index.d.ts +3 -0
- package/dist/shared/telemetry/index.d.ts.map +1 -0
- package/dist/shared/telemetry/index.js +3 -0
- package/dist/shared/telemetry/index.js.map +1 -0
- package/dist/shared/telemetry/otlp.d.ts +40 -0
- package/dist/shared/telemetry/otlp.d.ts.map +1 -0
- package/dist/shared/telemetry/otlp.js +72 -0
- package/dist/shared/telemetry/otlp.js.map +1 -0
- package/dist/shared/types/provider.d.ts +28 -1
- package/dist/shared/types/provider.d.ts.map +1 -1
- package/dist/shared/types/provider.js +15 -1
- package/dist/shared/types/provider.js.map +1 -1
- package/dist/shared/ui/StreamDisplay.d.ts.map +1 -1
- package/dist/shared/ui/StreamDisplay.js +1 -0
- package/dist/shared/ui/StreamDisplay.js.map +1 -1
- package/package.json +8 -4
- package/builtins/en/facets/instructions/review-requirements.md +0 -17
- package/builtins/en/facets/output-contracts/requirements-review.md +0 -56
- package/builtins/en/facets/personas/requirements-reviewer.md +0 -33
- package/builtins/ja/facets/instructions/review-requirements.md +0 -17
- package/builtins/ja/facets/output-contracts/requirements-review.md +0 -56
- package/builtins/ja/facets/personas/requirements-reviewer.md +0 -33
|
@@ -141,6 +141,27 @@ steps:
|
|
|
141
141
|
- condition: approved
|
|
142
142
|
- condition: needs_fix
|
|
143
143
|
|
|
144
|
+
- name: pure-review
|
|
145
|
+
edit: false
|
|
146
|
+
persona: pure-reviewer
|
|
147
|
+
policy: review
|
|
148
|
+
provider_options:
|
|
149
|
+
claude:
|
|
150
|
+
allowed_tools:
|
|
151
|
+
- Read
|
|
152
|
+
- Glob
|
|
153
|
+
- Grep
|
|
154
|
+
- Bash
|
|
155
|
+
- WebSearch
|
|
156
|
+
- WebFetch
|
|
157
|
+
rules:
|
|
158
|
+
- condition: approved
|
|
159
|
+
- condition: needs_fix
|
|
160
|
+
instruction: review-pure
|
|
161
|
+
output_contracts:
|
|
162
|
+
report:
|
|
163
|
+
- name: pure-review.md
|
|
164
|
+
format: pure-review
|
|
144
165
|
- name: coding-review
|
|
145
166
|
edit: false
|
|
146
167
|
persona: coding-reviewer
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
name: review-fix-takt-default
|
|
2
|
-
description: TAKT開発向け多角レビュー+修正ループ(初回7並列レビュー(コーディングレビュー含む)、修正後はAI
|
|
2
|
+
description: TAKT開発向け多角レビュー+修正ループ(初回7並列レビュー(コーディングレビュー含む)、修正後はAIアンチパターン事前レビュー+並列レビュー、監督者指摘の再修正)
|
|
3
3
|
workflow_config:
|
|
4
4
|
provider_options:
|
|
5
5
|
codex:
|
|
@@ -187,9 +187,9 @@ steps:
|
|
|
187
187
|
- condition: approved
|
|
188
188
|
- condition: needs_fix
|
|
189
189
|
|
|
190
|
-
- name:
|
|
190
|
+
- name: pure-review
|
|
191
191
|
edit: false
|
|
192
|
-
persona:
|
|
192
|
+
persona: pure-reviewer
|
|
193
193
|
policy: review
|
|
194
194
|
provider_options:
|
|
195
195
|
claude:
|
|
@@ -200,11 +200,11 @@ steps:
|
|
|
200
200
|
- Bash
|
|
201
201
|
- WebSearch
|
|
202
202
|
- WebFetch
|
|
203
|
-
instruction: review-
|
|
203
|
+
instruction: review-pure
|
|
204
204
|
output_contracts:
|
|
205
205
|
report:
|
|
206
|
-
- name:
|
|
207
|
-
format:
|
|
206
|
+
- name: pure-review.md
|
|
207
|
+
format: pure-review
|
|
208
208
|
rules:
|
|
209
209
|
- condition: approved
|
|
210
210
|
- condition: needs_fix
|
|
@@ -128,6 +128,27 @@ steps:
|
|
|
128
128
|
- condition: approved
|
|
129
129
|
- condition: needs_fix
|
|
130
130
|
|
|
131
|
+
- name: pure-review
|
|
132
|
+
edit: false
|
|
133
|
+
persona: pure-reviewer
|
|
134
|
+
policy: review
|
|
135
|
+
provider_options:
|
|
136
|
+
claude:
|
|
137
|
+
allowed_tools:
|
|
138
|
+
- Read
|
|
139
|
+
- Glob
|
|
140
|
+
- Grep
|
|
141
|
+
- Bash
|
|
142
|
+
- WebSearch
|
|
143
|
+
- WebFetch
|
|
144
|
+
rules:
|
|
145
|
+
- condition: approved
|
|
146
|
+
- condition: needs_fix
|
|
147
|
+
instruction: review-pure
|
|
148
|
+
output_contracts:
|
|
149
|
+
report:
|
|
150
|
+
- name: pure-review.md
|
|
151
|
+
format: pure-review
|
|
131
152
|
- name: coding-review
|
|
132
153
|
edit: false
|
|
133
154
|
persona: coding-reviewer
|
|
@@ -162,9 +162,9 @@ steps:
|
|
|
162
162
|
- condition: approved
|
|
163
163
|
- condition: needs_fix
|
|
164
164
|
|
|
165
|
-
- name:
|
|
165
|
+
- name: pure-review
|
|
166
166
|
edit: false
|
|
167
|
-
persona:
|
|
167
|
+
persona: pure-reviewer
|
|
168
168
|
policy: review
|
|
169
169
|
provider_options:
|
|
170
170
|
claude:
|
|
@@ -175,11 +175,11 @@ steps:
|
|
|
175
175
|
- Bash
|
|
176
176
|
- WebSearch
|
|
177
177
|
- WebFetch
|
|
178
|
-
instruction: review-
|
|
178
|
+
instruction: review-pure
|
|
179
179
|
output_contracts:
|
|
180
180
|
report:
|
|
181
|
-
- name:
|
|
182
|
-
format:
|
|
181
|
+
- name: pure-review.md
|
|
182
|
+
format: pure-review
|
|
183
183
|
rules:
|
|
184
184
|
- condition: approved
|
|
185
185
|
- condition: needs_fix
|
|
@@ -243,7 +243,7 @@ steps:
|
|
|
243
243
|
- `03-qa-review.md`(QAレビュー)
|
|
244
244
|
- `04-testing-review.md`(テストレビュー)
|
|
245
245
|
- `05-ai-antipattern-review.md`(AIアンチパターンレビュー)
|
|
246
|
-
- `06-
|
|
246
|
+
- `06-pure-review.md`(Pure Review)
|
|
247
247
|
- `07-coding-review.md`(コーディングレビュー)
|
|
248
248
|
2. 7つのレビュー結果を統合
|
|
249
249
|
3. 統合レビューサマリーと総合判定を作成
|
|
@@ -267,7 +267,7 @@ steps:
|
|
|
267
267
|
| QA | APPROVE/REJECT | {概要} |
|
|
268
268
|
| テスト | APPROVE/REJECT | {概要} |
|
|
269
269
|
| AIアンチパターン | APPROVE/REJECT | {概要} |
|
|
270
|
-
|
|
|
270
|
+
| Pure Review | APPROVE/REJECT | {概要} |
|
|
271
271
|
| コーディング | APPROVE/REJECT | {概要} |
|
|
272
272
|
|
|
273
273
|
## 今回の指摘(new)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
name: takt-default-refresh-all
|
|
2
|
-
description: "TAKT開発ワークフロー(全ステップ session refresh 比較版: 計画 → テスト作成 → チームリーダー実装 → AIアンチパターンレビュー →
|
|
2
|
+
description: "TAKT開発ワークフロー(全ステップ session refresh 比較版: 計画 → テスト作成 → チームリーダー実装 → AIアンチパターンレビュー → 並列レビュー → 修正 → 監督 → 完了)"
|
|
3
3
|
workflow_config:
|
|
4
4
|
provider_options:
|
|
5
5
|
codex:
|
|
@@ -333,9 +333,9 @@ steps:
|
|
|
333
333
|
report:
|
|
334
334
|
- name: testing-review.md
|
|
335
335
|
format: testing-review
|
|
336
|
-
- name:
|
|
336
|
+
- name: pure-review
|
|
337
337
|
edit: false
|
|
338
|
-
persona:
|
|
338
|
+
persona: pure-reviewer
|
|
339
339
|
session: refresh
|
|
340
340
|
policy: review
|
|
341
341
|
provider_options:
|
|
@@ -350,11 +350,11 @@ steps:
|
|
|
350
350
|
rules:
|
|
351
351
|
- condition: approved
|
|
352
352
|
- condition: needs_fix
|
|
353
|
-
instruction: review-
|
|
353
|
+
instruction: review-pure
|
|
354
354
|
output_contracts:
|
|
355
355
|
report:
|
|
356
|
-
- name:
|
|
357
|
-
format:
|
|
356
|
+
- name: pure-review.md
|
|
357
|
+
format: pure-review
|
|
358
358
|
- name: ai-antipattern-review-2nd
|
|
359
359
|
edit: false
|
|
360
360
|
persona: ai-antipattern-reviewer
|
|
@@ -331,9 +331,9 @@ steps:
|
|
|
331
331
|
report:
|
|
332
332
|
- name: testing-review.md
|
|
333
333
|
format: testing-review
|
|
334
|
-
- name:
|
|
334
|
+
- name: pure-review
|
|
335
335
|
edit: false
|
|
336
|
-
persona:
|
|
336
|
+
persona: pure-reviewer
|
|
337
337
|
session: refresh
|
|
338
338
|
policy: review
|
|
339
339
|
provider_options:
|
|
@@ -348,11 +348,11 @@ steps:
|
|
|
348
348
|
rules:
|
|
349
349
|
- condition: approved
|
|
350
350
|
- condition: needs_fix
|
|
351
|
-
instruction: review-
|
|
351
|
+
instruction: review-pure
|
|
352
352
|
output_contracts:
|
|
353
353
|
report:
|
|
354
|
-
- name:
|
|
355
|
-
format:
|
|
354
|
+
- name: pure-review.md
|
|
355
|
+
format: pure-review
|
|
356
356
|
- name: ai-antipattern-review-2nd
|
|
357
357
|
edit: false
|
|
358
358
|
persona: ai-antipattern-reviewer
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
name: takt-default
|
|
2
|
-
description: TAKT開発ワークフロー(計画 → テスト作成 → draft(実装+AI自己レビュー) → peer-review
|
|
2
|
+
description: TAKT開発ワークフロー(計画 → テスト作成 → draft(実装+AI自己レビュー) → peer-review(並列レビュー+修正) → 監督 → 完了)
|
|
3
3
|
workflow_config:
|
|
4
4
|
provider_options:
|
|
5
5
|
codex:
|
|
@@ -14,14 +14,7 @@ steps:
|
|
|
14
14
|
persona: planner
|
|
15
15
|
knowledge: architecture
|
|
16
16
|
provider_options:
|
|
17
|
-
|
|
18
|
-
allowed_tools:
|
|
19
|
-
- Read
|
|
20
|
-
- Glob
|
|
21
|
-
- Grep
|
|
22
|
-
- Bash
|
|
23
|
-
- WebSearch
|
|
24
|
-
- WebFetch
|
|
17
|
+
$ref: provider-options/review-readonly.yaml
|
|
25
18
|
rules:
|
|
26
19
|
- condition: 要件が明確で実装可能
|
|
27
20
|
next: write_tests
|
|
@@ -50,16 +43,7 @@ steps:
|
|
|
50
43
|
- unit-testing
|
|
51
44
|
- e2e-testing
|
|
52
45
|
provider_options:
|
|
53
|
-
|
|
54
|
-
allowed_tools:
|
|
55
|
-
- Read
|
|
56
|
-
- Glob
|
|
57
|
-
- Grep
|
|
58
|
-
- Edit
|
|
59
|
-
- Write
|
|
60
|
-
- Bash
|
|
61
|
-
- WebSearch
|
|
62
|
-
- WebFetch
|
|
46
|
+
$ref: provider-options/edit.yaml
|
|
63
47
|
required_permission_mode: edit
|
|
64
48
|
instruction: write-tests-first
|
|
65
49
|
rules:
|
|
@@ -103,14 +87,7 @@ steps:
|
|
|
103
87
|
policy: review
|
|
104
88
|
knowledge: architecture
|
|
105
89
|
provider_options:
|
|
106
|
-
|
|
107
|
-
allowed_tools:
|
|
108
|
-
- Read
|
|
109
|
-
- Glob
|
|
110
|
-
- Grep
|
|
111
|
-
- Bash
|
|
112
|
-
- WebSearch
|
|
113
|
-
- WebFetch
|
|
90
|
+
$ref: provider-options/review-readonly.yaml
|
|
114
91
|
pass_previous_response: false
|
|
115
92
|
rules:
|
|
116
93
|
- condition: すべて問題なし
|
|
@@ -119,6 +119,27 @@ steps:
|
|
|
119
119
|
report:
|
|
120
120
|
- name: ai-antipattern-review.md
|
|
121
121
|
format: ai-antipattern-review
|
|
122
|
+
- name: pure-review
|
|
123
|
+
edit: false
|
|
124
|
+
persona: pure-reviewer
|
|
125
|
+
policy: review
|
|
126
|
+
provider_options:
|
|
127
|
+
claude:
|
|
128
|
+
allowed_tools:
|
|
129
|
+
- Read
|
|
130
|
+
- Glob
|
|
131
|
+
- Grep
|
|
132
|
+
- Bash
|
|
133
|
+
- WebSearch
|
|
134
|
+
- WebFetch
|
|
135
|
+
rules:
|
|
136
|
+
- condition: approved
|
|
137
|
+
- condition: needs_fix
|
|
138
|
+
instruction: review-pure
|
|
139
|
+
output_contracts:
|
|
140
|
+
report:
|
|
141
|
+
- name: pure-review.md
|
|
142
|
+
format: pure-review
|
|
122
143
|
- name: coding-review
|
|
123
144
|
edit: false
|
|
124
145
|
persona: coding-reviewer
|
|
@@ -161,7 +182,7 @@ steps:
|
|
|
161
182
|
- WebFetch
|
|
162
183
|
instruction: supervise
|
|
163
184
|
rules:
|
|
164
|
-
- condition:
|
|
185
|
+
- condition: レビュアー全員承認かつマージ可能な品質
|
|
165
186
|
next: COMPLETE
|
|
166
187
|
- condition: AI特有の問題のみ要修正
|
|
167
188
|
next: ai-antipattern-fix
|
|
@@ -12,6 +12,7 @@ export interface DecomposeTaskOptions {
|
|
|
12
12
|
resolvedProvider?: ProviderType;
|
|
13
13
|
onStream?: StreamCallback;
|
|
14
14
|
workflowMeta?: RunAgentOptions['workflowMeta'];
|
|
15
|
+
childProcessEnv?: RunAgentOptions['childProcessEnv'];
|
|
15
16
|
onPromptResolved?: (promptParts: {
|
|
16
17
|
systemPrompt: string;
|
|
17
18
|
userInstruction: string;
|
|
@@ -23,7 +24,7 @@ export interface MorePartsResponse {
|
|
|
23
24
|
parts: PartDefinition[];
|
|
24
25
|
}
|
|
25
26
|
export declare const TEAM_LEADER_MAX_TURNS = 5;
|
|
26
|
-
export declare function decomposeTask(instruction: string,
|
|
27
|
+
export declare function decomposeTask(instruction: string, maxTotalParts: number, options: DecomposeTaskOptions): Promise<PartDefinition[]>;
|
|
27
28
|
export declare function requestMoreParts(originalInstruction: string, allResults: Array<{
|
|
28
29
|
id: string;
|
|
29
30
|
title: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decompose-task-usecase.d.ts","sourceRoot":"","sources":["../../src/agents/decompose-task-usecase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAY,KAAK,eAAe,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAWlF,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,YAAY,CAAC;IAChC,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,YAAY,CAAC,EAAE,eAAe,CAAC,cAAc,CAAC,CAAC;IAC/C,gBAAgB,CAAC,EAAE,CAAC,WAAW,EAAE;QAC/B,YAAY,EAAE,MAAM,CAAC;QACrB,eAAe,EAAE,MAAM,CAAC;KACzB,KAAK,IAAI,CAAC;CACZ;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,cAAc,EAAE,CAAC;CACzB;AAED,eAAO,MAAM,qBAAqB,IAAI,CAAC;AAEvC,wBAAsB,aAAa,CACjC,WAAW,EAAE,MAAM,EACnB,
|
|
1
|
+
{"version":3,"file":"decompose-task-usecase.d.ts","sourceRoot":"","sources":["../../src/agents/decompose-task-usecase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAA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AM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,EACjF,WAAW,EAAE,MAAM,EAAE,EACrB,kBAAkB,EAAE,MAAM,EAC1B,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,iBAAiB,CAAC,CAgC5B"}
|
|
@@ -4,8 +4,8 @@ import { loadDecompositionSchema, loadMorePartsSchema } from '../infra/resources
|
|
|
4
4
|
import { buildMaxTurnsOption } from './provider-call-options.js';
|
|
5
5
|
import { buildDecomposePrompt, buildMorePartsPrompt, toMorePartsResponse, toPartDefinitions, } from './team-leader-structured-output.js';
|
|
6
6
|
export const TEAM_LEADER_MAX_TURNS = 5;
|
|
7
|
-
export async function decomposeTask(instruction,
|
|
8
|
-
const response = await runAgent(options.persona, buildDecomposePrompt(instruction,
|
|
7
|
+
export async function decomposeTask(instruction, maxTotalParts, options) {
|
|
8
|
+
const response = await runAgent(options.persona, buildDecomposePrompt(instruction, maxTotalParts, options.language), {
|
|
9
9
|
cwd: options.cwd,
|
|
10
10
|
personaPath: options.personaPath,
|
|
11
11
|
language: options.language,
|
|
@@ -16,9 +16,10 @@ export async function decomposeTask(instruction, maxParts, options) {
|
|
|
16
16
|
allowedTools: [],
|
|
17
17
|
permissionMode: 'readonly',
|
|
18
18
|
...buildMaxTurnsOption(options.provider, options.resolvedProvider, TEAM_LEADER_MAX_TURNS),
|
|
19
|
-
outputSchema: loadDecompositionSchema(
|
|
19
|
+
outputSchema: loadDecompositionSchema(maxTotalParts),
|
|
20
20
|
onStream: options.onStream,
|
|
21
21
|
workflowMeta: options.workflowMeta,
|
|
22
|
+
childProcessEnv: options.childProcessEnv,
|
|
22
23
|
onPromptResolved: options.onPromptResolved,
|
|
23
24
|
});
|
|
24
25
|
if (response.status !== 'done') {
|
|
@@ -27,9 +28,9 @@ export async function decomposeTask(instruction, maxParts, options) {
|
|
|
27
28
|
}
|
|
28
29
|
const parts = response.structuredOutput?.parts;
|
|
29
30
|
if (parts != null) {
|
|
30
|
-
return toPartDefinitions(parts,
|
|
31
|
+
return toPartDefinitions(parts, maxTotalParts);
|
|
31
32
|
}
|
|
32
|
-
return parseParts(response.content,
|
|
33
|
+
return parseParts(response.content, maxTotalParts);
|
|
33
34
|
}
|
|
34
35
|
export async function requestMoreParts(originalInstruction, allResults, existingIds, maxAdditionalParts, options) {
|
|
35
36
|
const prompt = buildMorePartsPrompt(originalInstruction, allResults, existingIds, maxAdditionalParts, options.language);
|
|
@@ -47,6 +48,7 @@ export async function requestMoreParts(originalInstruction, allResults, existing
|
|
|
47
48
|
outputSchema: loadMorePartsSchema(maxAdditionalParts),
|
|
48
49
|
onStream: options.onStream,
|
|
49
50
|
workflowMeta: options.workflowMeta,
|
|
51
|
+
childProcessEnv: options.childProcessEnv,
|
|
50
52
|
});
|
|
51
53
|
if (response.status !== 'done') {
|
|
52
54
|
const detail = response.error || response.content || response.status;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decompose-task-usecase.js","sourceRoot":"","sources":["../../src/agents/decompose-task-usecase.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAA6C,MAAM,aAAa,CAAC;AAClF,OAAO,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AACnG,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"decompose-task-usecase.js","sourceRoot":"","sources":["../../src/agents/decompose-task-usecase.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAA6C,MAAM,aAAa,CAAC;AAClF,OAAO,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,qCAAqC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,MAAM,EAAE,CAAC;QAC/B,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,IAAI,QAAQ,CAAC,OAAO,IAAI,QAAQ,CAAC,MAAM,CAAC;QACrE,MAAM,IAAI,KAAK,CAAC,gCAAgC,MAAM,EAAE,CAAC,CAAC;IAC5D,CAAC;IAED,OAAO,mBAAmB,CAAC,QAAQ,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,CAAC;AAC5E,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { WorkflowRule, RuleMatchMethod, Language } from '../core/models/types.js';
|
|
2
|
+
import type { ProviderUsageSnapshot } from '../core/models/response.js';
|
|
2
3
|
import type { ProviderType } from '../core/workflow/types.js';
|
|
3
|
-
import { type StreamCallback } from './runner.js';
|
|
4
|
+
import { type RunAgentOptions, type StreamCallback } from './runner.js';
|
|
4
5
|
export interface JudgeStatusOptions {
|
|
5
6
|
cwd: string;
|
|
6
7
|
stepName: string;
|
|
@@ -9,19 +10,23 @@ export interface JudgeStatusOptions {
|
|
|
9
10
|
resolvedModel?: string;
|
|
10
11
|
language?: Language;
|
|
11
12
|
interactive?: boolean;
|
|
13
|
+
childProcessEnv?: RunAgentOptions['childProcessEnv'];
|
|
12
14
|
onStream?: StreamCallback;
|
|
13
|
-
onJudgeStage?: (entry:
|
|
14
|
-
stage: 1 | 2 | 3;
|
|
15
|
-
method: 'structured_output' | 'phase3_tag' | 'ai_judge';
|
|
16
|
-
status: 'done' | 'error' | 'skipped';
|
|
17
|
-
instruction: string;
|
|
18
|
-
response: string;
|
|
19
|
-
}) => void;
|
|
15
|
+
onJudgeStage?: (entry: JudgeStageLogEntry) => void;
|
|
20
16
|
onStructuredPromptResolved?: (promptParts: {
|
|
21
17
|
systemPrompt: string;
|
|
22
18
|
userInstruction: string;
|
|
23
19
|
}) => void;
|
|
24
20
|
}
|
|
21
|
+
export interface JudgeStageLogEntry {
|
|
22
|
+
stage: 1 | 2 | 3;
|
|
23
|
+
method: 'structured_output' | 'phase3_tag' | 'ai_judge';
|
|
24
|
+
status: 'done' | 'error' | 'skipped';
|
|
25
|
+
instruction: string;
|
|
26
|
+
response: string;
|
|
27
|
+
providerUsage?: ProviderUsageSnapshot;
|
|
28
|
+
}
|
|
29
|
+
type JudgeResponseEntry = Pick<JudgeStageLogEntry, 'instruction' | 'status' | 'response' | 'providerUsage'>;
|
|
25
30
|
export interface TagJudgeRunOptions {
|
|
26
31
|
cwd: string;
|
|
27
32
|
provider?: ProviderType;
|
|
@@ -29,6 +34,7 @@ export interface TagJudgeRunOptions {
|
|
|
29
34
|
resolvedModel?: string;
|
|
30
35
|
language?: Language;
|
|
31
36
|
onStream?: StreamCallback;
|
|
37
|
+
childProcessEnv?: RunAgentOptions['childProcessEnv'];
|
|
32
38
|
stepName: string;
|
|
33
39
|
}
|
|
34
40
|
export declare function runTagJudgeStage(tagInstruction: string, rules: WorkflowRule[], interactiveEnabled: boolean, runOptions: TagJudgeRunOptions, onJudgeStage?: JudgeStatusOptions['onJudgeStage']): Promise<JudgeStatusResult | undefined>;
|
|
@@ -41,15 +47,22 @@ export interface EvaluateConditionOptions {
|
|
|
41
47
|
provider?: ProviderType;
|
|
42
48
|
resolvedProvider?: ProviderType;
|
|
43
49
|
resolvedModel?: string;
|
|
50
|
+
childProcessEnv?: RunAgentOptions['childProcessEnv'];
|
|
44
51
|
onJudgeResponse?: (entry: {
|
|
45
52
|
instruction: string;
|
|
46
53
|
status: 'done' | 'error';
|
|
47
54
|
response: string;
|
|
55
|
+
providerUsage?: ProviderUsageSnapshot;
|
|
48
56
|
}) => void;
|
|
49
57
|
}
|
|
50
58
|
export declare function evaluateCondition(agentOutput: string, conditions: Array<{
|
|
51
59
|
index: number;
|
|
52
60
|
text: string;
|
|
53
61
|
}>, options: EvaluateConditionOptions): Promise<number>;
|
|
62
|
+
export declare function createJudgeStageRecorder(): {
|
|
63
|
+
capture(entry: JudgeResponseEntry): void;
|
|
64
|
+
stage(entry: Pick<JudgeStageLogEntry, 'stage' | 'method'>): JudgeStageLogEntry;
|
|
65
|
+
};
|
|
54
66
|
export declare function judgeStatus(structuredInstruction: string, tagInstruction: string, rules: WorkflowRule[], options: JudgeStatusOptions): Promise<JudgeStatusResult>;
|
|
67
|
+
export {};
|
|
55
68
|
//# sourceMappingURL=judge-status-usecase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"judge-status-usecase.d.ts","sourceRoot":"","sources":["../../src/agents/judge-status-usecase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACvF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"judge-status-usecase.d.ts","sourceRoot":"","sources":["../../src/agents/judge-status-usecase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACvF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAY,KAAK,eAAe,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAMlF,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,gBAAgB,CAAC,EAAE,YAAY,CAAC;IAChC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,eAAe,CAAC,iBAAiB,CAAC,CAAC;IACrD,QAAQ,CAAC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,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,eAAe,CAAC;CACzB;AAED,MAAM,WAAW,wBAAwB;IACvC,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,gBAAgB,CAAC,EAAE,YAAY,CAAC;IAChC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,eAAe,CAAC,iBAAiB,CAAC,CAAC;IACrD,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE;QACxB,WAAW,EAAE,MAAM,CAAC;QACpB,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;QACzB,QAAQ,EAAE,MAAM,CAAC;QACjB,aAAa,CAAC,EAAE,qBAAqB,CAAC;KACvC,KAAK,IAAI,CAAC;CACZ;AAED,wBAAsB,iBAAiB,CACrC,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,EAClD,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,MAAM,CAAC,CAiCjB;AAED,wBAAgB,wBAAwB,IAAI;IAC1C,OAAO,CAAC,KAAK,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACzC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,kBAAkB,EAAE,OAAO,GAAG,QAAQ,CAAC,GAAG,kBAAkB,CAAC;CAChF,CAiBA;AAED,wBAAsB,WAAW,CAC/B,qBAAqB,EAAE,MAAM,EAC7B,cAAc,EAAE,MAAM,EACtB,KAAK,EAAE,YAAY,EAAE,EACrB,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,iBAAiB,CAAC,CAgG5B"}
|
|
@@ -13,6 +13,7 @@ export async function runTagJudgeStage(tagInstruction, rules, interactiveEnabled
|
|
|
13
13
|
permissionMode: 'readonly',
|
|
14
14
|
language: runOptions.language,
|
|
15
15
|
onStream: runOptions.onStream,
|
|
16
|
+
childProcessEnv: runOptions.childProcessEnv,
|
|
16
17
|
});
|
|
17
18
|
onJudgeStage?.({
|
|
18
19
|
stage: 2,
|
|
@@ -20,6 +21,7 @@ export async function runTagJudgeStage(tagInstruction, rules, interactiveEnabled
|
|
|
20
21
|
status: tagResponse.status === 'done' ? 'done' : 'error',
|
|
21
22
|
instruction: tagInstruction,
|
|
22
23
|
response: tagResponse.content,
|
|
24
|
+
providerUsage: tagResponse.providerUsage,
|
|
23
25
|
});
|
|
24
26
|
if (tagResponse.status === 'done') {
|
|
25
27
|
const tagRuleIndex = detectRuleIndex(tagResponse.content, runOptions.stepName);
|
|
@@ -39,11 +41,13 @@ export async function evaluateCondition(agentOutput, conditions, options) {
|
|
|
39
41
|
...buildMaxTurnsOption(options.provider, options.resolvedProvider, 1),
|
|
40
42
|
permissionMode: 'readonly',
|
|
41
43
|
outputSchema: loadEvaluationSchema(),
|
|
44
|
+
childProcessEnv: options.childProcessEnv,
|
|
42
45
|
});
|
|
43
46
|
options.onJudgeResponse?.({
|
|
44
47
|
instruction: prompt,
|
|
45
48
|
status: response.status === 'done' ? 'done' : 'error',
|
|
46
49
|
response: response.content,
|
|
50
|
+
providerUsage: response.providerUsage,
|
|
47
51
|
});
|
|
48
52
|
if (response.status !== 'done') {
|
|
49
53
|
return -1;
|
|
@@ -57,6 +61,24 @@ export async function evaluateCondition(agentOutput, conditions, options) {
|
|
|
57
61
|
}
|
|
58
62
|
return detectJudgeIndex(response.content);
|
|
59
63
|
}
|
|
64
|
+
export function createJudgeStageRecorder() {
|
|
65
|
+
let latest = {
|
|
66
|
+
status: 'skipped',
|
|
67
|
+
instruction: '',
|
|
68
|
+
response: '',
|
|
69
|
+
};
|
|
70
|
+
return {
|
|
71
|
+
capture(entry) {
|
|
72
|
+
latest = entry;
|
|
73
|
+
},
|
|
74
|
+
stage(entry) {
|
|
75
|
+
return {
|
|
76
|
+
...entry,
|
|
77
|
+
...latest,
|
|
78
|
+
};
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
}
|
|
60
82
|
export async function judgeStatus(structuredInstruction, tagInstruction, rules, options) {
|
|
61
83
|
if (rules.length === 0) {
|
|
62
84
|
throw new Error('judgeStatus requires at least one rule');
|
|
@@ -71,6 +93,7 @@ export async function judgeStatus(structuredInstruction, tagInstruction, rules,
|
|
|
71
93
|
permissionMode: 'readonly',
|
|
72
94
|
language: options.language,
|
|
73
95
|
onStream: options.onStream,
|
|
96
|
+
childProcessEnv: options.childProcessEnv,
|
|
74
97
|
};
|
|
75
98
|
const structuredResponse = await runAgent('conductor', structuredInstruction, {
|
|
76
99
|
...agentOptions,
|
|
@@ -86,6 +109,7 @@ export async function judgeStatus(structuredInstruction, tagInstruction, rules,
|
|
|
86
109
|
status: structuredResponse.status === 'done' ? 'done' : 'error',
|
|
87
110
|
instruction: structuredInstruction,
|
|
88
111
|
response: structuredResponse.content,
|
|
112
|
+
providerUsage: structuredResponse.providerUsage,
|
|
89
113
|
});
|
|
90
114
|
if (structuredResponse.status === 'done') {
|
|
91
115
|
const stepNumber = structuredResponse.structuredOutput?.step;
|
|
@@ -103,6 +127,7 @@ export async function judgeStatus(structuredInstruction, tagInstruction, rules,
|
|
|
103
127
|
resolvedModel: options.resolvedModel,
|
|
104
128
|
language: options.language,
|
|
105
129
|
onStream: options.onStream,
|
|
130
|
+
childProcessEnv: options.childProcessEnv,
|
|
106
131
|
stepName: options.stepName,
|
|
107
132
|
}, options.onJudgeStage);
|
|
108
133
|
if (tagResult !== undefined) {
|
|
@@ -110,28 +135,20 @@ export async function judgeStatus(structuredInstruction, tagInstruction, rules,
|
|
|
110
135
|
}
|
|
111
136
|
const conditions = buildJudgeConditions(rules, interactiveEnabled);
|
|
112
137
|
if (conditions.length > 0) {
|
|
113
|
-
|
|
114
|
-
let stage3Instruction = '';
|
|
115
|
-
let stage3Response = '';
|
|
138
|
+
const stage3 = createJudgeStageRecorder();
|
|
116
139
|
const normalizedConditions = conditions.map((c, pos) => ({ index: pos, text: c.text }));
|
|
117
140
|
const fallbackPosition = await evaluateCondition(structuredInstruction, normalizedConditions, {
|
|
118
141
|
cwd: options.cwd,
|
|
119
142
|
provider: options.provider,
|
|
120
143
|
resolvedProvider: options.resolvedProvider,
|
|
121
144
|
resolvedModel: options.resolvedModel,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
stage3Instruction = entry.instruction;
|
|
125
|
-
stage3Response = entry.response;
|
|
126
|
-
},
|
|
145
|
+
childProcessEnv: options.childProcessEnv,
|
|
146
|
+
onJudgeResponse: stage3.capture,
|
|
127
147
|
});
|
|
128
|
-
options.onJudgeStage?.({
|
|
148
|
+
options.onJudgeStage?.(stage3.stage({
|
|
129
149
|
stage: 3,
|
|
130
150
|
method: 'ai_judge',
|
|
131
|
-
|
|
132
|
-
instruction: stage3Instruction,
|
|
133
|
-
response: stage3Response,
|
|
134
|
-
});
|
|
151
|
+
}));
|
|
135
152
|
if (fallbackPosition >= 0 && fallbackPosition < conditions.length) {
|
|
136
153
|
const originalIndex = conditions[fallbackPosition]?.index;
|
|
137
154
|
if (originalIndex !== undefined) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"judge-status-usecase.js","sourceRoot":"","sources":["../../src/agents/judge-status-usecase.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"judge-status-usecase.js","sourceRoot":"","sources":["../../src/agents/judge-status-usecase.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAA6C,MAAM,aAAa,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC9G,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC/F,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAyCjE,MAAM,CAAC,KAAK,U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AAM,EAAE,UAAU,EAAE,CAAC;YAC1D,CAAC;QACH,CAAC;IACH,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,8BAA8B,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACrE,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { RunAgentOptions } from './types.js';
|
|
2
|
-
type WrappedPromptOptions = Pick<RunAgentOptions, 'language' | 'workflowMeta' | 'personaPath'
|
|
2
|
+
type WrappedPromptOptions = Pick<RunAgentOptions, 'language' | 'workflowMeta' | 'personaPath'> & {
|
|
3
|
+
providerRuntimeInstructions: string | null;
|
|
4
|
+
};
|
|
3
5
|
export declare function buildWrappedSystemPrompt(agentDefinition: string, options: WrappedPromptOptions): string;
|
|
4
6
|
export {};
|
|
5
7
|
//# sourceMappingURL=runner-prompt.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner-prompt.d.ts","sourceRoot":"","sources":["../../src/agents/runner-prompt.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"runner-prompt.d.ts","sourceRoot":"","sources":["../../src/agents/runner-prompt.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,KAAK,oBAAoB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,cAAc,GAAG,aAAa,CAAC,GAAG;IAC/F,2BAA2B,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5C,CAAC;AAmBF,wBAAgB,wBAAwB,CACtC,eAAe,EAAE,MAAM,EACvB,OAAO,EAAE,oBAAoB,GAC5B,MAAM,CAwBR"}
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
import { loadTemplate } from '../shared/prompts/index.js';
|
|
2
|
-
|
|
2
|
+
import { buildProviderRuntimeSystemPrompt } from '../infra/providers/runtimeSystemPrompt.js';
|
|
3
|
+
function shouldRenderWorkflowContext(options) {
|
|
3
4
|
return options.personaPath !== undefined || options.workflowMeta?.processSafety !== undefined;
|
|
4
5
|
}
|
|
6
|
+
function buildRuntimeOnlySystemPrompt(agentDefinition, options) {
|
|
7
|
+
return buildProviderRuntimeSystemPrompt(agentDefinition, options.language ?? 'en', options.providerRuntimeInstructions);
|
|
8
|
+
}
|
|
5
9
|
export function buildWrappedSystemPrompt(agentDefinition, options) {
|
|
6
|
-
if (!
|
|
7
|
-
return agentDefinition;
|
|
10
|
+
if (!shouldRenderWorkflowContext(options)) {
|
|
11
|
+
return buildRuntimeOnlySystemPrompt(agentDefinition, options);
|
|
8
12
|
}
|
|
9
|
-
const templateVars = {
|
|
13
|
+
const templateVars = {
|
|
14
|
+
agentDefinition,
|
|
15
|
+
providerRuntimeInstructions: options.providerRuntimeInstructions,
|
|
16
|
+
};
|
|
10
17
|
if (options.workflowMeta) {
|
|
11
18
|
templateVars.workflowName = options.workflowMeta.workflowName;
|
|
12
19
|
templateVars.workflowDescription = options.workflowMeta.workflowDescription ?? '';
|