kiro-agents 1.0.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.
- package/README.md +223 -0
- package/bin/cli.ts +74 -0
- package/dist/agent-system/interactions/chit-chat.md +212 -0
- package/dist/agent-system/interactions/interaction-styles.md +162 -0
- package/dist/agent-system/kiro-spec-mode.md +268 -0
- package/dist/agent-system/kiro-vibe-mode.md +298 -0
- package/dist/agent-system/strict-mode.md +96 -0
- package/dist/agent-system/tools/client-tools.md +21 -0
- package/dist/agent-system.md +512 -0
- package/dist/modes-system.md +368 -0
- package/package.json +30 -0
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
---
|
|
2
|
+
inclusion: always
|
|
3
|
+
description: Kiro mode switching system for flexible interaction styles (vibe/spec modes)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Modes System
|
|
7
|
+
|
|
8
|
+
Mode switching system for Kiro that enables different interaction styles and workflows.
|
|
9
|
+
|
|
10
|
+
## Available Modes
|
|
11
|
+
|
|
12
|
+
- **vibe** - Flexible, conversational development assistance
|
|
13
|
+
- **spec** - Structured feature development with requirements, design, and tasks
|
|
14
|
+
|
|
15
|
+
## Mode Commands
|
|
16
|
+
|
|
17
|
+
### Command 1: Switch Kiro Mode
|
|
18
|
+
|
|
19
|
+
<alias>
|
|
20
|
+
<trigger>/mode {mode_name}</trigger>
|
|
21
|
+
<definition>
|
|
22
|
+
## Mode Switch: {mode_name}
|
|
23
|
+
|
|
24
|
+
You are now switching to **{mode_name} mode**.
|
|
25
|
+
|
|
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
|
+
**Also load `strict-mode.md` steering document** to enable `/strict {state}` command for this mode. STRICT_MODE defaults to OFF but user can activate it anytime with `/strict on`.
|
|
40
|
+
|
|
41
|
+
### Step 2: Assume Mode Role
|
|
42
|
+
|
|
43
|
+
For this session, you are in **{mode_name} mode**.
|
|
44
|
+
|
|
45
|
+
You will:
|
|
46
|
+
- Follow ALL protocols and instructions from `kiro-{mode_name}-mode.md`
|
|
47
|
+
- Apply mode-specific interaction patterns
|
|
48
|
+
- Use capabilities defined in the mode definition
|
|
49
|
+
- Maintain this mode until user switches modes or ends session
|
|
50
|
+
- Override any conflicting instructions with mode protocols
|
|
51
|
+
|
|
52
|
+
### Step 3: Preserve Context and Check State
|
|
53
|
+
|
|
54
|
+
**IMPORTANT:** Mode switching preserves:
|
|
55
|
+
- All file changes made in previous mode
|
|
56
|
+
- Conversation history and context
|
|
57
|
+
- Current working state
|
|
58
|
+
- User preferences and settings
|
|
59
|
+
|
|
60
|
+
**WARNING:** Mode switching does NOT preserve:
|
|
61
|
+
- Workflow state (e.g., which phase you're in)
|
|
62
|
+
- Approval gate status
|
|
63
|
+
- Phase-specific context
|
|
64
|
+
|
|
65
|
+
**If switching FROM spec mode:**
|
|
66
|
+
Before switching, display warning:
|
|
67
|
+
```
|
|
68
|
+
⚠️ Switching from Spec mode will reset workflow state.
|
|
69
|
+
|
|
70
|
+
Current Spec state:
|
|
71
|
+
- Phase: [current phase]
|
|
72
|
+
- Requirements: [approved/not approved]
|
|
73
|
+
- Design: [approved/not approved]
|
|
74
|
+
- Tasks: [approved/not approved]
|
|
75
|
+
|
|
76
|
+
If you return to Spec mode later, you'll need to re-approve documents.
|
|
77
|
+
|
|
78
|
+
Continue switching to {mode_name} mode? [Yes] [No, stay in Spec mode]
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Wait for user confirmation before proceeding.
|
|
82
|
+
|
|
83
|
+
You are simply changing HOW you interact, not WHAT you're working on.
|
|
84
|
+
|
|
85
|
+
### Step 4: Begin Interaction
|
|
86
|
+
|
|
87
|
+
Start interaction according to **{mode_name} mode**'s protocols.
|
|
88
|
+
|
|
89
|
+
**If switching to spec mode:**
|
|
90
|
+
- Ask user what they want to work on
|
|
91
|
+
- Offer to create new spec or update existing
|
|
92
|
+
- Follow structured workflow (requirements → design → tasks)
|
|
93
|
+
- Use approval gates between phases
|
|
94
|
+
|
|
95
|
+
**If switching to vibe mode:**
|
|
96
|
+
- Continue with flexible, conversational interaction
|
|
97
|
+
- No formal workflow required
|
|
98
|
+
- Make changes directly when clear
|
|
99
|
+
- Iterate quickly on feedback
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
**You are now in {mode_name} mode. Begin interaction.**
|
|
104
|
+
</definition>
|
|
105
|
+
</alias>
|
|
106
|
+
|
|
107
|
+
### Command 2: Interactive Mode Management
|
|
108
|
+
|
|
109
|
+
<alias>
|
|
110
|
+
<trigger>/modes</trigger>
|
|
111
|
+
<definition>
|
|
112
|
+
## Mode Management
|
|
113
|
+
|
|
114
|
+
You are now in **mode management** using chit-chat interaction protocol.
|
|
115
|
+
|
|
116
|
+
### Step 1: Load Chit-Chat Mode
|
|
117
|
+
|
|
118
|
+
Apply protocols from `chit-chat.md` steering document:
|
|
119
|
+
- Use diff blocks to show progress
|
|
120
|
+
- Provide numbered choice lists (4-6 options)
|
|
121
|
+
- Maintain single focus per message
|
|
122
|
+
- Use visual formatting (bold, code blocks, lists)
|
|
123
|
+
|
|
124
|
+
### Step 2: Detect Available Modes
|
|
125
|
+
|
|
126
|
+
Scan agent-system directory for `kiro-*-mode.md` files:
|
|
127
|
+
- Extract mode names from filenames
|
|
128
|
+
- Read frontmatter for descriptions
|
|
129
|
+
- Identify current mode from context
|
|
130
|
+
|
|
131
|
+
### Step 3: Present Mode Selection
|
|
132
|
+
|
|
133
|
+
Use this response structure:
|
|
134
|
+
|
|
135
|
+
```diff
|
|
136
|
+
👉 Mode management
|
|
137
|
+
⏳ Mode selection
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
**Current mode:** [current_mode]
|
|
141
|
+
|
|
142
|
+
**Available Kiro modes:**
|
|
143
|
+
|
|
144
|
+
- **vibe** - Flexible, conversational development assistance
|
|
145
|
+
- **spec** - Structured feature development with requirements, design, and tasks
|
|
146
|
+
|
|
147
|
+
**What would you like to do?**
|
|
148
|
+
|
|
149
|
+
1. **Switch to vibe mode** - Flexible development and quick iterations
|
|
150
|
+
2. **Switch to spec mode** - Structured feature planning and implementation
|
|
151
|
+
3. **View mode details** - See full mode capabilities and protocols
|
|
152
|
+
4. **Mode comparison** - Understand differences between modes
|
|
153
|
+
5. **Stay in current mode** - Continue with current mode
|
|
154
|
+
6. **Help** - Learn about mode system
|
|
155
|
+
|
|
156
|
+
### Step 4: Handle User Choice
|
|
157
|
+
|
|
158
|
+
Based on user selection:
|
|
159
|
+
|
|
160
|
+
**Option 1 - Switch to vibe:**
|
|
161
|
+
- Execute `/mode vibe` command
|
|
162
|
+
- Load vibe mode protocols
|
|
163
|
+
- Begin flexible interaction
|
|
164
|
+
|
|
165
|
+
**Option 2 - Switch to spec:**
|
|
166
|
+
- Execute `/mode spec` command
|
|
167
|
+
- Load spec mode protocols
|
|
168
|
+
- Begin structured workflow
|
|
169
|
+
|
|
170
|
+
**Option 3 - View mode details:**
|
|
171
|
+
- Show numbered list of modes
|
|
172
|
+
- User selects mode to view
|
|
173
|
+
- Display full mode definition
|
|
174
|
+
- Explain capabilities and use cases
|
|
175
|
+
- Offer to switch to that mode
|
|
176
|
+
|
|
177
|
+
**Option 4 - Mode comparison:**
|
|
178
|
+
- Show side-by-side comparison
|
|
179
|
+
- Explain when to use each mode
|
|
180
|
+
- Highlight key differences
|
|
181
|
+
- Help user choose appropriate mode
|
|
182
|
+
|
|
183
|
+
**Option 5 - Stay in current mode:**
|
|
184
|
+
- Confirm staying in current mode
|
|
185
|
+
- Return to normal interaction
|
|
186
|
+
- Preserve current state
|
|
187
|
+
|
|
188
|
+
**Option 6 - Help:**
|
|
189
|
+
- Explain mode system
|
|
190
|
+
- Show switching commands
|
|
191
|
+
- Describe mode benefits
|
|
192
|
+
- Provide usage examples
|
|
193
|
+
|
|
194
|
+
### Step 5: Maintain Chit-Chat Mode
|
|
195
|
+
|
|
196
|
+
Continue using diff blocks and numbered choices throughout mode management.
|
|
197
|
+
|
|
198
|
+
After each action:
|
|
199
|
+
- Update diff block with progress
|
|
200
|
+
- Show current focus
|
|
201
|
+
- Provide next action choices
|
|
202
|
+
- Allow going back or canceling
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
**Begin mode management now.**
|
|
207
|
+
</definition>
|
|
208
|
+
</alias>
|
|
209
|
+
|
|
210
|
+
## Mode Activation Protocol
|
|
211
|
+
|
|
212
|
+
When `/mode {name}` is executed:
|
|
213
|
+
|
|
214
|
+
1. **Load mode definition**
|
|
215
|
+
- Read `kiro-{name}-mode.md` from agent-system directory
|
|
216
|
+
- Load `strict-mode.md` steering document
|
|
217
|
+
- Parse mode configuration
|
|
218
|
+
- Understand mode workflows
|
|
219
|
+
|
|
220
|
+
2. **Check current state**
|
|
221
|
+
- If switching FROM spec mode, show warning
|
|
222
|
+
- Wait for user confirmation if needed
|
|
223
|
+
- Preserve file changes and context
|
|
224
|
+
|
|
225
|
+
3. **Apply mode protocols**
|
|
226
|
+
- Follow mode-specific interaction patterns
|
|
227
|
+
- Use mode-defined workflows
|
|
228
|
+
- Apply mode response style
|
|
229
|
+
- Set up mode context
|
|
230
|
+
|
|
231
|
+
4. **Begin interaction**
|
|
232
|
+
- Start according to mode protocols
|
|
233
|
+
- Use mode-specific formatting
|
|
234
|
+
- Apply mode workflows
|
|
235
|
+
- Maintain mode focus
|
|
236
|
+
|
|
237
|
+
## Mode Management Protocol
|
|
238
|
+
|
|
239
|
+
When `/modes` is executed:
|
|
240
|
+
|
|
241
|
+
1. **Activate chit-chat mode**
|
|
242
|
+
- Load chit-chat.md steering
|
|
243
|
+
- Use diff blocks for progress
|
|
244
|
+
- Provide numbered choices
|
|
245
|
+
- Maintain single focus
|
|
246
|
+
|
|
247
|
+
2. **Detect available modes**
|
|
248
|
+
- Scan for `kiro-*-mode.md` files
|
|
249
|
+
- Extract mode metadata
|
|
250
|
+
- Identify current mode
|
|
251
|
+
|
|
252
|
+
3. **Present choices**
|
|
253
|
+
- Show available modes
|
|
254
|
+
- Offer mode operations
|
|
255
|
+
- Provide help and comparison
|
|
256
|
+
- Allow staying in current mode
|
|
257
|
+
|
|
258
|
+
4. **Handle operations**
|
|
259
|
+
- Mode switching → Execute `/mode {name}`
|
|
260
|
+
- View details → Show mode definition
|
|
261
|
+
- Comparison → Explain differences
|
|
262
|
+
- Help → Explain mode system
|
|
263
|
+
|
|
264
|
+
## Mode and Agent Coordination
|
|
265
|
+
|
|
266
|
+
**Modes provide the framework:**
|
|
267
|
+
- Vibe mode: Flexible, conversational interaction
|
|
268
|
+
- Spec mode: Structured workflow with approval gates
|
|
269
|
+
|
|
270
|
+
**Agents provide specialized capabilities:**
|
|
271
|
+
- kiro-master: Feature management and .kiro/ operations
|
|
272
|
+
- Custom agents: Domain-specific expertise
|
|
273
|
+
|
|
274
|
+
**They work together:**
|
|
275
|
+
- Modes can activate agents: `/mode spec` then `/agent kiro-master`
|
|
276
|
+
- Agents inherit mode protocols: Agent in spec mode follows spec workflow
|
|
277
|
+
- Context preserved: Switch modes/agents without losing work
|
|
278
|
+
- Layered capabilities: Mode + Agent + Strict mode all active simultaneously
|
|
279
|
+
|
|
280
|
+
**Coordination patterns:**
|
|
281
|
+
- **Mode transitions** - Switch from exploration (vibe) to planning (spec)
|
|
282
|
+
- **Context sharing** - Modes and agents share relevant information
|
|
283
|
+
- **Conflict resolution** - Priority rules determine behavior
|
|
284
|
+
- **Workflow integration** - Agents work within mode workflows
|
|
285
|
+
|
|
286
|
+
## Usage Examples
|
|
287
|
+
|
|
288
|
+
### Switch Kiro Modes
|
|
289
|
+
|
|
290
|
+
```
|
|
291
|
+
/mode vibe
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
**Result:** AI switches to Vibe mode - flexible, conversational development. No formal workflows, quick iterations, direct changes.
|
|
295
|
+
|
|
296
|
+
```
|
|
297
|
+
/mode spec
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
**Result:** AI switches to Spec mode - structured feature development with requirements, design, and task planning.
|
|
301
|
+
|
|
302
|
+
### Interactive Mode Management
|
|
303
|
+
|
|
304
|
+
```
|
|
305
|
+
/modes
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
**Result:** Chit-chat mode activates, shows available modes, offers comparison and switching options.
|
|
309
|
+
|
|
310
|
+
### Combined with Agents
|
|
311
|
+
|
|
312
|
+
```
|
|
313
|
+
/mode spec
|
|
314
|
+
[Work on structured feature planning]
|
|
315
|
+
/agent kiro-master
|
|
316
|
+
[Use kiro-master agent while in spec mode]
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
**Result:** Spec mode workflow + kiro-master agent capabilities working together.
|
|
320
|
+
|
|
321
|
+
## Best Practices
|
|
322
|
+
|
|
323
|
+
### For Mode Users
|
|
324
|
+
|
|
325
|
+
1. **Choose appropriate mode** - Vibe for exploration, Spec for planning
|
|
326
|
+
2. **Understand mode workflows** - Each mode has different interaction patterns
|
|
327
|
+
3. **Use mode transitions** - Switch modes as your needs change
|
|
328
|
+
4. **Combine with agents** - Modes and agents work together
|
|
329
|
+
5. **Preserve context** - File changes persist across mode switches
|
|
330
|
+
|
|
331
|
+
### For Mode Development
|
|
332
|
+
|
|
333
|
+
1. **Clear mode definition** - Comprehensive `.md` with all protocols
|
|
334
|
+
2. **Consistent interaction** - Follow established patterns
|
|
335
|
+
3. **Good examples** - Show how mode works in practice
|
|
336
|
+
4. **Integration rules** - Specify how mode works with agents
|
|
337
|
+
5. **Test thoroughly** - Verify mode activates and functions correctly
|
|
338
|
+
|
|
339
|
+
## Future Enhancements
|
|
340
|
+
|
|
341
|
+
**Mode enhancements:**
|
|
342
|
+
- **Custom modes** - User-defined modes beyond vibe/spec
|
|
343
|
+
- **Mode parameters** - `/mode spec --strict --minimal-tests`
|
|
344
|
+
- **Mode presets** - Save mode configurations
|
|
345
|
+
- **Mode history** - Track mode usage patterns
|
|
346
|
+
- **Automated transitions** - Suggest mode switch when appropriate
|
|
347
|
+
|
|
348
|
+
**Integration enhancements:**
|
|
349
|
+
- **Cross-mode workflows** - Explore in vibe, formalize in spec
|
|
350
|
+
- **Mode-specific agents** - Agents optimized for specific modes
|
|
351
|
+
- **Context preservation** - Enhanced state management across switches
|
|
352
|
+
|
|
353
|
+
## Notes
|
|
354
|
+
|
|
355
|
+
- This system is a **prototype** - Kiro doesn't natively support modes
|
|
356
|
+
- Commands are implemented via **Instruction Alias pattern**
|
|
357
|
+
- System relies on **AI understanding and following instructions**
|
|
358
|
+
- May need **iteration based on actual usage**
|
|
359
|
+
- Works seamlessly with agent system
|
|
360
|
+
|
|
361
|
+
---
|
|
362
|
+
|
|
363
|
+
**Modes system ready.**
|
|
364
|
+
|
|
365
|
+
**Quick start:**
|
|
366
|
+
- `/mode vibe` - Flexible development
|
|
367
|
+
- `/mode spec` - Structured planning
|
|
368
|
+
- `/modes` - Interactive mode management
|
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "kiro-agents",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "AI agent system for Kiro IDE",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"kiro-agents": "./bin/cli.ts"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"bin",
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "bun run scripts/build.ts",
|
|
15
|
+
"watch": "bun run scripts/build.ts --watch",
|
|
16
|
+
"clean": "bun run scripts/clean.ts"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"kiro",
|
|
20
|
+
"ai-agents"
|
|
21
|
+
],
|
|
22
|
+
"author": "R. Beltran",
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@types/bun": "latest"
|
|
26
|
+
},
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"typescript": "^5"
|
|
29
|
+
}
|
|
30
|
+
}
|