report 系のformatを利用するように変更、gitdiff廃止

This commit is contained in:
nrslib 2026-01-30 09:13:32 +09:00
parent 79227dffd1
commit 6fe6491948
21 changed files with 1207 additions and 1419 deletions

View File

@ -149,7 +149,6 @@ steps:
| `{max_iterations}` | Maximum iterations | | `{max_iterations}` | Maximum iterations |
| `{previous_response}` | Previous step output (requires `pass_previous_response: true`) | | `{previous_response}` | Previous step output (requires `pass_previous_response: true`) |
| `{user_inputs}` | Accumulated user inputs during workflow | | `{user_inputs}` | Accumulated user inputs during workflow |
| `{git_diff}` | Current git diff (uncommitted changes) |
| `{report_dir}` | Report directory name (e.g., `20250126-143052-task-summary`) | | `{report_dir}` | Report directory name (e.g., `20250126-143052-task-summary`) |
### Model Resolution ### Model Resolution

View File

@ -436,7 +436,6 @@ Available variables in `instruction_template`:
| `{step_iteration}` | Per-step iteration count (how many times THIS step has run) | | `{step_iteration}` | Per-step iteration count (how many times THIS step has run) |
| `{previous_response}` | Previous step's output (requires `pass_previous_response: true`) | | `{previous_response}` | Previous step's output (requires `pass_previous_response: true`) |
| `{user_inputs}` | Additional user inputs during workflow | | `{user_inputs}` | Additional user inputs during workflow |
| `{git_diff}` | Current git diff (uncommitted changes) |
| `{report_dir}` | Report directory name (e.g., `20250126-143052-task-summary`) | | `{report_dir}` | Report directory name (e.g., `20250126-143052-task-summary`) |
### Designing Workflows ### Designing Workflows

View File

