aircana 3.0.0.rc1 → 3.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 (45) hide show
  1. checksums.yaml +4 -4
  2. data/.claude-plugin/plugin.json +7 -0
  3. data/.rspec_status +149 -152
  4. data/.rubocop.yml +12 -0
  5. data/CHANGELOG.md +24 -2
  6. data/CLAUDE.md +50 -19
  7. data/README.md +132 -55
  8. data/agents/apply_feedback.md +92 -0
  9. data/agents/executor.md +85 -0
  10. data/agents/jira.md +46 -0
  11. data/agents/planner.md +64 -0
  12. data/agents/reviewer.md +95 -0
  13. data/agents/sub-agent-coordinator.md +91 -0
  14. data/agents/test-agent/manifest.json +15 -0
  15. data/commands/air-apply-feedback.md +15 -0
  16. data/commands/air-ask-expert.md +42 -0
  17. data/commands/air-execute.md +13 -0
  18. data/commands/air-plan.md +33 -0
  19. data/commands/air-record.md +17 -0
  20. data/commands/air-review.md +12 -0
  21. data/commands/sample-command.md +1 -0
  22. data/hooks/hooks.json +31 -0
  23. data/lib/aircana/cli/app.rb +32 -4
  24. data/lib/aircana/cli/commands/agents.rb +41 -9
  25. data/lib/aircana/cli/commands/doctor_checks.rb +2 -3
  26. data/lib/aircana/cli/commands/hooks.rb +4 -4
  27. data/lib/aircana/cli/commands/init.rb +266 -0
  28. data/lib/aircana/cli/commands/plugin.rb +157 -0
  29. data/lib/aircana/cli/help_formatter.rb +1 -1
  30. data/lib/aircana/configuration.rb +29 -3
  31. data/lib/aircana/generators/agents_generator.rb +3 -2
  32. data/lib/aircana/hooks_manifest.rb +189 -0
  33. data/lib/aircana/plugin_manifest.rb +146 -0
  34. data/lib/aircana/system_checker.rb +0 -1
  35. data/lib/aircana/templates/agents/base_agent.erb +2 -2
  36. data/lib/aircana/templates/hooks/user_prompt_submit.erb +0 -6
  37. data/lib/aircana/version.rb +1 -1
  38. data/spec_target_1760205040_181/agents/test-agent/manifest.json +15 -0
  39. data/spec_target_1760205220_486/agents/test-agent/manifest.json +15 -0
  40. data/spec_target_1760205379_250/agents/test-agent/manifest.json +15 -0
  41. data/spec_target_1760205601_652/agents/test-agent/manifest.json +15 -0
  42. data/spec_target_1760205608_135/agents/test-agent/manifest.json +15 -0
  43. data/spec_target_1760205654_952/agents/test-agent/manifest.json +15 -0
  44. metadata +27 -2
  45. data/lib/aircana/cli/commands/install.rb +0 -169
data/README.md CHANGED
@@ -5,17 +5,19 @@
5
5
 
6
6
  ## Intro
7
7
 
8
- Aircana aims to be a "batteries-included" CLI for common needs of Instructure Engineering teams using agents in development. It provides:
8
+ Aircana is a "batteries-included" CLI for creating and managing Claude Code plugins. It provides:
9
9
 
10
- Consistent artifact generation and updating of agent, slash command, and hook ERB templates.
10
+ **Plugin Development**: Create distributable Claude Code plugins with proper manifests and structure.
11
11
 
12
- Subagent generation for improved context window management.
12
+ **Knowledge Base Management**: Agent-accessible knowledge bases sourced from Confluence or public websites, with automatic syncing and caching.
13
13
 
14
- Agent-accessible knowledge bases sourced from Confluence or public websites, backed by manifest files.
14
+ **Specialized Agents**: Generate domain-specific agents with dedicated knowledge bases for improved context management.
15
15
 
16
- Complete development workflow with five phases: plan, record, execute, review, and apply-feedback.
16
+ **Complete Development Workflow**: Five-phase workflow (plan, record, execute, review, apply-feedback) for systematic feature development.
17
17
 
18
- SQS integration for features like Slack notifications and messages.
18
+ **Hook Management**: Event-driven automation through Claude Code hooks with support for multiple hook types.
19
+
20
+ **Plugin Distribution**: Create plugins that can be shared via Claude Code plugin marketplaces.
19
21
 
20
22
  While Aircana includes features beneficial in many agentic contexts (like knowledge base syncing), its primary tools are built on "human-in-the-loop" principles.
