takt 0.47.0 → 0.48.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 +11 -0
- package/builtins/en/facets/instructions/fix-maintenance.md +1 -1
- package/builtins/en/facets/instructions/implement-maintenance.md +2 -2
- package/builtins/en/facets/instructions/plan-maintenance.md +3 -3
- package/builtins/en/facets/instructions/review-coding.md +6 -4
- package/builtins/en/facets/instructions/review-test.md +6 -1
- package/builtins/en/facets/knowledge/backend.md +2 -0
- package/builtins/en/facets/knowledge/cqrs-es.md +12 -0
- package/builtins/en/facets/knowledge/e2e-testing.md +13 -0
- package/builtins/en/facets/knowledge/existing-system.md +2 -2
- package/builtins/en/facets/knowledge/takt.md +11 -0
- package/builtins/en/facets/policies/existing-system-respect.md +17 -16
- package/builtins/en/facets/policies/testing.md +28 -0
- package/builtins/en/workflow-categories.yaml +1 -0
- package/builtins/en/workflows/backend-maintenance.yaml +540 -0
- package/builtins/en/workflows/draft.yaml +3 -1
- package/builtins/en/workflows/frontend-maintenance.yaml +1 -1
- package/builtins/en/workflows/frontend.yaml +1 -1
- package/builtins/ja/facets/instructions/fix-maintenance.md +1 -1
- package/builtins/ja/facets/instructions/implement-maintenance.md +2 -2
- package/builtins/ja/facets/instructions/plan-maintenance.md +3 -3
- package/builtins/ja/facets/instructions/review-coding.md +6 -4
- package/builtins/ja/facets/instructions/review-test.md +6 -1
- package/builtins/ja/facets/knowledge/backend.md +2 -0
- package/builtins/ja/facets/knowledge/cqrs-es.md +12 -0
- package/builtins/ja/facets/knowledge/e2e-testing.md +13 -0
- package/builtins/ja/facets/knowledge/existing-system.md +2 -2
- package/builtins/ja/facets/knowledge/takt.md +11 -0
- package/builtins/ja/facets/policies/existing-system-respect.md +17 -16
- package/builtins/ja/facets/policies/testing.md +28 -0
- package/builtins/ja/workflow-categories.yaml +1 -0
- package/builtins/ja/workflows/backend-maintenance.yaml +540 -0
- package/builtins/ja/workflows/draft.yaml +3 -1
- package/builtins/ja/workflows/frontend-maintenance.yaml +1 -1
- package/builtins/ja/workflows/frontend.yaml +1 -1
- package/dist/agents/decompose-task-usecase.d.ts +3 -1
- package/dist/agents/decompose-task-usecase.d.ts.map +1 -1
- package/dist/agents/decompose-task-usecase.js +2 -2
- package/dist/agents/decompose-task-usecase.js.map +1 -1
- package/dist/agents/runner.js +4 -4
- package/dist/agents/runner.js.map +1 -1
- package/dist/agents/structured-caller/capability-aware-structured-caller.d.ts +2 -2
- package/dist/agents/structured-caller/capability-aware-structured-caller.d.ts.map +1 -1
- package/dist/agents/structured-caller/capability-aware-structured-caller.js.map +1 -1
- package/dist/agents/structured-caller/contracts.d.ts +2 -2
- package/dist/agents/structured-caller/contracts.d.ts.map +1 -1
- package/dist/agents/structured-caller/default-structured-caller.d.ts +2 -2
- package/dist/agents/structured-caller/default-structured-caller.d.ts.map +1 -1
- package/dist/agents/structured-caller/default-structured-caller.js.map +1 -1
- package/dist/agents/structured-caller/prompt-based-structured-caller.d.ts +2 -2
- package/dist/agents/structured-caller/prompt-based-structured-caller.d.ts.map +1 -1
- package/dist/agents/structured-caller/prompt-based-structured-caller.js +2 -2
- package/dist/agents/structured-caller/prompt-based-structured-caller.js.map +1 -1
- package/dist/agents/team-leader-structured-output.d.ts +2 -2
- package/dist/agents/team-leader-structured-output.d.ts.map +1 -1
- package/dist/agents/team-leader-structured-output.js +42 -9
- package/dist/agents/team-leader-structured-output.js.map +1 -1
- package/dist/commands/repertoire/add.d.ts.map +1 -1
- package/dist/commands/repertoire/add.js +2 -3
- package/dist/commands/repertoire/add.js.map +1 -1
- package/dist/core/models/config-schemas.d.ts +26 -0
- package/dist/core/models/config-schemas.d.ts.map +1 -1
- package/dist/core/models/part.d.ts +7 -0
- package/dist/core/models/part.d.ts.map +1 -1
- package/dist/core/models/schema-base.d.ts +10 -0
- package/dist/core/models/schema-base.d.ts.map +1 -1
- package/dist/core/models/schema-base.js +2 -0
- package/dist/core/models/schema-base.js.map +1 -1
- package/dist/core/models/workflow-provider-options.d.ts +2 -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 +66 -0
- package/dist/core/models/workflow-schemas.d.ts.map +1 -1
- package/dist/core/models/workflow-schemas.js +2 -0
- package/dist/core/models/workflow-schemas.js.map +1 -1
- package/dist/core/workflow/engine/TeamLeaderRunner.d.ts.map +1 -1
- package/dist/core/workflow/engine/TeamLeaderRunner.js +6 -6
- package/dist/core/workflow/engine/TeamLeaderRunner.js.map +1 -1
- package/dist/core/workflow/engine/engine-provider-options.d.ts +1 -0
- package/dist/core/workflow/engine/engine-provider-options.d.ts.map +1 -1
- package/dist/core/workflow/engine/engine-provider-options.js +27 -0
- package/dist/core/workflow/engine/engine-provider-options.js.map +1 -1
- package/dist/core/workflow/engine/team-leader-common.d.ts +1 -0
- package/dist/core/workflow/engine/team-leader-common.d.ts.map +1 -1
- package/dist/core/workflow/engine/team-leader-common.js +13 -1
- package/dist/core/workflow/engine/team-leader-common.js.map +1 -1
- package/dist/core/workflow/observability/workflowSpans.d.ts.map +1 -1
- package/dist/core/workflow/observability/workflowSpans.js +2 -1
- package/dist/core/workflow/observability/workflowSpans.js.map +1 -1
- package/dist/core/workflow/promotion/promotion-runtime.d.ts.map +1 -1
- package/dist/core/workflow/promotion/promotion-runtime.js +3 -2
- package/dist/core/workflow/promotion/promotion-runtime.js.map +1 -1
- package/dist/core/workflow/providerOptionsRedaction.d.ts +4 -0
- package/dist/core/workflow/providerOptionsRedaction.d.ts.map +1 -0
- package/dist/core/workflow/providerOptionsRedaction.js +18 -0
- package/dist/core/workflow/providerOptionsRedaction.js.map +1 -0
- package/dist/features/interactive/clipboardImage.js +2 -2
- package/dist/features/interactive/clipboardImage.js.map +1 -1
- package/dist/features/tasks/execute/sessionLoggerRecordFactory.d.ts.map +1 -1
- package/dist/features/tasks/execute/sessionLoggerRecordFactory.js +2 -1
- package/dist/features/tasks/execute/sessionLoggerRecordFactory.js.map +1 -1
- package/dist/features/tasks/execute/workflowExecutionBootstrap.d.ts.map +1 -1
- package/dist/features/tasks/execute/workflowExecutionBootstrap.js +4 -0
- 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 +9 -0
- 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 +1 -0
- package/dist/infra/claude/client.js.map +1 -1
- package/dist/infra/claude/mcp-config.d.ts.map +1 -1
- package/dist/infra/claude/mcp-config.js +2 -2
- package/dist/infra/claude/mcp-config.js.map +1 -1
- package/dist/infra/claude/options-builder.d.ts.map +1 -1
- package/dist/infra/claude/options-builder.js +3 -0
- package/dist/infra/claude/options-builder.js.map +1 -1
- package/dist/infra/claude/types.d.ts +4 -0
- package/dist/infra/claude/types.d.ts.map +1 -1
- package/dist/infra/claude-headless/headless-spawn.d.ts.map +1 -1
- package/dist/infra/claude-headless/headless-spawn.js +3 -0
- package/dist/infra/claude-headless/headless-spawn.js.map +1 -1
- package/dist/infra/claude-headless/types.d.ts +2 -0
- package/dist/infra/claude-headless/types.d.ts.map +1 -1
- package/dist/infra/codex/client.d.ts.map +1 -1
- package/dist/infra/codex/client.js +1 -0
- package/dist/infra/codex/client.js.map +1 -1
- package/dist/infra/codex/types.d.ts +2 -0
- package/dist/infra/codex/types.d.ts.map +1 -1
- package/dist/infra/config/configNormalizers.d.ts +3 -2
- package/dist/infra/config/configNormalizers.d.ts.map +1 -1
- package/dist/infra/config/configNormalizers.js +19 -9
- package/dist/infra/config/configNormalizers.js.map +1 -1
- package/dist/infra/config/global/globalConfigCore.d.ts.map +1 -1
- package/dist/infra/config/global/globalConfigCore.js +2 -1
- package/dist/infra/config/global/globalConfigCore.js.map +1 -1
- package/dist/infra/config/loaders/workflowPreview.d.ts.map +1 -1
- package/dist/infra/config/loaders/workflowPreview.js +21 -9
- package/dist/infra/config/loaders/workflowPreview.js.map +1 -1
- package/dist/infra/config/loaders/workflowProviderOptionsResolver.js +8 -2
- package/dist/infra/config/loaders/workflowProviderOptionsResolver.js.map +1 -1
- package/dist/infra/config/loaders/workflowStepFeaturesNormalizer.d.ts.map +1 -1
- package/dist/infra/config/loaders/workflowStepFeaturesNormalizer.js +32 -1
- package/dist/infra/config/loaders/workflowStepFeaturesNormalizer.js.map +1 -1
- package/dist/infra/config/project/projectConfig.d.ts.map +1 -1
- package/dist/infra/config/project/projectConfig.js +12 -4
- package/dist/infra/config/project/projectConfig.js.map +1 -1
- package/dist/infra/config/providerOptions.d.ts +12 -5
- package/dist/infra/config/providerOptions.d.ts.map +1 -1
- package/dist/infra/config/providerOptions.js +112 -10
- package/dist/infra/config/providerOptions.js.map +1 -1
- package/dist/infra/config/providerOptionsContract.d.ts +4 -3
- package/dist/infra/config/providerOptionsContract.d.ts.map +1 -1
- package/dist/infra/config/providerOptionsContract.js +11 -0
- package/dist/infra/config/providerOptionsContract.js.map +1 -1
- package/dist/infra/config/providerReference.d.ts +3 -2
- package/dist/infra/config/providerReference.d.ts.map +1 -1
- package/dist/infra/config/providerReference.js +6 -6
- package/dist/infra/config/providerReference.js.map +1 -1
- package/dist/infra/config/resolveConfigValue.d.ts.map +1 -1
- package/dist/infra/config/resolveConfigValue.js +95 -25
- package/dist/infra/config/resolveConfigValue.js.map +1 -1
- package/dist/infra/config/traced/tracedConfigLoader.d.ts +3 -2
- package/dist/infra/config/traced/tracedConfigLoader.d.ts.map +1 -1
- package/dist/infra/config/traced/tracedConfigLoader.js +28 -4
- package/dist/infra/config/traced/tracedConfigLoader.js.map +1 -1
- package/dist/infra/config/traced/tracedConfigRuntimeBridge.d.ts.map +1 -1
- package/dist/infra/config/traced/tracedConfigRuntimeBridge.js +2 -2
- package/dist/infra/config/traced/tracedConfigRuntimeBridge.js.map +1 -1
- package/dist/infra/copilot/client.d.ts.map +1 -1
- package/dist/infra/copilot/client.js +3 -3
- package/dist/infra/copilot/client.js.map +1 -1
- package/dist/infra/providers/claude-headless.d.ts +1 -1
- package/dist/infra/providers/claude-headless.d.ts.map +1 -1
- package/dist/infra/providers/claude-headless.js +2 -1
- package/dist/infra/providers/claude-headless.js.map +1 -1
- package/dist/infra/providers/claude-terminal.d.ts +1 -1
- package/dist/infra/providers/claude-terminal.d.ts.map +1 -1
- package/dist/infra/providers/claude-terminal.js +1 -1
- package/dist/infra/providers/claude-terminal.js.map +1 -1
- package/dist/infra/providers/claude.d.ts +1 -1
- package/dist/infra/providers/claude.d.ts.map +1 -1
- package/dist/infra/providers/claude.js +2 -1
- package/dist/infra/providers/claude.js.map +1 -1
- package/dist/infra/providers/codex.d.ts +1 -1
- package/dist/infra/providers/codex.d.ts.map +1 -1
- package/dist/infra/providers/codex.js +2 -1
- package/dist/infra/providers/codex.js.map +1 -1
- package/dist/infra/providers/copilot.d.ts +1 -1
- package/dist/infra/providers/copilot.d.ts.map +1 -1
- package/dist/infra/providers/copilot.js +1 -1
- package/dist/infra/providers/copilot.js.map +1 -1
- package/dist/infra/providers/cursor.d.ts +1 -1
- package/dist/infra/providers/cursor.d.ts.map +1 -1
- package/dist/infra/providers/cursor.js +1 -1
- package/dist/infra/providers/cursor.js.map +1 -1
- package/dist/infra/providers/kiro.d.ts +1 -1
- package/dist/infra/providers/kiro.d.ts.map +1 -1
- package/dist/infra/providers/kiro.js +1 -1
- package/dist/infra/providers/kiro.js.map +1 -1
- package/dist/infra/providers/mock.d.ts +1 -1
- package/dist/infra/providers/mock.d.ts.map +1 -1
- package/dist/infra/providers/mock.js +1 -1
- package/dist/infra/providers/mock.js.map +1 -1
- package/dist/infra/providers/opencode.d.ts +1 -1
- package/dist/infra/providers/opencode.d.ts.map +1 -1
- package/dist/infra/providers/opencode.js +4 -1
- package/dist/infra/providers/opencode.js.map +1 -1
- package/dist/infra/providers/types.d.ts +1 -1
- package/dist/infra/providers/types.d.ts.map +1 -1
- package/dist/infra/task/projectLocalTaktSync.d.ts +1 -0
- package/dist/infra/task/projectLocalTaktSync.d.ts.map +1 -1
- package/dist/infra/task/projectLocalTaktSync.js +40 -0
- package/dist/infra/task/projectLocalTaktSync.js.map +1 -1
- package/dist/shared/team-leader-inspect-tools.d.ts +5 -0
- package/dist/shared/team-leader-inspect-tools.d.ts.map +1 -0
- package/dist/shared/team-leader-inspect-tools.js +8 -0
- package/dist/shared/team-leader-inspect-tools.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/dist/shared/utils/tmpdir.d.ts +2 -0
- package/dist/shared/utils/tmpdir.d.ts.map +1 -0
- package/dist/shared/utils/tmpdir.js +8 -0
- package/dist/shared/utils/tmpdir.js.map +1 -0
- package/package.json +10 -5
package/README.md
CHANGED
|
@@ -112,6 +112,15 @@ Optional:
|
|
|
112
112
|
npm install -g takt
|
|
113
113
|
```
|
|
114
114
|
|
|
115
|
+
With Nix flakes:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
nix run github:nrslib/takt
|
|
119
|
+
nix profile install github:nrslib/takt
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
The Nix package installs the TAKT CLI itself. External CLI providers, `git`, and `gh`/`glab` still need to be installed and available on `PATH` or configured separately as described in [Requirements](#requirements).
|
|
123
|
+
|
|
115
124
|
### Talk to AI and queue tasks
|
|
116
125
|
|
|
117
126
|
```
|
|
@@ -214,6 +223,8 @@ When the same workflow name exists in multiple locations, TAKT resolves in this
|
|
|
214
223
|
| `backend` | Backend development workflow. |
|
|
215
224
|
| `dual` | Combined frontend + backend workflow. |
|
|
216
225
|
| `takt-default` | The workflow used to develop TAKT itself. Directly applicable to other CLI tool development. |
|
|
226
|
+
| `frontend-maintenance` | Frontend production maintenance. Strict multi-phase review with loop monitors. |
|
|
227
|
+
| `backend-maintenance` | Backend production maintenance. Strict multi-phase review with dual-supervisor sign-off. |
|
|
217
228
|
| `*-mini` series | Lightweight variants of each workflow (`default-mini` / `frontend-mini` / `backend-mini` / `dual-mini`). Omits `write_tests`. |
|
|
218
229
|
|
|
219
230
|
See the [Builtin Catalog](./docs/builtin-catalog.md) for all workflows and personas.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Use reports in the Report Directory and fix reviewer findings
|
|
1
|
+
Use reports in the Report Directory and fix reviewer findings within the causally related scope while preserving existing contracts.
|
|
2
2
|
|
|
3
3
|
**Fix principles:**
|
|
4
4
|
- When a finding includes a "suggested fix", follow it rather than inventing your own workaround
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Implement according to the plan
|
|
1
|
+
Implement according to the plan within the causally related scope while preserving existing contracts.
|
|
2
2
|
Refer only to files within the Report Directory shown in the Workflow Context. Do not search or reference other report directories.
|
|
3
3
|
Use reports in the Report Directory as the primary source of truth. If additional context is needed, you may consult Previous Response and conversation history as secondary sources (Previous Response may be unavailable). If information conflicts, prioritize reports in the Report Directory and actual file contents.
|
|
4
4
|
|
|
@@ -14,7 +14,7 @@ Use reports in the Report Directory as the primary source of truth. If additiona
|
|
|
14
14
|
- Before implementation, classify planned changes as required, related, or unnecessary
|
|
15
15
|
- Implement only required and related changes
|
|
16
16
|
- Do not use a touched file as a reason to make style improvements, renames, file moves, hook return shape changes, comment deletions, or test expectation changes
|
|
17
|
-
-
|
|
17
|
+
- Do not make structural changes that are not causally related to the request
|
|
18
18
|
- When a specification change removes an old design, do not leave code or tests that only verify the absence of the old specification
|
|
19
19
|
- After implementation, inspect the full diff and revert unnecessary changes
|
|
20
20
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Analyze the task as maintenance work for an existing
|
|
1
|
+
Analyze the task as maintenance work for an existing feature and produce a causal-diff implementation plan that includes necessary design decisions.
|
|
2
2
|
|
|
3
3
|
**Note:** If Previous Response exists, treat it as a rework request and compare it with the current files before revising the plan.
|
|
4
4
|
|
|
@@ -29,7 +29,7 @@ For small tasks, omit the design section. In maintenance work, do not omit exist
|
|
|
29
29
|
- Same file, nearby responsibility, or common style is not enough to make a change related
|
|
30
30
|
- Do not assign unnecessary changes to the Coder
|
|
31
31
|
6. Decide file structure and design patterns when needed
|
|
32
|
-
-
|
|
32
|
+
- Where the request is not causally related, keep the existing structure even if it is not ideal
|
|
33
33
|
7. Decide the implementation approach
|
|
34
34
|
- Check that the approach does not violate Knowledge or Policy constraints
|
|
35
35
|
- For user-facing additions or changes, fix the reachability condition, entry point, and activation path
|
|
@@ -48,4 +48,4 @@ For small tasks, omit the design section. In maintenance work, do not omit exist
|
|
|
48
48
|
## Existing Contracts
|
|
49
49
|
- {Existing contracts to preserve}
|
|
50
50
|
## Implementation Plan
|
|
51
|
-
- {
|
|
51
|
+
- {Causal-diff plan}
|
|
@@ -8,7 +8,9 @@ Procedure:
|
|
|
8
8
|
5. If the diff adds or changes a shared helper, normalizer, builder, or adapter, verify that existing equivalent branches apply the same contract
|
|
9
9
|
6. If types, schemas, validators, or resolvers changed, verify that the corresponding contracts are updated in the same change
|
|
10
10
|
7. For values resolved or composed across multiple layers, trace the path from the real entry point through validation, not only standalone normalization
|
|
11
|
-
8.
|
|
12
|
-
9.
|
|
13
|
-
10. For
|
|
14
|
-
11.
|
|
11
|
+
8. If a non-execution entry displays, validates, or explains the same value, compare whether it resolves through the same normalized input, override order, and resolver as the primary execution path
|
|
12
|
+
9. When tests exist, verify that they cover the original requirement's branch conditions such as unset, set, invalid value, override, inherited, non-inherited, and unsupported target, not only value presence
|
|
13
|
+
10. For diffs involving side effects or state changes, trace entry, normal completion, early exit, exception, and cleanup paths
|
|
14
|
+
11. Include only issues caused by the current diff that the user should fix
|
|
15
|
+
12. For each finding, include location, impact, and fix direction
|
|
16
|
+
13. Do not report unsupported speculation, preference-only changes, or unrelated pre-existing issues
|
|
@@ -11,4 +11,9 @@ Procedure:
|
|
|
11
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
|
|
12
12
|
3. For changes involving side effects or state transitions, check whether representative failure paths are tested, not just the happy path
|
|
13
13
|
4. For changes that standardize a contract through consolidation or abstraction, check that contract tests cover existing equivalent branches as well as the new shared path
|
|
14
|
-
5.
|
|
14
|
+
5. For changes to config values, runtime-selected capabilities, backends, options, or permissions, verify that tests cover the original requirement's branch conditions such as unset, set, override, inherited, and non-inherited, not merely value presence
|
|
15
|
+
6. For changes where a non-execution entry displays, validates, or explains the same value, verify that tests check displayed values against the resolution input used during execution
|
|
16
|
+
7. Do not treat mock-substituted verification as proof that the real integration was verified
|
|
17
|
+
8. For prohibition, rejection, non-inheritance, unsupported targets, and isolation, verify that tests extract observable units and check each forbidden value instead of relying on exact-string absence alone
|
|
18
|
+
9. For new configuration boundaries, check normalization inputs such as empty strings, whitespace-only strings, empty arrays, and case variants when relevant
|
|
19
|
+
10. Verify that E2E timeout, cleanup, and forced-termination handling follows existing same-kind test conventions
|
|
@@ -218,6 +218,8 @@ Separate read and write entrypoints. Read-side query boundaries have no side eff
|
|
|
218
218
|
| Read-oriented class or method names hide side effects | REJECT |
|
|
219
219
|
| Simple read API calls a query boundary and converts to response DTO | OK |
|
|
220
220
|
| Simple state-changing API resolves structural validation and authorization boundary, then dispatches one command | OK |
|
|
221
|
+
| Read-side coordinator for Controllers handles authorization boundaries, multiple Read Models, pagination, etc. | Express as ApplicationService or ReadService |
|
|
222
|
+
| Sender or coordinating component named QueryService is placed near QueryHandlers | Warning. Easy to confuse with the query handling side |
|
|
221
223
|
| Controller contains multiple Read Model lookups, external integration, multiple commands, or result waiting | REJECT. Separate into UseCase layer |
|
|
222
224
|
| UseCase only delegates to another service or command dispatch without domain coordination | Consider deleting |
|
|
223
225
|
|
|
@@ -243,6 +243,18 @@ Event distribution uses PubSub (via message broker) to deliver events to all ins
|
|
|
243
243
|
| Command and Query responsibilities mixed in the same service | REJECT. Separate responsibility and naming |
|
|
244
244
|
| Query side checks existence or scope and caller dispatches command | OK |
|
|
245
245
|
|
|
246
|
+
### QueryHandler and ApplicationService Naming
|
|
247
|
+
|
|
248
|
+
In CQRS, the component that receives a query is the QueryHandler, and the entrypoint for dispatching queries is the QueryGateway / QueryBus. A facade called by Controllers for read use cases should be named ApplicationService or ReadService so it is not confused with a QueryHandler.
|
|
249
|
+
|
|
250
|
+
| Criteria | Judgment |
|
|
251
|
+
|----------|----------|
|
|
252
|
+
| Receives a Query, reads the Read Model, and returns a query result type | QueryHandler |
|
|
253
|
+
| Coordinates multiple Queries, authorization boundaries, pagination, or DTO assembly for Controllers | ApplicationService or ReadService |
|
|
254
|
+
| Class that only dispatches queries or coordinates reads is named QueryService | Warning. Easy to confuse with QueryHandler |
|
|
255
|
+
| QueryHandler knows HTTP requests/responses or Controller-specific error translation | REJECT |
|
|
256
|
+
| Simple read wrapper with no additional decision-making | Consider deleting. Controller may call QueryGateway directly |
|
|
257
|
+
|
|
246
258
|
Types between layers:
|
|
247
259
|
- `application/query/` - Query result types (e.g., `OrderDetail`)
|
|
248
260
|
- `adapter/protocol/` - REST response types (e.g., `OrderDetailResponse`)
|
|
@@ -28,6 +28,18 @@ E2E tests observe behavior visible to the user. Checking configuration values, l
|
|
|
28
28
|
| Only configuration or internal state is checked, with no user-visible result | REJECT |
|
|
29
29
|
| Only real external-environment verification exists, with no deterministic test for the main boundary | Warning or REJECT |
|
|
30
30
|
|
|
31
|
+
## Observing Negative Contracts
|
|
32
|
+
|
|
33
|
+
When E2E tests verify permissions, runtime-selected capabilities, backends, options, configuration, rejection, or isolation, a string-level negation across the whole output is weak evidence.
|
|
34
|
+
Extract the relevant line, event, record, field, or call argument, then check each forbidden value so order, case, whitespace, delimiters, or partial leaks cannot be missed.
|
|
35
|
+
|
|
36
|
+
| Criteria | Judgment |
|
|
37
|
+
|----------|----------|
|
|
38
|
+
| Treating rejection, non-inheritance, or isolation as verified only because one exact sentence is absent | REJECT |
|
|
39
|
+
| Checking only the displayed allowed value without proving forbidden values do not reach final processing | REJECT |
|
|
40
|
+
| Extracting observable units and checking forbidden, rejected, or non-inherited values per value | OK |
|
|
41
|
+
| Comparing allowed vs rejected and inherited vs non-inherited cases in the same scenario family | OK |
|
|
42
|
+
|
|
31
43
|
## UX Route Identification
|
|
32
44
|
|
|
33
45
|
E2E test completeness depends on thorough UX route identification. Identify entry points from code, not documentation.
|
|
@@ -77,6 +89,7 @@ E2E tests are prone to non-deterministic failures.
|
|
|
77
89
|
| Process leaks | Set timeouts and force-kill |
|
|
78
90
|
| Environment dependency | Explicitly set up prerequisites for test execution |
|
|
79
91
|
| Execution order dependency | Initialize state so each test runs independently |
|
|
92
|
+
| Timeout/cleanup diverges from existing convention | Follow existing same-kind E2E conventions |
|
|
80
93
|
|
|
81
94
|
```typescript
|
|
82
95
|
// NG - fixed sleep for timing
|
|
@@ -40,9 +40,9 @@ In maintenance work, general design improvements and framework style are not alw
|
|
|
40
40
|
|
|
41
41
|
| Situation | Judgment |
|
|
42
42
|
|-----------|----------|
|
|
43
|
-
| Component extraction would look cleaner but is
|
|
43
|
+
| Component extraction would look cleaner but is not causally related to the request | Do not change |
|
|
44
44
|
| Renaming or relocating Props types only to match common style | Do not change |
|
|
45
|
-
| The existing structure cannot satisfy the request | Change the
|
|
45
|
+
| The existing structure cannot satisfy the request | Change within the causally related scope |
|
|
46
46
|
| The existing structure is the cause of the bug | Change it with reason and impact scope documented |
|
|
47
47
|
|
|
48
48
|
## Meaning of Comments and Tests
|
|
@@ -77,6 +77,17 @@ Models resolve through 5-level priority. Higher takes precedence.
|
|
|
77
77
|
4. config.yaml (when resolved provider matches)
|
|
78
78
|
5. Provider default
|
|
79
79
|
|
|
80
|
+
## Auxiliary Entry Contracts
|
|
81
|
+
|
|
82
|
+
In TAKT, workflow runtime is not the only user-visible contract entry. Preview, doctor, workflow summary, validation, and report paths are also contract entries. Auxiliary entries that display or validate config values, providers, models, tools, permissions, or output contracts should use the same normalized input, resolver, and override order as runtime.
|
|
83
|
+
|
|
84
|
+
| Criteria | Judgment |
|
|
85
|
+
|----------|----------|
|
|
86
|
+
| Runtime and preview resolve provider, model, tool, or permission from different inputs | REJECT |
|
|
87
|
+
| Preview only displays a value without verifying the same override conditions as runtime | REJECT |
|
|
88
|
+
| Doctor or validation accepts config that fails at runtime due to different conditions | Warning |
|
|
89
|
+
| Runtime and auxiliary entries share the same normalized input or resolver | OK |
|
|
90
|
+
|
|
80
91
|
## Facet Assembly
|
|
81
92
|
|
|
82
93
|
The faceted-prompting module is independent from TAKT core.
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
# Existing System Respect Policy
|
|
2
2
|
|
|
3
|
-
For released or operational systems, make
|
|
3
|
+
For released or operational systems, make changes that are causally related to the request and do not change existing contracts that lack that relationship.
|
|
4
4
|
|
|
5
5
|
## Principles
|
|
6
6
|
|
|
7
7
|
| Principle | Criteria |
|
|
8
8
|
|-----------|----------|
|
|
9
9
|
| Existing contracts first | Preserve contracts relied on by users, tests, and operations |
|
|
10
|
-
|
|
|
10
|
+
| Causal diff | Make changes causally related to the request; exclude changes without causal relationship |
|
|
11
11
|
| Necessity over proximity | Do not use nearby code as a reason to change it |
|
|
12
|
-
| Respect existing structure | Do not change file placement, type names, public APIs, or responsibility boundaries without
|
|
12
|
+
| Respect existing structure | Do not change file placement, type names, public APIs, or responsibility boundaries without causal relationship to the request |
|
|
13
13
|
| Preserve comments | Do not delete comments that explain intent, constraints, or calculation rationale |
|
|
14
14
|
| Tests are contracts | Do not treat behavior asserted by existing tests as incidental |
|
|
15
|
-
|
|
|
16
|
-
|
|
|
15
|
+
| Causal improvement judgment | Perform style improvements and refactoring when causally related to the request. Do not mix improvements without causal relationship |
|
|
16
|
+
| Protect unrelated code | Prioritize preserving existing behavior and structure that is not causally related to the request |
|
|
17
17
|
|
|
18
18
|
## Change Boundary
|
|
19
19
|
|
|
@@ -22,21 +22,22 @@ For released or operational systems, make only the minimum changes required by t
|
|
|
22
22
|
| Change required to satisfy the request | OK |
|
|
23
23
|
| Call-site update required to wire a necessary change | OK |
|
|
24
24
|
| Local fix required to prevent side effects of a necessary change | OK |
|
|
25
|
+
| Structural change or refactoring causally related to the request | OK |
|
|
25
26
|
| Cleanup justified only because the file was touched | REJECT |
|
|
26
|
-
| Moving files, renaming types, or changing public APIs without
|
|
27
|
-
| Mixing framework-style improvements
|
|
28
|
-
| Including improvements
|
|
27
|
+
| Moving files, renaming types, or changing public APIs without causal relationship to the request | REJECT |
|
|
28
|
+
| Mixing framework-style improvements not causally related to the request | REJECT |
|
|
29
|
+
| Including improvements not causally related to the request | REJECT |
|
|
29
30
|
|
|
30
31
|
## Priority Against Other Policies
|
|
31
32
|
|
|
32
|
-
In existing-system maintenance, apply general quality policies such as coding, frontend, design-fidelity, and testing
|
|
33
|
+
In existing-system maintenance, apply general quality policies such as coding, frontend, design-fidelity, and testing within the scope causally related to the request.
|
|
33
34
|
|
|
34
35
|
| Conflict | Verdict |
|
|
35
36
|
|----------|---------|
|
|
36
|
-
| General quality criteria suggest an improvement, but
|
|
37
|
-
| Existing structure is imperfect, but
|
|
37
|
+
| General quality criteria suggest an improvement, but it is not causally related to the request | Do not change |
|
|
38
|
+
| Existing structure is imperfect, but not causally related to the request | Preserve existing structure |
|
|
38
39
|
| Satisfying a quality criterion requires changing an existing contract | Requires an explicit user request or plan-level rationale |
|
|
39
|
-
|
|
|
40
|
+
| Structural change causally related to the request | Make it with reason and impact scope documented |
|
|
40
41
|
|
|
41
42
|
## Observable Contracts
|
|
42
43
|
|
|
@@ -44,11 +45,11 @@ UI, accessibility, tests, logs, APIs, types, file placement, and comments can be
|
|
|
44
45
|
|
|
45
46
|
| Contract | Change condition |
|
|
46
47
|
|----------|------------------|
|
|
47
|
-
| UI copy, accessible names, role/state | Change only when
|
|
48
|
-
| Hook return values, Props type names, public function names | Change only when caller updates
|
|
48
|
+
| UI copy, accessible names, role/state | Change only when causally related to the request |
|
|
49
|
+
| Hook return values, Props type names, public function names | Change only when required for caller updates causally related to the request |
|
|
49
50
|
| Test expectations | Change only when the requested behavior changes |
|
|
50
51
|
| Comments | Change only when correcting inaccurate comments or when code makes them truly obsolete |
|
|
51
|
-
| File placement | Change only when
|
|
52
|
+
| File placement | Change only when causally related to the request |
|
|
52
53
|
|
|
53
54
|
## Test Changes
|
|
54
55
|
|
|
@@ -70,4 +71,4 @@ Before completion, classify the full diff as required changes, related changes,
|
|
|
70
71
|
|----------------|----------|
|
|
71
72
|
| Required change | The request fails without it |
|
|
72
73
|
| Related change | Needed to connect, verify, or keep a required change consistent |
|
|
73
|
-
| Unnecessary change |
|
|
74
|
+
| Unnecessary change | Not causally related to the request; justified only by readability, style, cleanup, or future extensibility |
|
|
@@ -13,6 +13,7 @@ Every behavior change requires a corresponding test, and every bug fix requires
|
|
|
13
13
|
| Type safety | Code must pass the build (type check) |
|
|
14
14
|
| Reproducibility | Do not depend on time or randomness. Same result every run |
|
|
15
15
|
| Do not freeze non-executable assets | Do not make prose or section structure that does not define runtime behavior a CI failure condition |
|
|
16
|
+
| Verify negative contracts at observable units | Do not pass prohibition, rejection, non-inheritance, or unsupported cases by exact-string absence alone |
|
|
16
17
|
|
|
17
18
|
## Coverage Criteria
|
|
18
19
|
|
|
@@ -113,6 +114,33 @@ When a change standardizes a contract through a shared helper, normalizer, build
|
|
|
113
114
|
| Return / throw / catch / early return paths in the changed function are not enumerated, causing representative failure paths to be missed | REJECT |
|
|
114
115
|
| Existing branches with the same responsibility have tests for return values, side effects, events, and error classification contracts | OK |
|
|
115
116
|
|
|
117
|
+
## Contract Test Sufficiency
|
|
118
|
+
|
|
119
|
+
When adding or changing a config value, runtime-selected capability, backend, option, permission, or output contract, tests must prove the branch conditions that change the contract, not merely that a value exists.
|
|
120
|
+
|
|
121
|
+
| Criteria | Verdict |
|
|
122
|
+
|----------|---------|
|
|
123
|
+
| Only the happy path for a new option is verified | Warning |
|
|
124
|
+
| Requirement-relevant branches among unset, set, invalid value, inherited, non-inherited, override, and unsupported target are not verified | REJECT |
|
|
125
|
+
| A user-facing display or validation entry is not verified to follow the same contract as the primary execution path | REJECT |
|
|
126
|
+
| A test only checks displayed values without verifying they match the resolution input used during execution | REJECT |
|
|
127
|
+
| Absence is verified only by exact string matching, missing order, case, whitespace, or partial-leak differences | REJECT |
|
|
128
|
+
| Boundary values that may be normalized at configuration boundaries, such as empty strings, whitespace-only strings, empty arrays, or case variants, are not tested | Warning. REJECT when this is a primary contract branch |
|
|
129
|
+
| The path from entry point to final call verifies happy, rejection, and non-inheritance cases | OK |
|
|
130
|
+
|
|
131
|
+
## Testing Negative, Non-Inheritance, and Rejection Contracts
|
|
132
|
+
|
|
133
|
+
Tests for prohibition, rejection, non-inheritance, unsupported targets, and isolation must not rely only on a specific string being absent from the whole output.
|
|
134
|
+
Extract observable units such as output lines, records, fields, or call arguments, then verify each forbidden value cannot leak through order, case, whitespace, delimiter, or partial-match differences.
|
|
135
|
+
|
|
136
|
+
| Criteria | Verdict |
|
|
137
|
+
|----------|---------|
|
|
138
|
+
| Exact-string absence alone is used to conclude that a forbidden or non-inherited value was not used | REJECT |
|
|
139
|
+
| Only allowed-value presence is checked, without proving rejected, forbidden, or non-inherited values do not reach final processing | REJECT |
|
|
140
|
+
| Observable units such as output lines, events, records, fields, or call arguments are extracted and checked per forbidden value | OK |
|
|
141
|
+
| Allowed vs rejected and inherited vs non-inherited cases are tested as pairs | OK |
|
|
142
|
+
| A new E2E test does not follow existing same-kind conventions for timeout, cleanup, and forced termination | Warning. REJECT when it can cause process leaks or flakes |
|
|
143
|
+
|
|
116
144
|
## Parser and Configuration Boundary Tests
|
|
117
145
|
|
|
118
146
|
At boundaries that read external files, configuration, YAML/JSON, or CLI input, testing only the ideal typed input is not sufficient.
|