kiro-agents 1.2.0 → 1.3.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,9 +7,11 @@ description: Generic agent activation system with instruction commands for seaml
7
7
 
8
8
  Generic agent activation and management system for Kiro using instruction commands with parameter support.
9
9
 
10
+ **For complete documentation, examples, and troubleshooting, see `docs/agent-system-guide.md`**
11
+
10
12
  ## Agent Commands
11
13
 
12
- **Note:** This system uses the Instruction Alias pattern defined in `aliases.md`. See that document for details on parameter substitution and literal response patterns.
14
+ **Note:** This system uses the Instruction Alias pattern defined in `aliases.md`.
13
15
 
14
16
  ### Command 1: Activate Specific Agent
15
17
 
@@ -20,48 +22,11 @@ Generic agent activation and management system for Kiro using instruction comman
20
22
 
21
23
  You are now activating the **{agent_name}** agent.
22
24
 
23
- ### Step 1: Load Agent Definition and Strict Mode
24
-
25
- Read `.kiro/agents/{agent_name}.md` into context.
26
-
27
- This file contains:
28
- - Agent capabilities and responsibilities
29
- - Interaction protocols and workflows
30
- - Mandatory protocols and rules
31
- - Examples and best practices
32
- - Integration requirements
33
-
34
- **Also load `strict-mode.md` steering document** to enable `/strict {state}` command for this agent session. STRICT_MODE defaults to OFF but user can activate it anytime with `/strict on`.
35
-
36
- ### Step 2: Assume Agent Role
37
-
38
- For this session, you are **{agent_name}**.
39
-
40
- You will:
41
- - Follow ALL protocols and instructions from `.kiro/agents/{agent_name}.md`
42
- - Apply agent-specific interaction patterns
43
- - Use capabilities defined in the agent definition
44
- - Maintain this role until user switches agents or ends session
45
- - Override any conflicting instructions with agent protocols
46
-
47
- ### Step 3: Begin Interaction
48
-
49
- Start interaction according to **{agent_name}**'s protocols defined in the `.md` file.
50
-
51
- If the agent uses **chit-chat mode**:
52
- - Begin with diff block showing current state
53
- - Provide numbered choice list (4-6 options, up to 16 if needed)
54
- - Maintain single focus per message
55
- - Use visual formatting (bold, code blocks)
56
-
57
- Otherwise:
58
- - Begin according to the agent's defined interaction protocol
59
- - Follow agent-specific response structure
60
- - Apply agent-specific formatting rules
61
-
62
- ---
63
-
64
- **You are now {agent_name}. Begin interaction.**
25
+ **Load and execute activation protocol:**
26
+ 1. Read `.kiro/agents/{agent_name}.md` into context
27
+ 2. Read `~/.kiro/steering/kiro-agents/protocols/agent-activation.mdx` into context
28
+ 3. Follow all steps from the "Agent Activation Steps" section in agent-activation.mdx
29
+ 4. Use `{agent_name}` as the agent identifier throughout the protocol
65
30
  </definition>
66
31
  </alias>
67
32
 
@@ -78,270 +43,68 @@ This provides a visual interface for:
78
43
  - Interactive: `/agents` (no parameters, loads `agents.md` steering file)
79
44
  - Direct: `/agents {name}` (with agent name, uses alias above)
80
45
 
81
- ## Agent Activation Protocol
46
+ ## Quick Reference
47
+
48
+ ### Activation Protocol Summary
82
49
 
83
50
  When `/agents {name}` is executed:
84
51
 
85
- 1. **Discover agent file**
86
- - Check `.kiro/agents/{name}.md` exists
87
- - If file missing, show error and suggest `/agents` command
88
-
89
- 2. **Load agent definition**
90
- - Read `.kiro/agents/{name}.md` into context
91
- - **Load `strict-mode.md`** steering document (enables `/strict` commands)
92
- - Parse frontmatter metadata
93
- - Understand agent capabilities and workflows
94
- - Identify mandatory protocols
95
- - Note interaction patterns
96
- - Check integration requirements
97
-
98
- 3. **Apply protocols**
99
- - Follow all mandatory protocols from definition
100
- - Load required steering documents
101
- - Apply agent-specific overrides
102
- - Set up agent context
103
-
104
- 4. **Assume role**
105
- - Become the agent completely
106
- - Maintain role until user switches agents
107
- - Apply agent personality and style
108
- - Use agent-specific tools and workflows
109
-
110
- 5. **Begin interaction**
111
- - Start according to agent's interaction protocol
112
- - Use agent's response structure
113
- - Apply agent's formatting rules
114
- - Maintain agent's focus and priorities
115
-
116
- ## Agent Management Protocol
52
+ 1. **Discover** - Check `.kiro/agents/{name}.md` exists
53
+ 2. **Load** - Read agent definition and `strict-mode.md`
54
+ 3. **Apply** - Follow mandatory protocols, load required steering
55
+ 4. **Assume** - Become agent completely, maintain role
56
+ 5. **Begin** - Start interaction per agent's protocol
57
+
58
+ ### Management Protocol Summary
117
59
 
118
60
  When `/agents` is executed:
119
61
 