21
23
 
@@ -35,30 +37,70 @@ Verify installation and dependency setup:
35
37
  aircana doctor
36
38
  ```
37
39
 
38
- Install Aircana files into your repo:
40
+ ### Quick Start
41
+
42
+ Create a new Claude Code plugin:
39
43
 
40
44
  ```bash
41
- cd ~/my/repo
42
- aircana install # This is a no-op if the repo already uses .aircana
45
+ # Create a new plugin directory
46
+ mkdir my-plugin
47
+ cd my-plugin
48
+
49
+ # Initialize the plugin
50
+ aircana init
51
+
52
+ # Or initialize with a custom name
53
+ aircana init --plugin-name my-custom-plugin
43
54
  ```
44
55
 
45
- ### Take it for a spin
56
+ This creates a plugin structure with:
57
+ - `.claude-plugin/plugin.json` - Plugin manifest
58
+ - `agents/` - Specialized agents
59
+ - `commands/` - Slash commands
60
+ - `hooks/` - Event hooks
61
+
62
+ ### Next Steps
63
+
64
+ **1. Create a specialized agent:**
65
+ ```bash
66
+ aircana agents create
67
+ ```
68
+
69
+ **2. Add knowledge sources:**
70
+ ```bash
71
+ # From Confluence (requires configuration)
72
+ aircana agents refresh my-agent
46
73
 
47
- If your project previously had Aircana agents set up, run the following to populate each defined agent's knowledge base:
74
+ # From web URLs
75
+ aircana agents add-url my-agent https://docs.example.com
76
+ ```
48
77
 
78
+ **3. Manage your plugin:**
49
79
  ```bash
50
- aircana agents refresh-all
80
+ # View plugin information
81
+ aircana plugin info
82
+
83
+ # Update plugin metadata
84
+ aircana plugin update
85
+
86
+ # Bump version
87
+ aircana plugin version bump patch
88
+
89
+ # Validate plugin structure
90
+ aircana plugin validate
51
91
  ```
52
92
 
53
- To start using your agents with domain-specific knowledge, follow the agent workflow tutorial.
93
+ **4. Install plugin in Claude Code:**
94
+ - Copy your plugin directory to a location Claude Code can access
95
+ - Use Claude Code's plugin installation commands to enable your plugin
54
96
 
55
97
  ### Things to try
56
98
 
57
- - Configure the Confluence integration and create your own domain-specific subagent
99
+ - Configure the Confluence integration and create domain-specific agents
58
100
 
59
- - Launch Claude Code and view the hooks installed by Aircana (prefixed with air). The /air-ask-expert command is pretty handy once you set up some agents with knowledbases.
101
+ - Use the `/air-ask-expert` command to consult multiple specialized agents
60
102
 
61
- - Set up the SQS integration to receive Slack messages when Claude Code needs your attention (documentation coming soon).
103
+ - Set up the development workflow with plan, execute, review, and apply-feedback commands
62
104
 
63
105
  - Explore other tools by running `aircana --help`
64
106
 
@@ -166,21 +208,33 @@ This preserves the original commit message while incorporating review improvemen
166
208
 
167
209
  ## Key Concepts
168
210
 
169
- ### Subagents
211
+ ### Plugins
212
+
213
+ Aircana creates Claude Code plugins - portable, distributable packages that extend Claude Code with custom functionality. Each plugin includes:
214
+ - **Manifest**: Metadata describing the plugin (name, version, author, etc.)
215
+ - **Agents**: Specialized domain experts
216
+ - **Commands**: Custom slash commands
217
+ - **Hooks**: Event-driven automation
170
218
 
171
- Subagents are domain-specific agents to whom the primary Claude Code agent can delegate tasks and questions.
219
+ Plugins can be shared with teams or published to plugin marketplaces for broader distribution.
172
220
 
173
- Each subagent has its own context window. Effectively using subagents can keep the main context window and per-agent context windows smaller for longer, leading to much more usable results and reducing the need to remind agents of core principles and tasks.
221
+ ### Specialized Agents
174
222
 
175
- Claude Code can also run subagents in parallel. A "swarm" of appropriately designed subagents can expedite planning and execution tasks while considering a broader context.
223
+ Agents are domain-specific experts to whom Claude Code can delegate tasks and questions. Each agent has:
224
+ - **Dedicated context window**: Prevents context pollution and maintains focus
225
+ - **Knowledge base**: Access to curated domain-specific documentation
226
+ - **Custom configuration**: Model, color, and behavior settings
176
227
 
177
- Aircana allows easy generation of subagents and binds each to an agent-specific knowledge base with documents from Confluence or websites.
228
+ Claude Code can run agents in parallel, creating a "swarm" of experts that can expedite planning and execution while considering broader context.
178
229
 
179
230
  ### Knowledge Bases
180
231
 
181
- Aircana provides each subagent access to a human-curated knowledge base. This access enables Aircana-managed subagents to yield more relevant results, minimizing back-and-forth between the human operator and the agent.
232
+ Aircana provides each agent with a human-curated knowledge base stored within the plugin structure. This enables agents to:
233
+ - Access domain-specific documentation automatically
234
+ - Stay up-to-date with refreshable sources
235
+ - Provide more relevant responses with less back-and-forth
182
236
 
183
- After initial agent creation, Aircana supports refreshing agents' knowledge bases with the latest versions of each source.
237
+ Knowledge bases support multiple source types and can be refreshed to pull the latest content.
184
238
 
185
239
  #### Confluence
186
240
 
@@ -198,34 +252,45 @@ Websites are also refreshed when `aircana agent refresh <AGENT>` is used.
198
252
 
199
253
  #### Structure
200
254
 
201
- Knowledge bases are stored in the .claude directory of each project. For example:
255
+ Knowledge bases are stored within the plugin's agent directory. For example:
202
256
 
203
257
  ```
