You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .kiro/steering/goal-driven-evolution.md
+36-23Lines changed: 36 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,28 @@
1
1
---
2
-
inclusion: agent_requested
2
+
inclusion: always
3
3
---
4
4
5
5
<!-- memoria-version: 0.1.0-->
6
6
7
-
# Goal-Driven Iterative Evolution via Memory
7
+
# Goal-Driven Evolution + Plan Integration
8
8
9
-
Track goals, plans, progress, lessons, and user feedback across conversations. All content in English for consistent retrieval.
9
+
Track goals, plans, progress, lessons, and user feedback across conversations. Integrates with plan panels (Kiro Shift+Tab, Cursor Composer, Claude multi-step).
10
10
11
-
## Workflow
11
+
## Before Starting Any Multi-Step Task
12
12
13
-
### 1. Register Goal
13
+
Query memory first:
14
14
15
-
Check for duplicates first, then store:
15
+
```
16
+
memory_search(query="GOAL [topic]") # existing related goals
17
+
memory_search(query="LESSON [topic]") # past learnings
18
+
memory_search(query="CORRECTION ANTIPATTERN [topic]") # what NOT to do
19
+
```
20
+
21
+
If an active goal exists, continue it instead of creating a new one.
22
+
23
+
## Register Goal
24
+
25
+
For multi-session work (skip for trivial single-session tasks < 3 steps):
16
26
17
27
```
18
28
memory_search(query="GOAL [keywords]")
@@ -22,14 +32,7 @@ memory_store(
22
32
)
23
33
```
24
34
25
-
### 2. Plan & Execute
26
-
27
-
Before acting, search for past failures and user corrections to avoid repeating mistakes:
-`needs_rebuild = True` → run `memory_rebuild_index`
21
22
- Quarantined memories → inform user what was quarantined and why
22
23
23
24
## Contradiction Resolution
@@ -52,7 +53,7 @@ Keep named snapshots the user created explicitly.
52
53
53
54
## Entity Graph Maintenance
54
55
55
-
See entity graph triggers in [memory.md](memory.md) (proactive section). After extraction, if mode returns candidates, extract entities yourself and call `memory_link_entities` with the correct JSON format (see memory.md tool reference).
56
+
Entity extraction is automatic — every `memory_store` triggers regex-based extraction, with LLM extraction as a fallback when configured. No manual intervention needed.
- ❌ Don't use meta-queries → "all memories", "everything", "list all"
20
18
21
19
**After retrieval:**
22
-
-If results come back → use them as **reference only**. Treat retrieved memories as potentially stale or incomplete — always verify against current context before acting on them. Do NOT blindly trust memory content as ground truth.
23
-
-If "No relevant memories found" → this is normal for new users, proceed without.
24
-
-If ⚠️ health warnings appear → inform the user and offer to run `memory_governance`.
20
+
-Results → use as reference, verify against current context
21
+
- "No relevant memories" → normal for new users, proceed
After responding, decide if anything is worth remembering:
@@ -91,6 +89,35 @@ Before storing a new memory, consider:
91
89
|`memory_retrieve`| Conversation start, or when context is needed |`query`, `top_k` (default 5), `session_id` (optional), `explain` (false = no debug, true = show timing) |
92
90
|`memory_search`| User asks "what do you know about X" or you need to browse |`query`, `top_k` (default 10), `explain` (false = no debug, true = show timing) |
93
91
|`memory_profile`| User asks "what do you know about me" | — |
92
+
|`memory_feedback`| After using a retrieved memory, record if it was helpful |`memory_id`, `signal` (useful/irrelevant/outdated/wrong), `context` (optional) |
93
+
94
+
**`memory_feedback`**: Call this after retrieval when you can assess whether a memory was helpful. Signals:
95
+
-`useful` — memory helped answer the question or complete the task
96
+
-`irrelevant` — memory was retrieved but not relevant to the query
97
+
-`outdated` — memory contains stale information (consider `memory_correct` instead if you know the new value)
98
+
-`wrong` — memory contains incorrect information (consider `memory_correct` instead if you know the correct value)
# ... (memory about "Uses PostgreSQL" helped answer)
115
+
116
+
# 3. Record feedback for the helpful memory
117
+
memory_feedback(memory_id="abc123", signal="useful", context="answered DB question")
118
+
```
119
+
120
+
**Impact**: Feedback accumulates over time. With default settings, a memory with 3 `useful` signals ranks ~30% higher in future retrievals. Don't call for every memory — only when you have clear signal.
94
121
95
122
**`memory_retrieve` vs `memory_search`**: In MCP mode, both use the same retrieval pipeline (graph → hybrid vector+fulltext → fulltext fallback). The differences are:
96
123
-`memory_retrieve` accepts `session_id` for session-scoped boosting; `memory_search` does not
@@ -124,33 +151,18 @@ When `memory_governance` reports snapshot_health with high auto_ratio (>50%), su
124
151
### Branches (isolated experiments)
125
152
Git-like workflow for memory. `memory_branch(name)` creates, `memory_checkout(name)` switches, `memory_diff(source)` previews changes, `memory_merge(source)` merges back, `memory_branch_delete(name)` cleans up. `memory_branches()` lists all.
126
153
127
-
### Entity graph (proactive — call when conditions are met)
128
-
| Tool | When to call | Key params |
129
-
|------|-------------|------------|
130
-
|`memory_extract_entities`|**Proactively** after storing ≥ 5 new memories in a session, OR when user discusses a new project/technology/person not yet in the graph |`mode` (default: auto) |
131
-
|`memory_link_entities`| After `extract_entities(mode='candidates')` returns memories — extract entities yourself, then call this |`entities` (JSON string) |
132
-
133
-
**Trigger heuristics — call `memory_extract_entities` when ANY of these are true:**
134
-
- You stored ≥ 5 memories this session and haven't extracted entities yet
135
-
- User mentions a project, technology, or person by name that you haven't seen in previous `memory_retrieve` results
136
-
- User asks about relationships between concepts ("how does X relate to Y")
137
-
- User starts working on a new codebase or topic area
138
-
139
-
**Do NOT extract entities when:**
140
-
- Conversation is short (< 3 turns) and no new named entities appeared
141
-
- User is only asking questions, not sharing new information
142
-
- You already ran extraction this session
154
+
### Entity graph
155
+
Entity extraction is automatic — every `memory_store` triggers regex-based extraction, with LLM extraction as a fallback when configured. No manual intervention needed.
143
156
144
157
### Maintenance (proactive triggers in [memory-hygiene](memory-hygiene.md), manual triggers below)
145
158
| Tool | Trigger phrase | Cooldown |
146
159
|------|---------------|----------|
147
160
|`memory_governance`| "clean up memories", "check memory health", or proactively per [memory-hygiene](memory-hygiene.md)| 1 hour |
148
161
|`memory_consolidate`| "check for contradictions", "fix conflicts" | 30 min |
149
162
|`memory_reflect`| "find patterns", "summarize what you know" | 2 hours |
150
-
|`memory_rebuild_index`| Only when governance reports `needs_rebuild=True`| — |
151
163
|`memory_snapshot_delete`| When governance reports high snapshot auto_ratio, or user asks to clean snapshots | — |
> `memory_rebuild_index`, `memory_observe`, `memory_get_retrieval_params`, `memory_tune_params`, `memory_extract_entities`, and `memory_link_entities` are available via REST API but hidden from MCP tool listing — they are ops/debug tools not intended for agent use.
224
233
225
234
Full API details: [API Reference Skill](skills/api-reference/SKILL.md)
226
235
@@ -257,7 +266,7 @@ If you're an AI agent helping a user set up Memoria:
257
266
258
267
1.**Load the [Setup Skill](skills/setup/SKILL.md)** — it has step-by-step instructions
0 commit comments