aircana 1.6.0.rc1 → 2.0.0.rc2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/.rspec_status +191 -207
  3. data/CLAUDE.md +0 -7
  4. data/README.md +103 -9
  5. data/lib/aircana/cli/app.rb +0 -29
  6. data/lib/aircana/cli/commands/doctor_checks.rb +0 -12
  7. data/lib/aircana/cli/commands/dump_context.rb +2 -3
  8. data/lib/aircana/cli/commands/generate.rb +8 -6
  9. data/lib/aircana/configuration.rb +1 -2
  10. data/lib/aircana/contexts/confluence.rb +1 -3
  11. data/lib/aircana/contexts/manifest.rb +1 -10
  12. data/lib/aircana/contexts/web.rb +1 -3
  13. data/lib/aircana/generators/agents_generator.rb +1 -5
  14. data/lib/aircana/generators/{relevant_files_command_generator.rb → apply_feedback_command_generator.rb} +3 -13
  15. data/lib/aircana/generators/{write_plan_command_generator.rb → execute_command_generator.rb} +3 -3
  16. data/lib/aircana/generators/record_command_generator.rb +26 -0
  17. data/lib/aircana/generators/review_command_generator.rb +26 -0
  18. data/lib/aircana/generators.rb +0 -2
  19. data/lib/aircana/templates/agents/defaults/apply_feedback.erb +91 -0
  20. data/lib/aircana/templates/agents/defaults/executor.erb +84 -0
  21. data/lib/aircana/templates/agents/defaults/planner.erb +44 -18
  22. data/lib/aircana/templates/agents/defaults/reviewer.erb +94 -0
  23. data/lib/aircana/templates/commands/apply_feedback.erb +17 -0
  24. data/lib/aircana/templates/commands/execute.erb +15 -0
  25. data/lib/aircana/templates/commands/plan.erb +21 -14
  26. data/lib/aircana/templates/commands/review.erb +14 -0
  27. data/lib/aircana/version.rb +1 -1
  28. data/lib/aircana.rb +0 -2
  29. metadata +13 -13
  30. data/lib/aircana/cli/commands/add_directory.rb +0 -148
  31. data/lib/aircana/cli/commands/add_files.rb +0 -26
  32. data/lib/aircana/cli/commands/clear_files.rb +0 -16
  33. data/lib/aircana/cli/commands/files.rb +0 -65
  34. data/lib/aircana/contexts/relevant_files.rb +0 -78
  35. data/lib/aircana/generators/relevant_files_verbose_results_generator.rb +0 -34
  36. data/lib/aircana/templates/commands/add_relevant_files.erb +0 -3
  37. data/lib/aircana/templates/relevant_files_verbose_results.erb +0 -18
  38. /data/lib/aircana/templates/commands/{write_plan.erb → record.erb} +0 -0
data/README.md CHANGED
@@ -13,7 +13,7 @@ Subagent generation for improved context window management.
13
13
 
14
14
  Agent-accessible knowledge bases sourced from Confluence or public websites, backed by manifest files.
15
15
 
16
- Development workflow with plan, record, and execute phases (record and execute phases are in progress).
16
+ Complete development workflow with five phases: plan, record, execute, review, and apply-feedback.
17
17
 
18
18
  SQS integration for features like Slack notifications and messages.
19
19
 
@@ -62,6 +62,108 @@ To start using your agents with domain-specific knowledge, follow the agent work
62
62
 
63
63
  - Explore other tools by running `aircana --help`
64
64
 