120
- 1. **Activate chit-chat mode**
121
- - Load chit-chat.md steering
122
- - Use diff blocks for progress
123
- - Provide numbered choices
124
- - Maintain single focus
125
-
126
- 2. **Scan agents directory**
127
- - List all `.md` files in `.kiro/agents/`
128
- - Exclude `.instructions.md` files
129
- - Extract agent metadata
130
- - Categorize agents by type
131
-
132
- 3. **Present choices**
133
- - Show available agents with descriptions
134
- - Offer management operations
135
- - Provide help and documentation
136
- - Allow exit to normal mode
137
-
138
- 4. **Handle operations**
139
- - Agent activation → Execute `/agents {name}`
140
- - Agent creation → Start creation wizard
141
- - Agent management → Modify agent files
142
- - Agent viewing → Display agent details
143
- - Help → Explain agent system
144
- - Exit → Return to normal mode
145
-
146
- 5. **Maintain context**
147
- - Use diff blocks to show progress
148
- - Preserve user decisions
149
- - Allow going back
150
- - Enable canceling operations
151
-
152
- ## Agent Directory Structure
153
-
154
- ```
155
- .kiro/agents/
156
- └── {agent-name}.md # Complete agent definition
157
- ├── Frontmatter metadata
158
- ├── Core responsibilities
159
- ├── Capabilities and workflows
160
- ├── Interaction protocols
161
- ├── Mandatory protocols
162
- ├── Examples and best practices
163
- ├── Integration rules
164
- └── Conflict priorities
165
- ```
166
-
167
- ### Agent Definition File (.md)
62
+ 1. **Activate chit-chat** - Load chit-chat.md, use diff blocks
63
+ 2. **Scan directory** - List `.md` files in `.kiro/agents/`
64
+ 3. **Present choices** - Show agents, offer operations
65
+ 4. **Handle operations** - Activation, creation, management, viewing
66
+ 5. **Maintain context** - Track progress, preserve decisions
67
+
68
+ ## Agent Definition Requirements
69
+
70
+ **File location:** `.kiro/agents/{agent-name}.md`
168
71
 
169
72
  **Required sections:**
170
- - Frontmatter with name, type, metadata
73
+ - Frontmatter (name, type, description, version)
171
74
  - Core Responsibilities
172
- - Capabilities (detailed list)
173
- - Interaction Protocol (how agent responds)
174
- - Mandatory Protocols (rules agent must follow)
175
- - Workflows (step-by-step processes)
176
- - Examples (interaction patterns)
75
+ - Capabilities
76
+ - Interaction Protocol
77
+ - Mandatory Protocols
78
+ - Workflows
79
+ - Examples
177
80
 
178
81
  **Recommended sections:**
82
+ - Integration Points
83
+ - Conflict Priorities
179
84
  - Best Practices
180
- - Integration Points (with other agents/steering)
181
- - Conflict Priorities (ordered list)
182
85
  - Advanced Features
183
86
  - Error Handling
184
87
  - Success Metrics
185
88
 
186
89
  ## Initial Agent
187
90
 
188
- When auto-setup detects no agents exist, it creates the initial agent:
91
+ When auto-setup detects no agents exist, it creates:
189
92
 
190
93
  **kiro-master** - Interactive Kiro feature management with CRUD operations for MCP servers, hooks, agents, specs, powers, and steering documents. Includes .kiro/ directory maintenance, steering optimization, refactoring, and comprehensive analysis capabilities
191
94
 
192
- This description is used when creating `.kiro/agents/kiro-master.md` during auto-setup.
193
-
194
- ## Usage Examples
195
-
196
- ### Activate Specific Agent
197
-
198
- ```
199
- /agents refactor-architect
200
- ```
201
-
202
- **Result:** AI immediately assumes refactor-architect role, loads agent files, applies protocols, and begins interaction according to agent's style.
203
-
204
- ### Interactive Agent Management
205
-
206
- ```
207
- /agents
208
- ```
209
-
210
- **Result:** Chit-chat mode activates, shows available agents, offers management options with numbered choices.
211
-
212
- ### Switch Between Agents
213
-
214
- ```
215
- /agents kiro-master
216
- ```
217
-
218
- **Result:** Switch from current agent (e.g., refactor-architect) to kiro-master. Previous agent context is suspended, new agent context is loaded.
219
-
220
- ### Create New Agent
95
+ ## Integration Notes
221
96
 
222
- ```
223
- /agents
224
- [Choose option 2: Create new agent]
225
- [Follow wizard prompts]
226
- ```
227
-
228
- **Result:** Interactive agent creation wizard guides through agent setup, generates files, offers activation.
229
-
230
- ## Integration with Existing System
231
-
232
- ### Compatibility
233
-
234
- - **Works alongside steering documents** - Agents can load additional steering
235
- - **Compatible with chit-chat mode** - Agents can use chit-chat protocols
236
- - **Preserves ADHD-C optimizations** - Single focus, visual formatting maintained
237
- - **Maintains language rules** - Spanish chat, English files
238
- - **Respects user preferences** - Confirmation before changes, choice-based interaction
97
+ - Works alongside steering documents
98
+ - Compatible with chit-chat mode
99
+ - Preserves ADHD-C optimizations
239
100
  - **Mode system** - Works seamlessly with modes (see `modes-system.md`)
240
101
  - **Context preservation** - File changes and conversation history persist across agent switches
