aircana 3.0.0 → 3.2.0

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.
@@ -7,31 +7,36 @@ module Aircana
7
7
  module Contexts
8
8
  class Manifest
9
9
  class << self
10
- def create_manifest(agent, sources)
10
+ def create_manifest(agent, sources, kb_type: "remote")
11
11
  validate_sources(sources)
12
+ validate_kb_type(kb_type)
12
13
 
13
14
  manifest_path = manifest_path_for(agent)
14
- manifest_data = build_manifest_data(agent, sources)
15
+ manifest_data = build_manifest_data(agent, sources, kb_type)
15
16
 
16
17
  FileUtils.mkdir_p(File.dirname(manifest_path))
17
18
  File.write(manifest_path, JSON.pretty_generate(manifest_data))
18
19
 
19
- Aircana.human_logger.info "Created knowledge manifest for agent '#{agent}'"
20
+ Aircana.human_logger.info "Created knowledge manifest for agent '#{agent}' (kb_type: #{kb_type})"
20
21
  manifest_path
21
22
  end
22
23
 
23
- def update_manifest(agent, sources)
24
+ def update_manifest(agent, sources, kb_type: nil)
24
25
  validate_sources(sources)
25
26
 
26
27
  manifest_path = manifest_path_for(agent)
27
28
 
28
29
  if File.exist?(manifest_path)
29
30
  existing_data = JSON.parse(File.read(manifest_path))
30
- manifest_data = existing_data.merge({ "sources" => sources })
31
+ # Preserve existing kb_type unless explicitly provided
32
+ kb_type_to_use = kb_type || existing_data["kb_type"] || "remote"
33
+ manifest_data = existing_data.merge({ "sources" => sources, "kb_type" => kb_type_to_use })
31
34
  else
32
- manifest_data = build_manifest_data(agent, sources)
35
+ kb_type_to_use = kb_type || "remote"
36
+ manifest_data = build_manifest_data(agent, sources, kb_type_to_use)
33
37
  end
34
38
 
39
+ validate_kb_type(manifest_data["kb_type"])
35
40
  FileUtils.mkdir_p(File.dirname(manifest_path))
36
41
  File.write(manifest_path, JSON.pretty_generate(manifest_data))
37
42
  manifest_path
@@ -61,6 +66,13 @@ module Aircana
61
66
  manifest["sources"] || []
62
67
  end
63
68
 
69
+ def kb_type_from_manifest(agent)
70
+ manifest = read_manifest(agent)
71
+ return "remote" unless manifest
72
+
73
+ manifest["kb_type"] || "remote"
74
+ end
75
+
64
76
  def manifest_exists?(agent)
65
77
  File.exist?(manifest_path_for(agent))
66
78
  end
@@ -76,10 +88,11 @@ module Aircana
76
88
  File.join(Aircana.configuration.agent_knowledge_dir, agent)
77
89
  end
78
90
 
79
- def build_manifest_data(agent, sources)
91
+ def build_manifest_data(agent, sources, kb_type = "remote")
80
92
  {
81
93
  "version" => "1.0",
82
94
  "agent" => agent,
95
+ "kb_type" => kb_type,
83
96
  "sources" => sources
84
97
  }
85
98
  end
@@ -95,6 +108,10 @@ module Aircana
95
108
  raise ManifestError, "Unsupported manifest version: #{manifest_data["version"]}"
96
109
  end
97
110
 
111
+ # kb_type is optional for backward compatibility, defaults to "remote"
112
+ kb_type = manifest_data["kb_type"] || "remote"
113
+ validate_kb_type(kb_type)
114
+
98
115
  validate_sources(manifest_data["sources"])
99
116
  end
100
117
 
@@ -144,6 +161,13 @@ module Aircana
144
161
 
145
162
  raise ManifestError, "URL entry missing required field: url" unless url_entry.key?("url")
146
163
  end
164
+
165
+ def validate_kb_type(kb_type)
166
+ valid_types = %w[remote local]
167
+ return if valid_types.include?(kb_type)
168
+
169
+ raise ManifestError, "Invalid kb_type: #{kb_type}. Must be one of: #{valid_types.join(", ")}"
170
+ end
147
171
  end
148
172
  end
149
173
 
@@ -22,11 +22,11 @@ module Aircana
22
22
  @local_storage = Local.new
23
23
  end
24
24
 
25
- def fetch_url_for(agent:, url:)
25
+ def fetch_url_for(agent:, url:, kb_type: "remote")
26
26
  validate_url!(url)
27
27
 
28
28
  page_data = fetch_and_process_url(url)
29
- store_page_as_markdown(page_data, agent)
29
+ store_page_as_markdown(page_data, agent, kb_type)
30
30
 
