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
package/README.md
CHANGED
|
@@ -1,82 +1,129 @@
|
|
|
1
1
|
# mema-kit
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Full AI-assisted development lifecycle kit for Claude Code. From vague idea to shipped code — without switching tools.
|
|
4
4
|
|
|
5
|
-
**What it does:**
|
|
5
|
+
**What it does:** Twelve built-in skills cover the entire development lifecycle: brainstorm and validate ideas, break them into features, plan and implement each feature, and persist curated knowledge across every session in a `.mema/` memory directory.
|
|
6
6
|
|
|
7
|
-
**Key differentiator:** The memory protocol (AUTO-LOAD → WORK → AUTO-SAVE & CURATE → AUTO-INDEX)
|
|
7
|
+
**Key differentiator:** The memory protocol (AUTO-LOAD → WORK → AUTO-SAVE & CURATE → AUTO-INDEX) connects every phase. Skills read what previous skills wrote — a spec references research findings, a plan references architecture decisions, an implementation references the plan. Context compounds instead of resetting.
|
|
8
8
|
|
|
9
9
|
## Quick Start
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
# 1. Install skills into your project
|
|
13
|
-
npx mema-kit
|
|
11
|
+
### New project (starting from an idea)
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
```bash
|
|
14
|
+
npx mema-kit # install skills
|
|
16
15
|
claude
|
|
17
|
-
> /
|
|
16
|
+
> /mema.seed # capture your idea
|
|
17
|
+
> /mema.clarify # refine with Q&A
|
|
18
|
+
> /mema.research # find what exists (uses web search)
|
|
19
|
+
> /mema.challenge # stress-test assumptions
|
|
20
|
+
> /mema.roadmap # create prioritized feature list
|
|
21
|
+
> /mema.specify 001 # spec the first feature
|
|
22
|
+
> /mema.plan 001 # technical design
|
|
23
|
+
> /mema.tasks 001 # generate task list
|
|
24
|
+
> /mema.implement 001 # build it, one task at a time
|
|
25
|
+
```
|
|
18
26
|
|
|
19
|
-
|
|
20
|
-
|
|
27
|
+
### Existing project (starting from code)
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npx mema-kit # install skills
|
|
31
|
+
claude
|
|
32
|
+
> /mema.onboard # scan project, create .mema/, populate memory
|
|
33
|
+
> /mema.specify # spec a feature
|
|
34
|
+
> /mema.plan # technical design
|
|
35
|
+
> /mema.tasks # generate task list
|
|
36
|
+
> /mema.implement # build it
|
|
21
37
|
```
|
|
22
38
|
|
|
23
|
-
|
|
39
|
+
### Every new session
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
> /mema.recall # reload context — active features, stack, next action
|
|
43
|
+
```
|
|
24
44
|
|
|
25
45
|
## Built-in Skills
|
|
26
46
|
|
|
47
|
+
### Discovery (new projects)
|
|
48
|
+
|
|
27
49
|
| Command | Purpose |
|
|
28
50
|
|---------|---------|
|
|
29
|
-
| `/
|
|
30
|
-
| `/
|
|
31
|
-
| `/
|
|
51
|
+
| `/mema.seed` | Capture a raw idea → `product/seed.md` |
|
|
52
|
+
| `/mema.clarify` | Refine with targeted Q&A → `product/clarify.md` |
|
|
53
|
+
| `/mema.research` | Web search: competitors, market, tech options → `product/research.md` |
|
|
54
|
+
| `/mema.challenge` | Stress-test: assumptions, risks, blind spots → `product/challenge.md` |
|
|
55
|
+
| `/mema.roadmap` | Synthesize into prioritized feature list → `product/roadmap.md` |
|
|
32
56
|
|
|
33
|
-
|
|
57
|
+
### Feature Workflow
|
|
34
58
|
|
|
35
|
-
|
|
59
|
+
| Command | Purpose |
|
|
60
|
+
|---------|---------|
|
|
61
|
+
| `/mema.specify` | Feature spec (what + why) → `features/NNN-name/spec.md` |
|
|
62
|
+
| `/mema.plan` | Technical design → `features/NNN-name/plan.md` |
|
|
63
|
+
| `/mema.tasks` | Ordered task list → `features/NNN-name/tasks.md` |
|
|
64
|
+
| `/mema.implement` | Execute one task at a time, track progress |
|
|
65
|
+
|
|
66
|
+
### Utilities
|
|
67
|
+
|
|
68
|
+
| Command | Purpose |
|
|
69
|
+
|---------|---------|
|
|
70
|
+
| `/mema.onboard` | Bootstrap memory for an existing project (also migrates old mema-kit structure) |
|
|
71
|
+
| `/mema.recall` | Load memory into current session — shows active features first |
|
|
72
|
+
| `/mema.create-skill` | Generate a new memory-aware skill with the correct lifecycle phases |
|
|
73
|
+
|
|
74
|
+
## How Memory Works
|
|
36
75
|
|
|
37
76
|
```
|
|
38
77
|
.mema/
|
|
39
|
-
├── index.md
|
|
40
|
-
├──
|
|
41
|
-
│
|
|
42
|
-
├──
|
|
43
|
-
├──
|
|
44
|
-
|
|
78
|
+
├── index.md # Pointer map — read first
|
|
79
|
+
├── product/ # Discovery phase outputs
|
|
80
|
+
│ ├── seed.md
|
|
81
|
+
│ ├── clarify.md
|
|
82
|
+
│ ├── research.md
|
|
83
|
+
│ ├── challenge.md
|
|
84
|
+
│ └── roadmap.md
|
|
85
|
+
├── features/ # One directory per feature
|
|
86
|
+
│ └── 001-feature-name/
|
|
87
|
+
│ ├── spec.md # What + why
|
|
88
|
+
│ ├── plan.md # Technical design
|
|
89
|
+
│ ├── tasks.md # Implementation task list
|
|
90
|
+
│ └── status.md # Progress tracking
|
|
91
|
+
├── project/ # Stable project knowledge
|
|
92
|
+
│ ├── architecture.md
|
|
93
|
+
│ ├── requirements.md
|
|
94
|
+
│ └── decisions/
|
|
95
|
+
├── agent/ # Cross-session knowledge
|
|
96
|
+
│ ├── lessons.md
|
|
97
|
+
│ └── patterns.md
|
|
98
|
+
└── archive/ # Completed features
|
|
45
99
|
```
|
|
46
100
|
|
|
47
|
-
- **Auto-load**: Skills read `index.md` and load only the files relevant to the current task.
|
|
48
|
-
- **Auto-save**: After work, the agent curates findings into the right memory files.
|
|
49
|
-
- **Auto-prune**: Noise is removed; only actionable knowledge is kept.
|
|
50
|
-
- **Self-healing**: If `index.md` gets out of sync, the next skill rebuilds it from the directory structure.
|
|
51
|
-
|
|
52
101
|
Memory is just markdown. Open any file to see what the agent knows. Edit directly if something's wrong.
|
|
53
102
|
|
|
54
103
|
## The Memory Protocol
|
|
55
104
|
|
|
56
|
-
Every
|
|
105
|
+
Every skill follows four phases defined in `_memory-protocol.md`:
|
|
57
106
|
|
|
58
|
-
1. **AUTO-LOAD** — Read `index.md`,
|
|
59
|
-
2. **WORK** — Execute
|
|
60
|
-
3. **AUTO-SAVE & CURATE** —
|
|
61
|
-
4. **AUTO-INDEX** — Update `index.md` to reflect
|
|
107
|
+
1. **AUTO-LOAD** — Read `index.md`, load only relevant files
|
|
108
|
+
2. **WORK** — Execute with loaded context
|
|
109
|
+
3. **AUTO-SAVE & CURATE** — ADD / UPDATE / DELETE / NOOP for each piece of knowledge
|
|
110
|
+
4. **AUTO-INDEX** — Update `index.md` to reflect changes
|
|
62
111
|
|
|
63
|
-
The protocol is
|
|
112
|
+
The protocol is shared across all skills (never duplicated). Any skill you build can plug into it — not just the twelve that ship with mema-kit.
|
|
64
113
|
|
|
65
114
|
## Building Your Own Skills
|
|
66
115
|
|
|
67
|
-
Use `/create-skill` to generate memory-aware skills:
|
|
68
|
-
|
|
69
116
|
```
|
|
70
|
-
> /create-skill
|
|
117
|
+
> /mema.create-skill
|
|
71
118
|
|
|
72
|
-
|
|
119
|
+
Name: review
|
|
73
120
|
Purpose: Review code changes for quality and consistency
|
|
74
121
|
Complexity: standard
|
|
75
122
|
```
|
|
76
123
|
|
|
77
|
-
|
|
124
|
+
Creates `.claude/skills/review/SKILL.md` with the full 4-phase memory lifecycle. Three complexity levels:
|
|
78
125
|
|
|
79
|
-
- **Simple** (3 phases) — Read-only skills
|
|
126
|
+
- **Simple** (3 phases) — Read-only skills: code review, linting, quick lookups
|
|
80
127
|
- **Standard** (4 phases) — Most skills that read and write memory
|
|
81
128
|
- **Advanced** (4 phases + task management) — Multi-step workflows with archiving
|
|
82
129
|
|
|
@@ -88,6 +135,8 @@ npx mema-kit --update
|
|
|
88
135
|
|
|
89
136
|
Updates skill files only. Never touches `.mema/`, CLAUDE.md, or `.gitignore`.
|
|
90
137
|
|
|
138
|
+
If upgrading from an earlier version of mema-kit (with `project-memory/`, `agent-memory/`, `task-memory/` directories), run `/mema.onboard` after updating — it migrates the old structure automatically.
|
|
139
|
+
|
|
91
140
|
## Requirements
|
|
92
141
|
|
|
93
142
|
- Node.js >= 16.7.0
|
|
@@ -95,7 +144,7 @@ Updates skill files only. Never touches `.mema/`, CLAUDE.md, or `.gitignore`.
|
|
|
95
144
|
|
|
96
145
|
## Documentation
|
|
97
146
|
|
|
98
|
-
See [docs/guide.md](docs/guide.md) for the full usage guide with worked examples
|
|
147
|
+
See [docs/guide.md](docs/guide.md) for the full usage guide with worked examples.
|
|
99
148
|
|
|
100
149
|
## Links
|
|
101
150
|
|
package/bin/cli.js
CHANGED
|
@@ -47,10 +47,10 @@ function runInstall() {
|
|
|
47
47
|
|
|
48
48
|
console.log('✓ mema-kit skills installed to .claude/skills/');
|
|
49
49
|
console.log('');
|
|
50
|
-
console.log('Next step: Open your project in Claude Code and run /onboard');
|
|
50
|
+
console.log('Next step: Open your project in Claude Code and run /mema.onboard');
|
|
51
51
|
console.log('');
|
|
52
52
|
console.log(' claude');
|
|
53
|
-
console.log(' > /onboard');
|
|
53
|
+
console.log(' > /mema.onboard');
|
|
54
54
|
console.log('');
|
|
55
55
|
}
|
|
56
56
|
|
|
@@ -123,7 +123,7 @@ Usage:
|
|
|
123
123
|
npx mema-kit --update Update skills to the latest version
|
|
124
124
|
npx mema-kit --help Show this help message
|
|
125
125
|
|
|
126
|
-
After installing, open your project in Claude Code and run /onboard.
|
|
126
|
+
After installing, open your project in Claude Code and run /mema.onboard.
|
|
127
127
|
|
|
128
128
|
Learn more: https://github.com/simonv15/mema-kit
|
|
129
129
|
`.trim());
|
package/docs/guide.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# mema-kit — Usage Guide
|
|
2
2
|
|
|
3
|
-
**A
|
|
3
|
+
**A full AI-assisted development lifecycle kit for Claude Code.**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Twelve built-in skills. Persistent memory across sessions. From vague idea to shipped code, without switching tools.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -11,266 +11,191 @@ Five built-in skills. Persistent memory across sessions. A protocol for building
|
|
|
11
11
|
Claude Code has a **context window** — everything it "knows" during a conversation. mema-kit works within that window, not outside it.
|
|
12
12
|
|
|
13
13
|
```
|
|
14
|
-
"Load memory"
|
|
15
|
-
"Save memory"
|
|
14
|
+
"Load memory" = Read .mema/ files → contents enter the context window
|
|
15
|
+
"Save memory" = Write .mema/ files → knowledge persists for next session
|
|
16
16
|
"What's relevant" = Read index.md (~20 lines) → choose which files to load
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
**Without mema-kit:** every session starts blank. You re-explain everything, or the agent explores your entire codebase (slow, expensive).
|
|
20
20
|
|
|
21
|
-
**With mema-kit:** the agent reads `index.md`, instantly knows your architecture and recent decisions
|
|
22
|
-
|
|
23
|
-
Think of it like a developer's notebook — it doesn't give you a bigger brain, it gives you the right information faster.
|
|
21
|
+
**With mema-kit:** the agent reads `index.md`, instantly knows your architecture, active features, and recent decisions — and gets to work.
|
|
24
22
|
|
|
25
23
|
---
|
|
26
24
|
|
|
27
|
-
##
|
|
25
|
+
## The Two Starting Points
|
|
26
|
+
|
|
27
|
+
### Starting from a vague idea (new project)
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
30
|
npx mema-kit # install skills to .claude/skills/
|
|
31
31
|
claude
|
|
32
|
-
> /
|
|
33
|
-
> /
|
|
32
|
+
> /mema.seed # capture your idea
|
|
33
|
+
> /mema.clarify # refine with Q&A
|
|
34
|
+
> /mema.research # find what exists (web search)
|
|
35
|
+
> /mema.challenge # stress-test assumptions
|
|
36
|
+
> /mema.roadmap # create feature list
|
|
37
|
+
> /mema.specify 001 # spec the first feature
|
|
38
|
+
> /mema.plan 001 # technical design
|
|
39
|
+
> /mema.tasks 001 # generate task list
|
|
40
|
+
> /mema.implement 001 # build it, one task at a time
|
|
34
41
|
```
|
|
35
42
|
|
|
36
|
-
|
|
43
|
+
### Starting from an existing project
|
|
37
44
|
|
|
38
|
-
|
|
45
|
+
```bash
|
|
46
|
+
npx mema-kit # install skills
|
|
47
|
+
claude
|
|
48
|
+
> /mema.onboard # scan project, create .mema/, populate memory
|
|
49
|
+
> /mema.specify # spec a new feature
|
|
50
|
+
> /mema.plan # technical design
|
|
51
|
+
> /mema.tasks # generate task list
|
|
52
|
+
> /mema.implement # build it
|
|
53
|
+
```
|
|
39
54
|
|
|
40
55
|
---
|
|
41
56
|
|
|
42
|
-
##
|
|
43
|
-
|
|
44
|
-
Every new Claude Code session starts with a blank context. `/recall` fixes the cold-start problem by reading `.mema/` and printing a formatted summary into the conversation.
|
|
45
|
-
|
|
46
|
-
### Modes
|
|
47
|
-
|
|
48
|
-
| Mode | Command | What you get |
|
|
49
|
-
|------|---------|--------------|
|
|
50
|
-
| **Minimal** (default) | `/recall` or `/recall minimal` | Purpose, stack, architecture, current status, memory map |
|
|
51
|
-
| **Full** | `/recall full` | Everything in Minimal + recent decisions, lessons, patterns, active context & plans |
|
|
57
|
+
## Discovery Skills (New Projects)
|
|
52
58
|
|
|
53
|
-
###
|
|
59
|
+
### `/mema.seed [optional: inline idea]`
|
|
54
60
|
|
|
55
|
-
|
|
56
|
-
|-----------|------|
|
|
57
|
-
| Starting a new session, need quick context | Minimal |
|
|
58
|
-
| Picking up a multi-day task | Full |
|
|
59
|
-
| Onboarding a teammate to the project | Full |
|
|
60
|
-
| Quick check on what decisions exist | Full |
|
|
61
|
-
| Daily development work | Minimal |
|
|
61
|
+
Captures your raw idea exactly as described — no editing, no judgment. Use stream of consciousness, bullet points, half-formed thoughts. Saves to `.mema/product/seed.md`.
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
```
|
|
64
|
+
> /mema.seed I want to build a tool that helps remote teams do async standups
|
|
65
|
+
```
|
|
64
66
|
|
|
65
|
-
|
|
67
|
+
### `/mema.clarify`
|
|
66
68
|
|
|
67
|
-
|
|
69
|
+
Asks 3–5 targeted questions to turn a seed into a crisp problem statement: who is it for, what problem does it solve, what's in scope, what's the motivation. Saves to `.mema/product/clarify.md`.
|
|
68
70
|
|
|
69
|
-
`/
|
|
71
|
+
### `/mema.research [optional: focus area]`
|
|
70
72
|
|
|
71
|
-
|
|
73
|
+
Uses web search to investigate existing solutions, market context, and technical options. Saves findings with source links to `.mema/product/research.md`. Add a focus area to narrow the search:
|
|
72
74
|
|
|
73
75
|
```
|
|
74
|
-
> /
|
|
75
|
-
> /
|
|
76
|
-
> /plan add search functionality to the API
|
|
76
|
+
> /mema.research competitors
|
|
77
|
+
> /mema.research tech stack options
|
|
77
78
|
```
|
|
78
79
|
|
|
79
|
-
###
|
|
80
|
-
|
|
81
|
-
1. **Loads memory** — architecture, requirements, decisions, lessons, patterns
|
|
82
|
-
2. **Explores the codebase** — reads relevant source files, understands current patterns
|
|
83
|
-
3. **Asks clarifying questions** (1-2 max) if the goal is ambiguous
|
|
84
|
-
4. **Produces a plan** — general approach + detailed steps with file paths and specifics
|
|
85
|
-
5. **Saves to task-memory** — creates `context.md`, `plan.md`, and `status.md` in `task-memory/[task-name]/`
|
|
86
|
-
|
|
87
|
-
### Example output
|
|
88
|
-
|
|
89
|
-
```
|
|
90
|
-
## Plan: User Authentication
|
|
80
|
+
### `/mema.challenge`
|
|
91
81
|
|
|
92
|
-
|
|
93
|
-
Add JWT-based authentication using the existing Fastify plugin system.
|
|
94
|
-
Follows the controller → service → repository pattern already in the codebase.
|
|
82
|
+
Plays devil's advocate. Identifies risky assumptions, builds a risk register with severity/likelihood/mitigation, and surfaces blind spots. Critical risks are flagged explicitly. Saves to `.mema/product/challenge.md`.
|
|
95
83
|
|
|
96
|
-
###
|
|
97
|
-
1. Create auth database schema and migration
|
|
98
|
-
2. Implement auth service (register, login, token refresh)
|
|
99
|
-
3. Create auth route handlers
|
|
100
|
-
4. Add authentication middleware (Fastify plugin)
|
|
101
|
-
5. Add auth integration tests
|
|
84
|
+
### `/mema.roadmap`
|
|
102
85
|
|
|
103
|
-
|
|
104
|
-
- OAuth/social login
|
|
105
|
-
- Role-based access control
|
|
106
|
-
- Password reset flow
|
|
86
|
+
Synthesizes all discovery outputs into a prioritized feature list with a problem statement and MVP scope. Creates numbered feature directories (`features/001-name/`, `features/002-name/`, etc.) ready for specification. Saves to `.mema/product/roadmap.md`.
|
|
107
87
|
|
|
108
88
|
---
|
|
109
|
-
Plan saved to task-memory/user-authentication/
|
|
110
|
-
To start implementing: /implement user-authentication
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
### Revising plans
|
|
114
89
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
---
|
|
90
|
+
## Feature Workflow Skills
|
|
118
91
|
|
|
119
|
-
|
|
92
|
+
These work on any project — with or without the discovery phase.
|
|
120
93
|
|
|
121
|
-
`/
|
|
94
|
+
### `/mema.specify [feature number or description]`
|
|
122
95
|
|
|
123
|
-
|
|
96
|
+
Creates the "what and why" spec for a feature. If a roadmap exists, presents the feature list and asks which to specify. Otherwise, takes a description directly. Saves to `.mema/features/NNN-name/spec.md`.
|
|
124
97
|
|
|
125
98
|
```
|
|
126
|
-
> /
|
|
127
|
-
> /
|
|
128
|
-
> /implement user-authentication all # implement all remaining steps
|
|
129
|
-
> /implement # list active tasks, then pick one
|
|
99
|
+
> /mema.specify 001
|
|
100
|
+
> /mema.specify "add user authentication"
|
|
130
101
|
```
|
|
131
102
|
|
|
132
|
-
###
|
|
103
|
+
### `/mema.plan [feature]`
|
|
133
104
|
|
|
134
|
-
|
|
135
|
-
2. **Picks the next step** — first incomplete step, or the one you specified
|
|
136
|
-
3. **Implements the step** — creates/modifies files following the plan's spec
|
|
137
|
-
4. **Verifies** — runs tests, checks for errors, validates against the plan
|
|
138
|
-
5. **Updates progress** — marks the step complete in `status.md`
|
|
139
|
-
6. **Reports** — shows what was done, what's next, overall progress
|
|
105
|
+
Creates the technical implementation design: approach, file changes, key decisions. Reads the feature spec and explores the existing codebase to ensure the plan fits established patterns. Saves to `.mema/features/NNN-name/plan.md`.
|
|
140
106
|
|
|
141
|
-
###
|
|
142
|
-
|
|
143
|
-
After each step, you'll see a progress summary:
|
|
144
|
-
|
|
145
|
-
```
|
|
146
|
-
## Progress: User Authentication
|
|
107
|
+
### `/mema.tasks [feature]`
|
|
147
108
|
|
|
148
|
-
|
|
109
|
+
Generates an ordered, checkable task list from the plan. Each task starts with a verb and includes a file path — specific enough to execute without additional context. Saves to `.mema/features/NNN-name/tasks.md`.
|
|
149
110
|
|
|
150
|
-
|
|
111
|
+
### `/mema.implement [feature] [optional: step N | all]`
|
|
151
112
|
|
|
152
|
-
|
|
153
|
-
[====------] 2/5 steps
|
|
154
|
-
Next: Step 3 — Create auth route handlers
|
|
113
|
+
Executes one task at a time by default. Reads the task list, implements the next incomplete task, verifies it, and updates progress. When all tasks are done, offers to archive the feature.
|
|
155
114
|
|
|
156
|
-
|
|
115
|
+
```
|
|
116
|
+
> /mema.implement 001 # implement next task
|
|
117
|
+
> /mema.implement 001 step 3 # implement a specific task
|
|
118
|
+
> /mema.implement 001 all # implement all remaining tasks
|
|
157
119
|
```
|
|
158
120
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
When all steps are done, `/implement` offers to archive the task:
|
|
121
|
+
---
|
|
162
122
|
|
|
163
|
-
|
|
164
|
-
- Moves `task-memory/[task-name]/` to `archive/[task-name]/`
|
|
165
|
-
- Removes the task from active tasks in `index.md`
|
|
166
|
-
- Records any lessons learned and patterns discovered
|
|
123
|
+
## Utility Skills
|
|
167
124
|
|
|
168
|
-
###
|
|
125
|
+
### `/mema.onboard`
|
|
169
126
|
|
|
170
|
-
|
|
171
|
-
- Unexpected issues become **lessons** in `agent-memory/lessons.md`
|
|
172
|
-
- Effective approaches become **patterns** in `agent-memory/patterns.md`
|
|
173
|
-
- Decisions made during implementation are saved to `project-memory/decisions/`
|
|
127
|
+
Bootstraps memory for an existing project. Scans the codebase (package.json, README, source files) and populates `.mema/` with real content. Generates or updates `CLAUDE.md`. Safe to re-run — updates stale content, leaves accurate content untouched.
|
|
174
128
|
|
|
175
|
-
|
|
129
|
+
For projects with the old mema-kit structure (`project-memory/`, `agent-memory/`, `task-memory/`): automatically migrates to the new layout on re-run.
|
|
176
130
|
|
|
177
|
-
|
|
131
|
+
### `/mema.recall [optional: full]`
|
|
178
132
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
`/plan` and `/implement` form a complete spec-driven development workflow:
|
|
133
|
+
Loads project memory into the current session. Shows active features and their status at the top — the most important context for a returning developer. Use at the start of every session.
|
|
182
134
|
|
|
183
135
|
```
|
|
184
|
-
/
|
|
185
|
-
|
|
186
|
-
├─ reads: ├─ reads:
|
|
187
|
-
│ architecture │ plan.md (from /plan)
|
|
188
|
-
│ requirements │ status.md
|
|
189
|
-
│ decisions │ context.md
|
|
190
|
-
│ lessons & patterns │ architecture, decisions
|
|
191
|
-
│ │ lessons & patterns
|
|
192
|
-
├─ writes: │
|
|
193
|
-
│ task-memory/[task]/context.md ├─ writes:
|
|
194
|
-
│ task-memory/[task]/plan.md │ status.md (mark steps done)
|
|
195
|
-
│ task-memory/[task]/status.md │ decisions/ (if any)
|
|
196
|
-
│ │ lessons.md (if any)
|
|
197
|
-
│ │ patterns.md (if any)
|
|
198
|
-
│ │ archive/ (on completion)
|
|
199
|
-
▼ ▼
|
|
200
|
-
both flow through .mema/index.md
|
|
136
|
+
> /mema.recall # minimal — active features + project identity + next action
|
|
137
|
+
> /mema.recall full # everything + decisions + lessons + product discovery
|
|
201
138
|
```
|
|
202
139
|
|
|
203
|
-
###
|
|
140
|
+
### `/mema.create-skill`
|
|
204
141
|
|
|
205
|
-
|
|
206
|
-
# Session 1: Explore and plan
|
|
207
|
-
> /recall # load project context
|
|
208
|
-
> /plan add user authentication # explore codebase, produce plan
|
|
209
|
-
|
|
210
|
-
# Session 2: Implement (pick up where you left off)
|
|
211
|
-
> /recall # load context + active tasks
|
|
212
|
-
> /implement user-authentication # implement step 1
|
|
213
|
-
> /implement user-authentication # implement step 2
|
|
214
|
-
|
|
215
|
-
# Session 3: Finish up
|
|
216
|
-
> /recall
|
|
217
|
-
> /implement user-authentication all # implement remaining steps
|
|
218
|
-
# → task archived, lessons saved
|
|
219
|
-
```
|
|
142
|
+
Generates a new memory-aware Claude Code skill. Interviews you on the skill's name, purpose, and complexity level, generates a SKILL.md with proper memory lifecycle phases, shows you a preview before writing, and offers to enhance existing skills if you re-run with an existing skill name.
|
|
220
143
|
|
|
221
144
|
---
|
|
222
145
|
|
|
223
|
-
##
|
|
224
|
-
|
|
225
|
-
mema-kit ships with five built-in skills (`/onboard`, `/recall`, `/plan`, `/implement`, `/create-skill`). You can create your own skills to extend the workflow.
|
|
226
|
-
|
|
227
|
-
### Example: Create `/explore`
|
|
228
|
-
|
|
229
|
-
```
|
|
230
|
-
> /create-skill
|
|
231
|
-
Name: explore
|
|
232
|
-
Purpose: Research technical decisions and save findings
|
|
233
|
-
Complexity: standard
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
Creates `.claude/skills/explore/SKILL.md` — a 4-phase skill that loads existing architecture and decisions, helps you research options, then saves new decisions and context to `.mema/`.
|
|
237
|
-
|
|
238
|
-
**Using it:**
|
|
146
|
+
## The Full Lifecycle in One View
|
|
239
147
|
|
|
240
148
|
```
|
|
241
|
-
|
|
149
|
+
vague idea
|
|
150
|
+
│
|
|
151
|
+
├── /mema.seed → .mema/product/seed.md
|
|
152
|
+
├── /mema.clarify → .mema/product/clarify.md
|
|
153
|
+
├── /mema.research → .mema/product/research.md
|
|
154
|
+
├── /mema.challenge → .mema/product/challenge.md
|
|
155
|
+
└── /mema.roadmap → .mema/product/roadmap.md
|
|
156
|
+
│
|
|
157
|
+
pick a feature
|
|
158
|
+
│
|
|
159
|
+
├── /mema.specify → .mema/features/NNN-name/spec.md
|
|
160
|
+
├── /mema.plan → .mema/features/NNN-name/plan.md
|
|
161
|
+
├── /mema.tasks → .mema/features/NNN-name/tasks.md
|
|
162
|
+
└── /mema.implement → source code + .mema/features/NNN-name/status.md
|
|
163
|
+
│
|
|
164
|
+
/mema.recall (next session)
|
|
242
165
|
```
|
|
243
166
|
|
|
244
|
-
|
|
167
|
+
Every skill reads what previous skills wrote. The index ties it all together.
|
|
245
168
|
|
|
246
|
-
|
|
247
|
-
.mema/project-memory/decisions/2026-02-24-auth-strategy.md
|
|
248
|
-
→ "JWT with refresh tokens. Why: stateless, fits our REST API, team has experience."
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
Next session, any skill that loads memory will know this decision exists — including `/plan`, which can incorporate it into implementation plans.
|
|
169
|
+
---
|
|
252
170
|
|
|
253
|
-
|
|
171
|
+
## Memory Structure
|
|
254
172
|
|
|
255
173
|
```
|
|
256
|
-
/
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
174
|
+
.mema/
|
|
175
|
+
├── index.md # Pointer map — read this first
|
|
176
|
+
├── product/ # Discovery phase outputs
|
|
177
|
+
│ ├── seed.md # Raw idea
|
|
178
|
+
│ ├── clarify.md # Refined intent
|
|
179
|
+
│ ├── research.md # Competitor and market findings
|
|
180
|
+
│ ├── challenge.md # Risk register
|
|
181
|
+
│ └── roadmap.md # Prioritized feature list
|
|
182
|
+
├── features/ # One directory per feature
|
|
183
|
+
│ └── 001-feature-name/
|
|
184
|
+
│ ├── spec.md # What + why
|
|
185
|
+
│ ├── plan.md # Technical design
|
|
186
|
+
│ ├── tasks.md # Implementation task list
|
|
187
|
+
│ └── status.md # Progress tracking
|
|
188
|
+
├── project/ # Stable project knowledge
|
|
189
|
+
│ ├── architecture.md
|
|
190
|
+
│ ├── requirements.md
|
|
191
|
+
│ └── decisions/
|
|
192
|
+
├── agent/ # Cross-session knowledge
|
|
193
|
+
│ ├── lessons.md
|
|
194
|
+
│ └── patterns.md
|
|
195
|
+
└── archive/ # Completed features
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
The index is a **rebuildable cache** — if it gets out of sync, any skill rebuilds it from the directory structure.
|
|
274
199
|
|
|
275
200
|
---
|
|
276
201
|
|
|
@@ -288,39 +213,17 @@ Every skill follows four phases, defined in `_memory-protocol.md`:
|
|
|
288
213
|
| Action | When |
|
|
289
214
|
|--------|------|
|
|
290
215
|
| **ADD** | New decision, finding, lesson, or pattern |
|
|
291
|
-
| **UPDATE** | Existing knowledge changed
|
|
216
|
+
| **UPDATE** | Existing knowledge changed |
|
|
292
217
|
| **DELETE** | Wrong, superseded, or redundant |
|
|
293
218
|
| **NOOP** | Still accurate — leave it alone (most files, most of the time) |
|
|
294
219
|
|
|
295
|
-
Different file types have different curation styles:
|
|
296
|
-
- **Decisions** — conservative (rarely delete, even reversed decisions teach)
|
|
297
|
-
- **Context** — aggressive (prune dead ends, consolidate overlaps)
|
|
298
|
-
- **Plans** — replace (keep final version only)
|
|
299
|
-
- **Lessons/Patterns** — consolidate (merge similar entries)
|
|
300
|
-
|
|
301
|
-
---
|
|
302
|
-
|
|
303
|
-
## Memory Structure
|
|
304
|
-
|
|
305
|
-
```
|
|
306
|
-
.mema/
|
|
307
|
-
├── index.md # Pointer map — read this first
|
|
308
|
-
├── project-memory/ # Architecture, requirements, decisions
|
|
309
|
-
│ └── decisions/ # YYYY-MM-DD-short-name.md
|
|
310
|
-
├── task-memory/ # Per-task context, plans, status
|
|
311
|
-
├── agent-memory/ # Lessons learned, reusable patterns
|
|
312
|
-
├── archive/ # Completed tasks
|
|
313
|
-
└── _templates/ # File templates
|
|
314
|
-
```
|
|
315
|
-
|
|
316
|
-
The index is a **rebuildable cache** — if it gets out of sync, the next skill rebuilds it from the directory structure. The actual `.mema/` files are the source of truth.
|
|
317
|
-
|
|
318
220
|
---
|
|
319
221
|
|
|
320
222
|
## Tips
|
|
321
223
|
|
|
322
224
|
- **Memory is just markdown.** Open any file to see what the agent knows. Edit directly if something's wrong.
|
|
323
|
-
- **`.mema/` is gitignored by default.** To share decisions with your team, uncomment `!.mema/project
|
|
324
|
-
- **
|
|
325
|
-
- **
|
|
326
|
-
- **
|
|
225
|
+
- **`.mema/` is gitignored by default.** To share decisions with your team, uncomment `!.mema/project/` in `.gitignore`.
|
|
226
|
+
- **Discovery is optional.** You can jump straight to `/mema.specify` if you already know what to build.
|
|
227
|
+
- **One task at a time.** `/mema.implement` defaults to one step per invocation — review each change before continuing.
|
|
228
|
+
- **Curate, don't hoard.** The value of memory is signal-to-noise ratio. Prune aggressively.
|
|
229
|
+
- **Start every session with `/mema.recall`.** It takes seconds and saves minutes of re-explanation.
|