mema-kit 1.0.5 → 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.
- package/README.md +89 -40
- package/bin/cli.js +3 -3
- package/docs/guide.md +121 -218
- package/package.json +2 -2
- package/skills/_memory-protocol.md +32 -25
- package/skills/mema.challenge/SKILL.md +121 -0
- package/skills/mema.clarify/SKILL.md +109 -0
- package/skills/mema.create-skill/SKILL.md +304 -0
- package/skills/mema.implement/SKILL.md +167 -0
- package/skills/mema.onboard/SKILL.md +364 -0
- package/skills/mema.plan/SKILL.md +150 -0
- package/skills/mema.recall/SKILL.md +129 -0
- 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 +16 -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/skills/create-skill/SKILL.md +0 -242
- package/skills/implement/SKILL.md +0 -184
- package/skills/onboard/SKILL.md +0 -557
- package/skills/plan/SKILL.md +0 -206
- package/skills/recall/SKILL.md +0 -135
|
@@ -1,184 +0,0 @@
|
|
|
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 /plan first to create a plan.
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# /implement — Plan Step Execution
|
|
6
|
-
|
|
7
|
-
You are executing the /implement skill. Follow these steps carefully.
|
|
8
|
-
|
|
9
|
-
This skill picks up a step from an existing plan (created by `/plan`), implements it, verifies the result, and updates progress tracking. By default, it implements **one step at a time** to give the user control over the process.
|
|
10
|
-
|
|
11
|
-
## Phase 1: AUTO-LOAD
|
|
12
|
-
|
|
13
|
-
1. Read `.mema/index.md` to understand current project state
|
|
14
|
-
2. If `index.md` is missing or `.mema/` does not exist:
|
|
15
|
-
- Tell the user: "No memory found. Run `/onboard` first to set up mema-kit for this project."
|
|
16
|
-
- **Stop here** — do not continue to further steps.
|
|
17
|
-
3. If `index.md` is empty, run the **Rebuild Procedure** from `_memory-protocol.md`
|
|
18
|
-
4. Scan `## Active Tasks` in `index.md` to find tasks with plans
|
|
19
|
-
5. Load relevant memory files:
|
|
20
|
-
- `project-memory/architecture.md` — for technical context during implementation
|
|
21
|
-
- `project-memory/decisions/` — past decisions that affect implementation
|
|
22
|
-
- `agent-memory/lessons.md` — mistakes to avoid
|
|
23
|
-
- `agent-memory/patterns.md` — reusable approaches
|
|
24
|
-
|
|
25
|
-
## Phase 2: WORK
|
|
26
|
-
|
|
27
|
-
### 2a: Select Task
|
|
28
|
-
|
|
29
|
-
Parse the user's input to determine which task to implement:
|
|
30
|
-
|
|
31
|
-
- **Task specified:** `/implement user-auth` → look for `task-memory/user-auth/`
|
|
32
|
-
- **Task + step specified:** `/implement user-auth step 3` → load that specific step
|
|
33
|
-
- **No task specified:** `/implement` → list active tasks from index.md and ask which one
|
|
34
|
-
- **"all" modifier:** `/implement user-auth all` → implement all remaining steps sequentially (see 2e)
|
|
35
|
-
|
|
36
|
-
If the specified task directory doesn't exist:
|
|
37
|
-
- Tell the user: "No plan found for '[task-name]'. Run `/plan [goal]` first to create an implementation plan."
|
|
38
|
-
- **Stop here.**
|
|
39
|
-
|
|
40
|
-
### 2b: Load Task Context
|
|
41
|
-
|
|
42
|
-
Read the task's files from `task-memory/[task-name]/`:
|
|
43
|
-
|
|
44
|
-
1. **`plan.md`** — the full implementation plan with all steps
|
|
45
|
-
2. **`status.md`** — current progress (which steps are done)
|
|
46
|
-
3. **`context.md`** — exploration findings relevant to this task
|
|
47
|
-
|
|
48
|
-
If `plan.md` is missing, tell the user: "Task directory exists but has no plan. Run `/plan [goal]` to create one."
|
|
49
|
-
|
|
50
|
-
### 2c: Select Step
|
|
51
|
-
|
|
52
|
-
Determine which step to implement:
|
|
53
|
-
|
|
54
|
-
- **If user specified a step** (e.g., `step 3`): validate it exists in the plan and isn't already complete. If already complete, inform the user and ask if they want to re-implement it.
|
|
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:
|
|
58
|
-
|
|
59
|
-
```
|
|
60
|
-
## Implementing Step [N]/[total]: [Step title]
|
|
61
|
-
|
|
62
|
-
[Brief description of what this step does]
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
### 2d: Implement the Step
|
|
66
|
-
|
|
67
|
-
Follow the plan's specification for this step:
|
|
68
|
-
|
|
69
|
-
1. **Read the step details** from `plan.md` — files to create/modify, specific implementation details, dependencies
|
|
70
|
-
2. **Check dependencies** — verify that all prerequisite steps are marked complete in `status.md`. If a dependency is incomplete, warn the user: "Step [N] depends on Step [M] which isn't complete yet. Proceed anyway?" If the user says no, stop.
|
|
71
|
-
3. **Implement the changes** — create/modify files as specified in the plan. Follow the project's existing coding patterns (from architecture.md and patterns.md). Apply lessons learned (from lessons.md) to avoid known pitfalls.
|
|
72
|
-
4. **Verify the changes:**
|
|
73
|
-
- If the project has tests and the step involves testable code: run relevant tests
|
|
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.
|
|
77
|
-
|
|
78
|
-
### 2e: Implement All Remaining (if requested)
|
|
79
|
-
|
|
80
|
-
If the user requested "all" (e.g., `/implement user-auth all`):
|
|
81
|
-
|
|
82
|
-
1. Implement steps sequentially, starting from the first incomplete step
|
|
83
|
-
2. After each step, verify before moving to the next
|
|
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)
|
|
90
|
-
|
|
91
|
-
### 2f: Update Progress
|
|
92
|
-
|
|
93
|
-
After implementing a step (whether it succeeded or failed):
|
|
94
|
-
|
|
95
|
-
1. **Update `status.md`:**
|
|
96
|
-
- Mark the completed step: `- [x] Step N: [description]`
|
|
97
|
-
- Add any notes about deviations from the plan under `## Notes`
|
|
98
|
-
- Update the `**Updated:**` date
|
|
99
|
-
|
|
100
|
-
2. **Print a progress summary:**
|
|
101
|
-
|
|
102
|
-
```
|
|
103
|
-
## Progress: [Task Name]
|
|
104
|
-
|
|
105
|
-
Step [N]/[total] complete: [what was done]
|
|
106
|
-
|
|
107
|
-
[if verification passed:]
|
|
108
|
-
Verified: [how — tests passed, no errors, etc.]
|
|
109
|
-
|
|
110
|
-
[if verification failed:]
|
|
111
|
-
Issue: [what went wrong]
|
|
112
|
-
Suggested fix: [how to resolve]
|
|
113
|
-
|
|
114
|
-
### Overall Progress
|
|
115
|
-
[====------] [completed]/[total] steps
|
|
116
|
-
Next: Step [N+1] — [description]
|
|
117
|
-
|
|
118
|
-
To continue: /implement [task-name]
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
### 2g: Task Completion
|
|
122
|
-
|
|
123
|
-
If all steps are now complete:
|
|
124
|
-
|
|
125
|
-
1. Print a completion summary:
|
|
126
|
-
|
|
127
|
-
```
|
|
128
|
-
## Task Complete: [Task Name]
|
|
129
|
-
|
|
130
|
-
All [N] steps implemented successfully.
|
|
131
|
-
|
|
132
|
-
### What was built
|
|
133
|
-
- [Summary of changes made across all steps]
|
|
134
|
-
|
|
135
|
-
### Files changed
|
|
136
|
-
- [List of files created or modified]
|
|
137
|
-
|
|
138
|
-
Would you like to archive this task? (This moves it from active tasks to archive/)
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
2. If the user confirms archiving (or doesn't object), proceed to archive in Phase 3.
|
|
142
|
-
3. If the user wants to keep it active (e.g., for further iteration), leave it in `task-memory/`.
|
|
143
|
-
|
|
144
|
-
### 2h: Learn
|
|
145
|
-
|
|
146
|
-
After completing work (whether one step or all steps), reflect:
|
|
147
|
-
|
|
148
|
-
- Did anything unexpected happen during implementation? → Record as a lesson
|
|
149
|
-
- Did you use a pattern that worked well? → Record as a pattern
|
|
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
|
|
152
|
-
|
|
153
|
-
## Phase 3: AUTO-SAVE & CURATE
|
|
154
|
-
|
|
155
|
-
Follow the curation rules in `_memory-protocol.md`. For each piece of knowledge produced:
|
|
156
|
-
|
|
157
|
-
- **Decisions made** during implementation → ADD to `project-memory/decisions/YYYY-MM-DD-short-name.md`
|
|
158
|
-
- **Architecture changes** (if implementation changed the architecture) → UPDATE `project-memory/architecture.md`
|
|
159
|
-
- **Lessons learned** → ADD/UPDATE `agent-memory/lessons.md`
|
|
160
|
-
- **Patterns discovered** → ADD/UPDATE `agent-memory/patterns.md`
|
|
161
|
-
- **Task progress** → UPDATE `task-memory/[task-name]/status.md`
|
|
162
|
-
|
|
163
|
-
Apply ADD/UPDATE/DELETE/NOOP to each memory file. Most files will be NOOP.
|
|
164
|
-
|
|
165
|
-
### Task Archiving (on completion)
|
|
166
|
-
|
|
167
|
-
If the task is fully complete and the user has confirmed archiving:
|
|
168
|
-
|
|
169
|
-
1. Update `task-memory/[task-name]/status.md`:
|
|
170
|
-
- Set `**Status:** complete`
|
|
171
|
-
- Fill in the `**Completed:**` field with today's date
|
|
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`
|
|
174
|
-
|
|
175
|
-
## Phase 4: AUTO-INDEX
|
|
176
|
-
|
|
177
|
-
Update `.mema/index.md`:
|
|
178
|
-
1. Re-read the current index
|
|
179
|
-
2. If a step was completed: update the task's summary in `## Active Tasks` (e.g., "3/7 steps complete")
|
|
180
|
-
3. If the task was archived: move entry from `## Active Tasks` to remove it, and optionally note it under a completed tasks record
|
|
181
|
-
4. Add entries for any new files (decisions, lessons, patterns)
|
|
182
|
-
5. Update summaries for modified files
|
|
183
|
-
6. Remove entries for deleted files
|
|
184
|
-
7. Update the `**Updated:**` date
|