mema-kit 1.0.6 → 1.1.1
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 +88 -38
- package/docs/guide.md +122 -218
- package/package.json +2 -2
- package/skills/_memory-protocol.md +37 -24
- package/skills/mema.challenge/SKILL.md +121 -0
- package/skills/mema.clarify/SKILL.md +109 -0
- package/skills/mema.create-skill/SKILL.md +110 -43
- package/skills/mema.implement/SKILL.md +88 -104
- package/skills/mema.onboard/SKILL.md +180 -338
- package/skills/mema.plan/SKILL.md +79 -135
- package/skills/mema.recall/SKILL.md +69 -67
- package/skills/mema.research/SKILL.md +109 -0
- package/skills/mema.roadmap/SKILL.md +134 -0
- package/skills/mema.seed/SKILL.md +88 -0
- package/skills/mema.specify/SKILL.md +120 -0
- package/skills/mema.tasks/SKILL.md +128 -0
- package/templates/agent/lessons.md +16 -0
- package/templates/agent/patterns.md +16 -0
- package/templates/features/feature/plan.md +23 -0
- package/templates/features/feature/spec.md +30 -0
- package/templates/features/feature/status.md +23 -0
- package/templates/features/feature/tasks.md +16 -0
- package/templates/index.md +17 -5
- package/templates/product/challenge.md +23 -0
- package/templates/product/clarify.md +23 -0
- package/templates/product/research.md +21 -0
- package/templates/product/roadmap.md +26 -0
- package/templates/product/seed.md +11 -0
- package/templates/project/architecture.md +28 -0
- package/templates/project/decisions/decision.md +23 -0
- package/templates/project/requirements.md +16 -0
- package/templates/project/structure.md +32 -0
|
@@ -1,184 +1,168 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Execute implementation plan steps one at a time. Picks up the next step from an existing plan, implements it, verifies the result, and tracks progress. Run /mema.plan first to create a plan.
|
|
2
|
+
description: Execute implementation plan steps one at a time. Picks up the next step from an existing feature plan, implements it, verifies the result, and tracks progress. Run /mema.plan first to create a plan.
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
# /mema.implement —
|
|
5
|
+
# /mema.implement — Feature Step Execution
|
|
6
6
|
|
|
7
7
|
You are executing the /mema.implement skill. Follow these steps carefully.
|
|
8
8
|
|
|
9
|
-
This skill picks up a step from an existing plan (created by `/mema.plan`), implements it, verifies the result, and updates progress tracking. By default, it implements **one step at a time** to give the user control
|
|
9
|
+
This skill picks up a step from an existing feature plan (created by `/mema.plan`), implements it, verifies the result, and updates progress tracking. By default, it implements **one step at a time** to give the user control.
|
|
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
|
|
16
|
-
- **Stop here
|
|
15
|
+
- Tell the user: "No memory found. Run `/mema.onboard` first."
|
|
16
|
+
- **Stop here.**
|
|
17
17
|
3. If `index.md` is empty, run the **Rebuild Procedure** from `_memory-protocol.md`
|
|
18
|
-
4. Scan `## Active
|
|
19
|
-
5. Load relevant memory
|
|
20
|
-
- `project
|
|
21
|
-
- `project
|
|
22
|
-
- `agent
|
|
23
|
-
- `agent
|
|
18
|
+
4. Scan `## Active Features` in `index.md` to find features with plans
|
|
19
|
+
5. Load relevant memory:
|
|
20
|
+
- `project/architecture.md` — technical context
|
|
21
|
+
- `project/decisions/` — past decisions that affect implementation
|
|
22
|
+
- `agent/lessons.md` — mistakes to avoid
|
|
23
|
+
- `agent/patterns.md` — reusable approaches
|
|
24
24
|
|
|
25
25
|
## Phase 2: WORK
|
|
26
26
|
|
|
27
|
-
### 2a: Select
|
|
27
|
+
### 2a: Select Feature
|
|
28
28
|
|
|
29
|
-
Parse the user's input
|
|
29
|
+
Parse the user's input:
|
|
30
30
|
|
|
31
|
-
- **
|
|
32
|
-
- **
|
|
33
|
-
- **No
|
|
34
|
-
- **"all" modifier:** `/mema.implement user-auth all` → implement all remaining steps
|
|
31
|
+
- **Feature name or number:** `/mema.implement user-auth` or `/mema.implement 001` → find `features/NNN-name/`
|
|
32
|
+
- **Feature + step:** `/mema.implement user-auth step 3` → implement that specific step
|
|
33
|
+
- **No input:** list active features from index.md and ask which one
|
|
34
|
+
- **"all" modifier:** `/mema.implement user-auth all` → implement all remaining steps (see 2e)
|
|
35
35
|
|
|
36
|
-
If the
|
|
37
|
-
- Tell the user: "No
|
|
36
|
+
If the feature directory doesn't exist:
|
|
37
|
+
- Tell the user: "No feature found for '[input]'. Run `/mema.specify` and `/mema.plan` first."
|
|
38
38
|
- **Stop here.**
|
|
39
39
|
|
|
40
|
-
### 2b: Load
|
|
40
|
+
### 2b: Load Feature Context
|
|
41
41
|
|
|
42
|
-
Read
|
|
42
|
+
Read from `features/NNN-name/`:
|
|
43
43
|
|
|
44
|
-
1. **`
|
|
45
|
-
2. **`
|
|
46
|
-
3. **`
|
|
44
|
+
1. **`tasks.md`** — the ordered task list (prefer this over plan.md for step selection)
|
|
45
|
+
2. **`plan.md`** — the technical design
|
|
46
|
+
3. **`spec.md`** — what the feature is supposed to do
|
|
47
|
+
4. **`status.md`** — current progress
|
|
47
48
|
|
|
48
|
-
If `
|
|
49
|
+
If `tasks.md` is missing, tell the user: "No tasks found. Run `/mema.tasks [feature]` first."
|
|
49
50
|
|
|
50
51
|
### 2c: Select Step
|
|
51
52
|
|
|
52
|
-
|
|
53
|
+
- **If user specified a step:** validate it exists and isn't already complete. If complete, ask if they want to re-implement it.
|
|
54
|
+
- **If no step specified:** find the first incomplete item (`- [ ]`) in `tasks.md`. If all items are complete, proceed to 2f (Task Completion).
|
|
53
55
|
|
|
54
|
-
|
|
55
|
-
- **If no step specified:** find the first incomplete step in `status.md` (first unchecked `- [ ]` item). If all steps are complete, see section 2f (Task Completion).
|
|
56
|
-
|
|
57
|
-
Tell the user which step you're implementing:
|
|
56
|
+
Tell the user which step is being implemented:
|
|
58
57
|
|
|
59
58
|
```
|
|
60
|
-
## Implementing
|
|
59
|
+
## Implementing: [task description]
|
|
61
60
|
|
|
62
61
|
[Brief description of what this step does]
|
|
63
62
|
```
|
|
64
63
|
|
|
65
64
|
### 2d: Implement the Step
|
|
66
65
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
- If
|
|
74
|
-
- Check for obvious errors (syntax, imports, type errors)
|
|
75
|
-
- Validate the implementation matches the plan's specification
|
|
76
|
-
- If verification fails: do NOT mark the step as complete. Inform the user with details about what went wrong and suggest fixes.
|
|
66
|
+
1. **Read the task details** from `tasks.md` — files to create/modify, what to do
|
|
67
|
+
2. **Check dependencies** — if the task references prior tasks that aren't done, warn the user and ask to confirm before proceeding
|
|
68
|
+
3. **Implement the changes** — create/modify files as specified; follow the project's existing patterns (from architecture.md and patterns.md); apply lessons (from lessons.md) to avoid known pitfalls
|
|
69
|
+
4. **Verify:**
|
|
70
|
+
- If the project has tests relevant to this step: run them
|
|
71
|
+
- Check for syntax errors, missing imports, obvious issues
|
|
72
|
+
- If verification fails: do NOT mark as complete; report what went wrong and suggest a fix
|
|
77
73
|
|
|
78
74
|
### 2e: Implement All Remaining (if requested)
|
|
79
75
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
3. If any step fails verification, stop and report. Do not continue to subsequent steps.
|
|
85
|
-
4. After each successful step, show a brief progress update:
|
|
86
|
-
```
|
|
87
|
-
Step [N]/[total] complete: [description]
|
|
88
|
-
```
|
|
89
|
-
5. After all steps are done, proceed to 2f (Task Completion)
|
|
76
|
+
1. Implement tasks sequentially from first incomplete task
|
|
77
|
+
2. Verify each before moving to next
|
|
78
|
+
3. If any step fails, stop and report — do not continue
|
|
79
|
+
4. Show a brief progress update after each step
|
|
90
80
|
|
|
91
81
|
### 2f: Update Progress
|
|
92
82
|
|
|
93
|
-
After
|
|
83
|
+
After each step:
|
|
94
84
|
|
|
95
|
-
1. **Update `status.md`:**
|
|
96
|
-
-
|
|
97
|
-
- Add
|
|
98
|
-
- Update
|
|
85
|
+
1. **Update `features/NNN-name/status.md`:**
|
|
86
|
+
- Update status to `in-progress` if this is the first step
|
|
87
|
+
- Add a progress log entry: date + task + notes
|
|
88
|
+
- Update "Next Task" field
|
|
89
|
+
- Update `**Updated:**` date
|
|
99
90
|
|
|
100
|
-
2. **
|
|
91
|
+
2. **Update `features/NNN-name/tasks.md`:**
|
|
92
|
+
- Mark completed task: `- [x]`
|
|
101
93
|
|
|
102
|
-
|
|
103
|
-
## Progress: [Task Name]
|
|
94
|
+
3. **Print progress summary:**
|
|
104
95
|
|
|
105
|
-
|
|
96
|
+
```
|
|
97
|
+
## Progress: [Feature Name]
|
|
106
98
|
|
|
107
|
-
[
|
|
108
|
-
Verified: [how — tests passed, no errors, etc.]
|
|
99
|
+
Task complete: [what was done]
|
|
109
100
|
|
|
110
|
-
[if
|
|
111
|
-
Issue: [what went wrong]
|
|
112
|
-
Suggested fix: [how to resolve]
|
|
101
|
+
[if verified:] Verified: [how]
|
|
102
|
+
[if failed:] Issue: [what went wrong] | Suggested fix: [how to resolve]
|
|
113
103
|
|
|
114
104
|
### Overall Progress
|
|
115
|
-
[====------] [completed]/[total]
|
|
116
|
-
Next:
|
|
105
|
+
[====------] [completed]/[total] tasks
|
|
106
|
+
Next: [next task description]
|
|
117
107
|
|
|
118
|
-
To continue: /mema.implement [
|
|
108
|
+
To continue: /mema.implement [feature-name]
|
|
119
109
|
```
|
|
120
110
|
|
|
121
|
-
### 2g:
|
|
111
|
+
### 2g: Feature Completion
|
|
122
112
|
|
|
123
|
-
If all
|
|
113
|
+
If all tasks in `tasks.md` are now complete:
|
|
124
114
|
|
|
125
|
-
1. Print
|
|
115
|
+
1. Print completion summary:
|
|
126
116
|
|
|
127
117
|
```
|
|
128
|
-
##
|
|
118
|
+
## Feature Complete: [Feature Name]
|
|
129
119
|
|
|
130
|
-
All [N]
|
|
120
|
+
All [N] tasks implemented.
|
|
131
121
|
|
|
132
122
|
### What was built
|
|
133
|
-
|
|
123
|
+
[Summary of changes]
|
|
134
124
|
|
|
135
125
|
### Files changed
|
|
136
|
-
|
|
126
|
+
[List of files created or modified]
|
|
137
127
|
|
|
138
|
-
|
|
128
|
+
Archive this feature? (moves to archive/ and removes from active features)
|
|
139
129
|
```
|
|
140
130
|
|
|
141
|
-
2. If
|
|
142
|
-
3. If the user wants to keep it active (e.g., for further iteration), leave it in `task-memory/`.
|
|
131
|
+
2. If user confirms, archive in Phase 3.
|
|
143
132
|
|
|
144
133
|
### 2h: Learn
|
|
145
134
|
|
|
146
|
-
After completing work
|
|
147
|
-
|
|
148
|
-
-
|
|
149
|
-
-
|
|
150
|
-
- Did any previous lesson prove wrong or need updating? → Update or delete it
|
|
151
|
-
- Did the plan need adjustment? → Note this for future planning improvements
|
|
135
|
+
After completing work, reflect:
|
|
136
|
+
- Unexpected issues → record as lesson
|
|
137
|
+
- Patterns that worked → record as pattern
|
|
138
|
+
- Previous lessons that were wrong → update or delete them
|
|
152
139
|
|
|
153
140
|
## Phase 3: AUTO-SAVE & CURATE
|
|
154
141
|
|
|
155
|
-
Follow
|
|
142
|
+
Follow curation rules in `_memory-protocol.md`:
|
|
156
143
|
|
|
157
|
-
- **Decisions made** during implementation → ADD to `project
|
|
158
|
-
- **Architecture changes**
|
|
159
|
-
- **
|
|
160
|
-
- **
|
|
161
|
-
- **
|
|
144
|
+
- **Decisions made** during implementation → ADD to `project/decisions/YYYY-MM-DD-short-name.md`
|
|
145
|
+
- **Architecture changes** → UPDATE `project/architecture.md`
|
|
146
|
+
- **Structural changes** (new files, directories, or moves) → UPDATE `project/structure.md`: add/remove/rename the affected entries in `## Directory Tree` and `## Where to Find X`. If nothing structural changed, NOOP.
|
|
147
|
+
- **Lessons learned** → ADD/UPDATE `agent/lessons.md`
|
|
148
|
+
- **Patterns discovered** → ADD/UPDATE `agent/patterns.md`
|
|
149
|
+
- **Task progress** → UPDATE `features/NNN-name/status.md` (done in 2f)
|
|
162
150
|
|
|
163
|
-
|
|
151
|
+
Most files will be NOOP.
|
|
164
152
|
|
|
165
|
-
###
|
|
153
|
+
### Feature Archiving (on completion)
|
|
166
154
|
|
|
167
|
-
If
|
|
155
|
+
If fully complete and user confirmed:
|
|
168
156
|
|
|
169
|
-
1. Update `
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
2. Move the entire `task-memory/[task-name]/` directory to `archive/[task-name]/`
|
|
173
|
-
3. Remove the task from `## Active Tasks` in `index.md`
|
|
157
|
+
1. Update `features/NNN-name/status.md`: set `**Status:** complete`
|
|
158
|
+
2. Move `features/NNN-name/` to `archive/NNN-name/`
|
|
159
|
+
3. Remove feature from `## Active Features` in `index.md`
|
|
174
160
|
|
|
175
161
|
## Phase 4: AUTO-INDEX
|
|
176
162
|
|
|
177
163
|
Update `.mema/index.md`:
|
|
178
164
|
1. Re-read the current index
|
|
179
|
-
2.
|
|
180
|
-
3. If
|
|
181
|
-
4. Add entries for
|
|
182
|
-
5. Update
|
|
183
|
-
6. Remove entries for deleted files
|
|
184
|
-
7. Update the `**Updated:**` date
|
|
165
|
+
2. Update the feature's summary in `## Active Features` with current progress (e.g., "3/7 tasks complete")
|
|
166
|
+
3. If archived: remove from `## Active Features`
|
|
167
|
+
4. Add entries for new files (decisions, lessons, patterns)
|
|
168
|
+
5. Update `**Updated:**` date
|