kiro-agents 1.15.2 → 1.15.4
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/build/npm/bin/cli.js +51 -5
- package/build/npm/power/POWER.md +11 -252
- package/package.json +1 -1
package/build/npm/bin/cli.js
CHANGED
|
@@ -45,12 +45,17 @@ var POWER_FILES = [
|
|
|
45
45
|
"steering/reflect-manager-workflow.md",
|
|
46
46
|
"steering/reflect-curator-checklist.md",
|
|
47
47
|
"steering/reflect-agent-insights.md",
|
|
48
|
+
"steering/mode-switching.md",
|
|
49
|
+
"steering/mode-management.md",
|
|
48
50
|
"steering/kiro-vibe-mode.md",
|
|
49
51
|
"steering/kiro-spec-mode.md",
|
|
50
52
|
"steering/kiro-as-vibe-mode.md",
|
|
51
53
|
"steering/kiro-as-spec-mode.md",
|
|
52
54
|
"steering/explainability-protocol.md",
|
|
53
|
-
"steering/chit-chat.md"
|
|
55
|
+
"steering/chit-chat.md",
|
|
56
|
+
"steering/agent-management.md",
|
|
57
|
+
"steering/agent-creation.md",
|
|
58
|
+
"steering/agent-activation.md"
|
|
54
59
|
];
|
|
55
60
|
async function setWritable(filePath) {
|
|
56
61
|
try {
|
|
@@ -90,9 +95,23 @@ async function extractPowerMetadata(powerMdPath) {
|
|
|
90
95
|
author: extractField(/^author:\s*["']?([^"'\n]+)["']?$/m, "")
|
|
91
96
|
};
|
|
92
97
|
}
|
|
98
|
+
async function copyRecursive(src, dest) {
|
|
99
|
+
const { stat, readdir, mkdir, copyFile } = await import("fs/promises");
|
|
100
|
+
const stats = await stat(src);
|
|
101
|
+
if (stats.isDirectory()) {
|
|
102
|
+
await mkdir(dest, { recursive: true });
|
|
103
|
+
const entries = await readdir(src);
|
|
104
|
+
for (const entry of entries) {
|
|
105
|
+
await copyRecursive(join(src, entry), join(dest, entry));
|
|
106
|
+
}
|
|
107
|
+
} else {
|
|
108
|
+
await copyFile(src, dest);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
93
111
|
async function createSymbolicLinks() {
|
|
94
112
|
const { readdir, mkdir, symlink, rm, stat } = await import("fs/promises");
|
|
95
113
|
const { platform } = await import("os");
|
|
114
|
+
let warningCount = 0;
|
|
96
115
|
if (existsSync(POWER_INSTALLED_DIR)) {
|
|
97
116
|
await rm(POWER_INSTALLED_DIR, { recursive: true, force: true });
|
|
98
117
|
}
|
|
@@ -111,9 +130,16 @@ async function createSymbolicLinks() {
|
|
|
111
130
|
}
|
|
112
131
|
console.log(`✅ Linked: ${entry}`);
|
|
113
132
|
} catch (error) {
|
|
114
|
-
|
|
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++;
|
|
139
|
+
}
|
|
115
140
|
}
|
|
116
141
|
}
|
|
142
|
+
return warningCount;
|
|
117
143
|
}
|
|
118
144
|
async function registerPowerInRegistry() {
|
|
119
145
|
const { readFile, writeFile, mkdir } = await import("fs/promises");
|
|
@@ -163,6 +189,7 @@ async function registerPowerInRegistry() {
|
|
|
163
189
|
registry.lastUpdated = new Date().toISOString();
|
|
164
190
|
await writeFile(REGISTRY_PATH, JSON.stringify(registry, null, 2), "utf-8");
|
|
165
191
|
console.log("✅ Power registered in Kiro registry");
|
|
192
|
+
return true;
|
|
166
193
|
}
|
|
167
194
|
async function installFile(relativePath, installDir, sourceDir) {
|
|
168
195
|
const destPath = join(installDir, relativePath);
|
|
@@ -181,6 +208,8 @@ async function installFile(relativePath, installDir, sourceDir) {
|
|
|
181
208
|
async function install() {
|
|
182
209
|
console.log(`\uD83D\uDE80 Installing kiro-agents system...
|
|
183
210
|
`);
|
|
211
|
+
let hasErrors = false;
|
|
212
|
+
let hasWarnings = false;
|
|
184
213
|
console.log("\uD83D\uDCC4 Installing steering files to ~/.kiro/steering/kiro-agents/");
|
|
185
214
|
if (existsSync(STEERING_INSTALL_DIR)) {
|
|
186
215
|
console.log("\uD83D\uDDD1️ Removing existing steering installation...");
|
|
@@ -203,23 +232,40 @@ async function install() {
|
|
|
203
232
|
console.log(`
|
|
204
233
|
\uD83D\uDD17 Creating symbolic links in installed/ directory...`);
|
|
205
234
|
try {
|
|
206
|
-
await createSymbolicLinks();
|
|
235
|
+
const symlinkWarnings = await createSymbolicLinks();
|
|
236
|
+
if (symlinkWarnings > 0) {
|
|
237
|
+
hasWarnings = true;
|
|
238
|
+
}
|
|
207
239
|
} catch (error) {
|
|
208
240
|
console.warn("⚠️ Warning: Could not create symbolic links:", error instanceof Error ? error.message : error);
|
|
209
241
|
console.warn(" Power may not appear correctly in Kiro Powers UI.");
|
|
242
|
+
hasWarnings = true;
|
|
210
243
|
}
|
|
211
244
|
console.log(`
|
|
212
245
|
\uD83D\uDCDD Registering power in Kiro registry...`);
|
|
213
246
|
try {
|
|
214
|
-
await registerPowerInRegistry();
|
|
247
|
+
const registrySuccess = await registerPowerInRegistry();
|
|
248
|
+
if (!registrySuccess) {
|
|
249
|
+
hasWarnings = true;
|
|
250
|
+
}
|
|
215
251
|
} catch (error) {
|
|
216
252
|
console.warn("⚠️ Warning: Could not register power in registry:", error instanceof Error ? error.message : error);
|
|
217
253
|
console.warn(" The power files are installed but may not appear in Kiro Powers UI.");
|
|
218
254
|
console.warn(" You can manually add the power via: Powers panel → Add Repository → Local Directory");
|
|
219
255
|
console.warn(` Path: ${POWER_INSTALL_DIR}`);
|
|
256
|
+
hasWarnings = true;
|
|
220
257
|
}
|
|
221
|
-
|
|
258
|
+
if (hasErrors) {
|
|
259
|
+
console.log(`
|
|
260
|
+
❌ Installation completed with errors!`);
|
|
261
|
+
} else if (hasWarnings) {
|
|
262
|
+
console.log(`
|
|
263
|
+
⚠️ Installation completed with warnings!`);
|
|
264
|
+
console.log(" Core files installed successfully, but some optional features may not work.");
|
|
265
|
+
} else {
|
|
266
|
+
console.log(`
|
|
222
267
|
✨ Installation completed successfully!`);
|
|
268
|
+
}
|
|
223
269
|
console.log(`
|
|
224
270
|
\uD83D\uDCC1 Steering files: ${STEERING_INSTALL_DIR}`);
|
|
225
271
|
console.log(`\uD83D\uDCC1 Power files: ${POWER_INSTALL_DIR}`);
|
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
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kiro-agents",
|
|
3
|
-
"version": "1.15.
|
|
3
|
+
"version": "1.15.4",
|
|
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": {
|