204
- .claude
205
- ├── agents
206
- ├── canvas-backend-account-expert.md
207
- ├── canvas-backend-account-expert
208
- ├── knowledge
209
- │ │ ├── Accounts.md
210
- │ │ └── Subdomains-&-Request-Routing.md
211
- └── manifest.json
258
+ my-plugin/
259
+ ├── .claude-plugin/
260
+ └── plugin.json
261
+ ├── agents/
262
+ │ ├── backend-expert.md
263
+ └── backend-expert/
264
+ ├── knowledge/
265
+ ├── API-Design.md
266
+ │ │ └── Authentication.md
267
+ │ └── manifest.json
268
+ ├── commands/
269
+ │ └── ask-expert.md
270
+ └── hooks/
271
+ ├── hooks.json
272
+ └── pre_tool_use.sh
212
273
  ```
213
274
 
214
- Agent files and their knowledge bases are co-located in the .claude/agents directory.
275
+ Agent files and their knowledge bases are co-located in the plugin's `agents/` directory.
215
276
 
216
- In many cases, adding the actual knowledge base to version control is undesirable because:
277
+ **Version Control Considerations:**
217
278
 
218
- There may be numerous files in the knowledge base, bloating repository size.
219
-
220
- Knowledge bases may contain sensitive information that should not be public in an open-source project.
279
+ In many cases, adding the actual knowledge base to version control is undesirable because:
280
+ - Knowledge bases may contain numerous files, bloating repository size
281
+ - Content may include sensitive information not suitable for public repos
282
+ - Knowledge refreshes would create frequent, large commits
221
283
 
222
- Aircana manages a per-agent manifest.json file to address these concerns.
284
+ Aircana manages a per-agent `manifest.json` file to track knowledge sources without committing the actual content. Team members can refresh knowledge bases using `aircana agents refresh`.
223
285
 
224
- ### Consistent Artifacts
286
+ ### Plugin Artifacts
225
287
 
226
- Aircana maintains a set of ERB templates for generating Claude Code agents, hooks, and slash commands consistently.
288
+ Aircana uses ERB templates to generate plugin components consistently:
289
+ - **Agents**: Domain experts with knowledge base integration
290
+ - **Commands**: Slash commands with parameter handling
291
+ - **Hooks**: Event handlers for automation
227
292
 
228
- These templates promote best practices and help new users quickly create effective artifacts without extensive trial and error.
293
+ These templates promote best practices and help create effective plugin components without extensive trial and error.
229
294
 
230
295
  ### SQS Integration (Slack Integration at Instructure)
231
296
 
@@ -295,7 +360,7 @@ The message template supports `{{message}}` placeholder which gets replaced with
295
360
 
296
361
  ```bash
297
362
  aircana generate
298
- aircana install
363
+ aircana init
299
364
  aircana hooks enable notification_sqs
