mema-kit 1.0.6 → 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.
@@ -1,206 +1,150 @@
1
1
  ---
2
- description: Break a high-level goal into a structured implementation plan. Explores the codebase, produces step-by-step specs, and saves them to task-memory/ for use by /mema.implement.
2
+ description: Create a technical implementation plan for a feature. Reads the feature spec, explores the codebase, and writes a detailed plan to features/NNN-name/plan.md for use by /mema.tasks and /mema.implement.
3
3
  ---
4
4
 
5
- # /mema.plan — Implementation Planning
5
+ # /mema.plan — Feature Technical Design
6
6
 
7
7
  You are executing the /mema.plan skill. Follow these steps carefully.
8
8
 
9
- This skill takes a user's goal (e.g., `/mema.plan add user authentication`), explores the codebase, and produces a detailed implementation plan saved to `.mema/task-memory/[task-name]/`.
9
+ This skill takes a feature spec (created by `/mema.specify`) and produces a technical implementation plan what to build, how it fits the existing architecture, and which files to change.
10
10
 
11
11
  ## Phase 1: AUTO-LOAD
12
12
 
13
13
  1. Read `.mema/index.md` to understand current project state
14
14
  2. If `index.md` is missing or `.mema/` does not exist:
15
- - Tell the user: "No memory found. Run `/mema.onboard` first to set up mema-kit for this project."
16
- - **Stop here** — do not continue to further steps.
15
+ - Tell the user: "No memory found. Run `/mema.onboard` first to set up mema-kit."
16
+ - **Stop here.**
17
17
  3. If `index.md` is empty, run the **Rebuild Procedure** from `_memory-protocol.md`
18
- 4. Load relevant memory files:
19
- - `project-memory/architecture.md` — to understand the current stack and structure
20
- - `project-memory/requirements.md` — to check how the goal fits project requirements
21
- - `project-memory/decisions/` — recent decisions that might affect the plan
22
- - `agent-memory/lessons.md` — mistakes to avoid in the plan
23
- - `agent-memory/patterns.md` — reusable approaches to incorporate
24
-
25
- Read only what's needed — don't load everything.
18
+ 4. Load relevant memory:
19
+ - `project/architecture.md` — current stack and patterns
20
+ - `project/requirements.md` — constraints to respect
21
+ - `project/decisions/` — past decisions that affect this plan
22
+ - `agent/lessons.md` — mistakes to avoid
23
+ - `agent/patterns.md` — reusable approaches to apply
26
24
 
27
25
  ## Phase 2: WORK
28
26
 
29
- ### 2a: Parse the Goal
30
-
31
- Extract the task goal from the user's input. The goal is everything after `/mema.plan`.
27
+ ### 2a: Select Feature
32
28
 
33
- - Example: `/mema.plan add user authentication` → goal is "add user authentication"
34
- - Example: `/mema.plan refactor the database layer` → goal is "refactor the database layer"
29
+ Parse the user's input:
30
+ - **Feature name or number given:** `/mema.plan user-auth` or `/mema.plan 001` → find matching `features/NNN-name/`
31
+ - **No input:** list features that have a `spec.md` but no `plan.md`; ask which to plan
35
32
 
36
- If no goal is provided, ask the user: "What would you like to plan? Describe your goal in a sentence or two."
33
+ If the feature directory doesn't exist:
34
+ - Tell the user: "No feature found for '[input]'. Run `/mema.specify` first to create a feature spec."
35
+ - **Stop here.**
37
36
 
38
- **Derive the task name** from the goal in kebab-case:
39
- - "add user authentication" `user-authentication`
40
- - "refactor the database layer" `database-layer-refactor`
41
- - Keep it short (2-4 words max). Drop filler words like "add", "create", "the".
37
+ If `plan.md` already exists:
38
+ - Tell the user: "A plan already exists for [feature-name]. Would you like to revise it or start fresh?"
39
+ - If revising: load the existing plan as a starting point.
42
40
 
