takt 0.41.0 → 0.43.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 +59 -28
- package/builtins/en/config.yaml +9 -1
- package/builtins/en/facets/instructions/dual-team-leader-implement.md +7 -2
- package/builtins/en/facets/instructions/fix-maintenance.md +43 -0
- package/builtins/en/facets/instructions/implement-maintenance.md +72 -0
- package/builtins/en/facets/instructions/plan-maintenance.md +51 -0
- package/builtins/en/facets/instructions/review-coding.md +8 -0
- package/builtins/en/facets/instructions/supervise-maintenance.md +110 -0
- package/builtins/en/facets/instructions/team-leader-implement.md +6 -1
- package/builtins/en/facets/instructions/write-tests-first.md +5 -0
- package/builtins/en/facets/instructions/write-tests-maintenance.md +45 -0
- package/builtins/en/facets/knowledge/architecture.md +18 -13
- package/builtins/en/facets/knowledge/cqrs-es.md +48 -0
- package/builtins/en/facets/knowledge/existing-system.md +70 -0
- package/builtins/en/facets/knowledge/frontend.md +25 -0
- package/builtins/en/facets/knowledge/react.md +35 -0
- package/builtins/en/facets/output-contracts/coding-review.md +41 -0
- package/builtins/en/facets/output-contracts/frontend-review.md +1 -0
- package/builtins/en/facets/output-contracts/maintenance-scope.md +29 -0
- package/builtins/en/facets/personas/coding-reviewer.md +27 -0
- package/builtins/en/facets/personas/dual-supervisor.md +1 -1
- package/builtins/en/facets/policies/ai-antipattern.md +59 -0
- package/builtins/en/facets/policies/coding.md +85 -3
- package/builtins/en/facets/policies/existing-system-respect.md +73 -0
- package/builtins/en/facets/policies/qa.md +3 -1
- package/builtins/en/facets/policies/review.md +25 -12
- package/builtins/en/facets/policies/testing.md +33 -0
- package/builtins/en/workflow-categories.yaml +1 -0
- package/builtins/en/workflows/auto-improvement-loop.yaml +20 -4
- package/builtins/en/workflows/default-peer-review.yaml +25 -3
- package/builtins/en/workflows/frontend-maintenance.yaml +499 -0
- package/builtins/en/workflows/peer-review.yaml +23 -1
- package/builtins/en/workflows/review-fix-takt-default.yaml +30 -2
- package/builtins/ja/config.yaml +9 -1
- package/builtins/ja/facets/instructions/dual-team-leader-implement.md +7 -2
- package/builtins/ja/facets/instructions/fix-maintenance.md +43 -0
- package/builtins/ja/facets/instructions/implement-maintenance.md +72 -0
- package/builtins/ja/facets/instructions/plan-maintenance.md +51 -0
- package/builtins/ja/facets/instructions/review-coding.md +8 -0
- package/builtins/ja/facets/instructions/supervise-maintenance.md +110 -0
- package/builtins/ja/facets/instructions/team-leader-implement.md +6 -1
- package/builtins/ja/facets/instructions/write-tests-first.md +5 -0
- package/builtins/ja/facets/instructions/write-tests-maintenance.md +45 -0
- package/builtins/ja/facets/knowledge/architecture.md +18 -13
- package/builtins/ja/facets/knowledge/cqrs-es.md +48 -0
- package/builtins/ja/facets/knowledge/existing-system.md +70 -0
- package/builtins/ja/facets/knowledge/frontend.md +25 -0
- package/builtins/ja/facets/knowledge/react.md +35 -0
- package/builtins/ja/facets/output-contracts/coding-review.md +41 -0
- package/builtins/ja/facets/output-contracts/frontend-review.md +1 -0
- package/builtins/ja/facets/output-contracts/maintenance-scope.md +29 -0
- package/builtins/ja/facets/personas/coding-reviewer.md +27 -0
- package/builtins/ja/facets/personas/dual-supervisor.md +2 -2
- package/builtins/ja/facets/policies/ai-antipattern.md +59 -0
- package/builtins/ja/facets/policies/coding.md +85 -3
- package/builtins/ja/facets/policies/existing-system-respect.md +73 -0
- package/builtins/ja/facets/policies/qa.md +3 -1
- package/builtins/ja/facets/policies/review.md +25 -12
- package/builtins/ja/facets/policies/testing.md +33 -0
- package/builtins/ja/workflow-categories.yaml +1 -0
- package/builtins/ja/workflows/auto-improvement-loop.yaml +20 -4
- package/builtins/ja/workflows/default-peer-review.yaml +25 -3
- package/builtins/ja/workflows/frontend-maintenance.yaml +499 -0
- package/builtins/ja/workflows/peer-review.yaml +23 -1
- package/builtins/ja/workflows/review-fix-takt-default.yaml +30 -2
- package/builtins/skill/references/yaml-schema.md +8 -3
- package/builtins/skill-codex/references/yaml-schema.md +8 -3
- 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.map +1 -1
- package/dist/agents/structured-caller/prompt-based-structured-caller.js +5 -4
- package/dist/agents/structured-caller/prompt-based-structured-caller.js.map +1 -1
- package/dist/agents/team-leader-structured-output.d.ts.map +1 -1
- package/dist/agents/team-leader-structured-output.js +21 -0
- package/dist/agents/team-leader-structured-output.js.map +1 -1
- package/dist/app/cli/commands.js +7 -1
- package/dist/app/cli/commands.js.map +1 -1
- package/dist/app/cli/program.js +1 -1
- package/dist/app/cli/program.js.map +1 -1
- package/dist/app/cli/routing.d.ts.map +1 -1
- package/dist/app/cli/routing.js +8 -1
- package/dist/app/cli/routing.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 +160 -9
- package/dist/core/models/config-schemas.d.ts.map +1 -1
- package/dist/core/models/config-schemas.js +12 -2
- package/dist/core/models/config-schemas.js.map +1 -1
- package/dist/core/models/config-types.d.ts +30 -4
- 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/provider-profiles.d.ts +1 -1
- package/dist/core/models/provider-profiles.d.ts.map +1 -1
- package/dist/core/models/quality-gate-defaults.d.ts +2 -0
- package/dist/core/models/quality-gate-defaults.d.ts.map +1 -0
- package/dist/core/models/quality-gate-defaults.js +2 -0
- package/dist/core/models/quality-gate-defaults.js.map +1 -0
- package/dist/core/models/response.d.ts +1 -1
- 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 +80 -3
- package/dist/core/models/schema-base.d.ts.map +1 -1
- package/dist/core/models/schema-base.js +76 -2
- package/dist/core/models/schema-base.js.map +1 -1
- package/dist/core/models/types.d.ts +2 -2
- package/dist/core/models/types.d.ts.map +1 -1
- package/dist/core/models/workflow-provider-options.d.ts +7 -0
- package/dist/core/models/workflow-provider-options.d.ts.map +1 -1
- package/dist/core/models/workflow-schemas.d.ts +368 -51
- package/dist/core/models/workflow-schemas.d.ts.map +1 -1
- package/dist/core/models/workflow-system-input-types.d.ts +8 -1
- package/dist/core/models/workflow-system-input-types.d.ts.map +1 -1
- package/dist/core/models/workflow-system-schemas.d.ts +7 -1
- package/dist/core/models/workflow-system-schemas.d.ts.map +1 -1
- package/dist/core/models/workflow-system-schemas.js +12 -1
- package/dist/core/models/workflow-system-schemas.js.map +1 -1
- package/dist/core/models/workflow-types.d.ts +13 -5
- 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/engine/OptionsBuilder.d.ts +1 -0
- package/dist/core/workflow/engine/OptionsBuilder.d.ts.map +1 -1
- package/dist/core/workflow/engine/OptionsBuilder.js +9 -4
- package/dist/core/workflow/engine/OptionsBuilder.js.map +1 -1
- package/dist/core/workflow/engine/ParallelRunner.d.ts +11 -0
- package/dist/core/workflow/engine/ParallelRunner.d.ts.map +1 -1
- package/dist/core/workflow/engine/ParallelRunner.js +139 -19
- package/dist/core/workflow/engine/ParallelRunner.js.map +1 -1
- package/dist/core/workflow/engine/TeamLeaderRunner.d.ts.map +1 -1
- package/dist/core/workflow/engine/TeamLeaderRunner.js +55 -23
- package/dist/core/workflow/engine/TeamLeaderRunner.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 +29 -4
- package/dist/core/workflow/engine/WorkflowEngine.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 +8 -0
- package/dist/core/workflow/engine/WorkflowRunLoop.d.ts.map +1 -1
- package/dist/core/workflow/engine/WorkflowRunLoop.js +78 -7
- package/dist/core/workflow/engine/WorkflowRunLoop.js.map +1 -1
- package/dist/core/workflow/engine/team-leader-execution.d.ts +1 -0
- package/dist/core/workflow/engine/team-leader-execution.d.ts.map +1 -1
- package/dist/core/workflow/engine/team-leader-execution.js +22 -0
- package/dist/core/workflow/engine/team-leader-execution.js.map +1 -1
- package/dist/core/workflow/engine/team-leader-timeout-fallback.d.ts +13 -0
- package/dist/core/workflow/engine/team-leader-timeout-fallback.d.ts.map +1 -0
- package/dist/core/workflow/engine/team-leader-timeout-fallback.js +125 -0
- package/dist/core/workflow/engine/team-leader-timeout-fallback.js.map +1 -0
- package/dist/core/workflow/instruction/InstructionBuilder.d.ts.map +1 -1
- package/dist/core/workflow/instruction/InstructionBuilder.js +4 -3
- package/dist/core/workflow/instruction/InstructionBuilder.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/part-definition-validator.d.ts.map +1 -1
- package/dist/core/workflow/part-definition-validator.js +4 -0
- package/dist/core/workflow/part-definition-validator.js.map +1 -1
- 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 +1 -3
- 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/quality-gates/commandGateMessage.d.ts +4 -0
- package/dist/core/workflow/quality-gates/commandGateMessage.d.ts.map +1 -0
- package/dist/core/workflow/quality-gates/commandGateMessage.js +84 -0
- package/dist/core/workflow/quality-gates/commandGateMessage.js.map +1 -0
- package/dist/core/workflow/quality-gates/commandGateRunner.d.ts +3 -0
- package/dist/core/workflow/quality-gates/commandGateRunner.d.ts.map +1 -0
- package/dist/core/workflow/quality-gates/commandGateRunner.js +242 -0
- package/dist/core/workflow/quality-gates/commandGateRunner.js.map +1 -0
- package/dist/core/workflow/quality-gates/qualityGateRunner.d.ts +3 -0
- package/dist/core/workflow/quality-gates/qualityGateRunner.d.ts.map +1 -0
- package/dist/core/workflow/quality-gates/qualityGateRunner.js +29 -0
- package/dist/core/workflow/quality-gates/qualityGateRunner.js.map +1 -0
- package/dist/core/workflow/quality-gates/types.d.ts +41 -0
- package/dist/core/workflow/quality-gates/types.d.ts.map +1 -0
- package/dist/core/workflow/quality-gates/types.js +2 -0
- package/dist/core/workflow/quality-gates/types.js.map +1 -0
- package/dist/core/workflow/report-phase-runner.d.ts.map +1 -1
- package/dist/core/workflow/report-phase-runner.js +3 -2
- package/dist/core/workflow/report-phase-runner.js.map +1 -1
- package/dist/core/workflow/run/run-meta.d.ts +3 -1
- package/dist/core/workflow/run/run-meta.d.ts.map +1 -1
- package/dist/core/workflow/run/run-meta.js +2 -0
- package/dist/core/workflow/run/run-meta.js.map +1 -1
- package/dist/core/workflow/run/run-slug.d.ts +2 -0
- package/dist/core/workflow/run/run-slug.d.ts.map +1 -0
- package/dist/core/workflow/run/run-slug.js +19 -0
- package/dist/core/workflow/run/run-slug.js.map +1 -0
- 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 +16 -1
- package/dist/core/workflow/system/system-step-effect-runner.js.map +1 -1
- package/dist/core/workflow/team-leader-continuation-ids.d.ts +3 -0
- package/dist/core/workflow/team-leader-continuation-ids.d.ts.map +1 -0
- package/dist/core/workflow/team-leader-continuation-ids.js +6 -0
- package/dist/core/workflow/team-leader-continuation-ids.js.map +1 -0
- package/dist/core/workflow/types.d.ts +7 -1
- 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 +33 -11
- package/dist/features/interactive/conversationLoop.js.map +1 -1
- package/dist/features/interactive/imageAttachments.d.ts +20 -0
- package/dist/features/interactive/imageAttachments.d.ts.map +1 -0
- package/dist/features/interactive/imageAttachments.js +75 -0
- package/dist/features/interactive/imageAttachments.js.map +1 -0
- package/dist/features/interactive/index.d.ts +2 -1
- package/dist/features/interactive/index.d.ts.map +1 -1
- package/dist/features/interactive/index.js +1 -1
- package/dist/features/interactive/index.js.map +1 -1
- package/dist/features/interactive/inlineImagePaste.d.ts +21 -0
- package/dist/features/interactive/inlineImagePaste.d.ts.map +1 -0
- package/dist/features/interactive/inlineImagePaste.js +136 -0
- package/dist/features/interactive/inlineImagePaste.js.map +1 -0
- package/dist/features/interactive/instructModeTypes.d.ts +23 -0
- package/dist/features/interactive/instructModeTypes.d.ts.map +1 -0
- package/dist/features/interactive/instructModeTypes.js +2 -0
- package/dist/features/interactive/instructModeTypes.js.map +1 -0
- 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 +8 -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/interactiveInput.d.ts +2 -1
- package/dist/features/interactive/interactiveInput.d.ts.map +1 -1
- package/dist/features/interactive/interactiveInput.js +5 -1
- package/dist/features/interactive/interactiveInput.js.map +1 -1
- package/dist/features/interactive/lineEditor.d.ts +2 -0
- package/dist/features/interactive/lineEditor.d.ts.map +1 -1
- package/dist/features/interactive/lineEditor.js +130 -9
- 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 +8 -4
- package/dist/features/interactive/passthroughMode.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/quietMode.d.ts.map +1 -1
- package/dist/features/interactive/quietMode.js +12 -8
- package/dist/features/interactive/quietMode.js.map +1 -1
- package/dist/features/interactive/retryMode.d.ts +10 -13
- package/dist/features/interactive/retryMode.d.ts.map +1 -1
- package/dist/features/interactive/retryMode.js +42 -22
- package/dist/features/interactive/retryMode.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/index.d.ts +4 -0
- package/dist/features/tasks/add/index.d.ts.map +1 -1
- package/dist/features/tasks/add/index.js +12 -29
- package/dist/features/tasks/add/index.js.map +1 -1
- package/dist/features/tasks/attachments.d.ts +19 -0
- package/dist/features/tasks/attachments.d.ts.map +1 -0
- package/dist/features/tasks/attachments.js +129 -0
- package/dist/features/tasks/attachments.js.map +1 -0
- package/dist/features/tasks/execute/resolveTask.d.ts.map +1 -1
- package/dist/features/tasks/execute/resolveTask.js +4 -3
- package/dist/features/tasks/execute/resolveTask.js.map +1 -1
- package/dist/features/tasks/execute/runMeta.d.ts +5 -1
- package/dist/features/tasks/execute/runMeta.d.ts.map +1 -1
- package/dist/features/tasks/execute/runMeta.js +10 -4
- package/dist/features/tasks/execute/runMeta.js.map +1 -1
- package/dist/features/tasks/execute/selectAndExecute.d.ts.map +1 -1
- package/dist/features/tasks/execute/selectAndExecute.js +48 -4
- package/dist/features/tasks/execute/selectAndExecute.js.map +1 -1
- package/dist/features/tasks/execute/taskSpecContext.d.ts +7 -2
- package/dist/features/tasks/execute/taskSpecContext.d.ts.map +1 -1
- package/dist/features/tasks/execute/taskSpecContext.js +23 -36
- package/dist/features/tasks/execute/taskSpecContext.js.map +1 -1
- package/dist/features/tasks/execute/taskWorkflowExecution.d.ts.map +1 -1
- package/dist/features/tasks/execute/taskWorkflowExecution.js +2 -1
- package/dist/features/tasks/execute/taskWorkflowExecution.js.map +1 -1
- package/dist/features/tasks/execute/traceReportRedaction.d.ts +0 -1
- package/dist/features/tasks/execute/traceReportRedaction.d.ts.map +1 -1
- package/dist/features/tasks/execute/traceReportRedaction.js +1 -9
- package/dist/features/tasks/execute/traceReportRedaction.js.map +1 -1
- package/dist/features/tasks/execute/types.d.ts +8 -0
- package/dist/features/tasks/execute/types.d.ts.map +1 -1
- package/dist/features/tasks/execute/workflowExecution.d.ts.map +1 -1
- package/dist/features/tasks/execute/workflowExecution.js +12 -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 +7 -2
- package/dist/features/tasks/execute/workflowExecutionBootstrap.js.map +1 -1
- package/dist/features/tasks/index.d.ts +1 -0
- package/dist/features/tasks/index.d.ts.map +1 -1
- package/dist/features/tasks/index.js +1 -0
- package/dist/features/tasks/index.js.map +1 -1
- package/dist/features/tasks/list/instructMode.d.ts +2 -20
- package/dist/features/tasks/list/instructMode.d.ts.map +1 -1
- package/dist/features/tasks/list/instructMode.js +15 -4
- package/dist/features/tasks/list/instructMode.js.map +1 -1
- package/dist/features/tasks/list/retryTaskSpecAttachments.d.ts +8 -0
- package/dist/features/tasks/list/retryTaskSpecAttachments.d.ts.map +1 -0
- package/dist/features/tasks/list/retryTaskSpecAttachments.js +87 -0
- package/dist/features/tasks/list/retryTaskSpecAttachments.js.map +1 -0
- package/dist/features/tasks/list/taskInstructionActions.d.ts.map +1 -1
- package/dist/features/tasks/list/taskInstructionActions.js +20 -2
- package/dist/features/tasks/list/taskInstructionActions.js.map +1 -1
- package/dist/features/tasks/list/taskRetryActions.d.ts.map +1 -1
- package/dist/features/tasks/list/taskRetryActions.js +24 -6
- package/dist/features/tasks/list/taskRetryActions.js.map +1 -1
- package/dist/features/tasks/resume/directInstructMode.d.ts +13 -0
- package/dist/features/tasks/resume/directInstructMode.d.ts.map +1 -0
- package/dist/features/tasks/resume/directInstructMode.js +67 -0
- package/dist/features/tasks/resume/directInstructMode.js.map +1 -0
- package/dist/features/tasks/resume/directRunFinder.d.ts +7 -0
- package/dist/features/tasks/resume/directRunFinder.d.ts.map +1 -0
- package/dist/features/tasks/resume/directRunFinder.js +43 -0
- package/dist/features/tasks/resume/directRunFinder.js.map +1 -0
- package/dist/features/tasks/resume/index.d.ts +3 -0
- package/dist/features/tasks/resume/index.d.ts.map +1 -0
- package/dist/features/tasks/resume/index.js +229 -0
- package/dist/features/tasks/resume/index.js.map +1 -0
- package/dist/features/tasks/taskSpecFile.d.ts +2 -0
- package/dist/features/tasks/taskSpecFile.d.ts.map +1 -0
- package/dist/features/tasks/taskSpecFile.js +38 -0
- package/dist/features/tasks/taskSpecFile.js.map +1 -0
- package/dist/infra/claude/executor.d.ts.map +1 -1
- package/dist/infra/claude/executor.js +27 -6
- 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-headless/client.d.ts.map +1 -1
- package/dist/infra/claude-headless/client.js +5 -40
- package/dist/infra/claude-headless/client.js.map +1 -1
- package/dist/infra/claude-headless/result-response.js +1 -1
- 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/CodexStreamHandler.d.ts +4 -2
- package/dist/infra/codex/CodexStreamHandler.d.ts.map +1 -1
- package/dist/infra/codex/CodexStreamHandler.js +55 -21
- package/dist/infra/codex/CodexStreamHandler.js.map +1 -1
- package/dist/infra/codex/client.d.ts +2 -0
- package/dist/infra/codex/client.d.ts.map +1 -1
- package/dist/infra/codex/client.js +42 -6
- package/dist/infra/codex/client.js.map +1 -1
- package/dist/infra/config/configNormalizers.d.ts +23 -16
- package/dist/infra/config/configNormalizers.d.ts.map +1 -1
- package/dist/infra/config/configNormalizers.js +69 -7
- 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 +7 -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 +7 -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 +5 -0
- 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 -0
- 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/qualityGateOverrides.d.ts +3 -2
- package/dist/infra/config/loaders/qualityGateOverrides.d.ts.map +1 -1
- package/dist/infra/config/loaders/qualityGateOverrides.js +42 -3
- package/dist/infra/config/loaders/qualityGateOverrides.js.map +1 -1
- package/dist/infra/config/loaders/workflowFileLoader.d.ts.map +1 -1
- package/dist/infra/config/loaders/workflowFileLoader.js +2 -2
- package/dist/infra/config/loaders/workflowFileLoader.js.map +1 -1
- package/dist/infra/config/loaders/workflowNormalizationPolicies.d.ts +3 -1
- package/dist/infra/config/loaders/workflowNormalizationPolicies.d.ts.map +1 -1
- package/dist/infra/config/loaders/workflowNormalizationPolicies.js +28 -0
- package/dist/infra/config/loaders/workflowNormalizationPolicies.js.map +1 -1
- package/dist/infra/config/loaders/workflowParser.d.ts +2 -2
- package/dist/infra/config/loaders/workflowParser.d.ts.map +1 -1
- package/dist/infra/config/loaders/workflowParser.js +3 -2
- package/dist/infra/config/loaders/workflowParser.js.map +1 -1
- package/dist/infra/config/loaders/workflowStepNormalizer.d.ts.map +1 -1
- package/dist/infra/config/loaders/workflowStepNormalizer.js +2 -1
- 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 +23 -5
- package/dist/infra/config/project/projectConfig.js.map +1 -1
- package/dist/infra/config/project/projectConfigTransforms.d.ts +5 -1
- package/dist/infra/config/project/projectConfigTransforms.d.ts.map +1 -1
- package/dist/infra/config/project/projectConfigTransforms.js +8 -0
- package/dist/infra/config/project/projectConfigTransforms.js.map +1 -1
- package/dist/infra/config/providerOptions.d.ts +8 -2
- package/dist/infra/config/providerOptions.d.ts.map +1 -1
- package/dist/infra/config/providerOptions.js +49 -1
- 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 +14 -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/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.map +1 -1
- package/dist/infra/opencode/client.js +19 -15
- package/dist/infra/opencode/client.js.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/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 +2 -0
- package/dist/infra/rate-limit/detection.d.ts.map +1 -1
- package/dist/infra/rate-limit/detection.js +14 -1
- package/dist/infra/rate-limit/detection.js.map +1 -1
- 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 +2 -1
- package/dist/infra/task/clone.d.ts.map +1 -1
- package/dist/infra/task/clone.js +20 -3
- 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/task/projectLocalTaktSync.d.ts.map +1 -1
- package/dist/infra/task/projectLocalTaktSync.js +6 -2
- package/dist/infra/task/projectLocalTaktSync.js.map +1 -1
- package/dist/infra/task/runner.d.ts +2 -2
- package/dist/infra/task/runner.d.ts.map +1 -1
- package/dist/infra/task/runner.js +4 -4
- package/dist/infra/task/runner.js.map +1 -1
- package/dist/infra/task/taskRecordMutations.d.ts +1 -1
- package/dist/infra/task/taskRecordMutations.d.ts.map +1 -1
- package/dist/infra/task/taskRecordMutations.js +5 -1
- package/dist/infra/task/taskRecordMutations.js.map +1 -1
- package/dist/infra/task/taskRetryService.d.ts +2 -2
- package/dist/infra/task/taskRetryService.d.ts.map +1 -1
- package/dist/infra/task/taskRetryService.js +4 -4
- package/dist/infra/task/taskRetryService.js.map +1 -1
- 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 +5 -2
- 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/score_direct_instruct_system_prompt.md +63 -0
- package/dist/shared/prompts/en/score_retry_system_prompt.md +2 -2
- package/dist/shared/prompts/ja/score_direct_instruct_system_prompt.md +63 -0
- package/dist/shared/prompts/ja/score_retry_system_prompt.md +2 -2
- 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/sensitiveText.d.ts +2 -0
- package/dist/shared/utils/sensitiveText.d.ts.map +1 -0
- package/dist/shared/utils/sensitiveText.js +40 -0
- package/dist/shared/utils/sensitiveText.js.map +1 -0
- package/package.json +4 -2
|
@@ -212,6 +212,7 @@ Detect comments that simply restate code behavior in natural language.
|
|
|
212
212
|
| REJECT | JSDoc that only paraphrases the function name without adding information |
|
|
213
213
|
| OK | Explains why a particular implementation was chosen |
|
|
214
214
|
| OK | Explains the reason behind seemingly unusual behavior |
|
|
215
|
+
| OK | Explains the calculation basis or components of a constant or magic number |
|
|
215
216
|
| Best | No comment needed — the code itself communicates intent |
|
|
216
217
|
|
|
217
218
|
```typescript
|
|
@@ -238,6 +239,10 @@ if (status === 'interrupted') {
|
|
|
238
239
|
// OK - Reason behind seemingly odd behavior
|
|
239
240
|
// stay can cause loops, but is only used when explicitly specified by the user
|
|
240
241
|
return step.name;
|
|
242
|
+
|
|
243
|
+
// OK - Calculation basis for a constant
|
|
244
|
+
// paddingTop + paddingBottom + button height
|
|
245
|
+
const footerHeight = 24 + 12 + 48;
|
|
241
246
|
```
|
|
242
247
|
|
|
243
248
|
**Direct State Mutation Detection Criteria:**
|
|
@@ -374,14 +379,14 @@ Don't overlook compromises made to "just make it work."
|
|
|
374
379
|
| Swallowed errors | Empty `catch {}`, `rescue nil` |
|
|
375
380
|
| Magic numbers | Unexplained `if (status == 3)` |
|
|
376
381
|
|
|
377
|
-
##
|
|
382
|
+
## Unfinished Code Detection
|
|
378
383
|
|
|
379
|
-
|
|
384
|
+
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
385
|
|
|
381
|
-
TODO
|
|
386
|
+
TODO/FIXME without an issue number, external blocker, and removal condition is REJECT.
|
|
382
387
|
|
|
383
388
|
```kotlin
|
|
384
|
-
// REJECT -
|
|
389
|
+
// REJECT - Authorization check deferred with TODO
|
|
385
390
|
// TODO: Add authorization check by facility ID
|
|
386
391
|
fun deleteCustomHoliday(@PathVariable id: String) {
|
|
387
392
|
deleteCustomHolidayInputPort.execute(input)
|
|
@@ -398,12 +403,12 @@ fun deleteCustomHoliday(@PathVariable id: String) {
|
|
|
398
403
|
}
|
|
399
404
|
```
|
|
400
405
|
|
|
401
|
-
|
|
406
|
+
Acceptable TODO/FIXME cases:
|
|
402
407
|
|
|
403
408
|
| Condition | Example | Judgment |
|
|
404
409
|
|-----------|---------|----------|
|
|
405
|
-
| External dependency prevents implementation +
|
|
406
|
-
| Technical constraint prevents +
|
|
410
|
+
| External dependency prevents implementation + issue exists + removal condition documented | `// TODO(#123): Implement after API key obtained` | Acceptable |
|
|
411
|
+
| Technical constraint prevents implementation + issue exists + removal condition documented | `// TODO(#456): Waiting for library bug fix` | Acceptable |
|
|
407
412
|
| "Future implementation", "add later" | `// TODO: Add validation` | REJECT |
|
|
408
413
|
| "No time for now" | `// TODO: Refactor` | REJECT |
|
|
409
414
|
|
|
@@ -429,7 +434,7 @@ When NOT to apply DRY:
|
|
|
429
434
|
|
|
430
435
|
## Spec Compliance Verification
|
|
431
436
|
|
|
432
|
-
|
|
437
|
+
Contract-change consistency follows the coding policy. In architecture review, check whether changes contradict documented specifications, types, schemas, or config formats.
|
|
433
438
|
|
|
434
439
|
Verification targets:
|
|
435
440
|
|
|
@@ -460,10 +465,10 @@ REJECT when these patterns are found:
|
|
|
460
465
|
|
|
461
466
|
## Call Chain Verification
|
|
462
467
|
|
|
463
|
-
|
|
468
|
+
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
469
|
|
|
465
470
|
Verification steps:
|
|
466
|
-
1. When finding new optional parameters or interface fields,
|
|
471
|
+
1. When finding new optional parameters or interface fields, search all callers
|
|
467
472
|
2. Check if all callers pass the new parameter
|
|
468
473
|
3. If fallback value (`?? default`) exists, verify if fallback is used as intended
|
|
469
474
|
|
|
@@ -471,7 +476,7 @@ Danger patterns:
|
|
|
471
476
|
|
|
472
477
|
| Pattern | Problem | Detection |
|
|
473
478
|
|---------|---------|-----------|
|
|
474
|
-
| `options.xxx ?? fallback` where all callers omit `xxx` | Feature implemented but always falls back |
|
|
479
|
+
| `options.xxx ?? fallback` where all callers omit `xxx` | Feature implemented but always falls back | Check callers |
|
|
475
480
|
| Tests set values directly with mocks | Don't go through actual call chain | Check test construction |
|
|
476
481
|
| `executeXxx()` doesn't receive `options` it uses internally | No route to pass value from above | Check function signature |
|
|
477
482
|
|
|
@@ -493,12 +498,12 @@ Call chain verification applies not only to "missing wiring" but also to the rev
|
|
|
493
498
|
|
|
494
499
|
| Pattern | Problem | Detection |
|
|
495
500
|
|---------|---------|-----------|
|
|
496
|
-
| TTY check when all callers require TTY | Unreachable branch remains |
|
|
501
|
+
| TTY check when all callers require TTY | Unreachable branch remains | Check all callers' preconditions |
|
|
497
502
|
| Null guard when callers already check null | Redundant defense | Trace caller constraints |
|
|
498
503
|
| Runtime type check when TypeScript types constrain | Not trusting type safety | Check TypeScript type constraints |
|
|
499
504
|
|
|
500
505
|
Verification steps:
|
|
501
|
-
1. When finding defensive branches (TTY check, null guard, etc.),
|
|
506
|
+
1. When finding defensive branches (TTY check, null guard, etc.), check all callers
|
|
502
507
|
2. If all callers already guarantee the condition, guard is unnecessary → REJECT
|
|
503
508
|
3. If some callers don't guarantee it, keep the guard
|
|
504
509
|
|
|
@@ -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 |
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Existing System Knowledge
|
|
2
|
+
|
|
3
|
+
## Existing System Contracts
|
|
4
|
+
|
|
5
|
+
In an existing system, contracts are not limited to explicit APIs. Values and structures observed by users or developers also function as contracts. A small code change can affect production screens, tests, reviews, and maintenance workflows.
|
|
6
|
+
|
|
7
|
+
| Criteria | Judgment |
|
|
8
|
+
|----------|----------|
|
|
9
|
+
| User-visible copy or state changes | Contract change |
|
|
10
|
+
| A value asserted by tests changes | Contract change |
|
|
11
|
+
| Hook or component call shape changes | Contract change |
|
|
12
|
+
| Only file placement or type names change | May still be a maintenance contract change |
|
|
13
|
+
| Closed internal duplication is removed | Internal change if impact is contained |
|
|
14
|
+
|
|
15
|
+
## Diff Classification
|
|
16
|
+
|
|
17
|
+
Changes in existing systems are classified by causal relationship to the request. The question is whether the request requires the change, not whether the change is in a touched file.
|
|
18
|
+
|
|
19
|
+
| Classification | Decision criteria |
|
|
20
|
+
|----------------|-------------------|
|
|
21
|
+
| Required change | Directly required to satisfy the request |
|
|
22
|
+
| Related change | Required to wire, verify, or keep a required change consistent |
|
|
23
|
+
| Unnecessary change | The request still succeeds without it |
|
|
24
|
+
| Dangerous unnecessary change | The request still succeeds without it and it changes an existing contract |
|
|
25
|
+
|
|
26
|
+
### Boundary of Related Changes
|
|
27
|
+
|
|
28
|
+
A related change must have an explainable connection to a required change. Proximity, same file, or same responsibility is not enough.
|
|
29
|
+
|
|
30
|
+
| Example | Classification |
|
|
31
|
+
|---------|----------------|
|
|
32
|
+
| Updating callers after adding a required parameter | Related change |
|
|
33
|
+
| Deleting an old store after changing persistence boundary | Related change |
|
|
34
|
+
| Renaming a touched component's Props type by preference | Unnecessary change |
|
|
35
|
+
| Changing a hook return shape to a props object as cleanup | Dangerous unnecessary change |
|
|
36
|
+
|
|
37
|
+
## Conflicts With General Quality Criteria
|
|
38
|
+
|
|
39
|
+
In maintenance work, general design improvements and framework style are not always the highest priority. Even when the existing structure is imperfect, leaving it unchanged can be lower risk when the request does not require changing it.
|
|
40
|
+
|
|
41
|
+
| Situation | Judgment |
|
|
42
|
+
|-----------|----------|
|
|
43
|
+
| Component extraction would look cleaner but is unnecessary for this fix | Do not change |
|
|
44
|
+
| Renaming or relocating Props types only to match common style | Do not change |
|
|
45
|
+
| The existing structure cannot satisfy the request | Change the minimum necessary scope |
|
|
46
|
+
| The existing structure is the cause of the bug | Change it with reason and impact scope documented |
|
|
47
|
+
|
|
48
|
+
## Meaning of Comments and Tests
|
|
49
|
+
|
|
50
|
+
Comments and tests may preserve historical constraints or intent. Even comments that look explanatory can act like contracts when they document calculation rationale, platform constraints, or known workaround reasons.
|
|
51
|
+
|
|
52
|
+
| Target | Handling |
|
|
53
|
+
|--------|----------|
|
|
54
|
+
| Calculation rationale comments | Preserve |
|
|
55
|
+
| Constraint or workaround comments | Preserve |
|
|
56
|
+
| Comments contradicting code | Correct |
|
|
57
|
+
| Comments that only restate function names | May consider deleting |
|
|
58
|
+
| Existing test expectations | Treat as existing contracts |
|
|
59
|
+
|
|
60
|
+
## Maintenance Change Risk
|
|
61
|
+
|
|
62
|
+
For maintenance work, preserving existing behavior is more important than making new code look better. Even a technically good change increases review cost and regression risk when it is outside the request.
|
|
63
|
+
|
|
64
|
+
| Change | Risk |
|
|
65
|
+
|--------|------|
|
|
66
|
+
| Rename | Increases grep, history tracing, and review scope |
|
|
67
|
+
| File move | Changes ownership boundaries, imports, and history tracing |
|
|
68
|
+
| UI contract change | Changes user experience, assistive technology behavior, and tests |
|
|
69
|
+
| Test weakening | Reduces regression detection |
|
|
70
|
+
| Extra abstraction | Adds present understanding cost for future flexibility |
|
|
@@ -81,6 +81,18 @@ Third-party UI libraries such as data grids, date pickers, charts, and virtualiz
|
|
|
81
81
|
| The real component is rendered with representative props and verified not to crash at screen level | OK |
|
|
82
82
|
| Prop shapes are chosen by referencing existing in-project usage patterns and the installed version | OK |
|
|
83
83
|
|
|
84
|
+
### Accessibility Contracts
|
|
85
|
+
|
|
86
|
+
Accessible names, roles, and states are UI contracts consumed by assistive technologies and tests. Add appropriate accessibility attributes for new UI elements, but treat changes to existing accessibility contracts like other user-facing copy or behavior changes.
|
|
87
|
+
|
|
88
|
+
| Criteria | Judgment |
|
|
89
|
+
|----------|----------|
|
|
90
|
+
| A new interactive element has no accessible name | REJECT |
|
|
91
|
+
| Checked, expanded, disabled, or similar state is not exposed to assistive technologies | Warning |
|
|
92
|
+
| An existing accessible name is changed without being required by the task | REJECT |
|
|
93
|
+
| Existing accessible names are preserved while missing role/state is added | OK |
|
|
94
|
+
| The reason and impact scope for changing an existing contract are explicit | OK |
|
|
95
|
+
|
|
84
96
|
## State Management
|
|
85
97
|
|
|
86
98
|
Child components do not modify their own state. They bubble events to parent, and parent manipulates state.
|
|
@@ -117,6 +129,19 @@ Exception (OK for child to have local state):
|
|
|
117
129
|
| Inappropriate useEffect dependencies | REJECT |
|
|
118
130
|
| Initial load tied to unstable Context/Provider function references | REJECT |
|
|
119
131
|
|
|
132
|
+
### Canonical and Derived State
|
|
133
|
+
|
|
134
|
+
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.
|
|
135
|
+
|
|
136
|
+
| Criteria | Judgment |
|
|
137
|
+
|----------|----------|
|
|
138
|
+
| A value that can always be computed from one state is kept as another state | REJECT |
|
|
139
|
+
| Multiple state fields have invariants that require constant synchronization | REJECT |
|
|
140
|
+
| Display labels, counts, totals, all-selected flags, sorted results, or grouped results are kept as canonical state | REJECT |
|
|
141
|
+
| API sending, persistence, or diffing depends on derived state instead of canonical state | REJECT |
|
|
142
|
+
| Only canonical state is stored, and display, aggregation, and decisions are derived via selectors, render logic, or useMemo | OK |
|
|
143
|
+
| Derived values required by external contracts are generated from canonical state at send or persistence boundaries | OK |
|
|
144
|
+
|
|
120
145
|
State Placement Guidelines:
|
|
121
146
|
|
|
122
147
|
| State Nature | Recommended Placement |
|
|
@@ -120,6 +120,41 @@ When shared state is required, call the hook once in the nearest common parent a
|
|
|
120
120
|
| Multiple components call the same stateful hook independently when they need shared state | REJECT |
|
|
121
121
|
| A hook returns JSX | REJECT |
|
|
122
122
|
|
|
123
|
+
### Props Type Placement and Hook Boundaries
|
|
124
|
+
|
|
125
|
+
Props types that belong to a single component should generally live in the same file as that component. Separate type files are appropriate when the contract is shared by multiple components, is part of a public API, or has independent meaning as a domain model.
|
|
126
|
+
|
|
127
|
+
| Criteria | Judgment |
|
|
128
|
+
|----------|----------|
|
|
129
|
+
| A single component's private Props type is moved to a `types` file without a clear reason | Warning |
|
|
130
|
+
| Props are moved to a separate file only so a hook can import a component's Props type | REJECT |
|
|
131
|
+
| Shared Props/data contracts used by multiple components or public APIs live in a separate file | OK |
|
|
132
|
+
| A hook returns state, events, and derived values while a container maps them to component props | OK |
|
|
133
|
+
| Even when a hook returns a props-like object, the hook does not depend on the component's Props type | OK |
|
|
134
|
+
|
|
135
|
+
```tsx
|
|
136
|
+
// REJECT - the hook depends on a specific component's Props contract
|
|
137
|
+
import type { DialogProps } from './Dialog'
|
|
138
|
+
|
|
139
|
+
export function useDialog(): { dialogProps: DialogProps } {
|
|
140
|
+
return { dialogProps: { open, onOpenChange } }
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// OK - component-local Props stay with the component
|
|
144
|
+
interface DialogProps {
|
|
145
|
+
open: boolean
|
|
146
|
+
onOpenChange: (open: boolean) => void
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export function Dialog(props: DialogProps) {
|
|
150
|
+
return <Modal {...props} />
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// OK - the hook returns UI state and operations, and the caller passes them to the component
|
|
154
|
+
const dialog = useDialog()
|
|
155
|
+
return <Dialog open={dialog.open} onOpenChange={dialog.setOpen} />
|
|
156
|
+
```
|
|
157
|
+
|
|
123
158
|
## Handling exhaustive-deps
|
|
124
159
|
|
|
125
160
|
`react-hooks/exhaustive-deps` is not a rule to satisfy mechanically. If adding dependencies changes a mount-only effect into a loop, keep the effect mount-only and document why the suppression exists.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
```markdown
|
|
2
|
+
# Coding Review
|
|
3
|
+
|
|
4
|
+
## Result: APPROVE / REJECT
|
|
5
|
+
|
|
6
|
+
## Summary
|
|
7
|
+
{Summarize the review result in 1-2 sentences}
|
|
8
|
+
|
|
9
|
+
## Current Iteration Findings (new)
|
|
10
|
+
| # | finding_id | family_tag | Severity | Location | Issue | Impact | Fix Suggestion |
|
|
11
|
+
|---|------------|------------|----------|----------|-------|--------|----------------|
|
|
12
|
+
| 1 | CODE-NEW-src-file-L42 | bug | High / Medium / Low | `src/file.ts:42` | {Issue} | {Impact} | {Fix suggestion} |
|
|
13
|
+
|
|
14
|
+
## Carry-over Findings (persists)
|
|
15
|
+
| # | finding_id | family_tag | Previous Evidence | Current Evidence | Issue | Fix Suggestion |
|
|
16
|
+
|---|------------|------------|-------------------|------------------|-------|----------------|
|
|
17
|
+
| 1 | CODE-PERSIST-src-file-L77 | regression | `src/file.ts:77` | `src/file.ts:77` | {Unresolved issue} | {Fix suggestion} |
|
|
18
|
+
|
|
19
|
+
## Resolved Findings (resolved)
|
|
20
|
+
| finding_id | Resolution Evidence |
|
|
21
|
+
|------------|---------------------|
|
|
22
|
+
| CODE-RESOLVED-src-file-L10 | Resolved at `src/file.ts:10` |
|
|
23
|
+
|
|
24
|
+
## Reopened Findings (reopened)
|
|
25
|
+
| # | finding_id | family_tag | Prior Resolution Evidence | Recurrence Evidence | Issue | Fix Suggestion |
|
|
26
|
+
|---|------------|------------|--------------------------|---------------------|-------|----------------|
|
|
27
|
+
| 1 | CODE-REOPENED-src-file-L55 | bug | `Previously: src/file.ts:10` | `src/file.ts:55` | {Reopened issue} | {Fix suggestion} |
|
|
28
|
+
|
|
29
|
+
## Verification Evidence
|
|
30
|
+
- Diff review: {What was checked}
|
|
31
|
+
- Build: {Result, or state unverified}
|
|
32
|
+
- Tests: {Result, or state unverified}
|
|
33
|
+
|
|
34
|
+
## Rejection Gate
|
|
35
|
+
- REJECT only when at least one finding exists in `new`, `persists`, or `reopened`
|
|
36
|
+
- Findings without `finding_id` are invalid
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
**Cognitive load reduction rules:**
|
|
40
|
+
- APPROVE: Summary only (5 lines or fewer)
|
|
41
|
+
- REJECT: Include only relevant finding rows (30 lines or fewer)
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
```markdown
|
|
2
|
+
# Maintenance Change Scope
|
|
3
|
+
|
|
4
|
+
## Task
|
|
5
|
+
{One-line task summary}
|
|
6
|
+
|
|
7
|
+
## Required Changes
|
|
8
|
+
| File | Reason | Requirement Mapping |
|
|
9
|
+
|------|--------|---------------------|
|
|
10
|
+
| {File} | {Reason} | {Mapped requirement} |
|
|
11
|
+
|
|
12
|
+
## Related Changes
|
|
13
|
+
| File | Reason | Relation to Required Change |
|
|
14
|
+
|------|--------|-----------------------------|
|
|
15
|
+
| {File} | {Reason} | {Relation} |
|
|
16
|
+
|
|
17
|
+
## Existing Contracts Preserved
|
|
18
|
+
| Contract | Target | Preservation |
|
|
19
|
+
|----------|--------|--------------|
|
|
20
|
+
| {Contract type} | {Target} | {What is preserved} |
|
|
21
|
+
|
|
22
|
+
## Unnecessary Change Check
|
|
23
|
+
| Check Target | Result | Notes |
|
|
24
|
+
|--------------|--------|-------|
|
|
25
|
+
| Renames or moves | {Present/none} | {Notes} |
|
|
26
|
+
| UI copy or accessibility | {Present/none} | {Notes} |
|
|
27
|
+
| Comment deletion | {Present/none} | {Notes} |
|
|
28
|
+
| Test expectation changes | {Present/none} | {Notes} |
|
|
29
|
+
```
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Coding Reviewer
|
|
2
|
+
|
|
3
|
+
You are a code reviewer for an AI coding agent. You read the task intent and diff, then identify concrete implementation bugs, regressions, security risks, and missing tests.
|
|
4
|
+
|
|
5
|
+
## Role Boundaries
|
|
6
|
+
|
|
7
|
+
**Do:**
|
|
8
|
+
- Inspect the diff and nearby code
|
|
9
|
+
- Check whether the implementation works for the task intent
|
|
10
|
+
- Detect changes that break existing behavior
|
|
11
|
+
- Detect failures in error handling, edge cases, persistence, concurrency, and external integration
|
|
12
|
+
- Flag clear security or data-protection issues
|
|
13
|
+
- Flag missing tests or verification when they matter
|
|
14
|
+
|
|
15
|
+
**Don't:**
|
|
16
|
+
- Write code yourself
|
|
17
|
+
- Turn unsupported speculation into findings
|
|
18
|
+
- Require preference-only refactors
|
|
19
|
+
- Mix unrelated pre-existing issues into this review
|
|
20
|
+
|
|
21
|
+
## Behavioral Principles
|
|
22
|
+
|
|
23
|
+
- Ground findings in actual code, the diff, or execution evidence
|
|
24
|
+
- Do not include findings with weak fix justification
|
|
25
|
+
- Report higher-impact issues first
|
|
26
|
+
- State location, impact, and fix direction briefly and concretely
|
|
27
|
+
- Approve when there are no issues
|
|
@@ -138,7 +138,7 @@ When any of the following apply:
|
|
|
138
138
|
- **Stop loops**: Suggest design revision for 3+ iterations
|
|
139
139
|
- **Don't forget business value**: Value delivery over technical perfection
|
|
140
140
|
- **Consider context**: Judge according to project situation
|
|
141
|
-
- **Verify non-blocking classifications**: Always verify issues classified as "non-blocking," "existing problems," or "informational" by reviewers. If an issue in
|
|
141
|
+
- **Verify non-blocking classifications**: Always verify issues classified as "non-blocking," "existing problems," or "informational" by reviewers. If an issue in changed code or in an area directly related to correctness, contracts, or wiring of the change was marked as non-blocking, escalate it to blocking and REJECT
|
|
142
142
|
- **Do not invent command outcomes**: If there is no execution evidence, treat it as unverified
|
|
143
143
|
|
|
144
144
|
## Execution Evidence
|
|
@@ -144,15 +144,74 @@ AI tends to over-deliver. Check for unnecessary additions.
|
|
|
144
144
|
| Premature abstraction | Interfaces/abstractions for single implementations |
|
|
145
145
|
| Over-configuration | Making things configurable that don't need to be |
|
|
146
146
|
| Gold-plating | "Nice-to-have" additions not asked for |
|
|
147
|
+
| Extra changes disguised as related work | Cleanup, renames, or moves justified only because they are near the edited code |
|
|
148
|
+
| Incidental observable contract changes | Changing values observed by users or tests without being asked |
|
|
147
149
|
| Unnecessary legacy support | Adding mapping/normalization logic for old values without explicit instruction |
|
|
148
150
|
|
|
149
151
|
The best code is the minimum code that solves the problem.
|
|
150
152
|
|
|
153
|
+
### Extra Changes Disguised as Related Work
|
|
154
|
+
|
|
155
|
+
AI often justifies unnecessary cleanup as related work because it is "in the touched file", "near the same responsibility", or "more idiomatic". Whether a change is related is determined by causal necessity for the request, not by file proximity.
|
|
156
|
+
|
|
157
|
+
| Pattern | Verdict |
|
|
158
|
+
|---------|---------|
|
|
159
|
+
| Renaming, moving, or responsibility changes justified only because the file was touched | REJECT |
|
|
160
|
+
| Changing Props type names, return shapes, or public function names without direct implementation need | REJECT |
|
|
161
|
+
| Deleting existing comments after assuming they are merely explanatory | REJECT |
|
|
162
|
+
| Removing or weakening tested existing behavior just to make tests pass | REJECT |
|
|
163
|
+
| Mixing framework-style improvements without explicit request | REJECT |
|
|
164
|
+
| Adding parameters or updating call sites required to wire the new feature | OK |
|
|
165
|
+
| Deleting old implementation that is genuinely no longer used | OK |
|
|
166
|
+
|
|
167
|
+
Verification approach:
|
|
168
|
+
1. Obtain the entire cumulative diff from the task's starting point (the base) and list renames, moves, deletions, responsibility changes, and test expectation changes (do not look only at the most recent fix; unrelated changes buried in earlier iterations do not appear in the latest fix report)
|
|
169
|
+
2. For each change, ask whether the request fails without it
|
|
170
|
+
3. Do not accept "more readable", "more idiomatic", or "cleanup while here" as necessity
|
|
171
|
+
4. Revert changes whose necessity cannot be explained before completing the task
|
|
172
|
+
|
|
173
|
+
### Incidental Observable Contract Changes
|
|
174
|
+
|
|
175
|
+
AI often changes existing contracts under the banner of "improvement", "standardization", or "clarity" even when the task does not require it. UI copy, accessible names, event names, return values, error messages, log formats, public APIs, type names, file placement, comments, and behavior asserted by tests are observable contracts.
|
|
176
|
+
|
|
177
|
+
| Pattern | Verdict |
|
|
178
|
+
|---------|---------|
|
|
179
|
+
| Contract change unrelated to the request | REJECT |
|
|
180
|
+
| Tests are updated only to follow the new contract | REJECT |
|
|
181
|
+
| New contract required by new functionality | OK |
|
|
182
|
+
| Missing information is added while preserving the existing contract | OK |
|
|
183
|
+
| Reason, impact scope, and migration path for the contract change are explicit | OK |
|
|
184
|
+
|
|
185
|
+
Verification approach:
|
|
186
|
+
1. Inspect changed strings, attributes, event names, return values, error messages, and log formats in the diff
|
|
187
|
+
2. Check whether each one is directly required by the task
|
|
188
|
+
3. If test expectations merely follow implementation changes, check whether the original contract can be preserved
|
|
189
|
+
4. If the contract change is necessary, verify that reason and impact scope are explained
|
|
190
|
+
|
|
151
191
|
Legacy support criteria:
|
|
152
192
|
- Unless explicitly instructed to "support legacy values" or "maintain backward compatibility", legacy support is unnecessary
|
|
153
193
|
- Do not add `.transform()` normalization, `LEGACY_*_MAP` mappings, or `@deprecated` type definitions
|
|
154
194
|
- Support only new values and keep it simple
|
|
155
195
|
|
|
196
|
+
### Over-Abstracting with Function Objects
|
|
197
|
+
|
|
198
|
+
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.
|
|
199
|
+
|
|
200
|
+
| Pattern | Example | Verdict |
|
|
201
|
+
|---------|---------|---------|
|
|
202
|
+
| Single-use operation config array | Processing `[{ kind, fields, removedFields }]` in a loop | REJECT |
|
|
203
|
+
| Deletions, side effects, or exception cases are hidden in config objects | Readers must inspect config values to find destructive behavior | REJECT |
|
|
204
|
+
| Function object introduced when each branch is only 1-3 lines | `handlers[type]()` adds indirection only | REJECT |
|
|
205
|
+
| Strategy represents a domain concept and clarifies the implementation boundary | `TaxPolicy`, `PaymentMethod`, `RetryStrategy` | OK |
|
|
206
|
+
| Many branches share the same shape and are expected to grow | Consider a handler map | OK |
|
|
207
|
+
|
|
208
|
+
Verification approach:
|
|
209
|
+
1. Grep usage sites for added arrays, Maps, Strategies, or function objects
|
|
210
|
+
2. If used in only one place, check whether explicit branching would be clearer
|
|
211
|
+
3. Check whether side effects, deleted fields, or compatibility behavior are hidden in config objects
|
|
212
|
+
4. Prefer `when` / `switch` when branch names sufficiently express domain meaning
|
|
213
|
+
5. Allow Strategy when naming the concept improves understanding
|
|
214
|
+
|
|
156
215
|
## Premature Caching Strategy Introduction
|
|
157
216
|
|
|
158
217
|
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
|