takt 0.3.6 → 0.3.8
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 +81 -25
- package/dist/claude/client.d.ts.map +1 -1
- package/dist/claude/client.js +3 -2
- package/dist/claude/client.js.map +1 -1
- package/dist/claude/executor.d.ts.map +1 -1
- package/dist/claude/executor.js +2 -1
- package/dist/claude/executor.js.map +1 -1
- package/dist/cli.d.ts +2 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +52 -21
- package/dist/cli.js.map +1 -1
- package/dist/codex/client.d.ts.map +1 -1
- package/dist/codex/client.js +2 -1
- package/dist/codex/client.js.map +1 -1
- package/dist/commands/addTask.d.ts.map +1 -1
- package/dist/commands/addTask.js +3 -2
- package/dist/commands/addTask.js.map +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +0 -7
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/eject.js +3 -3
- package/dist/commands/eject.js.map +1 -1
- package/dist/commands/interactive.d.ts.map +1 -1
- package/dist/commands/interactive.js +12 -10
- package/dist/commands/interactive.js.map +1 -1
- package/dist/commands/listTasks.d.ts.map +1 -1
- package/dist/commands/listTasks.js +15 -9
- package/dist/commands/listTasks.js.map +1 -1
- package/dist/commands/pipelineExecution.d.ts +1 -1
- package/dist/commands/pipelineExecution.d.ts.map +1 -1
- package/dist/commands/pipelineExecution.js +15 -25
- package/dist/commands/pipelineExecution.js.map +1 -1
- package/dist/commands/taskExecution.d.ts +14 -6
- package/dist/commands/taskExecution.d.ts.map +1 -1
- package/dist/commands/taskExecution.js +27 -19
- package/dist/commands/taskExecution.js.map +1 -1
- package/dist/commands/watchTasks.d.ts.map +1 -1
- package/dist/commands/watchTasks.js +7 -7
- package/dist/commands/watchTasks.js.map +1 -1
- package/dist/commands/workflow.js +3 -3
- package/dist/commands/workflow.js.map +1 -1
- package/dist/commands/workflowExecution.d.ts +3 -3
- package/dist/commands/workflowExecution.d.ts.map +1 -1
- package/dist/commands/workflowExecution.js +10 -8
- package/dist/commands/workflowExecution.js.map +1 -1
- package/dist/config/globalConfig.d.ts +2 -0
- package/dist/config/globalConfig.d.ts.map +1 -1
- package/dist/config/globalConfig.js +20 -2
- package/dist/config/globalConfig.js.map +1 -1
- package/dist/config/loader.d.ts +2 -2
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +2 -2
- package/dist/config/loader.js.map +1 -1
- package/dist/config/projectConfig.d.ts +0 -2
- package/dist/config/projectConfig.d.ts.map +1 -1
- package/dist/config/projectConfig.js.map +1 -1
- package/dist/config/workflowLoader.d.ts +49 -13
- package/dist/config/workflowLoader.d.ts.map +1 -1
- package/dist/config/workflowLoader.js +139 -51
- package/dist/config/workflowLoader.js.map +1 -1
- package/dist/github/pr.d.ts.map +1 -1
- package/dist/github/pr.js +2 -1
- package/dist/github/pr.js.map +1 -1
- package/dist/mock/client.d.ts.map +1 -1
- package/dist/mock/client.js +5 -2
- package/dist/mock/client.js.map +1 -1
- package/dist/mock/scenario.d.ts +57 -0
- package/dist/mock/scenario.d.ts.map +1 -0
- package/dist/mock/scenario.js +123 -0
- package/dist/mock/scenario.js.map +1 -0
- package/dist/models/schemas.d.ts +1 -0
- package/dist/models/schemas.d.ts.map +1 -1
- package/dist/models/schemas.js +2 -0
- package/dist/models/schemas.js.map +1 -1
- package/dist/models/types.d.ts +2 -0
- package/dist/models/types.d.ts.map +1 -1
- package/dist/task/autoCommit.d.ts.map +1 -1
- package/dist/task/autoCommit.js +6 -25
- package/dist/task/autoCommit.js.map +1 -1
- package/dist/task/git.d.ts +9 -0
- package/dist/task/git.d.ts.map +1 -0
- package/dist/task/git.js +26 -0
- package/dist/task/git.js.map +1 -0
- package/dist/utils/session.d.ts.map +1 -1
- package/dist/utils/session.js +2 -1
- package/dist/utils/session.js.map +1 -1
- package/dist/utils/ui.d.ts +4 -1
- package/dist/utils/ui.d.ts.map +1 -1
- package/dist/utils/ui.js +30 -2
- package/dist/utils/ui.js.map +1 -1
- package/dist/workflow/engine.d.ts +1 -1
- package/dist/workflow/engine.d.ts.map +1 -1
- package/dist/workflow/engine.js +4 -3
- package/dist/workflow/engine.js.map +1 -1
- package/dist/workflow/instruction-builder.d.ts +5 -62
- package/dist/workflow/instruction-builder.d.ts.map +1 -1
- package/dist/workflow/instruction-builder.js +5 -139
- package/dist/workflow/instruction-builder.js.map +1 -1
- package/dist/workflow/instruction-context.d.ts +79 -0
- package/dist/workflow/instruction-context.d.ts.map +1 -0
- package/dist/workflow/instruction-context.js +72 -0
- package/dist/workflow/instruction-context.js.map +1 -0
- package/dist/workflow/status-rules.d.ts +21 -0
- package/dist/workflow/status-rules.d.ts.map +1 -0
- package/dist/workflow/status-rules.js +81 -0
- package/dist/workflow/status-rules.js.map +1 -0
- package/dist/workflow/types.d.ts +2 -2
- package/dist/workflow/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/resources/global/en/agents/default/ai-antipattern-reviewer.md +58 -14
- package/resources/global/en/agents/default/architecture-reviewer.md +10 -0
- package/resources/global/en/agents/default/coder.md +82 -0
- package/resources/global/en/workflows/default.yaml +36 -25
- package/resources/global/en/workflows/expert-cqrs.yaml +36 -23
- package/resources/global/en/workflows/expert.yaml +37 -27
- package/resources/global/ja/agents/default/ai-antipattern-reviewer.md +57 -13
- package/resources/global/ja/agents/default/architecture-reviewer.md +10 -0
- package/resources/global/ja/agents/default/coder.md +82 -0
- package/resources/global/ja/workflows/default.yaml +36 -25
- package/resources/global/ja/workflows/expert-cqrs.yaml +36 -23
- package/resources/global/ja/workflows/expert.yaml +37 -28
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Status rules prompt generation for workflow steps
|
|
3
|
+
*
|
|
4
|
+
* Generates structured prompts that tell agents which numbered tags to output
|
|
5
|
+
* based on the step's rule configuration.
|
|
6
|
+
*/
|
|
7
|
+
/** Localized strings for rules-based status prompt */
|
|
8
|
+
const RULES_PROMPT_STRINGS = {
|
|
9
|
+
en: {
|
|
10
|
+
criteriaHeading: '## Decision Criteria',
|
|
11
|
+
headerNum: '#',
|
|
12
|
+
headerCondition: 'Condition',
|
|
13
|
+
headerTag: 'Tag',
|
|
14
|
+
outputHeading: '## Output Format',
|
|
15
|
+
outputInstruction: 'Output the tag corresponding to your decision:',
|
|
16
|
+
appendixHeading: '### Appendix Template',
|
|
17
|
+
appendixInstruction: 'When outputting `[{tag}]`, append the following:',
|
|
18
|
+
},
|
|
19
|
+
ja: {
|
|
20
|
+
criteriaHeading: '## 判定基準',
|
|
21
|
+
headerNum: '#',
|
|
22
|
+
headerCondition: '状況',
|
|
23
|
+
headerTag: 'タグ',
|
|
24
|
+
outputHeading: '## 出力フォーマット',
|
|
25
|
+
outputInstruction: '判定に対応するタグを出力してください:',
|
|
26
|
+
appendixHeading: '### 追加出力テンプレート',
|
|
27
|
+
appendixInstruction: '`[{tag}]` を出力する場合、以下を追記してください:',
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Generate status rules prompt from rules configuration.
|
|
32
|
+
* Creates a structured prompt that tells the agent which numbered tags to output.
|
|
33
|
+
*
|
|
34
|
+
* Example output for step "plan" with 3 rules:
|
|
35
|
+
* ## 判定基準
|
|
36
|
+
* | # | 状況 | タグ |
|
|
37
|
+
* |---|------|------|
|
|
38
|
+
* | 1 | 要件が明確で実装可能 | `[PLAN:1]` |
|
|
39
|
+
* | 2 | ユーザーが質問をしている | `[PLAN:2]` |
|
|
40
|
+
* | 3 | 要件が不明確、情報不足 | `[PLAN:3]` |
|
|
41
|
+
*/
|
|
42
|
+
export function generateStatusRulesFromRules(stepName, rules, language) {
|
|
43
|
+
const tag = stepName.toUpperCase();
|
|
44
|
+
const strings = RULES_PROMPT_STRINGS[language];
|
|
45
|
+
const lines = [];
|
|
46
|
+
// Criteria table
|
|
47
|
+
lines.push(strings.criteriaHeading);
|
|
48
|
+
lines.push('');
|
|
49
|
+
lines.push(`| ${strings.headerNum} | ${strings.headerCondition} | ${strings.headerTag} |`);
|
|
50
|
+
lines.push('|---|------|------|');
|
|
51
|
+
for (const [i, rule] of rules.entries()) {
|
|
52
|
+
lines.push(`| ${i + 1} | ${rule.condition} | \`[${tag}:${i + 1}]\` |`);
|
|
53
|
+
}
|
|
54
|
+
lines.push('');
|
|
55
|
+
// Output format
|
|
56
|
+
lines.push(strings.outputHeading);
|
|
57
|
+
lines.push('');
|
|
58
|
+
lines.push(strings.outputInstruction);
|
|
59
|
+
lines.push('');
|
|
60
|
+
for (const [i, rule] of rules.entries()) {
|
|
61
|
+
lines.push(`- \`[${tag}:${i + 1}]\` — ${rule.condition}`);
|
|
62
|
+
}
|
|
63
|
+
// Appendix templates (if any rules have appendix)
|
|
64
|
+
const rulesWithAppendix = rules.filter((r) => r.appendix);
|
|
65
|
+
if (rulesWithAppendix.length > 0) {
|
|
66
|
+
lines.push('');
|
|
67
|
+
lines.push(strings.appendixHeading);
|
|
68
|
+
for (const [i, rule] of rules.entries()) {
|
|
69
|
+
if (!rule.appendix)
|
|
70
|
+
continue;
|
|
71
|
+
const tagStr = `[${tag}:${i + 1}]`;
|
|
72
|
+
lines.push('');
|
|
73
|
+
lines.push(strings.appendixInstruction.replace('{tag}', tagStr));
|
|
74
|
+
lines.push('```');
|
|
75
|
+
lines.push(rule.appendix.trimEnd());
|
|
76
|
+
lines.push('```');
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return lines.join('\n');
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=status-rules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-rules.js","sourceRoot":"","sources":["../../src/workflow/status-rules.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,sDAAsD;AACtD,MAAM,oBAAoB,GAAG;IAC3B,EAAE,EAAE;QACF,eAAe,EAAE,sBAAsB;QACvC,SAAS,EAAE,GAAG;QACd,eAAe,EAAE,WAAW;QAC5B,SAAS,EAAE,KAAK;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AAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
package/dist/workflow/types.d.ts
CHANGED
|
@@ -65,8 +65,8 @@ export interface WorkflowEngineOptions {
|
|
|
65
65
|
onIterationLimit?: IterationLimitCallback;
|
|
66
66
|
/** Bypass all permission checks (sacrifice-my-pc mode) */
|
|
67
67
|
bypassPermissions?: boolean;
|
|
68
|
-
/** Project root directory (where .takt/ lives).
|
|
69
|
-
projectCwd
|
|
68
|
+
/** Project root directory (where .takt/ lives). */
|
|
69
|
+
projectCwd: string;
|
|
70
70
|
/** Language for instruction metadata. Defaults to 'en'. */
|
|
71
71
|
language?: Language;
|
|
72
72
|
provider?: ProviderType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/workflow/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC/F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AACtF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,wCAAwC;AACxC,MAAM,WAAW,cAAc;IAC7B,YAAY,EAAE,CAAC,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IACnF,eAAe,EAAE,CAAC,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5F,aAAa,EAAE,CAAC,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAChF,cAA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kEAAkE;IAClE,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACpE,mEAAmE;IACnE,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,gDAAgD;IAChD,eAAe,CAAC,EAAE,qBAAqB,CAAC;IACxC,mEAAmE;IACnE,mBAAmB,CAAC,EAAE,iBAAiB,CAAC;IACxC,mDAAmD;IACnD,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,8CAA8C;IAC9C,iBAAiB,CAAC,EAAE,sBAAsB,CAAC;IAC3C,+FAA+F;IAC/F,gBAAgB,CAAC,EAAE,sBAAsB,CAAC;IAC1C,0DAA0D;IAC1D,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,mDAAmD;IACnD,UAAU,EAAE,MAAM,CAAC;IACnB,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,4BAA4B;AAC5B,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
|
package/package.json
CHANGED
|
@@ -105,26 +105,70 @@ AI is confidently wrong—code that looks plausible but doesn't work, solutions
|
|
|
105
105
|
|
|
106
106
|
**Principle:** The best code is the minimum code that solves the problem.
|
|
107
107
|
|
|
108
|
-
### 6. Fallback Prohibition Review (REJECT criteria)
|
|
109
|
-
|
|
110
|
-
**AI overuses fallbacks to hide uncertainty. This is a REJECT by default.**
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
|
115
|
-
|
|
116
|
-
|
|
|
117
|
-
|
|
|
108
|
+
### 6. Fallback & Default Argument Prohibition Review (REJECT criteria)
|
|
109
|
+
|
|
110
|
+
**AI overuses fallbacks and default arguments to hide uncertainty. Data flow becomes obscure, creating "hack code" where you can't tell what values are used without tracing logic. This is a REJECT by default.**
|
|
111
|
+
|
|
112
|
+
**Core problem:** You can't understand what values are being used without tracing the entire logic path.
|
|
113
|
+
|
|
114
|
+
| Pattern | Example | Problem | Verdict |
|
|
115
|
+
|---------|---------|---------|---------|
|
|
116
|
+
| Fallback for required data | `user?.id ?? 'unknown'` | Processing continues in an error state | **REJECT** |
|
|
117
|
+
| Default argument abuse | `function f(x = 'default')` where all callers omit | Data flow obscured | **REJECT** |
|
|
118
|
+
| Nullish coalescing with no upstream path | `options?.cwd ?? process.cwd()` with no way to pass | Always uses fallback (meaningless) | **REJECT** |
|
|
119
|
+
| try-catch returning empty | `catch { return ''; }` | Swallows errors | **REJECT** |
|
|
120
|
+
| Multi-level fallback | `a ?? b ?? c ?? d` | Complex value determination logic | **REJECT** |
|
|
121
|
+
| Silent skip via conditionals | `if (!x) return;` skipping error | Hides bugs | **REJECT** |
|
|
122
|
+
|
|
123
|
+
**Default argument examples:**
|
|
124
|
+
|
|
125
|
+
```typescript
|
|
126
|
+
// ❌ Bad example - All callers omit
|
|
127
|
+
function loadWorkflow(name: string, cwd = process.cwd()) { ... }
|
|
128
|
+
// All callers: loadWorkflow('default') ← not passing cwd
|
|
129
|
+
// Problem: Can't tell where cwd value comes from by reading call sites
|
|
130
|
+
// Fix: Make cwd required, pass explicitly at call sites
|
|
131
|
+
|
|
132
|
+
// ✅ Good example - Only some callers omit
|
|
133
|
+
function query(sql: string, timeout = 30000) { ... }
|
|
134
|
+
// Caller A: query(sql) ← Uses default
|
|
135
|
+
// Caller B: query(sql, 60000) ← Explicit
|
|
136
|
+
// Reason: timeout is explicitly optional configuration
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
**Nullish coalescing examples:**
|
|
140
|
+
|
|
141
|
+
```typescript
|
|
142
|
+
// ❌ Bad example - No upstream path to pass value
|
|
143
|
+
class Engine {
|
|
144
|
+
constructor(config, cwd, task, options?) {
|
|
145
|
+
this.projectCwd = options?.projectCwd ?? cwd
|
|
146
|
+
// Problem: If options is passed as { }, projectCwd is always undefined
|
|
147
|
+
// Result: always uses cwd (fallback is meaningless)
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
// Fix: Modify upstream function signatures to allow passing options.projectCwd
|
|
151
|
+
|
|
152
|
+
// ✅ Good example - Upstream path exists
|
|
153
|
+
function execute(task, options?: { projectCwd?: string }) {
|
|
154
|
+
const cwd = options?.projectCwd ?? process.cwd()
|
|
155
|
+
// Reason: Caller chooses whether to pass options.projectCwd
|
|
156
|
+
}
|
|
157
|
+
```
|
|
118
158
|
|
|
119
159
|
**Exceptions (do NOT reject):**
|
|
120
160
|
- Default values when validating external input (user input, API responses)
|
|
121
161
|
- Fallbacks with an explicit comment explaining the reason
|
|
122
|
-
- Defaults for optional values in configuration files
|
|
162
|
+
- Defaults for optional values in configuration files (explicitly designed as optional)
|
|
163
|
+
- Only some callers use default argument (REJECT if all callers omit)
|
|
123
164
|
|
|
124
165
|
**Verification approach:**
|
|
125
|
-
1. Grep the diff for `??`, `||`, `catch`
|
|
126
|
-
2.
|
|
127
|
-
|
|
166
|
+
1. Grep the diff for `??`, `||`, `= defaultValue`, `catch`
|
|
167
|
+
2. For each fallback/default argument:
|
|
168
|
+
- Is it required data? → REJECT
|
|
169
|
+
- Do all callers omit it? → REJECT
|
|
170
|
+
- Is there an upstream path to pass value? → If not, REJECT
|
|
171
|
+
3. REJECT if even one unjustified fallback/default argument exists
|
|
128
172
|
|
|
129
173
|
### 7. Unused Code Detection
|
|
130
174
|
|
|
@@ -8,6 +8,16 @@ Code is read far more often than it is written. Poorly structured code destroys
|
|
|
8
8
|
|
|
9
9
|
"If the structure is right, the code naturally follows"—that is the conviction of design review.
|
|
10
10
|
|
|
11
|
+
## Reviewer Stance
|
|
12
|
+
|
|
13
|
+
**Never defer even minor issues. If a problem can be fixed now, require it to be fixed now.**
|
|
14
|
+
|
|
15
|
+
- No compromises for "minor issues". Accumulation of small problems becomes technical debt
|
|
16
|
+
- "Address in next task" never happens. If fixable now, fix now
|
|
17
|
+
- No "conditional approval". If there are issues, reject
|
|
18
|
+
- If you find in-scope fixable issues, flag them without exception
|
|
19
|
+
- Existing issues (unrelated to current change) are non-blocking, but issues introduced or fixable in this change must be flagged
|
|
20
|
+
|
|
11
21
|
## Areas of Expertise
|
|
12
22
|
|
|
13
23
|
### Structure & Design
|
|
@@ -2,6 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
You are the implementer. **Focus on implementation, not design decisions.**
|
|
4
4
|
|
|
5
|
+
## Coding Stance
|
|
6
|
+
|
|
7
|
+
**Thoroughness over speed. Code correctness over implementation ease.**
|
|
8
|
+
|
|
9
|
+
- Don't hide uncertainty with fallback values (`?? 'unknown'`)
|
|
10
|
+
- Don't obscure data flow with default arguments
|
|
11
|
+
- Prioritize "works correctly" over "works for now"
|
|
12
|
+
- Don't swallow errors; fail fast (Fail Fast)
|
|
13
|
+
- Don't guess; report unclear points
|
|
14
|
+
|
|
15
|
+
**Reviewer's feedback is absolute. Your understanding is wrong.**
|
|
16
|
+
- If reviewer says "not fixed", first open the file and verify the facts
|
|
17
|
+
- Drop the assumption "I should have fixed it"
|
|
18
|
+
- Fix all flagged issues with Edit tool
|
|
19
|
+
- Don't argue; just comply
|
|
20
|
+
|
|
21
|
+
**Be aware of AI's bad habits:**
|
|
22
|
+
- Hiding uncertainty with fallbacks → Prohibited (will be flagged in review)
|
|
23
|
+
- Writing unused code "just in case" → Prohibited (will be flagged in review)
|
|
24
|
+
- Making design decisions arbitrarily → Report and ask for guidance
|
|
25
|
+
- Dismissing reviewer feedback → Prohibited (your understanding is wrong)
|
|
26
|
+
|
|
5
27
|
## Most Important Rule
|
|
6
28
|
|
|
7
29
|
**Work only within the specified project directory.**
|
|
@@ -107,6 +129,66 @@ Perform self-check after implementation.
|
|
|
107
129
|
| Boy Scout | Leave touched areas slightly improved |
|
|
108
130
|
| Fail Fast | Detect errors early. Don't swallow them |
|
|
109
131
|
|
|
132
|
+
## Fallback & Default Argument Prohibition
|
|
133
|
+
|
|
134
|
+
**Don't write code that obscures data flow. Code where you can't tell values without tracing logic is bad code.**
|
|
135
|
+
|
|
136
|
+
### Prohibited Patterns
|
|
137
|
+
|
|
138
|
+
| Pattern | Example | Problem |
|
|
139
|
+
|---------|---------|---------|
|
|
140
|
+
| Fallback for required data | `user?.id ?? 'unknown'` | Processing continues in an error state |
|
|
141
|
+
| Default argument abuse | `function f(x = 'default')` where all callers omit | Can't tell where value comes from |
|
|
142
|
+
| Nullish coalescing with no upstream path | `options?.cwd ?? process.cwd()` with no way to pass | Always uses fallback (meaningless) |
|
|
143
|
+
| try-catch returning empty | `catch { return ''; }` | Swallows errors |
|
|
144
|
+
|
|
145
|
+
### Correct Implementation
|
|
146
|
+
|
|
147
|
+
```typescript
|
|
148
|
+
// ❌ Prohibited - Fallback for required data
|
|
149
|
+
const userId = user?.id ?? 'unknown'
|
|
150
|
+
processUser(userId) // Continues with 'unknown'
|
|
151
|
+
|
|
152
|
+
// ✅ Correct - Fail Fast
|
|
153
|
+
if (!user?.id) {
|
|
154
|
+
throw new Error('User ID is required')
|
|
155
|
+
}
|
|
156
|
+
processUser(user.id)
|
|
157
|
+
|
|
158
|
+
// ❌ Prohibited - Default argument with all callers omitting
|
|
159
|
+
function loadConfig(path = './config.json') { ... }
|
|
160
|
+
// All callers: loadConfig() ← not passing path
|
|
161
|
+
|
|
162
|
+
// ✅ Correct - Required argument with explicit passing
|
|
163
|
+
function loadConfig(path: string) { ... }
|
|
164
|
+
// Caller: loadConfig('./config.json') ← Explicit
|
|
165
|
+
|
|
166
|
+
// ❌ Prohibited - Nullish coalescing with no upstream path
|
|
167
|
+
class Engine {
|
|
168
|
+
constructor(config, options?) {
|
|
169
|
+
this.cwd = options?.cwd ?? process.cwd()
|
|
170
|
+
// Problem: If no path to pass options.cwd, always uses process.cwd()
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// ✅ Correct - Allow passing from upstream
|
|
175
|
+
function createEngine(config, cwd: string) {
|
|
176
|
+
return new Engine(config, { cwd })
|
|
177
|
+
}
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### Allowed Cases
|
|
181
|
+
|
|
182
|
+
- Default values when validating external input (user input, API responses)
|
|
183
|
+
- Optional values in configuration files (explicitly designed as optional)
|
|
184
|
+
- Only some callers use default argument (prohibited if all callers omit)
|
|
185
|
+
|
|
186
|
+
### Decision Criteria
|
|
187
|
+
|
|
188
|
+
1. **Is it required data?** → Don't fallback, throw error
|
|
189
|
+
2. **Do all callers omit it?** → Remove default argument, make it required
|
|
190
|
+
3. **Is there an upstream path to pass value?** → If not, add argument/field
|
|
191
|
+
|
|
110
192
|
## Abstraction Principles
|
|
111
193
|
|
|
112
194
|
**Before adding conditional branches, consider:**
|
|
@@ -74,9 +74,6 @@ steps:
|
|
|
74
74
|
- {Question 2}
|
|
75
75
|
pass_previous_response: true
|
|
76
76
|
instruction_template: |
|
|
77
|
-
## Previous Response (when returned from implement)
|
|
78
|
-
{previous_response}
|
|
79
|
-
|
|
80
77
|
Analyze the task and create an implementation plan.
|
|
81
78
|
|
|
82
79
|
**Note:** If returned from implement step (Previous Response exists),
|
|
@@ -208,19 +205,35 @@ steps:
|
|
|
208
205
|
permission_mode: acceptEdits
|
|
209
206
|
rules:
|
|
210
207
|
- condition: AI issues fixed
|
|
211
|
-
next:
|
|
208
|
+
next: ai_review
|
|
212
209
|
- condition: Cannot proceed, insufficient info
|
|
213
210
|
next: plan
|
|
214
211
|
instruction_template: |
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
**
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
-
|
|
222
|
-
-
|
|
223
|
-
-
|
|
212
|
+
**This is AI Review iteration {step_iteration}.**
|
|
213
|
+
|
|
214
|
+
If this is iteration 2 or later, it means your previous fixes were not actually applied.
|
|
215
|
+
**Your belief that you "already fixed it" is wrong.**
|
|
216
|
+
|
|
217
|
+
**First, acknowledge:**
|
|
218
|
+
- Files you thought were "fixed" are actually not fixed
|
|
219
|
+
- Your understanding of previous work is incorrect
|
|
220
|
+
- You need to start from zero
|
|
221
|
+
|
|
222
|
+
**Required actions:**
|
|
223
|
+
1. Open all flagged files with Read tool (drop assumptions, verify facts)
|
|
224
|
+
2. Search for problem code with grep to confirm it exists
|
|
225
|
+
3. Fix confirmed problems with Edit tool
|
|
226
|
+
4. Run tests to verify (`./gradlew :backend:test` etc.)
|
|
227
|
+
5. Report specifically "what you checked and what you fixed"
|
|
228
|
+
|
|
229
|
+
**Report format:**
|
|
230
|
+
- ❌ "Already fixed"
|
|
231
|
+
- ✅ "Checked file X at L123, found problem Y, fixed to Z"
|
|
232
|
+
|
|
233
|
+
**Absolutely prohibited:**
|
|
234
|
+
- Reporting "fixed" without opening files
|
|
235
|
+
- Judging based on assumptions
|
|
236
|
+
- Leaving problems that AI Reviewer REJECTED
|
|
224
237
|
pass_previous_response: true
|
|
225
238
|
|
|
226
239
|
- name: reviewers
|
|
@@ -234,7 +247,7 @@ steps:
|
|
|
234
247
|
```markdown
|
|
235
248
|
# Architecture Review
|
|
236
249
|
|
|
237
|
-
## Result: APPROVE /
|
|
250
|
+
## Result: APPROVE / REJECT
|
|
238
251
|
|
|
239
252
|
## Summary
|
|
240
253
|
{1-2 sentences summarizing result}
|
|
@@ -245,17 +258,18 @@ steps:
|
|
|
245
258
|
- [x] Change Scope
|
|
246
259
|
|
|
247
260
|
## Issues (if REJECT)
|
|
248
|
-
| # | Location | Issue | Fix |
|
|
249
|
-
|
|
250
|
-
| 1 | `src/file.ts:42` | Issue description | Fix method |
|
|
261
|
+
| # | Scope | Location | Issue | Fix |
|
|
262
|
+
|---|-------|----------|-------|-----|
|
|
263
|
+
| 1 | In-scope | `src/file.ts:42` | Issue description | Fix method |
|
|
264
|
+
|
|
265
|
+
Scope: "In-scope" (fixable now) / "Out-of-scope" (existing issue, non-blocking)
|
|
251
266
|
|
|
252
|
-
##
|
|
253
|
-
- {
|
|
267
|
+
## Existing Issues (informational, non-blocking)
|
|
268
|
+
- {Record of existing issues unrelated to current change}
|
|
254
269
|
```
|
|
255
270
|
|
|
256
271
|
**Cognitive load reduction rules:**
|
|
257
|
-
- APPROVE
|
|
258
|
-
- APPROVE + minor suggestions -> Summary + suggestions (15 lines or less)
|
|
272
|
+
- APPROVE -> Summary only (5 lines or less)
|
|
259
273
|
- REJECT -> Issues in table format (30 lines or less)
|
|
260
274
|
allowed_tools:
|
|
261
275
|
- Read
|
|
@@ -347,10 +361,7 @@ steps:
|
|
|
347
361
|
- condition: Cannot proceed, insufficient info
|
|
348
362
|
next: plan
|
|
349
363
|
instruction_template: |
|
|
350
|
-
|
|
351
|
-
{previous_response}
|
|
352
|
-
|
|
353
|
-
**Important**: Address the feedback from the reviewers.
|
|
364
|
+
Address the feedback from the reviewers.
|
|
354
365
|
The "Original User Request" is reference information, not the latest instruction.
|
|
355
366
|
Review the session conversation history and fix the issues raised by the reviewers.
|
|
356
367
|
pass_previous_response: true
|
|
@@ -64,9 +64,6 @@ steps:
|
|
|
64
64
|
- WebSearch
|
|
65
65
|
- WebFetch
|
|
66
66
|
instruction_template: |
|
|
67
|
-
## Previous Response (when returned from implement)
|
|
68
|
-
{previous_response}
|
|
69
|
-
|
|
70
67
|
Analyze the task and create an implementation plan.
|
|
71
68
|
|
|
72
69
|
**Note:** If returned from implement step (Previous Response exists),
|
|
@@ -146,6 +143,7 @@ steps:
|
|
|
146
143
|
- name: ai_review
|
|
147
144
|
edit: false
|
|
148
145
|
agent: ../agents/default/ai-antipattern-reviewer.md
|
|
146
|
+
pass_previous_response: true
|
|
149
147
|
report:
|
|
150
148
|
name: 03-ai-review.md
|
|
151
149
|
format: |
|
|
@@ -206,15 +204,31 @@ steps:
|
|
|
206
204
|
- WebSearch
|
|
207
205
|
- WebFetch
|
|
208
206
|
instruction_template: |
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
**
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
-
|
|
216
|
-
-
|
|
217
|
-
-
|
|
207
|
+
**This is AI Review iteration {step_iteration}.**
|
|
208
|
+
|
|
209
|
+
If this is iteration 2 or later, it means your previous fixes were not actually applied.
|
|
210
|
+
**Your belief that you "already fixed it" is wrong.**
|
|
211
|
+
|
|
212
|
+
**First, acknowledge:**
|
|
213
|
+
- Files you thought were "fixed" are actually not fixed
|
|
214
|
+
- Your understanding of previous work is incorrect
|
|
215
|
+
- You need to start from zero
|
|
216
|
+
|
|
217
|
+
**Required actions:**
|
|
218
|
+
1. Open all flagged files with Read tool (drop assumptions, verify facts)
|
|
219
|
+
2. Search for problem code with grep to confirm it exists
|
|
220
|
+
3. Fix confirmed problems with Edit tool
|
|
221
|
+
4. Run tests to verify (`./gradlew :backend:test` etc.)
|
|
222
|
+
5. Report specifically "what you checked and what you fixed"
|
|
223
|
+
|
|
224
|
+
**Report format:**
|
|
225
|
+
- ❌ "Already fixed"
|
|
226
|
+
- ✅ "Checked file X at L123, found problem Y, fixed to Z"
|
|
227
|
+
|
|
228
|
+
**Absolutely prohibited:**
|
|
229
|
+
- Reporting "fixed" without opening files
|
|
230
|
+
- Judging based on assumptions
|
|
231
|
+
- Leaving problems that AI Reviewer REJECTED
|
|
218
232
|
pass_previous_response: true
|
|
219
233
|
rules:
|
|
220
234
|
- condition: AI Reviewer's issues have been fixed
|
|
@@ -251,9 +265,14 @@ steps:
|
|
|
251
265
|
| Eventual Consistency | ✅ | - |
|
|
252
266
|
|
|
253
267
|
## Issues (if REJECT)
|
|
254
|
-
| # | Location | Issue | Fix |
|
|
255
|
-
|
|
256
|
-
| 1 | `src/file.ts:42` | Issue description | Fix method |
|
|
268
|
+
| # | Scope | Location | Issue | Fix |
|
|
269
|
+
|---|-------|----------|-------|-----|
|
|
270
|
+
| 1 | In-scope | `src/file.ts:42` | Issue description | Fix method |
|
|
271
|
+
|
|
272
|
+
Scope: "In-scope" (fixable now) / "Out-of-scope" (existing issue, non-blocking)
|
|
273
|
+
|
|
274
|
+
## Existing Issues (informational, non-blocking)
|
|
275
|
+
- {Record of existing issues unrelated to current change}
|
|
257
276
|
```
|
|
258
277
|
allowed_tools:
|
|
259
278
|
- Read
|
|
@@ -455,10 +474,7 @@ steps:
|
|
|
455
474
|
- condition: Cannot proceed, insufficient info
|
|
456
475
|
next: plan
|
|
457
476
|
instruction_template: |
|
|
458
|
-
|
|
459
|
-
{previous_response}
|
|
460
|
-
|
|
461
|
-
**Important**: Address the feedback from the reviewers.
|
|
477
|
+
Address the feedback from the reviewers.
|
|
462
478
|
The "Original User Request" is reference information, not the latest instruction.
|
|
463
479
|
Review the session conversation history and fix the issues raised by the reviewers.
|
|
464
480
|
pass_previous_response: true
|
|
@@ -572,10 +588,7 @@ steps:
|
|
|
572
588
|
- WebSearch
|
|
573
589
|
- WebFetch
|
|
574
590
|
instruction_template: |
|
|
575
|
-
|
|
576
|
-
{previous_response}
|
|
577
|
-
|
|
578
|
-
**Important**: Fix the issues pointed out by the supervisor.
|
|
591
|
+
Fix the issues pointed out by the supervisor.
|
|
579
592
|
|
|
580
593
|
The supervisor has identified issues from a big-picture perspective.
|
|
581
594
|
Address items in priority order.
|
|
@@ -76,9 +76,6 @@ steps:
|
|
|
76
76
|
- WebSearch
|
|
77
77
|
- WebFetch
|
|
78
78
|
instruction_template: |
|
|
79
|
-
## Previous Response (when returned from implement)
|
|
80
|
-
{previous_response}
|
|
81
|
-
|
|
82
79
|
Analyze the task and create an implementation plan.
|
|
83
80
|
|
|
84
81
|
**Note:** If returned from implement step (Previous Response exists),
|
|
@@ -158,6 +155,7 @@ steps:
|
|
|
158
155
|
- name: ai_review
|
|
159
156
|
edit: false
|
|
160
157
|
agent: ../agents/default/ai-antipattern-reviewer.md
|
|
158
|
+
pass_previous_response: true
|
|
161
159
|
report:
|
|
162
160
|
name: 03-ai-review.md
|
|
163
161
|
format: |
|
|
@@ -218,14 +216,31 @@ steps:
|
|
|
218
216
|
- WebSearch
|
|
219
217
|
- WebFetch
|
|
220
218
|
instruction_template: |
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
**
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
-
|
|
228
|
-
-
|
|
219
|
+
**This is AI Review iteration {step_iteration}.**
|
|
220
|
+
|
|
221
|
+
If this is iteration 2 or later, it means your previous fixes were not actually applied.
|
|
222
|
+
**Your belief that you "already fixed it" is wrong.**
|
|
223
|
+
|
|
224
|
+
**First, acknowledge:**
|
|
225
|
+
- Files you thought were "fixed" are actually not fixed
|
|
226
|
+
- Your understanding of previous work is incorrect
|
|
227
|
+
- You need to start from zero
|
|
228
|
+
|
|
229
|
+
**Required actions:**
|
|
230
|
+
1. Open all flagged files with Read tool (drop assumptions, verify facts)
|
|
231
|
+
2. Search for problem code with grep to confirm it exists
|
|
232
|
+
3. Fix confirmed problems with Edit tool
|
|
233
|
+
4. Run tests to verify (`./gradlew :backend:test` etc.)
|
|
234
|
+
5. Report specifically "what you checked and what you fixed"
|
|
235
|
+
|
|
236
|
+
**Report format:**
|
|
237
|
+
- ❌ "Already fixed"
|
|
238
|
+
- ✅ "Checked file X at L123, found problem Y, fixed to Z"
|
|
239
|
+
|
|
240
|
+
**Absolutely prohibited:**
|
|
241
|
+
- Reporting "fixed" without opening files
|
|
242
|
+
- Judging based on assumptions
|
|
243
|
+
- Leaving problems that AI Reviewer REJECTED
|
|
229
244
|
- Removing scope creep
|
|
230
245
|
pass_previous_response: true
|
|
231
246
|
rules:
|
|
@@ -248,7 +263,7 @@ steps:
|
|
|
248
263
|
```markdown
|
|
249
264
|
# Architecture Review
|
|
250
265
|
|
|
251
|
-
## Result: APPROVE /
|
|
266
|
+
## Result: APPROVE / REJECT
|
|
252
267
|
|
|
253
268
|
## Summary
|
|
254
269
|
{1-2 sentences summarizing result}
|
|
@@ -262,17 +277,18 @@ steps:
|
|
|
262
277
|
- [x] Call Chain Verification
|
|
263
278
|
|
|
264
279
|
## Issues (if REJECT)
|
|
265
|
-
| # | Location | Issue | Fix |
|
|
266
|
-
|
|
267
|
-
| 1 | `src/file.ts:42` | Issue description | Fix method |
|
|
280
|
+
| # | Scope | Location | Issue | Fix |
|
|
281
|
+
|---|-------|----------|-------|-----|
|
|
282
|
+
| 1 | In-scope | `src/file.ts:42` | Issue description | Fix method |
|
|
283
|
+
|
|
284
|
+
Scope: "In-scope" (fixable now) / "Out-of-scope" (existing issue, non-blocking)
|
|
268
285
|
|
|
269
|
-
##
|
|
270
|
-
- {
|
|
286
|
+
## Existing Issues (informational, non-blocking)
|
|
287
|
+
- {Record of existing issues unrelated to current change}
|
|
271
288
|
```
|
|
272
289
|
|
|
273
290
|
**Cognitive load reduction rules:**
|
|
274
|
-
- APPROVE
|
|
275
|
-
- APPROVE + minor suggestions -> Summary + suggestions (15 lines or less)
|
|
291
|
+
- APPROVE -> Summary only (5 lines or less)
|
|
276
292
|
- REJECT -> Issues in table format (30 lines or less)
|
|
277
293
|
allowed_tools:
|
|
278
294
|
- Read
|
|
@@ -471,10 +487,7 @@ steps:
|
|
|
471
487
|
- condition: Cannot proceed, insufficient info
|
|
472
488
|
next: plan
|
|
473
489
|
instruction_template: |
|
|
474
|
-
|
|
475
|
-
{previous_response}
|
|
476
|
-
|
|
477
|
-
**Important**: Address the feedback from the reviewers.
|
|
490
|
+
Address the feedback from the reviewers.
|
|
478
491
|
The "Original User Request" is reference information, not the latest instruction.
|
|
479
492
|
Review the session conversation history and fix the issues raised by the reviewers.
|
|
480
493
|
pass_previous_response: true
|
|
@@ -588,10 +601,7 @@ steps:
|
|
|
588
601
|
- WebSearch
|
|
589
602
|
- WebFetch
|
|
590
603
|
instruction_template: |
|
|
591
|
-
|
|
592
|
-
{previous_response}
|
|
593
|
-
|
|
594
|
-
**Important**: Fix the issues pointed out by the supervisor.
|
|
604
|
+
Fix the issues pointed out by the supervisor.
|
|
595
605
|
|
|
596
606
|
The supervisor has identified issues from a big-picture perspective.
|
|
597
607
|
Address items in priority order.
|