31
31
  build_url_metadata(page_data)
32
32
  rescue StandardError => e
@@ -34,14 +34,14 @@ module Aircana
34
34
  nil
35
35
  end
36
36
 
37
- def fetch_urls_for(agent:, urls:) # rubocop:disable Metrics/MethodLength
37
+ def fetch_urls_for(agent:, urls:, kb_type: "remote") # rubocop:disable Metrics/MethodLength
38
38
  return { pages_count: 0, sources: [] } if urls.empty?
39
39
 
40
40
  pages_metadata = []
41
41
  successful_urls = []
42
42
 
43
43
  ProgressTracker.with_batch_progress(urls, "Fetching URLs") do |url, _index|
44
- metadata = fetch_url_for(agent: agent, url: url)
44
+ metadata = fetch_url_for(agent: agent, url: url, kb_type: kb_type)
45
45
  if metadata
46
46
  pages_metadata << metadata
47
47
  successful_urls << url
@@ -50,7 +50,7 @@ module Aircana
50
50
 
51
51
  if successful_urls.any?
52
52
  sources = build_sources_metadata(successful_urls, pages_metadata)
53
- update_or_create_manifest(agent, sources)
53
+ update_or_create_manifest(agent, sources, kb_type)
54
54
  { pages_count: successful_urls.size, sources: sources }
55
55
  else
56
56
  { pages_count: 0, sources: [] }
@@ -59,6 +59,7 @@ module Aircana
59
59
 
60
60
  def refresh_web_sources(agent:) # rubocop:disable Metrics/CyclomaticComplexity
61
61
  sources = Manifest.sources_from_manifest(agent)
62
+ kb_type = Manifest.kb_type_from_manifest(agent)
62
63
  web_sources = sources.select { |s| s["type"] == "web" }
63
64
 
64
65
  return { pages_count: 0, sources: [] } if web_sources.empty?
@@ -66,7 +67,7 @@ module Aircana
66
67
  all_urls = web_sources.flat_map { |source| source["urls"]&.map { |u| u["url"] } || [] }
67
68
  return { pages_count: 0, sources: [] } if all_urls.empty?
68
69
 
69
- fetch_urls_for(agent: agent, urls: all_urls)
70
+ fetch_urls_for(agent: agent, urls: all_urls, kb_type: kb_type)
70
71
  end
71
72
 
72
73
  private
@@ -200,11 +201,12 @@ module Aircana
200
201
  extract_text_content(html)
201
202
  end
202
203
 
203
- def store_page_as_markdown(page_data, agent)
204
+ def store_page_as_markdown(page_data, agent, kb_type = "remote")
204
205
  @local_storage.store_content(
205
206
  title: page_data[:title],
206
207
  content: page_data[:content],
207
- agent: agent
208
+ agent: agent,
209
+ kb_type: kb_type
208
210
  )
209
211
  end
210
212
 
@@ -223,7 +225,7 @@ module Aircana
223
225
  ]
224
226
  end
225
227
 
226
- def update_or_create_manifest(agent, new_sources)
228
+ def update_or_create_manifest(agent, new_sources, kb_type = "remote")
227
229
  existing_sources = Manifest.sources_from_manifest(agent)
228
230
 
229
231
  # Remove existing web sources and add new ones
@@ -231,9 +233,9 @@ module Aircana
231
233
  all_sources = other_sources + new_sources
232
234
 
233
235
  if Manifest.manifest_exists?(agent)
234
- Manifest.update_manifest(agent, all_sources)
236
+ Manifest.update_manifest(agent, all_sources, kb_type: kb_type)
235
237
  else
236
- Manifest.create_manifest(agent, all_sources)
238
+ Manifest.create_manifest(agent, all_sources, kb_type: kb_type)
237
239
  end
238
240
  end
239
241
 
@@ -5,7 +5,7 @@ require_relative "../generators"
5
5
  module Aircana
6
6
  module Generators
7
7
  class AgentsGenerator < BaseGenerator
8
- attr_reader :agent_name, :short_description, :description, :model, :color, :default_agent
8
+ attr_reader :agent_name, :short_description, :description, :model, :color, :default_agent, :kb_type
9
9
 
10
10
  AVAILABLE_DEFAULT_AGENTS = %w[planner jira sub-agent-coordinator executor reviewer apply_feedback].freeze
11
11
 
@@ -25,7 +25,7 @@ module Aircana
25
25
 
26
26
  def initialize( # rubocop:disable Metrics/ParameterLists
27
27
  agent_name:, short_description: nil, description: nil, model: nil, color: nil,
28
- file_in: nil, file_out: nil, default_agent: false
28
+ file_in: nil, file_out: nil, default_agent: false, kb_type: "remote"
29
29
  )