43
- ### 2b: Check for Existing Task
41
+ ### 2b: Load the Feature Spec
44
42
 
45
- Check if `task-memory/[task-name]/` already exists:
43
+ Read `features/NNN-name/spec.md` in full.
46
44
 
47
- - **If it exists:** Read the existing `plan.md`, `context.md`, and `status.md`. Tell the user: "Found an existing plan for [task-name]. Would you like to revise it, or start fresh?" If revising, load the existing plan as a starting point. If starting fresh, overwrite the existing files.
48
- - **If it doesn't exist:** Continue to the next step.
45
+ If `spec.md` is missing:
46
+ - Tell the user: "No spec found for [feature-name]. Run `/mema.specify` first."
47
+ - **Stop here.**
49
48
 
50
49
  ### 2c: Explore the Codebase
51
50
 
52
- Before writing the plan, explore the codebase to understand what exists and what needs to change. This is the intelligence step don't skip it.
51
+ Before writing the plan, explore what already exists. Read 3–5 files relevant to this feature:
52
+ - Entry points or route files the feature will touch
53
+ - Existing patterns for similar features (e.g., if adding auth, read an existing auth-adjacent file)
54
+ - Test files for the area being changed
55
+ - Config files if the feature requires configuration changes
53
56
 
54
- 1. **Identify relevant files** Based on the goal and loaded architecture, determine which source files, configs, and tests are relevant
55
- 2. **Read representative files** — Read 3-5 key files to understand current patterns, conventions, and structure
56
- 3. **Map dependencies** — Note what existing code the new work depends on or affects
57
- 4. **Identify constraints** — Note any technical constraints, compatibility requirements, or limitations discovered
57
+ Note: current patterns, naming conventions, architectural constraints, and anything the spec didn't mention that affects implementation.
58
58
 
59
59
  ### 2d: Clarify if Needed
60
60
 
61
- If the goal is ambiguous, ask **1-2 clarifying questions** (no more). Use the AskUserQuestion tool.
61
+ If the spec leaves meaningful technical ambiguity, ask **one clarifying question** using AskUserQuestion. Skip this step if the spec is clear.
62
62
 
63
63
  Good clarifying questions:
64
- - "Should X support Y, or is Z sufficient for now?"
65
- - "Do you want this to follow the existing pattern in [file], or take a different approach?"
66
-
67
- Skip this step if the goal is clear from context + exploration.
64
+ - "The spec mentions [X]. Should this follow the existing pattern in [file], or take a new approach?"
65
+ - "Should this feature include tests, or is that deferred?"
68
66
 
69
67
  ### 2e: Write the Plan
70
68
 
71
- Using your exploration findings and loaded memory, produce the plan in three parts:
72
-
73
- **General Plan** — High-level approach in 1-2 paragraphs:
74
- - What are we building/changing?
75
- - How does it fit with the existing architecture?
76
- - What key architectural decisions does this plan make?
77
-
78
- **Detailed Steps** — Step-by-step implementation specs. Each step must include:
79
- - **Action:** What to do (create file, modify function, add test, etc.)
80
- - **Files:** Specific file paths to create or modify
81
- - **Details:** Enough detail that `/mema.implement` can execute the step without ambiguity
82
- - **Dependencies:** Which prior steps must be complete first (if any)
83
-
84
- Rules for steps:
85
- - Each step should be small enough to implement in a single `/mema.implement` invocation
86
- - Order steps logically (foundations first, then features, then tests, then cleanup)
87
- - Be specific about file paths — use the actual paths discovered during exploration
88
- - Include test steps where appropriate (not just at the end)
69
+ Produce a technical plan in these parts:
89
70
 
90
- **Out of Scope** — Explicitly list what this plan does NOT cover. This prevents scope creep during implementation.
71
+ **Approach** — 1–2 paragraphs:
72
+ - What architectural approach will be used?
73
+ - How does it fit the existing codebase patterns?
74
+ - What key technical decisions does this plan make?
91
75
 
