kiro-agents 1.11.0 → 1.13.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
@@ -1,229 +1,103 @@
1
1
  # kiro-agents
2
2
 
3
- AI agent system for Kiro IDE with specialized agents, interaction modes, and protocol-driven workflows.
3
+ AI agent system for Kiro IDE. Create custom AI agents tailored to your exact needs—easily and interactively, with minimal prompt writing.
4
4
 
5
- > **Zero-prompt interaction (default)** Chit-chat protocol provides numbered choices for all interactions. Agents can be created with or without this interaction style.
6
- >
7
- > **Minimal footprint** — ~0.9K base context, protocols load on-demand.
8
-
9
- ```bash
10
- npx kiro-agents
11
- ```
12
-
13
- <div align="center">
14
- <a href="https://youtu.be/Arccq_JhpFk">
15
- <img src="docs/resources/animate-kiro.gif" alt="Kiro Agents Demo" width="800">
16
- </a>
17
- <p><em>Watch demo (3:52) — Protocol-driven agent creation with zero-prompt interaction</em></p>
18
- </div>
5
+ Build agents for any domain: development, design, business, research, or anything else. Choose from templates, explore role libraries, describe what you need in plain language, or craft agents step-by-step. Once created, refine them to perfection through kiro-master, the management agent created automatically on first use.
19
6
 
20
7
  ## Features
21
8
 
