kiro-agents 1.15.3 → 2.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 +1 -1
- package/build/npm/bin/cli.js +67 -118
- package/build/npm/dist/agents.md +1 -1
- package/build/npm/dist/aliases.md +1 -1
- package/build/npm/dist/reflect.md +3 -3
- package/build/npm/power/POWER.md +11 -252
- package/build/npm/power/steering/agent-activation.md +2 -2
- package/build/npm/power/steering/agent-creation.md +3 -3
- package/build/npm/power/steering/agent-management.md +4 -4
- package/build/npm/power/steering/reflect-manager-workflow.md +5 -5
- package/build/npm/power/steering/strict-mode.md +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -78,7 +78,7 @@ Automatically installed alongside kiro-agents, this Power provides protocols (ag
|
|
|
78
78
|
Protocols load only when needed, keeping your context clean. Base system uses just 1.35K tokens.
|
|
79
79
|
|
|
80
80
|
**Your Agents, Your Files**
|
|
81
|
-
Agents you create are saved as `.md` files in `.kiro/agents/`. Edit them like any document, version control them with git, reuse them across projects.
|
|
81
|
+
Agents you create are saved as `.md` files in `.kiro/kiro-agents/`. Edit them like any document, version control them with git, reuse them across projects.
|
|
82
82
|
|
|
83
83
|
## Documentation
|
|
84
84
|
|
package/build/npm/bin/cli.js
CHANGED
|
@@ -28,7 +28,8 @@ var __dirname2 = dirname(__filename2);
|
|
|
28
28
|
var STEERING_INSTALL_DIR = join(homedir(), ".kiro", "steering", "kiro-agents");
|
|
29
29
|
var POWER_INSTALL_DIR = join(homedir(), ".kiro", "powers", "kiro-protocols");
|
|
30
30
|
var POWER_INSTALLED_DIR = join(homedir(), ".kiro", "powers", "installed", "kiro-protocols");
|
|
31
|
-
var
|
|
31
|
+
var INSTALLED_JSON_PATH = join(homedir(), ".kiro", "powers", "installed.json");
|
|
32
|
+
var USER_ADDED_JSON_PATH = join(homedir(), ".kiro", "powers", "registries", "user-added.json");
|
|
32
33
|
var STEERING_FILES = [
|
|
33
34
|
"aliases.md",
|
|
34
35
|
"agents.md",
|
|
@@ -69,32 +70,6 @@ async function setReadOnly(filePath) {
|
|
|
69
70
|
console.warn(`⚠️ Could not set read-only: ${filePath}`);
|
|
70
71
|
}
|
|
71
72
|
}
|
|
72
|
-
async function extractPowerMetadata(powerMdPath) {
|
|
73
|
-
const { readFile } = await import("fs/promises");
|
|
74
|
-
const content = await readFile(powerMdPath, "utf-8");
|
|
75
|
-
const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/);
|
|
76
|
-
if (!frontmatterMatch || !frontmatterMatch[1]) {
|
|
77
|
-
throw new Error("No frontmatter found in POWER.md");
|
|
78
|
-
}
|
|
79
|
-
const frontmatter = frontmatterMatch[1];
|
|
80
|
-
const extractField = (pattern, defaultValue) => {
|
|
81
|
-
const match = frontmatter.match(pattern);
|
|
82
|
-
return match && match[1] ? match[1].trim() : defaultValue;
|
|
83
|
-
};
|
|
84
|
-
const extractKeywords = () => {
|
|
85
|
-
const match = frontmatter.match(/^keywords:\s*\[(.*?)\]$/m);
|
|
86
|
-
if (!match || !match[1])
|
|
87
|
-
return [];
|
|
88
|
-
return match[1].split(",").map((k) => k.trim().replace(/["']/g, ""));
|
|
89
|
-
};
|
|
90
|
-
return {
|
|
91
|
-
name: extractField(/^name:\s*["']?([^"'\n]+)["']?$/m, "kiro-protocols"),
|
|
92
|
-
displayName: extractField(/^displayName:\s*["']?([^"'\n]+)["']?$/m, "Kiro Protocols"),
|
|
93
|
-
description: extractField(/^description:\s*["']?([^"'\n]+)["']?$/m, ""),
|
|
94
|
-
keywords: extractKeywords(),
|
|
95
|
-
author: extractField(/^author:\s*["']?([^"'\n]+)["']?$/m, "")
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
73
|
async function copyRecursive(src, dest) {
|
|
99
74
|
const { stat, readdir, mkdir, copyFile } = await import("fs/promises");
|
|
100
75
|
const stats = await stat(src);
|
|
@@ -108,90 +83,73 @@ async function copyRecursive(src, dest) {
|
|
|
108
83
|
await copyFile(src, dest);
|
|
109
84
|
}
|
|
110
85
|
}
|
|
111
|
-
async function
|
|
112
|
-
const { readdir, mkdir,
|
|
113
|
-
const { platform } = await import("os");
|
|
114
|
-
let warningCount = 0;
|
|
86
|
+
async function installPowerFiles() {
|
|
87
|
+
const { readdir, mkdir, rm, stat, copyFile } = await import("fs/promises");
|
|
115
88
|
if (existsSync(POWER_INSTALLED_DIR)) {
|
|
116
89
|
await rm(POWER_INSTALLED_DIR, { recursive: true, force: true });
|
|
117
90
|
}
|
|
118
91
|
await mkdir(POWER_INSTALLED_DIR, { recursive: true });
|
|
119
92
|
const entries = await readdir(POWER_INSTALL_DIR);
|
|
120
93
|
for (const entry of entries) {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
console.log(`✅ Linked: ${entry}`);
|
|
132
|
-
} catch (error) {
|
|
133
|
-
try {
|
|
134
|
-
await copyRecursive(sourcePath, targetPath);
|
|
135
|
-
console.log(`\uD83D\uDCCB Copied: ${entry} (symlink not available)`);
|
|
136
|
-
} catch (copyError) {
|
|
137
|
-
console.warn(`⚠️ Could not link or copy ${entry}:`, error instanceof Error ? error.message : error);
|
|
138
|
-
warningCount++;
|
|
94
|
+
if (entry === "icon.png")
|
|
95
|
+
continue;
|
|
96
|
+
const srcPath = join(POWER_INSTALL_DIR, entry);
|
|
97
|
+
const destPath = join(POWER_INSTALLED_DIR, entry);
|
|
98
|
+
const stats = await stat(srcPath);
|
|
99
|
+
if (stats.isDirectory()) {
|
|
100
|
+
await copyRecursive(srcPath, destPath);
|
|
101
|
+
const subEntries = await readdir(destPath);
|
|
102
|
+
for (const subEntry of subEntries) {
|
|
103
|
+
await setReadOnly(join(destPath, subEntry));
|
|
139
104
|
}
|
|
105
|
+
} else {
|
|
106
|
+
await copyFile(srcPath, destPath);
|
|
107
|
+
await setReadOnly(destPath);
|
|
140
108
|
}
|
|
109
|
+
console.log(`✅ Installed: ${entry}`);
|
|
141
110
|
}
|
|
142
|
-
return warningCount;
|
|
143
111
|
}
|
|
144
|
-
async function
|
|
112
|
+
async function registerPower() {
|
|
145
113
|
const { readFile, writeFile, mkdir } = await import("fs/promises");
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
114
|
+
await mkdir(dirname(USER_ADDED_JSON_PATH), { recursive: true });
|
|
115
|
+
let installed;
|
|
116
|
+
if (existsSync(INSTALLED_JSON_PATH)) {
|
|
117
|
+
const content = await readFile(INSTALLED_JSON_PATH, "utf-8");
|
|
118
|
+
installed = JSON.parse(content);
|
|
119
|
+
} else {
|
|
120
|
+
installed = { version: "1.0.0", installedPowers: [], dismissedAutoInstalls: [] };
|
|
121
|
+
}
|
|
122
|
+
const alreadyInstalled = installed.installedPowers.some((p) => p.name === "kiro-protocols");
|
|
123
|
+
if (!alreadyInstalled) {
|
|
124
|
+
installed.installedPowers.push({ name: "kiro-protocols", registryId: "user-added" });
|
|
125
|
+
}
|
|
126
|
+
await writeFile(INSTALLED_JSON_PATH, JSON.stringify(installed, null, 2), "utf-8");
|
|
127
|
+
let userAdded;
|
|
128
|
+
if (existsSync(USER_ADDED_JSON_PATH)) {
|
|
129
|
+
const content = await readFile(USER_ADDED_JSON_PATH, "utf-8");
|
|
130
|
+
userAdded = JSON.parse(content);
|
|
152
131
|
} else {
|
|
153
|
-
|
|
154
|
-
version: "1.0.0",
|
|
155
|
-
powers: {},
|
|
156
|
-
repoSources: {},
|
|
157
|
-
lastUpdated: new Date().toISOString()
|
|
158
|
-
};
|
|
132
|
+
userAdded = { powers: [] };
|
|
159
133
|
}
|
|
160
|
-
const
|
|
161
|
-
const
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
name: metadata.name,
|
|
165
|
-
displayName: metadata.displayName,
|
|
166
|
-
description: metadata.description,
|
|
167
|
-
mcpServers: [],
|
|
168
|
-
author: metadata.author,
|
|
169
|
-
keywords: metadata.keywords,
|
|
170
|
-
installed: true,
|
|
171
|
-
installedAt: new Date().toISOString(),
|
|
172
|
-
installPath: POWER_INSTALLED_DIR,
|
|
134
|
+
const existingIdx = userAdded.powers.findIndex((p) => p.name === "kiro-protocols");
|
|
135
|
+
const entry = {
|
|
136
|
+
name: "kiro-protocols",
|
|
137
|
+
description: `Custom power from ${POWER_INSTALL_DIR}`,
|
|
173
138
|
source: {
|
|
174
|
-
type: "
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
},
|
|
178
|
-
sourcePath: POWER_INSTALL_DIR
|
|
179
|
-
};
|
|
180
|
-
registry.repoSources[repoId] = {
|
|
181
|
-
name: POWER_INSTALL_DIR,
|
|
182
|
-
type: "local",
|
|
183
|
-
enabled: true,
|
|
184
|
-
addedAt: new Date().toISOString(),
|
|
185
|
-
path: POWER_INSTALL_DIR,
|
|
186
|
-
lastSync: new Date().toISOString(),
|
|
187
|
-
powerCount: 1
|
|
139
|
+
type: "local",
|
|
140
|
+
path: POWER_INSTALL_DIR
|
|
141
|
+
}
|
|
188
142
|
};
|
|
189
|
-
|
|
190
|
-
|
|
143
|
+
if (existingIdx >= 0) {
|
|
144
|
+
userAdded.powers[existingIdx] = entry;
|
|
145
|
+
} else {
|
|
146
|
+
userAdded.powers.push(entry);
|
|
147
|
+
}
|
|
148
|
+
await writeFile(USER_ADDED_JSON_PATH, JSON.stringify(userAdded, null, 2), "utf-8");
|
|
191
149
|
console.log("✅ Power registered in Kiro registry");
|
|
192
150
|
return true;
|
|
193
151
|
}
|
|
194
|
-
async function installFile(relativePath, installDir, sourceDir) {
|
|
152
|
+
async function installFile(relativePath, installDir, sourceDir, readOnly = true) {
|
|
195
153
|
const destPath = join(installDir, relativePath);
|
|
196
154
|
if (existsSync(destPath)) {
|
|
197
155
|
await setWritable(destPath);
|
|
@@ -202,13 +160,14 @@ async function installFile(relativePath, installDir, sourceDir) {
|
|
|
202
160
|
const destDir = dirname(destPath);
|
|
203
161
|
await mkdir(destDir, { recursive: true });
|
|
204
162
|
await writeFile(destPath, content);
|
|
205
|
-
|
|
163
|
+
if (readOnly) {
|
|
164
|
+
await setReadOnly(destPath);
|
|
165
|
+
}
|
|
206
166
|
console.log(`✅ Installed: ${relativePath}`);
|
|
207
167
|
}
|
|
208
168
|
async function install() {
|
|
209
169
|
console.log(`\uD83D\uDE80 Installing kiro-agents system...
|
|
210
170
|
`);
|
|
211
|
-
let hasErrors = false;
|
|
212
171
|
let hasWarnings = false;
|
|
213
172
|
console.log("\uD83D\uDCC4 Installing steering files to ~/.kiro/steering/kiro-agents/");
|
|
214
173
|
if (existsSync(STEERING_INSTALL_DIR)) {
|
|
@@ -220,45 +179,36 @@ async function install() {
|
|
|
220
179
|
await installFile(file, STEERING_INSTALL_DIR, "dist");
|
|
221
180
|
}
|
|
222
181
|
console.log(`
|
|
223
|
-
⚡ Installing kiro-protocols
|
|
182
|
+
⚡ Installing kiro-protocols source to ~/.kiro/powers/kiro-protocols/`);
|
|
224
183
|
if (existsSync(POWER_INSTALL_DIR)) {
|
|
225
|
-
console.log("\uD83D\uDDD1️ Removing existing power
|
|
184
|
+
console.log("\uD83D\uDDD1️ Removing existing power source...");
|
|
226
185
|
const { rmSync } = await import("fs");
|
|
227
186
|
rmSync(POWER_INSTALL_DIR, { recursive: true, force: true });
|
|
228
187
|
}
|
|
229
188
|
for (const file of POWER_FILES) {
|
|
230
|
-
await installFile(file, POWER_INSTALL_DIR, "power");
|
|
189
|
+
await installFile(file, POWER_INSTALL_DIR, "power", false);
|
|
231
190
|
}
|
|
232
191
|
console.log(`
|
|
233
|
-
\uD83D\
|
|
192
|
+
\uD83D\uDCCB Copying power files to ~/.kiro/powers/installed/kiro-protocols/`);
|
|
234
193
|
try {
|
|
235
|
-
|
|
236
|
-
if (symlinkWarnings > 0) {
|
|
237
|
-
hasWarnings = true;
|
|
238
|
-
}
|
|
194
|
+
await installPowerFiles();
|
|
239
195
|
} catch (error) {
|
|
240
|
-
console.warn("⚠️ Warning: Could not
|
|
196
|
+
console.warn("⚠️ Warning: Could not copy power files to installed/:", error instanceof Error ? error.message : error);
|
|
241
197
|
console.warn(" Power may not appear correctly in Kiro Powers UI.");
|
|
242
198
|
hasWarnings = true;
|
|
243
199
|
}
|
|
244
200
|
console.log(`
|
|
245
201
|
\uD83D\uDCDD Registering power in Kiro registry...`);
|
|
246
202
|
try {
|
|
247
|
-
|
|
248
|
-
if (!registrySuccess) {
|
|
249
|
-
hasWarnings = true;
|
|
250
|
-
}
|
|
203
|
+
await registerPower();
|
|
251
204
|
} catch (error) {
|
|
252
|
-
console.warn("⚠️ Warning: Could not register power
|
|
205
|
+
console.warn("⚠️ Warning: Could not register power:", error instanceof Error ? error.message : error);
|
|
253
206
|
console.warn(" The power files are installed but may not appear in Kiro Powers UI.");
|
|
254
|
-
console.warn(" You can manually add the power via: Powers panel → Add
|
|
207
|
+
console.warn(" You can manually add the power via: Powers panel → Add Custom Power → Local Directory");
|
|
255
208
|
console.warn(` Path: ${POWER_INSTALL_DIR}`);
|
|
256
209
|
hasWarnings = true;
|
|
257
210
|
}
|
|
258
|
-
if (
|
|
259
|
-
console.log(`
|
|
260
|
-
❌ Installation completed with errors!`);
|
|
261
|
-
} else if (hasWarnings) {
|
|
211
|
+
if (hasWarnings) {
|
|
262
212
|
console.log(`
|
|
263
213
|
⚠️ Installation completed with warnings!`);
|
|
264
214
|
console.log(" Core files installed successfully, but some optional features may not work.");
|
|
@@ -267,12 +217,11 @@ async function install() {
|
|
|
267
217
|
✨ Installation completed successfully!`);
|
|
268
218
|
}
|
|
269
219
|
console.log(`
|
|
270
|
-
\uD83D\uDCC1 Steering files:
|
|
271
|
-
console.log(`\uD83D\uDCC1 Power
|
|
272
|
-
console.log(`\uD83D\uDCC1
|
|
220
|
+
\uD83D\uDCC1 Steering files: ${STEERING_INSTALL_DIR}`);
|
|
221
|
+
console.log(`\uD83D\uDCC1 Power source: ${POWER_INSTALL_DIR}`);
|
|
222
|
+
console.log(`\uD83D\uDCC1 Power installed: ${POWER_INSTALLED_DIR}`);
|
|
273
223
|
console.log(`
|
|
274
224
|
\uD83D\uDCA1 The kiro-protocols power should now appear as installed in Kiro Powers UI.`);
|
|
275
|
-
console.log("\uD83D\uDCA1 Files are set to read-only. To modify them, change permissions first.");
|
|
276
225
|
console.log(`
|
|
277
226
|
\uD83D\uDD04 To update, simply run 'npx kiro-agents' again.`);
|
|
278
227
|
}
|
package/build/npm/dist/agents.md
CHANGED
|
@@ -40,7 +40,7 @@ When auto-setup detects no agents exist:
|
|
|
40
40
|
/only-read-protocols agent-creation.md
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
2. **Create `.kiro/agents/kiro-master.md`** using the agent definition structure from agent-creation.md Step 3, with:
|
|
43
|
+
2. **Create `.kiro/kiro-agents/kiro-master.md`** using the agent definition structure from agent-creation.md Step 3, with:
|
|
44
44
|
|
|
45
45
|
**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
|
|
46
46
|
|
|
@@ -71,7 +71,7 @@ The agent activation command uses parameter substitution to load agent definitio
|
|
|
71
71
|
You are now activating the **{agent_name}** agent.
|
|
72
72
|
|
|
73
73
|
**Load and execute activation protocol:**
|
|
74
|
-
1. Read `.kiro/agents/{agent_name}.md` into context
|
|
74
|
+
1. Read `.kiro/kiro-agents/{agent_name}.md` into context
|
|
75
75
|
2. /only-read-protocols agent-activation.md
|
|
76
76
|
3. Follow all steps from the "Agent Activation Steps" section in agent-activation.md protocol file
|
|
77
77
|
4. Use `{agent_name}` as the agent identifier throughout the protocol
|
|
@@ -20,7 +20,7 @@ Enables reflection system for the currently active agent for this session.
|
|
|
20
20
|
|
|
21
21
|
**Step 1: Check if agent has Reflections section**
|
|
22
22
|
|
|
23
|
-
Read the agent definition file: `.kiro/agents/{agent-name}.md`
|
|
23
|
+
Read the agent definition file: `.kiro/kiro-agents/{agent-name}.md`
|
|
24
24
|
|
|
25
25
|
**If agent already has `## Reflections` section:**
|
|
26
26
|
- Load capture protocol: `/only-read-protocols reflect-agent-insights.md`
|
|
@@ -32,7 +32,7 @@ Read the agent definition file: `.kiro/agents/{agent-name}.md`
|
|
|
32
32
|
|
|
33
33
|
**Step 2: Add Reflections section to agent file**
|
|
34
34
|
|
|
35
|
-
Use `fsAppend` to add the following section to `.kiro/agents/{agent-name}.md`:
|
|
35
|
+
Use `fsAppend` to add the following section to `.kiro/kiro-agents/{agent-name}.md`:
|
|
36
36
|
|
|
37
37
|
````markdown
|
|
38
38
|
|
|
@@ -243,7 +243,7 @@ No initialization required! Files created automatically when:
|
|
|
243
243
|
|
|
244
244
|
## Learn More
|
|
245
245
|
|
|
246
|
-
- **Curator Agent:** `.kiro/agents/reflection-curator.md`
|
|
246
|
+
- **Curator Agent:** `.kiro/kiro-agents/reflection-curator.md`
|
|
247
247
|
|
|
248
248
|
---
|
|
249
249
|
|
package/build/npm/power/POWER.md
CHANGED
|
@@ -1,274 +1,33 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "kiro-protocols"
|
|
3
3
|
displayName: "Kiro Protocols"
|
|
4
|
-
description: "
|
|
5
|
-
keywords: ["
|
|
4
|
+
description: "Steering file library - Reusable content loaded on-demand to minimize context overhead"
|
|
5
|
+
keywords: ["protocol-library", "steering-library", "lazy-loading"]
|
|
6
6
|
author: "R. Beltran"
|
|
7
7
|
version: "1.0.0"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# Kiro Protocols
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Steering file library providing reusable content loaded on-demand to minimize context overhead.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
## Usage
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
Protocols are detailed, step-by-step instruction documents that guide AI through complex workflows. Instead of embedding these instructions directly in every steering document, protocols are loaded dynamically only when needed, reducing context overhead and improving maintainability.
|
|
19
|
-
|
|
20
|
-
**Key Benefits:**
|
|
21
|
-
- **On-Demand Loading** - Protocols load only when needed, minimizing context
|
|
22
|
-
- **Single Source of Truth** - One protocol, many consumers
|
|
23
|
-
- **Reusable Across Powers** - Any power can reference these protocols
|
|
24
|
-
- **Maintainable** - Update once, affects all consumers
|
|
25
|
-
- **Extensible** - Easy to add new protocols
|
|
26
|
-
|
|
27
|
-
## Available Protocols
|
|
28
|
-
|
|
29
|
-
This power provides the following protocols as steering files:
|
|
30
|
-
|
|
31
|
-
### Core Protocols
|
|
32
|
-
|
|
33
|
-
- **strict-mode** - Precision mode for experimental/cutting-edge development
|
|
34
|
-
- Blocks execution on ambiguous input
|
|
35
|
-
- Mandatory clarification before proceeding
|
|
36
|
-
- Prevents assumption propagation
|
|
37
|
-
- Opt-in via `/strict on` command
|
|
38
|
-
|
|
39
|
-
### Agent System Protocols
|
|
40
|
-
|
|
41
|
-
- **agent-activation** - Protocol for activating and assuming agent roles
|
|
42
|
-
- Loads agent definition
|
|
43
|
-
- Applies agent protocols
|
|
44
|
-
- Begins agent interaction
|
|
45
|
-
|
|
46
|
-
- **agent-management** - Interactive agent management workflow
|
|
47
|
-
- Chit-chat mode interface
|
|
48
|
-
- Agent directory scanning
|
|
49
|
-
- Create, activate, manage, and view agents
|
|
50
|
-
|
|
51
|
-
- **agent-creation** - Step-by-step agent creation wizard
|
|
52
|
-
- Gather agent information
|
|
53
|
-
- Generate agent definition
|
|
54
|
-
- Validate and finalize
|
|
55
|
-
|
|
56
|
-
### Mode System Protocols
|
|
57
|
-
|
|
58
|
-
- **mode-switching** - Protocol for switching between Kiro modes
|
|
59
|
-
- Load mode definition
|
|
60
|
-
- Preserve context
|
|
61
|
-
- Handle workflow state transitions
|
|
62
|
-
|
|
63
|
-
- **mode-management** - Interactive mode management workflow
|
|
64
|
-
- Mode selection interface
|
|
65
|
-
- Mode comparison
|
|
66
|
-
- Help and documentation
|
|
67
|
-
|
|
68
|
-
## How to Use Protocols
|
|
69
|
-
|
|
70
|
-
### Method 1: Direct Steering File Load (Recommended)
|
|
71
|
-
|
|
72
|
-
Use Kiro's built-in power tools to load protocols on-demand:
|
|
73
|
-
|
|
74
|
-
```markdown
|
|
75
|
-
**Load protocol:**
|
|
76
|
-
1. Call kiroPowers action="activate" with powerName="kiro-protocols"
|
|
77
|
-
2. Call kiroPowers action="readSteering" with powerName="kiro-protocols", steeringFile="agent-activation.md"
|
|
78
|
-
3. Follow all steps from the loaded protocol
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
**Example in steering document:**
|
|
82
|
-
```markdown
|
|
83
|
-
When user activates agent:
|
|
84
|
-
1. Load agent-activation protocol from kiro-protocols power
|
|
85
|
-
2. Execute protocol steps with agent name as parameter
|
|
86
|
-
3. Agent assumes role and begins interaction
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### Method 2: Instruction Alias Pattern
|
|
90
|
-
|
|
91
|
-
Create reusable aliases that load protocols:
|
|
92
|
-
|
|
93
|
-
```markdown
|
|
94
|
-
<alias>
|
|
95
|
-
<trigger>/protocol {protocol_name}</trigger>
|
|
96
|
-
<definition>
|
|
97
|
-
## Load Protocol: {protocol_name}
|
|
98
|
-
|
|
99
|
-
**Execute protocol loading:**
|
|
100
|
-
1. Call kiroPowers action="activate" with powerName="kiro-protocols"
|
|
101
|
-
2. Call kiroPowers action="readSteering" with powerName="kiro-protocols", steeringFile="{protocol_name}.md"
|
|
102
|
-
3. Follow all steps from the loaded protocol
|
|
103
|
-
</definition>
|
|
104
|
-
</alias>
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
### Method 3: Programmatic Reference
|
|
108
|
-
|
|
109
|
-
Reference protocols in your steering documents:
|
|
110
|
-
|
|
111
|
-
```markdown
|
|
112
|
-
**When creating new agent:**
|
|
113
|
-
- Load `agent-creation.md` protocol from kiro-protocols power
|
|
114
|
-
- Follow wizard steps to gather information
|
|
115
|
-
- Generate agent definition file
|
|
116
|
-
- Validate and offer activation
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
## Protocol Structure
|
|
120
|
-
|
|
121
|
-
Each protocol follows a consistent structure:
|
|
122
|
-
|
|
123
|
-
```markdown
|
|
124
|
-
# Protocol Name
|
|
125
|
-
|
|
126
|
-
Brief description of what this protocol does.
|
|
127
|
-
|
|
128
|
-
## Protocol Steps
|
|
129
|
-
|
|
130
|
-
### Step 1: [Action Name]
|
|
131
|
-
|
|
132
|
-
Detailed instructions for this step...
|
|
133
|
-
|
|
134
|
-
### Step 2: [Action Name]
|
|
135
|
-
|
|
136
|
-
Detailed instructions for this step...
|
|
137
|
-
|
|
138
|
-
[Additional steps...]
|
|
139
|
-
|
|
140
|
-
---
|
|
141
|
-
|
|
142
|
-
**Protocol complete. [Next action guidance]**
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
## Best Practices
|
|
146
|
-
|
|
147
|
-
### For Protocol Consumers
|
|
148
|
-
|
|
149
|
-
1. **Load on-demand** - Only load protocols when needed
|
|
150
|
-
2. **Follow steps sequentially** - Protocols are designed as ordered workflows
|
|
151
|
-
3. **Preserve context** - Protocols may reference previous steps
|
|
152
|
-
4. **Handle errors gracefully** - Protocols include error handling guidance
|
|
153
|
-
|
|
154
|
-
### For Protocol Authors
|
|
155
|
-
|
|
156
|
-
1. **Keep focused** - One protocol, one workflow
|
|
157
|
-
2. **Be explicit** - Clear, actionable steps
|
|
158
|
-
3. **Include examples** - Show expected inputs/outputs
|
|
159
|
-
4. **Document dependencies** - List required context or prerequisites
|
|
160
|
-
5. **Version carefully** - Breaking changes affect all consumers
|
|
161
|
-
|
|
162
|
-
## Creating Custom Protocols
|
|
163
|
-
|
|
164
|
-
Want to add your own protocols to this power?
|
|
165
|
-
|
|
166
|
-
1. **Fork the repository** - https://github.com/Theadd/kiro-agents
|
|
167
|
-
2. **Add protocol file** - Create `.md` file in `src/core/protocols/`
|
|
168
|
-
3. **Follow structure** - Use existing protocols as templates
|
|
169
|
-
4. **Build and test** - Run build script and test in Kiro IDE
|
|
170
|
-
5. **Submit PR** - Contribute back to the community
|
|
171
|
-
|
|
172
|
-
## Integration Examples
|
|
173
|
-
|
|
174
|
-
### Example 1: Agent System
|
|
175
|
-
|
|
176
|
-
```markdown
|
|
177
|
-
# agents.md (steering document)
|
|
178
|
-
|
|
179
|
-
When user types `/agents {name}`:
|
|
180
|
-
1. Load agent-activation protocol
|
|
181
|
-
2. Pass agent name as parameter
|
|
182
|
-
3. Execute protocol steps
|
|
183
|
-
4. Agent activates and assumes role
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
### Example 2: Mode System
|
|
16
|
+
Load steering files on-demand via instruction aliases or direct kiroPowers calls:
|
|
187
17
|
|
|
188
18
|
```markdown
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
When user types `/modes {mode}`:
|
|
192
|
-
1. Load mode-switching protocol
|
|
193
|
-
2. Pass mode name as parameter
|
|
194
|
-
3. Check for workflow state preservation
|
|
195
|
-
4. Execute mode switch
|
|
19
|
+
/protocols agent-activation.md
|
|
20
|
+
/only-read-protocols chit-chat.md
|
|
196
21
|
```
|
|
197
22
|
|
|
198
|
-
|
|
23
|
+
Or directly:
|
|
199
24
|
|
|
200
25
|
```markdown
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
When complex workflow needed:
|
|
204
|
-
1. Load agent-management protocol from kiro-protocols
|
|
205
|
-
2. Use interactive chit-chat pattern
|
|
206
|
-
3. Guide user through multi-step process
|
|
207
|
-
4. Apply custom power logic
|
|
26
|
+
kiroPowers action="readSteering" powerName="kiro-protocols" steeringFile="agent-activation.md"
|
|
208
27
|
```
|
|
209
28
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
### Protocol Not Found
|
|
213
|
-
|
|
214
|
-
**Problem:** Error loading protocol file
|
|
215
|
-
|
|
216
|
-
**Solutions:**
|
|
217
|
-
1. Verify kiro-protocols power is installed
|
|
218
|
-
2. Check protocol name spelling (case-sensitive)
|
|
219
|
-
3. Ensure protocol exists in available list above
|
|
220
|
-
4. Try reloading power: Kiro Powers panel → Reload
|
|
221
|
-
|
|
222
|
-
### Protocol Outdated
|
|
223
|
-
|
|
224
|
-
**Problem:** Protocol references old paths or commands
|
|
225
|
-
|
|
226
|
-
**Solutions:**
|
|
227
|
-
1. Update kiro-protocols power to latest version
|
|
228
|
-
2. Check GitHub releases for breaking changes
|
|
229
|
-
3. Review protocol changelog in repository
|
|
230
|
-
|
|
231
|
-
### Context Overflow
|
|
232
|
-
|
|
233
|
-
**Problem:** Too many protocols loaded at once
|
|
234
|
-
|
|
235
|
-
**Solutions:**
|
|
236
|
-
1. Load protocols only when needed (not upfront)
|
|
237
|
-
2. Use on-demand loading pattern
|
|
238
|
-
3. Consider splitting complex workflows
|
|
239
|
-
4. Unload unused protocols from context
|
|
240
|
-
|
|
241
|
-
## Version Compatibility
|
|
242
|
-
|
|
243
|
-
This power follows semantic versioning:
|
|
244
|
-
|
|
245
|
-
- **Major version** - Breaking changes to protocol structure
|
|
246
|
-
- **Minor version** - New protocols added
|
|
247
|
-
- **Patch version** - Bug fixes and clarifications
|
|
248
|
-
|
|
249
|
-
**Current Version:** 1.0.0
|
|
250
|
-
|
|
251
|
-
**Compatibility:**
|
|
252
|
-
- Kiro IDE: All versions with Powers support
|
|
253
|
-
- kiro-agents: v1.6.0+
|
|
254
|
-
|
|
255
|
-
## Contributing
|
|
256
|
-
|
|
257
|
-
Contributions welcome! See repository for guidelines:
|
|
258
|
-
- https://github.com/Theadd/kiro-agents
|
|
259
|
-
|
|
260
|
-
**Ways to contribute:**
|
|
261
|
-
1. Report issues with existing protocols
|
|
262
|
-
2. Suggest new protocols
|
|
263
|
-
3. Improve protocol documentation
|
|
264
|
-
4. Submit protocol enhancements
|
|
265
|
-
|
|
266
|
-
## License
|
|
267
|
-
|
|
268
|
-
MIT License - See repository for full license text
|
|
29
|
+
**Note:** No activation needed - protocols are steering files, not MCP tools.
|
|
269
30
|
|
|
270
31
|
---
|
|
271
32
|
|
|
272
|
-
**
|
|
273
|
-
**Repository:** https://github.com/Theadd/kiro-agents
|
|
274
|
-
**Version:** 1.0.0
|
|
33
|
+
**Repository:** https://github.com/Theadd/kiro-agents
|
|
@@ -8,7 +8,7 @@ When activating agent `{agent_name}`:
|
|
|
8
8
|
|
|
9
9
|
### Step 1: Load Agent Definition and Strict Mode
|
|
10
10
|
|
|
11
|
-
Read `.kiro/agents/{agent_name}.md` into context.
|
|
11
|
+
Read `.kiro/kiro-agents/{agent_name}.md` into context.
|
|
12
12
|
|
|
13
13
|
This file contains:
|
|
14
14
|
- Agent capabilities and responsibilities
|
|
@@ -49,7 +49,7 @@ If chit-chat.md is in context from a previous session, its patterns do not apply
|
|
|
49
49
|
For this session, you are **{agent_name}**.
|
|
50
50
|
|
|
51
51
|
You will:
|
|
52
|
-
- Follow ALL protocols and instructions from `.kiro/agents/{agent_name}.md`
|
|
52
|
+
- Follow ALL protocols and instructions from `.kiro/kiro-agents/{agent_name}.md`
|
|
53
53
|
- Apply agent-specific interaction patterns
|
|
54
54
|
- Use capabilities defined in the agent definition
|
|
55
55
|
- Maintain this role until user switches agents or ends session
|
|
@@ -328,7 +328,7 @@ Requirements:
|
|
|
328
328
|
- Lowercase with hyphens (e.g., `refactor-architect`)
|
|
329
329
|
- No spaces or special characters
|
|
330
330
|
- Descriptive of agent's purpose
|
|
331
|
-
- Must be unique (check `.kiro/agents/` directory)
|
|
331
|
+
- Must be unique (check `.kiro/kiro-agents/` directory)
|
|
332
332
|
|
|
333
333
|
#### 2.3: Agent Description
|
|
334
334
|
|
|
@@ -487,7 +487,7 @@ Once confirmed, generate complete agent definition using the AI-analyzed capabil
|
|
|
487
487
|
|
|
488
488
|
## Step 3: Generate Agent Definition File
|
|
489
489
|
|
|
490
|
-
Create `.kiro/agents/{agent-name}.md` with this structure:
|
|
490
|
+
Create `.kiro/kiro-agents/{agent-name}.md` with this structure:
|
|
491
491
|
|
|
492
492
|
```markdown
|
|
493
493
|
---
|
|
@@ -612,7 +612,7 @@ Show summary to user:
|
|
|
612
612
|
|
|
613
613
|
**Agent Created:** `{agent-name}`
|
|
614
614
|
|
|
615
|
-
**Location:** `.kiro/agents/{agent-name}.md`
|
|
615
|
+
**Location:** `.kiro/kiro-agents/{agent-name}.md`
|
|
616
616
|
|
|
617
617
|
**Summary:**
|
|
618
618
|
- Type: {type}
|
|
@@ -26,16 +26,16 @@ Begin with a diff block showing:
|
|
|
26
26
|
|
|
27
27
|
### Step 2: Scan Agents Directory
|
|
28
28
|
|
|
29
|
-
**CRITICAL: You MUST execute `listDirectory` tool on `.kiro/agents/` to get the actual list of agents.**
|
|
29
|
+
**CRITICAL: You MUST execute `listDirectory` tool on `.kiro/kiro-agents/` to get the actual list of agents.**
|
|
30
30
|
|
|
31
31
|
**DO NOT rely on open editor files or context - always scan the directory explicitly.**
|
|
32
32
|
|
|
33
|
-
Execute `listDirectory` on `.kiro/agents/`:
|
|
33
|
+
Execute `listDirectory` on `.kiro/kiro-agents/`:
|
|
34
34
|
|
|
35
35
|
**If directory doesn't exist OR directory is empty:**
|
|
36
36
|
1. **Load agent creation protocol**:
|
|
37
37
|
- Call `kiroPowers` with action="readSteering", powerName="kiro-protocols", steeringFile="agent-creation.md"
|
|
38
|
-
2. Create `.kiro/agents/kiro-master.md` agent automatically using the description from "Initial Agent" section
|
|
38
|
+
2. Create `.kiro/kiro-agents/kiro-master.md` agent automatically using the description from "Initial Agent" section
|
|
39
39
|
3. Follow the agent definition structure from agent-creation.md protocol
|
|
40
40
|
4. Show diff block indicating setup completion
|
|
41
41
|
5. Continue to Step 3 with kiro-master as available agent
|
|
@@ -58,7 +58,7 @@ Use this response structure:
|
|
|
58
58
|
|
|
59
59
|
**Current Focus**: Agent selection and management
|
|
60
60
|
|
|
61
|
-
**Available agents in `.kiro/agents/`:**
|
|
61
|
+
**Available agents in `.kiro/kiro-agents/`:**
|
|
62
62
|
|
|
63
63
|
[List each agent with format:]
|
|
64
64
|
- **{agent-name}** - {description from frontmatter or .md}
|
|
@@ -16,7 +16,7 @@ This protocol enables batch enablement of reflection system across multiple agen
|
|
|
16
16
|
**Scan agent directory:**
|
|
17
17
|
|
|
18
18
|
```
|
|
19
|
-
.kiro/agents/
|
|
19
|
+
.kiro/kiro-agents/
|
|
20
20
|
├── agent-1.md
|
|
21
21
|
├── agent-2.md
|
|
22
22
|
├── agent-3.md
|
|
@@ -107,7 +107,7 @@ For each selected agent:
|
|
|
107
107
|
#### 5a. Read Agent Definition
|
|
108
108
|
|
|
109
109
|
```
|
|
110
|
-
Read: .kiro/agents/{agent-name}.md
|
|
110
|
+
Read: .kiro/kiro-agents/{agent-name}.md
|
|
111
111
|
```
|
|
112
112
|
|
|
113
113
|
#### 5b. Check Current State
|
|
@@ -166,9 +166,9 @@ Processed: {total} agents
|
|
|
166
166
|
└─ Skipped: {skipped-count}
|
|
167
167
|
|
|
168
168
|
Modified agent definitions:
|
|
169
|
-
- .kiro/agents/{agent-1}.md
|
|
170
|
-
- .kiro/agents/{agent-2}.md
|
|
171
|
-
- .kiro/agents/{agent-3}.md
|
|
169
|
+
- .kiro/kiro-agents/{agent-1}.md
|
|
170
|
+
- .kiro/kiro-agents/{agent-2}.md
|
|
171
|
+
- .kiro/kiro-agents/{agent-3}.md
|
|
172
172
|
...
|
|
173
173
|
|
|
174
174
|
Next steps:
|
|
@@ -142,7 +142,7 @@ ACTIVE_AGENT: none | {agent-name}
|
|
|
142
142
|
|
|
143
143
|
**Agent activation:**
|
|
144
144
|
- Triggered by `/agents {agent-name}` command
|
|
145
|
-
- Loads `.kiro/agents/{agent-name}.md` into context
|
|
145
|
+
- Loads `.kiro/kiro-agents/{agent-name}.md` into context
|
|
146
146
|
- Executes agent-activation protocol
|
|
147
147
|
- Sets ACTIVE_AGENT = {agent-name}
|
|
148
148
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kiro-agents",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Advanced AI agent system for Kiro IDE - Create specialized AI agents, switch interaction modes, and enhance development workflows with minimal cognitive overhead",
|
|
5
5
|
"homepage": "https://github.com/Theadd/kiro-agents#readme",
|
|
6
6
|
"repository": {
|