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.
@@ -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 — Plan Step Execution
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 over the process.
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 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."
16
+ - **Stop here.**
17
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
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 Task
27
+ ### 2a: Select Feature
28
28
 
29
- Parse the user's input to determine which task to implement:
29
+ Parse the user's input:
30
30
 
31
- - **Task specified:** `/mema.implement user-auth` → look for `task-memory/user-auth/`
32
- - **Task + step specified:** `/mema.implement user-auth step 3` → load that specific step
33
- - **No task specified:** `/mema.implement` → list active tasks from index.md and ask which one
34
- - **"all" modifier:** `/mema.implement user-auth all` → implement all remaining steps sequentially (see 2e)
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 specified task directory doesn't exist:
37
- - Tell the user: "No plan found for '[task-name]'. Run `/mema.plan [goal]` first to create an implementation plan."
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 Task Context
40
+ ### 2b: Load Feature Context
41
41
 
42
- Read the task's files from `task-memory/[task-name]/`:
42
+ Read from `features/NNN-name/`:
43
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
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 `plan.md` is missing, tell the user: "Task directory exists but has no plan. Run `/mema.plan [goal]` to create one."
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
- Determine which step to implement:
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
- - **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:
56
+ Tell the user which step is being implemented:
58
57
 
59
58
  ```
60
- ## Implementing Step [N]/[total]: [Step title]
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
- 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.
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
- If the user requested "all" (e.g., `/mema.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)
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 implementing a step (whether it succeeded or failed):
83
+ After each step:
94
84
 
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
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. **Print a progress summary:**
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
- Step [N]/[total] complete: [what was done]
96
+ ```
97
+ ## Progress: [Feature Name]
106
98
 
107
- [if verification passed:]
108
- Verified: [how — tests passed, no errors, etc.]
99
+ Task complete: [what was done]
109
100
 
110
- [if verification failed:]
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] steps
116
- Next: Step [N+1] [description]
105
+ [====------] [completed]/[total] tasks
106
+ Next: [next task description]
117
107
 
118
- To continue: /mema.implement [task-name]
108
+ To continue: /mema.implement [feature-name]
119
109
  ```
120
110
 
121
- ### 2g: Task Completion
111
+ ### 2g: Feature Completion
122
112
 
123
- If all steps are now complete:
113
+ If all tasks in `tasks.md` are now complete:
124
114
 
125
- 1. Print a completion summary:
115
+ 1. Print completion summary:
126
116
 
127
117
  ```
128
- ## Task Complete: [Task Name]
118
+ ## Feature Complete: [Feature Name]
129
119
 
130
- All [N] steps implemented successfully.
120
+ All [N] tasks implemented.
131
121
 
132
122
  ### What was built
133
- - [Summary of changes made across all steps]
123
+ [Summary of changes]
134
124
 
135
125
  ### Files changed
136
- - [List of files created or modified]
126
+ [List of files created or modified]
137
127
 
138
- Would you like to archive this task? (This moves it from active tasks to archive/)
128
+ Archive this feature? (moves to archive/ and removes from active features)
139
129
  ```
140
130
 
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/`.
131
+ 2. If user confirms, archive in Phase 3.
143
132
 
144
133
  ### 2h: Learn
145
134
 
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
135
+ After completing work, reflect:
136
+ - Unexpected issues → record as lesson
137
+ - Patterns that workedrecord as pattern
138
+ - Previous lessons that were wrongupdate or delete them
152
139
 
153
140
  ## Phase 3: AUTO-SAVE & CURATE
154
141
 
155
- Follow the curation rules in `_memory-protocol.md`. For each piece of knowledge produced:
142
+ Follow curation rules in `_memory-protocol.md`:
156
143
 
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`
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
- Apply ADD/UPDATE/DELETE/NOOP to each memory file. Most files will be NOOP.
151
+ Most files will be NOOP.
164
152
 
165
- ### Task Archiving (on completion)
153
+ ### Feature Archiving (on completion)
166
154
 
167
- If the task is fully complete and the user has confirmed archiving:
155
+ If fully complete and user confirmed:
168
156
 
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`
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. 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
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