kiro-agents 1.0.2 → 1.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.
package/README.md CHANGED
@@ -14,13 +14,29 @@ kiro-agents is a steering document system that extends Kiro IDE with:
14
14
 
15
15
  ## Installation
16
16
 
17
+ ### Option 1: Global Installation (npm)
18
+
17
19
  ```bash
18
20
  npx kiro-agents
19
21
  # or
20
22
  bunx kiro-agents
21
23
  ```
22
24
 
23
- This installs steering documents to `~/.kiro/steering/` that enhance Kiro's AI capabilities.
25
+ This installs steering documents to `~/.kiro/steering/` (global, available in all workspaces).
26
+
27
+ ### Option 2: Workspace Installation (Kiro Power)
28
+
29
+ 1. Open Kiro IDE
30
+ 2. Open Powers panel (Ghosty icon ⚡)
31
+ 3. Click "Add power from GitHub"
32
+ 4. Enter: `https://github.com/theadd/kiro-agents`
33
+ 5. Click Install
34
+
35
+ This installs to `.kiro/powers/kiro-agents/` (workspace-specific).
36
+
37
+ **Differences:**
38
+ - **npm**: Global installation, available in all workspaces
39
+ - **Power**: Workspace-specific, auto-updates, better Kiro integration
24
40
 
25
41
  ## Core Features
26
42
 
@@ -34,8 +50,8 @@ Create specialized AI agents for different tasks. Each agent has:
34
50
  - Integration with other agents
35
51
 
36
52
  **Commands:**
37
- - `/agents` - Interactive agent management (create, activate, manage agents)
38
- - `/agent {name}` - Activate specific agent directly
53
+ - `/agents` - Interactive agent management (visual menu)
54
+ - `/agents {name}` - Activate specific agent directly
39
55
 
40
56
  **Example workflow:**
41
57
  ```
@@ -68,9 +84,9 @@ Switch between interaction styles based on your needs:
68
84
  - Property-based testing focus
69
85
 
70
86
  **Commands:**
71
- - `/modes` - Interactive mode management
72
- - `/mode vibe` - Switch to flexible development
73
- - `/mode spec` - Switch to structured planning
87
+ - `/modes` - Interactive mode management (visual menu)
88
+ - `/modes vibe` - Switch to flexible development
89
+ - `/modes spec` - Switch to structured planning
74
90
 
75
91
  ### Strict Mode
76
92
 
@@ -82,6 +98,7 @@ Precision mode for experimental or critical development:
82
98
  - Ideal for architectural decisions
83
99
 
84
100
  **Commands:**
101
+ - `/strict` - Interactive control (visual buttons)
85
102
  - `/strict on` - Activate precision mode
86
103
  - `/strict off` - Return to normal mode
87
104
 
@@ -98,33 +115,59 @@ This design reduces decision fatigue and maintains context during long conversat
98
115
 
99
116
  ## How It Works
100
117
 
101
- kiro-agents installs markdown files to `~/.kiro/steering/` that Kiro loads as steering documents. These documents:
118
+ kiro-agents provides steering documents that Kiro loads to enhance AI capabilities:
102
119
 
103
- 1. Define new slash commands (`/agent`, `/mode`, `/strict`, etc.)
104
- 2. Provide protocols for AI behavior
105
- 3. Enable agent and mode systems
106
- 4. Optimize interactions for reduced cognitive load
120
+ **npm installation:**
121
+ - Installs to `~/.kiro/steering/` (global)
122
+ - Available in all workspaces
123
+ - Manual updates via re-running npx/bunx
107
124
 
108
- The system adds minimal overhead to initial context while enabling progressive enhancement through agent creation.
125
+ **Power installation:**
126
+ - Installs to `.kiro/powers/kiro-agents/` (workspace)
127
+ - Auto-updates from GitHub
128
+ - Better integration with Kiro ecosystem
129
+ - Keyword-based activation
130
+
131
+ Both methods provide:
132
+ 1. New slash commands (`/agents`, `/modes`, `/strict`)
133
+ 2. Protocols for AI behavior
134
+ 3. Agent and mode systems
135
+ 4. Optimized interactions for reduced cognitive load
136
+
137
+ The system adds minimal overhead while enabling progressive enhancement.
109
138
 
110
139
  ## File Structure After Installation
111
140
 
141
+ **npm installation** (`~/.kiro/steering/`):
112
142
  ```
113
143
  ~/.kiro/steering/
114
- ├── agent-system.md # Core agent system
115
- ├── modes-system.md # Mode switching system
144
+ ├── agent-system.md
145
+ ├── modes-system.md
116
146
  └── agent-system/
117
- ├── strict-mode.md # Precision mode
118
- ├── kiro-spec-mode.md # Spec mode protocols
119
- ├── kiro-vibe-mode.md # Vibe mode protocols
147
+ ├── strict-mode.md
148
+ ├── kiro-spec-mode.md
149
+ ├── kiro-vibe-mode.md
120
150
  ├── interactions/
121
- │ ├── chit-chat.md # Interactive workflows
122
- │ └── interaction-styles.md
123
151
  └── tools/