@ -264,7 +264,6 @@ agent: /path/to/custom/agent.md
| `{step_iteration}` | ステップごとのイテレーション数(このステップが実行された回数) | | `{step_iteration}` | ステップごとのイテレーション数(このステップが実行された回数) |
| `{previous_response}` | 前のステップの出力(`pass_previous_response: true`が必要) | | `{previous_response}` | 前のステップの出力(`pass_previous_response: true`が必要) |
| `{user_inputs}` | ワークフロー中の追加ユーザー入力 | | `{user_inputs}` | ワークフロー中の追加ユーザー入力 |
| `{git_diff}` | 現在のgit diffコミットされていない変更 |
| `{report_dir}` | レポートディレクトリ名(例:`20250126-143052-task-summary` | | `{report_dir}` | レポートディレクトリ名(例:`20250126-143052-task-summary` |
### ワークフローの設計 ### ワークフローの設計

View File

@ -48,7 +48,6 @@ steps:
| `{max_iterations}` | Maximum allowed iterations | | `{max_iterations}` | Maximum allowed iterations |
| `{previous_response}` | Previous step's output | | `{previous_response}` | Previous step's output |
| `{user_inputs}` | Additional inputs during workflow | | `{user_inputs}` | Additional inputs during workflow |
| `{git_diff}` | Current uncommitted changes |
## Transitions ## Transitions

View File

@ -41,7 +41,7 @@ Code is read far more often than it is written. Poorly structured code destroys
**About template files:** **About template files:**
- YAML and Markdown files in `resources/` are templates - YAML and Markdown files in `resources/` are templates
- `{report_dir}`, `{task}`, `{git_diff}` are placeholders (replaced at runtime) - `{report_dir}`, `{task}` are placeholders (replaced at runtime)
- Even if expanded values appear in git diff for report files, they are NOT hardcoded - Even if expanded values appear in git diff for report files, they are NOT hardcoded
**To avoid false positives:** **To avoid false positives:**

View File

@ -10,7 +10,6 @@
# {max_iterations} - Maximum iterations allowed for the workflow # {max_iterations} - Maximum iterations allowed for the workflow
# {step_iteration} - Per-step iteration count (how many times THIS step has been executed) # {step_iteration} - Per-step iteration count (how many times THIS step has been executed)
# {previous_response} - Output from the previous step (only when pass_previous_response: true) # {previous_response} - Output from the previous step (only when pass_previous_response: true)
# {git_diff} - Current uncommitted changes (git diff)
# {report_dir} - Report directory name (e.g., "20250126-143052-task-summary") # {report_dir} - Report directory name (e.g., "20250126-143052-task-summary")
# #
# Step-level Fields: # Step-level Fields:
@ -30,7 +29,33 @@ initial_step: plan
steps: steps:
- name: plan - name: plan
agent: ~/.takt/agents/default/planner.md agent: ~/.takt/agents/default/planner.md
report: 00-plan.md report:
name: 00-plan.md
order: |
**Report output:** Output to the `Report File` specified above.
- If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section
format: |
```markdown
# Task Plan
## Original Request
{User's request as-is}
## Analysis Results
### Objective
{What needs to be achieved}
### Scope
{Impact scope}
### Implementation Approach
{How to proceed}
## Clarifications Needed (if any)
- {Unclear points or items requiring confirmation}
```
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -65,32 +90,6 @@ steps:
2. Identify impact scope 2. Identify impact scope
3. Decide implementation approach 3. Decide implementation approach
**Report output:** Output to the `Report File` specified above.
- If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section
**Report format:**
```markdown
# Task Plan
## Original Request
{User's request as-is}
## Analysis Results
### Objective
{What needs to be achieved}
### Scope
{Impact scope}
### Implementation Approach
{How to proceed}
## Clarifications Needed (if any)
- {Unclear points or items requiring confirmation}
```
- name: implement - name: implement
agent: ~/.takt/agents/default/coder.md agent: ~/.takt/agents/default/coder.md
report: report:
@ -151,7 +150,38 @@ steps:
- name: ai_review - name: ai_review
agent: ~/.takt/agents/default/ai-antipattern-reviewer.md agent: ~/.takt/agents/default/ai-antipattern-reviewer.md
report: 03-ai-review.md report:
name: 03-ai-review.md
order: |
**Report output:** Output to the `Report File` specified above.
- If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section
format: |
```markdown
# AI-Generated Code Review
## Result: APPROVE / REJECT
## Summary
{One sentence summarizing result}
## Verified Items
| Aspect | Result | Notes |
|--------|--------|-------|
| Assumption validity | ✅ | - |
| API/Library existence | ✅ | - |
| Context fit | ✅ | - |
| Scope | ✅ | - |
## Issues (if REJECT)
| # | Category | Location | Issue |
|---|----------|----------|-------|
| 1 | Hallucinated API | `src/file.ts:23` | Non-existent method |
```
**Cognitive load reduction rules:**
- No issues -> Summary 1 line + check table only (10 lines or less)
- Issues found -> + Issues in table format (25 lines or less)
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -165,48 +195,12 @@ steps:
- condition: AI-specific issues found - condition: AI-specific issues found
next: ai_fix next: ai_fix
instruction_template: | instruction_template: |
## Git Diff
```diff
{git_diff}
```
Review the code for AI-specific issues: Review the code for AI-specific issues:
- Assumption validation - Assumption validation
- Plausible but wrong patterns - Plausible but wrong patterns
- Context fit with existing codebase - Context fit with existing codebase
- Scope creep detection - Scope creep detection
**Report output:** Output to the `Report File` specified above.
- If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section
**Report format:**
```markdown
# AI-Generated Code Review
## Result: APPROVE / REJECT
## Summary
{One sentence summarizing result}
## Verified Items
| Aspect | Result | Notes |
|--------|--------|-------|
| Assumption validity | ✅ | - |
| API/Library existence | ✅ | - |
| Context fit | ✅ | - |
| Scope | ✅ | - |
## Issues (if REJECT)
| # | Category | Location | Issue |
|---|----------|----------|-------|
| 1 | Hallucinated API | `src/file.ts:23` | Non-existent method |
```
**Cognitive load reduction rules:**
- No issues -> Summary 1 line + check table only (10 lines or less)
- Issues found -> + Issues in table format (25 lines or less)
- name: ai_fix - name: ai_fix
agent: ~/.takt/agents/default/coder.md agent: ~/.takt/agents/default/coder.md
allowed_tools: allowed_tools:
@ -238,7 +232,39 @@ steps:
- name: review - name: review
agent: ~/.takt/agents/default/architecture-reviewer.md agent: ~/.takt/agents/default/architecture-reviewer.md
report: 04-architect-review.md report:
name: 04-architect-review.md
order: |
**Report output:** Output to the `Report File` specified above.
- If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section
format: |
```markdown
# Architecture Review
## Result: APPROVE / IMPROVE / REJECT
## Summary
{1-2 sentences summarizing result}
## Reviewed Perspectives
- [x] Structure & Design
- [x] Code Quality
- [x] Change Scope
## Issues (if REJECT)
| # | Location | Issue | Fix |
|---|----------|-------|-----|
| 1 | `src/file.ts:42` | Issue description | Fix method |
## Improvement Suggestions (optional, non-blocking)
- {Future improvement suggestions}
```
**Cognitive load reduction rules:**
- APPROVE + no issues -> Summary only (5 lines or less)
- APPROVE + minor suggestions -> Summary + suggestions (15 lines or less)
- REJECT -> Issues in table format (30 lines or less)
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -254,47 +280,10 @@ steps:
- condition: Structural fix required - condition: Structural fix required
next: fix next: fix
instruction_template: | instruction_template: |
## Git Diff
```diff
{git_diff}
```
Focus on **architecture and design** review. Do NOT review AI-specific issues (that's the ai_review step). Focus on **architecture and design** review. Do NOT review AI-specific issues (that's the ai_review step).
Review the changes and provide feedback. Review the changes and provide feedback.
**Report output:** Output to the `Report File` specified above.
- If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section
**Report format:**
```markdown
# Architecture Review
## Result: APPROVE / IMPROVE / REJECT
## Summary
{1-2 sentences summarizing result}
## Reviewed Perspectives
- [x] Structure & Design
- [x] Code Quality
- [x] Change Scope
## Issues (if REJECT)
| # | Location | Issue | Fix |
|---|----------|-------|-----|
| 1 | `src/file.ts:42` | Issue description | Fix method |
## Improvement Suggestions (optional, non-blocking)
- {Future improvement suggestions}
```
**Cognitive load reduction rules:**
- APPROVE + no issues -> Summary only (5 lines or less)
- APPROVE + minor suggestions -> Summary + suggestions (15 lines or less)
- REJECT -> Issues in table format (30 lines or less)
- name: improve - name: improve
agent: ~/.takt/agents/default/coder.md agent: ~/.takt/agents/default/coder.md
allowed_tools: allowed_tools:
@ -354,7 +343,41 @@ steps:
- name: security_review - name: security_review
agent: ~/.takt/agents/default/security-reviewer.md agent: ~/.takt/agents/default/security-reviewer.md
report: 05-security-review.md report:
name: 05-security-review.md
order: |
**Report output:** Output to the `Report File` specified above.
- If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section
format: |
```markdown
# Security Review
## Result: APPROVE / REJECT
## Severity: None / Low / Medium / High / Critical
## Check Results
| Category | Result | Notes |
|----------|--------|-------|
| Injection | ✅ | - |
| Auth/Authz | ✅ | - |
| Data Protection | ✅ | - |
| Dependencies | ✅ | - |
## Vulnerabilities (if REJECT)
| # | Severity | Type | Location | Fix |
|---|----------|------|----------|-----|
| 1 | High | SQLi | `src/db.ts:42` | Use parameterized query |
## Warnings (non-blocking)
- {Security recommendations}
```
**Cognitive load reduction rules:**
- No issues -> Check table only (10 lines or less)
- Warnings -> + Warnings 1-2 lines (15 lines or less)
- Vulnerabilities -> + Table format (30 lines or less)
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -368,51 +391,12 @@ steps:
- condition: Vulnerabilities require fix - condition: Vulnerabilities require fix
next: security_fix next: security_fix
instruction_template: | instruction_template: |
## Git Diff
```diff
{git_diff}
```
Perform security review on the changes. Check for vulnerabilities including: Perform security review on the changes. Check for vulnerabilities including:
- Injection attacks (SQL, Command, XSS) - Injection attacks (SQL, Command, XSS)
- Authentication/Authorization issues - Authentication/Authorization issues
- Data exposure risks - Data exposure risks
- Cryptographic weaknesses - Cryptographic weaknesses
**Report output:** Output to the `Report File` specified above.
- If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section
**Report format:**
```markdown
# Security Review
## Result: APPROVE / REJECT
## Severity: None / Low / Medium / High / Critical
## Check Results
| Category | Result | Notes |
|----------|--------|-------|
| Injection | ✅ | - |
| Auth/Authz | ✅ | - |
| Data Protection | ✅ | - |
| Dependencies | ✅ | - |
## Vulnerabilities (if REJECT)
| # | Severity | Type | Location | Fix |
|---|----------|------|----------|-----|
| 1 | High | SQLi | `src/db.ts:42` | Use parameterized query |
## Warnings (non-blocking)
- {Security recommendations}
```
**Cognitive load reduction rules:**
- No issues -> Check table only (10 lines or less)
- Warnings -> + Warnings 1-2 lines (15 lines or less)
- Vulnerabilities -> + Table format (30 lines or less)
- name: security_fix - name: security_fix
agent: ~/.takt/agents/default/coder.md agent: ~/.takt/agents/default/coder.md
allowed_tools: allowed_tools:
@ -457,11 +441,6 @@ steps:
- condition: Requirements unmet, tests failing, build errors - condition: Requirements unmet, tests failing, build errors
next: plan next: plan
instruction_template: | instruction_template: |
## Git Diff
```diff
{git_diff}
```
Run tests, verify the build, and perform final approval. Run tests, verify the build, and perform final approval.
**Workflow Overall Review:** **Workflow Overall Review:**

View File

@ -16,7 +16,6 @@
# {step_iteration} - Per-step iteration count (how many times THIS step has been executed) # {step_iteration} - Per-step iteration count (how many times THIS step has been executed)
# {task} - Original user request # {task} - Original user request
# {previous_response} - Output from the previous step # {previous_response} - Output from the previous step
# {git_diff} - Current uncommitted changes (git diff)
# {user_inputs} - Accumulated user inputs during workflow # {user_inputs} - Accumulated user inputs during workflow
# {report_dir} - Report directory name (e.g., "20250126-143052-task-summary") # {report_dir} - Report directory name (e.g., "20250126-143052-task-summary")
@ -33,7 +32,33 @@ steps:
# =========================================== # ===========================================
- name: plan - name: plan
agent: ~/.takt/agents/default/planner.md agent: ~/.takt/agents/default/planner.md
report: 00-plan.md report:
name: 00-plan.md
order: |
**Report output:** Output to the `Report File` specified above.
- If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section
format: |
```markdown
# Task Plan
## Original Request
{User's request as-is}
## Analysis Results
### Objective
{What needs to be achieved}
### Scope
{Impact scope}
### Implementation Approach
{How to proceed}
## Clarifications Needed (if any)
- {Unclear points or items requiring confirmation}
```
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -55,32 +80,6 @@ steps:
1. Understand the requirements 1. Understand the requirements
2. Identify impact scope 2. Identify impact scope
3. Decide implementation approach 3. Decide implementation approach
**Report output:** Output to the `Report File` specified above.
- If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section
**Report format:**
```markdown
# Task Plan
## Original Request
{User's request as-is}
## Analysis Results
### Objective
{What needs to be achieved}
### Scope
{Impact scope}
### Implementation Approach
{How to proceed}
## Clarifications Needed (if any)
- {Unclear points or items requiring confirmation}
```
pass_previous_response: true pass_previous_response: true
rules: rules:
- condition: Task analysis and planning is complete - condition: Task analysis and planning is complete
@ -153,7 +152,38 @@ steps:
# =========================================== # ===========================================
- name: ai_review - name: ai_review
agent: ~/.takt/agents/default/ai-antipattern-reviewer.md agent: ~/.takt/agents/default/ai-antipattern-reviewer.md
report: 03-ai-review.md report:
name: 03-ai-review.md
order: |
**Report output:** Output to the `Report File` specified above.
- If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section
format: |
```markdown
# AI-Generated Code Review
## Result: APPROVE / REJECT
## Summary
{One sentence summarizing result}
## Verified Items
| Aspect | Result | Notes |
|--------|--------|-------|
| Assumption validity | ✅ | - |
| API/Library existence | ✅ | - |
| Context fit | ✅ | - |
| Scope | ✅ | - |
## Issues (if REJECT)
| # | Category | Location | Issue |
|---|----------|----------|-------|
| 1 | Hallucinated API | `src/file.ts:23` | Non-existent method |
```
**Cognitive load reduction rules:**
- No issues → Summary 1 line + check table only (10 lines or less)
- Issues found → + Issues in table format (25 lines or less)
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -162,47 +192,11 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
instruction_template: | instruction_template: |
## Git Diff
```diff
{git_diff}
```
Review the code for AI-specific issues: Review the code for AI-specific issues:
- Assumption validation - Assumption validation
- Plausible but wrong patterns - Plausible but wrong patterns
- Context fit with existing codebase - Context fit with existing codebase
- Scope creep detection - Scope creep detection
**Report output:** Output to the `Report File` specified above.
- If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section
**Report format:**
```markdown
# AI-Generated Code Review
## Result: APPROVE / REJECT
## Summary
{One sentence summarizing result}
## Verified Items
| Aspect | Result | Notes |
|--------|--------|-------|
| Assumption validity | ✅ | - |
| API/Library existence | ✅ | - |
| Context fit | ✅ | - |
| Scope | ✅ | - |
## Issues (if REJECT)
| # | Category | Location | Issue |
|---|----------|----------|-------|
| 1 | Hallucinated API | `src/file.ts:23` | Non-existent method |
```
**Cognitive load reduction rules:**
- No issues → Summary 1 line + check table only (10 lines or less)
- Issues found → + Issues in table format (25 lines or less)
rules: rules:
- condition: No AI-specific issues found - condition: No AI-specific issues found
next: cqrs_es_review next: cqrs_es_review
@ -242,7 +236,35 @@ steps:
# =========================================== # ===========================================
- name: cqrs_es_review - name: cqrs_es_review
agent: ~/.takt/agents/expert-cqrs/cqrs-es-reviewer.md agent: ~/.takt/agents/expert-cqrs/cqrs-es-reviewer.md
report: 04-cqrs-es-review.md report:
name: 04-cqrs-es-review.md
order: |
**Report output:** Output to the `Report File` specified above.
- If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section
format: |
```markdown
# CQRS+ES Review
## Result: APPROVE / REJECT
## Summary
{1-2 sentences summarizing result}
## Reviewed Perspectives
| Perspective | Result | Notes |
|-------------|--------|-------|
| Aggregate Design | ✅ | - |
| Event Design | ✅ | - |
| Command/Query Separation | ✅ | - |
| Projections | ✅ | - |
| Eventual Consistency | ✅ | - |
## Issues (if REJECT)
| # | Location | Issue | Fix |
|---|----------|-------|-----|
| 1 | `src/file.ts:42` | Issue description | Fix method |
```
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -251,11 +273,6 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
instruction_template: | instruction_template: |
## Git Diff
```diff
{git_diff}
```
Review the changes above from the CQRS (Command Query Responsibility Segregation) Review the changes above from the CQRS (Command Query Responsibility Segregation)
and Event Sourcing perspective. and Event Sourcing perspective.
@ -268,34 +285,6 @@ steps:
**Note**: If this project does not use CQRS+ES patterns, **Note**: If this project does not use CQRS+ES patterns,
review from a general domain design perspective. review from a general domain design perspective.
**Report output:** Output to the `Report File` specified above.
- If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section
**Report format:**
```markdown
# CQRS+ES Review
## Result: APPROVE / REJECT
## Summary
{1-2 sentences summarizing result}
## Reviewed Perspectives
| Perspective | Result | Notes |
|-------------|--------|-------|
| Aggregate Design | ✅ | - |
| Event Design | ✅ | - |
| Command/Query Separation | ✅ | - |
| Projections | ✅ | - |
| Eventual Consistency | ✅ | - |
## Issues (if REJECT)
| # | Location | Issue | Fix |
|---|----------|-------|-----|
| 1 | `src/file.ts:42` | Issue description | Fix method |
```
rules: rules:
- condition: CQRS+ES design is sound with no issues - condition: CQRS+ES design is sound with no issues
next: frontend_review next: frontend_review
@ -337,7 +326,35 @@ steps:
# =========================================== # ===========================================
- name: frontend_review - name: frontend_review
agent: ~/.takt/agents/expert/frontend-reviewer.md agent: ~/.takt/agents/expert/frontend-reviewer.md
report: 05-frontend-review.md report:
name: 05-frontend-review.md
order: |
**Report output:** Output to the `Report File` specified above.
- If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section
format: |
```markdown
# Frontend Review
## Result: APPROVE / REJECT
## Summary
{1-2 sentences summarizing result}
## Reviewed Perspectives
| Perspective | Result | Notes |
|-------------|--------|-------|
| Component Design | ✅ | - |
| State Management | ✅ | - |
| Performance | ✅ | - |
| Accessibility | ✅ | - |
| Type Safety | ✅ | - |
## Issues (if REJECT)
| # | Location | Issue | Fix |
|---|----------|-------|-----|
| 1 | `src/file.tsx:42` | Issue description | Fix method |
```
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -346,11 +363,6 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
instruction_template: | instruction_template: |
## Git Diff
```diff
{git_diff}
```
Review the changes above from the frontend development perspective. Review the changes above from the frontend development perspective.
**Review Criteria:** **Review Criteria:**
@ -363,34 +375,6 @@ steps:
**Note**: If this project does not include frontend code, **Note**: If this project does not include frontend code,
approve and proceed to the next step. approve and proceed to the next step.
**Report output:** Output to the `Report File` specified above.
- If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section
**Report format:**
```markdown
# Frontend Review
## Result: APPROVE / REJECT
## Summary
{1-2 sentences summarizing result}
## Reviewed Perspectives
| Perspective | Result | Notes |
|-------------|--------|-------|
| Component Design | ✅ | - |
| State Management | ✅ | - |
| Performance | ✅ | - |
| Accessibility | ✅ | - |
| Type Safety | ✅ | - |
## Issues (if REJECT)
| # | Location | Issue | Fix |
|---|----------|-------|-----|
| 1 | `src/file.tsx:42` | Issue description | Fix method |
```
rules: rules:
- condition: Frontend design is sound with no issues - condition: Frontend design is sound with no issues
next: security_review next: security_review
@ -432,7 +416,36 @@ steps:
# =========================================== # ===========================================
- name: security_review - name: security_review
agent: ~/.takt/agents/expert/security-reviewer.md agent: ~/.takt/agents/expert/security-reviewer.md
report: 06-security-review.md report:
name: 06-security-review.md
order: |
**Report output:** Output to the `Report File` specified above.
- If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section
format: |
```markdown
# Security Review
## Result: APPROVE / REJECT
## Severity: None / Low / Medium / High / Critical
## Check Results
| Category | Result | Notes |
|----------|--------|-------|
| Injection | ✅ | - |
| Auth/Authz | ✅ | - |
| Data Protection | ✅ | - |
| Dependencies | ✅ | - |
## Vulnerabilities (if REJECT)
| # | Severity | Type | Location | Fix |
|---|----------|------|----------|-----|
| 1 | High | SQLi | `src/db.ts:42` | Use parameterized query |
## Warnings (non-blocking)
- {Security recommendations}
```
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -441,11 +454,6 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
instruction_template: | instruction_template: |
## Git Diff
```diff
{git_diff}
```
Review the changes above from the security perspective. Review the changes above from the security perspective.
**Review Criteria:** **Review Criteria:**
@ -454,35 +462,6 @@ steps:
- Sensitive information handling - Sensitive information handling
- Encryption appropriateness - Encryption appropriateness
- OWASP Top 10 - OWASP Top 10
**Report output:** Output to the `Report File` specified above.
- If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section
**Report format:**
```markdown
# Security Review
## Result: APPROVE / REJECT
## Severity: None / Low / Medium / High / Critical
## Check Results
| Category | Result | Notes |
|----------|--------|-------|
| Injection | ✅ | - |
| Auth/Authz | ✅ | - |
| Data Protection | ✅ | - |
| Dependencies | ✅ | - |
## Vulnerabilities (if REJECT)
| # | Severity | Type | Location | Fix |
|---|----------|------|----------|-----|
| 1 | High | SQLi | `src/db.ts:42` | Use parameterized query |
## Warnings (non-blocking)
- {Security recommendations}
```
rules: rules:
- condition: No security issues found - condition: No security issues found
next: qa_review next: qa_review
@ -534,7 +513,35 @@ steps:
# =========================================== # ===========================================
- name: qa_review - name: qa_review
agent: ~/.takt/agents/expert/qa-reviewer.md agent: ~/.takt/agents/expert/qa-reviewer.md
report: 07-qa-review.md report:
name: 07-qa-review.md
order: |
**Report output:** Output to the `Report File` specified above.
- If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section
format: |
```markdown
# QA Review
## Result: APPROVE / REJECT
## Summary
{1-2 sentences summarizing result}
## Reviewed Perspectives
| Perspective | Result | Notes |
|-------------|--------|-------|
| Test Coverage | ✅ | - |
| Test Quality | ✅ | - |
| Error Handling | ✅ | - |
| Documentation | ✅ | - |
| Maintainability | ✅ | - |
## Issues (if REJECT)
| # | Category | Issue | Fix |
|---|----------|-------|-----|
| 1 | Testing | Issue description | Fix method |
```
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -543,11 +550,6 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
instruction_template: | instruction_template: |
## Git Diff
```diff
{git_diff}
```
Review the changes above from the quality assurance perspective. Review the changes above from the quality assurance perspective.
**Review Criteria:** **Review Criteria:**
@ -557,34 +559,6 @@ steps:
- Error handling - Error handling
- Logging and monitoring - Logging and monitoring
- Maintainability - Maintainability
**Report output:** Output to the `Report File` specified above.
- If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section
**Report format:**
```markdown
# QA Review
## Result: APPROVE / REJECT
## Summary
{1-2 sentences summarizing result}
## Reviewed Perspectives
| Perspective | Result | Notes |
|-------------|--------|-------|
| Test Coverage | ✅ | - |
| Test Quality | ✅ | - |
| Error Handling | ✅ | - |
| Documentation | ✅ | - |
| Maintainability | ✅ | - |
## Issues (if REJECT)
| # | Category | Issue | Fix |
|---|----------|-------|-----|
| 1 | Testing | Issue description | Fix method |
```
rules: rules:
- condition: Quality standards are met - condition: Quality standards are met
next: supervise next: supervise
@ -651,11 +625,6 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
instruction_template: | instruction_template: |
## Git Diff
```diff
{git_diff}
```
## Previous Reviews Summary ## Previous Reviews Summary
Reaching this step means all the following reviews have been APPROVED: Reaching this step means all the following reviews have been APPROVED:
- AI Review: APPROVED - AI Review: APPROVED

View File

@ -13,15 +13,23 @@
# - fix_security: MINOR->security_review, MAJOR->architect_review # - fix_security: MINOR->security_review, MAJOR->architect_review
# - fix_qa: MINOR->qa_review, SECURITY->security_review, MAJOR->architect_review # - fix_qa: MINOR->qa_review, SECURITY->security_review, MAJOR->architect_review
# #
# Template Variables: # Boilerplate sections (Workflow Context, User Request, Previous Response,
# {iteration} - Workflow-wide turn count (total steps executed across all agents) # Additional User Inputs, Instructions heading) are auto-injected by buildInstruction().
# {max_iterations} - Maximum iterations allowed for the workflow # Only step-specific content belongs in instruction_template.
# {step_iteration} - Per-step iteration count (how many times THIS step has been executed) #
# {task} - Original user request # Template Variables (available in instruction_template):
# {previous_response} - Output from the previous step # {iteration} - Workflow-wide turn count (total steps executed across all agents)
# {git_diff} - Current uncommitted changes (git diff) # {max_iterations} - Maximum iterations allowed for the workflow
# {user_inputs} - Accumulated user inputs during workflow # {step_iteration} - Per-step iteration count (how many times THIS step has been executed)
# {report_dir} - Report directory name (e.g., "20250126-143052-task-summary") # {previous_response} - Output from the previous step (only when pass_previous_response: true)
# {report_dir} - Report directory name (e.g., "20250126-143052-task-summary")
#
# Step-level Fields:
# report: - Report file(s) for the step (auto-injected as Report File/Files in Workflow Context)
# Single: report: 00-plan.md
# Multiple: report:
# - Scope: 01-coder-scope.md
# - Decisions: 02-coder-decisions.md
name: expert name: expert
description: Architecture, Frontend, Security, QA Expert Review description: Architecture, Frontend, Security, QA Expert Review
@ -36,7 +44,33 @@ steps:
# =========================================== # ===========================================
- name: plan - name: plan
agent: ~/.takt/agents/default/planner.md agent: ~/.takt/agents/default/planner.md
report: 00-plan.md report:
name: 00-plan.md
order: |
**Report output:** Output to the `Report File` specified above.
- If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section
format: |
```markdown
# Task Plan
## Original Request
{User's request as-is}
## Analysis Results
### Objective
{What needs to be achieved}
### Scope
{Impact scope}
### Implementation Approach
{How to proceed}
## Clarifications Needed (if any)
- {Unclear points or items requiring confirmation}
```
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -58,32 +92,6 @@ steps:
1. Understand the requirements 1. Understand the requirements
2. Identify impact scope 2. Identify impact scope
3. Decide implementation approach 3. Decide implementation approach
**Report output:** Output to `.takt/reports/{report_dir}/00-plan.md`.
- If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section
**Report format:**
```markdown
# Task Plan
## Original Request
{User's request as-is}
## Analysis Results
### Objective
{What needs to be achieved}
### Scope
{Impact scope}
### Implementation Approach
{How to proceed}
## Clarifications Needed (if any)
- {Unclear points or items requiring confirmation}
```
pass_previous_response: true pass_previous_response: true
rules: rules:
- condition: Task analysis and planning is complete - condition: Task analysis and planning is complete
@ -112,9 +120,7 @@ steps:
Follow the plan from the plan step and implement. Follow the plan from the plan step and implement.
Refer to the plan report (00-plan.md) and proceed with implementation. Refer to the plan report (00-plan.md) and proceed with implementation.
**Report output:** Output to the report files specified below. **Report output:** Output to the `Report Files` specified above.
- Scope: `.takt/reports/{report_dir}/01-coder-scope.md`
- Decisions: `.takt/reports/{report_dir}/02-coder-decisions.md`
- If file does not exist: Create new file - If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section - If file exists: Append with `## Iteration {step_iteration}` section
@ -158,7 +164,38 @@ steps:
# =========================================== # ===========================================
- name: ai_review - name: ai_review
agent: ~/.takt/agents/default/ai-antipattern-reviewer.md agent: ~/.takt/agents/default/ai-antipattern-reviewer.md
report: 03-ai-review.md report:
name: 03-ai-review.md
order: |
**Report output:** Output to the `Report File` specified above.
- If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section
format: |
```markdown
# AI-Generated Code Review
## Result: APPROVE / REJECT
## Summary
{One sentence summarizing result}
## Verified Items
| Aspect | Result | Notes |
|--------|--------|-------|
| Assumption validity | ✅ | - |
| API/Library existence | ✅ | - |
| Context fit | ✅ | - |
| Scope | ✅ | - |
## Issues (if REJECT)
| # | Category | Location | Issue |
|---|----------|----------|-------|
| 1 | Hallucinated API | `src/file.ts:23` | Non-existent method |
```
**Cognitive load reduction rules:**
- No issues -> Summary 1 line + check table only (10 lines or less)
- Issues found -> + Issues in table format (25 lines or less)
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -167,47 +204,11 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
instruction_template: | instruction_template: |
## Git Diff
```diff
{git_diff}
```
Review the code for AI-specific issues: Review the code for AI-specific issues:
- Assumption validation - Assumption validation
- Plausible but wrong patterns - Plausible but wrong patterns
- Context fit with existing codebase - Context fit with existing codebase
- Scope creep detection - Scope creep detection
**Report output:** Output to `.takt/reports/{report_dir}/03-ai-review.md`.
- If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section
**Report format:**
```markdown
# AI-Generated Code Review
## Result: APPROVE / REJECT
## Summary
{One sentence summarizing result}
## Verified Items
| Aspect | Result | Notes |
|--------|--------|-------|
| Assumption validity | ✅ | - |
| API/Library existence | ✅ | - |
| Context fit | ✅ | - |
| Scope | ✅ | - |
## Issues (if REJECT)
| # | Category | Location | Issue |
|---|----------|----------|-------|
| 1 | Hallucinated API | `src/file.ts:23` | Non-existent method |
```
**Cognitive load reduction rules:**
- No issues -> Summary 1 line + check table only (10 lines or less)
- Issues found -> + Issues in table format (25 lines or less)
rules: rules:
- condition: No AI-specific issues found - condition: No AI-specific issues found
next: architect_review next: architect_review
@ -247,7 +248,42 @@ steps:
# =========================================== # ===========================================
- name: architect_review - name: architect_review
agent: ~/.takt/agents/default/architecture-reviewer.md agent: ~/.takt/agents/default/architecture-reviewer.md
report: 04-architect-review.md report:
name: 04-architect-review.md
order: |
**Report output:** Output to the `Report File` specified above.
- If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section
format: |
```markdown
# Architecture Review
## Result: APPROVE / IMPROVE / REJECT
## Summary
{1-2 sentences summarizing result}
## Reviewed Aspects
- [x] Structure/Design
- [x] Code Quality
- [x] Change Scope
- [x] Test Coverage
- [x] Dead Code
- [x] Call Chain Verification
## Issues (if REJECT)
| # | Location | Issue | Fix |
|---|----------|-------|-----|
| 1 | `src/file.ts:42` | Issue description | Fix method |
## Improvement Suggestions (optional - non-blocking)
- {Future improvement suggestions}
```
**Cognitive load reduction rules:**
- APPROVE + no issues -> Summary only (5 lines or less)
- APPROVE + minor suggestions -> Summary + suggestions (15 lines or less)
- REJECT -> Issues in table format (30 lines or less)
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -256,11 +292,6 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
instruction_template: | instruction_template: |
## Git Diff
```diff
{git_diff}
```
Focus on **architecture and design** review. Focus on **architecture and design** review.
**Review Criteria:** **Review Criteria:**
@ -270,41 +301,6 @@ steps:
- Test coverage - Test coverage
- Dead code - Dead code
- Call chain verification - Call chain verification
**Report output:** Output to `.takt/reports/{report_dir}/04-architect-review.md`.
- If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section
**Report format:**
```markdown
# Architecture Review
## Result: APPROVE / IMPROVE / REJECT
## Summary
{1-2 sentences summarizing result}
## Reviewed Aspects
- [x] Structure/Design
- [x] Code Quality
- [x] Change Scope
- [x] Test Coverage
- [x] Dead Code
- [x] Call Chain Verification
## Issues (if REJECT)
| # | Location | Issue | Fix |
|---|----------|-------|-----|
| 1 | `src/file.ts:42` | Issue description | Fix method |
## Improvement Suggestions (optional - non-blocking)
- {Future improvement suggestions}
```
**Cognitive load reduction rules:**
- APPROVE + no issues -> Summary only (5 lines or less)
- APPROVE + minor suggestions -> Summary + suggestions (15 lines or less)
- REJECT -> Issues in table format (30 lines or less)
rules: rules:
- condition: No architecture or design issues found - condition: No architecture or design issues found
next: frontend_review next: frontend_review
@ -344,7 +340,35 @@ steps:
# =========================================== # ===========================================
- name: frontend_review - name: frontend_review
agent: ~/.takt/agents/expert/frontend-reviewer.md agent: ~/.takt/agents/expert/frontend-reviewer.md
report: 05-frontend-review.md report:
name: 05-frontend-review.md
order: |
**Report output:** Output to the `Report File` specified above.
- If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section
format: |
```markdown
# Frontend Review
## Result: APPROVE / REJECT
## Summary
{1-2 sentences summarizing result}
## Reviewed Perspectives
| Perspective | Result | Notes |
|-------------|--------|-------|
| Component Design | ✅ | - |
| State Management | ✅ | - |
| Performance | ✅ | - |
| Accessibility | ✅ | - |
| Type Safety | ✅ | - |
## Issues (if REJECT)
| # | Location | Issue | Fix |
|---|----------|-------|-----|
| 1 | `src/file.tsx:42` | Issue description | Fix method |
```
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -353,12 +377,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
instruction_template: | instruction_template: |
## Git Diff Review the changes from the frontend development perspective.
```diff
{git_diff}
```
Review the changes above from the frontend development perspective.
**Review Criteria:** **Review Criteria:**
- Component design (separation of concerns, granularity) - Component design (separation of concerns, granularity)
@ -370,34 +389,6 @@ steps:
**Note**: If this project does not include frontend code, **Note**: If this project does not include frontend code,
approve and proceed to the next step. approve and proceed to the next step.
**Report output:** Output to `.takt/reports/{report_dir}/05-frontend-review.md`.
- If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section
**Report format:**
```markdown
# Frontend Review
## Result: APPROVE / REJECT
## Summary
{1-2 sentences summarizing result}
## Reviewed Perspectives
| Perspective | Result | Notes |
|-------------|--------|-------|
| Component Design | ✅ | - |
| State Management | ✅ | - |
| Performance | ✅ | - |
| Accessibility | ✅ | - |
| Type Safety | ✅ | - |
## Issues (if REJECT)
| # | Location | Issue | Fix |
|---|----------|-------|-----|
| 1 | `src/file.tsx:42` | Issue description | Fix method |
```
rules: rules:
- condition: Frontend design is sound with no issues - condition: Frontend design is sound with no issues
next: security_review next: security_review
@ -439,7 +430,36 @@ steps:
# =========================================== # ===========================================
- name: security_review - name: security_review
agent: ~/.takt/agents/expert/security-reviewer.md agent: ~/.takt/agents/expert/security-reviewer.md
report: 06-security-review.md report:
name: 06-security-review.md
order: |
**Report output:** Output to the `Report File` specified above.
- If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section
format: |
```markdown
# Security Review
## Result: APPROVE / REJECT
## Severity: None / Low / Medium / High / Critical
## Check Results
| Category | Result | Notes |
|----------|--------|-------|
| Injection | ✅ | - |
| Auth/Authz | ✅ | - |
| Data Protection | ✅ | - |
| Dependencies | ✅ | - |
## Vulnerabilities (if REJECT)
| # | Severity | Type | Location | Fix |
|---|----------|------|----------|-----|
| 1 | High | SQLi | `src/db.ts:42` | Use parameterized query |
## Warnings (non-blocking)
- {Security recommendations}
```
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -448,12 +468,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
instruction_template: | instruction_template: |
## Git Diff Review the changes from the security perspective.
```diff
{git_diff}
```
Review the changes above from the security perspective.
**Review Criteria:** **Review Criteria:**
- Injection attacks (SQL, command, XSS) - Injection attacks (SQL, command, XSS)
@ -461,35 +476,6 @@ steps:
- Sensitive information handling - Sensitive information handling
- Encryption appropriateness - Encryption appropriateness
- OWASP Top 10 - OWASP Top 10
**Report output:** Output to `.takt/reports/{report_dir}/06-security-review.md`.
- If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section
**Report format:**
```markdown
# Security Review
## Result: APPROVE / REJECT
## Severity: None / Low / Medium / High / Critical
## Check Results
| Category | Result | Notes |
|----------|--------|-------|
| Injection | ✅ | - |
| Auth/Authz | ✅ | - |
| Data Protection | ✅ | - |
| Dependencies | ✅ | - |
## Vulnerabilities (if REJECT)
| # | Severity | Type | Location | Fix |
|---|----------|------|----------|-----|
| 1 | High | SQLi | `src/db.ts:42` | Use parameterized query |
## Warnings (non-blocking)
- {Security recommendations}
```
rules: rules:
- condition: No security issues found - condition: No security issues found
next: qa_review next: qa_review
@ -541,7 +527,35 @@ steps:
# =========================================== # ===========================================
- name: qa_review - name: qa_review
agent: ~/.takt/agents/expert/qa-reviewer.md agent: ~/.takt/agents/expert/qa-reviewer.md
report: 07-qa-review.md report:
name: 07-qa-review.md
order: |
**Report output:** Output to the `Report File` specified above.
- If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section
format: |
```markdown
# QA Review
## Result: APPROVE / REJECT
## Summary
{1-2 sentences summarizing result}
## Reviewed Perspectives
| Perspective | Result | Notes |
|-------------|--------|-------|
| Test Coverage | ✅ | - |
| Test Quality | ✅ | - |
| Error Handling | ✅ | - |
| Documentation | ✅ | - |
| Maintainability | ✅ | - |
## Issues (if REJECT)
| # | Category | Issue | Fix |
|---|----------|-------|-----|
| 1 | Testing | Issue description | Fix method |
```
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -550,12 +564,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
instruction_template: | instruction_template: |
## Git Diff Review the changes from the quality assurance perspective.
```diff
{git_diff}
```
Review the changes above from the quality assurance perspective.
**Review Criteria:** **Review Criteria:**
- Test coverage and quality - Test coverage and quality
@ -564,34 +573,6 @@ steps:
- Error handling - Error handling
- Logging and monitoring - Logging and monitoring
- Maintainability - Maintainability
**Report output:** Output to `.takt/reports/{report_dir}/07-qa-review.md`.
- If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section
**Report format:**
```markdown
# QA Review
## Result: APPROVE / REJECT
## Summary
{1-2 sentences summarizing result}
## Reviewed Perspectives
| Perspective | Result | Notes |
|-------------|--------|-------|
| Test Coverage | ✅ | - |
| Test Quality | ✅ | - |
| Error Handling | ✅ | - |
| Documentation | ✅ | - |
| Maintainability | ✅ | - |
## Issues (if REJECT)
| # | Category | Issue | Fix |
|---|----------|-------|-----|
| 1 | Testing | Issue description | Fix method |
```
rules: rules:
- condition: Quality standards are met - condition: Quality standards are met
next: supervise next: supervise
@ -658,11 +639,6 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
instruction_template: | instruction_template: |
## Git Diff
```diff
{git_diff}
```
## Previous Reviews Summary ## Previous Reviews Summary
Reaching this step means all the following reviews have been APPROVED: Reaching this step means all the following reviews have been APPROVED:
- Architecture Review: APPROVED - Architecture Review: APPROVED
@ -681,9 +657,7 @@ steps:
**Review Reports:** Read all reports in Report Directory and **Review Reports:** Read all reports in Report Directory and
check for any unaddressed improvement suggestions. check for any unaddressed improvement suggestions.
**Report output:** Output to the report files specified below. **Report output:** Output to the `Report Files` specified above.
- Validation: `.takt/reports/{report_dir}/08-supervisor-validation.md`
- Summary: `.takt/reports/{report_dir}/summary.md`
- If file does not exist: Create new file - If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section - If file exists: Append with `## Iteration {step_iteration}` section

View File

@ -8,7 +8,6 @@
# {step_iteration} - Per-step iteration count (how many times THIS step has been executed) # {step_iteration} - Per-step iteration count (how many times THIS step has been executed)
# {task} - Original user request # {task} - Original user request
# {previous_response} - Output from the previous step # {previous_response} - Output from the previous step
# {git_diff} - Current uncommitted changes (git diff)
# {user_inputs} - Accumulated user inputs during workflow # {user_inputs} - Accumulated user inputs during workflow
# {report_dir} - Report directory name (e.g., "20250126-143052-task-summary") # {report_dir} - Report directory name (e.g., "20250126-143052-task-summary")

View File

@ -12,7 +12,6 @@
# {step_iteration} - Per-step iteration count (how many times THIS step has been executed) # {step_iteration} - Per-step iteration count (how many times THIS step has been executed)
# {task} - Original user request # {task} - Original user request
# {previous_response} - Output from the previous step # {previous_response} - Output from the previous step
# {git_diff} - Current uncommitted changes (git diff)
# {user_inputs} - Accumulated user inputs during workflow # {user_inputs} - Accumulated user inputs during workflow
# {report_dir} - Report directory name (e.g., "20250126-143052-task-summary") # {report_dir} - Report directory name (e.g., "20250126-143052-task-summary")

View File

@ -7,7 +7,6 @@
# {step_iteration} - Per-step iteration count # {step_iteration} - Per-step iteration count
# {task} - Original user request # {task} - Original user request
# {previous_response} - Output from the previous step # {previous_response} - Output from the previous step
# {git_diff} - Current uncommitted changes (git diff)
# {user_inputs} - Accumulated user inputs during workflow # {user_inputs} - Accumulated user inputs during workflow
# {report_dir} - Report directory name # {report_dir} - Report directory name
# #
@ -27,7 +26,33 @@ initial_step: plan
steps: steps:
- name: plan - name: plan
agent: ~/.takt/agents/default/planner.md agent: ~/.takt/agents/default/planner.md
report: 00-plan.md report:
name: 00-plan.md
order: |
**Report output:** Output to the `Report File` specified above.
- If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section
format: |
```markdown
# Task Plan
## Original Request
{User's request as-is}
## Analysis Results
### Objective
{What needs to be achieved}
### Scope
{Impact scope}
### Implementation Approach
{How to proceed}
## Clarifications Needed (if any)
- {Unclear points or items requiring confirmation}
```
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -58,32 +83,6 @@ steps:
2. Identify impact scope 2. Identify impact scope
3. Decide implementation approach 3. Decide implementation approach
**Report output:** Output to the `Report File` specified above.
- If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section
**Report format:**
```markdown
# Task Plan
## Original Request
{User's request as-is}
## Analysis Results
### Objective
{What needs to be achieved}
### Scope
{Impact scope}
### Implementation Approach
{How to proceed}
## Clarifications Needed (if any)
- {Unclear points or items requiring confirmation}
```
- name: implement - name: implement
agent: ~/.takt/agents/default/coder.md agent: ~/.takt/agents/default/coder.md
report: report:
@ -144,7 +143,38 @@ steps:
- name: ai_review - name: ai_review
agent: ~/.takt/agents/default/ai-antipattern-reviewer.md agent: ~/.takt/agents/default/ai-antipattern-reviewer.md
report: 03-ai-review.md report:
name: 03-ai-review.md
order: |
**Report output:** Output to the `Report File` specified above.
- If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section
format: |
```markdown
# AI-Generated Code Review
## Result: APPROVE / REJECT
## Summary
{One sentence summarizing result}
## Verified Items
| Aspect | Result | Notes |
|--------|--------|-------|
| Assumption validity | ✅ | - |
| API/Library existence | ✅ | - |
| Context fit | ✅ | - |
| Scope | ✅ | - |
## Issues (if REJECT)
| # | Category | Location | Issue |
|---|----------|----------|-------|
| 1 | Hallucinated API | `src/file.ts:23` | Non-existent method |
```
**Cognitive load reduction rules:**
- No issues -> Summary 1 line + check table only (10 lines or less)
- Issues found -> + Issues in table format (25 lines or less)
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -158,51 +188,47 @@ steps:
- condition: AI-specific issues found - condition: AI-specific issues found
next: plan next: plan
instruction_template: | instruction_template: |
## Git Diff
```diff
{git_diff}
```
Review the code for AI-specific issues: Review the code for AI-specific issues:
- Assumption validation - Assumption validation
- Plausible but wrong patterns - Plausible but wrong patterns
- Context fit with existing codebase - Context fit with existing codebase
- Scope creep detection - Scope creep detection
**Report output:** Output to the `Report File` specified above.
- If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section
**Report format:**
```markdown
# AI-Generated Code Review
## Result: APPROVE / REJECT
## Summary
{One sentence summarizing result}
## Verified Items
| Aspect | Result | Notes |
|--------|--------|-------|
| Assumption validity | ✅ | - |
| API/Library existence | ✅ | - |
| Context fit | ✅ | - |
| Scope | ✅ | - |
## Issues (if REJECT)
| # | Category | Location | Issue |
|---|----------|----------|-------|
| 1 | Hallucinated API | `src/file.ts:23` | Non-existent method |
```
**Cognitive load reduction rules:**
- No issues -> Summary 1 line + check table only (10 lines or less)
- Issues found -> + Issues in table format (25 lines or less)
- name: review - name: review
agent: ~/.takt/agents/default/architecture-reviewer.md agent: ~/.takt/agents/default/architecture-reviewer.md
report: 04-architect-review.md report:
name: 04-architect-review.md
order: |
**Report output:** Output to the `Report File` specified above.
- If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section
format: |
```markdown
# Architecture Review
## Result: APPROVE / REJECT
## Summary
{1-2 sentences summarizing result}
## Reviewed Perspectives
- [x] Structure & Design
- [x] Code Quality
- [x] Change Scope
## Issues (if REJECT)
| # | Location | Issue | Fix |
|---|----------|-------|-----|
| 1 | `src/file.ts:42` | Issue description | Fix method |
## Improvement Suggestions (optional, non-blocking)
- {Future improvement suggestions}
```
**Cognitive load reduction rules:**
- APPROVE + no issues -> Summary only (5 lines or less)
- APPROVE + minor suggestions -> Summary + suggestions (15 lines or less)
- REJECT -> Issues in table format (30 lines or less)
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -216,11 +242,6 @@ steps:
- condition: Structural fix required - condition: Structural fix required
next: plan next: plan
instruction_template: | instruction_template: |
## Git Diff
```diff
{git_diff}
```
Focus on **architecture and design** review. Do NOT review AI-specific issues (that's already done). Focus on **architecture and design** review. Do NOT review AI-specific issues (that's already done).
Review the changes and provide feedback. Review the changes and provide feedback.
@ -228,38 +249,6 @@ steps:
**Note:** In simple workflow, IMPROVE judgment is not used. **Note:** In simple workflow, IMPROVE judgment is not used.
If there are minor suggestions, use APPROVE + comments. If there are minor suggestions, use APPROVE + comments.
**Report output:** Output to the `Report File` specified above.
- If file does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section
**Report format:**
```markdown
# Architecture Review
## Result: APPROVE / REJECT
## Summary
{1-2 sentences summarizing result}
## Reviewed Perspectives
- [x] Structure & Design
- [x] Code Quality
- [x] Change Scope
## Issues (if REJECT)
| # | Location | Issue | Fix |
|---|----------|-------|-----|
| 1 | `src/file.ts:42` | Issue description | Fix method |
## Improvement Suggestions (optional, non-blocking)
- {Future improvement suggestions}
```
**Cognitive load reduction rules:**
- APPROVE + no issues -> Summary only (5 lines or less)
- APPROVE + minor suggestions -> Summary + suggestions (15 lines or less)
- REJECT -> Issues in table format (30 lines or less)
- name: supervise - name: supervise
agent: ~/.takt/agents/default/supervisor.md agent: ~/.takt/agents/default/supervisor.md
report: report:
@ -279,11 +268,6 @@ steps:
- condition: Requirements unmet, tests failing - condition: Requirements unmet, tests failing
next: plan next: plan
instruction_template: | instruction_template: |
## Git Diff
```diff
{git_diff}
```
Run tests, verify the build, and perform final approval. Run tests, verify the build, and perform final approval.
**Workflow Overall Review:** **Workflow Overall Review:**

View File

@ -41,7 +41,7 @@
**特にテンプレートファイルについて:** **特にテンプレートファイルについて:**
- `resources/` 内のYAMLやMarkdownはテンプレート - `resources/` 内のYAMLやMarkdownはテンプレート
- `{report_dir}`, `{task}`, `{git_diff}` はプレースホルダー(実行時に置換される) - `{report_dir}`, `{task}` はプレースホルダー(実行時に置換される)
- git diff でレポートファイルに展開後の値が見えても、それはハードコードではない - git diff でレポートファイルに展開後の値が見えても、それはハードコードではない
**誤検知を避けるために:** **誤検知を避けるために:**

View File

@ -7,7 +7,6 @@
# {step_iteration} - Per-step iteration count (how many times THIS step has been executed) # {step_iteration} - Per-step iteration count (how many times THIS step has been executed)
# {task} - Original user request # {task} - Original user request
# {previous_response} - Output from the previous step # {previous_response} - Output from the previous step
# {git_diff} - Current uncommitted changes (git diff)
# {user_inputs} - Accumulated user inputs during workflow # {user_inputs} - Accumulated user inputs during workflow
# {report_dir} - Report directory name (e.g., "20250126-143052-task-summary") # {report_dir} - Report directory name (e.g., "20250126-143052-task-summary")
@ -21,7 +20,33 @@ initial_step: plan
steps: steps:
- name: plan - name: plan
agent: ~/.takt/agents/default/planner.md agent: ~/.takt/agents/default/planner.md
report: 00-plan.md report:
name: 00-plan.md
order: |
**レポート出力:** `Report File` に出力してください。
- ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
format: |
```markdown
# タスク計画
## 元の要求
{ユーザーの要求をそのまま記載}
## 分析結果
### 目的
{達成すべきこと}
### スコープ
{影響範囲}
### 実装アプローチ
{どう進めるか}
## 確認事項(あれば)
- {不明点や確認が必要な点}
```
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -30,8 +55,6 @@ steps:
- Bash - Bash
- WebSearch - WebSearch
- WebFetch - WebFetch
rules: rules:
- condition: 要件が明確で実装可能 - condition: 要件が明確で実装可能
next: implement next: implement
@ -58,32 +81,6 @@ steps:
2. 影響範囲を特定する 2. 影響範囲を特定する
3. 実装アプローチを決める 3. 実装アプローチを決める
**レポート出力:** Report File に出力してください。
- ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
**レポートフォーマット:**
```markdown
# タスク計画
## 元の要求
{ユーザーの要求をそのまま記載}
## 分析結果
### 目的
{達成すべきこと}
### スコープ
{影響範囲}
### 実装アプローチ
{どう進めるか}
## 確認事項(あれば)
- {不明点や確認が必要な点}
```
- name: implement - name: implement
agent: ~/.takt/agents/default/coder.md agent: ~/.takt/agents/default/coder.md
report: report:
@ -149,7 +146,38 @@ steps:
- name: ai_review - name: ai_review
agent: ~/.takt/agents/default/ai-antipattern-reviewer.md agent: ~/.takt/agents/default/ai-antipattern-reviewer.md
report: 03-ai-review.md report:
name: 03-ai-review.md
order: |
**レポート出力:** `Report File` に出力してください。
- ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
format: |
```markdown
# AI生成コードレビュー
## 結果: APPROVE / REJECT
## サマリー
{1文で結果を要約}
## 検証した項目
| 観点 | 結果 | 備考 |
|------|------|------|
| 仮定の妥当性 | ✅ | - |
| API/ライブラリの実在 | ✅ | - |
| コンテキスト適合 | ✅ | - |
| スコープ | ✅ | - |
## 問題点REJECTの場合
| # | カテゴリ | 場所 | 問題 |
|---|---------|------|------|
| 1 | 幻覚API | `src/file.ts:23` | 存在しないメソッド |
```
**認知負荷軽減ルール:**
- 問題なし → サマリー1文 + チェック表のみ10行以内
- 問題あり → + 問題を表形式で25行以内
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -163,48 +191,12 @@ steps:
- condition: AI特有の問題あり - condition: AI特有の問題あり
next: ai_fix next: ai_fix
instruction_template: | instruction_template: |
## Git Diff
```diff
{git_diff}
```
AI特有の問題についてコードをレビューしてください: AI特有の問題についてコードをレビューしてください:
- 仮定の検証 - 仮定の検証
- もっともらしいが間違っているパターン - もっともらしいが間違っているパターン
- 既存コードベースとの適合性 - 既存コードベースとの適合性
- スコープクリープの検出 - スコープクリープの検出
**レポート出力:** Report File に出力してください。
- ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
**レポートフォーマット:**
```markdown
# AI生成コードレビュー
## 結果: APPROVE / REJECT
## サマリー
{1文で結果を要約}
## 検証した項目
| 観点 | 結果 | 備考 |
|------|------|------|
| 仮定の妥当性 | ✅ | - |
| API/ライブラリの実在 | ✅ | - |
| コンテキスト適合 | ✅ | - |
| スコープ | ✅ | - |
## 問題点REJECTの場合
| # | カテゴリ | 場所 | 問題 |
|---|---------|------|------|
| 1 | 幻覚API | `src/file.ts:23` | 存在しないメソッド |
```
**認知負荷軽減ルール:**
- 問題なし → サマリー1文 + チェック表のみ10行以内
- 問題あり → + 問題を表形式で25行以内
- name: ai_fix - name: ai_fix
agent: ~/.takt/agents/default/coder.md agent: ~/.takt/agents/default/coder.md
allowed_tools: allowed_tools:
@ -236,7 +228,42 @@ steps:
- name: review - name: review
agent: ~/.takt/agents/default/architecture-reviewer.md agent: ~/.takt/agents/default/architecture-reviewer.md
report: 04-architect-review.md report:
name: 04-architect-review.md
order: |
**レポート出力:** `Report File` に出力してください。
- ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
format: |
```markdown
# アーキテクチャレビュー
## 結果: APPROVE / IMPROVE / REJECT
## サマリー
{1-2文で結果を要約}
## 確認した観点
- [x] 構造・設計
- [x] コード品質
- [x] 変更スコープ
- [x] テストカバレッジ
- [x] デッドコード
- [x] 呼び出しチェーン検証
## 問題点REJECTの場合
| # | 場所 | 問題 | 修正案 |
|---|------|------|--------|
| 1 | `src/file.ts:42` | 問題の説明 | 修正方法 |
## 改善提案(任意・ブロッキングではない)
- {将来的な改善提案}
```
**認知負荷軽減ルール:**
- APPROVE + 問題なし → サマリーのみ5行以内
- APPROVE + 軽微な提案 → サマリー + 改善提案15行以内
- REJECT → 問題点を表形式で30行以内
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -252,11 +279,6 @@ steps:
- condition: 構造的な修正が必要 - condition: 構造的な修正が必要
next: fix next: fix
instruction_template: | instruction_template: |
## Git Diff
```diff
{git_diff}
```
**アーキテクチャと設計**のレビューに集中してください。AI特有の問題はレビューしないでください次のステップで行います **アーキテクチャと設計**のレビューに集中してください。AI特有の問題はレビューしないでください次のステップで行います
変更をレビューしてフィードバックを提供してください。 変更をレビューしてフィードバックを提供してください。
@ -269,41 +291,6 @@ steps:
- デッドコード - デッドコード
- 呼び出しチェーン検証 - 呼び出しチェーン検証
**レポート出力:** Report File に出力してください。
- ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
**レポートフォーマット:**
```markdown
# アーキテクチャレビュー
## 結果: APPROVE / IMPROVE / REJECT
## サマリー
{1-2文で結果を要約}
## 確認した観点
- [x] 構造・設計
- [x] コード品質
- [x] 変更スコープ
- [x] テストカバレッジ
- [x] デッドコード
- [x] 呼び出しチェーン検証
## 問題点REJECTの場合
| # | 場所 | 問題 | 修正案 |
|---|------|------|--------|
| 1 | `src/file.ts:42` | 問題の説明 | 修正方法 |
## 改善提案(任意・ブロッキングではない)
- {将来的な改善提案}
```
**認知負荷軽減ルール:**
- APPROVE + 問題なし → サマリーのみ5行以内
- APPROVE + 軽微な提案 → サマリー + 改善提案15行以内
- REJECT → 問題点を表形式で30行以内
- name: improve - name: improve
agent: ~/.takt/agents/default/coder.md agent: ~/.takt/agents/default/coder.md
allowed_tools: allowed_tools:
@ -362,7 +349,41 @@ steps:
- name: security_review - name: security_review
agent: ~/.takt/agents/default/security-reviewer.md agent: ~/.takt/agents/default/security-reviewer.md
report: 05-security-review.md report:
name: 05-security-review.md
order: |
**レポート出力:** `Report File` に出力してください。
- ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
format: |
```markdown
# セキュリティレビュー
## 結果: APPROVE / REJECT
## 重大度: None / Low / Medium / High / Critical
## チェック結果
| カテゴリ | 結果 | 備考 |
|---------|------|------|
| インジェクション | ✅ | - |
| 認証・認可 | ✅ | - |
| データ保護 | ✅ | - |
| 依存関係 | ✅ | - |
## 脆弱性REJECTの場合
| # | 重大度 | 種類 | 場所 | 修正案 |
|---|--------|------|------|--------|
| 1 | High | SQLi | `src/db.ts:42` | パラメータ化クエリを使用 |
## 警告(ブロッキングではない)
- {セキュリティに関する推奨事項}
```
**認知負荷軽減ルール:**
- 問題なし → チェック表のみ10行以内
- 警告あり → + 警告を1-2行15行以内
- 脆弱性あり → + 表形式で30行以内
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -376,51 +397,12 @@ steps:
- condition: 脆弱性があり修正が必要 - condition: 脆弱性があり修正が必要
next: security_fix next: security_fix
instruction_template: | instruction_template: |
## Git Diff
```diff
{git_diff}
```
変更に対してセキュリティレビューを行ってください。以下の脆弱性を確認してください: 変更に対してセキュリティレビューを行ってください。以下の脆弱性を確認してください:
- インジェクション攻撃SQL, コマンド, XSS - インジェクション攻撃SQL, コマンド, XSS
- 認証・認可の問題 - 認証・認可の問題
- データ露出リスク - データ露出リスク
- 暗号化の弱点 - 暗号化の弱点
**レポート出力:** Report File に出力してください。
- ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
**レポートフォーマット:**
```markdown
# セキュリティレビュー
## 結果: APPROVE / REJECT
## 重大度: None / Low / Medium / High / Critical
## チェック結果
| カテゴリ | 結果 | 備考 |
|---------|------|------|
| インジェクション | ✅ | - |
| 認証・認可 | ✅ | - |
| データ保護 | ✅ | - |
| 依存関係 | ✅ | - |
## 脆弱性REJECTの場合
| # | 重大度 | 種類 | 場所 | 修正案 |
|---|--------|------|------|--------|
| 1 | High | SQLi | `src/db.ts:42` | パラメータ化クエリを使用 |
## 警告(ブロッキングではない)
- {セキュリティに関する推奨事項}
```
**認知負荷軽減ルール:**
- 問題なし → チェック表のみ10行以内
- 警告あり → + 警告を1-2行15行以内
- 脆弱性あり → + 表形式で30行以内
- name: security_fix - name: security_fix
agent: ~/.takt/agents/default/coder.md agent: ~/.takt/agents/default/coder.md
allowed_tools: allowed_tools:
@ -465,11 +447,6 @@ steps:
- condition: 要求未達成、テスト失敗、ビルドエラー - condition: 要求未達成、テスト失敗、ビルドエラー
next: plan next: plan
instruction_template: | instruction_template: |
## Git Diff
```diff
{git_diff}
```
テスト実行、ビルド確認、最終承認を行ってください。 テスト実行、ビルド確認、最終承認を行ってください。
**ワークフロー全体の確認:** **ワークフロー全体の確認:**

View File

@ -10,15 +10,23 @@
# - fix_security: MINOR→security_review, MAJOR→cqrs_es_review # - fix_security: MINOR→security_review, MAJOR→cqrs_es_review
# - fix_qa: MINOR→qa_review, SECURITY→security_review, MAJOR→cqrs_es_review # - fix_qa: MINOR→qa_review, SECURITY→security_review, MAJOR→cqrs_es_review
# #
# テンプレート変数: # ボイラープレートセクションWorkflow Context, User Request, Previous Response,
# {iteration} - ワークフロー全体のターン数(全エージェントで実行されたステップの合計) # Additional User Inputs, Instructions headingはbuildInstruction()が自動挿入。
# {max_iterations} - ワークフローの最大イテレーション数 # instruction_templateにはステップ固有の内容のみ記述。
# {step_iteration} - ステップごとのイテレーション数(このステップが何回実行されたか) #
# {task} - 元のユーザー要求 # テンプレート変数instruction_template内で使用可能:
# {previous_response} - 前のステップの出力 # {iteration} - ワークフロー全体のターン数(全エージェントで実行されたステップの合計)
# {git_diff} - 現在のコミットされていない変更git diff # {max_iterations} - ワークフローの最大イテレーション数
# {user_inputs} - ワークフロー中に蓄積されたユーザー入力 # {step_iteration} - ステップごとのイテレーション数(このステップが何回実行されたか)
# {report_dir} - レポートディレクトリ名(例: "20250126-143052-task-summary" # {previous_response} - 前のステップの出力pass_previous_response: true の場合のみ)
# {report_dir} - レポートディレクトリ名(例: "20250126-143052-task-summary"
#
# ステップレベルフィールド:
# report: - ステップのレポートファイルWorkflow ContextにReport File/Filesとして自動挿入
# 単一: report: 00-plan.md
# 複数: report:
# - Scope: 01-coder-scope.md
# - Decisions: 02-coder-decisions.md
name: expert-cqrs name: expert-cqrs
description: CQRS+ES・フロントエンド・セキュリティ・QA専門家レビュー description: CQRS+ES・フロントエンド・セキュリティ・QA専門家レビュー
@ -33,7 +41,33 @@ steps:
# =========================================== # ===========================================
- name: plan - name: plan
agent: ~/.takt/agents/default/planner.md agent: ~/.takt/agents/default/planner.md
report: 00-plan.md report:
name: 00-plan.md
order: |
**レポート出力:** `Report File` に出力してください。
- ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
format: |
```markdown
# タスク計画
## 元の要求
{ユーザーの要求をそのまま記載}
## 分析結果
### 目的
{達成すべきこと}
### スコープ
{影響範囲}
### 実装アプローチ
{どう進めるか}
## 確認事項(あれば)
- {不明点や確認が必要な点}
```
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -55,32 +89,6 @@ steps:
1. タスクの要件を理解する 1. タスクの要件を理解する
2. 影響範囲を特定する 2. 影響範囲を特定する
3. 実装アプローチを決める 3. 実装アプローチを決める
**レポート出力:** .takt/reports/{report_dir}/00-plan.md に出力してください。
- ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
**レポートフォーマット:**
```markdown
# タスク計画
## 元の要求
{ユーザーの要求をそのまま記載}
## 分析結果
### 目的
{達成すべきこと}
### スコープ
{影響範囲}
### 実装アプローチ
{どう進めるか}
## 確認事項(あれば)
- {不明点や確認が必要な点}
```
pass_previous_response: true pass_previous_response: true
rules: rules:
- condition: タスク分析と計画が完了した - condition: タスク分析と計画が完了した
@ -109,9 +117,7 @@ steps:
planステップで立てた計画に従って実装してください。 planステップで立てた計画に従って実装してください。
計画レポート00-plan.mdを参照し、実装を進めてください。 計画レポート00-plan.mdを参照し、実装を進めてください。
**レポート出力:** .takt/reports/{report_dir}/ に出力してください。 **レポート出力:** 上記の `Report Files` に出力してください。
- Scope: .takt/reports/{report_dir}/01-coder-scope.md
- Decisions: .takt/reports/{report_dir}/02-coder-decisions.md
- ファイルが存在しない場合: 新規作成 - ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記 - ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
@ -155,7 +161,38 @@ steps:
# =========================================== # ===========================================
- name: ai_review - name: ai_review
agent: ~/.takt/agents/default/ai-antipattern-reviewer.md agent: ~/.takt/agents/default/ai-antipattern-reviewer.md
report: 03-ai-review.md report:
name: 03-ai-review.md
order: |
**レポート出力:** `Report File` に出力してください。
- ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
format: |
```markdown
# AI生成コードレビュー
## 結果: APPROVE / REJECT
## サマリー
{1文で結果を要約}
## 検証した項目
| 観点 | 結果 | 備考 |
|------|------|------|
| 仮定の妥当性 | ✅ | - |
| API/ライブラリの実在 | ✅ | - |
| コンテキスト適合 | ✅ | - |
| スコープ | ✅ | - |
## 問題点REJECTの場合
| # | カテゴリ | 場所 | 問題 |
|---|---------|------|------|
| 1 | 幻覚API | `src/file.ts:23` | 存在しないメソッド |
```
**認知負荷軽減ルール:**
- 問題なし → サマリー1文 + チェック表のみ10行以内
- 問題あり → + 問題を表形式で25行以内
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -164,47 +201,11 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
instruction_template: | instruction_template: |
## Git Diff
```diff
{git_diff}
```
AI特有の問題についてコードをレビューしてください: AI特有の問題についてコードをレビューしてください:
- 仮定の検証 - 仮定の検証
- もっともらしいが間違っているパターン - もっともらしいが間違っているパターン
- 既存コードベースとの適合性 - 既存コードベースとの適合性
- スコープクリープの検出 - スコープクリープの検出
**レポート出力:** .takt/reports/{report_dir}/03-ai-review.md に出力してください。
- ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
**レポートフォーマット:**
```markdown
# AI生成コードレビュー
## 結果: APPROVE / REJECT
## サマリー
{1文で結果を要約}
## 検証した項目
| 観点 | 結果 | 備考 |
|------|------|------|
| 仮定の妥当性 | ✅ | - |
| API/ライブラリの実在 | ✅ | - |
| コンテキスト適合 | ✅ | - |
| スコープ | ✅ | - |
## 問題点REJECTの場合
| # | カテゴリ | 場所 | 問題 |
|---|---------|------|------|
| 1 | 幻覚API | `src/file.ts:23` | 存在しないメソッド |
```
**認知負荷軽減ルール:**
- 問題なし → サマリー1文 + チェック表のみ10行以内
- 問題あり → + 問題を表形式で25行以内
rules: rules:
- condition: AI特有の問題が見つからない - condition: AI特有の問題が見つからない
next: cqrs_es_review next: cqrs_es_review
@ -244,7 +245,35 @@ steps:
# =========================================== # ===========================================
- name: cqrs_es_review - name: cqrs_es_review
agent: ~/.takt/agents/expert-cqrs/cqrs-es-reviewer.md agent: ~/.takt/agents/expert-cqrs/cqrs-es-reviewer.md
report: 04-cqrs-es-review.md report:
name: 04-cqrs-es-review.md
order: |
**レポート出力:** `Report File` に出力してください。
- ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
format: |
```markdown
# CQRS+ESレビュー
## 結果: APPROVE / REJECT
## サマリー
{1-2文で結果を要約}
## 確認した観点
| 観点 | 結果 | 備考 |
|------|------|------|
| Aggregate設計 | ✅ | - |
| イベント設計 | ✅ | - |
| Command/Query分離 | ✅ | - |
| プロジェクション | ✅ | - |
| 結果整合性 | ✅ | - |
## 問題点REJECTの場合
| # | 場所 | 問題 | 修正案 |
|---|------|------|--------|
| 1 | `src/file.ts:42` | 問題の説明 | 修正方法 |
```
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -253,11 +282,6 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
instruction_template: | instruction_template: |
## Git Diff
```diff
{git_diff}
```
CQRSコマンドクエリ責務分離とEvent Sourcingイベントソーシングの観点から CQRSコマンドクエリ責務分離とEvent Sourcingイベントソーシングの観点から
上記の変更をレビューしてください。 上記の変更をレビューしてください。
@ -270,34 +294,6 @@ steps:
**注意**: このプロジェクトがCQRS+ESパターンを使用していない場合は、 **注意**: このプロジェクトがCQRS+ESパターンを使用していない場合は、
一般的なドメイン設計の観点からレビューしてください。 一般的なドメイン設計の観点からレビューしてください。
**レポート出力:** .takt/reports/{report_dir}/04-cqrs-es-review.md に出力してください。
- ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
**レポートフォーマット:**
```markdown
# CQRS+ESレビュー
## 結果: APPROVE / REJECT
## サマリー
{1-2文で結果を要約}
## 確認した観点
| 観点 | 結果 | 備考 |
|------|------|------|
| Aggregate設計 | ✅ | - |
| イベント設計 | ✅ | - |
| Command/Query分離 | ✅ | - |
| プロジェクション | ✅ | - |
| 結果整合性 | ✅ | - |
## 問題点REJECTの場合
| # | 場所 | 問題 | 修正案 |
|---|------|------|--------|
| 1 | `src/file.ts:42` | 問題の説明 | 修正方法 |
```
rules: rules:
- condition: CQRS+ES設計に問題がない - condition: CQRS+ES設計に問題がない
next: frontend_review next: frontend_review
@ -339,7 +335,35 @@ steps:
# =========================================== # ===========================================
- name: frontend_review - name: frontend_review
agent: ~/.takt/agents/expert/frontend-reviewer.md agent: ~/.takt/agents/expert/frontend-reviewer.md
report: 05-frontend-review.md report:
name: 05-frontend-review.md
order: |
**レポート出力:** `Report File` に出力してください。
- ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
format: |
```markdown
# フロントエンドレビュー
## 結果: APPROVE / REJECT
## サマリー
{1-2文で結果を要約}
## 確認した観点
| 観点 | 結果 | 備考 |
|------|------|------|
| コンポーネント設計 | ✅ | - |
| 状態管理 | ✅ | - |
| パフォーマンス | ✅ | - |
| アクセシビリティ | ✅ | - |
| 型安全性 | ✅ | - |
## 問題点REJECTの場合
| # | 場所 | 問題 | 修正案 |
|---|------|------|--------|
| 1 | `src/file.tsx:42` | 問題の説明 | 修正方法 |
```
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -348,11 +372,6 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
instruction_template: | instruction_template: |
## Git Diff
```diff
{git_diff}
```
フロントエンド開発の観点から上記の変更をレビューしてください。 フロントエンド開発の観点から上記の変更をレビューしてください。
**レビュー観点:** **レビュー観点:**
@ -365,34 +384,6 @@ steps:
**注意**: このプロジェクトがフロントエンドを含まない場合は、 **注意**: このプロジェクトがフロントエンドを含まない場合は、
問題なしとして次に進んでください。 問題なしとして次に進んでください。
**レポート出力:** .takt/reports/{report_dir}/05-frontend-review.md に出力してください。
- ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
**レポートフォーマット:**
```markdown
# フロントエンドレビュー
## 結果: APPROVE / REJECT
## サマリー
{1-2文で結果を要約}
## 確認した観点
| 観点 | 結果 | 備考 |
|------|------|------|
| コンポーネント設計 | ✅ | - |
| 状態管理 | ✅ | - |
| パフォーマンス | ✅ | - |
| アクセシビリティ | ✅ | - |
| 型安全性 | ✅ | - |
## 問題点REJECTの場合
| # | 場所 | 問題 | 修正案 |
|---|------|------|--------|
| 1 | `src/file.tsx:42` | 問題の説明 | 修正方法 |
```
rules: rules:
- condition: フロントエンド設計に問題がない - condition: フロントエンド設計に問題がない
next: security_review next: security_review
@ -434,7 +425,36 @@ steps:
# =========================================== # ===========================================
- name: security_review - name: security_review
agent: ~/.takt/agents/expert/security-reviewer.md agent: ~/.takt/agents/expert/security-reviewer.md
report: 06-security-review.md report:
name: 06-security-review.md
order: |
**レポート出力:** `Report File` に出力してください。
- ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
format: |
```markdown
# セキュリティレビュー
## 結果: APPROVE / REJECT
## 重大度: None / Low / Medium / High / Critical
## チェック結果
| カテゴリ | 結果 | 備考 |
|---------|------|------|
| インジェクション | ✅ | - |
| 認証・認可 | ✅ | - |
| データ保護 | ✅ | - |
| 依存関係 | ✅ | - |
## 脆弱性REJECTの場合
| # | 重大度 | 種類 | 場所 | 修正案 |
|---|--------|------|------|--------|
| 1 | High | SQLi | `src/db.ts:42` | パラメータ化クエリを使用 |
## 警告(ブロッキングではない)
- {セキュリティに関する推奨事項}
```
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -443,11 +463,6 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
instruction_template: | instruction_template: |
## Git Diff
```diff
{git_diff}
```
セキュリティの観点から上記の変更をレビューしてください。 セキュリティの観点から上記の変更をレビューしてください。
**レビュー観点:** **レビュー観点:**
@ -456,35 +471,6 @@ steps:
- 機密情報の取り扱い - 機密情報の取り扱い
- 暗号化の適切性 - 暗号化の適切性
- OWASP Top 10 - OWASP Top 10
**レポート出力:** .takt/reports/{report_dir}/06-security-review.md に出力してください。
- ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
**レポートフォーマット:**
```markdown
# セキュリティレビュー
## 結果: APPROVE / REJECT
## 重大度: None / Low / Medium / High / Critical
## チェック結果
| カテゴリ | 結果 | 備考 |
|---------|------|------|
| インジェクション | ✅ | - |
| 認証・認可 | ✅ | - |
| データ保護 | ✅ | - |
| 依存関係 | ✅ | - |
## 脆弱性REJECTの場合
| # | 重大度 | 種類 | 場所 | 修正案 |
|---|--------|------|------|--------|
| 1 | High | SQLi | `src/db.ts:42` | パラメータ化クエリを使用 |
## 警告(ブロッキングではない)
- {セキュリティに関する推奨事項}
```
rules: rules:
- condition: セキュリティ上の問題がない - condition: セキュリティ上の問題がない
next: qa_review next: qa_review
@ -536,7 +522,35 @@ steps:
# =========================================== # ===========================================
- name: qa_review - name: qa_review
agent: ~/.takt/agents/expert/qa-reviewer.md agent: ~/.takt/agents/expert/qa-reviewer.md
report: 07-qa-review.md report:
name: 07-qa-review.md
order: |
**レポート出力:** `Report File` に出力してください。
- ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
format: |
```markdown
# QAレビュー
## 結果: APPROVE / REJECT
## サマリー
{1-2文で結果を要約}
## 確認した観点
| 観点 | 結果 | 備考 |
|------|------|------|
| テストカバレッジ | ✅ | - |
| テスト品質 | ✅ | - |
| エラーハンドリング | ✅ | - |
| ドキュメント | ✅ | - |
| 保守性 | ✅ | - |
## 問題点REJECTの場合
| # | カテゴリ | 問題 | 修正案 |
|---|---------|------|--------|
| 1 | テスト | 問題の説明 | 修正方法 |
```
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -545,11 +559,6 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
instruction_template: | instruction_template: |
## Git Diff
```diff
{git_diff}
```
品質保証の観点から上記の変更をレビューしてください。 品質保証の観点から上記の変更をレビューしてください。
**レビュー観点:** **レビュー観点:**
@ -559,34 +568,6 @@ steps:
- エラーハンドリング - エラーハンドリング
- ログとモニタリング - ログとモニタリング
- 保守性 - 保守性
**レポート出力:** .takt/reports/{report_dir}/07-qa-review.md に出力してください。
- ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
**レポートフォーマット:**
```markdown
# QAレビュー
## 結果: APPROVE / REJECT
## サマリー
{1-2文で結果を要約}
## 確認した観点
| 観点 | 結果 | 備考 |
|------|------|------|
| テストカバレッジ | ✅ | - |
| テスト品質 | ✅ | - |
| エラーハンドリング | ✅ | - |
| ドキュメント | ✅ | - |
| 保守性 | ✅ | - |
## 問題点REJECTの場合
| # | カテゴリ | 問題 | 修正案 |
|---|---------|------|--------|
| 1 | テスト | 問題の説明 | 修正方法 |
```
rules: rules:
- condition: 品質基準を満たしている - condition: 品質基準を満たしている
next: supervise next: supervise
@ -653,11 +634,6 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
instruction_template: | instruction_template: |
## Git Diff
```diff
{git_diff}
```
## Previous Reviews Summary ## Previous Reviews Summary
このステップに到達したということは、以下のレビューがすべてAPPROVEされています このステップに到達したということは、以下のレビューがすべてAPPROVEされています
- AI Review: APPROVED - AI Review: APPROVED
@ -673,12 +649,10 @@ steps:
2. 各レビューステップの指摘が対応されているか 2. 各レビューステップの指摘が対応されているか
3. 元のタスク目的が達成されているか 3. 元のタスク目的が達成されているか
**レポートの確認:** .takt/reports/{report_dir}/ 内の全レポートを読み、 **レポートの確認:** Report Directory内の全レポートを読み、
未対応の改善提案がないか確認してください。 未対応の改善提案がないか確認してください。
**レポート出力:** **レポート出力:** 上記の `Report Files` に出力してください。
- Validation: .takt/reports/{report_dir}/08-supervisor-validation.md
- Summary: .takt/reports/{report_dir}/summary.md
- ファイルが存在しない場合: 新規作成 - ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記 - ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記

View File

@ -16,7 +16,6 @@
# {step_iteration} - ステップごとのイテレーション数(このステップが何回実行されたか) # {step_iteration} - ステップごとのイテレーション数(このステップが何回実行されたか)
# {task} - 元のユーザー要求 # {task} - 元のユーザー要求
# {previous_response} - 前のステップの出力 # {previous_response} - 前のステップの出力
# {git_diff} - 現在のコミットされていない変更git diff
# {user_inputs} - ワークフロー中に蓄積されたユーザー入力 # {user_inputs} - ワークフロー中に蓄積されたユーザー入力
# {report_dir} - レポートディレクトリ名(例: "20250126-143052-task-summary" # {report_dir} - レポートディレクトリ名(例: "20250126-143052-task-summary"
@ -33,7 +32,33 @@ steps:
# =========================================== # ===========================================
- name: plan - name: plan
agent: ~/.takt/agents/default/planner.md agent: ~/.takt/agents/default/planner.md
report: 00-plan.md report:
name: 00-plan.md
order: |
**レポート出力:** `Report File` に出力してください。
- ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
format: |
```markdown
# タスク計画
## 元の要求
{ユーザーの要求をそのまま記載}
## 分析結果
### 目的
{達成すべきこと}
### スコープ
{影響範囲}
### 実装アプローチ
{どう進めるか}
## 確認事項(あれば)
- {不明点や確認が必要な点}
```
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -55,32 +80,6 @@ steps:
1. タスクの要件を理解する 1. タスクの要件を理解する
2. 影響範囲を特定する 2. 影響範囲を特定する
3. 実装アプローチを決める 3. 実装アプローチを決める
**レポート出力:** 上記の `Report File` に出力してください。
- ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
**レポートフォーマット:**
```markdown
# タスク計画
## 元の要求
{ユーザーの要求をそのまま記載}
## 分析結果
### 目的
{達成すべきこと}
### スコープ
{影響範囲}
### 実装アプローチ
{どう進めるか}
## 確認事項(あれば)
- {不明点や確認が必要な点}
```
pass_previous_response: true pass_previous_response: true
rules: rules:
- condition: タスク分析と計画が完了した - condition: タスク分析と計画が完了した
@ -153,7 +152,38 @@ steps:
# =========================================== # ===========================================
- name: ai_review - name: ai_review
agent: ~/.takt/agents/default/ai-antipattern-reviewer.md agent: ~/.takt/agents/default/ai-antipattern-reviewer.md
report: 03-ai-review.md report:
name: 03-ai-review.md
order: |
**レポート出力:** `Report File` に出力してください。
- ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
format: |
```markdown
# AI生成コードレビュー
## 結果: APPROVE / REJECT
## サマリー
{1文で結果を要約}
## 検証した項目
| 観点 | 結果 | 備考 |
|------|------|------|
| 仮定の妥当性 | ✅ | - |
| API/ライブラリの実在 | ✅ | - |
| コンテキスト適合 | ✅ | - |
| スコープ | ✅ | - |
## 問題点REJECTの場合
| # | カテゴリ | 場所 | 問題 |
|---|---------|------|------|
| 1 | 幻覚API | `src/file.ts:23` | 存在しないメソッド |
```
**認知負荷軽減ルール:**
- 問題なし → サマリー1文 + チェック表のみ10行以内
- 問題あり → + 問題を表形式で25行以内
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -162,47 +192,11 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
instruction_template: | instruction_template: |
## Git Diff
```diff
{git_diff}
```
AI特有の問題についてコードをレビューしてください: AI特有の問題についてコードをレビューしてください:
- 仮定の検証 - 仮定の検証
- もっともらしいが間違っているパターン - もっともらしいが間違っているパターン
- 既存コードベースとの適合性 - 既存コードベースとの適合性
- スコープクリープの検出 - スコープクリープの検出
**レポート出力:** 上記の `Report File` に出力してください。
- ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
**レポートフォーマット:**
```markdown
# AI生成コードレビュー
## 結果: APPROVE / REJECT
## サマリー
{1文で結果を要約}
## 検証した項目
| 観点 | 結果 | 備考 |
|------|------|------|
| 仮定の妥当性 | ✅ | - |
| API/ライブラリの実在 | ✅ | - |
| コンテキスト適合 | ✅ | - |
| スコープ | ✅ | - |
## 問題点REJECTの場合
| # | カテゴリ | 場所 | 問題 |
|---|---------|------|------|
| 1 | 幻覚API | `src/file.ts:23` | 存在しないメソッド |
```
**認知負荷軽減ルール:**
- 問題なし → サマリー1文 + チェック表のみ10行以内
- 問題あり → + 問題を表形式で25行以内
rules: rules:
- condition: AI特有の問題が見つからない - condition: AI特有の問題が見つからない
next: architect_review next: architect_review
@ -242,7 +236,42 @@ steps:
# =========================================== # ===========================================
- name: architect_review - name: architect_review
agent: ~/.takt/agents/default/architecture-reviewer.md agent: ~/.takt/agents/default/architecture-reviewer.md
report: 04-architect-review.md report:
name: 04-architect-review.md
order: |
**レポート出力:** `Report File` に出力してください。
- ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
format: |
```markdown
# アーキテクチャレビュー
## 結果: APPROVE / IMPROVE / REJECT
## サマリー
{1-2文で結果を要約}
## 確認した観点
- [x] 構造・設計
- [x] コード品質
- [x] 変更スコープ
- [x] テストカバレッジ
- [x] デッドコード
- [x] 呼び出しチェーン検証
## 問題点REJECTの場合
| # | 場所 | 問題 | 修正案 |
|---|------|------|--------|
| 1 | `src/file.ts:42` | 問題の説明 | 修正方法 |
## 改善提案(任意・ブロッキングではない)
- {将来的な改善提案}
```
**認知負荷軽減ルール:**
- APPROVE + 問題なし → サマリーのみ5行以内
- APPROVE + 軽微な提案 → サマリー + 改善提案15行以内
- REJECT → 問題点を表形式で30行以内
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -251,11 +280,6 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
instruction_template: | instruction_template: |
## Git Diff
```diff
{git_diff}
```
**アーキテクチャと設計**のレビューに集中してください。 **アーキテクチャと設計**のレビューに集中してください。
**レビュー観点:** **レビュー観点:**
@ -265,41 +289,6 @@ steps:
- テストカバレッジ - テストカバレッジ
- デッドコード - デッドコード
- 呼び出しチェーン検証 - 呼び出しチェーン検証
**レポート出力:** 上記の `Report File` に出力してください。
- ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
**レポートフォーマット:**
```markdown
# アーキテクチャレビュー
## 結果: APPROVE / IMPROVE / REJECT
## サマリー
{1-2文で結果を要約}
## 確認した観点
- [x] 構造・設計
- [x] コード品質
- [x] 変更スコープ
- [x] テストカバレッジ
- [x] デッドコード
- [x] 呼び出しチェーン検証
## 問題点REJECTの場合
| # | 場所 | 問題 | 修正案 |
|---|------|------|--------|
| 1 | `src/file.ts:42` | 問題の説明 | 修正方法 |
## 改善提案(任意・ブロッキングではない)
- {将来的な改善提案}
```
**認知負荷軽減ルール:**
- APPROVE + 問題なし → サマリーのみ5行以内
- APPROVE + 軽微な提案 → サマリー + 改善提案15行以内
- REJECT → 問題点を表形式で30行以内
rules: rules:
- condition: アーキテクチャと設計に問題がない - condition: アーキテクチャと設計に問題がない
next: frontend_review next: frontend_review
@ -339,7 +328,35 @@ steps:
# =========================================== # ===========================================
- name: frontend_review - name: frontend_review
agent: ~/.takt/agents/expert/frontend-reviewer.md agent: ~/.takt/agents/expert/frontend-reviewer.md
report: 05-frontend-review.md report:
name: 05-frontend-review.md
order: |
**レポート出力:** `Report File` に出力してください。
- ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
format: |
```markdown
# フロントエンドレビュー
## 結果: APPROVE / REJECT
## サマリー
{1-2文で結果を要約}
## 確認した観点
| 観点 | 結果 | 備考 |
|------|------|------|
| コンポーネント設計 | ✅ | - |
| 状態管理 | ✅ | - |
| パフォーマンス | ✅ | - |
| アクセシビリティ | ✅ | - |
| 型安全性 | ✅ | - |
## 問題点REJECTの場合
| # | 場所 | 問題 | 修正案 |
|---|------|------|--------|
| 1 | `src/file.tsx:42` | 問題の説明 | 修正方法 |
```
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -348,11 +365,6 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
instruction_template: | instruction_template: |
## Git Diff
```diff
{git_diff}
```
フロントエンド開発の観点から上記の変更をレビューしてください。 フロントエンド開発の観点から上記の変更をレビューしてください。
**レビュー観点:** **レビュー観点:**
@ -365,34 +377,6 @@ steps:
**注意**: このプロジェクトがフロントエンドを含まない場合は、 **注意**: このプロジェクトがフロントエンドを含まない場合は、
問題なしとして次に進んでください。 問題なしとして次に進んでください。
**レポート出力:** 上記の `Report File` に出力してください。
- ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
**レポートフォーマット:**
```markdown
# フロントエンドレビュー
## 結果: APPROVE / REJECT
## サマリー
{1-2文で結果を要約}
## 確認した観点
| 観点 | 結果 | 備考 |
|------|------|------|
| コンポーネント設計 | ✅ | - |
| 状態管理 | ✅ | - |
| パフォーマンス | ✅ | - |
| アクセシビリティ | ✅ | - |
| 型安全性 | ✅ | - |
## 問題点REJECTの場合
| # | 場所 | 問題 | 修正案 |
|---|------|------|--------|
| 1 | `src/file.tsx:42` | 問題の説明 | 修正方法 |
```
rules: rules:
- condition: フロントエンド設計に問題がない - condition: フロントエンド設計に問題がない
next: security_review next: security_review
@ -434,7 +418,36 @@ steps:
# =========================================== # ===========================================
- name: security_review - name: security_review
agent: ~/.takt/agents/expert/security-reviewer.md agent: ~/.takt/agents/expert/security-reviewer.md
report: 06-security-review.md report:
name: 06-security-review.md
order: |
**レポート出力:** `Report File` に出力してください。
- ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
format: |
```markdown
# セキュリティレビュー
## 結果: APPROVE / REJECT
## 重大度: None / Low / Medium / High / Critical
## チェック結果
| カテゴリ | 結果 | 備考 |
|---------|------|------|
| インジェクション | ✅ | - |
| 認証・認可 | ✅ | - |
| データ保護 | ✅ | - |
| 依存関係 | ✅ | - |
## 脆弱性REJECTの場合
| # | 重大度 | 種類 | 場所 | 修正案 |
|---|--------|------|------|--------|
| 1 | High | SQLi | `src/db.ts:42` | パラメータ化クエリを使用 |
## 警告(ブロッキングではない)
- {セキュリティに関する推奨事項}
```
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -443,11 +456,6 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
instruction_template: | instruction_template: |
## Git Diff
```diff
{git_diff}
```
セキュリティの観点から上記の変更をレビューしてください。 セキュリティの観点から上記の変更をレビューしてください。
**レビュー観点:** **レビュー観点:**
@ -456,35 +464,6 @@ steps:
- 機密情報の取り扱い - 機密情報の取り扱い
- 暗号化の適切性 - 暗号化の適切性
- OWASP Top 10 - OWASP Top 10
**レポート出力:** 上記の `Report File` に出力してください。
- ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
**レポートフォーマット:**
```markdown
# セキュリティレビュー
## 結果: APPROVE / REJECT
## 重大度: None / Low / Medium / High / Critical
## チェック結果
| カテゴリ | 結果 | 備考 |
|---------|------|------|
| インジェクション | ✅ | - |
| 認証・認可 | ✅ | - |
| データ保護 | ✅ | - |
| 依存関係 | ✅ | - |
## 脆弱性REJECTの場合
| # | 重大度 | 種類 | 場所 | 修正案 |
|---|--------|------|------|--------|
| 1 | High | SQLi | `src/db.ts:42` | パラメータ化クエリを使用 |
## 警告(ブロッキングではない)
- {セキュリティに関する推奨事項}
```
rules: rules:
- condition: セキュリティ上の問題がない - condition: セキュリティ上の問題がない
next: qa_review next: qa_review
@ -536,7 +515,35 @@ steps:
# =========================================== # ===========================================
- name: qa_review - name: qa_review
agent: ~/.takt/agents/expert/qa-reviewer.md agent: ~/.takt/agents/expert/qa-reviewer.md
report: 07-qa-review.md report:
name: 07-qa-review.md
order: |
**レポート出力:** `Report File` に出力してください。
- ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
format: |
```markdown
# QAレビュー
## 結果: APPROVE / REJECT
## サマリー
{1-2文で結果を要約}
## 確認した観点
| 観点 | 結果 | 備考 |
|------|------|------|
| テストカバレッジ | ✅ | - |
| テスト品質 | ✅ | - |
| エラーハンドリング | ✅ | - |
| ドキュメント | ✅ | - |
| 保守性 | ✅ | - |
## 問題点REJECTの場合
| # | カテゴリ | 問題 | 修正案 |
|---|---------|------|--------|
| 1 | テスト | 問題の説明 | 修正方法 |
```
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -545,11 +552,6 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
instruction_template: | instruction_template: |
## Git Diff
```diff
{git_diff}
```
品質保証の観点から上記の変更をレビューしてください。 品質保証の観点から上記の変更をレビューしてください。
**レビュー観点:** **レビュー観点:**
@ -559,34 +561,6 @@ steps:
- エラーハンドリング - エラーハンドリング
- ログとモニタリング - ログとモニタリング
- 保守性 - 保守性
**レポート出力:** 上記の `Report File` に出力してください。
- ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
**レポートフォーマット:**
```markdown
# QAレビュー
## 結果: APPROVE / REJECT
## サマリー
{1-2文で結果を要約}
## 確認した観点
| 観点 | 結果 | 備考 |
|------|------|------|
| テストカバレッジ | ✅ | - |
| テスト品質 | ✅ | - |
| エラーハンドリング | ✅ | - |
| ドキュメント | ✅ | - |
| 保守性 | ✅ | - |
## 問題点REJECTの場合
| # | カテゴリ | 問題 | 修正案 |
|---|---------|------|--------|
| 1 | テスト | 問題の説明 | 修正方法 |
```
rules: rules:
- condition: 品質基準を満たしている - condition: 品質基準を満たしている
next: supervise next: supervise
@ -653,11 +627,6 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
instruction_template: | instruction_template: |
## Git Diff
```diff
{git_diff}
```
## Previous Reviews Summary ## Previous Reviews Summary
このステップに到達したということは、以下のレビューがすべてAPPROVEされています このステップに到達したということは、以下のレビューがすべてAPPROVEされています
- AI Review: APPROVED - AI Review: APPROVED

View File

@ -8,7 +8,6 @@
# {step_iteration} - ステップごとのイテレーション数(このステップが何回実行されたか) # {step_iteration} - ステップごとのイテレーション数(このステップが何回実行されたか)
# {task} - 元のユーザー要求 # {task} - 元のユーザー要求
# {previous_response} - 前のステップの出力 # {previous_response} - 前のステップの出力
# {git_diff} - 現在のコミットされていない変更git diff
# {user_inputs} - ワークフロー中に蓄積されたユーザー入力 # {user_inputs} - ワークフロー中に蓄積されたユーザー入力
# {report_dir} - レポートディレクトリ名(例: "20250126-143052-task-summary" # {report_dir} - レポートディレクトリ名(例: "20250126-143052-task-summary"

View File

@ -12,7 +12,6 @@
# {step_iteration} - ステップごとのイテレーション数(このステップが何回実行されたか) # {step_iteration} - ステップごとのイテレーション数(このステップが何回実行されたか)
# {task} - 元のユーザー要求 # {task} - 元のユーザー要求
# {previous_response} - 前のステップの出力 # {previous_response} - 前のステップの出力
# {git_diff} - 現在のコミットされていない変更git diff
# {user_inputs} - ワークフロー中に蓄積されたユーザー入力 # {user_inputs} - ワークフロー中に蓄積されたユーザー入力
# {report_dir} - レポートディレクトリ名(例: "20250126-143052-task-summary" # {report_dir} - レポートディレクトリ名(例: "20250126-143052-task-summary"

View File

@ -8,7 +8,6 @@
# {step_iteration} - Per-step iteration count (how many times THIS step has been executed) # {step_iteration} - Per-step iteration count (how many times THIS step has been executed)
# {task} - Original user request (auto-injected) # {task} - Original user request (auto-injected)
# {previous_response} - Output from the previous step (auto-injected) # {previous_response} - Output from the previous step (auto-injected)
# {git_diff} - Current uncommitted changes (git diff)
# {user_inputs} - Accumulated user inputs during workflow (auto-injected) # {user_inputs} - Accumulated user inputs during workflow (auto-injected)
# {report_dir} - Report directory name (e.g., "20250126-143052-task-summary") # {report_dir} - Report directory name (e.g., "20250126-143052-task-summary")
@ -22,7 +21,33 @@ initial_step: plan
steps: steps:
- name: plan - name: plan
agent: ~/.takt/agents/default/planner.md agent: ~/.takt/agents/default/planner.md
report: 00-plan.md report:
name: 00-plan.md
order: |
**レポート出力:** `Report File` に出力してください。
- ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
format: |
```markdown
# タスク計画
## 元の要求
{ユーザーの要求をそのまま記載}
## 分析結果
### 目的
{達成すべきこと}
### スコープ
{影響範囲}
### 実装アプローチ
{どう進めるか}
## 確認事項(あれば)
- {不明点や確認が必要な点}
```
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -44,28 +69,6 @@ steps:
1. タスクの要件を理解する 1. タスクの要件を理解する
2. 影響範囲を特定する 2. 影響範囲を特定する
3. 実装アプローチを決める 3. 実装アプローチを決める
**レポートフォーマット:**
```markdown
# タスク計画
## 元の要求
{ユーザーの要求をそのまま記載}
## 分析結果
### 目的
{達成すべきこと}
### スコープ
{影響範囲}
### 実装アプローチ
{どう進めるか}
## 確認事項(あれば)
- {不明点や確認が必要な点}
```
pass_previous_response: true pass_previous_response: true
rules: rules:
- condition: "要件が明確で実装可能" - condition: "要件が明確で実装可能"
@ -135,7 +138,38 @@ steps:
- name: ai_review - name: ai_review
agent: ~/.takt/agents/default/ai-antipattern-reviewer.md agent: ~/.takt/agents/default/ai-antipattern-reviewer.md
report: 03-ai-review.md report:
name: 03-ai-review.md
order: |
**レポート出力:** `Report File` に出力してください。
- ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
format: |
```markdown
# AI生成コードレビュー
## 結果: APPROVE / REJECT
## サマリー
{1文で結果を要約}
## 検証した項目
| 観点 | 結果 | 備考 |
|------|------|------|
| 仮定の妥当性 | ✅ | - |
| API/ライブラリの実在 | ✅ | - |
| コンテキスト適合 | ✅ | - |
| スコープ | ✅ | - |
## 問題点REJECTの場合
| # | カテゴリ | 場所 | 問題 |
|---|---------|------|------|
| 1 | 幻覚API | `src/file.ts:23` | 存在しないメソッド |
```
**認知負荷軽減ルール:**
- 問題なし → サマリー1文 + チェック表のみ10行以内
- 問題あり → + 問題を表形式で25行以内
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -144,43 +178,11 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
instruction_template: | instruction_template: |
## Git Diff
```diff
{git_diff}
```
AI特有の問題についてコードをレビューしてください: AI特有の問題についてコードをレビューしてください:
- 仮定の検証 - 仮定の検証
- もっともらしいが間違っているパターン - もっともらしいが間違っているパターン
- 既存コードベースとの適合性 - 既存コードベースとの適合性
- スコープクリープの検出 - スコープクリープの検出
**レポートフォーマット:**
```markdown
# AI生成コードレビュー
## 結果: APPROVE / REJECT
## サマリー
{1文で結果を要約}
## 検証した項目
| 観点 | 結果 | 備考 |
|------|------|------|
| 仮定の妥当性 | ✅ | - |
| API/ライブラリの実在 | ✅ | - |
| コンテキスト適合 | ✅ | - |
| スコープ | ✅ | - |
## 問題点REJECTの場合
| # | カテゴリ | 場所 | 問題 |
|---|---------|------|------|
| 1 | 幻覚API | `src/file.ts:23` | 存在しないメソッド |
```
**認知負荷軽減ルール:**
- 問題なし → サマリー1文 + チェック表のみ10行以内
- 問題あり → + 問題を表形式で25行以内
rules: rules:
- condition: "AI特有の問題なし" - condition: "AI特有の問題なし"
next: review next: review
@ -189,7 +191,39 @@ steps:
- name: review - name: review
agent: ~/.takt/agents/default/architecture-reviewer.md agent: ~/.takt/agents/default/architecture-reviewer.md
report: 04-architect-review.md report:
name: 04-architect-review.md
order: |
**レポート出力:** `Report File` に出力してください。
- ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
format: |
```markdown
# アーキテクチャレビュー
## 結果: APPROVE / REJECT
## サマリー
{1-2文で結果を要約}
## 確認した観点
- [x] 構造・設計
- [x] コード品質
- [x] 変更スコープ
## 問題点REJECTの場合
| # | 場所 | 問題 | 修正案 |
|---|------|------|--------|
| 1 | `src/file.ts:42` | 問題の説明 | 修正方法 |
## 改善提案(任意・ブロッキングではない)
- {将来的な改善提案}
```
**認知負荷軽減ルール:**
- APPROVE + 問題なし → サマリーのみ5行以内
- APPROVE + 軽微な提案 → サマリー + 改善提案15行以内
- REJECT → 問題点を表形式で30行以内
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -198,45 +232,12 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
instruction_template: | instruction_template: |
## Git Diff
```diff
{git_diff}
```
**アーキテクチャと設計**のレビューに集中してください。AI特有の問題はレビューしないでください前のステップで完了済み **アーキテクチャと設計**のレビューに集中してください。AI特有の問題はレビューしないでください前のステップで完了済み
変更をレビューしてフィードバックを提供してください。 変更をレビューしてフィードバックを提供してください。
**注意:** simpleワークフローではIMPROVE判定は使用しません。 **注意:** simpleワークフローではIMPROVE判定は使用しません。
軽微な改善提案がある場合は APPROVE + コメントとしてください。 軽微な改善提案がある場合は APPROVE + コメントとしてください。
**レポートフォーマット:**
```markdown
# アーキテクチャレビュー
## 結果: APPROVE / REJECT
## サマリー
{1-2文で結果を要約}
## 確認した観点
- [x] 構造・設計
- [x] コード品質
- [x] 変更スコープ
## 問題点REJECTの場合
| # | 場所 | 問題 | 修正案 |
|---|------|------|--------|
| 1 | `src/file.ts:42` | 問題の説明 | 修正方法 |
## 改善提案(任意・ブロッキングではない)
- {将来的な改善提案}
```
**認知負荷軽減ルール:**
- APPROVE + 問題なし → サマリーのみ5行以内
- APPROVE + 軽微な提案 → サマリー + 改善提案15行以内
- REJECT → 問題点を表形式で30行以内
rules: rules:
- condition: "問題なし" - condition: "問題なし"
next: supervise next: supervise
@ -257,11 +258,6 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
instruction_template: | instruction_template: |
## Git Diff
```diff
{git_diff}
```
テスト実行、ビルド確認、最終承認を行ってください。 テスト実行、ビルド確認、最終承認を行ってください。
**ワークフロー全体の確認:** **ワークフロー全体の確認:**

View File

@ -13,6 +13,7 @@ import {
} from '../workflow/instruction-builder.js'; } from '../workflow/instruction-builder.js';
import type { WorkflowStep, WorkflowRule } from '../models/types.js'; import type { WorkflowStep, WorkflowRule } from '../models/types.js';
function createMinimalStep(template: string): WorkflowStep { function createMinimalStep(template: string): WorkflowStep {
return { return {
name: 'test-step', name: 'test-step',

View File

@ -2,7 +2,6 @@
* Agent execution runners * Agent execution runners
*/ */
import { execSync } from 'node:child_process';
import { existsSync, readFileSync } from 'node:fs'; import { existsSync, readFileSync } from 'node:fs';
import { basename, dirname } from 'node:path'; import { basename, dirname } from 'node:path';
import { import {
@ -68,28 +67,6 @@ function resolveModel(cwd: string, options?: RunAgentOptions, agentConfig?: Cust
return undefined; return undefined;
} }
/** Get git diff for review context */
export function getGitDiff(cwd: string): string {
try {
// First check if HEAD exists (new repos may not have any commits)
try {
execSync('git rev-parse HEAD', { cwd, encoding: 'utf-8', stdio: 'pipe' });
} catch {
// No commits yet, return empty diff
return '';
}
const diff = execSync('git diff HEAD', {
cwd,
encoding: 'utf-8',
maxBuffer: 1024 * 1024 * 10, // 10MB
stdio: 'pipe',
});
return diff.trim();
} catch {
return '';
}
}
/** Run a custom agent */ /** Run a custom agent */
export async function runCustomAgent( export async function runCustomAgent(

View File

@ -9,7 +9,7 @@
*/ */
import type { WorkflowStep, WorkflowRule, AgentResponse, Language, ReportConfig, ReportObjectConfig } from '../models/types.js'; import type { WorkflowStep, WorkflowRule, AgentResponse, Language, ReportConfig, ReportObjectConfig } from '../models/types.js';
import { getGitDiff } from '../agents/runner.js';
/** /**
* Context for building instruction from template. * Context for building instruction from template.
@ -299,7 +299,7 @@ function renderWorkflowContext(
* Replace template placeholders in the instruction_template body. * Replace template placeholders in the instruction_template body.
* *
* These placeholders may still be used in instruction_template for * These placeholders may still be used in instruction_template for
* backward compatibility or special cases (e.g., {git_diff} in review steps). * backward compatibility or special cases.
*/ */
function replaceTemplatePlaceholders( function replaceTemplatePlaceholders(
template: string, template: string,
@ -335,10 +335,6 @@ function replaceTemplatePlaceholders(
} }
} }
// Replace {git_diff}
const gitDiff = getGitDiff(context.cwd);
result = result.replace(/\{git_diff\}/g, gitDiff);
// Replace {user_inputs} // Replace {user_inputs}
const userInputsStr = context.userInputs.join('\n'); const userInputsStr = context.userInputs.join('\n');
result = result.replace( result = result.replace(
@ -375,7 +371,7 @@ function replaceTemplatePlaceholders(
* 6. Instructions header + instruction_template content always * 6. Instructions header + instruction_template content always
* 7. Status Output Rules if rules exist * 7. Status Output Rules if rules exist
* *
* Template placeholders ({task}, {git_diff}, etc.) are still replaced * Template placeholders ({task}, {previous_response}, etc.) are still replaced
* within the instruction_template body for backward compatibility. * within the instruction_template body for backward compatibility.
* When a placeholder is present in the template, the corresponding * When a placeholder is present in the template, the corresponding
* auto-injected section is skipped to avoid duplication. * auto-injected section is skipped to avoid duplication.