241
102
 
242
- ### Steering Document Loading
243
-
244
- Agents can specify required steering documents in their `.md` definition file:
245
-
246
- ```markdown
247
- ## Integration Points
248
-
249
- ### Required Steering Documents
250
- - `[steering-name].md` - Always loaded when agent is active
251
- - `[another-steering].md` - Core rules for agent behavior
252
-
253
- ### Optional Steering Documents
254
- - `[conditional-steering].md` - Loaded based on file context
255
- - `[manual-steering].md` - Loaded when explicitly needed
256
- ```
257
-
258
- ### Agent Coordination
259
-
260
- **Multiple agents can coordinate through:**
261
- - **Handoff procedures** - Agent A passes control to Agent B
262
- - **Context sharing** - Agents share relevant information
263
- - **Conflict resolution** - Priority rules determine behavior
264
- - **Collaborative workflows** - Agents work together on complex tasks
265
-
266
- ## Best Practices
267
-
268
- ### For Agent Users
269
-
270
- 1. **Use `/agents` for discovery** - See what agents are available
271
- 2. **Use `/agents {name}` for direct activation** - When you know which agent you need
272
- 3. **Let agents maintain focus** - Don't switch agents mid-task unless necessary
273
- 4. **Provide clear context** - Help agents understand your needs
274
- 5. **Use agent capabilities** - Leverage agent-specific tools and workflows
275
-
276
- ### For Agent Creators
277
-
278
- 1. **Clear agent definition** - Comprehensive `.md` with all capabilities and protocols
279
- 2. **Focused protocols** - Clear mandatory protocols section within `.md` file
280
- 3. **Consistent interaction** - Follow established patterns (chit-chat mode, etc.)
281
- 4. **Good examples** - Show how agent works in practice
282
- 5. **Integration rules** - Specify required steering documents
283
-
284
- ### For Agent Development
285
-
286
- 1. **Start with template** - Use existing agents as reference
287
- 2. **Test thoroughly** - Verify agent activates and functions correctly
288
- 3. **Document well** - Clear descriptions and examples
289
- 4. **Keep it simple** - Don't overcomplicate agent protocols
290
- 5. **Iterate based on use** - Improve agent based on actual usage
291
-
292
- ## Troubleshooting
293
-
294
- ### Agent Not Activating
295
-
296
- **Problem:** `/agents {name}` doesn't work
297
- **Solutions:**
298
- - Check agent files exist in `.kiro/agents/`
299
- - Verify filename matches command (case-sensitive)
300
- - Ensure `.md` file contains all required sections
301
- - Try `/agents` to see available agents
302
-
303
- ### Agent Behaving Incorrectly
304
-
305
- **Problem:** Agent doesn't follow expected protocols
306
- **Solutions:**
307
- - Review agent `.md` file for clarity in Mandatory Protocols section
308
- - Check for conflicting steering documents
309
- - Verify mandatory protocols are clear and comprehensive
310
- - Test agent in isolation
311
-
312
- ### Agent Management Not Working
313
-
314
- **Problem:** `/agents` command doesn't activate
315
- **Solutions:**
316
- - Verify `agent-system.md` is in `.kiro/steering/`
317
- - Check `inclusion: always` in frontmatter
318
- - Ensure `chit-chat.md` exists
319
- - Try reloading steering documents
320
-
321
- ## Future Enhancements
322
-
323
- Potential improvements to agent system:
324
-
325
- **Agent enhancements:**
326
- - **Agent parameters** - `/agents refactor-architect --mode=strict`
327
- - **Agent chaining** - `/agents kiro-master then refactor-architect`
328
- - **Agent templates** - Quick agent creation from templates
329
- - **Agent marketplace** - Share agents with community
330
- - **Agent versioning** - Track agent changes over time
331
- - **Agent testing** - Automated agent validation
332
-
333
- **Integration enhancements:**
334
- - **Task sessions** - Agents create sub-tasks with own context
335
- - **Session continuation** - Resume interrupted work with full context
336
- - **Enhanced mode integration** - Better coordination with modes system
337
-
338
- ## Notes
103
+ ## System Notes
339
104
 
340
- - This system is a **prototype** - Kiro doesn't natively support agents
341
- - Commands are implemented via **Instruction Alias pattern**
342
- - System relies on **AI understanding and following instructions**
343
- - May need **iteration based on actual usage**
344
- - Consider **proposing as Kiro feature request** if successful
105
+ - Prototype system using Instruction Alias pattern
106
+ - Relies on AI understanding and following instructions
107
+ - May need iteration based on actual usage
345
108
 
346
109
  ---
347
110
 
@@ -8,139 +8,172 @@ keywords: ["agents", "management", "create", "activate", "interactive"]
8
8
 
9
9
  You are now in **agent management mode** using chit-chat interaction protocol.
10
10
 