65
+ ## Development Workflow
66
+
67
+ Aircana provides a complete development lifecycle through five integrated slash commands:
68
+
69
+ ```mermaid
70
+ stateDiagram-v2
71
+ [*] --> Plan: /air-plan
72
+ Plan --> Record: /air-record
73
+ Record --> Execute: /air-execute
74
+ Execute --> Review: /air-review
75
+ Review --> ApplyFeedback: /air-apply-feedback
76
+ ApplyFeedback --> Review: More issues found
77
+ ApplyFeedback --> [*]: Satisfied
78
+ ```
79
+
80
+ ### Quick Overview
81
+
82
+ 1. **`/air-plan`** - Create strategic implementation plan
83
+ 2. **`/air-record`** - Save plan to Jira ticket
84
+ 3. **`/air-execute`** - Implement plan and create commit
85
+ 4. **`/air-review`** - Adversarial code review with expert feedback
86
+ 5. **`/air-apply-feedback`** - Apply review changes and amend commit
87
+
88
+ ### Command Details
89
+
90
+ #### 1. `/air-plan` - Strategic Planning
91
+
92
+ Creates a high-level implementation plan by:
93
+ - Asking you to specify relevant files and directories
94
+ - Consulting specialized sub-agents for domain expertise
95
+ - Sharing research context to avoid duplicate work
96
+ - Generating a focused strategic plan (what to do, not how)
97
+ - Creating actionable todo checklist
98
+
99
+ The planner focuses on architecture decisions and approach, avoiding exhaustive code implementations.
100
+
101
+ #### 2. `/air-record` - Save to Jira
102
+
103
+ Records your approved plan to a Jira ticket by:
104
+ - Taking the ticket key/ID as input
105
+ - Delegating to the `jira` sub-agent for MCP operations
106
+ - Storing the plan in the ticket description or comments
107
+
108
+ This creates a traceable link between planning and execution.
109
+
110
+ #### 3. `/air-execute` - Implementation
111
+
112
+ Executes the strategic plan by:
113
+ - Reading the plan from the Jira ticket
114
+ - Creating detailed implementation todo list
115
+ - Presenting plan for your approval
116
+ - Implementing changes sequentially
117
+ - Writing unit tests (delegates to test-writing sub-agent if available)
118
+ - Running tests to verify implementation
119
+ - Creating git commit (delegates to git-ops sub-agent if available)
120
+
121
+ After commit creation, suggests running `/air-review`.
122
+
123
+ #### 4. `/air-review` - Adversarial Review
124
+
125
+ Conducts comprehensive code review of HEAD commit by:
126
+ - Analyzing changed files to identify technical domains
127
+ - Using sub-agent-coordinator to select relevant expert agents
128
+ - Presenting changes to experts in parallel
129
+ - Synthesizing feedback organized by severity (Critical/Important/Suggestions)
130
+ - Storing review output for next step
131
+
132
+ Explicitly states "Reviewing: <commit message>" and ends with "Run /air-apply-feedback".
133
+
134
+ #### 5. `/air-apply-feedback` - Apply Changes
135
+
136
+ Applies code review feedback by:
137
+ - Reading review output from conversation context
138
+ - Creating prioritized change plan (critical issues first)
139
+ - Presenting plan for your approval
140
+ - Applying approved changes
141
+ - Re-running unit tests
142
+ - Fixing any test failures
143
+ - **Amending HEAD commit** with improvements using `git commit --amend --no-edit`
144
+
145
+ This preserves the original commit message while incorporating review improvements in a single commit.
146
+
147
+ ### Usage Example
148
+
149
+ ```bash
150
+ # 1. Start planning
151
+ /air-plan
152
+ > Specify relevant files: src/api/, spec/api/
153
+
154
+ # 2. Save plan to ticket
155
+ /air-record PROJ-123
156
+
157
+ # 3. Execute implementation
158
+ /air-execute PROJ-123
159
+
160
+ # 4. Review the commit
161
+ /air-review
162
+
163
+ # 5. Apply feedback
164
+ /air-apply-feedback
165
+ ```
166
+
65
167
  ## Key Concepts
66
168
 
67
169
  ### Subagents
@@ -275,14 +377,6 @@ This refreshes both Confluence pages and web URLs associated with the agent.
275
377
 
276
378
  ## All Commands
277
379
 
278
- ### File Management
279
- ```bash
280
- aircana files add # Interactively select files to add to context
281
- aircana files add-dir [PATH] # Add all files from directory to context
282
- aircana files clear # Clear current file context
283
- aircana files list # Show current relevant files
284
- ```
285
-
286
380
  ### Agent Management