124
- └── client-tools.md
125
152
  ```
126
153
 
127
- Files are set to read-only after installation to prevent accidental modifications.
154
+ **Power installation** (`.kiro/powers/kiro-agents/`):
155
+ ```
156
+ .kiro/powers/kiro-agents/
157
+ ├── POWER.md # Power metadata
158
+ ├── mcp.json # MCP server config (empty for now)
159
+ └── steering/
160
+ ├── agent-system.md # Core system (always loaded)
161
+ ├── agents.md # Interactive menu (manual)
162
+ ├── modes-system.md # Core system (always loaded)
163
+ ├── modes.md # Interactive menu (manual)
164
+ ├── strict-mode.md # Core system (always loaded)
165
+ ├── strict.md # Interactive control (manual)
166
+ ├── interactions/ # Interaction patterns
167
+ └── modes/ # Mode definitions
168
+ ```
169
+
170
+ npm files are read-only after installation. Power files managed by Kiro.
128
171
 
129
172
  ## Usage Examples
130
173
 
@@ -143,7 +186,7 @@ AI: Agent created! Activate now? [Yes/No]
143
186
  ### Switching Modes
144
187
 
145
188
  ```
146
- User: /mode spec
189
+ User: /modes spec
147
190
  AI: [Loads spec mode protocols]
148
191
  AI: What feature do you want to work on?
149
192
  User: User authentication system
@@ -162,9 +205,9 @@ AI: [Asks clarifying questions about cache strategy, TTL, invalidation, etc.]
162
205
  ### Agent Coordination
163
206
 
164
207
  ```
165
- User: /mode spec
208
+ User: /modes spec
166
209
  [Work on feature planning]
167
- User: /agent kiro-master
210
+ User: /agents kiro-master
168
211
  [Use kiro-master capabilities while in spec mode]
169
212
  ```
170
213
 
@@ -25,16 +25,18 @@ import { existsSync, chmodSync, constants } from "fs";
25
25
  import { fileURLToPath } from "url";
26
26
  var __filename2 = fileURLToPath(import.meta.url);
27
27
  var __dirname2 = dirname(__filename2);
28
- var INSTALL_DIR = join(homedir(), ".kiro", "steering");
28
+ var INSTALL_DIR = join(homedir(), ".kiro", "steering", "kiro-agents");
29
29
  var FILES_TO_INSTALL = [
30
30
  "agent-system.md",
31
31
  "modes-system.md",
32
- "agent-system/strict-mode.md",
33
- "agent-system/kiro-spec-mode.md",
34
- "agent-system/kiro-vibe-mode.md",
35
- "agent-system/interactions/chit-chat.md",
36
- "agent-system/interactions/interaction-styles.md",
37
- "agent-system/tools/client-tools.md"
32
+ "strict-mode.md",
33
+ "agents.md",
34
+ "modes.md",
35
+ "strict.md",
36
+ "interactions/chit-chat.md",
37
+ "interactions/interaction-styles.md",
38
+ "modes/kiro-spec-mode.md",
39
+ "modes/kiro-vibe-mode.md"
38
40
  ];