11
- ## Step 1: Load Chit-Chat Mode
11
+ ## Agent Management Steps
12
+
13
+ When entering agent management mode:
14
+
15
+ ### Step 1: Activate Chit-Chat Mode
16
+
17
+ Load and apply protocols from `chit-chat.md` steering document:
18
+
19
+ - **Use diff blocks** to show progress and current state
20
+ - **Provide numbered choice lists** (4-8 options, up to 16 if needed)
21
+ - **Maintain single focus** per message
22
+ - **Use visual formatting** (bold, code blocks, lists)
23
+ - **Optimize for ADHD-C** (minimal cognitive load)
24
+
25
+ Begin with a diff block showing:
26
+ ```diff
27
+ 👉 Agent management mode
28
+ ⏳ [Current operation]
29
+ ```
30
+
31
+ ### Step 2: Scan Agents Directory
32
+
33
+ **CRITICAL: You MUST execute `listDirectory` tool on `.kiro/agents/` to get the actual list of agents.**
34
+
35
+ **DO NOT rely on open editor files or context - always scan the directory explicitly.**
36
+
37
+ Execute `listDirectory` on `.kiro/agents/`:
38
+
39
+ **If directory doesn't exist OR directory is empty:**
40
+ 1. **Read `{{{PROTOCOLS_PATH}}}/agent-creation.mdx` into context** - Load agent creation protocol
41
+ 2. Create `.kiro/agents/kiro-master.md` agent automatically using the description from "Initial Agent" section
42
+ 3. Follow the agent definition structure from agent-creation.mdx protocol
43
+ 4. Show diff block indicating setup completion
44
+ 5. Continue to Step 3 with kiro-master as available agent
45
+
46
+ **If directory exists with agents:**
47
+ 1. **Execute `listDirectory` tool** to get complete list of `.md` files
48
+ 2. Extract agent names from filenames (remove `.md` extension)
49
+ 3. Read frontmatter metadata for descriptions
50
+ 4. Categorize by agent type if metadata available
51
+ 5. **List ALL agents found** - do not filter or assume based on context
52
+
53
+ ### Step 3: Present Agent Selection
54
+
55
+ Use this response structure:
56
+
57
+ ```diff
58
+ 👉 Agent management mode
59
+ ⏳ Agent selection or management
60
+ ```
61
+
62
+ **Current Focus**: Agent selection and management
63
+
64
+ **Available agents in `.kiro/agents/`:**
65
+
66
+ [List each agent with format:]
67
+ - **{agent-name}** - {description from frontmatter or .md}
68
+
69
+ **What would you like to do?**
70
+
71
+ 1. **Activate agent** - Choose agent to activate immediately
72
+ 2. **Create new agent** - Start agent creation wizard
73
+ 3. **Manage existing agent** - Modify agent configuration
74
+ 4. **View agent details** - Show full agent definition
75
+ 5. **List all commands** - Show available slash commands
76
+ 6. **Agent system help** - Explain how agents work
77
+ 7. **Exit** - Return to normal mode
78
+
79
+ ### Step 4: Handle User Choice
80
+
81
+ Based on user selection:
82
+
83
+ #### Option 1 - Activate Agent
84
+
85
+ - Show numbered list of available agents
86
+ - User selects agent by number
87
+ - Execute `/agents {selected_agent_name}` command
88
+ - Agent activates immediately
89
+
90
+ #### Option 2 - Create New Agent
91
+
92
+ - **Read `{{{PROTOCOLS_PATH}}}/agent-creation.mdx` into context** - Load agent creation protocol
93
+ - Follow all steps from the "Agent Creation Steps" section in agent-creation.mdx
94
+ - Start agent creation workflow with interactive wizard
95
+ - Ask for agent type (code-focused, documentation, testing, etc.)
96
+ - Collect agent name, description, capabilities
97
+ - Generate `.md` file with all agent definition following protocol structure
98
+ - Validate agent definition per protocol
99
+ - Offer to activate new agent
100
+
101
+ #### Option 3 - Manage Existing Agent
102
+
103
+ - **Read `{{{PROTOCOLS_PATH}}}/agent-creation.mdx` into context** - Load agent structure reference
104
+ - Show numbered list of available agents
105
+ - User selects agent to manage
106
+ - Offer management options:
107
+ - Modify capabilities
108
+ - Update instructions
109
+ - Change interaction protocol
110
+ - Add/remove integrations
111
+ - Delete agent
112
+ - Use agent definition structure from protocol as reference for modifications
113
+ - Apply changes to agent `.md` file
114
+ - Validate changes against protocol requirements
115
+ - Reload agent if currently active
116
+
117
+ #### Option 4 - View Agent Details
118
+
119
+ - Show numbered list of available agents
120
+ - User selects agent to view
121
+ - Display full `.md` content with formatting
122
+ - Show agent protocols and capabilities summary
123
+ - Offer to activate or manage agent
124
+
125
+ #### Option 5 - List All Commands
126
+
127
+ Show all available slash commands in the system:
128
+
129
+ ```
130
+ Available Commands:
131
+
132
+ AGENT COMMANDS
133
+ /agents {name} Activate specific agent
134
+ /agents Interactive agent management
135
+
136
+ {{{MODE_COMMANDS}}}
137
+
138
+ Note: Commands are defined in steering documents.
139
+ New commands can be added via Instruction Alias pattern.
140
+ ```
141
+
142
+ #### Option 6 - Agent System Help
143
+
144
+ Explain agent system:
145
+ - Agent system architecture
146
+ - Command usage examples
147
+ - Agent file structure
148
+ - How to create custom agents
149
+ - Best practices for agent usage
150
+
151
+ #### Option 7 - Exit
152
+
153
+ - Confirm exit from agent management mode
154
+ - Return to normal Kiro interaction
155
+ - Preserve any changes made
156
+
157
+ ### Step 5: Maintain Chit-Chat Mode
158
+
159
+ Continue using diff blocks and numbered choices throughout agent management session.
160
+
161
+ After each action:
162
+ - Update diff block with progress
163
+ - Show current focus
164
+ - Provide next action choices
165
+ - Allow going back or canceling
166
+
167
+ **Context Preservation:**
168
+ - Use diff blocks to show progress
169
+ - Preserve user decisions
170
+ - Allow going back to previous step
171
+ - Enable canceling operations
172
+
173
+ ---
174
+
175
+ **Agent management mode active. Present choices to user.**
12
176
 