30
30
  @agent_name = agent_name
31
31
  @short_description = short_description
@@ -33,6 +33,7 @@ module Aircana
33
33
  @model = model
34
34
  @color = color
35
35
  @default_agent = default_agent
36
+ @kb_type = kb_type
36
37
 
37
38
  super(
38
39
  file_in: file_in || default_template_path,
@@ -68,7 +69,9 @@ module Aircana
68
69
  end
69
70
 
70
71
  def knowledge_path
71
- # Use global agents directory with plugin prefix
72
+ # Both local and remote agents use the same runtime path in ~/.claude/agents/
73
+ # Local agents: Synced from version control (agents/<name>/knowledge/) via SessionStart hook
74
+ # Remote agents: Fetched from Confluence/web via 'aircana agents refresh'
72
75
  "~/.claude/agents/#{plugin_prefix}-#{agent_name}/knowledge/"
73
76
  end
74
77
  end
@@ -0,0 +1,86 @@
1
+ #!/bin/bash
2
+ # Sync local agent knowledge bases to ~/.claude on session start
3
+ # Compatible with macOS and Linux
4
+
5
+ set -e
6
+
7
+ # Create log directory
8
+ mkdir -p ~/.aircana
9
+ LOG_FILE="$HOME/.aircana/hooks.log"
10
+
11
+ # Get plugin root from environment
12
+ PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT}"
13
+
14
+ if [ -z "$PLUGIN_ROOT" ]; then
15
+ echo "$(date): Warning - CLAUDE_PLUGIN_ROOT not set, skipping knowledge sync" >> "$LOG_FILE"
16
+ echo "{}"
17
+ exit 0
18
+ fi
19
+
20
+ # Source: version-controlled local knowledge in plugin
21
+ # Target: ~/.claude/agents/<plugin-name>-<agent-name>/knowledge/
22
+ LOCAL_AGENTS_DIR="${PLUGIN_ROOT}/agents"
23
+ CLAUDE_AGENTS_DIR="$HOME/.claude/agents"
24
+
25
+ # Only proceed if agents directory exists
26
+ if [ ! -d "$LOCAL_AGENTS_DIR" ]; then
27
+ echo "{}"
28
+ exit 0
29
+ fi
30
+
31
+ # Read plugin name from plugin.json
32
+ PLUGIN_NAME=$(grep -o '"name"[[:space:]]*:[[:space:]]*"[^"]*"' "${PLUGIN_ROOT}/.claude-plugin/plugin.json" | head -1 | sed 's/.*: *"\([^"]*\)".*/\1/')
33
+
34
+ if [ -z "$PLUGIN_NAME" ]; then
35
+ echo "$(date): Warning - Could not read plugin name" >> "$LOG_FILE"
36
+ echo "{}"
37
+ exit 0
38
+ fi
39
+
40
+ SYNCED_COUNT=0
41
+
42
+ # Iterate through each agent directory
43
+ for agent_dir in "$LOCAL_AGENTS_DIR"/*; do
44
+ if [ ! -d "$agent_dir" ]; then
45
+ continue
46
+ fi
47
+
48
+ agent_name=$(basename "$agent_dir")
49
+ manifest_file="${agent_dir}/manifest.json"
50
+
51
+ # Check if manifest exists and has kb_type: local
52
+ if [ -f "$manifest_file" ]; then
53
+ kb_type=$(grep -o '"kb_type"[[:space:]]*:[[:space:]]*"[^"]*"' "$manifest_file" | sed 's/.*: *"\([^"]*\)".*/\1/')
54
+
55
+ if [ "$kb_type" = "local" ]; then
56
+ # Source: version-controlled knowledge in plugin
57
+ source_knowledge="${agent_dir}/knowledge"
58
+
59
+ # Target: ~/.claude/agents/<plugin-name>-<agent-name>/knowledge/
60
+ target_knowledge="${CLAUDE_AGENTS_DIR}/${PLUGIN_NAME}-${agent_name}/knowledge"
61
+
62
+ if [ -d "$source_knowledge" ]; then
63
+ # Create target directory
64
+ mkdir -p "$target_knowledge"
65
+
66
+ # Sync knowledge files (rsync if available, fallback to cp)
67
+ if command -v rsync &> /dev/null; then
68
+ rsync -a --delete "$source_knowledge/" "$target_knowledge/"
69
+ else
70
+ # Fallback: remove old files and copy new ones
71
+ rm -rf "$target_knowledge"/*
72
+ cp -R "$source_knowledge"/* "$target_knowledge/" 2>/dev/null || true
73
+ fi
74
+
75
+ SYNCED_COUNT=$((SYNCED_COUNT + 1))
76
+ echo "$(date): Synced local knowledge for agent: ${agent_name}" >> "$LOG_FILE"
77
+ fi
78
+ fi
79
+ fi
80
+ done
81
+
82
+ if [ $SYNCED_COUNT -gt 0 ]; then
83
+ echo "$(date): Synced ${SYNCED_COUNT} local agent knowledge base(s)" >> "$LOG_FILE"
84
+ fi
85
+
86
+ echo "{}"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Aircana
4
- VERSION = "3.0.0"
4
+ VERSION = "3.2.0"
5
5
  end
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "version": "1.0",
3
3
  "agent": "test-agent",
4
+ "kb_type": "remote",
4
5
  "sources": [
5
6
  {
6
7
  "type": "confluence",
@@ -0,0 +1,16 @@
1
+ {
2
+ "version": "1.0",
3
+ "agent": "test-agent",
4
+ "kb_type": "remote",
5
+ "sources": [
6
+ {
7
+ "type": "confluence",
8
+ "label": "test-agent",
9
+ "pages": [
10
+ {
11
+ "id": "123"
12
+ }
13
+ ]
14
+ }
15
+ ]
16
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "version": "1.0",
3
+ "agent": "test-agent",
4
+ "kb_type": "remote",
5
+ "sources": [
6
+ {
7
+ "type": "confluence",
8
+ "label": "test-agent",
9
+ "pages": [
10
+ {
11
+ "id": "123"
12
+ }
13
+ ]
14
+ }
15
+ ]
16
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "version": "1.0",
3
+ "agent": "test-agent",
4
+ "kb_type": "remote",
5
+ "sources": [
6
+ {
7
+ "type": "confluence",
8
+ "label": "test-agent",
9
+ "pages": [
10
+ {
11
+ "id": "123"
12
+ }
13
+ ]
14
+ }
15
+ ]
16
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "version": "1.0",
3
+ "agent": "test-agent",
4
+ "kb_type": "remote",
5
+ "sources": [
6
+ {
7
+ "type": "confluence",
8
+ "label": "test-agent",
9
+ "pages": [
10
+ {
11
+ "id": "123"
12
+ }
13
+ ]
14
+ }
15
+ ]
16
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "version": "1.0",
3
+ "agent": "test-agent",
4
+ "kb_type": "remote",
5
+ "sources": [
6
+ {
7
+ "type": "confluence",
8
+ "label": "test-agent",
9
+ "pages": [
10
+ {
11
+ "id": "123"
12
+ }
13
+ ]
14
+ }
15
+ ]
16
+ }
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aircana
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Weston Dransfield
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-10-13 00:00:00.000000000 Z
10
+ date: 2025-10-17 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: httparty
@@ -115,13 +115,6 @@ files:
115
115
  - README.md
116
116
  - Rakefile
117
117
  - SECURITY.md
118
- - agents/apply_feedback.md
119
- - agents/executor.md
120
- - agents/jira.md
121
- - agents/planner.md
122
- - agents/reviewer.md
123
- - agents/sub-agent-coordinator.md
124
- - agents/test-agent/manifest.json
125
118
  - commands/apply-feedback.md
126
119
  - commands/ask-expert.md
127
120
  - commands/execute.md
@@ -195,9 +188,16 @@ files:
195
188
  - lib/aircana/templates/hooks/rspec_test.erb
196
189
  - lib/aircana/templates/hooks/rubocop_pre_commit.erb
197
190
  - lib/aircana/templates/hooks/session_start.erb
191
+ - lib/aircana/templates/hooks/sync_local_knowledge.erb
198
192
  - lib/aircana/templates/hooks/user_prompt_submit.erb
199
193
  - lib/aircana/version.rb
200
194
  - sig/aircana.rbs
195
+ - spec_target_1760656566_428/agents/test-agent/manifest.json
196
+ - spec_target_1760656588_38/agents/test-agent/manifest.json
197
+ - spec_target_1760656647_612/agents/test-agent/manifest.json
198
+ - spec_target_1760656660_113/agents/test-agent/manifest.json
199
+ - spec_target_1760656689_268/agents/test-agent/manifest.json
200
+ - spec_target_1760656710_387/agents/test-agent/manifest.json
201
201
  homepage: https://github.com/westonkd/aircana
202
202
  licenses:
203
203
  - MIT
@@ -1,92 +0,0 @@
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
- INSTRUCTIONS IMPORTANT: 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 /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
90
-
91
-
92
- Always check your knowledge base first for code improvement and refactoring best practices.
data/agents/executor.md DELETED
@@ -1,85 +0,0 @@
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
- INSTRUCTIONS IMPORTANT: 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 '/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
83
-
84
-
85
- Always check your knowledge base first for execution-specific guidance and best practices.