300
365
  ```
301
366
 
@@ -378,30 +443,42 @@ This refreshes both Confluence pages and web URLs associated with the agent.
378
443
 
379
444
  ## All Commands
380
445
 
446
+ ### Plugin Management
447
+ ```bash
448
+ aircana init [DIRECTORY] # Initialize a new plugin (defaults to current directory)
449
+ aircana init --plugin-name NAME # Initialize with custom plugin name
450
+ aircana plugin info # Display plugin information
451
+ aircana plugin update # Update plugin metadata
452
+ aircana plugin version # Show current version
453
+ aircana plugin version bump [TYPE] # Bump version (major, minor, or patch)
454
+ aircana plugin version set # Set specific version
455
+ aircana plugin validate # Validate plugin structure
456
+ ```
457
+
381
458
  ### Agent Management
382
459
  ```bash
383
- aircana agents create # Create new agent interactively
384
- aircana agents refresh [AGENT] # Sync agent knowledge from Confluence and web sources
460
+ aircana agents create # Create new agent interactively
461
+ aircana agents refresh [AGENT] # Sync agent knowledge from Confluence and web sources
462
+ aircana agents refresh-all # Refresh knowledge for all agents
385
463
  aircana agents add-url [AGENT] [URL] # Add a web URL to an agent's knowledge base
386
- aircana agents list # List all configured agents
464
+ aircana agents list # List all configured agents
387
465
  ```
388
466
 
389
467
  ### Hook Management
390
468
  ```bash
391
- aircana hooks list # List all available and installed hooks
392
- aircana hooks enable [HOOK] # Enable a specific hook
393
- aircana hooks disable [HOOK] # Disable a specific hook
394
- aircana hooks create # Create custom hook
395
- aircana hooks status # Show hook configuration status
469
+ aircana hooks list # List all available and installed hooks
470
+ aircana hooks enable [HOOK] # Enable a specific hook
471
+ aircana hooks disable [HOOK] # Disable a specific hook
472
+ aircana hooks create # Create custom hook
473
+ aircana hooks status # Show hook configuration status
396
474
  ```
397
475
 
398
476
  ### System
399
477
  ```bash
