kiro-agents 1.0.1 → 1.1.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 +64 -21
- package/{bin → build/npm/bin}/cli.js +18 -8
- package/{dist → build/npm/dist}/agent-system.md +15 -146
- package/build/npm/dist/agents.md +155 -0
- package/{dist → build/npm/dist}/modes-system.md +10 -100
- package/build/npm/dist/modes.md +101 -0
- package/{dist/agent-system → build/npm/dist}/strict-mode.md +15 -1
- package/build/npm/dist/strict.md +109 -0
- package/package.json +13 -7
- package/bin/cli.ts +0 -85
- package/dist/agent-system/tools/client-tools.md +0 -21
- /package/{dist/agent-system → build/npm/dist}/interactions/chit-chat.md +0 -0
- /package/{dist/agent-system → build/npm/dist}/interactions/interaction-styles.md +0 -0
- /package/{dist/agent-system → build/npm/dist/modes}/kiro-spec-mode.md +0 -0
- /package/{dist/agent-system → build/npm/dist/modes}/kiro-vibe-mode.md +0 -0
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/`
|
|
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 (
|
|
38
|
-
- `/
|
|
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
|
-
- `/
|
|
73
|
-
- `/
|
|
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
|
|
118
|
+
kiro-agents provides steering documents that Kiro loads to enhance AI capabilities:
|
|
102
119
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
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
|
-
|
|
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
|
|
115
|
-
├── modes-system.md
|
|
144
|
+
├── agent-system.md
|
|
145
|
+
├── modes-system.md
|
|
116
146
|
└── agent-system/
|
|
117
|
-
├── strict-mode.md
|
|
118
|
-
├── kiro-spec-mode.md
|
|
119
|
-
├── kiro-vibe-mode.md
|
|
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
|
-
|
|
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
|
|
|
@@ -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
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
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);
|
|
@@ -47,7 +47,7 @@ When processing instructions, if you encounter an XML structure `<alias>` with v
|
|
|
47
47
|
### Command 1: Activate Specific Agent
|
|
48
48
|
|
|
49
49
|
<alias>
|
|
50
|
-
<trigger>/
|
|
50
|
+
<trigger>/agents {agent_name}</trigger>
|
|
51
51
|
<definition>
|
|
52
52
|
## Agent Activation: {agent_name}
|
|
53
53
|
|
|
@@ -100,148 +100,16 @@ Otherwise:
|
|
|
100
100
|
|
|
101
101
|
### Command 2: Interactive Agent Management
|
|
102
102
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
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
|
|
120
|
-
|
|
121
|
-
**First, check if `.kiro/agents/` directory exists:**
|
|
103
|
+
For interactive agent management, use the `/agents` slash command (without parameters).
|
|
104
|
+
This provides a visual interface for:
|
|
105
|
+
- Viewing all available agents
|
|
106
|
+
- Creating new agents
|
|
107
|
+
- Managing existing agents
|
|
108
|
+
- Viewing agent details
|
|
122
109
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
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>
|
|
110
|
+
**Usage:**
|
|
111
|
+
- Interactive: `/agents` (no parameters, loads `agents.md` steering file)
|
|
112
|
+
- Direct: `/agents {name}` (with agent name, uses alias above)
|
|
245
113
|
|
|
246
114
|
## Agent Activation Protocol
|
|
247
115
|
|
|
@@ -348,12 +216,13 @@ When `/agents` is executed:
|
|
|
348
216
|
- Error Handling
|
|
349
217
|
- Success Metrics
|
|
350
218
|
|
|
351
|
-
##
|
|
219
|
+
## Initial Agent
|
|
220
|
+
|
|
221
|
+
When auto-setup detects no agents exist, it creates the initial agent:
|
|
352
222
|
|
|
353
|
-
|
|
223
|
+
**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
224
|
|
|
355
|
-
|
|
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
|
|
225
|
+
This description is used when creating `.kiro/agents/kiro-master.md` during auto-setup.
|
|
357
226
|
|
|
358
227
|
## Usage Examples
|
|
359
228
|
|
|
@@ -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.**
|
|
@@ -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>/
|
|
20
|
+
<trigger>/modes {mode_name}</trigger>
|
|
21
21
|
<definition>
|
|
22
22
|
## Mode Switch: {mode_name}
|
|
23
23
|
|
|
@@ -106,106 +106,16 @@ Start interaction according to **{mode_name} mode**'s protocols.
|
|
|
106
106
|
|
|
107
107
|
### Command 2: Interactive Mode Management
|
|
108
108
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
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?**
|
|
109
|
+
For interactive mode management, use the `/modes` slash command (without parameters).
|
|
110
|
+
This provides a visual interface for:
|
|
111
|
+
- Viewing available modes
|
|
112
|
+
- Comparing modes
|
|
113
|
+
- Switching modes
|
|
114
|
+
- Getting help
|
|
148
115
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
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>
|
|
116
|
+
**Usage:**
|
|
117
|
+
- Interactive: `/modes` (no parameters, loads `modes.md` steering file)
|
|
118
|
+
- Direct: `/modes {name}` (with mode name, uses alias above)
|
|
209
119
|
|
|
210
120
|
## Mode Activation Protocol
|
|
211
121
|
|
|
@@ -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
|
|
49
|
+
## Activation Commands
|
|
50
|
+
|
|
51
|
+
### Command 1: Direct State Change
|
|
50
52
|
|
|
51
53
|
<alias>
|
|
52
54
|
<trigger>/strict {state}</trigger>
|
|
@@ -57,6 +59,18 @@ 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 visual interface with buttons to:
|
|
66
|
+
- Enable strict mode
|
|
67
|
+
- Disable strict mode
|
|
68
|
+
- Learn more about strict mode
|
|
69
|
+
|
|
70
|
+
**Usage:**
|
|
71
|
+
- Interactive: `/strict` (no parameters, loads `strict.md` steering file with userInput buttons)
|
|
72
|
+
- Direct: `/strict on` or `/strict off` (with state)
|
|
73
|
+
|
|
60
74
|
## Use Case Guidelines
|
|
61
75
|
|
|
62
76
|
### When to Activate STRICT_MODE
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
inclusion: manual
|
|
3
|
+
description: "Interactive strict mode control with visual buttons 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 userInput tool.
|
|
10
|
+
|
|
11
|
+
## Current State Check
|
|
12
|
+
|
|
13
|
+
First, determine the current STRICT_MODE state from context.
|
|
14
|
+
|
|
15
|
+
## Present Interactive Options
|
|
16
|
+
|
|
17
|
+
Use userInput tool to show interactive buttons:
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
userInput({
|
|
21
|
+
question: `# Strict Mode Control
|
|
22
|
+
|
|
23
|
+
**Current State**: STRICT_MODE = ${current_state}
|
|
24
|
+
|
|
25
|
+
Strict mode blocks execution on ambiguous input and requires explicit clarification. Use it for:
|
|
26
|
+
- Experimental projects with cutting-edge technologies
|
|
27
|
+
- Architectural decisions that propagate throughout codebase
|
|
28
|
+
- Breaking changes affecting multiple files/systems
|
|
29
|
+
- New component creation establishing patterns
|
|
30
|
+
- Debugging propagated errors from incorrect assumptions
|
|
31
|
+
|
|
32
|
+
**What would you like to do?**`,
|
|
33
|
+
options: [
|
|
34
|
+
{
|
|
35
|
+
title: "🟢 Enable Strict Mode",
|
|
36
|
+
description: "Activate precision mode - blocks execution on ambiguous input, requires explicit clarification",
|
|
37
|
+
recommended: current_state === "OFF"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
title: "🔴 Disable Strict Mode",
|
|
41
|
+
description: "Return to normal mode - allows reasonable assumptions, faster iteration",
|
|
42
|
+
recommended: current_state === "ON"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
title: "ℹ️ Learn More",
|
|
46
|
+
description: "Understand when and how to use strict mode effectively"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
title: "📊 Check Current State",
|
|
50
|
+
description: "Show current strict mode configuration and status"
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
reason: "strict-mode-control"
|
|
54
|
+
})
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Handle User Selection
|
|
58
|
+
|
|
59
|
+
Based on user's choice:
|
|
60
|
+
|
|
61
|
+
**Enable Strict Mode:**
|
|
62
|
+
- Set STRICT_MODE = ON
|
|
63
|
+
- Confirm activation
|
|
64
|
+
- Show brief reminder of strict mode rules
|
|
65
|
+
- Return to conversation with strict mode active
|
|
66
|
+
|
|
67
|
+
**Disable Strict Mode:**
|
|
68
|
+
- Set STRICT_MODE = OFF
|
|
69
|
+
- Confirm deactivation
|
|
70
|
+
- Return to normal conversation mode
|
|
71
|
+
|
|
72
|
+
**Learn More:**
|
|
73
|
+
- Explain strict mode purpose and benefits
|
|
74
|
+
- Show examples of when to use it
|
|
75
|
+
- Describe the critical rules (no assumptions, mandatory clarification, block execution)
|
|
76
|
+
- Provide use case guidelines
|
|
77
|
+
- Offer to enable/disable after explanation
|
|
78
|
+
|
|
79
|
+
**Check Current State:**
|
|
80
|
+
- Display current STRICT_MODE value
|
|
81
|
+
- Show when it was last changed (if tracked)
|
|
82
|
+
- Explain current behavior
|
|
83
|
+
- Offer to change state
|
|
84
|
+
|
|
85
|
+
## Quick Reference
|
|
86
|
+
|
|
87
|
+
**Strict Mode Rules (when ON)**:
|
|
88
|
+
1. **NO ASSUMPTIONS** - Stop immediately if input is ambiguous
|
|
89
|
+
2. **MANDATORY CLARIFICATION** - Ask specific questions to resolve ambiguities
|
|
90
|
+
3. **BLOCK EXECUTION** - Do not execute main task until data is confirmed
|
|
91
|
+
4. **EXPLICIT AUTHORIZATION ONLY** - Proceed only with user confirmation
|
|
92
|
+
|
|
93
|
+
**When to Use**:
|
|
94
|
+
- Experimental/cutting-edge projects
|
|
95
|
+
- Architectural decisions
|
|
96
|
+
- Breaking changes
|
|
97
|
+
- New component patterns
|
|
98
|
+
- Debugging propagated errors
|
|
99
|
+
|
|
100
|
+
**When Standard Mode is Fine**:
|
|
101
|
+
- Well-established patterns
|
|
102
|
+
- Simple, clear tasks
|
|
103
|
+
- Documentation work
|
|
104
|
+
- Standard refactoring
|
|
105
|
+
- Common web development patterns
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
**Strict mode control ready.**
|
package/package.json
CHANGED
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kiro-agents",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "AI agent system for Kiro IDE",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
-
"kiro-agents": "
|
|
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
|
-
"
|
|
16
|
-
"
|
|
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",
|
|
21
|
+
"release": "bun run scripts/release.ts"
|
|
17
22
|
},
|
|
18
23
|
"keywords": [
|
|
19
24
|
"kiro",
|
|
@@ -22,6 +27,7 @@
|
|
|
22
27
|
"author": "R. Beltran",
|
|
23
28
|
"license": "MIT",
|
|
24
29
|
"devDependencies": {
|
|
30
|
+
"@changesets/cli": "^2.29.8",
|
|
25
31
|
"@types/bun": "latest"
|
|
26
32
|
},
|
|
27
33
|
"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
|
-
```
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|