92
- ### 2f: Write Task Files
93
-
94
- Create `task-memory/[task-name]/` with three files:
95
-
96
- **`context.md`** — Exploration findings relevant to this task:
97
- ```
98
- # [Task Name] — Exploration Context
99
-
100
- **Status:** active | **Updated:** [today's date]
76
+ **Key Entities / Data** (if relevant):
77
+ - Data structures, models, or types involved
78
+ - Database schema changes if applicable
101
79
 
102
- ## Summary
103
- [2-3 sentences: what was explored and the key takeaway]
80
+ **File Changes** — the complete set of files to create or modify:
81
+ - List each file with a one-line description of what changes
82
+ - Include test files
104
83
 
105
- ## Key Findings
106
- - [Important facts, constraints, or insights discovered during exploration]
84
+ **Implementation Notes** — gotchas, constraints, dependencies:
85
+ - Lessons from lessons.md that apply
86
+ - Patterns from patterns.md to follow
87
+ - Non-obvious dependencies or ordering requirements
107
88
 
108
- ## Open Questions
109
- - [Anything unresolved that might affect implementation]
89
+ ### 2f: Write Plan File
110
90
 
111
- ## Relates To
112
- - [Links to related memory files]
113
- ```
91
+ Write `features/NNN-name/plan.md`:
114
92
 
115
- **`plan.md`** — The full implementation plan:
116
93
  ```
117
- # [Task Name] — Implementation Plan
94
+ # [Feature Name] — Plan
118
95
 
119
96
  **Status:** active | **Updated:** [today's date]
120
97
 
121
- ## General Plan
122
- [High-level approach from 2e]
123
-
124
- ## Detailed Plan
125
-
126
- ### Step 1: [Action]
127
- - **Files:** `path/to/file`
128
- - **Details:** [Specific implementation details]
129
- - **Dependencies:** None
98
+ ## Approach
130
99
 
131
- ### Step 2: [Action]
132
- - **Files:** `path/to/file`
133
- - **Details:** [Specific implementation details]
134
- - **Dependencies:** Step 1
100
+ [High-level technical approach from 2e]
135
101
 
136
- [... more steps ...]
102
+ ## Key Entities
137
103
 
138
- ## Out of Scope
139
- - [What this plan does NOT cover]
140
- ```
104
+ [Data structures / models if applicable]
141
105
 
142
- **`status.md`** Progress checklist mirroring the plan:
143
- ```
144
- # [Task Name] — Status
106
+ ## File Changes
145
107
 
146
- **Status:** active | **Updated:** [today's date]
108
+ - `path/to/file` [what changes]
109
+ - `path/to/file` — [what changes]
147
110
 
148
- ## Progress
111
+ ## Implementation Notes
149
112
 
150
- - [ ] Step 1: [description]
151
- - [ ] Step 2: [description]
152
- - [ ] Step 3: [description]
153
-
154
- ## Notes
155
- <!-- Any blockers, deviations from plan, or important observations. -->
156
-
157
- ## Completed
158
- **Completed:**
113
+ [Gotchas, patterns to follow, ordering requirements]
159
114
  ```
160
115
 
161
- ### 2g: Present the Plan
162
-
163
- Print a summary to the user:
116
+ ### 2g: Present to User
164
117
 
165
118
  ```
166
- ## Plan: [Task Name]
119
+ ## Plan: [Feature Name]
167
120
 
168
121
  ### Approach
169
- [1-2 sentence summary of general plan]
122
+ [1-2 sentence summary]
170
123
 
171
- ### Steps ([N] total)
172
- 1. [Step 1 summary]
173
- 2. [Step 2 summary]
174
- 3. [Step 3 summary]
175
- ...
176
-
177
- ### Out of Scope
178
- - [Item 1]
179
- - [Item 2]
124
+ ### Files to change ([N] total)
125
+ - [file] [what]
126
+ - [file] [what]
180
127
 
181
128
  ---
182
- Plan saved to task-memory/[task-name]/
183
- To start implementing: /mema.implement [task-name]
129
+ Plan saved to features/[NNN-name]/plan.md
130
+ Next: /mema.tasks [NNN-name]
184
131
  ```