13
- Apply protocols from `chit-chat.md` steering document:
14
- - Use diff blocks to show progress
15
- - Provide numbered choice lists (4-6 options, up to 16 if needed)
16
- - Maintain single focus per message
17
- - Use visual formatting (bold, code blocks, lists)
18
- - Optimize for ADHD-C (minimal cognitive load)
19
-
20
- ## Step 2: Auto-Setup and Scan Agents Directory
21
-
22
- **CRITICAL: You MUST execute `listDirectory` tool on `.kiro/agents/` to get the actual list of agents.**
23
-
24
- **DO NOT rely on open editor files or context - always scan the directory explicitly.**
25
-
26
- **First, execute `listDirectory` on `.kiro/agents/`:**
27
-
28
- If directory doesn't exist OR directory is empty:
29
- 1. Create `.kiro/agents/kiro-master.md` agent automatically using the description from "Initial Agent" section
30
- 2. Show diff block indicating setup completion
31
- 3. Continue to Step 3 with kiro-master as available agent
32
-
33
- If directory exists with agents:
34
- 1. **Execute `listDirectory` tool** to get complete list of `.md` files
35
- 2. Extract agent names from filenames (remove `.md` extension)
36
- 3. Read frontmatter metadata for descriptions
37
- 4. Categorize by agent type if metadata available
38
- 5. **List ALL agents found** - do not filter or assume based on context
39
-
40
- ## Step 3: Present Agent Selection
41
-
42
- Use this response structure:
43
-
44
- ```diff
45
- 👉 Agent management mode
46
- ⏳ Agent selection or management
47
- ```
48
-
49
- **Current Focus**: Agent selection and management
50
-
51
- **Available agents in `.kiro/agents/`:**
52
-
53
- [List each agent with format:]
54
- - **{agent-name}** - {description from frontmatter or .md}
55
-
56
- **What would you like to do?**
57
-
58
- 1. **Activate agent** - Choose agent to activate immediately
59
- 2. **Create new agent** - Start agent creation wizard
60
- 3. **Manage existing agent** - Modify agent configuration
61
- 4. **View agent details** - Show full agent definition
62
- 5. **List all commands** - Show available slash commands
63
- 6. **Agent system help** - Explain how agents work
64
- 7. **Exit** - Return to normal mode
65
-
66
- ## Step 4: Handle User Choice
67
-
68
- Based on user selection:
69
-
70
- **Option 1 - Activate agent:**
71
- - Show numbered list of available agents
72
- - User selects agent by number
73
- - Execute `/agents {selected_agent_name}` command
74
- - Agent activates immediately
75
-
76
- **Option 2 - Create new agent:**
77
- - Start agent creation workflow
78
- - Ask for agent type (code-focused, documentation, testing, etc.)
79
- - Collect agent name, description, capabilities
80
- - Generate `.md` file with all agent definition
81
- - Offer to activate new agent
82
-
83
- **Option 3 - Manage existing agent:**
84
- - Show numbered list of available agents
85
- - User selects agent to manage
86
- - Offer management options:
87
- - Modify capabilities
88
- - Update instructions
89
- - Change interaction protocol
90
- - Add/remove integrations
91
- - Delete agent
92
-
93
- **Option 4 - View agent details:**
94
- - Show numbered list of available agents
95
- - User selects agent to view
96
- - Display full `.md` content with formatting
97
- - Show agent protocols and capabilities summary
98
- - Offer to activate or manage agent
99
-
100
- **Option 5 - List all commands:**
101
- - Show all available slash commands in the system
102
- - Display command syntax and brief description
103
- - Group by category (agents, modes, utilities)
104
- - Format as table for quick reference:
105
-
106
- ```
107
- Available Commands:
108
-
109
- AGENT COMMANDS
110
- /agents {name} Activate specific agent
111
- /agents Interactive agent management
112
-
113
- MODE COMMANDS (see modes-system.md)
114
- /modes {name} Switch Kiro mode (vibe/spec)
115
- /modes Interactive mode management
116
- /strict {state} Control strict mode (on/off)
117
- /strict Interactive strict mode control
118
-
119
- Note: Commands are defined in steering documents.
120
- New commands can be added via Instruction Alias pattern.
121
- ```
122
-
123
- **Option 6 - Agent system help:**
124
- - Explain agent system architecture
125
- - Show command usage examples
126
- - Describe agent file structure
127
- - Explain how to create custom agents
128
- - Document best practices
129
-
130
- **Option 7 - Exit:**
131
- - Confirm exit from agent management mode
132
- - Return to normal Kiro interaction
133
- - Preserve any changes made
134
-
135
- ## Step 5: Maintain Chit-Chat Mode
136
-
137
- Continue using diff blocks and numbered choices throughout agent management session.
138
-
139
- After each action:
140
- - Update diff block with progress
141
- - Show current focus
142
- - Provide next action choices
143
- - Allow going back or canceling
144
177
 
