337 lines
9.5 KiB
YAML
337 lines
9.5 KiB
YAML
# Default TAKT Workflow
|
|
# Plan -> Coder -> Architect Review -> AI Review -> Security Review -> Supervisor Approval
|
|
|
|
name: default
|
|
description: Standard development workflow with planning and specialized reviews
|
|
|
|
max_iterations: 20
|
|
|
|
initial_step: plan
|
|
|
|
steps:
|
|
- name: plan
|
|
agent: ~/.takt/agents/default/planner.md
|
|
instruction_template: |
|
|
## Workflow Context
|
|
- Iteration: {iteration}/{max_iterations}
|
|
- Step: plan (Task analysis)
|
|
- Report Directory: .takt/reports/{report_dir}/
|
|
|
|
## User Request
|
|
{task}
|
|
|
|
## Previous Response (when returned from implement)
|
|
{previous_response}
|
|
|
|
## Instructions
|
|
Analyze the task and create an implementation plan.
|
|
|
|
**Note:** If returned from implement step (Previous Response exists),
|
|
review and revise the plan based on that feedback (replan).
|
|
|
|
**Tasks:**
|
|
1. Understand the requirements
|
|
2. Identify impact scope
|
|
3. Decide implementation approach
|
|
|
|
**Report output:** `.takt/reports/{report_dir}/00-plan.md`
|
|
|
|
Output [PLANNER:DONE] when complete.
|
|
Output [PLANNER:BLOCKED] if requirements are unclear.
|
|
pass_previous_response: true
|
|
transitions:
|
|
- condition: done
|
|
next_step: implement
|
|
- condition: blocked
|
|
next_step: ABORT
|
|
|
|
- name: implement
|
|
agent: ~/.takt/agents/default/coder.md
|
|
instruction_template: |
|
|
## Workflow Context
|
|
- Iteration: {iteration}/{max_iterations}
|
|
- Step: implement
|
|
- Report Directory: .takt/reports/{report_dir}/
|
|
|
|
## User Request
|
|
{task}
|
|
|
|
## Additional User Inputs
|
|
{user_inputs}
|
|
|
|
## Instructions
|
|
Follow the plan from the plan step and implement.
|
|
Refer to the plan report (00-plan.md) and proceed with implementation.
|
|
|
|
Include [CODER:DONE] when complete.
|
|
Include [CODER:BLOCKED] if you cannot proceed (returns to plan).
|
|
transitions:
|
|
- condition: done
|
|
next_step: review
|
|
- condition: blocked
|
|
next_step: plan
|
|
|
|
- name: review
|
|
agent: ~/.takt/agents/default/architect.md
|
|
instruction_template: |
|
|
## Workflow Context
|
|
- Iteration: {iteration}/{max_iterations}
|
|
- Step: review (Architecture Review)
|
|
- Report Directory: .takt/reports/{report_dir}/
|
|
|
|
## Original User Request (Initial request from workflow start)
|
|
{task}
|
|
|
|
## Git Diff
|
|
```diff
|
|
{git_diff}
|
|
```
|
|
|
|
## Instructions
|
|
Focus on **architecture and design** review. Do NOT review AI-specific issues (that's the next step).
|
|
|
|
Review the changes and provide feedback:
|
|
- [ARCHITECT:APPROVE] if no issues
|
|
- [ARCHITECT:IMPROVE] if minor improvements needed
|
|
- [ARCHITECT:REJECT] if structural changes are needed (list specific issues)
|
|
|
|
Output report to the Report Directory above.
|
|
transitions:
|
|
- condition: approved
|
|
next_step: ai_review
|
|
- condition: improve
|
|
next_step: improve
|
|
- condition: rejected
|
|
next_step: fix
|
|
|
|
- name: improve
|
|
agent: ~/.takt/agents/default/coder.md
|
|
instruction_template: |
|
|
## Workflow Context
|
|
- Iteration: {iteration}/{max_iterations}
|
|
- Step: improve
|
|
|
|
## Architect Feedback (This is the latest instruction - prioritize this)
|
|
{previous_response}
|
|
|
|
## Original User Request (Initial request from workflow start - for reference)
|
|
{task}
|
|
|
|
## Additional User Inputs
|
|
{user_inputs}
|
|
|
|
## Instructions
|
|
**Important**: Address the Architect's improvement suggestions.
|
|
These are minor improvements, not major design issues.
|
|
|
|
Make improvements such as:
|
|
- Naming improvements
|
|
- Small refactoring
|
|
- Adding/fixing comments
|
|
- Code organization
|
|
|
|
Include [CODER:DONE] when complete.
|
|
Include [CODER:BLOCKED] if you cannot proceed.
|
|
pass_previous_response: true
|
|
transitions:
|
|
- condition: done
|
|
next_step: review
|
|
- condition: blocked
|
|
next_step: plan
|
|
|
|
- name: ai_review
|
|
agent: ~/.takt/agents/default/ai-reviewer.md
|
|
instruction_template: |
|
|
## Workflow Context
|
|
- Iteration: {iteration}/{max_iterations}
|
|
- Step: ai_review (AI-Generated Code Review)
|
|
- Report Directory: .takt/reports/{report_dir}/
|
|
|
|
## Original User Request (Initial request from workflow start)
|
|
{task}
|
|
|
|
## Git Diff
|
|
```diff
|
|
{git_diff}
|
|
```
|
|
|
|
## Instructions
|
|
Review the code for AI-specific issues:
|
|
- Assumption validation
|
|
- Plausible but wrong patterns
|
|
- Context fit with existing codebase
|
|
- Scope creep detection
|
|
|
|
Include:
|
|
- [AI_REVIEW:APPROVE] if no AI-specific issues found
|
|
- [AI_REVIEW:REJECT] if issues detected (list specific problems)
|
|
|
|
Output report to the Report Directory above.
|
|
transitions:
|
|
- condition: approved
|
|
next_step: security_review
|
|
- condition: rejected
|
|
next_step: ai_fix
|
|
|
|
- name: ai_fix
|
|
agent: ~/.takt/agents/default/coder.md
|
|
instruction_template: |
|
|
## Workflow Context
|
|
- Iteration: {iteration}/{max_iterations}
|
|
- Step: ai_fix
|
|
|
|
## AI Review Feedback (This is the latest instruction - prioritize this)
|
|
{previous_response}
|
|
|
|
## Original User Request (Initial request from workflow start - for reference)
|
|
{task}
|
|
|
|
## Additional User Inputs
|
|
{user_inputs}
|
|
|
|
## Instructions
|
|
**Important**: Address the AI Reviewer's feedback.
|
|
Focus on:
|
|
- Correcting incorrect assumptions
|
|
- Fixing plausible-but-wrong implementations
|
|
- Aligning with existing codebase patterns
|
|
- Removing scope creep
|
|
|
|
Include [CODER:DONE] when complete.
|
|
Include [CODER:BLOCKED] if you cannot proceed.
|
|
pass_previous_response: true
|
|
transitions:
|
|
- condition: done
|
|
next_step: review
|
|
- condition: blocked
|
|
next_step: plan
|
|
|
|
- name: security_review
|
|
agent: ~/.takt/agents/default/security.md
|
|
instruction_template: |
|
|
## Workflow Context
|
|
- Iteration: {iteration}/{max_iterations}
|
|
- Step: security_review
|
|
- Report Directory: .takt/reports/{report_dir}/
|
|
|
|
## Original User Request (Initial request from workflow start)
|
|
{task}
|
|
|
|
## Git Diff
|
|
```diff
|
|
{git_diff}
|
|
```
|
|
|
|
## Instructions
|
|
Perform security review on the changes. Check for vulnerabilities including:
|
|
- Injection attacks (SQL, Command, XSS)
|
|
- Authentication/Authorization issues
|
|
- Data exposure risks
|
|
- Cryptographic weaknesses
|
|
|
|
Include:
|
|
- [SECURITY:APPROVE] if no security issues found
|
|
- [SECURITY:REJECT] if vulnerabilities detected (list specific issues)
|
|
|
|
Output report to the Report Directory above.
|
|
transitions:
|
|
- condition: approved
|
|
next_step: supervise
|
|
- condition: rejected
|
|
next_step: security_fix
|
|
|
|
- name: security_fix
|
|
agent: ~/.takt/agents/default/coder.md
|
|
instruction_template: |
|
|
## Workflow Context
|
|
- Iteration: {iteration}/{max_iterations}
|
|
- Step: security_fix
|
|
|
|
## Security Review Feedback (This is the latest instruction - prioritize this)
|
|
{previous_response}
|
|
|
|
## Original User Request (Initial request from workflow start - for reference)
|
|
{task}
|
|
|
|
## Additional User Inputs
|
|
{user_inputs}
|
|
|
|
## Instructions
|
|
**Important**: Fix the vulnerabilities identified in the security review.
|
|
Security issues require highest priority.
|
|
|
|
Include [CODER:DONE] when complete.
|
|
Include [CODER:BLOCKED] if you cannot proceed.
|
|
pass_previous_response: true
|
|
transitions:
|
|
- condition: done
|
|
next_step: security_review
|
|
- condition: blocked
|
|
next_step: plan
|
|
|
|
- name: fix
|
|
agent: ~/.takt/agents/default/coder.md
|
|
instruction_template: |
|
|
## Workflow Context
|
|
- Iteration: {iteration}/{max_iterations}
|
|
- Step: fix
|
|
|
|
## Architect Feedback (This is the latest instruction - prioritize this)
|
|
{previous_response}
|
|
|
|
## Original User Request (Initial request from workflow start - for reference)
|
|
{task}
|
|
|
|
## Additional User Inputs
|
|
{user_inputs}
|
|
|
|
## Instructions
|
|
**Important**: Address the Architect's feedback.
|
|
The "Original User Request" is reference information, not the latest instruction.
|
|
Review the session conversation history and fix the issues raised by the Architect.
|
|
|
|
Include [CODER:DONE] when complete.
|
|
Include [CODER:BLOCKED] if you cannot proceed.
|
|
pass_previous_response: true
|
|
transitions:
|
|
- condition: done
|
|
next_step: review
|
|
- condition: blocked
|
|
next_step: plan
|
|
|
|
- name: supervise
|
|
agent: ~/.takt/agents/default/supervisor.md
|
|
instruction_template: |
|
|
## Workflow Context
|
|
- Iteration: {iteration}/{max_iterations}
|
|
- Step: supervise (final verification)
|
|
- Report Directory: .takt/reports/{report_dir}/
|
|
|
|
## Original User Request
|
|
{task}
|
|
|
|
## Git Diff
|
|
```diff
|
|
{git_diff}
|
|
```
|
|
|
|
## Instructions
|
|
Run tests, verify the build, and perform final approval.
|
|
|
|
**Workflow Overall Review:**
|
|
1. Does the implementation match the plan (00-plan.md)?
|
|
2. Were all review step issues addressed?
|
|
3. Was the original task objective achieved?
|
|
|
|
**Review Reports:** Read all reports in Report Directory and
|
|
check for any unaddressed improvement suggestions.
|
|
|
|
Output:
|
|
- [SUPERVISOR:APPROVE] if ready to merge
|
|
- [SUPERVISOR:REJECT] if issues found (specify the issues)
|
|
transitions:
|
|
- condition: approved
|
|
next_step: COMPLETE
|
|
- condition: rejected
|
|
next_step: fix
|