185
132
 
186
133
  ## Phase 3: AUTO-SAVE & CURATE
187
134
 
188
- Follow the curation rules in `_memory-protocol.md`. For each piece of knowledge produced:
189
-
190
- - **Decisions made** about approach → ADD to `project-memory/decisions/YYYY-MM-DD-short-name.md` (only if the plan includes a significant architectural or technical decision worth preserving beyond this task)
191
- - **Architecture insights** discovered during exploration → UPDATE `project-memory/architecture.md` (only if you found something missing or incorrect)
192
- - **Lessons learned** during planning → ADD/UPDATE `agent-memory/lessons.md`
193
- - **Patterns discovered** during exploration → ADD/UPDATE `agent-memory/patterns.md`
135
+ Follow the curation rules in `_memory-protocol.md`:
194
136
 
195
- Apply ADD/UPDATE/DELETE/NOOP to each memory file. Most files will be NOOP.
137
+ - **Significant architectural decisions** made during planning ADD to `project/decisions/YYYY-MM-DD-short-name.md`
138
+ - **Architecture discoveries** (found something missing or wrong in architecture.md) → UPDATE `project/architecture.md`
139
+ - **Lessons** from planning → ADD/UPDATE `agent/lessons.md`
140
+ - **Patterns** identified → ADD/UPDATE `agent/patterns.md`
196
141
 
197
- **Do NOT save the plan itself as a decision.** The plan lives in task-memory. Only save standalone decisions that have value beyond this specific task.
142
+ Most files will be NOOP.
198
143
 
199
144
  ## Phase 4: AUTO-INDEX
200
145
 
201
146
  Update `.mema/index.md`:
202
147
  1. Re-read the current index
203
- 2. Add an entry under `## Active Tasks`: `- \`task-memory/[task-name]/\` [one-line summary] (plan ready)`
204
- 3. Update summaries for any modified files (decisions, lessons, patterns)
205
- 4. Remove entries for any deleted files
206
- 5. Update the `**Updated:**` date
148
+ 2. If the feature's entry in `## Active Features` doesn't mention a plan, update its summary: add "(plan ready)"
149
+ 3. Add entries for any new decision files
150
+ 4. Update `**Updated:**` date
@@ -12,80 +12,73 @@ Follow these steps carefully.
12
12
 
13
13
  Parse the user's input to decide which mode to use:
14
14
 
15
- - **No arguments** or `minimal` → **Minimal mode** (default) — fast overview of project purpose, stack, and current status
16
- - `full` → **Full mode** — everything in Minimal plus decisions, lessons, patterns, and active context/plans
15
+ - **No arguments** or `minimal` → **Minimal mode** (default) — fast overview with active features, project identity, and next action
16
+ - `full` → **Full mode** — everything in Minimal plus decisions, lessons, patterns, and product discovery
17
17
 
18
- If the user provides an unrecognized argument (not `minimal`, `full`, or empty):
19
- 1. Warn them: "Unknown argument '[arg]'. Available modes: `minimal` (default), `full`."
20
- 2. Fall back to **Minimal mode** and continue.
18
+ If the user provides an unrecognized argument, warn them and fall back to Minimal mode.
21
19
 
22
20
  ## Step 2: AUTO-LOAD
23
21
 
24
22
  1. Read `.mema/index.md`
25
23
  2. If `index.md` is missing or `.mema/` does not exist:
26
- - Tell the user: "No memory found. Run `/mema.onboard` first to set up mema-kit for this project."
27
- - **Stop here** — do not continue to further steps.
28
- 3. Parse the index to identify available memory files and their summaries.
24
+ - Tell the user: "No memory found. For an existing project, run `/mema.onboard` to set up mema-kit. For a new idea, run `/mema.seed` to start the discovery workflow."
25
+ - **Stop here** — do not continue.
26
+ 3. Parse the index to identify available memory files.
29
27
 