22
- ### Agent System
23
- Create specialized agents with defined capabilities and workflows. Agents are stored as markdown files in `.kiro/agents/` and activated via `/agents {name}`.
24
-
25
- **Layered protocol architecture** makes agents all-powerful: structured boundaries at top levels provide clear responsibilities, while open-ended inner levels leverage SOTA model creativity to generate optimal implementations. You specify WHAT (roles, capabilities), the AI determines HOW (architecture, workflows). See [Creating All-Powerful Agents](docs/user-guide/creating-powerful-agents.md) for details.
26
-
27
- - **Interactive creation** - Guided wizard with 5 creation methods
28
- - **Domain specialization** - Frontend, backend, testing, DevOps, documentation
29
- - **AI-generated architecture** - Model creates optimal agent structure from your specifications
30
- - **Persistent definitions** - Reusable across sessions and projects
31
-
32
- ### Mode System
33
- Switch between workflow structures based on development needs:
34
-
35
- - **`vibe`** - Flexible, fast-paced development with Kiro tools
36
- - **`spec`** - Structured feature development (requirements → design → tasks) with Kiro tools
37
- - **`as-vibe`** - Vibe workflow, keeps current tools (agent superpowers)
38
- - **`as-spec`** - Spec workflow, keeps current tools (agent superpowers)
39
-
40
- Modes preserve file changes but reset workflow state. Combine with agents for specialized tools + preferred workflow structure.
41
-
42
- ### Strict Mode
43
- Precision mode that blocks execution on ambiguous input. Prevents assumption propagation in experimental or architectural work.
44
-
45
- - **Explicit clarification** - Forces questions instead of guesses
46
- - **Assumption prevention** - Stops errors before they spread
47
- - **Optional activation** - Defaults to OFF, enable with `/strict on`
9
+ **Core Capabilities:**
10
+ - 🎯 **Guided Agent Creation** - Multiple creation methods: templates, role explorer, natural language, or step-by-step wizard
11
+ - 🔧 **Powerful Refinement** - Modify and perfect agents through kiro-master, the auto-created management agent
12
+ - 💬 **Interactive by Default** - Guided workflows with minimal prompt writing for both creating and using agents
13
+ - 🌐 **Unlimited Domains** - Build agents for any field: development, design, business, research, or anything else
14
+ - 📦 **Minimal Footprint** - 1.35K base context (<0.7% of Kiro's 200K), protocols load on-demand
48
15
 
49
- ### Chit-Chat Interaction Protocol
50
- Structured interaction optimized for reduced cognitive load (default for all agents):
51
-
52
- - **Numbered choices** - Pre-structured options eliminate prompt writing
53
- - **Diff blocks** - Visual progress tracking and context preservation
54
- - **Single focus** - One concept per message prevents overwhelm
55
- - **Full control + simplicity** - Navigate complex workflows without writing prompts
56
- - **ADHD-optimized** - Designed for neurodivergent users, benefits everyone
57
- - **Optional** - Agents can be created with custom interaction styles if needed
16
+ **Additional Features:**
17
+ - 🔄 **Flexible Modes** - Switch between vibe (conversational) and spec (structured) workflows
18
+ - 🎯 **Strict Mode** - Precision mode that blocks execution on ambiguous input
19
+ - 🧠 **Reflection System** - Agents learn from experience with persistent memory across sessions
58
20
 
59
21
  ## Installation
60
22
 
61
- **Global installation (recommended):**
62
23
  ```bash
63
24
  npx kiro-agents
64
25
  ```
65
26
 
66
- Installs to `~/.kiro/steering/kiro-agents/` and `~/.kiro/powers/kiro-protocols/` available in all workspaces.
67
-
68
- **What gets installed:**
69
- - Core system files (aliases, protocols, interaction patterns)
70
- - kiro-protocols Power (reusable protocol library)
71
- - Automatic power registration in Kiro IDE
27
+ Installs kiro-agents and the kiro-protocols Power. Run the same command to update to the latest version.
72
28
 
73
29
  ## Quick Start
74
30
 
75
- ### 1. Create Your First Agent
31
+ ### 1. Start Agent System
76
32
 
77
33
  ```
78
34
  /agents
79
35
  ```
80
36
 
81
- Interactive wizard with 5 creation methods:
82
- 1. **Quick Start** - Predefined templates (frontend, backend, testing, etc.)
83
- 2. **Project-Specific** - AI analyzes your codebase
84
- 3. **Explore Roles** - Browse domain categories
85
- 4. **Guided Wizard** - Step-by-step customization
86
- 5. **Natural Language** - Describe in plain English
37
+ On first run, this automatically creates **kiro-master** (your Kiro management agent) and shows you the agent menu.
38
+
39
+ ### 2. Create Your First Custom Agent
40
+
41
+ From the agent menu, choose **"Create new agent"** and pick a creation method:
42
+
43
+ - **Quick Start** - Choose from templates
44
+ - **Explore Roles** - Browse agents by domain
45
+ - **Natural Language** - Just describe what you need
46
+ - **Project-Specific** - AI analyzes your codebase
47
+ - **Guided Wizard** - Step-by-step customization
87
48
 
88
- ### 2. Switch Modes
49
+ ### 3. Activate Any Agent
89
50
 
90
51
  ```
91
- /modes vibe # Flexible, conversational
92
- /modes spec # Structured workflow
93
- /modes as-vibe # Vibe style, keep agent tools
94
- /modes as-spec # Spec style, keep agent tools
52
+ /agents {name}
95
53
  ```
96
54
 
97
- **Mode comparison:**
55
+ Example:
56
+ - `/agents kiro-master` - Activate the Kiro management agent
98
57
 
99
- | Mode | Tools | Interaction | Workflow | Use Case |
100
- |------|-------|-------------|----------|----------|
101
- | `vibe` | Kiro tools | Conversational | Flexible | Prototyping, debugging, exploration |
102
- | `spec` | Kiro tools | Structured | Requirements → Design → Tasks | Production features, formal development |
103
- | `as-vibe` | Current tools | Conversational | Flexible | Agent tools + vibe flexibility |
104
- | `as-spec` | Current tools | Structured | Requirements → Design → Tasks | Agent tools + spec structure |
58
+ The agent stays active until you switch to another or end the session.
105
59
 
106
- ### 3. Enable Strict Mode (Optional)
60
+ ## Demo
107
61
 
108
- ```
109
- /strict on # Blocks on ambiguity
110
- /strict off # Allows assumptions
111
- ```
62
+ <div align="center">
63
+ <a href="https://youtu.be/Arccq_JhpFk">
64
+ <img src="docs/resources/animate-kiro.gif" alt="Kiro Agents Demo" width="800">
65
+ </a>
66
+ <p><em>Watch demo (3:52) — Custom agent optimizing steering document instructions</em></p>
67
+ </div>
68
+
69
+ ## How It Works
112
70
 
113
- Use for architectural decisions, experimental projects, or when precision is critical.
114
-
115
- ## Commands Reference
116
-
117
- ### Agent Commands
118
- - `/agents` - Interactive agent management (create, activate, manage)
119
- - `/agents {name}` - Activate specific agent (e.g., `/agents kiro-master`)
120
-
121
- ### Mode Commands
122
- - `/modes` - Interactive mode management (view, compare, switch)
123
- - `/modes {name}` - Switch to mode (e.g., `/modes vibe`, `/modes as-spec`)
124
-
125
- ### Strict Mode Commands
126
- - `/strict` - Interactive strict mode control
127
- - `/strict {state}` - Set strict mode (e.g., `/strict on`, `/strict off`)
128
-
129
- ### Protocol Commands (Advanced)
130
- - `/protocols {filename}` - Load and execute protocol from kiro-protocols Power
131
- - `/only-read-protocols {filename}` - Read protocol into context without executing
132
-
133
- ## Architecture
134
-
135
- ### Technical Implementation
136
-
137
- **Pure markdown steering documents:**
138
- - No runtime code, only AI instructions
139
- - Stored in `~/.kiro/steering/kiro-agents/`
140
- - Processed at build time with dynamic substitutions
141
-
142
- **Protocol-driven interaction:**
143
- - Protocols structure presentation format, not AI capability
144
- - Lazy loading keeps base context minimal (~0.9K tokens)
145
- - Structured via diff blocks and numbered choices
146
- - Optimized for SOTA model generation
147
-
148
- **Agent storage:**
149
- - Agents stored as `.md` files in `.kiro/agents/`
150
- - Contain capabilities, workflows, protocols, examples
151
- - Activated via instruction alias system
152
- - Inherit chit-chat interaction protocol
153
-
154
- **Mode system:**
155
- - Mode definitions in kiro-protocols Power
156
- - Loaded on-demand via protocol system
157
- - Define interaction style and available tools
158
- - Preserve file changes, reset workflow state
159
-
160
- ### Build System
161
-
162
- **Centralized manifest:**
163
- - Single source of truth in `src/manifest.ts`
164
- - Glob pattern support for automatic file discovery
165
- - Guaranteed consistency between dev mode and CLI installation
166
- - Type-safe with compile-time validation
167
-
168
- **Dual distribution:**
169
- - npm package with CLI installer
170
- - kiro-protocols Power for protocol library
171
- - Both installed automatically via `npx kiro-agents`
172
-
173
- ## Use Cases
174
-
175
- ### Specialized Development
176
- Create domain-specific agents with specialized knowledge:
177
- - Frontend agent with React/Vue/Angular expertise
178
- - Backend agent with API design and database patterns
179
- - Testing agent with TDD workflows and coverage strategies
180
- - DevOps agent with CI/CD and infrastructure knowledge
181
-
182
- ### Workflow Flexibility
183
- Adapt interaction style to task requirements:
184
- - Vibe mode for rapid prototyping and exploration
185
- - Spec mode for production features with formal requirements
186
- - Role modes (`as-vibe`, `as-spec`) for agent superpowers
187
-
188
- ### Agent Superpowers (Experimental)
189
- Combine specialized agent tools with preferred interaction style using role modes:
190
- - `/agents frontend-specialist` then `/modes as-vibe` = React expertise + conversational flow
191
- - `/agents api-architect` then `/modes as-spec` = API design tools + structured workflow
192
- - **Spec + Vibe combo**: `/modes spec` then `/modes as-vibe` = Spec tools + vibe interaction (recently added, testing in progress)
193
-
194
- ### Precision Work
195
- Enable strict mode for critical development:
196
- - Architectural decisions that propagate throughout codebase
197
- - Experimental projects with cutting-edge technologies
198
- - Breaking changes affecting multiple systems
199
- - Debugging propagated errors from incorrect assumptions
71
+ **Simple Markdown Files**
72
+ kiro-agents uses plain markdown files with AI instructions—no code to run, no dependencies to install. These files guide how Kiro IDE responds to your commands.
73
+
74
+ **kiro-protocols Power**
75
+ Automatically installed alongside kiro-agents, this Power provides protocols (agent creation, mode switching, strict mode) that load on-demand when needed.
76
+
77
+ **On-Demand Loading**
78
+ Protocols load only when needed, keeping your context clean. Base system uses just 1.35K tokens.
79
+
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.
200
82
 
201
83
  ## Documentation
202
84
 
203
- - **[Getting Started](docs/GETTING-STARTED.md)** - Step-by-step onboarding guide
204
- - **[User Guide](docs/user-guide/)** - Agents, modes, commands, workflows, examples
205
- - **[Developer Guide](docs/developer-guide/)** - Contributing, versioning, build system, testing
206
- - **[Design Rationale](docs/design/)** - Neurodivergent accessibility, protocol system, interaction patterns
85
+ - **[Getting Started](docs/GETTING_STARTED.md)** - Step-by-step onboarding guide
207
86
  - **[Architecture Overview](docs/ARCHITECTURE.md)** - System design and component relationships
208
- - **[Troubleshooting](docs/TROUBLESHOOTING.md)** - Common issues and solutions
87
+ - **[Creating Powerful Agents](docs/user-guide/creating-powerful-agents.md)** - Layered architecture guide
88
+ - **[Reflection System](docs/user-guide/reflection-system.md)** - Persistent memory for agents
89
+ - **[Design Rationale](docs/design/)** - Protocol system, interaction patterns, neurodivergent accessibility
90
+ - **[Contributing](CONTRIBUTING.md)** - Development workflow, build system, testing, versioning
209
91
 
210
92
  ## Contributing
211
93
 
212
- Contributions welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for:
213
- - Development workflow
214
- - Build commands
215
- - Testing guidelines
216
- - Versioning system (AI-powered with Changesets)
217
- - Cross-IDE compatibility rules
218
-
219
- **Important:** Do not modify `powers/*/steering/` directories directly. These are auto-generated from `src/` during build. PRs modifying these files will fail CI.
94
+ Contributions welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
220
95
 
221
96
  ## Links
222
97
 
223
98
  - [npm Package](https://www.npmjs.com/package/kiro-agents)
224
99
  - [GitHub Repository](https://github.com/Theadd/kiro-agents)
225
100
  - [Kiro IDE](https://kiro.dev)
226
- - [Demo Video](https://youtu.be/Arccq_JhpFk) (3:52)
227
101
 
228
102
  ## License
229
103
 
@@ -33,7 +33,8 @@ var STEERING_FILES = [
33
33
  "aliases.md",
34
34
  "agents.md",
35
35
  "modes.md",
36
- "strict.md"
36
+ "strict.md",
37
+ "reflect.md"
37
38
  ];
38
39
  var POWER_FILES = [
39
40
  "POWER.md",
@@ -46,6 +47,7 @@ var POWER_FILES = [
46
47
  "steering/kiro-spec-mode.md",
47
48
  "steering/kiro-as-vibe-mode.md",
48
49
  "steering/kiro-as-spec-mode.md",
50
+ "steering/explainability-protocol.md",
49
51
  "steering/chit-chat.md",
50
52
  "steering/agent-management.md",
51
53
  "steering/agent-creation.md",
@@ -13,11 +13,10 @@ keywords: ["agents", "management", "create", "activate", "interactive"]
13
13
  If the user's message contains `/agents {agent_name}` with a specific agent name (e.g., `/agents kiro-master`):
14
14
 
15
15
  1. **DO NOT execute the interactive management flow below**
16
- 2. **INSTEAD, execute the instruction alias for agent activation:**
17
- - Read `.kiro/agents/{agent_name}.md` into context
18
- - /protocols agent-activation.md
19
- - Follow all steps from the "Agent Activation Steps" section in agent-activation.md
20
- - Use `{agent_name}` as the agent identifier throughout the protocol
16
+ 2. **INSTEAD, execute the instruction alias:**
17
+ ```
18
+ /agents {agent_name}
19
+ ```
21
20
  3. **Stop processing this document** - The agent activation protocol takes over
22
21
 
23
22
  **Only continue with interactive management flow below if user typed `/agents` without parameters.**
@@ -34,11 +33,23 @@ You are now in **agent management mode** using chit-chat interaction protocol.
34
33
 
35
34
  ## Initial Agent
36
35
 
37
- When auto-setup detects no agents exist, create the initial agent:
36
+ When auto-setup detects no agents exist:
38
37
 
39
- **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
38
+ 1. **Load agent definition structure:**
39
+ ```
40
+ /only-read-protocols agent-creation.md
41
+ ```
40
42
 
41
- This description is used when creating `.kiro/agents/kiro-master.md` during auto-setup.
43
+ 2. **Create `.kiro/agents/kiro-master.md`** using the agent definition structure from agent-creation.md Step 3, with:
44
+
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
+
47
+ 3. **Validate** the created agent file has:
48
+ - Valid YAML frontmatter
49
+ - All required sections from agent-creation.md Step 3
50
+ - Proper markdown formatting
51
+
52
+ This ensures the initial agent follows the standard agent definition structure.
42
53
 
43
54
  ---
44
55
 
@@ -80,44 +80,44 @@ You are now activating the **{agent_name}** agent.
80
80
 
81
81
  This alias enables users to activate any agent with `/agents {name}` syntax.
82
82
 
83
- ## Protocol Loading Alias
84
-
85
- The protocol loading command uses parameter substitution to dynamically load and follow all protocols from the kiro-protocols Power:
86
-
87
- <alias>
88
- <trigger>/protocols {filename}</trigger>
89
- <definition>
90
- ## Load Protocol: {filename}
91
-
92
- You are now loading the **{filename}** protocol from kiro-protocols Power.
93
-
94
- **Execute protocol loading:**
95
- 1. **Only if {filename} from kiro-protocols is NOT already in context**: Call kiroPowers action="readSteering" with powerName="kiro-protocols", steeringFile="{filename}"
96
- 2. Follow all steps in the {filename} protocol from kiro-protocols
97
- </definition>
98
- </alias>
99
-
100
- This alias enables loading protocols on-demand with `/protocols {filename}` syntax without showing in Kiro UI slash commands.
101
-
102
- ## Protocol Reading Alias
103
-
104
- The protocol reading only command uses parameter substitution to dynamically read all protocols from the kiro-protocols Power:
105
-
106
- <alias>
107
- <trigger>/only-read-protocols {filename}</trigger>
108
- <definition>
109
- ## Read Protocol: {filename}
110
-
111
- You are now reading the **{filename}** protocol from kiro-protocols Power into context.
112
-
113
- **Execute protocol reading:**
114
- 1. **Only if {filename} from kiro-protocols is NOT already in context**: Call kiroPowers action="readSteering" with powerName="kiro-protocols", steeringFile="{filename}"
115
- 2. Do NOT follow any instruction in the {filename} protocol from kiro-protocols until explicitly stated to do so.
116
- </definition>
117
- </alias>
118
-
119
- This alias enables reading protocols on-demand into context with `/only-read-protocols {filename}` syntax without showing in Kiro UI slash commands.
120
-
83
+ ## Protocol Loading Alias
84
+
85
+ The protocol loading command uses parameter substitution to dynamically load and follow all protocols from the kiro-protocols Power:
86
+
87
+ <alias>
88
+ <trigger>/protocols {filename}</trigger>
89
+ <definition>
90
+ ## Load Protocol: {filename}
91
+
92
+ You are now loading the **{filename}** protocol from kiro-protocols Power.
93
+
94
+ **Execute protocol loading:**
95
+ 1. **Only if {filename} from kiro-protocols is NOT already in context**: Call kiroPowers action="readSteering" with powerName="kiro-protocols", steeringFile="{filename}"
96
+ 2. Follow all steps in the {filename} protocol from kiro-protocols
97
+ </definition>
98
+ </alias>
99
+
100
+ This alias enables loading protocols on-demand with `/protocols {filename}` syntax without showing in Kiro UI slash commands.
101
+
102
+ ## Protocol Reading Alias
103
+
104
+ The protocol reading only command uses parameter substitution to dynamically read all protocols from the kiro-protocols Power:
105
+
106
+ <alias>
107
+ <trigger>/only-read-protocols {filename}</trigger>
108
+ <definition>
109
+ ## Read Protocol: {filename}
110
+
111
+ You are now reading the **{filename}** protocol from kiro-protocols Power into context.
112
+
113
+ **Execute protocol reading:**
114
+ 1. **Only if {filename} from kiro-protocols is NOT already in context**: Call kiroPowers action="readSteering" with powerName="kiro-protocols", steeringFile="{filename}"
115
+ 2. Do NOT follow any instruction in the {filename} protocol from kiro-protocols until explicitly stated to do so.
116
+ </definition>
117
+ </alias>
118
+
119
+ This alias enables reading protocols on-demand into context with `/only-read-protocols {filename}` syntax without showing in Kiro UI slash commands.
120
+
121
121
  ## Mode System Alias
122
122
 
123
123
  The mode switching command uses parameter substitution to load mode definitions dynamically:
@@ -161,4 +161,74 @@ After user's next message, execute:
161
161
  /modes as-vibe
162
162
  ```
163
163
  </definition>
164
- </alias>
164
+ </alias>
165
+
166
+ ---
167
+
168
+ ---
169
+
170
+ ## Conversation Transfer State Restoration
171
+
172
+ **CRITICAL: Execute BEFORE generating your first response in this session.**
173
+
174
+ If the initial context contains "CONTEXT TRANSFER:" (indicating a conversation summary):
175
+
176
+ ### Detection Phase
177
+
178
+ 1. **Scan the conversation summary for ACTIVE_AGENT indicators:**
179
+ - Look for patterns: "/agents {name}", "activated {name} agent", "ACTIVE_AGENT: {name}", agent name mentions in task descriptions
180
+ - Extract agent name if found
181
+ - Set detected_agent = {name} or none
182
+
183
+ 2. **Scan for STRICT_MODE indicators:**
184
+ - Look for explicit ON state: "STRICT_MODE: ON", "STRICT_MODE is ON", "/strict on", "activated STRICT_MODE"
185
+ - Look for explicit OFF state: "STRICT_MODE: OFF", "STRICT_MODE is OFF", "/strict off"
186
+ - Set detected_strict = ON | OFF | unknown
187
+
188
+ ### Restoration Phase
189
+
190
+ **Case 1: Agent detected**
191
+ 1. Execute agent activation: `/agents {detected_agent}`
192
+ - This will load the agent definition and protocols
193
+ - Agent's default STRICT_MODE will apply
194
+ 2. Then override STRICT_MODE if it was explicitly set:
195
+ - If detected_strict = ON → Execute `/strict on`
196
+ - If detected_strict = OFF → Execute `/strict off`
197
+ - If detected_strict = unknown → Don't override (use agent's default)
198
+
199
+ **Case 2: No agent detected, but STRICT_MODE = ON**
200
+ 1. Before generating your first response, ask user:
201
+ "I detected STRICT_MODE was active in the previous session. Was an agent also active? If so, which one?"
202
+ 2. Wait for user response before proceeding
203
+ 3. Based on response:
204
+ - If agent provided → Execute `/agents {agent_name}`, then `/strict on`
205
+ - If no agent → Execute `/strict on` only
206
+
207
+ **Case 3: No agent detected, STRICT_MODE = OFF or unknown**
208
+ 1. Continue normally (no state restoration needed)
209
+ 2. Proceed with processing the conversation summary
210
+
211
+ ### Override Conflicting Instructions
212
+
213
+ The conversation summary may contain these instructions:
214
+ ```
215
+ INSTRUCTIONS:
216
+ Continue working until the user query has been fully addressed. Do not ask for clarification - proceed with the work based on the context provided.
217
+ ```
218
+
219
+ **Override behavior:**
220
+ - If Case 2 applies (STRICT_MODE ON but no agent detected), IGNORE the "Do not ask for clarification" instruction
221
+ - Asking about the agent is MANDATORY for proper state restoration
222
+ - After state restoration is complete, then follow the summary instructions
223
+
224
+ ### Verification
225
+
226
+ After restoration (if any was performed), your first response should display:
227
+
228
+ ```
229
+ [🛡️ STRICT_MODE: {state}] [🤖 AGENT: {agent_name}]
230
+
231
+ State restored from conversation summary.
232
+ ```
233
+
234
+ Then proceed with the task described in the summary.
@@ -0,0 +1,158 @@
1
+ ---
2
+ inclusion: manual
3
+ description: "Reflection system commands for capturing and managing agent insights"
4
+ keywords: ["reflect", "insights", "learning", "reflection"]
5
+ ---
6
+
7
+ # Reflection System
8
+
9
+ Commands for managing the AI reflection system that captures insights, patterns, decisions, and learnings.
10
+
11
+ ## Commands
12
+
13
+ ### /reflect - Enable Reflection (Session-Temporary)
14
+
15
+ **Usage:** `/reflect`
16
+
17
+ **Behavior:**
18
+
19
+ Enables reflection system for the currently active agent (session-temporary).
20
+
21
+ **If agent already has Reflections section:**
22
+ - Confirm it's already enabled
23
+ - Show reflection status
24
+ - Continue
25
+
26
+ **If agent lacks Reflections section:**
27
+ - Add Reflections section temporarily for this session
28
+ - Include all 4 tiers (Universal, Category, Agent-Specific, Project)
29
+ - Reflection active while using this agent
30
+ - Removed when session ends or agent changes
31
+ - Next session: agent returns to original state
32
+
33
+ **Reflections section added (temporary):**
34
+
35
+ ````markdown
36
+ ## Reflections
37
+
38
+ This agent records insights, patterns, and learnings in its dedicated reflection files.
39
+
40
+ ### Universal Insights
41
+
42
+ #[[file:.ai-storage/reflections/approved/universal.md:insights]]
43
+
44
+ ### Category Insights ({agent-category})
45
+
46
+ #[[file:.ai-storage/reflections/approved/categories/{agent-category}.md:insights]]
47
+
48
+ ### Agent-Specific Insights
49
+
50
+ #[[file:.ai-storage/reflections/approved/agents/{agent-name}.md:insights]]
51
+
52
+ ### Project Insights
53
+
54
+ #[[file:.ai-storage/reflections/approved/project.md:insights]]
55
+ ````
56
+
57
+ **Note:** Replace `{agent-category}` and `{agent-name}` with actual values from agent definition.
58
+
59
+ **After enabling:**
60
+
61
+ ```diff
62
+ ✅ REFLECTION ENABLED (Session-Temporary)
63
+
64
+ Agent: {agent-name}
65
+ Category: {agent-category}
66
+
67
+ Reflection files:
68
+ - Universal: .ai-storage/reflections/approved/universal.md
69
+ - Category: .ai-storage/reflections/approved/categories/{agent-category}.md
70
+ - Agent: .ai-storage/reflections/approved/agents/{agent-name}.md
71
+ - Project: .ai-storage/reflections/approved/project.md
72
+
73
+ Draft file:
74
+ - .ai-storage/reflections/drafts/agents/{agent-name}.md
75
+
76
+ You can now capture insights during work. Use /agents reflection-curator to review drafts.
77
+ ```
78
+
79
+ **Use case:** Quick testing, one-off reflection capture, temporary enablement.
80
+
81
+ ---
82
+
83
+ ### /reflect review - Review Draft Insights
84
+
85
+ **Usage:** `/reflect review`
86
+
87
+ **Behavior:**
88
+
89
+ Activates reflection-curator agent and starts draft review workflow.
90
+
91
+ **Equivalent to:**
92
+ ```
93
+ /agents reflection-curator
94
+ ```
95
+
96
+ Then curator agent automatically starts review workflow.
97
+
98
+ **Use case:** Review pending draft insights and approve them to appropriate tiers.
99
+
100
+ ---
101
+
102
+ ## Reflection System Overview
103
+
104
+ ### Purpose
105
+
106
+ Enable agents to capture and reuse knowledge across sessions:
107
+ - **Insights** - General knowledge, preferences, standards
108
+ - **Patterns** - Reusable approaches, workflows, solutions
109
+ - **Decisions** - Important choices and their rationale
110
+ - **Learnings** - Lessons from successes or failures
111
+
112
+ ### Workflow
113
+
114
+ 1. **Agent captures insight** → Writes to draft file
115
+ 2. **User reviews drafts** → `/reflect review`
116
+ 3. **Curator validates** → Checks quality, assigns tier
117
+ 4. **Insight approved** → Moves to approved file
118
+ 5. **Agents use insights** → Load via file references
119
+
120
+ ### Insight Tiers
121
+
122
+ **Universal** - Used by ALL agents
123
+ **Category** - Used by agent type (architects, developers, etc.)
124
+ **Agent-Specific** - Used by one agent only
125
+ **Project** - About this specific project
126
+
127
+ ### Storage Location
128
+
129
+ ```
130
+ .ai-storage/reflections/
131
+ ├── drafts/ - Pending insights
132
+ └── approved/ - Approved insights by tier
133
+ ```
134
+
135
+ ### On-Demand Creation
136
+
137
+ No initialization required! Files created automatically when:
138
+ - Agent records first insight
139
+ - Curator approves insight
140
+ - Agent loads reflections
141
+
142
+ ## Related Commands
143
+
144
+ ```
145
+ /reflect Enable reflection (session-temporary)
146
+ /reflect review Review draft insights
147
+ /agents reflection-curator Activate curator agent
148
+ ```
149
+
150
+ ## Learn More
151
+
152
+ - **README:** `.ai-storage/README.md` - Complete system documentation
153
+ - **Curator Agent:** `.kiro/agents/reflection-curator.md`
154
+ - **Proposal:** `proposals/ai-managed-storage-and-reflection-system-v2.md`
155
+
156
+ ---
157
+
158
+ **Start capturing insights with `/reflect` and review them with `/reflect review`.**