takt 0.40.0 → 0.42.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 +58 -28
- package/builtins/en/config.yaml +2 -0
- package/builtins/en/facets/instructions/_system/fallback-notice.md +16 -0
- package/builtins/en/facets/instructions/ai-antipattern-fix.md +2 -14
- package/builtins/en/facets/instructions/ai-antipattern-review.md +5 -11
- package/builtins/en/facets/instructions/implement-after-tests.md +6 -7
- package/builtins/en/facets/instructions/implement.md +6 -7
- package/builtins/en/facets/instructions/review-arch.md +4 -36
- package/builtins/en/facets/instructions/review-cqrs-es.md +7 -23
- package/builtins/en/facets/instructions/review-frontend.md +6 -32
- package/builtins/en/facets/instructions/review-qa.md +5 -31
- package/builtins/en/facets/instructions/review-requirements.md +6 -24
- package/builtins/en/facets/instructions/review-security.md +13 -36
- package/builtins/en/facets/instructions/review-terraform.md +4 -28
- package/builtins/en/facets/instructions/review-test.md +8 -29
- package/builtins/en/facets/instructions/supervise.md +17 -35
- package/builtins/en/facets/instructions/write-tests-first.md +5 -0
- package/builtins/en/facets/knowledge/architecture.md +13 -13
- package/builtins/en/facets/knowledge/cqrs-es.md +66 -0
- package/builtins/en/facets/knowledge/frontend.md +17 -2
- package/builtins/en/facets/knowledge/react.md +3 -0
- package/builtins/en/facets/output-contracts/frontend-review.md +1 -0
- package/builtins/en/facets/policies/ai-antipattern.md +19 -0
- package/builtins/en/facets/policies/coding.md +85 -3
- package/builtins/en/facets/policies/qa.md +3 -1
- package/builtins/en/facets/policies/review.md +35 -3
- package/builtins/en/facets/policies/testing.md +33 -0
- package/builtins/en/workflows/auto-improvement-loop.yaml +40 -10
- package/builtins/ja/INSTRUCTION_STYLE_GUIDE.md +38 -3
- package/builtins/ja/config.yaml +2 -0
- package/builtins/ja/facets/instructions/_system/fallback-notice.md +16 -0
- package/builtins/ja/facets/instructions/ai-antipattern-fix.md +4 -16
- package/builtins/ja/facets/instructions/ai-antipattern-review.md +7 -13
- package/builtins/ja/facets/instructions/implement-after-tests.md +6 -7
- package/builtins/ja/facets/instructions/implement.md +6 -7
- package/builtins/ja/facets/instructions/review-arch.md +5 -37
- package/builtins/ja/facets/instructions/review-cqrs-es.md +7 -23
- package/builtins/ja/facets/instructions/review-frontend.md +6 -32
- package/builtins/ja/facets/instructions/review-qa.md +5 -31
- package/builtins/ja/facets/instructions/review-requirements.md +10 -28
- package/builtins/ja/facets/instructions/review-security.md +13 -36
- package/builtins/ja/facets/instructions/review-terraform.md +5 -29
- package/builtins/ja/facets/instructions/review-test.md +8 -29
- package/builtins/ja/facets/instructions/supervise.md +15 -33
- package/builtins/ja/facets/instructions/write-tests-first.md +5 -0
- package/builtins/ja/facets/knowledge/architecture.md +13 -13
- package/builtins/ja/facets/knowledge/cqrs-es.md +66 -0
- package/builtins/ja/facets/knowledge/frontend.md +17 -2
- package/builtins/ja/facets/knowledge/react.md +3 -0
- package/builtins/ja/facets/output-contracts/frontend-review.md +1 -0
- package/builtins/ja/facets/policies/ai-antipattern.md +19 -0
- package/builtins/ja/facets/policies/coding.md +85 -3
- package/builtins/ja/facets/policies/qa.md +3 -1
- package/builtins/ja/facets/policies/review.md +35 -3
- package/builtins/ja/facets/policies/testing.md +33 -0
- package/builtins/ja/workflows/auto-improvement-loop.yaml +40 -10
- package/builtins/schemas/followup-task.json +65 -10
- package/dist/agents/decompose-task-usecase.d.ts.map +1 -1
- package/dist/agents/decompose-task-usecase.js +3 -2
- package/dist/agents/decompose-task-usecase.js.map +1 -1
- package/dist/agents/judge-status-usecase.d.ts.map +1 -1
- package/dist/agents/judge-status-usecase.js +4 -3
- package/dist/agents/judge-status-usecase.js.map +1 -1
- package/dist/agents/provider-call-options.d.ts +4 -0
- package/dist/agents/provider-call-options.d.ts.map +1 -0
- package/dist/agents/provider-call-options.js +9 -0
- package/dist/agents/provider-call-options.js.map +1 -0
- package/dist/agents/runner.js +1 -1
- package/dist/agents/runner.js.map +1 -1
- package/dist/agents/structured-caller/prompt-based-structured-caller.d.ts +1 -0
- package/dist/agents/structured-caller/prompt-based-structured-caller.d.ts.map +1 -1
- package/dist/agents/structured-caller/prompt-based-structured-caller.js +67 -38
- package/dist/agents/structured-caller/prompt-based-structured-caller.js.map +1 -1
- package/dist/app/cli/program.js +1 -1
- package/dist/app/cli/program.js.map +1 -1
- package/dist/core/models/assistant-config.d.ts +4 -0
- package/dist/core/models/assistant-config.d.ts.map +1 -0
- package/dist/core/models/assistant-config.js +4 -0
- package/dist/core/models/assistant-config.js.map +1 -0
- package/dist/core/models/config-schemas.d.ts +120 -0
- package/dist/core/models/config-schemas.d.ts.map +1 -1
- package/dist/core/models/config-schemas.js +9 -2
- package/dist/core/models/config-schemas.js.map +1 -1
- package/dist/core/models/config-types.d.ts +23 -2
- package/dist/core/models/config-types.d.ts.map +1 -1
- package/dist/core/models/index.d.ts +1 -1
- package/dist/core/models/index.d.ts.map +1 -1
- package/dist/core/models/index.js.map +1 -1
- package/dist/core/models/part.d.ts +5 -0
- package/dist/core/models/part.d.ts.map +1 -1
- package/dist/core/models/provider-profiles.d.ts +1 -1
- package/dist/core/models/provider-profiles.d.ts.map +1 -1
- package/dist/core/models/response.d.ts +9 -0
- package/dist/core/models/response.d.ts.map +1 -1
- package/dist/core/models/response.js +1 -1
- package/dist/core/models/response.js.map +1 -1
- package/dist/core/models/schema-base.d.ts +85 -0
- package/dist/core/models/schema-base.d.ts.map +1 -1
- package/dist/core/models/schema-base.js +40 -2
- package/dist/core/models/schema-base.js.map +1 -1
- package/dist/core/models/status.d.ts +1 -1
- package/dist/core/models/status.d.ts.map +1 -1
- package/dist/core/models/status.js +1 -1
- package/dist/core/models/status.js.map +1 -1
- package/dist/core/models/types.d.ts +3 -3
- package/dist/core/models/types.d.ts.map +1 -1
- package/dist/core/models/workflow-condition-expression.d.ts +12 -0
- package/dist/core/models/workflow-condition-expression.d.ts.map +1 -0
- package/dist/core/models/workflow-condition-expression.js +26 -0
- package/dist/core/models/workflow-condition-expression.js.map +1 -0
- package/dist/core/models/workflow-provider-options.d.ts +8 -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 +592 -30
- package/dist/core/models/workflow-schemas.d.ts.map +1 -1
- package/dist/core/models/workflow-schemas.js +59 -5
- package/dist/core/models/workflow-schemas.js.map +1 -1
- package/dist/core/models/workflow-system-input-types.d.ts +9 -1
- package/dist/core/models/workflow-system-input-types.d.ts.map +1 -1
- package/dist/core/models/workflow-system-schemas.d.ts +8 -1
- package/dist/core/models/workflow-system-schemas.d.ts.map +1 -1
- package/dist/core/models/workflow-system-schemas.js +13 -1
- package/dist/core/models/workflow-system-schemas.js.map +1 -1
- package/dist/core/models/workflow-types.d.ts +35 -2
- 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 +3 -6
- package/dist/core/workflow/engine/ArpeggioRunner.d.ts.map +1 -1
- package/dist/core/workflow/engine/ArpeggioRunner.js +40 -19
- package/dist/core/workflow/engine/ArpeggioRunner.js.map +1 -1
- package/dist/core/workflow/engine/OptionsBuilder.d.ts +1 -0
- package/dist/core/workflow/engine/OptionsBuilder.d.ts.map +1 -1
- package/dist/core/workflow/engine/OptionsBuilder.js +14 -5
- package/dist/core/workflow/engine/OptionsBuilder.js.map +1 -1
- package/dist/core/workflow/engine/ParallelRunner.d.ts +4 -6
- package/dist/core/workflow/engine/ParallelRunner.d.ts.map +1 -1
- package/dist/core/workflow/engine/ParallelRunner.js +55 -12
- package/dist/core/workflow/engine/ParallelRunner.js.map +1 -1
- package/dist/core/workflow/engine/StepExecutor.d.ts +10 -7
- package/dist/core/workflow/engine/StepExecutor.d.ts.map +1 -1
- package/dist/core/workflow/engine/StepExecutor.js +81 -11
- package/dist/core/workflow/engine/StepExecutor.js.map +1 -1
- package/dist/core/workflow/engine/TeamLeaderRunner.d.ts +3 -5
- package/dist/core/workflow/engine/TeamLeaderRunner.d.ts.map +1 -1
- package/dist/core/workflow/engine/TeamLeaderRunner.js +30 -7
- package/dist/core/workflow/engine/TeamLeaderRunner.js.map +1 -1
- package/dist/core/workflow/engine/WorkflowCallExecutor.d.ts.map +1 -1
- package/dist/core/workflow/engine/WorkflowCallExecutor.js +1 -0
- package/dist/core/workflow/engine/WorkflowCallExecutor.js.map +1 -1
- package/dist/core/workflow/engine/WorkflowCallRunner.d.ts +3 -6
- package/dist/core/workflow/engine/WorkflowCallRunner.d.ts.map +1 -1
- package/dist/core/workflow/engine/WorkflowCallRunner.js +1 -1
- package/dist/core/workflow/engine/WorkflowCallRunner.js.map +1 -1
- package/dist/core/workflow/engine/WorkflowEngine.d.ts +1 -0
- package/dist/core/workflow/engine/WorkflowEngine.d.ts.map +1 -1
- package/dist/core/workflow/engine/WorkflowEngine.js +47 -21
- package/dist/core/workflow/engine/WorkflowEngine.js.map +1 -1
- package/dist/core/workflow/engine/WorkflowEngineSetup.d.ts +4 -1
- package/dist/core/workflow/engine/WorkflowEngineSetup.d.ts.map +1 -1
- package/dist/core/workflow/engine/WorkflowEngineSetup.js +1 -0
- package/dist/core/workflow/engine/WorkflowEngineSetup.js.map +1 -1
- package/dist/core/workflow/engine/WorkflowEngineStepCoordinator.d.ts +9 -27
- package/dist/core/workflow/engine/WorkflowEngineStepCoordinator.d.ts.map +1 -1
- package/dist/core/workflow/engine/WorkflowEngineStepCoordinator.js +6 -6
- package/dist/core/workflow/engine/WorkflowEngineStepCoordinator.js.map +1 -1
- package/dist/core/workflow/engine/WorkflowRunLoop.d.ts +6 -6
- package/dist/core/workflow/engine/WorkflowRunLoop.d.ts.map +1 -1
- package/dist/core/workflow/engine/WorkflowRunLoop.js +171 -9
- package/dist/core/workflow/engine/WorkflowRunLoop.js.map +1 -1
- package/dist/core/workflow/engine/engine-provider-options.d.ts +1 -1
- package/dist/core/workflow/engine/engine-provider-options.d.ts.map +1 -1
- package/dist/core/workflow/engine/state-manager.d.ts +1 -0
- package/dist/core/workflow/engine/state-manager.d.ts.map +1 -1
- package/dist/core/workflow/engine/state-manager.js +11 -0
- package/dist/core/workflow/engine/state-manager.js.map +1 -1
- package/dist/core/workflow/engine/structured-output-normalizer.d.ts +23 -0
- package/dist/core/workflow/engine/structured-output-normalizer.d.ts.map +1 -0
- package/dist/core/workflow/engine/structured-output-normalizer.js +13 -0
- package/dist/core/workflow/engine/structured-output-normalizer.js.map +1 -0
- package/dist/core/workflow/engine/team-leader-part-runner.d.ts +2 -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 +17 -6
- package/dist/core/workflow/engine/team-leader-part-runner.js.map +1 -1
- package/dist/core/workflow/instruction/InstructionBuilder.d.ts.map +1 -1
- package/dist/core/workflow/instruction/InstructionBuilder.js +7 -0
- package/dist/core/workflow/instruction/InstructionBuilder.js.map +1 -1
- package/dist/core/workflow/instruction/fallback-notice.d.ts +3 -0
- package/dist/core/workflow/instruction/fallback-notice.d.ts.map +1 -0
- package/dist/core/workflow/instruction/fallback-notice.js +20 -0
- package/dist/core/workflow/instruction/fallback-notice.js.map +1 -0
- package/dist/core/workflow/instruction/instruction-context.d.ts +3 -1
- package/dist/core/workflow/instruction/instruction-context.d.ts.map +1 -1
- package/dist/core/workflow/instruction/instruction-context.js.map +1 -1
- package/dist/core/workflow/observability/workflowSpans.d.ts +28 -0
- package/dist/core/workflow/observability/workflowSpans.d.ts.map +1 -0
- package/dist/core/workflow/observability/workflowSpans.js +107 -0
- package/dist/core/workflow/observability/workflowSpans.js.map +1 -0
- package/dist/core/workflow/permission-profile-resolution.d.ts.map +1 -1
- package/dist/core/workflow/permission-profile-resolution.js +1 -0
- package/dist/core/workflow/permission-profile-resolution.js.map +1 -1
- package/dist/core/workflow/phase-runner.d.ts +4 -4
- 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 +13 -0
- package/dist/core/workflow/promotion/PromotionEvaluator.d.ts.map +1 -0
- package/dist/core/workflow/promotion/PromotionEvaluator.js +40 -0
- package/dist/core/workflow/promotion/PromotionEvaluator.js.map +1 -0
- package/dist/core/workflow/promotion/promotion-runtime.d.ts +11 -0
- package/dist/core/workflow/promotion/promotion-runtime.d.ts.map +1 -0
- package/dist/core/workflow/promotion/promotion-runtime.js +112 -0
- package/dist/core/workflow/promotion/promotion-runtime.js.map +1 -0
- package/dist/core/workflow/provider-options-trace.d.ts +3 -2
- package/dist/core/workflow/provider-options-trace.d.ts.map +1 -1
- package/dist/core/workflow/provider-resolution.js +10 -10
- package/dist/core/workflow/provider-resolution.js.map +1 -1
- package/dist/core/workflow/report-phase-runner.d.ts +5 -1
- package/dist/core/workflow/report-phase-runner.d.ts.map +1 -1
- package/dist/core/workflow/report-phase-runner.js +24 -5
- 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 +7 -3
- package/dist/core/workflow/status-judgment-phase.js.map +1 -1
- package/dist/core/workflow/system/system-step-effect-runner.d.ts.map +1 -1
- package/dist/core/workflow/system/system-step-effect-runner.js +20 -2
- package/dist/core/workflow/system/system-step-effect-runner.js.map +1 -1
- package/dist/core/workflow/types.d.ts +18 -3
- package/dist/core/workflow/types.d.ts.map +1 -1
- package/dist/features/interactive/assistantInitFiles.d.ts +2 -0
- package/dist/features/interactive/assistantInitFiles.d.ts.map +1 -0
- package/dist/features/interactive/assistantInitFiles.js +110 -0
- package/dist/features/interactive/assistantInitFiles.js.map +1 -0
- package/dist/features/interactive/conversationLoop.d.ts +5 -1
- package/dist/features/interactive/conversationLoop.d.ts.map +1 -1
- package/dist/features/interactive/conversationLoop.js +23 -3
- package/dist/features/interactive/conversationLoop.js.map +1 -1
- package/dist/features/interactive/interactive-summary.d.ts +1 -1
- package/dist/features/interactive/interactive-summary.d.ts.map +1 -1
- package/dist/features/interactive/interactive-summary.js +4 -3
- package/dist/features/interactive/interactive-summary.js.map +1 -1
- package/dist/features/interactive/interactive.d.ts +5 -3
- package/dist/features/interactive/interactive.d.ts.map +1 -1
- package/dist/features/interactive/interactive.js +4 -0
- package/dist/features/interactive/interactive.js.map +1 -1
- package/dist/features/interactive/promptSections.d.ts +2 -0
- package/dist/features/interactive/promptSections.d.ts.map +1 -1
- package/dist/features/interactive/promptSections.js +7 -1
- package/dist/features/interactive/promptSections.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/add/issueTask.d.ts +1 -14
- package/dist/features/tasks/add/issueTask.d.ts.map +1 -1
- package/dist/features/tasks/add/issueTask.js +124 -20
- package/dist/features/tasks/add/issueTask.js.map +1 -1
- package/dist/features/tasks/execute/workflowExecution.d.ts.map +1 -1
- package/dist/features/tasks/execute/workflowExecution.js +15 -1
- package/dist/features/tasks/execute/workflowExecution.js.map +1 -1
- package/dist/features/tasks/execute/workflowExecutionBootstrap.d.ts +5 -1
- package/dist/features/tasks/execute/workflowExecutionBootstrap.d.ts.map +1 -1
- package/dist/features/tasks/execute/workflowExecutionBootstrap.js +8 -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 +18 -2
- package/dist/features/tasks/execute/workflowExecutionEvents.js.map +1 -1
- package/dist/infra/claude/client.d.ts.map +1 -1
- package/dist/infra/claude/client.js +5 -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 +56 -20
- package/dist/infra/claude/executor.js.map +1 -1
- package/dist/infra/claude/mcp-config.d.ts +7 -0
- package/dist/infra/claude/mcp-config.d.ts.map +1 -0
- package/dist/infra/claude/mcp-config.js +30 -0
- package/dist/infra/claude/mcp-config.js.map +1 -0
- package/dist/infra/claude/types.d.ts +2 -1
- package/dist/infra/claude/types.d.ts.map +1 -1
- package/dist/infra/claude-headless/client.d.ts.map +1 -1
- package/dist/infra/claude-headless/client.js +15 -43
- package/dist/infra/claude-headless/client.js.map +1 -1
- package/dist/infra/claude-headless/headless-spawn.d.ts +1 -0
- package/dist/infra/claude-headless/headless-spawn.d.ts.map +1 -1
- package/dist/infra/claude-headless/headless-spawn.js +16 -0
- 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 +34 -0
- package/dist/infra/claude-headless/result-response.js.map +1 -1
- package/dist/infra/claude-terminal/client.d.ts +4 -0
- package/dist/infra/claude-terminal/client.d.ts.map +1 -0
- package/dist/infra/claude-terminal/client.js +314 -0
- package/dist/infra/claude-terminal/client.js.map +1 -0
- package/dist/infra/claude-terminal/command.d.ts +4 -0
- package/dist/infra/claude-terminal/command.d.ts.map +1 -0
- package/dist/infra/claude-terminal/command.js +50 -0
- package/dist/infra/claude-terminal/command.js.map +1 -0
- package/dist/infra/claude-terminal/response-normalizer.d.ts +14 -0
- package/dist/infra/claude-terminal/response-normalizer.d.ts.map +1 -0
- package/dist/infra/claude-terminal/response-normalizer.js +118 -0
- package/dist/infra/claude-terminal/response-normalizer.js.map +1 -0
- package/dist/infra/claude-terminal/tmux-backend.d.ts +7 -0
- package/dist/infra/claude-terminal/tmux-backend.d.ts.map +1 -0
- package/dist/infra/claude-terminal/tmux-backend.js +177 -0
- package/dist/infra/claude-terminal/tmux-backend.js.map +1 -0
- package/dist/infra/claude-terminal/transcript-reader.d.ts +13 -0
- package/dist/infra/claude-terminal/transcript-reader.d.ts.map +1 -0
- package/dist/infra/claude-terminal/transcript-reader.js +329 -0
- package/dist/infra/claude-terminal/transcript-reader.js.map +1 -0
- package/dist/infra/claude-terminal/types.d.ts +106 -0
- package/dist/infra/claude-terminal/types.d.ts.map +1 -0
- package/dist/infra/claude-terminal/types.js +2 -0
- package/dist/infra/claude-terminal/types.js.map +1 -0
- package/dist/infra/codex/client.d.ts +1 -0
- package/dist/infra/codex/client.d.ts.map +1 -1
- package/dist/infra/codex/client.js +21 -1
- package/dist/infra/codex/client.js.map +1 -1
- package/dist/infra/config/configNormalizers.d.ts +20 -2
- package/dist/infra/config/configNormalizers.d.ts.map +1 -1
- package/dist/infra/config/configNormalizers.js +68 -3
- package/dist/infra/config/configNormalizers.js.map +1 -1
- package/dist/infra/config/env/global-current-env-specs.d.ts.map +1 -1
- package/dist/infra/config/env/global-current-env-specs.js +5 -0
- package/dist/infra/config/env/global-current-env-specs.js.map +1 -1
- package/dist/infra/config/env/project-current-env-specs.d.ts.map +1 -1
- package/dist/infra/config/env/project-current-env-specs.js +5 -0
- package/dist/infra/config/env/project-current-env-specs.js.map +1 -1
- package/dist/infra/config/global/globalConfigCore.d.ts.map +1 -1
- package/dist/infra/config/global/globalConfigCore.js +4 -1
- package/dist/infra/config/global/globalConfigCore.js.map +1 -1
- package/dist/infra/config/global/globalConfigSerializer.d.ts.map +1 -1
- package/dist/infra/config/global/globalConfigSerializer.js +10 -1
- package/dist/infra/config/global/globalConfigSerializer.js.map +1 -1
- package/dist/infra/config/global/initialization.d.ts +1 -1
- package/dist/infra/config/global/initialization.d.ts.map +1 -1
- package/dist/infra/config/global/initialization.js +1 -0
- package/dist/infra/config/global/initialization.js.map +1 -1
- package/dist/infra/config/loaders/workflowParser.d.ts.map +1 -1
- package/dist/infra/config/loaders/workflowParser.js +2 -1
- package/dist/infra/config/loaders/workflowParser.js.map +1 -1
- package/dist/infra/config/loaders/workflowRuleNormalizer.d.ts.map +1 -1
- package/dist/infra/config/loaders/workflowRuleNormalizer.js +8 -9
- package/dist/infra/config/loaders/workflowRuleNormalizer.js.map +1 -1
- package/dist/infra/config/loaders/workflowStepNormalizer.d.ts.map +1 -1
- package/dist/infra/config/loaders/workflowStepNormalizer.js +21 -0
- package/dist/infra/config/loaders/workflowStepNormalizer.js.map +1 -1
- package/dist/infra/config/observabilityConfig.d.ts +13 -0
- package/dist/infra/config/observabilityConfig.d.ts.map +1 -0
- package/dist/infra/config/observabilityConfig.js +52 -0
- package/dist/infra/config/observabilityConfig.js.map +1 -0
- package/dist/infra/config/project/projectConfig.d.ts.map +1 -1
- package/dist/infra/config/project/projectConfig.js +28 -3
- package/dist/infra/config/project/projectConfig.js.map +1 -1
- package/dist/infra/config/providerOptions.d.ts +9 -2
- package/dist/infra/config/providerOptions.d.ts.map +1 -1
- package/dist/infra/config/providerOptions.js +66 -4
- 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 +17 -0
- package/dist/infra/config/providerOptionsContract.js.map +1 -1
- package/dist/infra/config/resolveConfigValue.d.ts.map +1 -1
- package/dist/infra/config/resolveConfigValue.js +18 -0
- package/dist/infra/config/resolveConfigValue.js.map +1 -1
- package/dist/infra/config/resolvedConfig.d.ts +2 -1
- package/dist/infra/config/resolvedConfig.d.ts.map +1 -1
- package/dist/infra/config/traced/tracedConfigSchema.d.ts.map +1 -1
- package/dist/infra/config/traced/tracedConfigSchema.js +16 -0
- package/dist/infra/config/traced/tracedConfigSchema.js.map +1 -1
- package/dist/infra/git/format.d.ts.map +1 -1
- package/dist/infra/git/format.js +75 -8
- package/dist/infra/git/format.js.map +1 -1
- package/dist/infra/git/index.d.ts +1 -1
- package/dist/infra/git/index.d.ts.map +1 -1
- package/dist/infra/git/types.d.ts +5 -0
- package/dist/infra/git/types.d.ts.map +1 -1
- package/dist/infra/github/pr.d.ts.map +1 -1
- package/dist/infra/github/pr.js +174 -28
- package/dist/infra/github/pr.js.map +1 -1
- package/dist/infra/mock/client.d.ts.map +1 -1
- package/dist/infra/mock/client.js +2 -0
- package/dist/infra/mock/client.js.map +1 -1
- package/dist/infra/mock/scenario.d.ts.map +1 -1
- package/dist/infra/mock/scenario.js +11 -0
- package/dist/infra/mock/scenario.js.map +1 -1
- package/dist/infra/mock/types.d.ts +9 -0
- package/dist/infra/mock/types.d.ts.map +1 -1
- package/dist/infra/observability/otelFoundation.d.ts +6 -0
- package/dist/infra/observability/otelFoundation.d.ts.map +1 -0
- package/dist/infra/observability/otelFoundation.js +89 -0
- package/dist/infra/observability/otelFoundation.js.map +1 -0
- package/dist/infra/opencode/client.d.ts +1 -0
- package/dist/infra/opencode/client.d.ts.map +1 -1
- package/dist/infra/opencode/client.js +41 -15
- package/dist/infra/opencode/client.js.map +1 -1
- package/dist/infra/opencode/types.d.ts +1 -0
- package/dist/infra/opencode/types.d.ts.map +1 -1
- package/dist/infra/providers/claude-terminal.d.ts +6 -0
- package/dist/infra/providers/claude-terminal.d.ts.map +1 -0
- package/dist/infra/providers/claude-terminal.js +70 -0
- package/dist/infra/providers/claude-terminal.js.map +1 -0
- package/dist/infra/providers/index.d.ts.map +1 -1
- package/dist/infra/providers/index.js +2 -0
- package/dist/infra/providers/index.js.map +1 -1
- package/dist/infra/providers/opencode.d.ts.map +1 -1
- package/dist/infra/providers/opencode.js +1 -0
- package/dist/infra/providers/opencode.js.map +1 -1
- package/dist/infra/providers/provider-capabilities.d.ts +1 -0
- package/dist/infra/providers/provider-capabilities.d.ts.map +1 -1
- package/dist/infra/providers/provider-capabilities.js +16 -0
- package/dist/infra/providers/provider-capabilities.js.map +1 -1
- package/dist/infra/rate-limit/detection.d.ts +15 -0
- package/dist/infra/rate-limit/detection.d.ts.map +1 -0
- package/dist/infra/rate-limit/detection.js +58 -0
- package/dist/infra/rate-limit/detection.js.map +1 -0
- package/dist/infra/task/clone-base-branch.d.ts +11 -0
- package/dist/infra/task/clone-base-branch.d.ts.map +1 -1
- package/dist/infra/task/clone-base-branch.js +34 -4
- package/dist/infra/task/clone-base-branch.js.map +1 -1
- package/dist/infra/task/clone.d.ts +1 -1
- package/dist/infra/task/clone.d.ts.map +1 -1
- package/dist/infra/task/clone.js +1 -1
- package/dist/infra/task/clone.js.map +1 -1
- package/dist/infra/task/index.d.ts +1 -1
- package/dist/infra/task/index.d.ts.map +1 -1
- package/dist/infra/task/index.js +1 -1
- package/dist/infra/task/index.js.map +1 -1
- package/dist/infra/workflow/structured-output/followup-task-normalizer.d.ts +3 -0
- package/dist/infra/workflow/structured-output/followup-task-normalizer.d.ts.map +1 -0
- package/dist/infra/workflow/structured-output/followup-task-normalizer.js +206 -0
- package/dist/infra/workflow/structured-output/followup-task-normalizer.js.map +1 -0
- package/dist/infra/workflow/system/system-enqueue-effect.d.ts +2 -2
- package/dist/infra/workflow/system/system-enqueue-effect.d.ts.map +1 -1
- package/dist/infra/workflow/system/system-enqueue-effect.js +9 -4
- package/dist/infra/workflow/system/system-enqueue-effect.js.map +1 -1
- package/dist/shared/constants.d.ts +1 -0
- package/dist/shared/constants.d.ts.map +1 -1
- package/dist/shared/constants.js +1 -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_phase1_message.md +11 -1
- package/dist/shared/prompts/ja/perform_phase1_message.md +11 -1
- package/dist/shared/types/provider.d.ts +1 -1
- package/dist/shared/types/provider.d.ts.map +1 -1
- package/dist/shared/utils/debug.d.ts +2 -0
- package/dist/shared/utils/debug.d.ts.map +1 -1
- package/dist/shared/utils/debug.js +1 -0
- package/dist/shared/utils/debug.js.map +1 -1
- package/dist/shared/utils/delay.d.ts +2 -0
- package/dist/shared/utils/delay.d.ts.map +1 -0
- package/dist/shared/utils/delay.js +4 -0
- package/dist/shared/utils/delay.js.map +1 -0
- package/dist/shared/utils/index.d.ts +1 -0
- package/dist/shared/utils/index.d.ts.map +1 -1
- package/dist/shared/utils/index.js +1 -0
- package/dist/shared/utils/index.js.map +1 -1
- package/package.json +4 -2
|
@@ -1,32 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
Focus on reviewing **test quality**.
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
- Completeness (unnecessary tests, missing cases)
|
|
8
|
-
- Appropriateness of mocks and fixtures
|
|
9
|
-
- When an external contract exists, whether request body / query / path input locations are verified as defined
|
|
10
|
-
- Whether the tests would catch an implementation that incorrectly reuses a response envelope for request parsing
|
|
3
|
+
Procedure:
|
|
4
|
+
1. Open the Knowledge and Policy Source paths with the Read tool and obtain the full content
|
|
5
|
+
2. List every `##` section in each of them (do not cherry-pick)
|
|
6
|
+
3. Match the criteria in each listed section against the diff and detect any issues
|
|
11
7
|
|
|
8
|
+
## Step-Specific Additional Procedure
|
|
12
9
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
- Do not flag intentionally documented decisions as FP
|
|
16
|
-
- However, also evaluate whether the design decisions themselves are sound, and flag any problems
|
|
17
|
-
|
|
18
|
-
**Previous finding tracking (required):**
|
|
19
|
-
- First, inspect the review result previously produced by this step and its timestamped history in the Report Directory, treating the unversioned file as the latest result and the most recent timestamped file as the previous result
|
|
20
|
-
- If "Previous Response" is available, use it only as supporting context; use report history as the source of truth for finding state transitions
|
|
21
|
-
- Assign `finding_id` to each finding and classify current status as `new / persists / resolved / reopened`
|
|
22
|
-
- If status is `persists`, provide concrete unresolved evidence (file/line)
|
|
23
|
-
- Do not drop open findings from the prior report when producing the current report
|
|
24
|
-
|
|
25
|
-
## Judgment Procedure
|
|
26
|
-
|
|
27
|
-
1. First, extract prior open findings from report history and preliminarily classify them as `new / persists / resolved / reopened`
|
|
28
|
-
2. Cross-reference the test plan/test scope reports in the Report Directory with the implemented tests
|
|
29
|
-
3. When citing build, test, or functional verification as evidence, record the verified target, what was checked, and the observed result in the report
|
|
30
|
-
4. For each detected issue, classify as blocking/non-blocking based on Policy's scope determination table and judgment rules
|
|
31
|
-
5. If there is even one blocking issue, judge as REJECT
|
|
32
|
-
6. If an external contract exists and input locations (root body / query / path) are not verified, treat it as a coverage gap by default
|
|
10
|
+
1. Cross-reference the test plan / test scope reports in the Report Directory with the implemented tests
|
|
11
|
+
2. If an external contract exists and input locations (root body / query / path) are not verified, treat it as a coverage gap by default
|
|
@@ -1,52 +1,34 @@
|
|
|
1
1
|
Verify existing evidence for tests, builds, and functional checks, then perform final approval.
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
1.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
- Read `plan.md` and confirm intended approach and scope
|
|
12
|
-
- Read `coder-decisions.md` and confirm why the implementation moved in that direction
|
|
13
|
-
- Do not treat prior review conclusions or requirements-review conclusions as authoritative unless they align with all three and the code
|
|
14
|
-
3. Whether each task spec requirement has been achieved
|
|
15
|
-
- Extract requirements one by one from the task spec
|
|
3
|
+
Procedure:
|
|
4
|
+
1. Open the Knowledge and Policy Source paths with the Read tool and obtain the full content
|
|
5
|
+
2. List every `##` section in each of them (do not cherry-pick)
|
|
6
|
+
3. Match the criteria in each listed section against the diff, execution evidence, and reports
|
|
7
|
+
|
|
8
|
+
## Step-Specific Additional Procedure
|
|
9
|
+
|
|
10
|
+
1. Extract each requirement from the task spec one by one
|
|
16
11
|
- If a single sentence contains multiple conditions or paths, split it into the smallest independently verifiable units
|
|
17
12
|
- Example: treat `global/project` as separate requirements
|
|
18
13
|
- Example: treat `JSON override / leaf override` as separate requirements
|
|
19
14
|
- Example: split parallel expressions such as `A and B`, `A/B`, `allow/deny`, or `read/write`
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
2. For each requirement, identify the implementing code (file:line)
|
|
16
|
+
3. Verify the code actually fulfills the requirement (read the file, check existing test/build evidence)
|
|
22
17
|
- Do not mark a composite requirement as ✅ based on only one side of the cases
|
|
23
|
-
-
|
|
24
|
-
- Do not rely on the plan report's judgment; independently verify each requirement
|
|
18
|
+
- Do not rely on the plan report or requirements-review judgment; independently verify each requirement
|
|
25
19
|
- If any requirement is unfulfilled, REJECT
|
|
26
20
|
4. Re-evaluate prior review findings
|
|
27
|
-
- Re-check each `new / persists / resolved` finding against the task spec, `plan.md`, `coder-decisions.md`, and actual code
|
|
28
21
|
- If a finding does not hold in code, classify it as `false_positive`
|
|
29
22
|
- If a finding holds technically but pushes work beyond the task objective or justified scope, classify it as `overreach`
|
|
30
23
|
- Do not leave `false_positive` / `overreach` reasoning implicit
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
**How to read reports:**
|
|
38
|
-
- For reports with the same base name, treat the unversioned file as the latest result and `{report}.{timestamp}` files as history
|
|
39
|
-
- When re-evaluating prior findings, compare the unversioned file with the most recent timestamped history file and verify that the meaning of `new / persists / resolved / reopened` is preserved
|
|
40
|
-
- Treat summary reports as summaries, not as primary evidence. Prefer reports that record execution results, reviewer reports with concrete verification details, and then actual code
|
|
41
|
-
- You may treat `Build Results` / `Test Results` sections in reports that record execution results as primary evidence
|
|
42
|
-
- For `architecture-review`, `qa-review`, `testing-review`, `security-review`, and `requirements-review`, prioritize each report's `Verification Evidence` section when checking evidence
|
|
24
|
+
|
|
25
|
+
## Report Priority (supervise-specific)
|
|
26
|
+
|
|
27
|
+
- Do not treat summary reports as primary evidence. Use execution-result reports, reviewer reports with concrete verification details, and actual code in that order
|
|
28
|
+
- You may treat `Build Results` / `Test Results` sections in execution-result reports as primary evidence
|
|
29
|
+
- For `architecture-review`, `qa-review`, `testing-review`, `security-review`, and `requirements-review`, prioritize each report's `Verification Evidence` section
|
|
43
30
|
- Treat each `Verification Evidence` item as supporting evidence only when it states the verified target, what was checked, and observed result. If any part is missing, mark that item as `unverified`
|
|
44
|
-
- Treat reviewer claims such as "confirmed success" as supporting evidence only when they state the verified target, what was checked, and the observed result
|
|
45
31
|
- If items of evidence conflict, prioritize them in this order: `execution-result report > reviewer report with concrete verification details > summary report`
|
|
46
|
-
- If a later report reclassifies an earlier finding as `resolved`, `false_positive`, or `overreach`, decide whether to accept that reclassification by checking it against the task, plan, and code
|
|
47
|
-
|
|
48
|
-
**Report verification:** Read all reports in the Report Directory and
|
|
49
|
-
check whether any blocking finding remains unresolved and whether those findings are themselves valid.
|
|
50
32
|
|
|
51
33
|
**Validation output contract:**
|
|
52
34
|
```markdown
|
|
@@ -24,6 +24,11 @@ Refer only to files within the Report Directory shown in the Workflow Context. D
|
|
|
24
24
|
- Include tests that would catch implementations that incorrectly reuse a response envelope when reading requests
|
|
25
25
|
- Write tests that are expected to pass after implementation is complete (build errors and test failures are expected at this stage)
|
|
26
26
|
|
|
27
|
+
**Non-executable asset constraints:**
|
|
28
|
+
- Do not create tests that freeze prose, headings, or structure in explanations, guides, README files, or Markdown documentation
|
|
29
|
+
- For docs-only changes, do not add tests unless an explicit executable contract exists
|
|
30
|
+
- Tests are only needed when assets contain contracts tied to code behavior or machine processing, such as CLI examples, config examples, or generated artifacts
|
|
31
|
+
|
|
27
32
|
**Test execution:**
|
|
28
33
|
- Run tests after creating them to check results
|
|
29
34
|
- Test failures and import errors are expected before implementation (including imports of not-yet-implemented modules)
|
|
@@ -374,14 +374,14 @@ Don't overlook compromises made to "just make it work."
|
|
|
374
374
|
| Swallowed errors | Empty `catch {}`, `rescue nil` |
|
|
375
375
|
| Magic numbers | Unexplained `if (status == 3)` |
|
|
376
376
|
|
|
377
|
-
##
|
|
377
|
+
## Unfinished Code Detection
|
|
378
378
|
|
|
379
|
-
|
|
379
|
+
Unfinished-code judgment follows the coding policy. In architecture review, check whether TODO/FIXME comments, empty implementations, or stubs are being used as substitutes for required boundaries, authorization, validation, or contract updates.
|
|
380
380
|
|
|
381
|
-
TODO
|
|
381
|
+
TODO/FIXME without an issue number, external blocker, and removal condition is REJECT.
|
|
382
382
|
|
|
383
383
|
```kotlin
|
|
384
|
-
// REJECT -
|
|
384
|
+
// REJECT - Authorization check deferred with TODO
|
|
385
385
|
// TODO: Add authorization check by facility ID
|
|
386
386
|
fun deleteCustomHoliday(@PathVariable id: String) {
|
|
387
387
|
deleteCustomHolidayInputPort.execute(input)
|
|
@@ -398,12 +398,12 @@ fun deleteCustomHoliday(@PathVariable id: String) {
|
|
|
398
398
|
}
|
|
399
399
|
```
|
|
400
400
|
|
|
401
|
-
|
|
401
|
+
Acceptable TODO/FIXME cases:
|
|
402
402
|
|
|
403
403
|
| Condition | Example | Judgment |
|
|
404
404
|
|-----------|---------|----------|
|
|
405
|
-
| External dependency prevents implementation +
|
|
406
|
-
| Technical constraint prevents +
|
|
405
|
+
| External dependency prevents implementation + issue exists + removal condition documented | `// TODO(#123): Implement after API key obtained` | Acceptable |
|
|
406
|
+
| Technical constraint prevents implementation + issue exists + removal condition documented | `// TODO(#456): Waiting for library bug fix` | Acceptable |
|
|
407
407
|
| "Future implementation", "add later" | `// TODO: Add validation` | REJECT |
|
|
408
408
|
| "No time for now" | `// TODO: Refactor` | REJECT |
|
|
409
409
|
|
|
@@ -429,7 +429,7 @@ When NOT to apply DRY:
|
|
|
429
429
|
|
|
430
430
|
## Spec Compliance Verification
|
|
431
431
|
|
|
432
|
-
|
|
432
|
+
Contract-change consistency follows the coding policy. In architecture review, check whether changes contradict documented specifications, types, schemas, or config formats.
|
|
433
433
|
|
|
434
434
|
Verification targets:
|
|
435
435
|
|
|
@@ -460,10 +460,10 @@ REJECT when these patterns are found:
|
|
|
460
460
|
|
|
461
461
|
## Call Chain Verification
|
|
462
462
|
|
|
463
|
-
|
|
463
|
+
Missing wiring after contract changes follows the coding policy. In architecture review, check whether new parameters or fields actually reach callers, producers, and readers instead of staying local to the changed file.
|
|
464
464
|
|
|
465
465
|
Verification steps:
|
|
466
|
-
1. When finding new optional parameters or interface fields,
|
|
466
|
+
1. When finding new optional parameters or interface fields, search all callers
|
|
467
467
|
2. Check if all callers pass the new parameter
|
|
468
468
|
3. If fallback value (`?? default`) exists, verify if fallback is used as intended
|
|
469
469
|
|
|
@@ -471,7 +471,7 @@ Danger patterns:
|
|
|
471
471
|
|
|
472
472
|
| Pattern | Problem | Detection |
|
|
473
473
|
|---------|---------|-----------|
|
|
474
|
-
| `options.xxx ?? fallback` where all callers omit `xxx` | Feature implemented but always falls back |
|
|
474
|
+
| `options.xxx ?? fallback` where all callers omit `xxx` | Feature implemented but always falls back | Check callers |
|
|
475
475
|
| Tests set values directly with mocks | Don't go through actual call chain | Check test construction |
|
|
476
476
|
| `executeXxx()` doesn't receive `options` it uses internally | No route to pass value from above | Check function signature |
|
|
477
477
|
|
|
@@ -493,12 +493,12 @@ Call chain verification applies not only to "missing wiring" but also to the rev
|
|
|
493
493
|
|
|
494
494
|
| Pattern | Problem | Detection |
|
|
495
495
|
|---------|---------|-----------|
|
|
496
|
-
| TTY check when all callers require TTY | Unreachable branch remains |
|
|
496
|
+
| TTY check when all callers require TTY | Unreachable branch remains | Check all callers' preconditions |
|
|
497
497
|
| Null guard when callers already check null | Redundant defense | Trace caller constraints |
|
|
498
498
|
| Runtime type check when TypeScript types constrain | Not trusting type safety | Check TypeScript type constraints |
|
|
499
499
|
|
|
500
500
|
Verification steps:
|
|
501
|
-
1. When finding defensive branches (TTY check, null guard, etc.),
|
|
501
|
+
1. When finding defensive branches (TTY check, null guard, etc.), check all callers
|
|
502
502
|
2. If all callers already guarantee the condition, guard is unnecessary → REJECT
|
|
503
503
|
3. If some callers don't guarantee it, keep the guard
|
|
504
504
|
|
|
@@ -84,6 +84,54 @@ Event Granularity:
|
|
|
84
84
|
- Appropriate: `ShippingAddressChanged` → Intent is clear
|
|
85
85
|
- Too coarse: `OrderModified` → What changed is unclear
|
|
86
86
|
|
|
87
|
+
## Event Evolution
|
|
88
|
+
|
|
89
|
+
Events are persisted contracts. When the current event type changes, old events must still be replayable. Translation of old events belongs in the upcaster / migration layer at the event-store boundary, not in the event type itself or in domain logic.
|
|
90
|
+
|
|
91
|
+
| Criteria | Judgment |
|
|
92
|
+
|----------|----------|
|
|
93
|
+
| Persisted event type or fields changed with no translation path | REJECT |
|
|
94
|
+
| Current event type keeps aliases or compatibility-only properties for old field names | REJECT. Keep history compatibility in upcasters |
|
|
95
|
+
| Aggregate or apply directly interprets old event shapes | REJECT. Convert to current events before replay |
|
|
96
|
+
| Event carries "previous value" only for compatibility | REJECT. Events represent the fact after it happened |
|
|
97
|
+
| Upcaster converts old payloads to the current event meaning | OK |
|
|
98
|
+
| Tests verify old payloads deserialize into current events through the upcaster | OK |
|
|
99
|
+
|
|
100
|
+
Responsibility split for event evolution:
|
|
101
|
+
|
|
102
|
+
| Responsibility | Place |
|
|
103
|
+
|----------------|-------|
|
|
104
|
+
| Current event meaning and fields | Event type |
|
|
105
|
+
| Translation of old payloads | Upcaster / migration layer |
|
|
106
|
+
| State restoration by event replay | Aggregate `apply` |
|
|
107
|
+
| Guarantee that old events can become current events | Upcaster tests |
|
|
108
|
+
|
|
109
|
+
```kotlin
|
|
110
|
+
// NG - mixing old-field compatibility into the current event type
|
|
111
|
+
data class OrderAssignedEvent(
|
|
112
|
+
val orderId: String,
|
|
113
|
+
@JsonAlias("assigneeId")
|
|
114
|
+
val assigneeIds: List<String>
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
// OK - current event type represents only the current contract
|
|
118
|
+
data class OrderAssignedEvent(
|
|
119
|
+
val orderId: String,
|
|
120
|
+
val assigneeIds: List<String>
|
|
121
|
+
)
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
```kotlin
|
|
125
|
+
// OK - convert old payloads to current payloads in the upcaster
|
|
126
|
+
when (eventType) {
|
|
127
|
+
OrderAssignedEvent::class.java.typeName -> {
|
|
128
|
+
event.moveTextFieldToArray("assigneeId", "assigneeIds")
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Whether to keep old event classes depends on the framework and operations policy. In general, do not treat old classes as normal domain events; treat old serialized type names and payloads as the upcaster input contract and cover them with tests.
|
|
134
|
+
|
|
87
135
|
## Command Handlers
|
|
88
136
|
|
|
89
137
|
| Criteria | Judgment |
|
|
@@ -101,6 +149,24 @@ Good Command Handler:
|
|
|
101
149
|
4. Save emitted events
|
|
102
150
|
```
|
|
103
151
|
|
|
152
|
+
### Aggregate Decision Boundary
|
|
153
|
+
|
|
154
|
+
Aggregates make decisions only from state that can be restored from their event history and facts explicitly carried by commands. They are not the place to interpret, normalize, or authorize boundary-originated inputs.
|
|
155
|
+
|
|
156
|
+
Validation inside an Aggregate should be limited to facts reproducible by event replay. Other validation should be resolved before command dispatch, and the Aggregate should receive already-resolved facts.
|
|
157
|
+
|
|
158
|
+
| Decision target | Place |
|
|
159
|
+
|-----------------|-------|
|
|
160
|
+
| Whether the current state allows the operation | Aggregate |
|
|
161
|
+
| Whether the command requester matches the Aggregate owner | Aggregate |
|
|
162
|
+
| Whether HTTP/API input shape is valid | API layer |
|
|
163
|
+
| Parsing external identifiers such as object keys, URLs, or paths | UseCase layer or boundary-side Policy/Verifier |
|
|
164
|
+
| Whether an external identifier belongs to the current user/tenant | UseCase layer or boundary-side Policy/Verifier |
|
|
165
|
+
| Checking Read Models or other Aggregate state | UseCase layer |
|
|
166
|
+
| Checking that an external resource exists | Application-layer integration with the external service |
|
|
167
|
+
|
|
168
|
+
Example: for an upload-completed command, the Aggregate decides whether the session owner matches the requester and whether the current state can be completed. The storage object key format and whether the key belongs to the current user/tenant are validated in the UseCase layer before sending the command.
|
|
169
|
+
|
|
104
170
|
## Projection Design
|
|
105
171
|
|
|
106
172
|
| Criteria | Judgment |
|
|
@@ -84,6 +84,7 @@ Third-party UI libraries such as data grids, date pickers, charts, and virtualiz
|
|
|
84
84
|
## State Management
|
|
85
85
|
|
|
86
86
|
Child components do not modify their own state. They bubble events to parent, and parent manipulates state.
|
|
87
|
+
When multiple components read or update the same state, first place that state in their nearest common parent, then pass data and event callbacks down through props.
|
|
87
88
|
|
|
88
89
|
```tsx
|
|
89
90
|
// ❌ Child modifies its own state
|
|
@@ -110,19 +111,33 @@ Exception (OK for child to have local state):
|
|
|
110
111
|
| Criteria | Judgment |
|
|
111
112
|
|----------|----------|
|
|
112
113
|
| Unnecessary global state | Consider localizing |
|
|
113
|
-
| Same state managed in multiple places |
|
|
114
|
+
| Same state managed in multiple places | REJECT. Normalize it in the nearest common parent or shared store |
|
|
114
115
|
| State changes from child to parent (reverse data flow) | REJECT |
|
|
115
116
|
| API response stored as-is in state | Consider normalization |
|
|
116
117
|
| Inappropriate useEffect dependencies | REJECT |
|
|
117
118
|
| Initial load tied to unstable Context/Provider function references | REJECT |
|
|
118
119
|
|
|
120
|
+
### Canonical and Derived State
|
|
121
|
+
|
|
122
|
+
State should hold canonical values such as user input, server data, and temporary UI state. Display values, aggregates, selection states, sorted results, and grouped results that can be computed from canonical state are derived values and must not be kept as independent state.
|
|
123
|
+
|
|
124
|
+
| Criteria | Judgment |
|
|
125
|
+
|----------|----------|
|
|
126
|
+
| A value that can always be computed from one state is kept as another state | REJECT |
|
|
127
|
+
| Multiple state fields have invariants that require constant synchronization | REJECT |
|
|
128
|
+
| Display labels, counts, totals, all-selected flags, sorted results, or grouped results are kept as canonical state | REJECT |
|
|
129
|
+
| API sending, persistence, or diffing depends on derived state instead of canonical state | REJECT |
|
|
130
|
+
| Only canonical state is stored, and display, aggregation, and decisions are derived via selectors, render logic, or useMemo | OK |
|
|
131
|
+
| Derived values required by external contracts are generated from canonical state at send or persistence boundaries | OK |
|
|
132
|
+
|
|
119
133
|
State Placement Guidelines:
|
|
120
134
|
|
|
121
135
|
| State Nature | Recommended Placement |
|
|
122
136
|
|--------------|----------------------|
|
|
123
137
|
| Temporary UI state (modal open/close, etc.) | Local (useState) |
|
|
124
138
|
| Form input values | Local or form library |
|
|
125
|
-
| Shared across
|
|
139
|
+
| Shared across nearby parent/child or sibling components | Nearest common parent, passed through props |
|
|
140
|
+
| Shared across deep hierarchy or multiple screens | Context or state management library |
|
|
126
141
|
| Server data cache | Data fetching library (TanStack Query, etc.) |
|
|
127
142
|
|
|
128
143
|
## Initial load and refetch boundaries
|
|
@@ -109,12 +109,15 @@ const loadMore = async () => {
|
|
|
109
109
|
## Custom Hook Responsibility
|
|
110
110
|
|
|
111
111
|
A React custom hook should encapsulate state, effects, refs, or event translation. Pure calculations belong in function modules, not in a `use*` hook.
|
|
112
|
+
`useState` inside a custom hook creates a separate state instance for each caller. Calling the same hook from multiple components does not share state.
|
|
113
|
+
When shared state is required, call the hook once in the nearest common parent and pass data through props, or move the state into Context/external store.
|
|
112
114
|
|
|
113
115
|
| Criteria | Judgment |
|
|
114
116
|
|----------|----------|
|
|
115
117
|
| A module is named `use*` but does not use React state/effect/ref | Warning |
|
|
116
118
|
| Pure functions are modeled as a custom hook | Warning |
|
|
117
119
|
| Stateful UI control lives in a custom hook and pure calculations live in functions | OK |
|
|
120
|
+
| Multiple components call the same stateful hook independently when they need shared state | REJECT |
|
|
118
121
|
| A hook returns JSX | REJECT |
|
|
119
122
|
|
|
120
123
|
## Handling exhaustive-deps
|
|
@@ -153,6 +153,25 @@ Legacy support criteria:
|
|
|
153
153
|
- Do not add `.transform()` normalization, `LEGACY_*_MAP` mappings, or `@deprecated` type definitions
|
|
154
154
|
- Support only new values and keep it simple
|
|
155
155
|
|
|
156
|
+
### Over-Abstracting with Function Objects
|
|
157
|
+
|
|
158
|
+
AI often turns a small number of concrete branches into config arrays, function objects, and generic loops to make the code look "extensible". The problem is not Strategy itself; the problem is hiding differences in data without naming the concept. A Strategy is useful when it names a domain concept and makes the replacement boundary explicit.
|
|
159
|
+
|
|
160
|
+
| Pattern | Example | Verdict |
|
|
161
|
+
|---------|---------|---------|
|
|
162
|
+
| Single-use operation config array | Processing `[{ kind, fields, removedFields }]` in a loop | REJECT |
|
|
163
|
+
| Deletions, side effects, or exception cases are hidden in config objects | Readers must inspect config values to find destructive behavior | REJECT |
|
|
164
|
+
| Function object introduced when each branch is only 1-3 lines | `handlers[type]()` adds indirection only | REJECT |
|
|
165
|
+
| Strategy represents a domain concept and clarifies the implementation boundary | `TaxPolicy`, `PaymentMethod`, `RetryStrategy` | OK |
|
|
166
|
+
| Many branches share the same shape and are expected to grow | Consider a handler map | OK |
|
|
167
|
+
|
|
168
|
+
Verification approach:
|
|
169
|
+
1. Grep usage sites for added arrays, Maps, Strategies, or function objects
|
|
170
|
+
2. If used in only one place, check whether explicit branching would be clearer
|
|
171
|
+
3. Check whether side effects, deleted fields, or compatibility behavior are hidden in config objects
|
|
172
|
+
4. Prefer `when` / `switch` when branch names sufficiently express domain meaning
|
|
173
|
+
5. Allow Strategy when naming the concept improves understanding
|
|
174
|
+
|
|
156
175
|
## Premature Caching Strategy Introduction
|
|
157
176
|
|
|
158
177
|
AI tends to proactively introduce caching mechanisms to "improve" performance. Do not add caching strategies until explicitly requested.
|
|
@@ -14,6 +14,7 @@ Prioritize correctness over speed, and code accuracy over ease of implementation
|
|
|
14
14
|
| Boy Scout | Leave touched areas a little better than you found them |
|
|
15
15
|
| Fail Fast | Detect errors early. Never swallow them |
|
|
16
16
|
| Project scripts first | Use project-defined scripts for tool execution. Direct invocation is a last resort |
|
|
17
|
+
| State normalization | Do not keep the same fact in multiple states |
|
|
17
18
|
|
|
18
19
|
## No Fallbacks or Default Arguments
|
|
19
20
|
|
|
@@ -183,6 +184,41 @@ const handlers = { A: handleA, B: handleB, C: handleC };
|
|
|
183
184
|
handlers[type]?.();
|
|
184
185
|
```
|
|
185
186
|
|
|
187
|
+
### Do Not Over-Abstract
|
|
188
|
+
|
|
189
|
+
Use abstraction to reduce duplication and real axes of change, and also to name concepts so the code is easier to understand. Turning a few concrete operations into "config objects + function objects + loops" is not abstraction if it only makes domain differences harder to read.
|
|
190
|
+
|
|
191
|
+
| Criteria | Judgment |
|
|
192
|
+
|----------|----------|
|
|
193
|
+
| A small number of branches differs by event type, state, or domain concept | Use explicit `when` / `switch` |
|
|
194
|
+
| The same operation with the same argument shape repeats in 3+ places | Consider abstraction |
|
|
195
|
+
| A config array or function object is used in only one place | REJECT. Prefer explicit branching first |
|
|
196
|
+
| Side effects or removed fields cannot be understood without reading config objects | REJECT |
|
|
197
|
+
| Strategy names a domain concept and makes interchangeable implementations explicit | OK |
|
|
198
|
+
| Branch names read as domain concepts | OK |
|
|
199
|
+
|
|
200
|
+
```typescript
|
|
201
|
+
// ❌ Over-abstracted - readers must inspect both the config array and loop to see behavior
|
|
202
|
+
const operations = [
|
|
203
|
+
{ kind: 'create', normalize: ['owner'], remove: [] },
|
|
204
|
+
{ kind: 'revise', normalize: ['owner'], remove: ['legacyOwner'] },
|
|
205
|
+
]
|
|
206
|
+
for (const operation of operations) {
|
|
207
|
+
applyOperation(record, operation)
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
// ✅ When branch meaning matters, make it explicit
|
|
211
|
+
switch (record.kind) {
|
|
212
|
+
case 'create':
|
|
213
|
+
normalizeOwner(record)
|
|
214
|
+
break
|
|
215
|
+
case 'revise':
|
|
216
|
+
removeLegacyOwner(record)
|
|
217
|
+
normalizeOwner(record)
|
|
218
|
+
break
|
|
219
|
+
}
|
|
220
|
+
```
|
|
221
|
+
|
|
186
222
|
### Keep Abstraction Levels Consistent
|
|
187
223
|
|
|
188
224
|
Within a single function, keep operations at the same granularity. Extract detailed operations into separate functions. Do not mix "what to do" with "how to do it."
|
|
@@ -319,11 +355,56 @@ Dependencies and triggers must match the conditions under which the behavior sho
|
|
|
319
355
|
| Rerun conditions correspond to URL, filters, explicit refresh actions, or other intended behavior | OK |
|
|
320
356
|
| Initialization and later refetch triggers are designed separately | OK |
|
|
321
357
|
|
|
358
|
+
## Contract Change Consistency
|
|
359
|
+
|
|
360
|
+
When changing contracts that other code or users depend on — types, interfaces, APIs, config schemas, persistence formats, events, or file formats — keep definitions, producers, consumers, and verification aligned in the same change.
|
|
361
|
+
|
|
362
|
+
| Criteria | Judgment |
|
|
363
|
+
|----------|----------|
|
|
364
|
+
| Only the contract definition is changed, while callers, producers, or readers are not updated | REJECT |
|
|
365
|
+
| A new argument, field, or config value is added but there is no route to pass it to consumers | REJECT |
|
|
366
|
+
| Fields or values not present in the documented schema/config format are used | REJECT |
|
|
367
|
+
| Mocks, fixtures, or test data return shapes that differ from the real contract | REJECT |
|
|
368
|
+
| The contract change and updates to callers, producers, and tests are made in the same change | OK |
|
|
369
|
+
|
|
322
370
|
## State Management
|
|
323
371
|
|
|
324
372
|
- Confine state to where it is used
|
|
325
373
|
- Children do not modify state directly (notify parents via events)
|
|
326
374
|
- State flow is unidirectional
|
|
375
|
+
- Do not keep derived values that can be computed from canonical state as independent state
|
|
376
|
+
- If multiple fields require constant synchronization, revisit the state model
|
|
377
|
+
|
|
378
|
+
| Criteria | Judgment |
|
|
379
|
+
|----------|----------|
|
|
380
|
+
| A value that can always be computed from one state is kept as another state | REJECT |
|
|
381
|
+
| Multiple states have invariants that must always stay in sync | REJECT |
|
|
382
|
+
| Persistence, sending, or diffing depends on derived values | REJECT |
|
|
383
|
+
| Only canonical state is stored, and derived values are generated at use sites or boundaries | OK |
|
|
384
|
+
|
|
385
|
+
## Unfinished Code
|
|
386
|
+
|
|
387
|
+
Do not leave TODO/FIXME comments, empty implementations, stubs, or commented-out old implementations as substitutes for completed code. Implement what is needed now and delete what is not needed.
|
|
388
|
+
|
|
389
|
+
| Criteria | Judgment |
|
|
390
|
+
|----------|----------|
|
|
391
|
+
| TODO/FIXME without an issue number, external blocker, and removal condition | REJECT |
|
|
392
|
+
| Authorization, validation, persistence, or error handling is deferred with TODO | REJECT |
|
|
393
|
+
| Empty implementations, `return null`, `pass`, or commented-out old implementations remain | REJECT |
|
|
394
|
+
| An external dependency or known blocker makes implementation impossible now, with issue number and removal condition documented | Acceptable |
|
|
395
|
+
| TODO only for future extension | REJECT |
|
|
396
|
+
|
|
397
|
+
## Sensitive Information Handling
|
|
398
|
+
|
|
399
|
+
Do not expose passwords, tokens, API keys, session IDs, auth headers, personal information, or other sensitive data in code, logs, error responses, or test output.
|
|
400
|
+
|
|
401
|
+
| Criteria | Judgment |
|
|
402
|
+
|----------|----------|
|
|
403
|
+
| Sensitive data is hardcoded in source code or config files | REJECT |
|
|
404
|
+
| Logs, exceptions, error responses, or test snapshots contain sensitive data | REJECT |
|
|
405
|
+
| Whole requests or DTOs are logged and may include sensitive fields | REJECT |
|
|
406
|
+
| Sensitive fields are explicitly omitted or masked | OK |
|
|
407
|
+
| Debug logs include personal data but are assumed disabled in production | Warning. Verify it cannot leak through misconfiguration |
|
|
327
408
|
|
|
328
409
|
## Error Handling
|
|
329
410
|
|
|
@@ -486,10 +567,11 @@ Verification approach:
|
|
|
486
567
|
- **Fallbacks are prohibited by default** - Do not write fallbacks using `?? 'unknown'`, `|| 'default'`, or swallowing via `try-catch`. Propagate errors upward. If absolutely necessary, add a comment explaining why
|
|
487
568
|
- **Explanatory comments** - Express intent through code. Do not write What/How comments
|
|
488
569
|
- **Unused code** - Do not write "just in case" code
|
|
570
|
+
- **Unfinished code** - Do not leave TODO/FIXME without an issue number, external blocker, and removal condition; do not leave stubs or commented-out old code
|
|
489
571
|
- **any type** - Do not break type safety
|
|
490
572
|
- **Direct mutation of objects/arrays** - Create new instances with spread operators
|
|
491
573
|
- **console.log** - Do not leave in production code
|
|
492
|
-
- **
|
|
574
|
+
- **Sensitive information exposure** - Do not include sensitive data in hardcoded values, logs, error responses, or test output
|
|
493
575
|
- **Scattered hardcoded contract strings** - File names and config key names must be defined as constants in one place. Scattered literals are prohibited
|
|
494
576
|
- **Scattered try-catch** - Centralize error handling at the upper layer
|
|
495
577
|
- **Unsolicited backward compatibility / legacy support** - Not needed unless explicitly instructed
|
|
@@ -497,6 +579,6 @@ Verification approach:
|
|
|
497
579
|
- **Replaced code surviving after refactoring** - Remove replaced code and exports. Do not keep unless explicitly told to
|
|
498
580
|
- **Workarounds that bypass safety mechanisms** - If the root fix is correct, no additional bypass is needed
|
|
499
581
|
- **Direct tool execution bypassing project scripts** - `npx tool` and similar bypass the lockfile, causing version mismatches. Look for project-defined scripts (npm scripts, Makefile, etc.) first. Only consider direct execution when no script exists
|
|
500
|
-
- **Missing wiring** - When adding new parameters or fields,
|
|
582
|
+
- **Missing wiring** - When adding new parameters or fields, search the entire call chain to verify. If callers do not pass the value, `options.xxx ?? fallback` always uses the fallback
|
|
501
583
|
- **Redundant conditionals** - When if/else calls the same function with only argument differences, unify using ternary operators or spread syntax
|
|
502
|
-
- **Copy-paste patterns** - Before writing new code,
|
|
584
|
+
- **Copy-paste patterns** - Before writing new code, search for existing implementations of the same kind and follow the existing pattern. Do not introduce your own style
|
|
@@ -22,7 +22,9 @@
|
|
|
22
22
|
|
|
23
23
|
| Pattern | Verdict |
|
|
24
24
|
|---------|---------|
|
|
25
|
-
|
|
|
25
|
+
| TODO/FIXME without an issue number, external blocker, and removal condition | REJECT |
|
|
26
|
+
| TODO/FIXME with issue number, external blocker, and removal condition | Warning |
|
|
27
|
+
| Empty implementations, stubs, or commented-out old implementations left behind | REJECT |
|
|
26
28
|
| @ts-ignore, @ts-expect-error without reason | Warning |
|
|
27
29
|
| eslint-disable without reason | Warning |
|
|
28
30
|
| Usage of deprecated APIs | Warning |
|
|
@@ -37,13 +37,15 @@ REJECT without exception if any of the following apply.
|
|
|
37
37
|
- Unused code ("just in case" code)
|
|
38
38
|
- Direct mutation of objects/arrays
|
|
39
39
|
- Swallowed errors (empty catch blocks)
|
|
40
|
-
- TODO
|
|
40
|
+
- TODO/FIXME without an issue number, external blocker, and removal condition
|
|
41
41
|
- Essentially identical logic duplicated (DRY violation)
|
|
42
42
|
- Method proliferation doing the same thing (should be absorbed by configuration differences)
|
|
43
43
|
- Specific implementation leaking into generic layers (imports and branching for specific implementations in generic layers)
|
|
44
44
|
- Internal implementation exported from public API (infrastructure functions or internal classes exposed publicly)
|
|
45
45
|
- Replaced code/exports surviving after refactoring
|
|
46
46
|
- Missing cross-validation of related fields (invariants of semantically coupled config values left unverified)
|
|
47
|
+
- Missing caller, producer, or test data updates after a contract change
|
|
48
|
+
- Sensitive data exposed in logs, error responses, or test output
|
|
47
49
|
|
|
48
50
|
A DRY finding is not complete unless the proposed consolidation target is also sound. A consolidation proposal is invalid unless all of the following hold.
|
|
49
51
|
|
|
@@ -59,7 +61,7 @@ Not blocking, but improvement is recommended.
|
|
|
59
61
|
- Tests coupled to implementation details
|
|
60
62
|
- Overly complex functions/files
|
|
61
63
|
- Unclear naming
|
|
62
|
-
-
|
|
64
|
+
- TODO/FIXME with issue number, external blocker, and removal condition
|
|
63
65
|
- `@ts-ignore` or `eslint-disable` without justification
|
|
64
66
|
|
|
65
67
|
### APPROVE
|
|
@@ -73,7 +75,7 @@ Always verify facts before raising an issue.
|
|
|
73
75
|
| Do | Do Not |
|
|
74
76
|
|----|--------|
|
|
75
77
|
| Open the file and check actual code | Assume "it should be fixed already" |
|
|
76
|
-
| Search for call sites and usages
|
|
78
|
+
| Search for call sites and usages | Raise issues based on memory |
|
|
77
79
|
| Cross-reference type definitions and schemas | Guess that code is dead |
|
|
78
80
|
| Distinguish generated files (reports, etc.) from source | Review generated files as if they were source code |
|
|
79
81
|
| Verify tool output is readable and uncorrupted | Raise issues based on garbled or abnormal output |
|
|
@@ -203,6 +205,36 @@ Do not tolerate problems just because existing code does the same. If existing c
|
|
|
203
205
|
- "The code itself existed before" is not a valid reason for non-blocking. As long as it is in a changed file, the Boy Scout rule applies
|
|
204
206
|
- If even one issue exists, REJECT. "APPROVE with warnings" or "APPROVE with suggestions" is prohibited
|
|
205
207
|
|
|
208
|
+
## Basic Review Procedure
|
|
209
|
+
|
|
210
|
+
Common procedure that every reviewer must follow. Do not duplicate this in individual instructions.
|
|
211
|
+
|
|
212
|
+
### Referring to Primary Sources
|
|
213
|
+
|
|
214
|
+
- Use `order.md`, `plan.md`, and the actual code as primary sources
|
|
215
|
+
- Treat decisions from earlier steps (prior review results, planning decisions) as supplementary
|
|
216
|
+
- When information conflicts, prioritize `order.md` / `plan.md` / actual code
|
|
217
|
+
|
|
218
|
+
### Referring to Design Decisions
|
|
219
|
+
|
|
220
|
+
- If the implementation step has emitted `coder-decisions.md`, read it and understand the recorded design decisions
|
|
221
|
+
- Do not dismiss intentional decisions as false positives just because they were recorded. Evaluate validity against `order.md` / `plan.md` / actual code
|
|
222
|
+
- If the design decision itself is flawed, raise it
|
|
223
|
+
|
|
224
|
+
### Tracking Findings from Previous Reviews
|
|
225
|
+
|
|
226
|
+
- Look in the Report Directory for review reports this step has previously produced, along with their timestamped history
|
|
227
|
+
- Treat the unsuffixed file as the latest result and the most recent `{report-name}.{timestamp}` as the previous result
|
|
228
|
+
- `Previous Response` may be used as supplementary information, but finding state determinations must prioritize the report history
|
|
229
|
+
- Do not drop open findings from the previous report when producing the new report
|
|
230
|
+
- Apply the `finding_id` management rules when classifying each finding as `new` / `persists` / `resolved` / `reopened`
|
|
231
|
+
|
|
232
|
+
### Final Decision Steps
|
|
233
|
+
|
|
234
|
+
1. Classify each detected issue as blocking / non-blocking according to the scope rules and decision rules above
|
|
235
|
+
2. When citing test, build, or behavior verification as evidence, record the target, the check, and the result in the report
|
|
236
|
+
3. REJECT if there is at least one blocking issue (`new`, `persists`, or `reopened`)
|
|
237
|
+
|
|
206
238
|
## Detecting Circular Arguments
|
|
207
239
|
|
|
208
240
|
When the same kind of issue keeps recurring, reconsider the approach itself rather than repeating the same fix instructions.
|