30
- ## Step 3: Load Project Purpose
28
+ ## Step 3: Load Active Features
31
29
 
32
- Read the following files (skip any that don't exist):
30
+ Read `features/NNN-name/status.md` for every feature directory listed under `## Active Features` in `index.md` that is NOT marked `complete`.
33
31
 
34
- 1. `.mema/project-memory/architecture.md` extract tech stack, project structure, architecture pattern, and key commands
35
- 2. `.mema/project-memory/requirements.md` extract project purpose, key requirements, and constraints
32
+ For each active feature, note:
33
+ - Feature name and number
34
+ - Current status (`pending` or `in-progress`)
35
+ - Last completed task and next task (from status.md progress log)
36
36
 
37
- These form the core context for both Minimal and Full modes.
37
+ This is the most important context surface it first.
38
38
 
39
- ## Step 4: Load Current Status
39
+ ## Step 4: Load Project Knowledge
40
40
 
41
- 1. Check the `## Active Tasks` section in `index.md`
42
- 2. If there are active tasks listed, read any linked status files (e.g., `task-memory/[task-name]/status.md`)
43
- 3. Note which tasks are in progress, their current step, and any blockers
41
+ Read the following (skip any that don't exist):
44
42
 
45
- ## Step 5: Load Additional Files (Full Mode Only)
43
+ 1. `.mema/project/architecture.md` tech stack, structure, architecture pattern
44
+ 2. `.mema/project/requirements.md` — project purpose and constraints
46
45
 
47
- **Skip this step entirely if in Minimal mode.**
46
+ ## Step 5: Load Additional Files (Full Mode Only)
48
47
 
49
- In Full mode, also read these files (skip any that don't exist):
48
+ **Skip entirely if in Minimal mode.**
50
49
 
51
- 1. **Recent decisions** — Read files listed under `## Recent Decisions` in `index.md`
52
- 2. **Lessons** — Read `agent-memory/lessons.md`
53
- 3. **Patterns** — Read `agent-memory/patterns.md`
54
- 4. **Active context and plans** — Read any `context.md` and `plan.md` files linked from active tasks in `index.md`
50
+ 1. **Recent decisions** — Read files listed under `## Project Knowledge` → `decisions/` in `index.md`
51
+ 2. **Lessons** — Read `agent/lessons.md`
52
+ 3. **Patterns** — Read `agent/patterns.md`
53
+ 4. **Product discovery** — Read `product/roadmap.md` summary if listed in index
55
54
 
56
- Read only files that exist and are listed in the index. Do not scan the directory tree for unlisted files.
55
+ Read only files that exist and are listed in the index.
57
56
 
58
57
  ## Step 6: REPORT
59
58
 
60
59
  Print the memory summary directly into the conversation. **Never write output to a file.**
61
60
 
62
- Use the format below based on the current mode.
63
-
64
61
  ---
65
62
 
66
63
  ### Minimal Mode Output
67
64
 
68
65
  ```
69
- ## Project Memory (Minimal)
66
+ ## Project Memory
70
67
 
71
- ### Purpose
72
- [Project name and what it does — from requirements.md]
68
+ ### Active Features
69
+ [For each active feature:]
70
+ - **[NNN] [Feature name]** — [status] | Next: [next task]
71
+ [If no active features: "No features in progress. Run /mema.specify to start one."]
73
72
 
74
- ### Stack & Architecture
75
- [Tech stack, architecture pattern, key entry points — from architecture.md]
73
+ ### Project
74
+ [Name] [purpose from requirements.md]
75
+ Stack: [tech stack from architecture.md]
76
76
 
77
- ### Current Status
78
- [Active tasks and their progress from index.md + status files]
79
- [If no active tasks: "No active tasks."]
80
-
81
- ### Memory Map
82
- [List each section from index.md with file count, e.g.:]
83
- - Project Knowledge: [N] files
84
- - Recent Decisions: [N] decisions
85
- - Agent Lessons: [N] lessons, [N] patterns
77
+ ### What to run next
78
+ [Suggest the most logical next command based on active feature status]
86
79
 
87
80
  ---
88
- *Showing minimal recall. Use `/mema.recall full` for decisions, lessons, and patterns.*
81
+ *Use `/mema.recall full` for decisions, lessons, and product discovery.*
89
82
  ```
90
83
 
91
84
  ---
@@ -95,41 +88,42 @@ Use the format below based on the current mode.
95
88
  ```
96
89
  ## Project Memory (Full)
97
90
 
98
- ### Purpose
99
- [Project name and what it does — from requirements.md]
91
+ ### Active Features
92
+ [For each active feature:]
93
+ - **[NNN] [Feature name]** — [status] | Next: [next task]
94
+ [If no active features: "No features in progress. Run /mema.specify to start one."]
100
95
 
101
- ### Stack & Architecture
102
- [Tech stack, architecture pattern, key entry points — from architecture.md]
96
+ ### Product Discovery
97
+ [If product/ files exist:]
98
+ - Idea: [summary from seed.md]
99
+ - Roadmap: [N features defined — from roadmap.md]
100
+ [If no product/ files: omit section]
103
101
 
104
- ### Current Status
105
- [Active tasks and their progress from index.md + status files]
106
- [If no active tasks: "No active tasks."]
102
+ ### Project
103
+ [Name][purpose]
104
+ Stack: [tech stack]
105
+ Architecture: [pattern]
107
106
 
108
107
  ### Recent Decisions
109
108
  [For each decision file, list:]
110
- - **[Decision title]** ([date]) — [one-line summary or key choice made]
111
- [If no decisions: "No decisions recorded yet."]
109
+ - **[Decision title]** — [one-line summary]
110
+ [If none: "No decisions recorded yet."]
112
111
 
113
112
  ### Lessons
114
- [Bullet list of lessons from lessons.md]
115
- [If no lessons: "No lessons recorded yet."]
113
+ [Bullet list from agent/lessons.md]
114
+ [If none: "No lessons recorded yet."]
116
115
 
117
116
  ### Patterns
118
- [Bullet list of patterns from patterns.md]
119
- [If no patterns: "No patterns recorded yet."]
120
-
121
- ### Active Context & Plans
122
- [For each active task, summarize its context and plan]
123
- [If none: omit this section]
117
+ [Bullet list from agent/patterns.md]
118
+ [If none: "No patterns recorded yet."]
124
119
 
125
120
  ### Memory Map
126
- - Project Knowledge: [N] files
127
- - Recent Decisions: [N] decisions
128
- - Agent Lessons: [N] lessons, [N] patterns
129
- - Active Tasks: [N] tasks
130
- - Archived Tasks: [N] archived
121
+ - Active Features: [N]
122
+ - Product Discovery: [files present]
123
+ - Project Knowledge: [N] files, [N] decisions
124
+ - Agent Knowledge: [N] lessons, [N] patterns
131
125
  ```
132
126
 
133
127
  ---
134
128
 
135
- **Important:** This skill is purely informational. If you notice memory files are missing or out of date, suggest the user run `/mema.onboard` or the relevant skill — do not attempt to fix memory yourself.
129
+ **Important:** This skill is purely informational. If memory files are missing or out of date, suggest the user run `/mema.onboard` or the relevant skill — do not modify memory files yourself.
@@ -0,0 +1,109 @@
1
+ ---
2
+ description: Research competitors, market context, and technical options for your idea using web search. Saves findings to product/research.md.
3
+ ---
4
+
5
+ # /mema.research — Discovery Research
6
+
7
+ You are executing the /mema.research skill. Follow these steps carefully.
8
+
9
+ This skill uses web search to investigate what already exists, validate market opportunity, and explore technical options. It informs the challenge and roadmap phases.
10
+
11
+ ## AUTO-LOAD
12
+
13
+ 1. Read `.mema/index.md`
14
+ 2. Read `.mema/product/seed.md` (for the idea)
15
+ 3. Read `.mema/product/clarify.md` (for audience and scope — skip if missing)
16
+ 4. If `product/research.md` exists, read it to understand prior research
17
+
18
+ ## WORK
19
+
20
+ ### Parse Focus Area
21
+
22
+ If the user provided an optional focus area (e.g., `/mema.research competitors` or `/mema.research tech stack`), narrow the research to that area. Otherwise, run a full research sweep.
23
+
24
+ ### Graceful Degradation
25
+
26
+ If web search is unavailable:
27
+ - Inform the user: "Web search is unavailable. I'll research from training knowledge and flag where real-time data would be needed."
28
+ - Proceed using training knowledge
29
+ - Clearly mark each finding with `[Training data — verify with current sources]`
30
+
31
+ ### Research Areas
32
+
33
+ For each area, use the WebSearch tool with targeted queries:
34
+
35
+ **1. Existing Solutions**
36
+
37
+ Search for: `"[problem domain] tools"`, `"[problem] software"`, `"alternatives to [category]"`
38
+
39
+ For each solution found, capture: name, what it does, key strengths, key weaknesses, pricing model (if relevant), and how it relates to this idea.
40
+
41
+ **2. Market Context**
42
+
43
+ Search for: `"[domain] market size [current year]"`, `"[domain] trends"`, `"[audience] pain points"`
44
+
45
+ Capture: market size or growth signals, key trends, validated pain points, and any data that confirms or challenges the idea's assumptions.
46
+
47
+ **3. Technical Options**
48
+
49
+ Based on the clarified scope, search for: `"[technical capability] libraries [language]"`, `"how to build [core feature]"`, `"[technology choice 1] vs [technology choice 2]"`
50
+
51
+ Capture: viable technical approaches, key trade-offs, and any significant constraints or gotchas.
52
+
53
+ ### Save
54
+
55
+ Write `.mema/product/research.md`:
56
+
57
+ ```
58
+ # [Project Name] — Research
59
+
60
+ **Status:** active | **Updated:** [today's date]
61
+
62
+ ## Existing Solutions
63
+
64
+ | Solution | What it does | Strengths | Weaknesses |
65
+ |----------|-------------|-----------|------------|
66
+ | [Name] | [One line] | [+] | [-] |
67
+
68
+ ## Key Insight
69
+ [Most important thing the research revealed about the competitive landscape]
70
+
71
+ ## Market Context
72
+
73
+ [Market size, trends, validated pain points — with source links]
74
+
75
+ ## Technical Options
76
+
77
+ ### [Option/Approach 1]
78
+ - What it is: [description]
79
+ - Best for: [when to use]
80
+ - Trade-offs: [pros/cons]
81
+
82
+ ### [Option/Approach 2]
83
+ [same format]
84
+
85
+ ## Recommended Approach
86
+ [Based on research findings, what approach fits best for this idea]
87
+
88
+ ## Sources
89
+
90
+ - [Title](URL)
91
+ - [Title](URL)
92
+ ```
93
+
94
+ ### Guide Next Step
95
+
96
+ ```
97
+ Next: Run /mema.challenge to stress-test the idea against these findings.
98
+ ```
99
+
100
+ ## AUTO-SAVE & CURATE
101
+
102
+ - ADD or UPDATE `product/research.md`
103
+ - NOOP on all other memory files
104
+
105
+ ## AUTO-INDEX
106
+
107
+ Update `.mema/index.md`:
108
+ 1. Add or update entry under `## Product Discovery`: `- \`product/research.md\` — [N] competitors found; recommended approach: [one-line]`
109
+ 2. Update `**Updated:**` date