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,36 +150,13 @@ 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:
allowed_tools: name: 03-ai-review.md
- Read order: |
- Glob
- Grep
- Write
- WebSearch
- WebFetch
rules:
- condition: No AI-specific issues
next: review
- condition: AI-specific issues found
next: ai_fix
instruction_template: |
## Git Diff
```diff
{git_diff}
```
Review the code for AI-specific issues:
- Assumption validation
- Plausible but wrong patterns
- Context fit with existing codebase
- Scope creep detection
**Report output:** Output to the `Report File` specified above. **Report output:** Output to the `Report File` specified above.
- 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
format: |
**Report format:**
```markdown ```markdown
# AI-Generated Code Review # AI-Generated Code Review
@ -206,6 +182,24 @@ steps:
**Cognitive load reduction rules:** **Cognitive load reduction rules:**
- No issues -> Summary 1 line + check table only (10 lines or less) - No issues -> Summary 1 line + check table only (10 lines or less)
- Issues found -> + Issues in table format (25 lines or less) - Issues found -> + Issues in table format (25 lines or less)
allowed_tools:
- Read
- Glob
- Grep
- Write
- WebSearch
- WebFetch
rules:
- condition: No AI-specific issues
next: review
- condition: AI-specific issues found
next: ai_fix
instruction_template: |
Review the code for AI-specific issues:
- Assumption validation
- Plausible but wrong patterns
- Context fit with existing codebase
- Scope creep detection
- name: ai_fix - name: ai_fix
agent: ~/.takt/agents/default/coder.md agent: ~/.takt/agents/default/coder.md
@ -238,36 +232,13 @@ 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:
allowed_tools: name: 04-architect-review.md
- Read order: |
- Glob
- Grep
- Write
- WebSearch
- WebFetch
rules:
- condition: No issues found
next: security_review
- condition: Minor improvements needed
next: improve
- condition: Structural fix required
next: fix
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).
Review the changes and provide feedback.
**Report output:** Output to the `Report File` specified above. **Report output:** Output to the `Report File` specified above.
- 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
format: |
**Report format:**
```markdown ```markdown
# Architecture Review # Architecture Review
@ -294,6 +265,24 @@ steps:
- APPROVE + no issues -> Summary only (5 lines or less) - APPROVE + no issues -> Summary only (5 lines or less)
- APPROVE + minor suggestions -> Summary + suggestions (15 lines or less) - APPROVE + minor suggestions -> Summary + suggestions (15 lines or less)
- REJECT -> Issues in table format (30 lines or less) - REJECT -> Issues in table format (30 lines or less)
allowed_tools:
- Read
- Glob
- Grep
- Write
- WebSearch
- WebFetch
rules:
- condition: No issues found
next: security_review
- condition: Minor improvements needed
next: improve
- condition: Structural fix required
next: fix
instruction_template: |
Focus on **architecture and design** review. Do NOT review AI-specific issues (that's the ai_review step).
Review the changes and provide feedback.
- name: improve - name: improve
agent: ~/.takt/agents/default/coder.md agent: ~/.takt/agents/default/coder.md
@ -354,36 +343,13 @@ 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:
allowed_tools: name: 05-security-review.md
- Read order: |
- Glob
- Grep
- Write
- WebSearch
- WebFetch
rules:
- condition: No security issues
next: supervise
- condition: Vulnerabilities require fix
next: security_fix
instruction_template: |
## Git Diff
```diff
{git_diff}
```
Perform security review on the changes. Check for vulnerabilities including:
- Injection attacks (SQL, Command, XSS)
- Authentication/Authorization issues
- Data exposure risks
- Cryptographic weaknesses
**Report output:** Output to the `Report File` specified above. **Report output:** Output to the `Report File` specified above.
- 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
format: |
**Report format:**
```markdown ```markdown
# Security Review # Security Review
@ -412,6 +378,24 @@ steps:
- No issues -> Check table only (10 lines or less) - No issues -> Check table only (10 lines or less)
- Warnings -> + Warnings 1-2 lines (15 lines or less) - Warnings -> + Warnings 1-2 lines (15 lines or less)
- Vulnerabilities -> + Table format (30 lines or less) - Vulnerabilities -> + Table format (30 lines or less)
allowed_tools:
- Read
- Glob
- Grep
- Write
- WebSearch
- WebFetch
rules:
- condition: No security issues
next: supervise
- condition: Vulnerabilities require fix
next: security_fix
instruction_template: |
Perform security review on the changes. Check for vulnerabilities including:
- Injection attacks (SQL, Command, XSS)
- Authentication/Authorization issues
- Data exposure risks
- Cryptographic weaknesses
- name: security_fix - name: security_fix
agent: ~/.takt/agents/default/coder.md agent: ~/.takt/agents/default/coder.md
@ -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,31 +152,13 @@ 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:
allowed_tools: name: 03-ai-review.md
- Read order: |
- Glob
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
## Git Diff
```diff
{git_diff}
```
Review the code for AI-specific issues:
- Assumption validation
- Plausible but wrong patterns
- Context fit with existing codebase
- Scope creep detection
**Report output:** Output to the `Report File` specified above. **Report output:** Output to the `Report File` specified above.
- 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
format: |
**Report format:**
```markdown ```markdown
# AI-Generated Code Review # AI-Generated Code Review
@ -203,6 +184,19 @@ steps:
**Cognitive load reduction rules:** **Cognitive load reduction rules:**
- No issues → Summary 1 line + check table only (10 lines or less) - No issues → Summary 1 line + check table only (10 lines or less)
- Issues found → + Issues in table format (25 lines or less) - Issues found → + Issues in table format (25 lines or less)
allowed_tools:
- Read
- Glob
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
Review the code for AI-specific issues:
- Assumption validation
- Plausible but wrong patterns
- Context fit with existing codebase
- Scope creep detection
rules: rules:
- condition: No AI-specific issues found - condition: No AI-specific issues found
next: cqrs_es_review next: cqrs_es_review
@ -242,38 +236,13 @@ 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:
allowed_tools: name: 04-cqrs-es-review.md
- Read order: |
- Glob
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
## Git Diff
```diff
{git_diff}
```
Review the changes above from the CQRS (Command Query Responsibility Segregation)
and Event Sourcing perspective.
**Review Criteria:**
- Aggregate design validity
- Event design (granularity, naming, schema)
- Command/Query separation
- Projection design
- Eventual consistency considerations
**Note**: If this project does not use CQRS+ES patterns,
review from a general domain design perspective.
**Report output:** Output to the `Report File` specified above. **Report output:** Output to the `Report File` specified above.
- 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
format: |
**Report format:**
```markdown ```markdown
# CQRS+ES Review # CQRS+ES Review
@ -296,6 +265,26 @@ steps:
|---|----------|-------|-----| |---|----------|-------|-----|
| 1 | `src/file.ts:42` | Issue description | Fix method | | 1 | `src/file.ts:42` | Issue description | Fix method |
``` ```
allowed_tools:
- Read
- Glob
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
Review the changes above from the CQRS (Command Query Responsibility Segregation)
and Event Sourcing perspective.
**Review Criteria:**
- Aggregate design validity
- Event design (granularity, naming, schema)
- Command/Query separation
- Projection design
- Eventual consistency considerations
**Note**: If this project does not use CQRS+ES patterns,
review from a general domain design perspective.
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,38 +326,13 @@ 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:
allowed_tools: name: 05-frontend-review.md
- Read order: |
- Glob
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
## Git Diff
```diff
{git_diff}
```
Review the changes above from the frontend development perspective.
**Review Criteria:**
- Component design (separation of concerns, granularity)
- State management (local/global decisions)
- Performance (re-rendering, memoization)
- Accessibility (keyboard support, ARIA)
- Data fetching patterns
- TypeScript type safety
**Note**: If this project does not include frontend code,
approve and proceed to the next step.
**Report output:** Output to the `Report File` specified above. **Report output:** Output to the `Report File` specified above.
- 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
format: |
**Report format:**
```markdown ```markdown
# Frontend Review # Frontend Review
@ -391,6 +355,26 @@ steps:
|---|----------|-------|-----| |---|----------|-------|-----|
| 1 | `src/file.tsx:42` | Issue description | Fix method | | 1 | `src/file.tsx:42` | Issue description | Fix method |
``` ```
allowed_tools:
- Read
- Glob
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
Review the changes above from the frontend development perspective.
**Review Criteria:**
- Component design (separation of concerns, granularity)
- State management (local/global decisions)
- Performance (re-rendering, memoization)
- Accessibility (keyboard support, ARIA)
- Data fetching patterns
- TypeScript type safety
**Note**: If this project does not include frontend code,
approve and proceed to the next step.
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,34 +416,13 @@ 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:
allowed_tools: name: 06-security-review.md
- Read order: |
- Glob
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
## Git Diff
```diff
{git_diff}
```
Review the changes above from the security perspective.
**Review Criteria:**
- Injection attacks (SQL, command, XSS)
- Authentication/authorization flaws
- Sensitive information handling
- Encryption appropriateness
- OWASP Top 10
**Report output:** Output to the `Report File` specified above. **Report output:** Output to the `Report File` specified above.
- 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
format: |
**Report format:**
```markdown ```markdown
# Security Review # Security Review
@ -483,6 +446,22 @@ steps:
## Warnings (non-blocking) ## Warnings (non-blocking)
- {Security recommendations} - {Security recommendations}
``` ```
allowed_tools:
- Read
- Glob
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
Review the changes above from the security perspective.
**Review Criteria:**
- Injection attacks (SQL, command, XSS)
- Authentication/authorization flaws
- Sensitive information handling
- Encryption appropriateness
- OWASP Top 10
rules: rules:
- condition: No security issues found - condition: No security issues found
next: qa_review next: qa_review
@ -534,35 +513,13 @@ 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:
allowed_tools: name: 07-qa-review.md
- Read order: |
- Glob
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
## Git Diff
```diff
{git_diff}
```
Review the changes above from the quality assurance perspective.
**Review Criteria:**
- Test coverage and quality
- Test strategy (unit/integration/E2E)
- Documentation (in-code and external)
- Error handling
- Logging and monitoring
- Maintainability
**Report output:** Output to the `Report File` specified above. **Report output:** Output to the `Report File` specified above.
- 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
format: |
**Report format:**
```markdown ```markdown
# QA Review # QA Review
@ -585,6 +542,23 @@ steps:
|---|----------|-------|-----| |---|----------|-------|-----|
| 1 | Testing | Issue description | Fix method | | 1 | Testing | Issue description | Fix method |
``` ```
allowed_tools:
- Read
- Glob
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
Review the changes above from the quality assurance perspective.
**Review Criteria:**
- Test coverage and quality
- Test strategy (unit/integration/E2E)
- Documentation (in-code and external)
- Error handling
- Logging and monitoring
- Maintainability
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,
# Additional User Inputs, Instructions heading) are auto-injected by buildInstruction().
# Only step-specific content belongs in instruction_template.
#
# Template Variables (available in instruction_template):
# {iteration} - Workflow-wide turn count (total steps executed across all agents) # {iteration} - Workflow-wide turn count (total steps executed across all agents)
# {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)
# {task} - Original user request # {previous_response} - Output from the previous step (only when pass_previous_response: true)
# {previous_response} - Output from the previous step
# {git_diff} - Current uncommitted changes (git diff)
# {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")
#
# 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,31 +164,13 @@ 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:
allowed_tools: name: 03-ai-review.md
- Read order: |
- Glob **Report output:** Output to the `Report File` specified above.
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
## Git Diff
```diff
{git_diff}
```
Review the code for AI-specific issues:
- Assumption validation
- Plausible but wrong patterns
- Context fit with existing codebase
- 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 does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section - If file exists: Append with `## Iteration {step_iteration}` section
format: |
**Report format:**
```markdown ```markdown
# AI-Generated Code Review # AI-Generated Code Review
@ -208,6 +196,19 @@ steps:
**Cognitive load reduction rules:** **Cognitive load reduction rules:**
- No issues -> Summary 1 line + check table only (10 lines or less) - No issues -> Summary 1 line + check table only (10 lines or less)
- Issues found -> + Issues in table format (25 lines or less) - Issues found -> + Issues in table format (25 lines or less)
allowed_tools:
- Read
- Glob
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
Review the code for AI-specific issues:
- Assumption validation
- Plausible but wrong patterns
- Context fit with existing codebase
- Scope creep detection
rules: rules:
- condition: No AI-specific issues found - condition: No AI-specific issues found
next: architect_review next: architect_review
@ -247,35 +248,13 @@ 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:
allowed_tools: name: 04-architect-review.md
- Read order: |
- Glob **Report output:** Output to the `Report File` specified above.
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
## Git Diff
```diff
{git_diff}
```
Focus on **architecture and design** review.
**Review Criteria:**
- Structure/design validity
- Code quality
- Change scope appropriateness
- Test coverage
- Dead code
- 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 does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section - If file exists: Append with `## Iteration {step_iteration}` section
format: |
**Report format:**
```markdown ```markdown
# Architecture Review # Architecture Review
@ -305,6 +284,23 @@ steps:
- APPROVE + no issues -> Summary only (5 lines or less) - APPROVE + no issues -> Summary only (5 lines or less)
- APPROVE + minor suggestions -> Summary + suggestions (15 lines or less) - APPROVE + minor suggestions -> Summary + suggestions (15 lines or less)
- REJECT -> Issues in table format (30 lines or less) - REJECT -> Issues in table format (30 lines or less)
allowed_tools:
- Read
- Glob
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
Focus on **architecture and design** review.
**Review Criteria:**
- Structure/design validity
- Code quality
- Change scope appropriateness
- Test coverage
- Dead code
- Call chain verification
rules: rules:
- condition: No architecture or design issues found - condition: No architecture or design issues found
next: frontend_review next: frontend_review
@ -344,38 +340,13 @@ 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:
allowed_tools: name: 05-frontend-review.md
- Read order: |
- Glob **Report output:** Output to the `Report File` specified above.
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
## Git Diff
```diff
{git_diff}
```
Review the changes above from the frontend development perspective.
**Review Criteria:**
- Component design (separation of concerns, granularity)
- State management (local/global decisions)
- Performance (re-rendering, memoization)
- Accessibility (keyboard support, ARIA)
- Data fetching patterns
- TypeScript type safety
**Note**: If this project does not include frontend code,
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 does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section - If file exists: Append with `## Iteration {step_iteration}` section
format: |
**Report format:**
```markdown ```markdown
# Frontend Review # Frontend Review
@ -398,6 +369,26 @@ steps:
|---|----------|-------|-----| |---|----------|-------|-----|
| 1 | `src/file.tsx:42` | Issue description | Fix method | | 1 | `src/file.tsx:42` | Issue description | Fix method |
``` ```
allowed_tools:
- Read
- Glob
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
Review the changes from the frontend development perspective.
**Review Criteria:**
- Component design (separation of concerns, granularity)
- State management (local/global decisions)
- Performance (re-rendering, memoization)
- Accessibility (keyboard support, ARIA)
- Data fetching patterns
- TypeScript type safety
**Note**: If this project does not include frontend code,
approve and proceed to the next step.
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,34 +430,13 @@ 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:
allowed_tools: name: 06-security-review.md
- Read order: |
- Glob **Report output:** Output to the `Report File` specified above.
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
## Git Diff
```diff
{git_diff}
```
Review the changes above from the security perspective.
**Review Criteria:**
- Injection attacks (SQL, command, XSS)
- Authentication/authorization flaws
- Sensitive information handling
- Encryption appropriateness
- 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 does not exist: Create new file
- If file exists: Append with `## Iteration {step_iteration}` section - If file exists: Append with `## Iteration {step_iteration}` section
format: |
**Report format:**
```markdown ```markdown
# Security Review # Security Review
@ -490,6 +460,22 @@ steps:
## Warnings (non-blocking) ## Warnings (non-blocking)
- {Security recommendations} - {Security recommendations}
``` ```
allowed_tools:
- Read
- Glob
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
Review the changes from the security perspective.
**Review Criteria:**
- Injection attacks (SQL, command, XSS)
- Authentication/authorization flaws
- Sensitive information handling
- Encryption appropriateness
- OWASP Top 10
rules: rules:
- condition: No security issues found - condition: No security issues found
next: qa_review next: qa_review
@ -541,35 +527,13 @@ 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:
allowed_tools: name: 07-qa-review.md
- Read order: |
- Glob **Report output:** Output to the `Report File` specified above.
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
## Git Diff
```diff
{git_diff}
```
Review the changes above from the quality assurance perspective.
**Review Criteria:**
- Test coverage and quality
- Test strategy (unit/integration/E2E)
- Documentation (in-code and external)
- Error handling
- Logging and monitoring
- Maintainability
**Report output:** Output to `.takt/reports/{report_dir}/07-qa-review.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
format: |
**Report format:**
```markdown ```markdown
# QA Review # QA Review
@ -592,6 +556,23 @@ steps:
|---|----------|-------|-----| |---|----------|-------|-----|
| 1 | Testing | Issue description | Fix method | | 1 | Testing | Issue description | Fix method |
``` ```
allowed_tools:
- Read
- Glob
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
Review the changes from the quality assurance perspective.
**Review Criteria:**
- Test coverage and quality
- Test strategy (unit/integration/E2E)
- Documentation (in-code and external)
- Error handling
- Logging and monitoring
- Maintainability
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,36 +143,13 @@ 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:
allowed_tools: name: 03-ai-review.md
- Read order: |
- Glob
- Grep
- Write
- WebSearch
- WebFetch
rules:
- condition: No AI-specific issues
next: review
- condition: AI-specific issues found
next: plan
instruction_template: |
## Git Diff
```diff
{git_diff}
```
Review the code for AI-specific issues:
- Assumption validation
- Plausible but wrong patterns
- Context fit with existing codebase
- Scope creep detection
**Report output:** Output to the `Report File` specified above. **Report output:** Output to the `Report File` specified above.
- 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
format: |
**Report format:**
```markdown ```markdown
# AI-Generated Code Review # AI-Generated Code Review
@ -199,10 +175,6 @@ steps:
**Cognitive load reduction rules:** **Cognitive load reduction rules:**
- No issues -> Summary 1 line + check table only (10 lines or less) - No issues -> Summary 1 line + check table only (10 lines or less)
- Issues found -> + Issues in table format (25 lines or less) - Issues found -> + Issues in table format (25 lines or less)
- name: review
agent: ~/.takt/agents/default/architecture-reviewer.md
report: 04-architect-review.md
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -211,28 +183,26 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
rules: rules:
- condition: No issues found - condition: No AI-specific issues
next: supervise next: review
- condition: Structural fix required - condition: AI-specific issues found
next: plan next: plan
instruction_template: | instruction_template: |
## Git Diff Review the code for AI-specific issues:
```diff - Assumption validation
{git_diff} - Plausible but wrong patterns
``` - Context fit with existing codebase
- Scope creep detection
Focus on **architecture and design** review. Do NOT review AI-specific issues (that's already done).
Review the changes and provide feedback.
**Note:** In simple workflow, IMPROVE judgment is not used.
If there are minor suggestions, use APPROVE + comments.
- name: review
agent: ~/.takt/agents/default/architecture-reviewer.md
report:
name: 04-architect-review.md
order: |
**Report output:** Output to the `Report File` specified above. **Report output:** Output to the `Report File` specified above.
- 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
format: |
**Report format:**
```markdown ```markdown
# Architecture Review # Architecture Review
@ -259,6 +229,25 @@ steps:
- APPROVE + no issues -> Summary only (5 lines or less) - APPROVE + no issues -> Summary only (5 lines or less)
- APPROVE + minor suggestions -> Summary + suggestions (15 lines or less) - APPROVE + minor suggestions -> Summary + suggestions (15 lines or less)
- REJECT -> Issues in table format (30 lines or less) - REJECT -> Issues in table format (30 lines or less)
allowed_tools:
- Read
- Glob
- Grep
- Write
- WebSearch
- WebFetch
rules:
- condition: No issues found
next: supervise
- condition: Structural fix required
next: plan
instruction_template: |
Focus on **architecture and design** review. Do NOT review AI-specific issues (that's already done).
Review the changes and provide feedback.
**Note:** In simple workflow, IMPROVE judgment is not used.
If there are minor suggestions, use APPROVE + comments.
- name: supervise - name: supervise
agent: ~/.takt/agents/default/supervisor.md agent: ~/.takt/agents/default/supervisor.md
@ -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,36 +146,13 @@ 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:
allowed_tools: name: 03-ai-review.md
- Read order: |
- Glob **レポート出力:** `Report File` に出力してください。
- Grep
- Write
- WebSearch
- WebFetch
rules:
- condition: AI特有の問題なし
next: review
- condition: AI特有の問題あり
next: ai_fix
instruction_template: |
## Git Diff
```diff
{git_diff}
```
AI特有の問題についてコードをレビューしてください:
- 仮定の検証
- もっともらしいが間違っているパターン
- 既存コードベースとの適合性
- スコープクリープの検出
**レポート出力:** Report File に出力してください。
- ファイルが存在しない場合: 新規作成 - ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記 - ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
format: |
**レポートフォーマット:**
```markdown ```markdown
# AI生成コードレビュー # AI生成コードレビュー
@ -204,6 +178,24 @@ steps:
**認知負荷軽減ルール:** **認知負荷軽減ルール:**
- 問題なし → サマリー1文 + チェック表のみ10行以内 - 問題なし → サマリー1文 + チェック表のみ10行以内
- 問題あり → + 問題を表形式で25行以内 - 問題あり → + 問題を表形式で25行以内
allowed_tools:
- Read
- Glob
- Grep
- Write
- WebSearch
- WebFetch
rules:
- condition: AI特有の問題なし
next: review
- condition: AI特有の問題あり
next: ai_fix
instruction_template: |
AI特有の問題についてコードをレビューしてください:
- 仮定の検証
- もっともらしいが間違っているパターン
- 既存コードベースとの適合性
- スコープクリープの検出
- name: ai_fix - name: ai_fix
agent: ~/.takt/agents/default/coder.md agent: ~/.takt/agents/default/coder.md
@ -236,44 +228,13 @@ 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:
allowed_tools: name: 04-architect-review.md
- Read order: |
- Glob **レポート出力:** `Report File` に出力してください。
- Grep
- Write
- WebSearch
- WebFetch
rules:
- condition: 問題なし
next: security_review
- condition: 改善すべき点がある(軽微)
next: improve
- condition: 構造的な修正が必要
next: fix
instruction_template: |
## Git Diff
```diff
{git_diff}
```
**アーキテクチャと設計**のレビューに集中してください。AI特有の問題はレビューしないでください次のステップで行います
変更をレビューしてフィードバックを提供してください。
**レビュー観点:**
- 構造・設計の妥当性
- コード品質
- 変更スコープの適切性
- テストカバレッジ
- デッドコード
- 呼び出しチェーン検証
**レポート出力:** Report File に出力してください。
- ファイルが存在しない場合: 新規作成 - ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記 - ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
format: |
**レポートフォーマット:**
```markdown ```markdown
# アーキテクチャレビュー # アーキテクチャレビュー
@ -303,6 +264,32 @@ steps:
- APPROVE + 問題なし → サマリーのみ5行以内 - APPROVE + 問題なし → サマリーのみ5行以内
- APPROVE + 軽微な提案 → サマリー + 改善提案15行以内 - APPROVE + 軽微な提案 → サマリー + 改善提案15行以内
- REJECT → 問題点を表形式で30行以内 - REJECT → 問題点を表形式で30行以内
allowed_tools:
- Read
- Glob
- Grep
- Write
- WebSearch
- WebFetch
rules:
- condition: 問題なし
next: security_review
- condition: 改善すべき点がある(軽微)
next: improve
- condition: 構造的な修正が必要
next: fix
instruction_template: |
**アーキテクチャと設計**のレビューに集中してください。AI特有の問題はレビューしないでください次のステップで行います
変更をレビューしてフィードバックを提供してください。
**レビュー観点:**
- 構造・設計の妥当性
- コード品質
- 変更スコープの適切性
- テストカバレッジ
- デッドコード
- 呼び出しチェーン検証
- name: improve - name: improve
agent: ~/.takt/agents/default/coder.md agent: ~/.takt/agents/default/coder.md
@ -362,36 +349,13 @@ 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:
allowed_tools: name: 05-security-review.md
- Read order: |
- Glob **レポート出力:** `Report File` に出力してください。
- Grep
- Write
- WebSearch
- WebFetch
rules:
- condition: セキュリティ問題なし
next: supervise
- condition: 脆弱性があり修正が必要
next: security_fix
instruction_template: |
## Git Diff
```diff
{git_diff}
```
変更に対してセキュリティレビューを行ってください。以下の脆弱性を確認してください:
- インジェクション攻撃SQL, コマンド, XSS
- 認証・認可の問題
- データ露出リスク
- 暗号化の弱点
**レポート出力:** Report File に出力してください。
- ファイルが存在しない場合: 新規作成 - ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記 - ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
format: |
**レポートフォーマット:**
```markdown ```markdown
# セキュリティレビュー # セキュリティレビュー
@ -420,6 +384,24 @@ steps:
- 問題なし → チェック表のみ10行以内 - 問題なし → チェック表のみ10行以内
- 警告あり → + 警告を1-2行15行以内 - 警告あり → + 警告を1-2行15行以内
- 脆弱性あり → + 表形式で30行以内 - 脆弱性あり → + 表形式で30行以内
allowed_tools:
- Read
- Glob
- Grep
- Write
- WebSearch
- WebFetch
rules:
- condition: セキュリティ問題なし
next: supervise
- condition: 脆弱性があり修正が必要
next: security_fix
instruction_template: |
変更に対してセキュリティレビューを行ってください。以下の脆弱性を確認してください:
- インジェクション攻撃SQL, コマンド, XSS
- 認証・認可の問題
- データ露出リスク
- 暗号化の弱点
- name: security_fix - name: security_fix
agent: ~/.takt/agents/default/coder.md agent: ~/.takt/agents/default/coder.md
@ -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,
# Additional User Inputs, Instructions headingはbuildInstruction()が自動挿入。
# instruction_templateにはステップ固有の内容のみ記述。
#
# テンプレート変数instruction_template内で使用可能:
# {iteration} - ワークフロー全体のターン数(全エージェントで実行されたステップの合計) # {iteration} - ワークフロー全体のターン数(全エージェントで実行されたステップの合計)
# {max_iterations} - ワークフローの最大イテレーション数 # {max_iterations} - ワークフローの最大イテレーション数
# {step_iteration} - ステップごとのイテレーション数(このステップが何回実行されたか) # {step_iteration} - ステップごとのイテレーション数(このステップが何回実行されたか)
# {task} - 元のユーザー要求 # {previous_response} - 前のステップの出力pass_previous_response: true の場合のみ)
# {previous_response} - 前のステップの出力
# {git_diff} - 現在のコミットされていない変更git diff
# {user_inputs} - ワークフロー中に蓄積されたユーザー入力
# {report_dir} - レポートディレクトリ名(例: "20250126-143052-task-summary" # {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,31 +161,13 @@ 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:
allowed_tools: name: 03-ai-review.md
- Read order: |
- Glob **レポート出力:** `Report File` に出力してください。
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
## Git Diff
```diff
{git_diff}
```
AI特有の問題についてコードをレビューしてください:
- 仮定の検証
- もっともらしいが間違っているパターン
- 既存コードベースとの適合性
- スコープクリープの検出
**レポート出力:** .takt/reports/{report_dir}/03-ai-review.md に出力してください。
- ファイルが存在しない場合: 新規作成 - ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記 - ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
format: |
**レポートフォーマット:**
```markdown ```markdown
# AI生成コードレビュー # AI生成コードレビュー
@ -205,6 +193,19 @@ steps:
**認知負荷軽減ルール:** **認知負荷軽減ルール:**
- 問題なし → サマリー1文 + チェック表のみ10行以内 - 問題なし → サマリー1文 + チェック表のみ10行以内
- 問題あり → + 問題を表形式で25行以内 - 問題あり → + 問題を表形式で25行以内
allowed_tools:
- Read
- Glob
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
AI特有の問題についてコードをレビューしてください:
- 仮定の検証
- もっともらしいが間違っているパターン
- 既存コードベースとの適合性
- スコープクリープの検出
rules: rules:
- condition: AI特有の問題が見つからない - condition: AI特有の問題が見つからない
next: cqrs_es_review next: cqrs_es_review
@ -244,38 +245,13 @@ 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:
allowed_tools: name: 04-cqrs-es-review.md
- Read order: |
- Glob **レポート出力:** `Report File` に出力してください。
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
## Git Diff
```diff
{git_diff}
```
CQRSコマンドクエリ責務分離とEvent Sourcingイベントソーシングの観点から
上記の変更をレビューしてください。
**レビュー観点:**
- Aggregate設計の妥当性
- イベント設計(粒度、命名、スキーマ)
- Command/Queryの分離
- プロジェクション設計
- 結果整合性の考慮
**注意**: このプロジェクトがCQRS+ESパターンを使用していない場合は、
一般的なドメイン設計の観点からレビューしてください。
**レポート出力:** .takt/reports/{report_dir}/04-cqrs-es-review.md に出力してください。
- ファイルが存在しない場合: 新規作成 - ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記 - ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
format: |
**レポートフォーマット:**
```markdown ```markdown
# CQRS+ESレビュー # CQRS+ESレビュー
@ -298,6 +274,26 @@ steps:
|---|------|------|--------| |---|------|------|--------|
| 1 | `src/file.ts:42` | 問題の説明 | 修正方法 | | 1 | `src/file.ts:42` | 問題の説明 | 修正方法 |
``` ```
allowed_tools:
- Read
- Glob
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
CQRSコマンドクエリ責務分離とEvent Sourcingイベントソーシングの観点から
上記の変更をレビューしてください。
**レビュー観点:**
- Aggregate設計の妥当性
- イベント設計(粒度、命名、スキーマ)
- Command/Queryの分離
- プロジェクション設計
- 結果整合性の考慮
**注意**: このプロジェクトがCQRS+ESパターンを使用していない場合は、
一般的なドメイン設計の観点からレビューしてください。
rules: rules:
- condition: CQRS+ES設計に問題がない - condition: CQRS+ES設計に問題がない
next: frontend_review next: frontend_review
@ -339,38 +335,13 @@ 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:
allowed_tools: name: 05-frontend-review.md
- Read order: |
- Glob **レポート出力:** `Report File` に出力してください。
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
## Git Diff
```diff
{git_diff}
```
フロントエンド開発の観点から上記の変更をレビューしてください。
**レビュー観点:**
- コンポーネント設計(責務分離、粒度)
- 状態管理(ローカル/グローバルの判断)
- パフォーマンス(再レンダリング、メモ化)
- アクセシビリティキーボード操作、ARIA
- データフェッチパターン
- TypeScript型安全性
**注意**: このプロジェクトがフロントエンドを含まない場合は、
問題なしとして次に進んでください。
**レポート出力:** .takt/reports/{report_dir}/05-frontend-review.md に出力してください。
- ファイルが存在しない場合: 新規作成 - ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記 - ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
format: |
**レポートフォーマット:**
```markdown ```markdown
# フロントエンドレビュー # フロントエンドレビュー
@ -393,6 +364,26 @@ steps:
|---|------|------|--------| |---|------|------|--------|
| 1 | `src/file.tsx:42` | 問題の説明 | 修正方法 | | 1 | `src/file.tsx:42` | 問題の説明 | 修正方法 |
``` ```
allowed_tools:
- Read
- Glob
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
フロントエンド開発の観点から上記の変更をレビューしてください。
**レビュー観点:**
- コンポーネント設計(責務分離、粒度)
- 状態管理(ローカル/グローバルの判断)
- パフォーマンス(再レンダリング、メモ化)
- アクセシビリティキーボード操作、ARIA
- データフェッチパターン
- TypeScript型安全性
**注意**: このプロジェクトがフロントエンドを含まない場合は、
問題なしとして次に進んでください。
rules: rules:
- condition: フロントエンド設計に問題がない - condition: フロントエンド設計に問題がない
next: security_review next: security_review
@ -434,34 +425,13 @@ 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:
allowed_tools: name: 06-security-review.md
- Read order: |
- Glob **レポート出力:** `Report File` に出力してください。
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
## Git Diff
```diff
{git_diff}
```
セキュリティの観点から上記の変更をレビューしてください。
**レビュー観点:**
- インジェクション攻撃SQL, コマンド, XSS
- 認証・認可の不備
- 機密情報の取り扱い
- 暗号化の適切性
- OWASP Top 10
**レポート出力:** .takt/reports/{report_dir}/06-security-review.md に出力してください。
- ファイルが存在しない場合: 新規作成 - ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記 - ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
format: |
**レポートフォーマット:**
```markdown ```markdown
# セキュリティレビュー # セキュリティレビュー
@ -485,6 +455,22 @@ steps:
## 警告(ブロッキングではない) ## 警告(ブロッキングではない)
- {セキュリティに関する推奨事項} - {セキュリティに関する推奨事項}
``` ```
allowed_tools:
- Read
- Glob
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
セキュリティの観点から上記の変更をレビューしてください。
**レビュー観点:**
- インジェクション攻撃SQL, コマンド, XSS
- 認証・認可の不備
- 機密情報の取り扱い
- 暗号化の適切性
- OWASP Top 10
rules: rules:
- condition: セキュリティ上の問題がない - condition: セキュリティ上の問題がない
next: qa_review next: qa_review
@ -536,35 +522,13 @@ 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:
allowed_tools: name: 07-qa-review.md
- Read order: |
- Glob **レポート出力:** `Report File` に出力してください。
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
## Git Diff
```diff
{git_diff}
```
品質保証の観点から上記の変更をレビューしてください。
**レビュー観点:**
- テストカバレッジと品質
- テスト戦略(単体/統合/E2E
- ドキュメント(コード内・外部)
- エラーハンドリング
- ログとモニタリング
- 保守性
**レポート出力:** .takt/reports/{report_dir}/07-qa-review.md に出力してください。
- ファイルが存在しない場合: 新規作成 - ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記 - ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
format: |
**レポートフォーマット:**
```markdown ```markdown
# QAレビュー # QAレビュー
@ -587,6 +551,23 @@ steps:
|---|---------|------|--------| |---|---------|------|--------|
| 1 | テスト | 問題の説明 | 修正方法 | | 1 | テスト | 問題の説明 | 修正方法 |
``` ```
allowed_tools:
- Read
- Glob
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
品質保証の観点から上記の変更をレビューしてください。
**レビュー観点:**
- テストカバレッジと品質
- テスト戦略(単体/統合/E2E
- ドキュメント(コード内・外部)
- エラーハンドリング
- ログとモニタリング
- 保守性
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,31 +152,13 @@ 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:
allowed_tools: name: 03-ai-review.md
- Read order: |
- Glob **レポート出力:** `Report File` に出力してください。
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
## Git Diff
```diff
{git_diff}
```
AI特有の問題についてコードをレビューしてください:
- 仮定の検証
- もっともらしいが間違っているパターン
- 既存コードベースとの適合性
- スコープクリープの検出
**レポート出力:** 上記の `Report File` に出力してください。
- ファイルが存在しない場合: 新規作成 - ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記 - ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
format: |
**レポートフォーマット:**
```markdown ```markdown
# AI生成コードレビュー # AI生成コードレビュー
@ -203,6 +184,19 @@ steps:
**認知負荷軽減ルール:** **認知負荷軽減ルール:**
- 問題なし → サマリー1文 + チェック表のみ10行以内 - 問題なし → サマリー1文 + チェック表のみ10行以内
- 問題あり → + 問題を表形式で25行以内 - 問題あり → + 問題を表形式で25行以内
allowed_tools:
- Read
- Glob
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
AI特有の問題についてコードをレビューしてください:
- 仮定の検証
- もっともらしいが間違っているパターン
- 既存コードベースとの適合性
- スコープクリープの検出
rules: rules:
- condition: AI特有の問題が見つからない - condition: AI特有の問題が見つからない
next: architect_review next: architect_review
@ -242,35 +236,13 @@ 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:
allowed_tools: name: 04-architect-review.md
- Read order: |
- Glob **レポート出力:** `Report File` に出力してください。
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
## Git Diff
```diff
{git_diff}
```
**アーキテクチャと設計**のレビューに集中してください。
**レビュー観点:**
- 構造・設計の妥当性
- コード品質
- 変更スコープの適切性
- テストカバレッジ
- デッドコード
- 呼び出しチェーン検証
**レポート出力:** 上記の `Report File` に出力してください。
- ファイルが存在しない場合: 新規作成 - ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記 - ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
format: |
**レポートフォーマット:**
```markdown ```markdown
# アーキテクチャレビュー # アーキテクチャレビュー
@ -300,6 +272,23 @@ steps:
- APPROVE + 問題なし → サマリーのみ5行以内 - APPROVE + 問題なし → サマリーのみ5行以内
- APPROVE + 軽微な提案 → サマリー + 改善提案15行以内 - APPROVE + 軽微な提案 → サマリー + 改善提案15行以内
- REJECT → 問題点を表形式で30行以内 - REJECT → 問題点を表形式で30行以内
allowed_tools:
- Read
- Glob
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
**アーキテクチャと設計**のレビューに集中してください。
**レビュー観点:**
- 構造・設計の妥当性
- コード品質
- 変更スコープの適切性
- テストカバレッジ
- デッドコード
- 呼び出しチェーン検証
rules: rules:
- condition: アーキテクチャと設計に問題がない - condition: アーキテクチャと設計に問題がない
next: frontend_review next: frontend_review
@ -339,38 +328,13 @@ 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:
allowed_tools: name: 05-frontend-review.md
- Read order: |
- Glob **レポート出力:** `Report File` に出力してください。
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
## Git Diff
```diff
{git_diff}
```
フロントエンド開発の観点から上記の変更をレビューしてください。
**レビュー観点:**
- コンポーネント設計(責務分離、粒度)
- 状態管理(ローカル/グローバルの判断)
- パフォーマンス(再レンダリング、メモ化)
- アクセシビリティキーボード操作、ARIA
- データフェッチパターン
- TypeScript型安全性
**注意**: このプロジェクトがフロントエンドを含まない場合は、
問題なしとして次に進んでください。
**レポート出力:** 上記の `Report File` に出力してください。
- ファイルが存在しない場合: 新規作成 - ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記 - ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
format: |
**レポートフォーマット:**
```markdown ```markdown
# フロントエンドレビュー # フロントエンドレビュー
@ -393,6 +357,26 @@ steps:
|---|------|------|--------| |---|------|------|--------|
| 1 | `src/file.tsx:42` | 問題の説明 | 修正方法 | | 1 | `src/file.tsx:42` | 問題の説明 | 修正方法 |
``` ```
allowed_tools:
- Read
- Glob
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
フロントエンド開発の観点から上記の変更をレビューしてください。
**レビュー観点:**
- コンポーネント設計(責務分離、粒度)
- 状態管理(ローカル/グローバルの判断)
- パフォーマンス(再レンダリング、メモ化)
- アクセシビリティキーボード操作、ARIA
- データフェッチパターン
- TypeScript型安全性
**注意**: このプロジェクトがフロントエンドを含まない場合は、
問題なしとして次に進んでください。
rules: rules:
- condition: フロントエンド設計に問題がない - condition: フロントエンド設計に問題がない
next: security_review next: security_review
@ -434,34 +418,13 @@ 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:
allowed_tools: name: 06-security-review.md
- Read order: |
- Glob **レポート出力:** `Report File` に出力してください。
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
## Git Diff
```diff
{git_diff}
```
セキュリティの観点から上記の変更をレビューしてください。
**レビュー観点:**
- インジェクション攻撃SQL, コマンド, XSS
- 認証・認可の不備
- 機密情報の取り扱い
- 暗号化の適切性
- OWASP Top 10
**レポート出力:** 上記の `Report File` に出力してください。
- ファイルが存在しない場合: 新規作成 - ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記 - ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
format: |
**レポートフォーマット:**
```markdown ```markdown
# セキュリティレビュー # セキュリティレビュー
@ -485,6 +448,22 @@ steps:
## 警告(ブロッキングではない) ## 警告(ブロッキングではない)
- {セキュリティに関する推奨事項} - {セキュリティに関する推奨事項}
``` ```
allowed_tools:
- Read
- Glob
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
セキュリティの観点から上記の変更をレビューしてください。
**レビュー観点:**
- インジェクション攻撃SQL, コマンド, XSS
- 認証・認可の不備
- 機密情報の取り扱い
- 暗号化の適切性
- OWASP Top 10
rules: rules:
- condition: セキュリティ上の問題がない - condition: セキュリティ上の問題がない
next: qa_review next: qa_review
@ -536,35 +515,13 @@ 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:
allowed_tools: name: 07-qa-review.md
- Read order: |
- Glob **レポート出力:** `Report File` に出力してください。
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
## Git Diff
```diff
{git_diff}
```
品質保証の観点から上記の変更をレビューしてください。
**レビュー観点:**
- テストカバレッジと品質
- テスト戦略(単体/統合/E2E
- ドキュメント(コード内・外部)
- エラーハンドリング
- ログとモニタリング
- 保守性
**レポート出力:** 上記の `Report File` に出力してください。
- ファイルが存在しない場合: 新規作成 - ファイルが存在しない場合: 新規作成
- ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記 - ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
format: |
**レポートフォーマット:**
```markdown ```markdown
# QAレビュー # QAレビュー
@ -587,6 +544,23 @@ steps:
|---|---------|------|--------| |---|---------|------|--------|
| 1 | テスト | 問題の説明 | 修正方法 | | 1 | テスト | 問題の説明 | 修正方法 |
``` ```
allowed_tools:
- Read
- Glob
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
品質保証の観点から上記の変更をレビューしてください。
**レビュー観点:**
- テストカバレッジと品質
- テスト戦略(単体/統合/E2E
- ドキュメント(コード内・外部)
- エラーハンドリング
- ログとモニタリング
- 保守性
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,27 +138,13 @@ 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:
allowed_tools: name: 03-ai-review.md
- Read order: |
- Glob **レポート出力:** `Report File` に出力してください。
- Grep - ファイルが存在しない場合: 新規作成
- Write - ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
- WebSearch format: |
- WebFetch
instruction_template: |
## Git Diff
```diff
{git_diff}
```
AI特有の問題についてコードをレビューしてください:
- 仮定の検証
- もっともらしいが間違っているパターン
- 既存コードベースとの適合性
- スコープクリープの検出
**レポートフォーマット:**
```markdown ```markdown
# AI生成コードレビュー # AI生成コードレビュー
@ -181,15 +170,6 @@ steps:
**認知負荷軽減ルール:** **認知負荷軽減ルール:**
- 問題なし → サマリー1文 + チェック表のみ10行以内 - 問題なし → サマリー1文 + チェック表のみ10行以内
- 問題あり → + 問題を表形式で25行以内 - 問題あり → + 問題を表形式で25行以内
rules:
- condition: "AI特有の問題なし"
next: review
- condition: "AI特有の問題あり"
next: plan
- name: review
agent: ~/.takt/agents/default/architecture-reviewer.md
report: 04-architect-review.md
allowed_tools: allowed_tools:
- Read - Read
- Glob - Glob
@ -198,19 +178,26 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
instruction_template: | instruction_template: |
## Git Diff AI特有の問題についてコードをレビューしてください:
```diff - 仮定の検証
{git_diff} - もっともらしいが間違っているパターン
``` - 既存コードベースとの適合性
- スコープクリープの検出
rules:
- condition: "AI特有の問題なし"
next: review
- condition: "AI特有の問題あり"
next: plan
**アーキテクチャと設計**のレビューに集中してください。AI特有の問題はレビューしないでください前のステップで完了済み - name: review
agent: ~/.takt/agents/default/architecture-reviewer.md
変更をレビューしてフィードバックを提供してください。 report:
name: 04-architect-review.md
**注意:** simpleワークフローではIMPROVE判定は使用しません。 order: |
軽微な改善提案がある場合は APPROVE + コメントとしてください。 **レポート出力:** `Report File` に出力してください。
- ファイルが存在しない場合: 新規作成
**レポートフォーマット:** - ファイルが存在する場合: `## Iteration {step_iteration}` セクションを追記
format: |
```markdown ```markdown
# アーキテクチャレビュー # アーキテクチャレビュー
@ -237,6 +224,20 @@ steps:
- APPROVE + 問題なし → サマリーのみ5行以内 - APPROVE + 問題なし → サマリーのみ5行以内
- APPROVE + 軽微な提案 → サマリー + 改善提案15行以内 - APPROVE + 軽微な提案 → サマリー + 改善提案15行以内
- REJECT → 問題点を表形式で30行以内 - REJECT → 問題点を表形式で30行以内
allowed_tools:
- Read
- Glob
- Grep
- Write
- WebSearch
- WebFetch
instruction_template: |
**アーキテクチャと設計**のレビューに集中してください。AI特有の問題はレビューしないでください前のステップで完了済み
変更をレビューしてフィードバックを提供してください。
**注意:** simpleワークフローではIMPROVE判定は使用しません。
軽微な改善提案がある場合は APPROVE + コメントとしてください。
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.