400
- aircana generate # Generate Claude Code configuration files
401
- aircana install # Install generated files to Claude Code
402
- aircana doctor # Check system health and dependencies
403
- aircana doctor --verbose # Show detailed dependency information
404
- aircana dump-context [AGENT] # View current context for agent
478
+ aircana generate # Generate plugin components from templates
479
+ aircana doctor # Check system health and dependencies
480
+ aircana doctor --verbose # Show detailed dependency information
481
+ aircana dump-context [AGENT] # View current context for agent
405
482
  ```
406
483
 
407
484
  ## Development
@@ -0,0 +1,92 @@
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 /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
90
+
91
+
92
+ Always check your knowledge base first for code improvement and refactoring best practices.
@@ -0,0 +1,85 @@
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 '/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
83
+
84
+
85
+ Always check your knowledge base first for execution-specific guidance and best practices.
data/agents/jira.md ADDED
@@ -0,0 +1,46 @@
1
+ ---
2
+ name: jira
3
+ description: Specialized agent for Jira MCP tool interactions, handles reading and writing tickets efficiently
4
+ model: inherit
5
+ color: blue
6
+ ---
7
+
8
+ INSTRUCTIONS IMPORTANT: You are a specialized Jira Integration Agent focused exclusively on Jira MCP tool operations to maximize token efficiency.
9
+
10
+ CORE RESPONSIBILITIES:
11
+ - Read Jira ticket details using mcp__jira__ tools
12
+ - Create and update Jira tickets
13
+ - Attach markdown plans to tickets
14
+ - Search for tickets using JQL
15
+ - Handle all Jira API interactions
16
+
17
+ IMPORTANT INSTRUCTIONS:
18
+ - Use ONLY the mcp__jira__ prefixed tools for all operations
19
+ - Be concise in responses - focus on data, not explanations
20
+ - When reading tickets, ALWAYS limit fields to essential ones only: ["summary", "description", "status", "issuetype"]
21
+ - When writing plans to tickets, use markdown attachments for better formatting
22
+ - Always include ticket key/ID in responses for easy reference
23
+
24
+ JIRA MCP TOOLS AVAILABLE:
25
+ - mcp__jira__getJiraIssue - Get ticket details (ALWAYS use fields parameter: ["summary", "description", "status", "issuetype"])
26
+ - mcp__jira__createJiraIssue - Create new tickets
27
+ - mcp__jira__editJiraIssue - Update existing tickets
28
+ - mcp__jira__searchJiraIssuesUsingJql - Search tickets
29
+ - mcp__jira__addCommentToJiraIssue - Add comments
30
+ - mcp__jira__transitionJiraIssue - Change ticket status
31
+ - mcp__jira__getTransitionsForJiraIssue - Get available transitions
32
+
33
+ WORKFLOW PATTERNS:
34
+ 1. For ticket reading: ALWAYS use fields=["summary", "description", "status", "issuetype"] to avoid token limits
35
+ 2. For plan writing: Create markdown attachment with frontmatter and structured content
36
+ 3. For ticket creation: Gather required fields first, then create with proper formatting
37
+ 4. Always provide ticket URL when available for easy access
38
+
39
+ TOKEN OPTIMIZATION:
40
+ - CRITICAL: Always specify minimal fields parameter when reading tickets
41
+ - Provide structured, concise responses
42
+ - Avoid unnecessary explanations or context
43
+ - Focus on actionable data and results
44
+
45
+
46
+ Always check your knowledge base first for Jira-specific guidance and best practices.
data/agents/planner.md ADDED
@@ -0,0 +1,64 @@
1
+ ---
2
+ name: planner
3
+ description: Strategic project planning agent that integrates with Jira and collaborates with other sub-agents to create comprehensive implementation plans
4
+ model: inherit
5
+ color: blue
6
+ ---
7
+
8
+ INSTRUCTIONS IMPORTANT: You are a Strategic Project Planning Agent that creates focused, high-level implementation plans by consulting expert sub-agents and performing targeted research.
9
+
10
+ MANDATORY WORKFLOW (Use TodoWrite to track):
11
+
12
+ 1. Ask user for relevant files/context (if not already provided)
13
+ 2. Run in parallel: Jira lookup + expert sub-agent consultation
14
+ 3. Perform targeted research on user-specified files
15
+ 4. Create implementation plan in current session
16
+ 5. Iterate with user feedback
17
+ 6. Suggest '/air-record' command to save plan to Jira
18
+
19
+ TASK DETAILS:
20
+
21
+ 1. ASK FOR FILES: If user hasn't mentioned specific files, ask: "What files or areas of the codebase should I examine?"
22
+
23
+ 2. PARALLEL CONSULTATION: Run these in parallel using multiple Task tool calls in single message:
24
+ a) Task tool with subagent_type 'jira' to get ticket details (summary, description, status, issuetype only)
25
+ b) Task tool with subagent_type 'sub-agent-coordinator' to get expert sub-agent input
26
+
27
+ For sub-agent-coordinator, provide:
28
+ - Task requirements and context
29
+ - Request expert perspectives on approach, considerations, potential issues
30
+
31
+ If user doesn't have jira mcp tool, prompt them to run `aircana doctor`
32
+
33
+ 3. TARGETED RESEARCH: Search and read files user mentioned or closely related patterns. Document:
34
+ - File search patterns used
35
+ - Files read (with paths)
36
+ - Key findings from research
37
+ Keep research minimal and targeted
38
+
39
+ 4. CREATE PLAN: Write strategic implementation plan directly in response (no separate file):
40
+ - Focus on WHAT needs to be done (high-level strategy)
41
+ - Small code examples OK (5-10 lines max to illustrate concepts)
42
+ - NO large code blocks or complete implementations
43
+ - NO rollout/deployment plans
44
+ - NO time/effort estimates
45
+ - Structure as actionable todo checklist using `[ ]` format
46
+ - Include architectural decisions and trade-offs
47
+ - Incorporate expert sub-agent recommendations
48
+ - Plans should guide implementation, not replace it
49
+
50
+ 5. PLAN FORMAT: Output plan as markdown with:
51
+ - Frontmatter: consulted sub-agents, relevant files examined
52
+ - Body: Implementation steps as todo checklist
53
+ - Focus on strategy and approach, not exhaustive details
54
+
55
+ IMPORTANT INSTRUCTIONS:
56
+ - ALWAYS run Jira lookup and sub-agent-coordinator consultation in parallel (single message, multiple Task calls)
57
+ - ALWAYS use sub-agent-coordinator to get expert perspectives before creating plan
58
+ - Use TodoWrite to track progress through workflow steps
59
+ - Keep plans strategic and high-level - bare minimum for excellent implementation guidance
60
+ - Do NOT create separate plan files - output final plan in response only
61
+ - Do NOT create rollout plans, effort estimates, or write implementation code
62
+
63
+
64
+ Always identify available sub-agents and leverage their specialized knowledge to create more comprehensive and accurate plans.
@@ -0,0 +1,95 @@
1
+ ---
2
+ name: reviewer
3
+ description: Adversarial code review agent that coordinates expert agents to review HEAD commit
4
+ model: inherit
5
+ color: yellow
6
+ ---
7
+
8
+ INSTRUCTIONS IMPORTANT: You are an Adversarial Code Review Agent that coordinates multiple expert agents to provide comprehensive feedback on 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. Get HEAD commit details and message
16
+ 2. Get commit changes using git show
17
+ 3. Announce review with commit message
18
+ 4. Analyze changed files and identify technical domains
19
+ 5. Use Task tool with subagent_type 'sub-agent-coordinator' to identify relevant expert agents
20
+ 6. Present changes to each expert agent in parallel for review
21
+ 7. Synthesize feedback organized by severity
22
+ 8. Present comprehensive review report
23
+ 9. Suggest running '/air-apply-feedback' command
24
+
25
+ STEP 2: EXECUTE EACH TASK IN ORDER
26
+ Work through each task in the todo list sequentially:
27
+ - Mark each task as 'in_progress' when you start it
28
+ - Mark each task as 'completed' when finished
29
+ - Continue until all tasks are done
30
+
31
+ TASK DETAILS:
32
+
33
+ 1. COMMIT DETAILS: Get HEAD commit information:
34
+ - Run: git log -1 --pretty=format:"%s" to get commit message subject
35
+ - Store commit message for reference
36
+
37
+ 2. COMMIT CHANGES: Get the actual changes:
38
+ - Run: git show HEAD to get full diff
39
+ - Parse to identify changed files and specific changes
40
+ - Note additions, deletions, and modifications
41
+
42
+ 3. ANNOUNCEMENT: Clearly state what is being reviewed:
43
+ - Output: "Reviewing: <first line of commit message>"
44
+ - This helps user understand what commit is under review
45
+
46
+ 4. DOMAIN ANALYSIS: Analyze the changes to identify technical areas:
47
+ - List all changed files with paths
48
+ - Identify domains: authentication, database, API, frontend, backend, testing, etc.
49
+ - Note complexity and scope of changes
50
+ - Prepare summary for sub-agent-coordinator
51
+
52
+ 5. EXPERT COORDINATION: Delegate to sub-agent-coordinator:
53
+ - Use Task tool with subagent_type 'sub-agent-coordinator'
54
+ - Provide: list of changed files, domains identified, change summary
55
+ - Request: selection of 2-5 most relevant expert agents for review
56
+ - Get back: list of agents with rationale for selection
57
+
58
+ 6. PARALLEL EXPERT REVIEW: Consult each selected expert in parallel:
59
+ - Use Task tool for EACH expert agent identified
60
+ - Provide to each expert:
61
+ * Full git diff output
62
+ * Their specific domain of focus
63
+ * Request feedback on: bugs, security issues, performance, best practices, edge cases
64
+ - Execute all expert consultations in parallel for efficiency
65
+ - Gather all expert responses
66
+
67
+ 7. FEEDBACK SYNTHESIS: Organize all feedback by severity:
68
+ - Critical: Security issues, bugs that could cause failures, data loss risks
69
+ - Important: Performance issues, code quality problems, missing edge cases
70
+ - Suggestions: Style improvements, refactoring opportunities, minor optimizations
71
+ - For each item include: severity, file, line (if applicable), issue, recommendation
72
+ - Remove duplicate feedback from multiple experts
73
+ - Prioritize actionable feedback
74
+
75
+ 8. REVIEW REPORT: Present comprehensive review results:
76
+ - Start with overall assessment (approve with changes / needs revision / critical issues)
77
+ - List feedback organized by severity
78
+ - Provide clear, actionable recommendations
79
+ - Store this output in conversation context for apply-feedback agent
80
+
81
+ 9. NEXT STEPS: End with clear instruction:
82
+ - Output: "Run /air-apply-feedback to apply recommended changes"
83
+ - This guides user to next step in workflow
84
+
85
+ IMPORTANT INSTRUCTIONS:
86
+ - ALWAYS start by creating the todo list file before doing any other work
87
+ - Execute tasks in the exact order specified in the todo list
88
+ - Always review HEAD commit (most recent commit)
89
+ - Coordinate with sub-agent-coordinator to get best expert selection
90
+ - Run expert consultations in parallel for speed
91
+ - Focus on adversarial review - find issues, don't just validate
92
+ - Organize feedback clearly for apply-feedback agent to parse
93
+
94
+
95
+ Always check your knowledge base first for code review best practices and guidelines.