takt 0.3.3 → 0.3.5
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 +104 -36
- package/dist/claude/client.d.ts +2 -0
- package/dist/claude/client.d.ts.map +1 -1
- package/dist/claude/client.js +3 -0
- package/dist/claude/client.js.map +1 -1
- package/dist/claude/executor.d.ts +2 -0
- package/dist/claude/executor.d.ts.map +1 -1
- package/dist/claude/executor.js +6 -0
- package/dist/claude/executor.js.map +1 -1
- package/dist/claude/process.d.ts +2 -0
- package/dist/claude/process.d.ts.map +1 -1
- package/dist/claude/process.js.map +1 -1
- package/dist/claude/stream-converter.d.ts.map +1 -1
- package/dist/claude/stream-converter.js +4 -0
- package/dist/claude/stream-converter.js.map +1 -1
- package/dist/claude/types.d.ts +1 -0
- package/dist/claude/types.d.ts.map +1 -1
- package/dist/cli.d.ts +5 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +103 -13
- package/dist/cli.js.map +1 -1
- package/dist/codex/client.d.ts +2 -0
- 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.js +1 -1
- package/dist/commands/addTask.js.map +1 -1
- package/dist/commands/index.d.ts +1 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +1 -0
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/interactive.d.ts.map +1 -1
- package/dist/commands/interactive.js +37 -24
- package/dist/commands/interactive.js.map +1 -1
- package/dist/commands/listTasks.d.ts +3 -2
- package/dist/commands/listTasks.d.ts.map +1 -1
- package/dist/commands/listTasks.js +6 -6
- package/dist/commands/listTasks.js.map +1 -1
- package/dist/commands/pipelineExecution.d.ts +38 -0
- package/dist/commands/pipelineExecution.d.ts.map +1 -0
- package/dist/commands/pipelineExecution.js +204 -0
- package/dist/commands/pipelineExecution.js.map +1 -0
- package/dist/commands/session.d.ts +1 -1
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +5 -3
- package/dist/commands/session.js.map +1 -1
- package/dist/commands/taskExecution.d.ts +8 -3
- package/dist/commands/taskExecution.d.ts.map +1 -1
- package/dist/commands/taskExecution.js +7 -5
- package/dist/commands/taskExecution.js.map +1 -1
- package/dist/commands/watchTasks.d.ts +2 -1
- package/dist/commands/watchTasks.d.ts.map +1 -1
- package/dist/commands/watchTasks.js +2 -2
- package/dist/commands/watchTasks.js.map +1 -1
- package/dist/commands/workflowExecution.d.ts +3 -0
- package/dist/commands/workflowExecution.d.ts.map +1 -1
- package/dist/commands/workflowExecution.js +41 -24
- package/dist/commands/workflowExecution.js.map +1 -1
- package/dist/config/globalConfig.d.ts +10 -0
- package/dist/config/globalConfig.d.ts.map +1 -1
- package/dist/config/globalConfig.js +68 -2
- package/dist/config/globalConfig.js.map +1 -1
- package/dist/config/initialization.d.ts +9 -1
- package/dist/config/initialization.d.ts.map +1 -1
- package/dist/config/initialization.js +10 -3
- package/dist/config/initialization.js.map +1 -1
- package/dist/config/sessionStore.d.ts +9 -7
- package/dist/config/sessionStore.d.ts.map +1 -1
- package/dist/config/sessionStore.js +34 -9
- package/dist/config/sessionStore.js.map +1 -1
- package/dist/exitCodes.d.ts +14 -0
- package/dist/exitCodes.d.ts.map +1 -0
- package/dist/exitCodes.js +14 -0
- package/dist/exitCodes.js.map +1 -0
- package/dist/github/issue.d.ts.map +1 -1
- package/dist/github/issue.js +4 -4
- package/dist/github/issue.js.map +1 -1
- package/dist/github/pr.d.ts +39 -0
- package/dist/github/pr.d.ts.map +1 -0
- package/dist/github/pr.js +78 -0
- package/dist/github/pr.js.map +1 -0
- package/dist/models/schemas.d.ts +13 -0
- package/dist/models/schemas.d.ts.map +1 -1
- package/dist/models/schemas.js +12 -0
- package/dist/models/schemas.js.map +1 -1
- package/dist/models/types.d.ts +15 -0
- package/dist/models/types.d.ts.map +1 -1
- package/dist/providers/claude.d.ts.map +1 -1
- package/dist/providers/claude.js +3 -0
- package/dist/providers/claude.js.map +1 -1
- package/dist/providers/codex.d.ts.map +1 -1
- package/dist/providers/codex.js +3 -0
- package/dist/providers/codex.js.map +1 -1
- package/dist/providers/index.d.ts +4 -0
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/index.js.map +1 -1
- package/dist/task/clone.d.ts.map +1 -1
- package/dist/task/clone.js +18 -0
- package/dist/task/clone.js.map +1 -1
- package/dist/utils/debug.d.ts.map +1 -1
- package/dist/utils/debug.js +21 -20
- package/dist/utils/debug.js.map +1 -1
- package/dist/utils/session.d.ts +3 -9
- package/dist/utils/session.d.ts.map +1 -1
- package/dist/utils/session.js +1 -1
- package/dist/utils/session.js.map +1 -1
- package/dist/utils/ui.d.ts +1 -1
- package/dist/utils/ui.d.ts.map +1 -1
- package/dist/utils/ui.js +5 -2
- package/dist/utils/ui.js.map +1 -1
- package/dist/workflow/engine.d.ts +5 -0
- package/dist/workflow/engine.d.ts.map +1 -1
- package/dist/workflow/engine.js +46 -13
- package/dist/workflow/engine.js.map +1 -1
- package/dist/workflow/types.d.ts +4 -1
- package/dist/workflow/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/resources/global/en/agents/review/pr-commenter.md +75 -0
- package/resources/global/en/config.yaml +16 -0
- package/resources/global/en/workflows/expert-cqrs.yaml +227 -357
- package/resources/global/en/workflows/expert.yaml +231 -359
- package/resources/global/en/workflows/review-only.yaml +331 -0
- package/resources/global/ja/agents/review/pr-commenter.md +75 -0
- package/resources/global/ja/config.yaml +16 -0
- package/resources/global/ja/workflows/expert-cqrs.yaml +226 -356
- package/resources/global/ja/workflows/expert.yaml +230 -358
- package/resources/global/ja/workflows/review-only.yaml +332 -0
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
# Review-Only Workflow
|
|
2
|
+
# Reviews code or PRs without making any edits
|
|
3
|
+
# Local: console output only. PR specified: posts inline comments + summary to PR
|
|
4
|
+
#
|
|
5
|
+
# Flow:
|
|
6
|
+
# plan -> reviewers (parallel: arch-review + security-review + ai-review) -> supervise
|
|
7
|
+
# -> pr-comment -> COMPLETE (PR comment requested)
|
|
8
|
+
# -> COMPLETE (local: console output only)
|
|
9
|
+
# -> ABORT (rejected)
|
|
10
|
+
#
|
|
11
|
+
# All steps have edit: false (no file modifications)
|
|
12
|
+
#
|
|
13
|
+
# Template Variables:
|
|
14
|
+
# {iteration} - Workflow-wide turn count
|
|
15
|
+
# {max_iterations} - Maximum iterations allowed
|
|
16
|
+
# {step_iteration} - Per-step iteration count
|
|
17
|
+
# {task} - Original user request
|
|
18
|
+
# {previous_response} - Output from the previous step
|
|
19
|
+
# {user_inputs} - Accumulated user inputs
|
|
20
|
+
# {report_dir} - Report directory name
|
|
21
|
+
|
|
22
|
+
name: review-only
|
|
23
|
+
description: Review-only workflow - reviews code without making edits
|
|
24
|
+
|
|
25
|
+
max_iterations: 10
|
|
26
|
+
|
|
27
|
+
initial_step: plan
|
|
28
|
+
|
|
29
|
+
steps:
|
|
30
|
+
- name: plan
|
|
31
|
+
edit: false
|
|
32
|
+
agent: ../agents/default/planner.md
|
|
33
|
+
allowed_tools:
|
|
34
|
+
- Read
|
|
35
|
+
- Glob
|
|
36
|
+
- Grep
|
|
37
|
+
- WebSearch
|
|
38
|
+
- WebFetch
|
|
39
|
+
rules:
|
|
40
|
+
- condition: Review scope is clear
|
|
41
|
+
next: reviewers
|
|
42
|
+
- condition: User is asking a question (not a review task)
|
|
43
|
+
next: COMPLETE
|
|
44
|
+
- condition: Requirements unclear, insufficient info
|
|
45
|
+
next: ABORT
|
|
46
|
+
appendix: |
|
|
47
|
+
Clarifications needed:
|
|
48
|
+
- {Question 1}
|
|
49
|
+
- {Question 2}
|
|
50
|
+
pass_previous_response: true
|
|
51
|
+
instruction_template: |
|
|
52
|
+
## Previous Response (when returned from supervise)
|
|
53
|
+
{previous_response}
|
|
54
|
+
|
|
55
|
+
Analyze the review request and create a review plan.
|
|
56
|
+
|
|
57
|
+
**This is a review-only workflow.** No code edits will be made.
|
|
58
|
+
Focus on:
|
|
59
|
+
1. Identify which files/modules to review
|
|
60
|
+
2. Determine review focus areas (architecture, security, AI patterns, etc.)
|
|
61
|
+
3. Note any specific concerns mentioned in the request
|
|
62
|
+
|
|
63
|
+
**If a PR number is mentioned** (e.g., "PR #42"), include it in your plan
|
|
64
|
+
so reviewers can focus on the PR's changed files.
|
|
65
|
+
|
|
66
|
+
- name: reviewers
|
|
67
|
+
parallel:
|
|
68
|
+
- name: arch-review
|
|
69
|
+
edit: false
|
|
70
|
+
agent: ../agents/default/architecture-reviewer.md
|
|
71
|
+
report:
|
|
72
|
+
name: 01-architect-review.md
|
|
73
|
+
format: |
|
|
74
|
+
```markdown
|
|
75
|
+
# Architecture Review
|
|
76
|
+
|
|
77
|
+
## Result: APPROVE / IMPROVE / REJECT
|
|
78
|
+
|
|
79
|
+
## Summary
|
|
80
|
+
{1-2 sentences summarizing result}
|
|
81
|
+
|
|
82
|
+
## Reviewed Perspectives
|
|
83
|
+
- [x] Structure & Design
|
|
84
|
+
- [x] Code Quality
|
|
85
|
+
- [x] Change Scope
|
|
86
|
+
|
|
87
|
+
## Issues (if REJECT)
|
|
88
|
+
| # | Location | Issue | Fix |
|
|
89
|
+
|---|----------|-------|-----|
|
|
90
|
+
| 1 | `src/file.ts:42` | Issue description | Fix method |
|
|
91
|
+
|
|
92
|
+
## Improvement Suggestions (optional, non-blocking)
|
|
93
|
+
- {Future improvement suggestions}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Cognitive load reduction rules:**
|
|
97
|
+
- APPROVE + no issues -> Summary only (5 lines or less)
|
|
98
|
+
- APPROVE + minor suggestions -> Summary + suggestions (15 lines or less)
|
|
99
|
+
- REJECT -> Issues in table format (30 lines or less)
|
|
100
|
+
allowed_tools:
|
|
101
|
+
- Read
|
|
102
|
+
- Glob
|
|
103
|
+
- Grep
|
|
104
|
+
- Write
|
|
105
|
+
- WebSearch
|
|
106
|
+
- WebFetch
|
|
107
|
+
rules:
|
|
108
|
+
- condition: approved
|
|
109
|
+
- condition: needs_fix
|
|
110
|
+
instruction_template: |
|
|
111
|
+
Focus on **architecture and design** review. Do NOT review AI-specific issues (that's the ai_review step).
|
|
112
|
+
|
|
113
|
+
Review the code and provide feedback.
|
|
114
|
+
|
|
115
|
+
- name: security-review
|
|
116
|
+
edit: false
|
|
117
|
+
agent: ../agents/default/security-reviewer.md
|
|
118
|
+
report:
|
|
119
|
+
name: 02-security-review.md
|
|
120
|
+
format: |
|
|
121
|
+
```markdown
|
|
122
|
+
# Security Review
|
|
123
|
+
|
|
124
|
+
## Result: APPROVE / REJECT
|
|
125
|
+
|
|
126
|
+
## Severity: None / Low / Medium / High / Critical
|
|
127
|
+
|
|
128
|
+
## Check Results
|
|
129
|
+
| Category | Result | Notes |
|
|
130
|
+
|----------|--------|-------|
|
|
131
|
+
| Injection | - | - |
|
|
132
|
+
| Auth/Authz | - | - |
|
|
133
|
+
| Data Protection | - | - |
|
|
134
|
+
| Dependencies | - | - |
|
|
135
|
+
|
|
136
|
+
## Vulnerabilities (if REJECT)
|
|
137
|
+
| # | Severity | Type | Location | Fix |
|
|
138
|
+
|---|----------|------|----------|-----|
|
|
139
|
+
| 1 | High | SQLi | `src/db.ts:42` | Use parameterized query |
|
|
140
|
+
|
|
141
|
+
## Warnings (non-blocking)
|
|
142
|
+
- {Security recommendations}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
**Cognitive load reduction rules:**
|
|
146
|
+
- No issues -> Check table only (10 lines or less)
|
|
147
|
+
- Warnings -> + Warnings 1-2 lines (15 lines or less)
|
|
148
|
+
- Vulnerabilities -> + Table format (30 lines or less)
|
|
149
|
+
allowed_tools:
|
|
150
|
+
- Read
|
|
151
|
+
- Glob
|
|
152
|
+
- Grep
|
|
153
|
+
- Write
|
|
154
|
+
- WebSearch
|
|
155
|
+
- WebFetch
|
|
156
|
+
rules:
|
|
157
|
+
- condition: approved
|
|
158
|
+
- condition: needs_fix
|
|
159
|
+
instruction_template: |
|
|
160
|
+
Perform security review on the code. Check for vulnerabilities including:
|
|
161
|
+
- Injection attacks (SQL, Command, XSS)
|
|
162
|
+
- Authentication/Authorization issues
|
|
163
|
+
- Data exposure risks
|
|
164
|
+
- Cryptographic weaknesses
|
|
165
|
+
|
|
166
|
+
- name: ai-review
|
|
167
|
+
edit: false
|
|
168
|
+
agent: ../agents/default/ai-antipattern-reviewer.md
|
|
169
|
+
report:
|
|
170
|
+
name: 03-ai-review.md
|
|
171
|
+
format: |
|
|
172
|
+
```markdown
|
|
173
|
+
# AI-Generated Code Review
|
|
174
|
+
|
|
175
|
+
## Result: APPROVE / REJECT
|
|
176
|
+
|
|
177
|
+
## Summary
|
|
178
|
+
{One sentence summarizing result}
|
|
179
|
+
|
|
180
|
+
## Verified Items
|
|
181
|
+
| Aspect | Result | Notes |
|
|
182
|
+
|--------|--------|-------|
|
|
183
|
+
| Assumption validity | - | - |
|
|
184
|
+
| API/Library existence | - | - |
|
|
185
|
+
| Context fit | - | - |
|
|
186
|
+
| Scope | - | - |
|
|
187
|
+
|
|
188
|
+
## Issues (if REJECT)
|
|
189
|
+
| # | Category | Location | Issue |
|
|
190
|
+
|---|----------|----------|-------|
|
|
191
|
+
| 1 | Hallucinated API | `src/file.ts:23` | Non-existent method |
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
**Cognitive load reduction rules:**
|
|
195
|
+
- No issues -> Summary 1 line + check table only (10 lines or less)
|
|
196
|
+
- Issues found -> + Issues in table format (25 lines or less)
|
|
197
|
+
allowed_tools:
|
|
198
|
+
- Read
|
|
199
|
+
- Glob
|
|
200
|
+
- Grep
|
|
201
|
+
- Write
|
|
202
|
+
- WebSearch
|
|
203
|
+
- WebFetch
|
|
204
|
+
rules:
|
|
205
|
+
- condition: approved
|
|
206
|
+
- condition: needs_fix
|
|
207
|
+
instruction_template: |
|
|
208
|
+
Review the code for AI-specific issues:
|
|
209
|
+
- Assumption validation
|
|
210
|
+
- Plausible but wrong patterns
|
|
211
|
+
- Context fit with existing codebase
|
|
212
|
+
- Scope creep detection
|
|
213
|
+
rules:
|
|
214
|
+
- condition: all("approved")
|
|
215
|
+
next: supervise
|
|
216
|
+
- condition: any("needs_fix")
|
|
217
|
+
next: supervise
|
|
218
|
+
|
|
219
|
+
- name: supervise
|
|
220
|
+
edit: false
|
|
221
|
+
agent: ../agents/default/supervisor.md
|
|
222
|
+
report:
|
|
223
|
+
- Review Summary: 04-review-summary.md
|
|
224
|
+
allowed_tools:
|
|
225
|
+
- Read
|
|
226
|
+
- Glob
|
|
227
|
+
- Grep
|
|
228
|
+
- Write
|
|
229
|
+
- WebSearch
|
|
230
|
+
- WebFetch
|
|
231
|
+
rules:
|
|
232
|
+
- condition: approved, PR comment requested
|
|
233
|
+
next: pr-comment
|
|
234
|
+
- condition: approved
|
|
235
|
+
next: COMPLETE
|
|
236
|
+
- condition: rejected
|
|
237
|
+
next: ABORT
|
|
238
|
+
pass_previous_response: true
|
|
239
|
+
instruction_template: |
|
|
240
|
+
## Review Results
|
|
241
|
+
{previous_response}
|
|
242
|
+
|
|
243
|
+
**This is a review-only workflow.** Do NOT run tests or builds.
|
|
244
|
+
Your role is to synthesize the review results and produce a final summary.
|
|
245
|
+
|
|
246
|
+
**Tasks:**
|
|
247
|
+
1. Read all review reports in the Report Directory
|
|
248
|
+
2. Synthesize findings from architecture, security, and AI reviews
|
|
249
|
+
3. Produce a consolidated review summary with overall verdict
|
|
250
|
+
4. Determine routing:
|
|
251
|
+
- If the task mentions posting to a PR (e.g., "post comments to PR", "comment on PR"),
|
|
252
|
+
route to `pr-comment` step (condition: "approved, PR comment requested")
|
|
253
|
+
- If local review only, route to COMPLETE (condition: "approved")
|
|
254
|
+
- If critical issues found, route to ABORT (condition: "rejected")
|
|
255
|
+
|
|
256
|
+
**Review Summary report format:**
|
|
257
|
+
```markdown
|
|
258
|
+
# Review Summary
|
|
259
|
+
|
|
260
|
+
## Overall Verdict: APPROVE / REJECT
|
|
261
|
+
|
|
262
|
+
## Summary
|
|
263
|
+
{2-3 sentences consolidating all review results}
|
|
264
|
+
|
|
265
|
+
## Review Results
|
|
266
|
+
| Review | Result | Key Findings |
|
|
267
|
+
|--------|--------|--------------|
|
|
268
|
+
| Architecture | APPROVE/REJECT | {Brief finding} |
|
|
269
|
+
| Security | APPROVE/REJECT | {Brief finding} |
|
|
270
|
+
| AI Antipattern | APPROVE/REJECT | {Brief finding} |
|
|
271
|
+
|
|
272
|
+
## Issues Requiring Attention
|
|
273
|
+
| # | Severity | Source | Location | Issue |
|
|
274
|
+
|---|----------|--------|----------|-------|
|
|
275
|
+
| 1 | High | Security | `file:line` | Description |
|
|
276
|
+
|
|
277
|
+
## Improvement Suggestions
|
|
278
|
+
- {Consolidated suggestions from all reviews}
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
- name: pr-comment
|
|
282
|
+
edit: false
|
|
283
|
+
agent: ../agents/review/pr-commenter.md
|
|
284
|
+
allowed_tools:
|
|
285
|
+
- Read
|
|
286
|
+
- Glob
|
|
287
|
+
- Grep
|
|
288
|
+
- Bash
|
|
289
|
+
rules:
|
|
290
|
+
- condition: Comments posted
|
|
291
|
+
next: COMPLETE
|
|
292
|
+
- condition: Failed to post comments
|
|
293
|
+
next: COMPLETE
|
|
294
|
+
pass_previous_response: true
|
|
295
|
+
instruction_template: |
|
|
296
|
+
## Review Summary
|
|
297
|
+
{previous_response}
|
|
298
|
+
|
|
299
|
+
Post the review results to the PR as comments.
|
|
300
|
+
|
|
301
|
+
**Procedure:**
|
|
302
|
+
1. Extract the PR number from the task description
|
|
303
|
+
2. Read all review reports in the Report Directory:
|
|
304
|
+
- `01-architect-review.md` (Architecture review)
|
|
305
|
+
- `02-security-review.md` (Security review)
|
|
306
|
+
- `03-ai-review.md` (AI antipattern review)
|
|
307
|
+
- `04-review-summary.md` (Consolidated summary)
|
|
308
|
+
3. Filter findings by severity and post inline comments for Critical/High/Medium
|
|
309
|
+
4. Post a summary comment with the following format:
|
|
310
|
+
|
|
311
|
+
```
|
|
312
|
+
## Automated Review Summary
|
|
313
|
+
|
|
314
|
+
{Overall verdict and summary from 04-review-summary.md}
|
|
315
|
+
|
|
316
|
+
### Review Results
|
|
317
|
+
| Review | Result |
|
|
318
|
+
|--------|--------|
|
|
319
|
+
| Architecture | {result} |
|
|
320
|
+
| Security | {result} |
|
|
321
|
+
| AI Antipattern | {result} |
|
|
322
|
+
|
|
323
|
+
### Key Findings
|
|
324
|
+
{Bulleted list of important findings}
|
|
325
|
+
|
|
326
|
+
### Improvement Suggestions
|
|
327
|
+
{Consolidated suggestions}
|
|
328
|
+
|
|
329
|
+
---
|
|
330
|
+
*Generated by [takt](https://github.com/toruticas/takt) review-only workflow*
|
|
331
|
+
```
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# PR Commenter Agent
|
|
2
|
+
|
|
3
|
+
あなたは**PRコメント投稿の専門家**です。`gh` CLIを使用してレビューの指摘をGitHub Pull Requestに投稿します。
|
|
4
|
+
|
|
5
|
+
## 役割
|
|
6
|
+
|
|
7
|
+
- レビューの指摘をPRコメントとして投稿
|
|
8
|
+
- 開発者向けに指摘を明確かつ簡潔にフォーマット
|
|
9
|
+
- 重要度によるフィルタリングでノイズを削減
|
|
10
|
+
|
|
11
|
+
**やらないこと:**
|
|
12
|
+
- 自分でコードをレビューする(レビュアーが既に実施済み)
|
|
13
|
+
- ファイルの編集
|
|
14
|
+
- テストやビルドの実行
|
|
15
|
+
- コード品質の判断(レビュアーの結果をそのまま投稿する)
|
|
16
|
+
|
|
17
|
+
## コア知識
|
|
18
|
+
|
|
19
|
+
### GitHub PR Comment API
|
|
20
|
+
|
|
21
|
+
**インラインレビューコメント**(ファイル・行番号ごとの指摘):
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
gh api repos/{owner}/{repo}/pulls/{pr_number}/comments \
|
|
25
|
+
-f body="**[{category}]** {description}" \
|
|
26
|
+
-f path="{file_path}" \
|
|
27
|
+
-F line={line_number} \
|
|
28
|
+
-f commit_id="$(gh pr view {pr_number} --json headRefOid -q .headRefOid)"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
- `commit_id` にはPRのHEADコミットを使用
|
|
32
|
+
- 同一行に複数の指摘がある場合は1つのコメントにまとめる
|
|
33
|
+
|
|
34
|
+
**サマリーコメント**(全体レビュー):
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
gh pr comment {pr_number} --body "{markdown_body}"
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
- 複数行のbodyにはHEREDOCを使用してエスケープ問題を回避
|
|
41
|
+
|
|
42
|
+
### PR番号の抽出
|
|
43
|
+
|
|
44
|
+
タスクコンテキストから一般的なパターンでPR番号を抽出:
|
|
45
|
+
- "PR #42"、"#42"、"pull/42"、"pulls/42"
|
|
46
|
+
- PR番号が見つからない場合は報告して投稿せずに終了
|
|
47
|
+
|
|
48
|
+
## コメント品質の原則
|
|
49
|
+
|
|
50
|
+
### 重要度ベースのフィルタリング
|
|
51
|
+
|
|
52
|
+
| 重大度 | アクション |
|
|
53
|
+
|--------|-----------|
|
|
54
|
+
| Critical / High | 必ずインラインコメントとして投稿 |
|
|
55
|
+
| Medium | インラインコメントとして投稿 |
|
|
56
|
+
| Low | サマリーにのみ含める |
|
|
57
|
+
| Informational | サマリーにのみ含める |
|
|
58
|
+
|
|
59
|
+
### フォーマット
|
|
60
|
+
|
|
61
|
+
- **簡潔に。** PRコメントはアクション可能で要点を押さえたものにする
|
|
62
|
+
- **場所を含める。** 可能な限り具体的なファイルと行番号を参照
|
|
63
|
+
- **指摘を分類する。** `[Security]`、`[Architecture]`、`[AI Pattern]` のようなラベルを使用
|
|
64
|
+
|
|
65
|
+
## エラーハンドリング
|
|
66
|
+
|
|
67
|
+
- `gh` コマンドが失敗した場合はエラーを報告するが、過度にリトライしない
|
|
68
|
+
- PR番号が特定できない場合は情報メッセージを出力して完了
|
|
69
|
+
- 投稿する指摘がない場合はサマリーコメントのみ投稿
|
|
70
|
+
|
|
71
|
+
## 重要
|
|
72
|
+
|
|
73
|
+
- **ファイルを変更しない。** コメント投稿のみ行う。
|
|
74
|
+
- **レート制限を尊重。** 個別コメントを大量投稿しない。可能な限りまとめる。
|
|
75
|
+
- **レビューレポートを情報源とする。** 自分の分析ではなく、レビュアーの結果を投稿する。
|
|
@@ -21,6 +21,22 @@ provider: claude
|
|
|
21
21
|
# Codex: gpt-5.2-codex, gpt-5.1-codex など
|
|
22
22
|
# model: sonnet
|
|
23
23
|
|
|
24
|
+
# Anthropic APIキー (オプション、環境変数 TAKT_ANTHROPIC_API_KEY で上書き可能)
|
|
25
|
+
# anthropic_api_key: ""
|
|
26
|
+
|
|
27
|
+
# OpenAI APIキー (オプション、環境変数 TAKT_OPENAI_API_KEY で上書き可能)
|
|
28
|
+
# openai_api_key: ""
|
|
29
|
+
|
|
30
|
+
# パイプライン実行設定 (オプション)
|
|
31
|
+
# パイプラインモード (--task) のブランチ名、コミットメッセージ、PRの本文をカスタマイズできます。
|
|
32
|
+
# pipeline:
|
|
33
|
+
# default_branch_prefix: "takt/"
|
|
34
|
+
# commit_message_template: "feat: {title} (#{issue})"
|
|
35
|
+
# pr_body_template: |
|
|
36
|
+
# ## Summary
|
|
37
|
+
# {issue_body}
|
|
38
|
+
# Closes #{issue}
|
|
39
|
+
|
|
24
40
|
# デバッグ設定 (オプション)
|
|
25
41
|
# debug:
|
|
26
42
|
# enabled: false
|