287
381
  ```bash
288
382
  aircana agents create # Create new agent interactively
@@ -2,9 +2,6 @@
2
2
 
3
3
  require "thor"
4
4
 
5
- require_relative "commands/add_files"
6
- require_relative "commands/add_directory"
7
- require_relative "commands/clear_files"
8
5
  require_relative "commands/doctor"
9
6
  require_relative "commands/dump_context"
10
7
  require_relative "commands/generate"
@@ -15,7 +12,6 @@ require_relative "help_formatter"
15
12
  require_relative "commands/agents"
16
13
  require_relative "commands/hooks"
17
14
  require_relative "commands/project"
18
- require_relative "commands/files"
19
15
 
20
16
  module Aircana
21
17
  module CLI
@@ -49,28 +45,6 @@ module Aircana
49
45
  Install.run
50
46
  end
51
47
 
52
- class FilesSubcommand < Subcommand
53
- desc "add", "Interactively add files to current context"
54
- def add
55
- Files.add
56
- end
57
-
58
- desc "add-dir [DIRECTORY_PATH]", "Add all files from directory to context"
59
- def add_dir(directory_path)
60
- Files.add_dir(directory_path)
61
- end
62
-
63
- desc "clear", "Remove all files from current context"
64
- def clear
65
- Files.clear
66
- end
67
-
68
- desc "list", "Show current relevant files"
69
- def list
70
- Files.list
71
- end
72
- end
73
-
74
48
  class AgentsSubcommand < Subcommand
75
49
  desc "create", "Create a new agent"
76
50
  def create
@@ -152,9 +126,6 @@ module Aircana
152
126
  end
153
127
  end
154
128
 
155
- desc "files", "Manage relevant files for context"
156
- subcommand "files", FilesSubcommand
157
-
158
129
  desc "agents", "Create and manage agents and their knowledgebases"
159
130
  subcommand "agents", AgentsSubcommand
160
131
 
@@ -59,7 +59,6 @@ module Aircana
59
59
  check_directory("~/.aircana", "Global Aircana directory")
60
60
  check_directory(".aircana", "Project Aircana directory")
61
61
  check_agents_status
62
- check_relevant_files_status
63
62
  end
64
63
 
65
64
  def check_agents_status
@@ -74,17 +73,6 @@ module Aircana
74
73
  log_remedy("Create agents with: aircana agents create")
75
74
  end
76
75
  end
77
-
78
- def check_relevant_files_status
79
- relevant_files_dir = File.join(Dir.pwd, ".aircana", "relevant_files")
80
- if Dir.exist?(relevant_files_dir) && !Dir.empty?(relevant_files_dir)
81
- file_count = Dir.glob(File.join(relevant_files_dir, "*")).size
82
- log_success("relevant_files", "#{file_count} file(s) in context")
83
- else
84
- log_info("relevant_files", "No relevant files added yet")
85
- log_remedy("Add files with: aircana add-files")
86
- end
87
- end
88
76
  end
89
77
 
90
78
  module OptionalIntegrations
@@ -1,15 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "../shell_command"
4
- require_relative "../../contexts/relevant_files"
5
4
 
6
5
  module Aircana
7
6
  module CLI
8
7
  module DumpContext
9
8
  class << self
10
- def run(_agent_name:, verbose: true)
9
+ def run(_agent_name:, _verbose: true)
11
10
  Aircana.logger.level = Logger::ERROR
12
- Contexts::RelevantFiles.print(verbose:)
11
+ Aircana.human_logger.info("Context dumping functionality has been removed.")
13
12
  end
14
13
 
15
14
  private
@@ -1,9 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../../generators/relevant_files_command_generator"
4
- require_relative "../../generators/relevant_files_verbose_results_generator"
5
3
  require_relative "../../generators/plan_command_generator"
6
- require_relative "../../generators/write_plan_command_generator"
4
+ require_relative "../../generators/record_command_generator"
5
+ require_relative "../../generators/execute_command_generator"
6
+ require_relative "../../generators/review_command_generator"
7
+ require_relative "../../generators/apply_feedback_command_generator"
7
8
  require_relative "../../generators/ask_expert_command_generator"
8
9
  require_relative "../../generators/agents_generator"
9
10
  require_relative "../../generators/hooks_generator"
@@ -15,10 +16,11 @@ module Aircana
15
16
  class << self
16
17
  def generators
17
18
  @generators ||= [
18
- Aircana::Generators::RelevantFilesVerboseResultsGenerator.new,
19
- Aircana::Generators::RelevantFilesCommandGenerator.new,
20
19
  Aircana::Generators::PlanCommandGenerator.new,
21
- Aircana::Generators::WritePlanCommandGenerator.new,
20
+ Aircana::Generators::RecordCommandGenerator.new,
21
+ Aircana::Generators::ExecuteCommandGenerator.new,
22
+ Aircana::Generators::ReviewCommandGenerator.new,
23
+ Aircana::Generators::ApplyFeedbackCommandGenerator.new,
22
24
  Aircana::Generators::AskExpertCommandGenerator.new
23
25
  ]
24
26
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Aircana
4
4
  class Configuration
5
- attr_accessor :global_dir, :project_dir, :relevant_project_files_dir, :stream, :output_dir,
5
+ attr_accessor :global_dir, :project_dir, :stream, :output_dir,
6
6
  :claude_code_config_path, :claude_code_project_config_path, :agent_knowledge_dir,
7
7
  :hooks_dir, :confluence_base_url, :confluence_username, :confluence_api_token
8
8
 
@@ -18,7 +18,6 @@ module Aircana
18
18
  def setup_directory_paths
19
19
  @global_dir = File.join(Dir.home, ".aircana")
20
20
  @project_dir = Dir.pwd
21
- @relevant_project_files_dir = File.join(@project_dir, ".aircana", "relevant_files")
22
21
  @output_dir = File.join(@global_dir, "aircana.out")
23
22
  @agent_knowledge_dir = File.join(@project_dir, ".aircana", "agents")
24
23
  @hooks_dir = File.join(@project_dir, ".aircana", "hooks")
@@ -98,9 +98,7 @@ module Aircana
98
98
 
99
99
  def extract_page_metadata(page)
100
100
  {
101
- "id" => page["id"],
102
- "title" => page["title"],
103
- "last_updated" => page.dig("version", "when") || Time.now.utc.strftime("%Y-%m-%dT%H:%M:%SZ")
101
+ "id" => page["id"]
104
102
  }
105
103
  end
106
104
 
@@ -27,10 +27,7 @@ module Aircana
27
27
 
28
28
  if File.exist?(manifest_path)
29
29
  existing_data = JSON.parse(File.read(manifest_path))
30
- manifest_data = existing_data.merge({
31
- "last_updated" => Time.now.utc.strftime("%Y-%m-%dT%H:%M:%SZ"),
32
- "sources" => sources
33
- })
30
+ manifest_data = existing_data.merge({ "sources" => sources })
34
31
  else
35
32
  manifest_data = build_manifest_data(agent, sources)
36
33
  end
@@ -87,13 +84,9 @@ module Aircana
87
84
  end
88
85
 
89
86
  def build_manifest_data(agent, sources)
90
- timestamp = Time.now.utc.strftime("%Y-%m-%dT%H:%M:%SZ")
91
-
92
87
  {
93
88
  "version" => "1.0",
94
89
  "agent" => agent,
95
- "created" => timestamp,
96
- "last_updated" => timestamp,
97
90
  "sources" => sources
98
91
  }
99
92
  end
@@ -157,8 +150,6 @@ module Aircana
157
150
  raise ManifestError, "Each URL entry must be a hash" unless url_entry.is_a?(Hash)
158
151
 
159
152
  raise ManifestError, "URL entry missing required field: url" unless url_entry.key?("url")
160
-
161
- raise ManifestError, "URL entry missing required field: title" unless url_entry.key?("title")
162
153
  end
163
154
  end
164
155
  end
@@ -210,9 +210,7 @@ module Aircana
210
210
 
211
211
  def build_url_metadata(page_data)
212
212
  {
213
- "url" => page_data[:url],
214
- "title" => page_data[:title],
215
- "last_fetched" => page_data[:last_fetched]
213
+ "url" => page_data[:url]
216
214
  }
217
215
  end
218
216
 
@@ -44,7 +44,7 @@ module Aircana
44
44
 
45
45
  def locals
46
46
  super.merge({
47
- relevant_project_files_path:, agent_name:, short_description:, description:,
47
+ agent_name:, short_description:, description:,
48
48
  model:, color:, knowledge_path:
49
49
  })
50
50
  end
@@ -63,10 +63,6 @@ module Aircana
63
63
  File.join(Aircana.configuration.claude_code_project_config_path, "agents", "#{agent_name}.md")
64
64
  end
65
65
 
66
- def relevant_project_files_path
67
- File.join(Aircana.configuration.relevant_project_files_dir, "relevant_files.md")
68
- end
69
-
70
66
  def knowledge_path
71
67
  ".aircana/agents/#{agent_name}/knowledge/"
72
68
  end
@@ -4,7 +4,7 @@ require_relative "../generators"
4
4
 
5
5
  module Aircana
6
6
  module Generators
7
- class RelevantFilesCommandGenerator < BaseGenerator
7
+ class ApplyFeedbackCommandGenerator < BaseGenerator
8
8
  def initialize(file_in: nil, file_out: nil)
9
9
  super(
10
10
  file_in: file_in || default_template_path,
@@ -12,24 +12,14 @@ module Aircana
12
12
  )
13
13
  end
14
14
 
15
- protected
16
-
17
- def locals
18
- super.merge({ relevant_project_files_path: })
19
- end
20
-
21
15
  private
22
16
 
23
17
  def default_template_path
24
- File.join(File.dirname(__FILE__), "..", "templates", "commands", "add_relevant_files.erb")
18
+ File.join(File.dirname(__FILE__), "..", "templates", "commands", "apply_feedback.erb")
25
19
  end
26
20
 
27
21
  def default_output_path
28
- File.join(Aircana.configuration.output_dir, "commands", "air-add-relevant-files.md")
29
- end
30
-
31
- def relevant_project_files_path
32
- File.join(Aircana.configuration.relevant_project_files_dir, "relevant_files.md")
22
+ File.join(Aircana.configuration.output_dir, "commands", "air-apply-feedback.md")
33
23
  end
34
24
  end
35
25
  end
@@ -4,7 +4,7 @@ require_relative "../generators"
4
4
 
5
5
  module Aircana
6
6
  module Generators
7
- class WritePlanCommandGenerator < BaseGenerator
7
+ class ExecuteCommandGenerator < BaseGenerator
8
8
  def initialize(file_in: nil, file_out: nil)
9
9
  super(
10
10
  file_in: file_in || default_template_path,
@@ -15,11 +15,11 @@ module Aircana
15
15
  private
16
16
 
17
17
  def default_template_path
18
- File.join(File.dirname(__FILE__), "..", "templates", "commands", "write_plan.erb")
18
+ File.join(File.dirname(__FILE__), "..", "templates", "commands", "execute.erb")
19
19
  end
20
20
 
21
21
  def default_output_path
22
- File.join(Aircana.configuration.output_dir, "commands", "air-write-plan.md")
22
+ File.join(Aircana.configuration.output_dir, "commands", "air-execute.md")
23
23
  end
24
24
  end
25
25
  end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../generators"
4
+
5
+ module Aircana
6
+ module Generators
7
+ class RecordCommandGenerator < BaseGenerator
8
+ def initialize(file_in: nil, file_out: nil)
9
+ super(
10
+ file_in: file_in || default_template_path,
11
+ file_out: file_out || default_output_path
12
+ )
13
+ end
14
+
15
+ private
16
+
17
+ def default_template_path
18
+ File.join(File.dirname(__FILE__), "..", "templates", "commands", "record.erb")
19
+ end
20
+
21
+ def default_output_path
22
+ File.join(Aircana.configuration.output_dir, "commands", "air-record.md")
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../generators"
4
+
5
+ module Aircana
6
+ module Generators
7
+ class ReviewCommandGenerator < BaseGenerator
8
+ def initialize(file_in: nil, file_out: nil)
9
+ super(
10
+ file_in: file_in || default_template_path,
11
+ file_out: file_out || default_output_path
12
+ )
13
+ end
14
+
15
+ private
16
+
17
+ def default_template_path
18
+ File.join(File.dirname(__FILE__), "..", "templates", "commands", "review.erb")
19
+ end
20
+
21
+ def default_output_path
22
+ File.join(Aircana.configuration.output_dir, "commands", "air-review.md")
23
+ end
24
+ end
25
+ end
26
+ end
@@ -1,8 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "generators/base_generator"
4
- require_relative "generators/relevant_files_command_generator"
5
- require_relative "generators/relevant_files_verbose_results_generator"
6
4
 
7
5
  module Aircana
8
6
  module Generators
@@ -0,0 +1,91 @@
1
+ ---
2
+ name: apply-feedback
3
+ description: Applies code review feedback by making recommended changes and amending the HEAD commit
4
+ model: inherit
5
+ color: cyan
6
+ ---
7
+
8
+ <%= helpers.model_instructions("You are a Code Review Feedback Application Agent that implements recommended changes from code reviews and amends the HEAD commit.
9
+
10
+ MANDATORY WORKFLOW:
11
+
12
+ STEP 1: CREATE TODO LIST FILE
13
+ First, create a todo list file with the following tasks enumerated in order:
14
+
15
+ 1. Parse review feedback from conversation context
16
+ 2. Create prioritized todo list of changes (critical first, then important, then suggestions)
17
+ 3. Present change plan to user for approval
18
+ 4. Apply approved changes using appropriate tools
19
+ 5. Re-run unit tests to verify changes
20
+ 6. Fix any test failures
21
+ 7. Amend HEAD commit with improvements
22
+ 8. Summarize changes made
23
+
24
+ STEP 2: EXECUTE EACH TASK IN ORDER
25
+ Work through each task in the todo list sequentially:
26
+ - Mark each task as 'in_progress' when you start it
27
+ - Mark each task as 'completed' when finished
28
+ - Continue until all tasks are done
29
+
30
+ TASK DETAILS:
31
+
32
+ 1. PARSE FEEDBACK: Extract review feedback from conversation:
33
+ - Look for review output from previous /air-review command
34
+ - Parse feedback organized by severity (Critical / Important / Suggestions)
35
+ - Extract actionable items with file, line, issue, and recommendation
36
+ - If no review feedback found in context, inform user and exit
37
+
38
+ 2. CHANGE PLANNING: Create prioritized implementation plan:
39
+ - List all critical issues to fix (must be addressed)
40
+ - List all important improvements (should be addressed)
41
+ - List suggestions (optional, ask user if they want these)
42
+ - Organize by file for efficient editing
43
+ - Enter Claude Code planning mode for this step
44
+ - Create clear, actionable todo items
45
+
46
+ 3. USER APPROVAL: Present plan and get confirmation:
47
+ - Show organized list of changes to be made
48
+ - Ask if user wants to include suggestions or just critical/important
49
+ - Explicitly ask for approval before proceeding
50
+ - Wait for user confirmation
51
+
52
+ 4. APPLY CHANGES: Implement approved feedback:
53
+ - Use appropriate tools (Read, Edit, Write, Bash)
54
+ - Work through changes file by file
55
+ - Mark each change as completed after applying
56
+ - Preserve existing code style and patterns
57
+ - Make targeted changes without unnecessary refactoring
58
+
59
+ 5. TEST EXECUTION: Verify changes don't break tests:
60
+ - Run project's test command (e.g., bundle exec rspec, npm test, etc.)
61
+ - Check if all tests pass
62
+ - If tests pass, proceed to commit
63
+
64
+ 6. FIX TEST FAILURES: Address any failing tests:
65
+ - If tests fail, analyze failures
66
+ - Fix implementation issues causing failures
67
+ - Re-run tests until all pass
68
+ - Do not proceed to commit until tests pass
69
+
70
+ 7. AMEND COMMIT: Update HEAD commit with improvements:
71
+ - Run: git add -A to stage all changes
72
+ - Run: git commit --amend --no-edit to amend HEAD commit
73
+ - This preserves original commit message while incorporating improvements
74
+ - Verify commit was successfully amended
75
+
76
+ 8. SUMMARY: Report what was done:
77
+ - List all changes applied by category (critical/important/suggestions)
78
+ - Note any feedback items not addressed and why
79
+ - Confirm HEAD commit was amended with improvements
80
+ - Mention that commit now includes both implementation and review improvements
81
+
82
+ IMPORTANT INSTRUCTIONS:
83
+ - ALWAYS start by creating the todo list file before doing any other work
84
+ - Execute tasks in the exact order specified in the todo list
85
+ - Prioritize critical issues - must be fixed
86
+ - Get user approval before making changes
87
+ - Ensure tests pass before amending commit
88
+ - Use 'git commit --amend --no-edit' to preserve original commit message
89
+ - Focus on implementing review feedback, not redesigning code", important: true) %>
90
+
91
+ Always check your knowledge base first for code improvement and refactoring best practices.
@@ -0,0 +1,84 @@
1
+ ---
2
+ name: executor
3
+ description: Implementation execution agent that reads plans from Jira and executes them with user approval
4
+ model: inherit
5
+ color: green
6
+ ---
7
+
8
+ <%= helpers.model_instructions("You are an Implementation Execution Agent that reads strategic implementation plans from Jira tickets and executes them with user approval.
9
+
10
+ MANDATORY WORKFLOW:
11
+
12
+ STEP 1: CREATE TODO LIST FILE
13
+ First, create a todo list file with the following tasks enumerated in order:
14
+
15
+ 1. Use Task tool with subagent_type 'jira' to read the implementation plan from the specified Jira ticket
16
+ 2. Review and validate plan structure (should contain frontmatter and todo checklist)
17
+ 3. Enter Claude Code planning mode to create detailed execution todo list from strategic plan
18
+ 4. Present execution plan to user for approval
19
+ 5. Execute approved implementation tasks sequentially
20
+ 6. Write unit tests (delegate to test-writing sub-agent if available)
21
+ 7. Run unit tests to verify implementation
22
+ 8. Create git commit (delegate to git-ops sub-agent if available)
23
+
24
+ STEP 2: EXECUTE EACH TASK IN ORDER
25
+ Work through each task in the todo list sequentially:
26
+ - Mark each task as 'in_progress' when you start it
27
+ - Mark each task as 'completed' when finished
28
+ - Continue until all tasks are done
29
+
30
+ TASK DETAILS:
31
+
32
+ 1. JIRA INTEGRATION: Always delegate Jira operations to the 'jira' sub-agent using Task tool with subagent_type 'jira'. Request the full implementation plan content including:
33
+ - Plan frontmatter (consulted sub-agents, relevant files)
34
+ - Strategic implementation steps (todo checklist format)
35
+ - Any architectural decisions or trade-offs documented
36
+
37
+ 2. PLAN VALIDATION: Verify the plan contains:
38
+ - Proper markdown frontmatter with metadata
39
+ - Implementation steps in todo checklist format using `[ ]`
40
+ - Clear actionable items
41
+ - If plan is missing or malformed, inform user and exit
42
+
43
+ 3. EXECUTION PLANNING: Transform strategic plan into detailed execution todos:
44
+ - Break down high-level plan steps into specific implementation tasks
45
+ - Add file paths and line numbers where relevant
46
+ - Include testing and verification steps
47
+ - Sequence tasks logically with dependencies
48
+ - Enter Claude Code planning mode for this step
49
+
50
+ 4. USER APPROVAL: Present the detailed execution plan and explicitly ask for user approval before proceeding. Wait for confirmation.
51
+
52
+ 5. IMPLEMENTATION EXECUTION: Once approved, work through execution todos:
53
+ - Use appropriate tools (Read, Write, Edit, Bash, etc.)
54
+ - Mark each execution task as completed after finishing
55
+ - Create commits at logical checkpoints
56
+ - Focus on implementing the WHAT defined in the strategic plan
57
+
58
+ 6. TEST WRITING: Write unit tests for the implementation:
59
+ - Check if a test-writing sub-agent exists (look for agents with 'test' in name/description)
60
+ - If found, delegate test writing to that sub-agent using Task tool
61
+ - Provide implementation context: files changed, new functionality added, edge cases to cover
62
+ - If no test sub-agent exists, write tests directly following project conventions
63
+
64
+ 7. TEST EXECUTION: Run unit tests to verify implementation:
65
+ - Use project's test command (e.g., bundle exec rspec, npm test, etc.)
66
+ - Fix any failing tests
67
+ - Ensure all tests pass before marking work complete
68
+
69
+ 8. GIT COMMIT: Create a git commit for the implementation:
70
+ - Check if a git-ops sub-agent exists (look for agents with 'git' in name/description)
71
+ - If found, delegate commit creation to that sub-agent using Task tool
72
+ - Provide context: Jira ticket key, summary of changes, files modified
73
+ - If no git-ops agent exists, create commit directly using Bash tool
74
+ - Commit message should reference Jira ticket and describe implementation
75
+ - After successful commit, suggest user runs '/air-review' command to review changes
76
+
77
+ IMPORTANT INSTRUCTIONS:
78
+ - ALWAYS start by creating the todo list file before doing any other work
79
+ - Execute tasks in the exact order specified in the todo list
80
+ - The strategic plan tells you WHAT to do, you determine HOW to do it
81
+ - Focus on implementation, not redesign - follow the plan's architecture decisions
82
+ - Get user approval before executing implementation tasks", important: true) %>
83
+
84
+ Always check your knowledge base first for execution-specific guidance and best practices.