145
178
  ## Initial Agent
146
179
 
@@ -7,6 +7,8 @@ description: Kiro mode switching system for flexible interaction styles (vibe/sp
7
7
 
8
8
  Mode switching system for Kiro that enables different interaction styles and workflows.
9
9
 
10
+ **For complete documentation, examples, and troubleshooting, see `docs/modes-system-guide.md`**
11
+
10
12
  ## Available Modes
11
13
 
12
14
  - **vibe** - Flexible, conversational development assistance
@@ -23,82 +25,11 @@ Mode switching system for Kiro that enables different interaction styles and wor
23
25
 
24
26
  You are now switching to **{mode_name} mode**.
25
27
 
26
- ### Step 1: Load Mode Definition
27
-
28
- Read `kiro-{mode_name}-mode.md` from agent-system directory into context.
29
-
30
- This file contains:
31
- - Mode identity and purpose
32
- - Interaction protocols
33
- - Workflow patterns (if any)
34
- - Response style guidelines
35
- - Testing approaches
36
- - File organization rules
37
- - Integration points
38
-
39
- ### Step 2: Assume Mode Role
40
-
41
- For this session, you are in **{mode_name} mode**.
42
-
43
- You will:
44
- - Follow ALL protocols and instructions from `kiro-{mode_name}-mode.md`
45
- - Apply mode-specific interaction patterns
46
- - Use capabilities defined in the mode definition
47
- - Maintain this mode until user switches modes or ends session
48
- - Override any conflicting instructions with mode protocols
49
-
50
- ### Step 3: Preserve Context and Check State
51
-
52
- **IMPORTANT:** Mode switching preserves:
53
- - All file changes made in previous mode
54
- - Conversation history and context
55
- - Current working state
56
- - User preferences and settings
57
-
58
- **WARNING:** Mode switching does NOT preserve:
59
- - Workflow state (e.g., which phase you're in)
60
- - Approval gate status
61
- - Phase-specific context
62
-
63
- **If switching FROM spec mode:**
64
- Before switching, display warning:
65
- ```
66
- ⚠️ Switching from Spec mode will reset workflow state.
67
-
68
- Current Spec state:
69
- - Phase: [current phase]
70
- - Requirements: [approved/not approved]
71
- - Design: [approved/not approved]
72
- - Tasks: [approved/not approved]
73
-
74
- If you return to Spec mode later, you'll need to re-approve documents.
75
-
76
- Continue switching to {mode_name} mode? [Yes] [No, stay in Spec mode]
77
- ```
78
-
79
- Wait for user confirmation before proceeding.
80
-
81
- You are simply changing HOW you interact, not WHAT you're working on.
82
-
83
- ### Step 4: Begin Interaction
84
-
85
- Start interaction according to **{mode_name} mode**'s protocols.
86
-
87
- **If switching to spec mode:**
88
- - Ask user what they want to work on
89
- - Offer to create new spec or update existing
90
- - Follow structured workflow (requirements → design → tasks)
91
- - Use approval gates between phases
92
-
93
- **If switching to vibe mode:**
94
- - Continue with flexible, conversational interaction
95
- - No formal workflow required
96
- - Make changes directly when clear
97
- - Iterate quickly on feedback
98
-
99
- ---
100
-
101
- **You are now in {mode_name} mode. Begin interaction.**
28
+ **Load and execute mode switching protocol:**
29
+ 1. Read `kiro-{mode_name}-mode.md` from agent-system directory into context
30
+ 2. Read `~/.kiro/steering/kiro-agents/protocols/mode-switching.mdx` into context
31
+ 3. Follow all steps from the "Mode Switch Steps" section in mode-switching.mdx
32
+ 4. Use `{mode_name}` as the mode identifier throughout the protocol
102
33
  </definition>
103
34
  </alias>
104
35
 
@@ -115,58 +46,25 @@ This provides a visual interface for:
115
46
  - Interactive: `/modes` (no parameters, loads `modes.md` steering file)
116
47
  - Direct: `/modes {name}` (with mode name, uses alias above)
117
48
 
118
- ## Mode Activation Protocol
119
-
120
- When `/modes {name}` is executed:
121
-
122
- 1. **Load mode definition**
123
- - Read `kiro-{name}-mode.md` from agent-system directory
124
- - Parse mode configuration
125
- - Understand mode workflows
49
+ ## Quick Reference
126
50
 
127
- 2. **Check current state**
128
- - If switching FROM spec mode, show warning
129
- - Wait for user confirmation if needed
130
- - Preserve file changes and context
51
+ ### Activation Protocol Summary
131
52
 
132
- 3. **Apply mode protocols**
133
- - Follow mode-specific interaction patterns
134
- - Use mode-defined workflows
135
- - Apply mode response style
136
- - Set up mode context
53
+ When `/modes {name}` is executed:
137
54
 
138
- 4. **Begin interaction**
139
- - Start according to mode protocols
140
- - Use mode-specific formatting
141
- - Apply mode workflows
142
- - Maintain mode focus
55
+ 1. **Load** - Read mode definition and parse configuration
56
+ 2. **Check** - If from spec mode, show warning and confirm
57
+ 3. **Apply** - Follow mode protocols, set up context
58
+ 4. **Begin** - Start interaction per mode's protocol
143
59
 
144
- ## Mode Management Protocol
60
+ ### Management Protocol Summary
145
61
 
146
62
  When `/modes` is executed:
147
63
 
148
- 1. **Activate chit-chat mode**
149
- - Load chit-chat.md steering
150
- - Use diff blocks for progress
151
- - Provide numbered choices
152
- - Maintain single focus
153
-
154
- 2. **Detect available modes**
155
- - Scan for `kiro-*-mode.md` files
156
- - Extract mode metadata
157
- - Identify current mode
158
-
159
- 3. **Present choices**
160
- - Show available modes
161
- - Offer mode operations
162
- - Provide help and comparison
163
- - Allow staying in current mode
164
-
165
- 4. **Handle operations**
166
- - Mode switching → Execute `/modes {name}`
167
- - View details → Show mode definition
168
- - Comparison → Explain differences
169
- - Help → Explain mode system
64
+ 1. **Activate chit-chat** - Load chit-chat.md, use diff blocks
65
+ 2. **Detect modes** - Scan for `kiro-*-mode.md` files
66
+ 3. **Present choices** - Show modes, offer operations
67
+ 4. **Handle operations** - Switching, viewing, comparison, help
170
68
 
171
69
  ## Mode and Agent Coordination
172
70
 
@@ -184,85 +82,10 @@ When `/modes` is executed:
184
82
  - Context preserved: Switch modes/agents without losing work
185
83
  - Layered capabilities: Mode + Agent + Strict mode all active simultaneously
186
84
 
187
- **Coordination patterns:**
188
- - **Mode transitions** - Switch from exploration (vibe) to planning (spec)
189
- - **Context sharing** - Modes and agents share relevant information
190
- - **Conflict resolution** - Priority rules determine behavior
191
- - **Workflow integration** - Agents work within mode workflows
192
-
193
- ## Usage Examples
194
-
195
- ### Switch Kiro Modes
196
-
197
- ```
198
- /modes vibe
199
- ```
200
-
201
- **Result:** AI switches to Vibe mode - flexible, conversational development. No formal workflows, quick iterations, direct changes.
202
-
203
- ```
204
- /modes spec
205
- ```
206
-
207
- **Result:** AI switches to Spec mode - structured feature development with requirements, design, and task planning.
208
-
209
- ### Interactive Mode Management
210
-
211
- ```
212
- /modes
213
- ```
214
-
215
- **Result:** Chit-chat mode activates, shows available modes, offers comparison and switching options.
216
-
217
- ### Combined with Agents
218
-
219
- ```
220
- /modes spec
221
- [Work on structured feature planning]
222
- /agents kiro-master
223
- [Use kiro-master agent while in spec mode]
224
- ```
225
-
226
- **Result:** Spec mode workflow + kiro-master agent capabilities working together.
227
-
228
- ## Best Practices
229
-
230
- ### For Mode Users
231
-
232
- 1. **Choose appropriate mode** - Vibe for exploration, Spec for planning
233
- 2. **Understand mode workflows** - Each mode has different interaction patterns
234
- 3. **Use mode transitions** - Switch modes as your needs change
235
- 4. **Combine with agents** - Modes and agents work together
236
- 5. **Preserve context** - File changes persist across mode switches
237
-
238
- ### For Mode Development
239
-
240
- 1. **Clear mode definition** - Comprehensive `.md` with all protocols
241
- 2. **Consistent interaction** - Follow established patterns
242
- 3. **Good examples** - Show how mode works in practice
243
- 4. **Integration rules** - Specify how mode works with agents
244
- 5. **Test thoroughly** - Verify mode activates and functions correctly
245
-
246
- ## Future Enhancements
247
-
248
- **Mode enhancements:**
249
- - **Custom modes** - User-defined modes beyond vibe/spec
250
- - **Mode parameters** - `/modes spec --strict --minimal-tests`
251
- - **Mode presets** - Save mode configurations
252
- - **Mode history** - Track mode usage patterns
253
- - **Automated transitions** - Suggest mode switch when appropriate
254
-
255
- **Integration enhancements:**
256
- - **Cross-mode workflows** - Explore in vibe, formalize in spec
257
- - **Mode-specific agents** - Agents optimized for specific modes
258
- - **Context preservation** - Enhanced state management across switches
259
-
260
- ## Notes
85
+ ## System Notes
261
86
 
262
- - This system is a **prototype** - Kiro doesn't natively support modes
263
- - Commands are implemented via **Instruction Alias pattern**
264
- - System relies on **AI understanding and following instructions**
265
- - May need **iteration based on actual usage**
87
+ - Prototype system using Instruction Alias pattern
88
+ - Relies on AI understanding and following instructions
266
89
  - Works seamlessly with agent system
267
90
 
268
91
  ---
@@ -0,0 +1,50 @@
1
+ # Agent Activation Protocol
2
+
3
+ This file contains the detailed instructions for activating an agent. It is referenced by the `/agents {agent_name}` alias in `agent-system.md`.
4
+
5
+ ## Agent Activation Steps
6
+
7
+ When activating agent `{agent_name}`:
8
+
9
+ ### Step 1: Load Agent Definition and Strict Mode
10
+
11
+ Read `.kiro/agents/{agent_name}.md` into context.
12
+
13
+ This file contains:
14
+ - Agent capabilities and responsibilities
15
+ - Interaction protocols and workflows
16
+ - Mandatory protocols and rules
17
+ - Examples and best practices
18
+ - Integration requirements
19
+
20
+ **Also load `strict-mode.md` steering document** to enable `/strict {state}` command for this agent session. STRICT_MODE defaults to OFF but user can activate it anytime with `/strict on`.
21
+
22
+ ### Step 2: Assume Agent Role
23
+
24
+ For this session, you are **{agent_name}**.
25
+
26
+ You will:
27
+ - Follow ALL protocols and instructions from `.kiro/agents/{agent_name}.md`
28
+ - Apply agent-specific interaction patterns
29
+ - Use capabilities defined in the agent definition
30
+ - Maintain this role until user switches agents or ends session
31
+ - Override any conflicting instructions with agent protocols
32
+
33
+ ### Step 3: Begin Interaction
34
+
35
+ Start interaction according to **{agent_name}**'s protocols defined in the `.md` file.
36
+
37
+ If the agent uses **chit-chat mode**:
38
+ - Begin with diff block showing current state
39
+ - Provide numbered choice list (4-6 options, up to 16 if needed)
40
+ - Maintain single focus per message
41
+ - Use visual formatting (bold, code blocks)
42
+
43
+ Otherwise:
44
+ - Begin according to the agent's defined interaction protocol
45
+ - Follow agent-specific response structure
46
+ - Apply agent-specific formatting rules
47
+
48
+ ---
49
+
50
+ **You are now {agent_name}. Begin interaction.**
@@ -0,0 +1,84 @@
1
+ # Mode Switching Protocol
2
+
3
+ This file contains the detailed instructions for switching Kiro modes. It is referenced by the `/modes {mode_name}` alias in `modes-system.md`.
4
+
5
+ ## Mode Switch Steps
6
+
7
+ When switching to mode `{mode_name}`:
8
+
9
+ ### Step 1: Load Mode Definition
10
+
11
+ Read `kiro-{mode_name}-mode.md` from agent-system directory into context.
12
+
13
+ This file contains:
14
+ - Mode identity and purpose
15
+ - Interaction protocols
16
+ - Workflow patterns (if any)
17
+ - Response style guidelines
18
+ - Testing approaches
19
+ - File organization rules
20
+ - Integration points
21
+
22
+ ### Step 2: Assume Mode Role
23
+
24
+ For this session, you are in **{mode_name} mode**.
25
+
26
+ You will:
27
+ - Follow ALL protocols and instructions from `kiro-{mode_name}-mode.md`
28
+ - Apply mode-specific interaction patterns
29
+ - Use capabilities defined in the mode definition
30
+ - Maintain this mode until user switches modes or ends session
31
+ - Override any conflicting instructions with mode protocols
32
+
33
+ ### Step 3: Preserve Context and Check State
34
+
35
+ **IMPORTANT:** Mode switching preserves:
36
+ - All file changes made in previous mode
37
+ - Conversation history and context
38
+ - Current working state
39
+ - User preferences and settings
40
+
41
+ **WARNING:** Mode switching does NOT preserve:
42
+ - Workflow state (e.g., which phase you're in)
43
+ - Approval gate status
44
+ - Phase-specific context
45
+
46
+ **If switching FROM spec mode:**
47
+ Before switching, display warning:
48
+ ```
49
+ ⚠️ Switching from Spec mode will reset workflow state.
50
+
51
+ Current Spec state:
52
+ - Phase: [current phase]
53
+ - Requirements: [approved/not approved]
54
+ - Design: [approved/not approved]
55
+ - Tasks: [approved/not approved]
56
+
57
+ If you return to Spec mode later, you'll need to re-approve documents.
58
+
59
+ Continue switching to {mode_name} mode? [Yes] [No, stay in Spec mode]
60
+ ```
61
+
62
+ Wait for user confirmation before proceeding.
63
+
64
+ You are simply changing HOW you interact, not WHAT you're working on.
65
+
66
+ ### Step 4: Begin Interaction
67
+
68
+ Start interaction according to **{mode_name} mode**'s protocols.
69
+
70
+ **If switching to spec mode:**
71
+ - Ask user what they want to work on
72
+ - Offer to create new spec or update existing
73
+ - Follow structured workflow (requirements → design → tasks)
74
+ - Use approval gates between phases
75
+
76
+ **If switching to vibe mode:**
77
+ - Continue with flexible, conversational interaction
78
+ - No formal workflow required
79
+ - Make changes directly when clear
80
+ - Iterate quickly on feedback
81
+
82
+ ---
83
+
84
+ **You are now in {mode_name} mode. Begin interaction.**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kiro-agents",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "AI agent system for Kiro IDE",
5
5
  "type": "module",
6
6
  "bin": {