39
41
  async function setWritable(filePath) {
40
42
  try {
@@ -63,8 +65,14 @@ async function installFile(relativePath) {
63
65
  console.log(`✅ Installed: ${relativePath}`);
64
66
  }
65
67
  async function install() {
66
- console.log(`\uD83D\uDCE6 Installing kiro-agents to ~/.kiro/steering/
68
+ console.log(`\uD83D\uDCE6 Installing kiro-agents to ~/.kiro/steering/kiro-agents/
67
69
  `);
70
+ if (existsSync(INSTALL_DIR)) {
71
+ console.log(`\uD83D\uDDD1️ Removing existing installation...
72
+ `);
73
+ const { rmSync } = await import("fs");
74
+ rmSync(INSTALL_DIR, { recursive: true, force: true });
75
+ }
68
76
  for (const file of FILES_TO_INSTALL) {
69
77
  await installFile(file);
70
78
  }
@@ -74,6 +82,8 @@ async function install() {
74
82
  \uD83D\uDCC1 Files installed to: ${INSTALL_DIR}`);
75
83
  console.log(`
76
84
  \uD83D\uDCA1 Files are set to read-only. To modify them, change permissions first.`);
85
+ console.log(`
86
+ \uD83D\uDD04 To update, simply run 'npx kiro-agents' again.`);
77
87
  }
78
88
  install().catch((error) => {
79
89
  console.error("❌ Installation failed:", error);
@@ -7,47 +7,14 @@ 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
- ## Instruction Alias with Parameters
11
-
12
- ### Parameter Substitution Protocol
13
-
14
- When processing instructions, if you encounter an XML structure `<alias>` with variables in `{curly_braces}`:
15
-
16
- ```xml
17
- <alias>
18
- <trigger>COMMAND {param1} {param2}</trigger>
19
- <definition>
20
- Instructions with {param1} and {param2} placeholders
21
- </definition>
22
- </alias>
23
- ```
24
-
25
- **Processing steps:**
26
- 1. **Extract parameter names** from `<trigger>` (e.g., `{param1}`, `{param2}`)
27
- 2. **Match user command** - When user types matching command pattern
28
- 3. **Extract parameter values** - Capture actual values from user input
29
- 4. **Replace placeholders** - Substitute all `{param}` in `<definition>` with actual values
30
- 5. **Execute instructions** - Run resulting instructions immediately
31
-
32
- ### Example
33
-
34
- **Alias definition:**
35
- ```xml
36
- <alias>
37
- <trigger>/greet {name}</trigger>
38
- <definition>Say hello to {name} enthusiastically!</definition>
39
- </alias>
40
- ```
41
-
42
- **User types:** `/greet Alice`
43
- **System executes:** "Say hello to Alice enthusiastically!"
44
-
45
10
  ## Agent Commands
46
11
 
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.
13
+
47
14
  ### Command 1: Activate Specific Agent
48
15
 
49
16
  <alias>
50
- <trigger>/agent {agent_name}</trigger>
17
+ <trigger>/agents {agent_name}</trigger>
51
18
  <definition>
52
19
  ## Agent Activation: {agent_name}
53
20
 
@@ -100,152 +67,20 @@ Otherwise:
100
67
 
101
68
  ### Command 2: Interactive Agent Management
102
69
 
103
- <alias>
104
- <trigger>/agents</trigger>
105
- <definition>
106
- ## Agent Management Mode
107
-
108
- You are now in **agent management mode** using chit-chat interaction protocol.
109
-
110
- ### Step 1: Load Chit-Chat Mode
111
-
112
- Apply protocols from `chit-chat.md` steering document:
113
- - Use diff blocks to show progress
114
- - Provide numbered choice lists (4-6 options, up to 16 if needed)
115
- - Maintain single focus per message
116
- - Use visual formatting (bold, code blocks, lists)
117
- - Optimize for ADHD-C (minimal cognitive load)
118
-
119
- ### Step 2: Auto-Setup and Scan Agents Directory
70
+ For interactive agent management, use the `/agents` slash command (without parameters).
71
+ This provides a visual interface for:
72
+ - Viewing all available agents
73
+ - Creating new agents
74
+ - Managing existing agents
75
+ - Viewing agent details
120
76
 
121
- **First, check if `.kiro/agents/` directory exists:**
122
-
123
- If directory doesn't exist OR directory is empty:
124
- 1. Create `.kiro/agents/` directory if missing
125
- 2. Create `kiro-master.md` agent automatically using the enhanced description from "Available Agents" section
126
- 3. Show diff block indicating setup completion
127
- 4. Continue to Step 3 with kiro-master as available agent
128
-
129
- If directory exists with agents:
130
- - List all available agents from `.kiro/agents/` directory
131
- - Find all `*.md` files
132
- - Extract agent names from filenames
133
- - Read frontmatter metadata for descriptions
134
- - Categorize by agent type if metadata available
135
-
136
- ### Step 3: Present Agent Selection
137
-
138
- Use this response structure:
139
-
140
- ```diff
141
- 👉 Agent management mode
142
- ⏳ Agent selection or management
143
- ```
144
-
145
- **Current Focus**: Agent selection and management
146
-
147
- **Available agents in `.kiro/agents/`:**
148
-
149
- [List each agent with format:]
150
- - **{agent-name}** - {description from frontmatter or .md}
151
-
152
- **What would you like to do?**
153
-
154
- 1. **Activate agent** - Choose agent to activate immediately
155
- 2. **Create new agent** - Start agent creation wizard
156
- 3. **Manage existing agent** - Modify agent configuration
157
- 4. **View agent details** - Show full agent definition
158
- 5. **List all commands** - Show available slash commands
159
- 6. **Agent system help** - Explain how agents work
160
- 7. **Exit** - Return to normal mode
161
-
162
- ### Step 4: Handle User Choice
163
-
164
- Based on user selection:
165
-
166
- **Option 1 - Activate agent:**
167
- - Show numbered list of available agents
168
- - User selects agent by number
169
- - Execute `/agent {selected_agent_name}` command
170
- - Agent activates immediately
171
-
172
- **Option 2 - Create new agent:**
173
- - Start agent creation workflow (similar to kiro-master)
174
- - Ask for agent type (code-focused, documentation, testing, etc.)
175
- - Collect agent name, description, capabilities
176
- - Generate `.md` file with all agent definition
177
- - Offer to activate new agent
178
-
179
- **Option 3 - Manage existing agent:**
180
- - Show numbered list of available agents
181
- - User selects agent to manage
182
- - Offer management options:
183
- - Modify capabilities
184
- - Update instructions
185
- - Change interaction protocol
186
- - Add/remove integrations
187
- - Delete agent
188
-
189
- **Option 4 - View agent details:**
190
- - Show numbered list of available agents
191
- - User selects agent to view
192
- - Display full `.md` content with formatting
193
- - Show agent protocols and capabilities summary
194
- - Offer to activate or manage agent
195
-
196
- **Option 5 - List all commands:**
197
- - Show all available slash commands in the system
198
- - Display command syntax and brief description
199
- - Group by category (agents, modes, utilities)
200
- - Format as table for quick reference:
201
-
202
- ```
203
- Available Commands:
204
-
205
- AGENT COMMANDS
206
- /agent {name} Activate specific agent
207
- /agents Interactive agent management
208
-
209
- MODE COMMANDS (see modes-system.md)
210
- /mode {name} Switch Kiro mode (vibe/spec)
211
- /modes Interactive mode management
212
- /strict {state} Control strict mode (on/off)
213
-
214
- Note: Commands are defined in steering documents.
215
- New commands can be added via Instruction Alias pattern.
216
- ```
217
-
218
- **Option 6 - Agent system help:**
219
- - Explain agent system architecture
220
- - Show command usage examples
221
- - Describe agent file structure
222
- - Explain how to create custom agents
223
- - Document best practices
224
-
225
- **Option 7 - Exit:**
226
- - Confirm exit from agent management mode
227
- - Return to normal Kiro interaction
228
- - Preserve any changes made
229
-
230
- ### Step 5: Maintain Chit-Chat Mode
231
-
232
- Continue using diff blocks and numbered choices throughout agent management session.
233
-
234
- After each action:
235
- - Update diff block with progress
236
- - Show current focus
237
- - Provide next action choices
238
- - Allow going back or canceling
239
-
240
- ---
241
-
242
- **Begin agent management mode now.**
243
- </definition>
244
- </alias>
77
+ **Usage:**
78
+ - Interactive: `/agents` (no parameters, loads `agents.md` steering file)
79
+ - Direct: `/agents {name}` (with agent name, uses alias above)
245
80
 
246
81
  ## Agent Activation Protocol
247
82
 
248
- When `/agent {name}` is executed:
83
+ When `/agents {name}` is executed:
249
84
 
250
85
  1. **Discover agent file**
251
86
  - Check `.kiro/agents/{name}.md` exists
@@ -301,7 +136,7 @@ When `/agents` is executed:
301
136
  - Allow exit to normal mode
302
137
 
303
138
  4. **Handle operations**
304
- - Agent activation → Execute `/agent {name}`
139
+ - Agent activation → Execute `/agents {name}`
305
140
  - Agent creation → Start creation wizard
306
141
  - Agent management → Modify agent files
307
142
  - Agent viewing → Display agent details
@@ -348,19 +183,20 @@ When `/agents` is executed:
348
183
  - Error Handling
349
184
  - Success Metrics
350
185
 
351
- ## Available Agents
186
+ ## Initial Agent
187
+
188
+ When auto-setup detects no agents exist, it creates the initial agent:
352
189
 
353
- Agents are discovered automatically from `.kiro/agents/` directory.
190
+ **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
354
191
 
355
- **Current agents:**
356
- - **kiro-master** - Interactive Kiro feature management with CRUD operations for MCP servers, hooks, agents, specs, and steering documents. Includes .kiro/ directory maintenance, steering optimization, refactoring, and comprehensive analysis capabilities
192
+ This description is used when creating `.kiro/agents/kiro-master.md` during auto-setup.
357
193
 
358
194
  ## Usage Examples
359
195
 
360
196
  ### Activate Specific Agent
361
197
 
362
198
  ```
363
- /agent refactor-architect
199
+ /agents refactor-architect
364
200
  ```
365
201
 
366
202
  **Result:** AI immediately assumes refactor-architect role, loads agent files, applies protocols, and begins interaction according to agent's style.
@@ -376,7 +212,7 @@ Agents are discovered automatically from `.kiro/agents/` directory.
376
212
  ### Switch Between Agents
377
213
 
378
214
  ```
379
- /agent kiro-master
215
+ /agents kiro-master
380
216
  ```
381
217
 
382
218
  **Result:** Switch from current agent (e.g., refactor-architect) to kiro-master. Previous agent context is suspended, new agent context is loaded.
@@ -432,7 +268,7 @@ Agents can specify required steering documents in their `.md` definition file:
432
268
  ### For Agent Users
433
269
 
434
270
  1. **Use `/agents` for discovery** - See what agents are available
435
- 2. **Use `/agent {name}` for direct activation** - When you know which agent you need
271
+ 2. **Use `/agents {name}` for direct activation** - When you know which agent you need
436
272
  3. **Let agents maintain focus** - Don't switch agents mid-task unless necessary
437
273
  4. **Provide clear context** - Help agents understand your needs
438
274
  5. **Use agent capabilities** - Leverage agent-specific tools and workflows
@@ -457,7 +293,7 @@ Agents can specify required steering documents in their `.md` definition file:
457
293
 
458
294
  ### Agent Not Activating
459
295
 
460
- **Problem:** `/agent {name}` doesn't work
296
+ **Problem:** `/agents {name}` doesn't work
461
297
  **Solutions:**
462
298
  - Check agent files exist in `.kiro/agents/`
463
299
  - Verify filename matches command (case-sensitive)
@@ -487,8 +323,8 @@ Agents can specify required steering documents in their `.md` definition file:
487
323
  Potential improvements to agent system:
488
324
 
489
325
  **Agent enhancements:**
490
- - **Agent parameters** - `/agent refactor-architect --mode=strict`
491
- - **Agent chaining** - `/agent kiro-master then refactor-architect`
326
+ - **Agent parameters** - `/agents refactor-architect --mode=strict`
327
+ - **Agent chaining** - `/agents kiro-master then refactor-architect`
492
328
  - **Agent templates** - Quick agent creation from templates
493
329
  - **Agent marketplace** - Share agents with community
494
330
  - **Agent versioning** - Track agent changes over time
@@ -509,4 +345,4 @@ Potential improvements to agent system:
509
345
 
510
346
  ---
511
347
 
512
- **Agent system ready. Use `/agents` to begin or `/agent {name}` to activate specific agent.**
348
+ **Agent system ready. Use `/agents` to begin or `/agents {name}` to activate specific agent.**
@@ -0,0 +1,155 @@
1
+ ---
2
+ inclusion: manual
3
+ description: "Interactive agent management interface with visual menu for creating, activating, and managing AI agents"
4
+ keywords: ["agents", "management", "create", "activate", "interactive"]
5
+ ---
6
+
7
+ # Agent Management
8
+
9
+ You are now in **agent management mode** using chit-chat interaction protocol.
10
+
11
+ ## Step 1: Load Chit-Chat Mode
12
+
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
+
145
+ ## Initial Agent
146
+
147
+ When auto-setup detects no agents exist, create the initial agent:
148
+
149
+ **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
150
+
151
+ This description is used when creating `.kiro/agents/kiro-master.md` during auto-setup.
152
+
153
+ ---
154
+
155
+ **Begin agent management mode now.**
@@ -0,0 +1,77 @@
1
+ ---
2
+ inclusion: always
3
+ description: Instruction alias system for creating custom commands with parameter substitution and literal responses
4
+ ---
5
+
6
+ # Instruction Alias System
7
+
8
+ System for creating custom commands using XML-based alias definitions with parameter support and literal response patterns.
9
+
10
+ **For complete documentation, examples, and troubleshooting, see `docs/aliases-guide.md`**
11
+
12
+ ## Parameter Substitution
13
+
14
+ When processing instructions, if you encounter an XML structure `<alias>` with variables in `{curly_braces}`:
15
+
16
+ ```xml
17
+ <alias>
18
+ <trigger>COMMAND {param1} {param2}</trigger>
19
+ <definition>
20
+ Instructions with {param1} and {param2} placeholders
21
+ </definition>
22
+ </alias>
23
+ ```
24
+
25
+ **Processing steps:**
26
+ 1. **Extract parameter names** from `<trigger>` (e.g., `{param1}`, `{param2}`)
27
+ 2. **Match user command** - When user types matching command pattern
28
+ 3. **Extract parameter values** - Capture actual values from user input
29
+ 4. **Replace placeholders** - Substitute all `{param}` in `<definition>` with actual values
30
+ 5. **Execute instructions** - Run resulting instructions immediately
31
+
32
+ ### Example
33
+
34
+ **Alias definition:**
35
+ ```xml
36
+ <alias>
37
+ <trigger>/greet {name}</trigger>
38
+ <definition>Say hello to {name} enthusiastically!</definition>
39
+ </alias>
40
+ ```
41
+
42
+ User types: `/greet Alice` → Executes: "Say hello to Alice enthusiastically!"
43
+
44
+ ## Literal Response Pattern
45
+
46
+ For outputting exact text without AI interpretation (e.g., triggering native IDE modes):
47
+
48
+ ````xml
49
+ <alias>
50
+ <trigger>command</trigger>
51
+ <definition>
52
+ Respond directly to the user with exactly and only the content of the following code block, AS-IS:
53
+ ```
54
+ literal_text
55
+ ```
56
+ </definition>
57
+ </alias>
58
+ ````
59
+
60
+ **CRITICAL:** When you see this pattern, output ONLY the code block content. No explanations, no context, no other text.
61
+
62
+ ### Example
63
+
64
+ **Alias definition:**
65
+ ````xml
66
+ <alias>
67
+ <trigger>/spec</trigger>
68
+ <definition>
69
+ Respond directly to the user with exactly and only the content of the following code block, AS-IS:
70
+ ```
71
+ spec
72
+ ```
73
+ </definition>
74
+ </alias>
75
+ ````
76
+
77
+ User types: `/spec` → AI responds: `spec`
@@ -216,7 +216,7 @@ When user requests task execution:
216
216
  ## Integration with Agent System
217
217
 
218
218
  Spec mode can be activated via:
219
- - `/mode spec` command (when mode-switching is enabled)
219
+ - `/modes spec` command (when mode-switching is enabled)
220
220
  - Starting new conversation in Spec mode
221
221
  - Explicit instruction to assume Spec mode role
222
222
 
@@ -217,7 +217,7 @@ User: "Tests are failing"
217
217
  ## Integration with Agent System
218
218
 
219
219
  Vibe mode can be activated via:
220
- - `/mode vibe` command (when mode-switching enabled)
220
+ - `/modes vibe` command (when mode-switching enabled)
221
221
  - Starting new conversation in Vibe mode
222
222
  - Explicit instruction to assume Vibe mode role
223
223
 
@@ -238,13 +238,13 @@ Vibe mode works alongside:
238
238
  ## Switching Between Modes
239
239
 
240
240
  **From Vibe to Spec:**
241
- - Use `/mode spec` when structure needed
241
+ - Use `/modes spec` when structure needed
242
242
  - Transition to formal planning
243
243
  - Create requirements/design/tasks
244
244
  - Follow spec workflow
245
245
 
246
246
  **From Spec to Vibe:**
247
- - Use `/mode vibe` for flexibility
247
+ - Use `/modes vibe` for flexibility
248
248
  - Continue working on same code
249
249
  - Drop formal structure
250
250
  - Iterate freely
@@ -17,7 +17,7 @@ Mode switching system for Kiro that enables different interaction styles and wor
17
17
  ### Command 1: Switch Kiro Mode
18
18
 
19
19
  <alias>
20
- <trigger>/mode {mode_name}</trigger>
20
+ <trigger>/modes {mode_name}</trigger>
21
21
  <definition>
22
22
  ## Mode Switch: {mode_name}
23
23
 
@@ -36,8 +36,6 @@ This file contains:
36
36
  - File organization rules
37
37
  - Integration points
38
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
39
  ### Step 2: Assume Mode Role
42
40
 
43
41
  For this session, you are in **{mode_name} mode**.
@@ -106,114 +104,23 @@ Start interaction according to **{mode_name} mode**'s protocols.
106
104
 
107
105
  ### Command 2: Interactive Mode Management
108
106
 
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
107
+ For interactive mode management, use the `/modes` slash command (without parameters).
108
+ This provides a visual interface for:
109
+ - Viewing available modes
110
+ - Comparing modes
111
+ - Switching modes
112
+ - Getting help
187
113
 
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>
114
+ **Usage:**
115
+ - Interactive: `/modes` (no parameters, loads `modes.md` steering file)
116
+ - Direct: `/modes {name}` (with mode name, uses alias above)
209
117
 
210
118
  ## Mode Activation Protocol
211
119
 
212
- When `/mode {name}` is executed:
120
+ When `/modes {name}` is executed:
213
121
 
214
122
  1. **Load mode definition**
215
123
  - Read `kiro-{name}-mode.md` from agent-system directory
216
- - Load `strict-mode.md` steering document
217
124
  - Parse mode configuration
218
125
  - Understand mode workflows
219
126
 
@@ -256,7 +163,7 @@ When `/modes` is executed:
256
163
  - Allow staying in current mode
257
164
 
258
165
  4. **Handle operations**
259
- - Mode switching → Execute `/mode {name}`
166
+ - Mode switching → Execute `/modes {name}`
260
167
  - View details → Show mode definition
261
168
  - Comparison → Explain differences
262
169
  - Help → Explain mode system
@@ -272,7 +179,7 @@ When `/modes` is executed:
272
179
  - Custom agents: Domain-specific expertise
273
180
 
274
181
  **They work together:**
275
- - Modes can activate agents: `/mode spec` then `/agent kiro-master`
182
+ - Modes can activate agents: `/modes spec` then `/agents kiro-master`
276
183
  - Agents inherit mode protocols: Agent in spec mode follows spec workflow
277
184
  - Context preserved: Switch modes/agents without losing work
278
185
  - Layered capabilities: Mode + Agent + Strict mode all active simultaneously
@@ -288,13 +195,13 @@ When `/modes` is executed:
288
195
  ### Switch Kiro Modes
289
196
 
290
197
  ```
291
- /mode vibe
198
+ /modes vibe
292
199
  ```
293
200
 
294
201
  **Result:** AI switches to Vibe mode - flexible, conversational development. No formal workflows, quick iterations, direct changes.
295
202
 
296
203
  ```
297
- /mode spec
204
+ /modes spec
298
205
  ```
299
206
 
300
207
  **Result:** AI switches to Spec mode - structured feature development with requirements, design, and task planning.
@@ -310,9 +217,9 @@ When `/modes` is executed:
310
217
  ### Combined with Agents
311
218
 
312
219
  ```
313
- /mode spec
220
+ /modes spec
314
221
  [Work on structured feature planning]
315
- /agent kiro-master
222
+ /agents kiro-master
316
223
  [Use kiro-master agent while in spec mode]
317
224
  ```
318
225
 
@@ -340,7 +247,7 @@ When `/modes` is executed:
340
247
 
341
248
  **Mode enhancements:**
342
249
  - **Custom modes** - User-defined modes beyond vibe/spec
343
- - **Mode parameters** - `/mode spec --strict --minimal-tests`
250
+ - **Mode parameters** - `/modes spec --strict --minimal-tests`
344
251
  - **Mode presets** - Save mode configurations
345
252
  - **Mode history** - Track mode usage patterns
346
253
  - **Automated transitions** - Suggest mode switch when appropriate
@@ -363,6 +270,6 @@ When `/modes` is executed:
363
270
  **Modes system ready.**
364
271
 
365
272
  **Quick start:**
366
- - `/mode vibe` - Flexible development
367
- - `/mode spec` - Structured planning
273
+ - `/modes vibe` - Flexible development
274
+ - `/modes spec` - Structured planning
368
275
  - `/modes` - Interactive mode management
@@ -0,0 +1,101 @@
1
+ ---
2
+ inclusion: manual
3
+ description: "Interactive mode management interface for switching between vibe and spec interaction styles"
4
+ keywords: ["modes", "vibe", "spec", "workflow", "interactive"]
5
+ ---
6
+
7
+ # Mode Management
8
+
9
+ You are now in **mode management** using chit-chat interaction protocol.
10
+
11
+ ## Step 1: Load Chit-Chat Mode
12
+
13
+ Apply protocols from `chit-chat.md` steering document:
14
+ - Use diff blocks to show progress
15
+ - Provide numbered choice lists (4-6 options)
16
+ - Maintain single focus per message
17
+ - Use visual formatting (bold, code blocks, lists)
18
+
19
+ ## Step 2: Detect Available Modes
20
+
21
+ Scan agent-system directory for `kiro-*-mode.md` files:
22
+ - Extract mode names from filenames
23
+ - Read frontmatter for descriptions
24
+ - Identify current mode from context
25
+
26
+ ## Step 3: Present Mode Selection
27
+
28
+ Use this response structure:
29
+
30
+ ```diff
31
+ 👉 Mode management
32
+ ⏳ Mode selection
33
+ ```
34
+
35
+ **Current mode:** [current_mode]
36
+
37
+ **Available Kiro modes:**
38
+
39
+ - **vibe** - Flexible, conversational development assistance
40
+ - **spec** - Structured feature development with requirements, design, and tasks
41
+
42
+ **What would you like to do?**
43
+
44
+ 1. **Switch to vibe mode** - Flexible development and quick iterations
45
+ 2. **Switch to spec mode** - Structured feature planning and implementation
46
+ 3. **View mode details** - See full mode capabilities and protocols
47
+ 4. **Mode comparison** - Understand differences between modes
48
+ 5. **Stay in current mode** - Continue with current mode
49
+ 6. **Help** - Learn about mode system
50
+
51
+ ## Step 4: Handle User Choice
52
+
53
+ Based on user selection:
54
+
55
+ **Option 1 - Switch to vibe:**
56
+ - Execute `/modes vibe` command
57
+ - Load vibe mode protocols
58
+ - Begin flexible interaction
59
+
60
+ **Option 2 - Switch to spec:**
61
+ - Execute `/modes spec` command
62
+ - Load spec mode protocols
63
+ - Begin structured workflow
64
+
65
+ **Option 3 - View mode details:**
66
+ - Show numbered list of modes
67
+ - User selects mode to view
68
+ - Display full mode definition
69
+ - Explain capabilities and use cases
70
+ - Offer to switch to that mode
71
+
72
+ **Option 4 - Mode comparison:**
73
+ - Show side-by-side comparison
74
+ - Explain when to use each mode
75
+ - Highlight key differences
76
+ - Help user choose appropriate mode
77
+
78
+ **Option 5 - Stay in current mode:**
79
+ - Confirm staying in current mode
80
+ - Return to normal interaction
81
+ - Preserve current state
82
+
83
+ **Option 6 - Help:**
84
+ - Explain mode system
85
+ - Show switching commands
86
+ - Describe mode benefits
87
+ - Provide usage examples
88
+
89
+ ## Step 5: Maintain Chit-Chat Mode
90
+
91
+ Continue using diff blocks and numbered choices throughout mode management.
92
+
93
+ After each action:
94
+ - Update diff block with progress
95
+ - Show current focus
96
+ - Provide next action choices
97
+ - Allow going back or canceling
98
+
99
+ ---
100
+
101
+ **Begin mode management now.**
@@ -46,7 +46,9 @@ This serves dual purpose:
46
46
  - File locations not specified
47
47
  - Breaking changes implications
48
48
 
49
- ## Activation Command
49
+ ## Activation Commands
50
+
51
+ ### Command 1: Direct State Change
50
52
 
51
53
  <alias>
52
54
  <trigger>/strict {state}</trigger>
@@ -57,6 +59,19 @@ State changed. Response Protocol now applies.
57
59
  </definition>
58
60
  </alias>
59
61
 
62
+ ### Command 2: Interactive Control
63
+
64
+ For interactive strict mode control, use the `/strict` slash command (without parameters).
65
+ This provides a numbered choice interface to:
66
+ - Enable strict mode
67
+ - Disable strict mode
68
+ - Learn more about strict mode
69
+ - Check current state
70
+
71
+ **Usage:**
72
+ - Interactive: `/strict` (no parameters, loads `strict.md` steering file with numbered options)
73
+ - Direct: `/strict on` or `/strict off` (with state)
74
+
60
75
  ## Use Case Guidelines
61
76
 
62
77
  ### When to Activate STRICT_MODE
@@ -0,0 +1,93 @@
1
+ ---
2
+ inclusion: manual
3
+ description: "Interactive strict mode control with numbered options for enabling/disabling precision mode"
4
+ keywords: ["strict", "precision", "mode", "control"]
5
+ ---
6
+
7
+ # Strict Mode Control
8
+
9
+ Interactive control for STRICT_MODE using numbered choice pattern.
10
+
11
+ ## Current State Check
12
+
13
+ First, determine the current STRICT_MODE state from context.
14
+
15
+ ## Present Interactive Options
16
+
17
+ Display the question with numbered options:
18
+
19
+ ```markdown
20
+ # Strict Mode Control
21
+
22
+ **Current State**: STRICT_MODE = ${current_state}
23
+
24
+ Strict mode blocks execution on ambiguous input and requires explicit clarification. Use it for:
25
+ - Experimental projects with cutting-edge technologies
26
+ - Architectural decisions that propagate throughout codebase
27
+ - Breaking changes affecting multiple files/systems
28
+ - New component creation establishing patterns
29
+ - Debugging propagated errors from incorrect assumptions
30
+
31
+ **What would you like to do?**
32
+
33
+ 1. **🟢 Enable Strict Mode** - Activate precision mode - blocks execution on ambiguous input, requires explicit clarification
34
+ 2. **🔴 Disable Strict Mode** - Return to normal mode - allows reasonable assumptions, faster iteration
35
+ 3. **ℹ️ Learn More** - Understand when and how to use strict mode effectively
36
+ 4. **📊 Check Current State** - Show current strict mode configuration and status
37
+ ```
38
+
39
+ **Note**: Recommend option 1 when current_state is "OFF", recommend option 2 when current_state is "ON".
40
+
41
+ ## Handle User Selection
42
+
43
+ Based on user's choice:
44
+
45
+ **Enable Strict Mode:**
46
+ - Set STRICT_MODE = ON
47
+ - Confirm activation
48
+ - Show brief reminder of strict mode rules
49
+ - Return to conversation with strict mode active
50
+
51
+ **Disable Strict Mode:**
52
+ - Set STRICT_MODE = OFF
53
+ - Confirm deactivation
54
+ - Return to normal conversation mode
55
+
56
+ **Learn More:**
57
+ - Explain strict mode purpose and benefits
58
+ - Show examples of when to use it
59
+ - Describe the critical rules (no assumptions, mandatory clarification, block execution)
60
+ - Provide use case guidelines
61
+ - Offer to enable/disable after explanation
62
+
63
+ **Check Current State:**
64
+ - Display current STRICT_MODE value
65
+ - Show when it was last changed (if tracked)
66
+ - Explain current behavior
67
+ - Offer to change state
68
+
69
+ ## Quick Reference
70
+
71
+ **Strict Mode Rules (when ON)**:
72
+ 1. **NO ASSUMPTIONS** - Stop immediately if input is ambiguous
73
+ 2. **MANDATORY CLARIFICATION** - Ask specific questions to resolve ambiguities
74
+ 3. **BLOCK EXECUTION** - Do not execute main task until data is confirmed
75
+ 4. **EXPLICIT AUTHORIZATION ONLY** - Proceed only with user confirmation
76
+
77
+ **When to Use**:
78
+ - Experimental/cutting-edge projects
79
+ - Architectural decisions
80
+ - Breaking changes
81
+ - New component patterns
82
+ - Debugging propagated errors
83
+
84
+ **When Standard Mode is Fine**:
85
+ - Well-established patterns
86
+ - Simple, clear tasks
87
+ - Documentation work
88
+ - Standard refactoring
89
+ - Common web development patterns
90
+
91
+ ---
92
+
93
+ **Strict mode control ready.**
package/package.json CHANGED
@@ -1,19 +1,26 @@
1
1
  {
2
2
  "name": "kiro-agents",
3
- "version": "1.0.2",
3
+ "version": "1.2.0",
4
4
  "description": "AI agent system for Kiro IDE",
5
5
  "type": "module",
6
6
  "bin": {
7
- "kiro-agents": "bin/cli.js"
7
+ "kiro-agents": "build/npm/bin/cli.js"
8
8
  },
9
9
  "files": [
10
- "bin",
11
- "dist"
10
+ "build/npm/bin",
11
+ "build/npm/dist"
12
12
  ],
13
13
  "scripts": {
14
- "build": "bun run scripts/build.ts",
15
- "watch": "bun run scripts/build.ts --watch",
16
- "clean": "bun run scripts/clean.ts"
14
+ "build": "bun run scripts/build.ts npm",
15
+ "build:power": "bun run scripts/build.ts power",
16
+ "dev": "bun run scripts/build.ts dev",
17
+ "test": "bun run scripts/test.ts",
18
+ "clean": "bun run scripts/clean.ts",
19
+ "snapshot": "bun run scripts/snapshot.ts",
20
+ "finalize": "bun run scripts/finalize.ts analyze",
21
+ "finalize:analyze": "bun run scripts/finalize.ts analyze",
22
+ "finalize:commit": "bun run scripts/finalize.ts commit",
23
+ "release": "bun run scripts/release.ts"
17
24
  },
18
25
  "keywords": [
19
26
  "kiro",
@@ -22,6 +29,7 @@
22
29
  "author": "R. Beltran",
23
30
  "license": "MIT",
24
31
  "devDependencies": {
32
+ "@changesets/cli": "^2.29.8",
25
33
  "@types/bun": "latest"
26
34
  },
27
35
  "peerDependencies": {
package/bin/cli.ts DELETED
@@ -1,85 +0,0 @@
1
- #!/usr/bin/env node
2
- import { join, dirname } from "path";
3
- import { homedir } from "os";
4
- import { existsSync, chmodSync, constants } from "fs";
5
- import { fileURLToPath } from "url";
6
-
7
- const __filename = fileURLToPath(import.meta.url);
8
- const __dirname = dirname(__filename);
9
-
10
- const INSTALL_DIR = join(homedir(), ".kiro", "steering");
11
-
12
- // Files to install (relative to dist/ in package)
13
- const FILES_TO_INSTALL = [
14
- "agent-system.md",
15
- "modes-system.md",
16
- "agent-system/strict-mode.md",
17
- "agent-system/kiro-spec-mode.md",
18
- "agent-system/kiro-vibe-mode.md",
19
- "agent-system/interactions/chit-chat.md",
20
- "agent-system/interactions/interaction-styles.md",
21
- "agent-system/tools/client-tools.md",
22
- ] as const;
23
-
24
- async function setWritable(filePath: string): Promise<void> {
25
- try {
26
- chmodSync(filePath, constants.S_IRUSR | constants.S_IWUSR | constants.S_IRGRP | constants.S_IROTH);
27
- } catch (error) {
28
- // Ignore errors if file doesn't exist
29
- }
30
- }
31
-
32
- async function setReadOnly(filePath: string): Promise<void> {
33
- try {
34
- chmodSync(filePath, constants.S_IRUSR | constants.S_IRGRP | constants.S_IROTH);
35
- } catch (error) {
36
- console.warn(`⚠️ Could not set read-only: ${filePath}`);
37
- }
38
- }
39
-
40
- async function installFile(relativePath: string): Promise<void> {
41
- const destPath = join(INSTALL_DIR, relativePath);
42
-
43
- // Restore write permissions if file exists
44
- if (existsSync(destPath)) {
45
- await setWritable(destPath);
46
- }
47
-
48
- // Get source file from package dist/
49
- const srcPath = join(__dirname, "..", "dist", relativePath);
50
-
51
- // Read file using fs for Node.js compatibility
52
- const { readFile, writeFile, mkdir } = await import("fs/promises");
53
- const content = await readFile(srcPath);
54
-
55
- // Ensure directory exists
56
- const destDir = dirname(destPath);
57
- await mkdir(destDir, { recursive: true });
58
-
59
- // Write file
60
- await writeFile(destPath, content);
61
-
62
- // Set read-only
63
- await setReadOnly(destPath);
64
-
65
- console.log(`✅ Installed: ${relativePath}`);
66
- }
67
-
68
- async function install(): Promise<void> {
69
- console.log("📦 Installing kiro-agents to ~/.kiro/steering/\n");
70
-
71
- // Install all files
72
- for (const file of FILES_TO_INSTALL) {
73
- await installFile(file);
74
- }
75
-
76
- console.log("\n✨ Installation completed successfully!");
77
- console.log(`\n📁 Files installed to: ${INSTALL_DIR}`);
78
- console.log("\n💡 Files are set to read-only. To modify them, change permissions first.");
79
- }
80
-
81
- // Main execution
82
- install().catch((error) => {
83
- console.error("❌ Installation failed:", error);
84
- process.exit(1);
85
- });
@@ -1,21 +0,0 @@
1
- ---
2
- inclusion: manual
3
- ---
4
-
5
- # Client Tools
6
-
7
- ## userInput Tool
8
-
9
- ```typescript
10
- userInput({
11
- question: "# Markdown works here! 🚀",
12
- options: [
13
- {
14
- title: "🎯 Emoji + text only", // NO markdown
15
- description: "## Full markdown here!", // YES markdown
16
- recommended: true
17
- }
18
- ],
19
- reason: "fix-pbt" // REQUIRED
20
- })
21
- ```