@kevin0181/memoc 1.4.6 → 1.4.10
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 +330 -330
- package/bin/cli.js +79 -21
- package/package.json +2 -2
- package/plugins/memoc/.codex-plugin/plugin.json +1 -1
- package/skills/memoc/SKILL.md +0 -54
- package/skills/memoc-code/SKILL.md +0 -45
- package/skills/memoc-compress/SKILL.md +0 -31
- package/skills/memoc-doctor/SKILL.md +0 -35
- package/skills/memoc-goal/SKILL.md +0 -19
- package/skills/memoc-init/SKILL.md +0 -34
- package/skills/memoc-note/SKILL.md +0 -34
- package/skills/memoc-scope/SKILL.md +0 -19
- package/skills/memoc-search/SKILL.md +0 -38
- package/skills/memoc-simple/SKILL.md +0 -19
- package/skills/memoc-think/SKILL.md +0 -18
- package/skills/memoc-upgrade/SKILL.md +0 -27
- package/skills/memoc-work/SKILL.md +0 -31
package/README.md
CHANGED
|
@@ -1,335 +1,335 @@
|
|
|
1
|
-
# memoc
|
|
2
|
-
|
|
3
|
-
> AI agents forget everything when a session ends. memoc gives them a structured memory system so they can pick up exactly where they left off — without you repeating yourself.
|
|
4
|
-
|
|
5
|
-
Scaffolds a Markdown-based project memory into any codebase. Works with Claude Code, Codex, Cursor, Windsurf, GitHub Copilot, and Gemini CLI.
|
|
6
|
-
|
|
7
|
-
## Quick Start
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npx @kevin0181/memoc init
|
|
11
|
-
|
|
12
|
-
# Upgrade memoc in this project without deleting existing memory
|
|
13
|
-
npx @kevin0181/memoc@latest upgrade
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
Run inside your project directory. Detects your stack automatically and generates everything agents need.
|
|
17
|
-
|
|
18
|
-
`init` also creates project-local PATH helpers so agents can keep using memoc even when the global/npm bin is not on PATH.
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
# PowerShell
|
|
22
|
-
. .\.memoc\env.ps1
|
|
23
|
-
|
|
24
|
-
# sh/bash
|
|
25
|
-
. ./.memoc/env.sh
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
Agents are instructed to use the project-local wrapper if PATH fails:
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
# Windows
|
|
32
|
-
.\.memoc\bin\memoc.cmd summary
|
|
33
|
-
|
|
34
|
-
# macOS / Linux
|
|
35
|
-
.memoc/bin/memoc summary
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
---
|
|
39
|
-
|
|
40
|
-
## Ask An Agent To Install
|
|
41
|
-
|
|
42
|
-
If you are giving this repo or npm package to an AI coding agent, use a prompt like:
|
|
43
|
-
|
|
44
|
-
```text
|
|
45
|
-
Install memoc in this project and run init.
|
|
46
|
-
Use the npm package only. Run `npx @kevin0181/memoc@latest init`
|
|
47
|
-
from this project's root. Do not clone the GitHub repository into this project.
|
|
48
|
-
If npm/npx is missing, stop and ask the user to install Node.js LTS with npm first.
|
|
49
|
-
After init, verify with the project-local wrapper:
|
|
50
|
-
Windows: .\.memoc\bin\memoc.cmd summary
|
|
51
|
-
macOS/Linux: .memoc/bin/memoc summary
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
Agent install checklist:
|
|
55
|
-
|
|
56
|
-
1. Run `node --version` and `npm --version`. If either fails, ask the user to install Node.js LTS with npm first.
|
|
57
|
-
2. Run `npx @kevin0181/memoc@latest init` from the target project root.
|
|
58
|
-
3. Do not clone this GitHub repository into the target project. Do not download the repo ZIP as an installer.
|
|
59
|
-
4. `.claude/settings.json` is intentionally generated for the Claude Code Stop hook; keep or commit it only if the project wants that hook.
|
|
60
|
-
5. After init, do not depend on global PATH. Use the project-local wrapper when needed:
|
|
61
|
-
- Windows: `.\.memoc\bin\memoc.cmd <command>`
|
|
62
|
-
- macOS/Linux: `.memoc/bin/memoc <command>`
|
|
63
|
-
|
|
64
|
-
If `node --version` or `npm --version` fails, memoc cannot be installed yet. Install Node.js LTS with npm first, then repeat the steps above.
|
|
65
|
-
|
|
66
|
-
---
|
|
67
|
-
|
|
68
|
-
## The Problem
|
|
69
|
-
|
|
70
|
-
Every new AI session starts cold. You re-explain the project, the decisions already made, what's done and what isn't. The agent rediscovers what the last one figured out.
|
|
71
|
-
|
|
72
|
-
memoc installs a memory structure that agents read at session start, update as they work, and hand off to the next session — automatically.
|
|
73
|
-
|
|
74
|
-
---
|
|
75
|
-
|
|
76
|
-
## Commands
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
# First-time setup — scaffold memory, detect stack, install Claude Code hook
|
|
80
|
-
npx @kevin0181/memoc init
|
|
81
|
-
|
|
82
|
-
# Re-scan project and refresh managed sections
|
|
83
|
-
npx @kevin0181/memoc update
|
|
84
|
-
|
|
85
|
-
# Shared repo activity tracking
|
|
86
|
-
npx @kevin0181/memoc actor
|
|
87
|
-
npx @kevin0181/memoc actor set neneee
|
|
88
|
-
npx @kevin0181/memoc work "Auth refresh fix" --from-git
|
|
89
|
-
npx @kevin0181/memoc activity
|
|
90
|
-
npx @kevin0181/memoc activity --write
|
|
91
|
-
npx @kevin0181/memoc doctor
|
|
92
|
-
|
|
93
|
-
# Print current status in ~10 lines
|
|
94
|
-
npx @kevin0181/memoc summary
|
|
95
|
-
|
|
96
|
-
# Search memory/agent docs first (token-efficient)
|
|
97
|
-
npx @kevin0181/memoc search "auth"
|
|
98
|
-
npx @kevin0181/memoc search "auth" --snippets --limit 5
|
|
99
|
-
|
|
100
|
-
# Search project source/text files only when memory is not enough
|
|
101
|
-
npx @kevin0181/memoc grep "GetParticles"
|
|
102
|
-
npx @kevin0181/memoc grep "GetParticles" --snippets --limit 5
|
|
103
|
-
|
|
104
|
-
# Create raw/source records and durable wiki topic notes
|
|
105
|
-
npx @kevin0181/memoc ingest path/to/source.md
|
|
106
|
-
npx @kevin0181/memoc ingest https://example.com/spec
|
|
107
|
-
npx @kevin0181/memoc note "Auth flow comparison"
|
|
108
|
-
npx @kevin0181/memoc lint-wiki
|
|
109
|
-
|
|
110
|
-
# Estimate token cost of current memory files
|
|
111
|
-
npx @kevin0181/memoc tokens
|
|
112
|
-
|
|
113
|
-
# Archive and compact an oversized startup summary
|
|
114
|
-
npx @kevin0181/memoc trim-summary
|
|
115
|
-
|
|
116
|
-
# Compact oversized memoc files and refresh generated indexes
|
|
117
|
-
npx @kevin0181/memoc compress
|
|
118
|
-
|
|
119
|
-
# Add the same protocol to another agent's entry file
|
|
120
|
-
npx @kevin0181/memoc add cursor
|
|
121
|
-
npx @kevin0181/memoc add windsurf
|
|
122
|
-
npx @kevin0181/memoc add copilot
|
|
123
|
-
npx @kevin0181/memoc add gemini
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
---
|
|
127
|
-
|
|
128
|
-
## Upgrade Existing Projects
|
|
129
|
-
|
|
130
|
-
memoc never auto-updates itself. Upgrade only when you choose to run:
|
|
131
|
-
|
|
132
|
-
```bash
|
|
133
|
-
npx @kevin0181/memoc@latest upgrade
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
Run it from the project root. It preserves existing project memory, including:
|
|
137
|
-
|
|
138
|
-
- `.memoc/session-summary.md`
|
|
139
|
-
- `.memoc/02-current-project-state.md` human-written sections
|
|
140
|
-
- `.memoc/03-decisions.md`
|
|
141
|
-
- `.memoc/04-handoff.md`
|
|
142
|
-
- `.memoc/06-project-rules.md`
|
|
143
|
-
- Legacy `.memoc/log.md` if present
|
|
144
|
-
- Legacy `.memoc/systems/` if present (moved to `.memoc/raw/legacy-systems/` on upgrade)
|
|
145
|
-
- `.memoc/wiki/`
|
|
146
|
-
|
|
147
|
-
It refreshes the managed blocks, project-local wrappers, runtime copy, PATH helpers, and memoc-owned protocol templates. User-owned memory files such as `session-summary.md`, `03-decisions.md`, `04-handoff.md`, `06-project-rules.md`, and wiki topic/source pages are preserved. Upgrade also runs the `trim-summary` compaction pass so startup memory stays small. If `memoc` is not on PATH after upgrading, keep using:
|
|
148
|
-
|
|
149
|
-
```bash
|
|
150
|
-
# Windows
|
|
151
|
-
.\.memoc\bin\memoc.cmd summary
|
|
152
|
-
|
|
153
|
-
# macOS / Linux
|
|
154
|
-
.memoc/bin/memoc summary
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
---
|
|
158
|
-
|
|
159
|
-
## What Gets Created
|
|
160
|
-
|
|
161
|
-
```
|
|
162
|
-
CLAUDE.md ← Claude Code entry point (auto-loaded)
|
|
163
|
-
AGENTS.md ← Codex entry point (auto-loaded)
|
|
164
|
-
llms.txt ← LLM-facing project map
|
|
165
|
-
.claude/settings.json ← Claude Code Stop hook
|
|
166
|
-
|
|
167
|
-
.memoc/
|
|
168
|
-
bin/memoc ← project-local wrapper for PATH fallback
|
|
169
|
-
env.ps1 · env.sh ← shell helpers that prepend .memoc/bin to PATH
|
|
170
|
-
session-summary.md ← Only required startup read (~150 tokens)
|
|
171
|
-
02-current-project-state.md ← Status, open tasks, commands
|
|
172
|
-
03-decisions.md ← Durable decision log
|
|
173
|
-
04-handoff.md ← Resume context, verified/unverified
|
|
174
|
-
06-project-rules.md ← User preferences
|
|
175
|
-
activity.md ← Short shared activity index
|
|
176
|
-
actors/ ← Actor profiles for shared repos
|
|
177
|
-
worklog/ ← Per-actor work records to reduce conflicts
|
|
178
|
-
raw/ ← Immutable source material, not a startup read
|
|
179
|
-
wiki/project/ ← Project implementation wiki
|
|
180
|
-
wiki/knowledge/ ← Source-backed knowledge wiki
|
|
181
|
-
|
|
182
|
-
skills/project-memory-maintainer/SKILL.md ← Wiki operations guide
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
---
|
|
186
|
-
|
|
187
|
-
## How Agents Use It
|
|
188
|
-
|
|
189
|
-
Every entry file (`CLAUDE.md`, `AGENTS.md`, `.cursorrules`, etc.) gets the same protocol injected as a managed block:
|
|
190
|
-
|
|
191
|
-
```
|
|
192
|
-
## Session Start
|
|
193
|
-
- [ ] Read `.memoc/session-summary.md`
|
|
194
|
-
- [ ] `.pending` exists? → review changed files → update memory if needed → delete it
|
|
195
|
-
- [ ] If `memoc` is not found, use the project-local wrapper.
|
|
196
|
-
|
|
197
|
-
## Before Opening More Files
|
|
198
|
-
- [ ] Run `memoc search "<query>"` first
|
|
199
|
-
- [ ] Open on demand: `02` status · `04` resume · `06` rules · `llms.txt` map
|
|
200
|
-
- [ ] Use `memoc grep "<query>"` only when memory is not enough.
|
|
201
|
-
- [ ] For durable source/wiki work, use `memoc ingest`, `memoc note`, and `memoc lint-wiki`.
|
|
202
|
-
- [ ] In shared repos, record meaningful work with `memoc work "<title>"`.
|
|
203
|
-
- [ ] Keep output small: `summary`, `search --limit`, `search --snippets`
|
|
204
|
-
|
|
205
|
-
## Before Finishing _(update only applicable files; skip Q&A / throwaway exploration)_
|
|
206
|
-
- [ ] Code/config/deps changed → `02` (version, commands list, Last synced) + `session-summary.md` (status, changed, open tasks)
|
|
207
|
-
- [ ] Decision made → `03-decisions.md` (what & why) + `02`
|
|
208
|
-
- [ ] Work incomplete or risky → `04-handoff.md` (verified commands, unverified items, next steps)
|
|
209
|
-
- [ ] Rule/preference set → `06-project-rules.md`
|
|
210
|
-
- [ ] Wiki/project-memory work → read `skills/project-memory-maintainer/SKILL.md`
|
|
211
|
-
- [ ] Shared repo work → prefer `memoc work "<title>" --from-git`; run `memoc activity --write` only when regenerating indexes.
|
|
212
|
-
- [ ] Keep `session-summary.md` replace-only; completed work belongs in actor worklogs.
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
The checklist tells agents exactly when to update, which file to update, and what to record — so nothing gets missed.
|
|
216
|
-
|
|
217
|
-
---
|
|
218
|
-
|
|
219
|
-
## Token Efficiency
|
|
220
|
-
|
|
221
|
-
Startup cost is kept minimal by design.
|
|
222
|
-
|
|
223
|
-
| What loads | Tokens |
|
|
224
|
-
|---|---|
|
|
225
|
-
| `CLAUDE.md` (managed block only) | ~280 |
|
|
226
|
-
| `session-summary.md` (only required read) | ~150 |
|
|
227
|
-
| **Total startup** | **~430** |
|
|
228
|
-
|
|
229
|
-
Everything else is on-demand. Use `memoc tokens` to see the live breakdown for your project.
|
|
230
|
-
|
|
231
|
-
`session-summary.md` is a replace-only startup snapshot, not a timeline. If it grows beyond the warning threshold, run `memoc compress` or `memoc trim-summary`; completed history belongs in `.memoc/worklog/<actor>/YYYY-MM/`, and unfinished/risky resume detail belongs in `.memoc/04-handoff.md`.
|
|
232
|
-
|
|
233
|
-
---
|
|
234
|
-
|
|
235
|
-
## Claude Code Auto-Detection
|
|
236
|
-
|
|
237
|
-
`init` installs a lightweight `Stop` hook in `.claude/settings.json`. After each Claude Code response it checks:
|
|
238
|
-
|
|
239
|
-
```bash
|
|
240
|
-
git status --porcelain
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
If uncommitted changes exist, it writes `.memoc/.pending` with a timestamp and the changed filenames. At the next session start, Claude reads `.pending` and decides whether to update memory — then deletes the file.
|
|
244
|
-
|
|
245
|
-
No extra setup. Add `.memoc/.pending` to `.gitignore` to keep it untracked.
|
|
246
|
-
|
|
247
|
-
---
|
|
248
|
-
|
|
249
|
-
## Multi-Agent Support
|
|
250
|
-
|
|
251
|
-
`init` creates `CLAUDE.md` (Claude Code) and `AGENTS.md` (Codex) by default. All agents follow the same 3-phase checklist protocol.
|
|
252
|
-
|
|
253
|
-
Add more agents on demand:
|
|
254
|
-
|
|
255
|
-
| Command | Creates |
|
|
256
|
-
|---|---|
|
|
257
|
-
| `add cursor` | `.cursorrules` |
|
|
258
|
-
| `add windsurf` | `.windsurfrules` |
|
|
259
|
-
| `add copilot` | `.github/copilot-instructions.md` |
|
|
260
|
-
| `add gemini` | `GEMINI.md` |
|
|
261
|
-
|
|
262
|
-
Running `update` refreshes managed blocks in all existing agent files.
|
|
263
|
-
|
|
264
|
-
## Shared Repos
|
|
265
|
-
|
|
266
|
-
Use `memoc work "<title>" --from-git` for meaningful work in shared repositories. It creates a new actor-scoped file under `.memoc/worklog/<actor>/YYYY-MM/`, prefills branch and changed files from git, and avoids append conflicts in shared files.
|
|
267
|
-
|
|
268
|
-
Actor detection order:
|
|
269
|
-
|
|
270
|
-
1. `MEMOC_ACTOR`
|
|
271
|
-
2. `.memoc/local/actor` from `memoc actor set <name>`
|
|
272
|
-
3. `git config user.name`
|
|
273
|
-
4. `git config user.email`
|
|
274
|
-
5. OS username
|
|
275
|
-
|
|
276
|
-
`.memoc/local/` is ignored by git so each machine can keep its own actor setting.
|
|
277
|
-
|
|
278
|
-
`activity.md`, `actors/README.md`, and `worklog/README.md` are regenerated indexes. Run `memoc activity --write` when you want to refresh them from worklog files.
|
|
279
|
-
|
|
280
|
-
`log.md` is legacy. New installs do not create it, and shared activity should live in worklog files. On upgrade, an existing `.memoc/log.md` is moved to `.memoc/raw/legacy-log.md` so old history is preserved but no longer part of the normal memory flow.
|
|
281
|
-
|
|
282
|
-
---
|
|
283
|
-
|
|
284
|
-
## Supported Stacks
|
|
285
|
-
|
|
286
|
-
Auto-detected from your project files:
|
|
287
|
-
|
|
288
|
-
Node.js · Next.js · React · Vue · Svelte · Angular · Nuxt · Astro · Express · Fastify · Hono · Electron · Tauri · TypeScript · Prisma · Drizzle · Supabase · Python · FastAPI · Django · Flask · PyTorch · Rust · Go · C++ / CMake · .NET · Java · Flutter · Unreal Engine
|
|
289
|
-
|
|
290
|
-
---
|
|
291
|
-
|
|
292
|
-
## How It Works
|
|
293
|
-
|
|
294
|
-
- **New project** — scaffolds all memory files with sensible defaults.
|
|
295
|
-
- **Existing project** — detects your stack and fills in real project info (name, scripts, config files).
|
|
296
|
-
- **Already initialized** — `init` injects the managed block without touching your existing content. `update` re-scans and refreshes project-specific sections.
|
|
297
|
-
- **Long-running projects** — use actor worklogs for history; run `compress` to trim startup memory, archive legacy logs, and refresh generated activity indexes.
|
|
298
|
-
|
|
299
|
-
---
|
|
300
|
-
|
|
1
|
+
# memoc
|
|
2
|
+
|
|
3
|
+
> AI agents forget everything when a session ends. memoc gives them a structured memory system so they can pick up exactly where they left off — without you repeating yourself.
|
|
4
|
+
|
|
5
|
+
Scaffolds a Markdown-based project memory into any codebase. Works with Claude Code, Codex, Cursor, Windsurf, GitHub Copilot, and Gemini CLI.
|
|
6
|
+
|
|
7
|
+
## Quick Start
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx @kevin0181/memoc init
|
|
11
|
+
|
|
12
|
+
# Upgrade memoc in this project without deleting existing memory
|
|
13
|
+
npx @kevin0181/memoc@latest upgrade
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Run inside your project directory. Detects your stack automatically and generates everything agents need.
|
|
17
|
+
|
|
18
|
+
`init` also creates project-local PATH helpers so agents can keep using memoc even when the global/npm bin is not on PATH.
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# PowerShell
|
|
22
|
+
. .\.memoc\env.ps1
|
|
23
|
+
|
|
24
|
+
# sh/bash
|
|
25
|
+
. ./.memoc/env.sh
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Agents are instructed to use the project-local wrapper if PATH fails:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# Windows
|
|
32
|
+
.\.memoc\bin\memoc.cmd summary
|
|
33
|
+
|
|
34
|
+
# macOS / Linux
|
|
35
|
+
.memoc/bin/memoc summary
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Ask An Agent To Install
|
|
41
|
+
|
|
42
|
+
If you are giving this repo or npm package to an AI coding agent, use a prompt like:
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
Install memoc in this project and run init.
|
|
46
|
+
Use the npm package only. Run `npx @kevin0181/memoc@latest init`
|
|
47
|
+
from this project's root. Do not clone the GitHub repository into this project.
|
|
48
|
+
If npm/npx is missing, stop and ask the user to install Node.js LTS with npm first.
|
|
49
|
+
After init, verify with the project-local wrapper:
|
|
50
|
+
Windows: .\.memoc\bin\memoc.cmd summary
|
|
51
|
+
macOS/Linux: .memoc/bin/memoc summary
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Agent install checklist:
|
|
55
|
+
|
|
56
|
+
1. Run `node --version` and `npm --version`. If either fails, ask the user to install Node.js LTS with npm first.
|
|
57
|
+
2. Run `npx @kevin0181/memoc@latest init` from the target project root.
|
|
58
|
+
3. Do not clone this GitHub repository into the target project. Do not download the repo ZIP as an installer.
|
|
59
|
+
4. `.claude/settings.json` is intentionally generated for the Claude Code Stop hook; keep or commit it only if the project wants that hook.
|
|
60
|
+
5. After init, do not depend on global PATH. Use the project-local wrapper when needed:
|
|
61
|
+
- Windows: `.\.memoc\bin\memoc.cmd <command>`
|
|
62
|
+
- macOS/Linux: `.memoc/bin/memoc <command>`
|
|
63
|
+
|
|
64
|
+
If `node --version` or `npm --version` fails, memoc cannot be installed yet. Install Node.js LTS with npm first, then repeat the steps above.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## The Problem
|
|
69
|
+
|
|
70
|
+
Every new AI session starts cold. You re-explain the project, the decisions already made, what's done and what isn't. The agent rediscovers what the last one figured out.
|
|
71
|
+
|
|
72
|
+
memoc installs a memory structure that agents read at session start, update as they work, and hand off to the next session — automatically.
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Commands
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# First-time setup — scaffold memory, detect stack, install Claude Code hook
|
|
80
|
+
npx @kevin0181/memoc init
|
|
81
|
+
|
|
82
|
+
# Re-scan project and refresh managed sections
|
|
83
|
+
npx @kevin0181/memoc update
|
|
84
|
+
|
|
85
|
+
# Shared repo activity tracking
|
|
86
|
+
npx @kevin0181/memoc actor
|
|
87
|
+
npx @kevin0181/memoc actor set neneee
|
|
88
|
+
npx @kevin0181/memoc work "Auth refresh fix" --from-git
|
|
89
|
+
npx @kevin0181/memoc activity
|
|
90
|
+
npx @kevin0181/memoc activity --write
|
|
91
|
+
npx @kevin0181/memoc doctor
|
|
92
|
+
|
|
93
|
+
# Print current status in ~10 lines
|
|
94
|
+
npx @kevin0181/memoc summary
|
|
95
|
+
|
|
96
|
+
# Search memory/agent docs first (token-efficient)
|
|
97
|
+
npx @kevin0181/memoc search "auth"
|
|
98
|
+
npx @kevin0181/memoc search "auth" --snippets --limit 5
|
|
99
|
+
|
|
100
|
+
# Search project source/text files only when memory is not enough
|
|
101
|
+
npx @kevin0181/memoc grep "GetParticles"
|
|
102
|
+
npx @kevin0181/memoc grep "GetParticles" --snippets --limit 5
|
|
103
|
+
|
|
104
|
+
# Create raw/source records and durable wiki topic notes
|
|
105
|
+
npx @kevin0181/memoc ingest path/to/source.md
|
|
106
|
+
npx @kevin0181/memoc ingest https://example.com/spec
|
|
107
|
+
npx @kevin0181/memoc note "Auth flow comparison"
|
|
108
|
+
npx @kevin0181/memoc lint-wiki
|
|
109
|
+
|
|
110
|
+
# Estimate token cost of current memory files
|
|
111
|
+
npx @kevin0181/memoc tokens
|
|
112
|
+
|
|
113
|
+
# Archive and compact an oversized startup summary
|
|
114
|
+
npx @kevin0181/memoc trim-summary
|
|
115
|
+
|
|
116
|
+
# Compact oversized memoc files and refresh generated indexes
|
|
117
|
+
npx @kevin0181/memoc compress
|
|
118
|
+
|
|
119
|
+
# Add the same protocol to another agent's entry file
|
|
120
|
+
npx @kevin0181/memoc add cursor
|
|
121
|
+
npx @kevin0181/memoc add windsurf
|
|
122
|
+
npx @kevin0181/memoc add copilot
|
|
123
|
+
npx @kevin0181/memoc add gemini
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Upgrade Existing Projects
|
|
129
|
+
|
|
130
|
+
memoc never auto-updates itself. Upgrade only when you choose to run:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
npx @kevin0181/memoc@latest upgrade
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Run it from the project root. It preserves existing project memory, including:
|
|
137
|
+
|
|
138
|
+
- `.memoc/session-summary.md`
|
|
139
|
+
- `.memoc/02-current-project-state.md` human-written sections
|
|
140
|
+
- `.memoc/03-decisions.md`
|
|
141
|
+
- `.memoc/04-handoff.md`
|
|
142
|
+
- `.memoc/06-project-rules.md`
|
|
143
|
+
- Legacy `.memoc/log.md` if present
|
|
144
|
+
- Legacy `.memoc/systems/` if present (moved to `.memoc/raw/legacy-systems/` on upgrade)
|
|
145
|
+
- `.memoc/wiki/`
|
|
146
|
+
|
|
147
|
+
It refreshes the managed blocks, project-local wrappers, runtime copy, PATH helpers, and memoc-owned protocol templates. User-owned memory files such as `session-summary.md`, `03-decisions.md`, `04-handoff.md`, `06-project-rules.md`, and wiki topic/source pages are preserved. Upgrade also runs the `trim-summary` compaction pass so startup memory stays small. If `memoc` is not on PATH after upgrading, keep using:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
# Windows
|
|
151
|
+
.\.memoc\bin\memoc.cmd summary
|
|
152
|
+
|
|
153
|
+
# macOS / Linux
|
|
154
|
+
.memoc/bin/memoc summary
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## What Gets Created
|
|
160
|
+
|
|
161
|
+
```
|
|
162
|
+
CLAUDE.md ← Claude Code entry point (auto-loaded)
|
|
163
|
+
AGENTS.md ← Codex entry point (auto-loaded)
|
|
164
|
+
llms.txt ← LLM-facing project map
|
|
165
|
+
.claude/settings.json ← Claude Code Stop hook
|
|
166
|
+
|
|
167
|
+
.memoc/
|
|
168
|
+
bin/memoc ← project-local wrapper for PATH fallback
|
|
169
|
+
env.ps1 · env.sh ← shell helpers that prepend .memoc/bin to PATH
|
|
170
|
+
session-summary.md ← Only required startup read (~150 tokens)
|
|
171
|
+
02-current-project-state.md ← Status, open tasks, commands
|
|
172
|
+
03-decisions.md ← Durable decision log
|
|
173
|
+
04-handoff.md ← Resume context, verified/unverified
|
|
174
|
+
06-project-rules.md ← User preferences
|
|
175
|
+
activity.md ← Short shared activity index
|
|
176
|
+
actors/ ← Actor profiles for shared repos
|
|
177
|
+
worklog/ ← Per-actor work records to reduce conflicts
|
|
178
|
+
raw/ ← Immutable source material, not a startup read
|
|
179
|
+
wiki/project/ ← Project implementation wiki
|
|
180
|
+
wiki/knowledge/ ← Source-backed knowledge wiki
|
|
181
|
+
|
|
182
|
+
skills/project-memory-maintainer/SKILL.md ← Wiki operations guide
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## How Agents Use It
|
|
188
|
+
|
|
189
|
+
Every entry file (`CLAUDE.md`, `AGENTS.md`, `.cursorrules`, etc.) gets the same protocol injected as a managed block:
|
|
190
|
+
|
|
191
|
+
```
|
|
192
|
+
## Session Start
|
|
193
|
+
- [ ] Read `.memoc/session-summary.md`
|
|
194
|
+
- [ ] `.pending` exists? → review changed files → update memory if needed → delete it
|
|
195
|
+
- [ ] If `memoc` is not found, use the project-local wrapper.
|
|
196
|
+
|
|
197
|
+
## Before Opening More Files
|
|
198
|
+
- [ ] Run `memoc search "<query>"` first
|
|
199
|
+
- [ ] Open on demand: `02` status · `04` resume · `06` rules · `llms.txt` map
|
|
200
|
+
- [ ] Use `memoc grep "<query>"` only when memory is not enough.
|
|
201
|
+
- [ ] For durable source/wiki work, use `memoc ingest`, `memoc note`, and `memoc lint-wiki`.
|
|
202
|
+
- [ ] In shared repos, record meaningful work with `memoc work "<title>"`.
|
|
203
|
+
- [ ] Keep output small: `summary`, `search --limit`, `search --snippets`
|
|
204
|
+
|
|
205
|
+
## Before Finishing _(update only applicable files; skip Q&A / throwaway exploration)_
|
|
206
|
+
- [ ] Code/config/deps changed → `02` (version, commands list, Last synced) + `session-summary.md` (status, changed, open tasks)
|
|
207
|
+
- [ ] Decision made → `03-decisions.md` (what & why) + `02`
|
|
208
|
+
- [ ] Work incomplete or risky → `04-handoff.md` (verified commands, unverified items, next steps)
|
|
209
|
+
- [ ] Rule/preference set → `06-project-rules.md`
|
|
210
|
+
- [ ] Wiki/project-memory work → read `skills/project-memory-maintainer/SKILL.md`
|
|
211
|
+
- [ ] Shared repo work → prefer `memoc work "<title>" --from-git`; run `memoc activity --write` only when regenerating indexes.
|
|
212
|
+
- [ ] Keep `session-summary.md` replace-only; completed work belongs in actor worklogs.
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
The checklist tells agents exactly when to update, which file to update, and what to record — so nothing gets missed.
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## Token Efficiency
|
|
220
|
+
|
|
221
|
+
Startup cost is kept minimal by design.
|
|
222
|
+
|
|
223
|
+
| What loads | Tokens |
|
|
224
|
+
|---|---|
|
|
225
|
+
| `CLAUDE.md` (managed block only) | ~280 |
|
|
226
|
+
| `session-summary.md` (only required read) | ~150 |
|
|
227
|
+
| **Total startup** | **~430** |
|
|
228
|
+
|
|
229
|
+
Everything else is on-demand. Use `memoc tokens` to see the live breakdown for your project.
|
|
230
|
+
|
|
231
|
+
`session-summary.md` is a replace-only startup snapshot, not a timeline. If it grows beyond the warning threshold, run `memoc compress` or `memoc trim-summary`; completed history belongs in `.memoc/worklog/<actor>/YYYY-MM/`, and unfinished/risky resume detail belongs in `.memoc/04-handoff.md`.
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
## Claude Code Auto-Detection
|
|
236
|
+
|
|
237
|
+
`init` installs a lightweight `Stop` hook in `.claude/settings.json`. After each Claude Code response it checks:
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
git status --porcelain
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
If uncommitted changes exist, it writes `.memoc/.pending` with a timestamp and the changed filenames. At the next session start, Claude reads `.pending` and decides whether to update memory — then deletes the file.
|
|
244
|
+
|
|
245
|
+
No extra setup. Add `.memoc/.pending` to `.gitignore` to keep it untracked.
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
## Multi-Agent Support
|
|
250
|
+
|
|
251
|
+
`init` creates `CLAUDE.md` (Claude Code) and `AGENTS.md` (Codex) by default. All agents follow the same 3-phase checklist protocol.
|
|
252
|
+
|
|
253
|
+
Add more agents on demand:
|
|
254
|
+
|
|
255
|
+
| Command | Creates |
|
|
256
|
+
|---|---|
|
|
257
|
+
| `add cursor` | `.cursorrules` |
|
|
258
|
+
| `add windsurf` | `.windsurfrules` |
|
|
259
|
+
| `add copilot` | `.github/copilot-instructions.md` |
|
|
260
|
+
| `add gemini` | `GEMINI.md` |
|
|
261
|
+
|
|
262
|
+
Running `update` refreshes managed blocks in all existing agent files.
|
|
263
|
+
|
|
264
|
+
## Shared Repos
|
|
265
|
+
|
|
266
|
+
Use `memoc work "<title>" --from-git` for meaningful work in shared repositories. It creates a new actor-scoped file under `.memoc/worklog/<actor>/YYYY-MM/`, prefills branch and changed files from git, and avoids append conflicts in shared files.
|
|
267
|
+
|
|
268
|
+
Actor detection order:
|
|
269
|
+
|
|
270
|
+
1. `MEMOC_ACTOR`
|
|
271
|
+
2. `.memoc/local/actor` from `memoc actor set <name>`
|
|
272
|
+
3. `git config user.name`
|
|
273
|
+
4. `git config user.email`
|
|
274
|
+
5. OS username
|
|
275
|
+
|
|
276
|
+
`.memoc/local/` is ignored by git so each machine can keep its own actor setting.
|
|
277
|
+
|
|
278
|
+
`activity.md`, `actors/README.md`, and `worklog/README.md` are regenerated indexes. Run `memoc activity --write` when you want to refresh them from worklog files.
|
|
279
|
+
|
|
280
|
+
`log.md` is legacy. New installs do not create it, and shared activity should live in worklog files. On upgrade, an existing `.memoc/log.md` is moved to `.memoc/raw/legacy-log.md` so old history is preserved but no longer part of the normal memory flow.
|
|
281
|
+
|
|
282
|
+
---
|
|
283
|
+
|
|
284
|
+
## Supported Stacks
|
|
285
|
+
|
|
286
|
+
Auto-detected from your project files:
|
|
287
|
+
|
|
288
|
+
Node.js · Next.js · React · Vue · Svelte · Angular · Nuxt · Astro · Express · Fastify · Hono · Electron · Tauri · TypeScript · Prisma · Drizzle · Supabase · Python · FastAPI · Django · Flask · PyTorch · Rust · Go · C++ / CMake · .NET · Java · Flutter · Unreal Engine
|
|
289
|
+
|
|
290
|
+
---
|
|
291
|
+
|
|
292
|
+
## How It Works
|
|
293
|
+
|
|
294
|
+
- **New project** — scaffolds all memory files with sensible defaults.
|
|
295
|
+
- **Existing project** — detects your stack and fills in real project info (name, scripts, config files).
|
|
296
|
+
- **Already initialized** — `init` injects the managed block without touching your existing content. `update` re-scans and refreshes project-specific sections.
|
|
297
|
+
- **Long-running projects** — use actor worklogs for history; run `compress` to trim startup memory, archive legacy logs, and refresh generated activity indexes.
|
|
298
|
+
|
|
299
|
+
---
|
|
300
|
+
|
|
301
301
|
## Skills Plugin (Claude Code, Codex Desktop, and Skills-Compatible Agents)
|
|
302
302
|
|
|
303
303
|
Install the memoc plugin once to get `/memoc-*` slash commands in Claude Code, Codex Desktop, and agents that read the common Skills location:
|
|
304
|
-
|
|
305
|
-
```bash
|
|
306
|
-
# Install memoc globally (if not already)
|
|
307
|
-
npm install -g @kevin0181/memoc
|
|
308
|
-
|
|
304
|
+
|
|
305
|
+
```bash
|
|
306
|
+
# Install memoc globally (if not already)
|
|
307
|
+
npm install -g @kevin0181/memoc
|
|
308
|
+
|
|
309
309
|
# Register the plugin and global skills (run once)
|
|
310
310
|
memoc install-plugin
|
|
311
311
|
|
|
312
312
|
# Then restart open agent apps
|
|
313
|
-
```
|
|
314
|
-
|
|
315
|
-
Or via npx (no global install needed):
|
|
316
|
-
|
|
317
|
-
```bash
|
|
318
|
-
npx @kevin0181/memoc install-plugin
|
|
319
|
-
```
|
|
320
|
-
|
|
321
|
-
To remove:
|
|
322
|
-
|
|
323
|
-
```bash
|
|
324
|
-
memoc uninstall-plugin
|
|
325
|
-
```
|
|
326
|
-
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
Or via npx (no global install needed):
|
|
316
|
+
|
|
317
|
+
```bash
|
|
318
|
+
npx @kevin0181/memoc install-plugin
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
To remove:
|
|
322
|
+
|
|
323
|
+
```bash
|
|
324
|
+
memoc uninstall-plugin
|
|
325
|
+
```
|
|
326
|
+
|
|
327
327
|
`install-plugin` writes the Claude Code plugin to `~/.claude/plugins/cache/memoc/`, enables `"memoc@memoc"` in `~/.claude/settings.json`, and installs global Skills entries under `~/.agents/skills/` for Codex Desktop and other skills-compatible agents. It is idempotent — safe to re-run after upgrading memoc.
|
|
328
|
-
|
|
329
|
-
### Available skills
|
|
330
|
-
|
|
331
|
-
| Skill | What it does |
|
|
332
|
-
|-------|-------------|
|
|
328
|
+
|
|
329
|
+
### Available skills
|
|
330
|
+
|
|
331
|
+
| Skill | What it does |
|
|
332
|
+
|-------|-------------|
|
|
333
333
|
| `/memoc` | Follow the full memoc memory operating protocol |
|
|
334
334
|
| `/memoc-init` | Initialize memoc in the current project |
|
|
335
335
|
| `/memoc-upgrade` | Upgrade memoc, preserve memory |
|
|
@@ -345,9 +345,9 @@ memoc uninstall-plugin
|
|
|
345
345
|
| `/memoc-goal` | Define success criteria and verify with tests/repros |
|
|
346
346
|
|
|
347
347
|
The `/memoc-code` family is adapted from [`multica-ai/andrej-karpathy-skills`](https://github.com/multica-ai/andrej-karpathy-skills), MIT licensed, with short memoc names for coding workflows.
|
|
348
|
-
|
|
349
|
-
---
|
|
350
|
-
|
|
351
|
-
## License
|
|
352
|
-
|
|
353
|
-
MIT
|
|
348
|
+
|
|
349
|
+
---
|
|
350
|
+
|
|
351
|
+
## License
|
|
352
|
+
|
|
353
|
+
MIT
|
package/bin/cli.js
CHANGED
|
@@ -3826,13 +3826,61 @@ function runInstallPlugin() {
|
|
|
3826
3826
|
process.exit(1);
|
|
3827
3827
|
}
|
|
3828
3828
|
|
|
3829
|
-
const claudeDir = process.env.CLAUDE_CONFIG_DIR || path.join(os.homedir(), '.claude');
|
|
3830
|
-
const cacheDir = path.join(claudeDir, 'plugins', 'cache', 'memoc', 'memoc', VERSION);
|
|
3831
|
-
const
|
|
3832
|
-
const
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3829
|
+
const claudeDir = process.env.CLAUDE_CONFIG_DIR || path.join(os.homedir(), '.claude');
|
|
3830
|
+
const cacheDir = path.join(claudeDir, 'plugins', 'cache', 'memoc', 'memoc', VERSION);
|
|
3831
|
+
const marketplaceDir = path.join(claudeDir, 'plugins', 'marketplaces', 'memoc');
|
|
3832
|
+
const marketplacePluginDir = path.join(marketplaceDir, 'plugins', 'memoc');
|
|
3833
|
+
const claudeMarketplacePath = path.join(marketplaceDir, '.claude-plugin', 'marketplace.json');
|
|
3834
|
+
const agentsMarketplacePath = path.join(marketplaceDir, '.agents', 'plugins', 'marketplace.json');
|
|
3835
|
+
const installedPath = path.join(claudeDir, 'plugins', 'installed_plugins.json');
|
|
3836
|
+
const settingsPath = path.join(claudeDir, 'settings.json');
|
|
3837
|
+
|
|
3838
|
+
// copy plugin files to Claude's cache and local marketplace registry
|
|
3839
|
+
copyDirSync(pluginSrc, cacheDir);
|
|
3840
|
+
copyDirSync(pluginSrc, marketplacePluginDir);
|
|
3841
|
+
const claudeMarketplace = {
|
|
3842
|
+
$schema: 'https://anthropic.com/claude-code/marketplace.schema.json',
|
|
3843
|
+
name: 'memoc',
|
|
3844
|
+
description: 'memoc skills and plugin installer for Claude Code, Codex, and skills-compatible coding agents.',
|
|
3845
|
+
owner: {
|
|
3846
|
+
name: 'kevin0181',
|
|
3847
|
+
},
|
|
3848
|
+
plugins: [{
|
|
3849
|
+
name: 'memoc',
|
|
3850
|
+
description: 'Session-to-session memory and coding guardrail skills for AI coding agents.',
|
|
3851
|
+
author: {
|
|
3852
|
+
name: 'kevin0181',
|
|
3853
|
+
},
|
|
3854
|
+
source: './plugins/memoc',
|
|
3855
|
+
category: 'productivity',
|
|
3856
|
+
homepage: 'https://github.com/neneee0181/memoc',
|
|
3857
|
+
}],
|
|
3858
|
+
};
|
|
3859
|
+
const agentsMarketplace = {
|
|
3860
|
+
name: 'memoc',
|
|
3861
|
+
interface: {
|
|
3862
|
+
displayName: 'memoc',
|
|
3863
|
+
},
|
|
3864
|
+
plugins: [{
|
|
3865
|
+
name: 'memoc',
|
|
3866
|
+
source: {
|
|
3867
|
+
source: 'local',
|
|
3868
|
+
path: './plugins/memoc',
|
|
3869
|
+
},
|
|
3870
|
+
policy: {
|
|
3871
|
+
installation: 'AVAILABLE',
|
|
3872
|
+
authentication: 'ON_INSTALL',
|
|
3873
|
+
},
|
|
3874
|
+
category: 'Productivity',
|
|
3875
|
+
}],
|
|
3876
|
+
};
|
|
3877
|
+
for (const [marketplacePath, marketplace] of [
|
|
3878
|
+
[claudeMarketplacePath, claudeMarketplace],
|
|
3879
|
+
[agentsMarketplacePath, agentsMarketplace],
|
|
3880
|
+
]) {
|
|
3881
|
+
fs.mkdirSync(path.dirname(marketplacePath), { recursive: true });
|
|
3882
|
+
fs.writeFileSync(marketplacePath, JSON.stringify(marketplace, null, 2) + '\n');
|
|
3883
|
+
}
|
|
3836
3884
|
|
|
3837
3885
|
// update installed_plugins.json
|
|
3838
3886
|
const installed = readJsonLoose(installedPath) || {};
|
|
@@ -3850,12 +3898,19 @@ function runInstallPlugin() {
|
|
|
3850
3898
|
fs.mkdirSync(path.dirname(installedPath), { recursive: true });
|
|
3851
3899
|
fs.writeFileSync(installedPath, JSON.stringify(installed, null, 2) + '\n');
|
|
3852
3900
|
|
|
3853
|
-
// update settings.json
|
|
3854
|
-
const settings = readJsonLoose(settingsPath) || {};
|
|
3855
|
-
settings.enabledPlugins = settings.enabledPlugins || {};
|
|
3856
|
-
settings.enabledPlugins[PLUGIN_KEY] = true;
|
|
3857
|
-
|
|
3858
|
-
|
|
3901
|
+
// update settings.json
|
|
3902
|
+
const settings = readJsonLoose(settingsPath) || {};
|
|
3903
|
+
settings.enabledPlugins = settings.enabledPlugins || {};
|
|
3904
|
+
settings.enabledPlugins[PLUGIN_KEY] = true;
|
|
3905
|
+
settings.extraKnownMarketplaces = settings.extraKnownMarketplaces || {};
|
|
3906
|
+
settings.extraKnownMarketplaces.memoc = {
|
|
3907
|
+
source: {
|
|
3908
|
+
source: 'directory',
|
|
3909
|
+
path: marketplaceDir,
|
|
3910
|
+
},
|
|
3911
|
+
};
|
|
3912
|
+
fs.mkdirSync(path.dirname(settingsPath), { recursive: true });
|
|
3913
|
+
try { fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + '\n', { mode: 0o600 }); }
|
|
3859
3914
|
catch { fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + '\n'); }
|
|
3860
3915
|
|
|
3861
3916
|
const SKILL_NAMES = [
|
|
@@ -3903,7 +3958,7 @@ function runInstallPlugin() {
|
|
|
3903
3958
|
}
|
|
3904
3959
|
|
|
3905
3960
|
console.log('\n memoc plugin installed\n');
|
|
3906
|
-
console.log(' Claude Code ~/.claude/plugins/cache/memoc/');
|
|
3961
|
+
console.log(' Claude Code ~/.claude/plugins/cache/memoc/ + ~/.claude/plugins/marketplaces/memoc/');
|
|
3907
3962
|
console.log(' Codex Desktop ~/.agents/skills/');
|
|
3908
3963
|
console.log(' Skills spec ~/.agents/skills/ (Cursor, Windsurf, and other supported agents)');
|
|
3909
3964
|
console.log('\n Skills:');
|
|
@@ -3923,12 +3978,14 @@ function runUninstallPlugin() {
|
|
|
3923
3978
|
];
|
|
3924
3979
|
|
|
3925
3980
|
const claudeDir = process.env.CLAUDE_CONFIG_DIR || path.join(os.homedir(), '.claude');
|
|
3926
|
-
const cacheBase = path.join(claudeDir, 'plugins', 'cache', 'memoc');
|
|
3927
|
-
const
|
|
3981
|
+
const cacheBase = path.join(claudeDir, 'plugins', 'cache', 'memoc');
|
|
3982
|
+
const marketplaceBase = path.join(claudeDir, 'plugins', 'marketplaces', 'memoc');
|
|
3983
|
+
const installedPath = path.join(claudeDir, 'plugins', 'installed_plugins.json');
|
|
3928
3984
|
const settingsPath = path.join(claudeDir, 'settings.json');
|
|
3929
3985
|
|
|
3930
|
-
// remove Claude Code cache
|
|
3931
|
-
if (fs.existsSync(cacheBase)) fs.rmSync(cacheBase, { recursive: true, force: true });
|
|
3986
|
+
// remove Claude Code cache
|
|
3987
|
+
if (fs.existsSync(cacheBase)) fs.rmSync(cacheBase, { recursive: true, force: true });
|
|
3988
|
+
if (fs.existsSync(marketplaceBase)) fs.rmSync(marketplaceBase, { recursive: true, force: true });
|
|
3932
3989
|
|
|
3933
3990
|
// remove from installed_plugins.json
|
|
3934
3991
|
const installed = readJsonLoose(installedPath);
|
|
@@ -3952,9 +4009,10 @@ function runUninstallPlugin() {
|
|
|
3952
4009
|
|
|
3953
4010
|
// remove from settings.json
|
|
3954
4011
|
const settings = readJsonLoose(settingsPath);
|
|
3955
|
-
if (settings && settings.enabledPlugins) {
|
|
3956
|
-
delete settings.enabledPlugins[PLUGIN_KEY];
|
|
3957
|
-
|
|
4012
|
+
if (settings && settings.enabledPlugins) {
|
|
4013
|
+
delete settings.enabledPlugins[PLUGIN_KEY];
|
|
4014
|
+
if (settings.extraKnownMarketplaces) delete settings.extraKnownMarketplaces.memoc;
|
|
4015
|
+
try { fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + '\n', { mode: 0o600 }); }
|
|
3958
4016
|
catch { fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + '\n'); }
|
|
3959
4017
|
}
|
|
3960
4018
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kevin0181/memoc",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.10",
|
|
4
4
|
"description": "Give AI agents a memory. Scaffolds session-to-session context for Claude Code, Codex, Cursor, and more.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"files": [
|
|
32
32
|
"bin/",
|
|
33
33
|
"plugins/",
|
|
34
|
-
"skills/"
|
|
34
|
+
"skills/memoc*/"
|
|
35
35
|
],
|
|
36
36
|
"engines": {
|
|
37
37
|
"node": ">=16"
|
package/skills/memoc/SKILL.md
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: memoc
|
|
3
|
-
description: >
|
|
4
|
-
Follow the full memoc operating protocol for a project: read memory first,
|
|
5
|
-
preserve durable context, use the project-local memoc runtime when available,
|
|
6
|
-
and record important work before handoff. Trigger: /memoc, "use memoc",
|
|
7
|
-
"follow memoc memory", "resume with memoc".
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
Use this skill as the default operating mode for a repository that has, or should have, memoc memory.
|
|
11
|
-
|
|
12
|
-
## Operating protocol
|
|
13
|
-
|
|
14
|
-
1. Start by checking whether memoc is installed in the current project.
|
|
15
|
-
- Prefer `.memoc/` plus project-local launchers.
|
|
16
|
-
- If absent and the user wants memory set up, run `/memoc-init` or `memoc init`.
|
|
17
|
-
|
|
18
|
-
2. Read memory before acting.
|
|
19
|
-
- First run `memoc summary` when available.
|
|
20
|
-
- Then open only the memory files that are relevant to the task, such as `.memoc/session-summary.md`, `.memoc/02-current-project-state.md`, `.memoc/04-handoff.md`, `.memoc/wiki/`, or worklog entries.
|
|
21
|
-
|
|
22
|
-
3. Keep memory durable and concise.
|
|
23
|
-
- Record decisions, user preferences, active constraints, and handoff notes.
|
|
24
|
-
- Do not store transient command output, obvious code facts, secrets, credentials, or noisy chat history.
|
|
25
|
-
- Prefer wiki notes for reusable knowledge and worklog entries for session activity.
|
|
26
|
-
|
|
27
|
-
4. Use the right memoc command when useful.
|
|
28
|
-
- `memoc search "<query>"` before broad filesystem search when looking for prior context.
|
|
29
|
-
- `memoc work "<title>"` after meaningful work so future agents know what changed.
|
|
30
|
-
- `memoc note "<title>"` for durable knowledge that should survive sessions.
|
|
31
|
-
- `memoc doctor` when memory looks stale, malformed, too large, or inconsistent.
|
|
32
|
-
- `memoc compress` when memory is noisy or oversized.
|
|
33
|
-
- `memoc upgrade` after updating memoc itself or when runtime/wrapper files are stale.
|
|
34
|
-
|
|
35
|
-
5. Preserve user work.
|
|
36
|
-
- Treat memory files as collaborative project state.
|
|
37
|
-
- Do not overwrite user-authored notes unless the command is designed to preserve and merge them.
|
|
38
|
-
- Before final handoff, mention any memory updates made and any remaining health issues.
|
|
39
|
-
|
|
40
|
-
## Binary resolution (all skills use this order)
|
|
41
|
-
|
|
42
|
-
1. Windows: `.\.memoc\bin\memoc.cmd`
|
|
43
|
-
2. macOS/Linux: `.memoc/bin/memoc`
|
|
44
|
-
3. Fallback: `npx @kevin0181/memoc@latest`
|
|
45
|
-
|
|
46
|
-
## Related focused skills
|
|
47
|
-
|
|
48
|
-
- `/memoc-init` initializes memoc in the current project.
|
|
49
|
-
- `/memoc-upgrade` refreshes runtime files while preserving memory.
|
|
50
|
-
- `/memoc-search` searches memory and agent docs.
|
|
51
|
-
- `/memoc-work` records session activity.
|
|
52
|
-
- `/memoc-note` saves durable knowledge.
|
|
53
|
-
- `/memoc-doctor` checks memory health.
|
|
54
|
-
- `/memoc-compress` compacts noisy memory.
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: memoc-code
|
|
3
|
-
description: >
|
|
4
|
-
Coding guardrails adapted from multica-ai/andrej-karpathy-skills. Use when
|
|
5
|
-
writing, fixing, reviewing, or refactoring code: think before coding, keep the
|
|
6
|
-
solution simple, edit surgically, and verify against concrete success criteria.
|
|
7
|
-
Trigger: /memoc-code, "use memoc coding guardrails", "code carefully".
|
|
8
|
-
license: MIT
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
Use this skill to reduce common AI coding mistakes: guessing, overbuilding,
|
|
12
|
-
unrelated edits, and stopping before the result is verified.
|
|
13
|
-
|
|
14
|
-
Source inspiration: `multica-ai/andrej-karpathy-skills`, MIT.
|
|
15
|
-
|
|
16
|
-
## Protocol
|
|
17
|
-
|
|
18
|
-
1. Think before coding.
|
|
19
|
-
- State assumptions when the request is ambiguous.
|
|
20
|
-
- Ask when uncertainty would change the implementation.
|
|
21
|
-
- Surface tradeoffs instead of silently choosing.
|
|
22
|
-
|
|
23
|
-
2. Keep it simple.
|
|
24
|
-
- Build only what was requested.
|
|
25
|
-
- Avoid speculative configuration, future-proofing, and one-use abstractions.
|
|
26
|
-
- If the solution feels large for the problem, reduce it.
|
|
27
|
-
|
|
28
|
-
3. Edit surgically.
|
|
29
|
-
- Touch only files and lines needed for the task.
|
|
30
|
-
- Match the local style.
|
|
31
|
-
- Do not clean up unrelated code; mention it separately.
|
|
32
|
-
- Remove only dead code created by your own changes.
|
|
33
|
-
|
|
34
|
-
4. Make success verifiable.
|
|
35
|
-
- Turn the request into observable checks.
|
|
36
|
-
- For bugs, prefer a reproducing test or concrete repro before the fix.
|
|
37
|
-
- For refactors, verify behavior before and after.
|
|
38
|
-
- Keep looping until the check passes or the blocker is clear.
|
|
39
|
-
|
|
40
|
-
## Shortcuts
|
|
41
|
-
|
|
42
|
-
- `/memoc-think` for ambiguity, assumptions, and tradeoffs.
|
|
43
|
-
- `/memoc-simple` for reducing overbuilt designs.
|
|
44
|
-
- `/memoc-scope` for tight, minimal diffs.
|
|
45
|
-
- `/memoc-goal` for tests, repros, and verification loops.
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: memoc-compress
|
|
3
|
-
description: >
|
|
4
|
-
Compact memoc memory files and refresh generated indexes. Removes redundancy,
|
|
5
|
-
trims verbose entries, rebuilds activity and wiki indexes.
|
|
6
|
-
Trigger: /memoc-compress, "compress memoc", "compact memory", "clean up memoc files",
|
|
7
|
-
"memoc files too big".
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
Run `memoc compress` in the current working directory.
|
|
11
|
-
|
|
12
|
-
## Steps
|
|
13
|
-
|
|
14
|
-
1. **Find binary** (priority order):
|
|
15
|
-
- Windows: `.\.memoc\bin\memoc.cmd compress`
|
|
16
|
-
- macOS/Linux: `.memoc/bin/memoc compress`
|
|
17
|
-
- Fallback: `npx @kevin0181/memoc@latest compress`
|
|
18
|
-
|
|
19
|
-
2. **Run compress** and capture output.
|
|
20
|
-
|
|
21
|
-
3. **Report**:
|
|
22
|
-
- Which files were compacted
|
|
23
|
-
- Token/size reduction achieved (if reported)
|
|
24
|
-
- Any indexes rebuilt
|
|
25
|
-
|
|
26
|
-
## When to use
|
|
27
|
-
|
|
28
|
-
- `memoc tokens` shows large files (⚠ warnings)
|
|
29
|
-
- After extended sessions with many entries
|
|
30
|
-
- Before important commits to keep memory lean
|
|
31
|
-
- session-summary.md exceeds ~800B
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: memoc-doctor
|
|
3
|
-
description: >
|
|
4
|
-
Check common memoc health issues: broken links, missing files, malformed frontmatter,
|
|
5
|
-
oversized summaries, stale content. Diagnose and suggest fixes.
|
|
6
|
-
Trigger: /memoc-doctor, "memoc health check", "check memoc", "diagnose memoc",
|
|
7
|
-
"is memoc healthy", "memoc issues".
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
Run `memoc doctor` in the current working directory.
|
|
11
|
-
|
|
12
|
-
## Steps
|
|
13
|
-
|
|
14
|
-
1. **Find binary** (priority order):
|
|
15
|
-
- Windows: `.\.memoc\bin\memoc.cmd doctor`
|
|
16
|
-
- macOS/Linux: `.memoc/bin/memoc doctor`
|
|
17
|
-
- Fallback: `npx @kevin0181/memoc@latest doctor`
|
|
18
|
-
|
|
19
|
-
2. **Display output** verbatim.
|
|
20
|
-
|
|
21
|
-
3. **For each issue found**, offer to fix it:
|
|
22
|
-
- Oversized summary → `/memoc-trim`
|
|
23
|
-
- Broken wiki links → `/memoc-lint`
|
|
24
|
-
- Large files → `/memoc-compress`
|
|
25
|
-
- Missing wrapper → run `memoc upgrade`
|
|
26
|
-
|
|
27
|
-
4. **If no issues**: confirm memoc is healthy.
|
|
28
|
-
|
|
29
|
-
## What doctor checks
|
|
30
|
-
|
|
31
|
-
- `.memoc/` directory exists and is valid
|
|
32
|
-
- session-summary.md size is within budget
|
|
33
|
-
- Agent entry files (CLAUDE.md etc.) are present
|
|
34
|
-
- Project-local wrapper scripts are functional
|
|
35
|
-
- Frontmatter validity on memory files
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: memoc-goal
|
|
3
|
-
description: >
|
|
4
|
-
Goal-driven execution for coding tasks. Use when work needs clear success
|
|
5
|
-
criteria, tests, reproduction steps, or a verification loop. Trigger:
|
|
6
|
-
/memoc-goal.
|
|
7
|
-
license: MIT
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
Source inspiration: `multica-ai/andrej-karpathy-skills`, MIT.
|
|
11
|
-
|
|
12
|
-
Turn the task into a verifiable goal:
|
|
13
|
-
|
|
14
|
-
- Define what success looks like before making broad edits.
|
|
15
|
-
- For a bug, create or describe the failing repro first, then fix it.
|
|
16
|
-
- For validation, test invalid and valid inputs.
|
|
17
|
-
- For refactors, verify behavior before and after.
|
|
18
|
-
- For multi-step work, pair each step with a check.
|
|
19
|
-
- Keep iterating until checks pass, or report the exact blocker.
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: memoc-init
|
|
3
|
-
description: >
|
|
4
|
-
Initialize memoc in the current project. Scaffolds agent memory files, detects stack,
|
|
5
|
-
generates CLAUDE.md/AGENTS.md and .memoc/ directory.
|
|
6
|
-
Trigger: /memoc-init, "initialize memoc", "setup memoc memory", "scaffold memoc",
|
|
7
|
-
"install memoc in this project".
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
Run `memoc init` in the current working directory.
|
|
11
|
-
|
|
12
|
-
## Steps
|
|
13
|
-
|
|
14
|
-
1. **Find binary** (priority order):
|
|
15
|
-
- Windows: `.\.memoc\bin\memoc.cmd init`
|
|
16
|
-
- macOS/Linux: `.memoc/bin/memoc init`
|
|
17
|
-
- Fallback: `npx @kevin0181/memoc@latest init`
|
|
18
|
-
|
|
19
|
-
2. **Run init** and capture output.
|
|
20
|
-
|
|
21
|
-
3. **Report** what was created:
|
|
22
|
-
- Which agent entry files were generated (CLAUDE.md, AGENTS.md, GEMINI.md, etc.)
|
|
23
|
-
- Whether `.memoc/` directory was created or updated
|
|
24
|
-
- Any stack detection results
|
|
25
|
-
|
|
26
|
-
4. **If already initialized**: init auto-updates managed sections. Report what changed.
|
|
27
|
-
|
|
28
|
-
5. **If Node.js missing**: stop and tell user to install Node.js LTS with npm first.
|
|
29
|
-
|
|
30
|
-
## After init
|
|
31
|
-
|
|
32
|
-
Remind user to source the PATH helper so the project-local wrapper is available:
|
|
33
|
-
- PowerShell: `. .\.memoc\env.ps1`
|
|
34
|
-
- bash/zsh: `. .memoc/env.sh`
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: memoc-note
|
|
3
|
-
description: >
|
|
4
|
-
Save a durable topic/query-result scaffold for knowledge that should persist across sessions.
|
|
5
|
-
Creates a structured note in the memoc wiki for later reference by agents.
|
|
6
|
-
Trigger: /memoc-note, "save a note", "create memoc note", "remember this topic",
|
|
7
|
-
"add to knowledge base", "save research result".
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
Run `memoc note "<title>"` in the current working directory.
|
|
11
|
-
|
|
12
|
-
## Steps
|
|
13
|
-
|
|
14
|
-
1. **Get title** from user's message or args. If not provided, ask: "Topic or title for this note?"
|
|
15
|
-
|
|
16
|
-
2. **Find binary** (priority order):
|
|
17
|
-
- Windows: `.\.memoc\bin\memoc.cmd note "<title>"`
|
|
18
|
-
- macOS/Linux: `.memoc/bin/memoc note "<title>"`
|
|
19
|
-
- Fallback: `npx @kevin0181/memoc@latest note "<title>"`
|
|
20
|
-
|
|
21
|
-
3. **Run command** and report the created file path.
|
|
22
|
-
|
|
23
|
-
4. **Help populate** the note with content from the current conversation if relevant:
|
|
24
|
-
- Key findings or decisions
|
|
25
|
-
- Code patterns or solutions
|
|
26
|
-
- External references
|
|
27
|
-
- Related topics
|
|
28
|
-
|
|
29
|
-
## Use cases
|
|
30
|
-
|
|
31
|
-
- Saving research findings for future sessions
|
|
32
|
-
- Documenting architectural decisions not obvious from code
|
|
33
|
-
- Recording API quirks, gotchas, or workarounds
|
|
34
|
-
- Building a queryable knowledge base with `memoc search`
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: memoc-scope
|
|
3
|
-
description: >
|
|
4
|
-
Surgical-change discipline. Use when editing an existing codebase and the
|
|
5
|
-
important thing is to avoid drive-by refactors, unrelated formatting churn, or
|
|
6
|
-
accidental behavior changes. Trigger: /memoc-scope.
|
|
7
|
-
license: MIT
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
Source inspiration: `multica-ai/andrej-karpathy-skills`, MIT.
|
|
11
|
-
|
|
12
|
-
Keep the diff tight:
|
|
13
|
-
|
|
14
|
-
- Touch only what the user request requires.
|
|
15
|
-
- Match existing style even when you would design it differently.
|
|
16
|
-
- Do not rewrite adjacent comments, formatting, or APIs for taste.
|
|
17
|
-
- Do not delete unrelated dead code; mention it separately.
|
|
18
|
-
- Remove imports, variables, and helpers only when your own change made them unused.
|
|
19
|
-
- Every changed line should trace back to the requested outcome.
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: memoc-search
|
|
3
|
-
description: >
|
|
4
|
-
Search memory files and agent docs for a query. Finds relevant notes, decisions,
|
|
5
|
-
worklogs, and wiki entries. Supports --snippets for line-level matches.
|
|
6
|
-
Trigger: /memoc-search, "search memoc", "search memory", "find in notes",
|
|
7
|
-
"search agent docs", "look up in memory".
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
Run `memoc search "<query>"` in the current working directory.
|
|
11
|
-
|
|
12
|
-
## Steps
|
|
13
|
-
|
|
14
|
-
1. **Get query** from user's message or args. Required — if not provided, ask.
|
|
15
|
-
|
|
16
|
-
2. **Choose mode**:
|
|
17
|
-
- Default: file names with match counts sorted by relevance + recency
|
|
18
|
-
- With `--snippets` flag: show matching lines with context
|
|
19
|
-
|
|
20
|
-
3. **Find binary** (priority order):
|
|
21
|
-
- Windows: `.\.memoc\bin\memoc.cmd search "<query>" [flags]`
|
|
22
|
-
- macOS/Linux: `.memoc/bin/memoc search "<query>" [flags]`
|
|
23
|
-
- Fallback: `npx @kevin0181/memoc@latest search "<query>" [flags]`
|
|
24
|
-
|
|
25
|
-
4. **Display results** and offer to open the most relevant file.
|
|
26
|
-
|
|
27
|
-
## Flags
|
|
28
|
-
|
|
29
|
-
| Flag | Effect |
|
|
30
|
-
|------|--------|
|
|
31
|
-
| `--snippets` | Show matching lines instead of file list |
|
|
32
|
-
| `--limit N` | Limit results (default 12) |
|
|
33
|
-
| `--all` | Show all matches without limit |
|
|
34
|
-
|
|
35
|
-
## Scope
|
|
36
|
-
|
|
37
|
-
Searches `.memoc/` directory and agent entry files (CLAUDE.md, AGENTS.md, etc.).
|
|
38
|
-
For project source files, use `/memoc-grep` instead.
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: memoc-simple
|
|
3
|
-
description: >
|
|
4
|
-
Simplicity-first coding. Use when implementing a feature or fix that risks
|
|
5
|
-
overengineering, speculative abstraction, or unnecessary configurability.
|
|
6
|
-
Trigger: /memoc-simple.
|
|
7
|
-
license: MIT
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
Source inspiration: `multica-ai/andrej-karpathy-skills`, MIT.
|
|
11
|
-
|
|
12
|
-
Prefer the smallest solution that genuinely solves the request:
|
|
13
|
-
|
|
14
|
-
- Do not add features the user did not ask for.
|
|
15
|
-
- Do not add abstractions for single-use code.
|
|
16
|
-
- Do not add flexibility or configuration just in case.
|
|
17
|
-
- Do not add error handling for impossible or irrelevant cases.
|
|
18
|
-
- If the implementation feels too large, simplify before continuing.
|
|
19
|
-
- Use existing local patterns before introducing new ones.
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: memoc-think
|
|
3
|
-
description: >
|
|
4
|
-
Think before coding. Use when a coding task has ambiguity, hidden assumptions,
|
|
5
|
-
multiple possible interpretations, or tradeoffs that should be surfaced before
|
|
6
|
-
editing. Trigger: /memoc-think.
|
|
7
|
-
license: MIT
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
Source inspiration: `multica-ai/andrej-karpathy-skills`, MIT.
|
|
11
|
-
|
|
12
|
-
Before implementing:
|
|
13
|
-
|
|
14
|
-
- Name the assumptions you are making.
|
|
15
|
-
- If two interpretations are plausible, present them instead of silently choosing.
|
|
16
|
-
- Ask a concise question when the answer would materially change the code.
|
|
17
|
-
- Push back when a simpler or safer approach fits the request better.
|
|
18
|
-
- Stop and clarify when you are confused; do not code through confusion.
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: memoc-upgrade
|
|
3
|
-
description: >
|
|
4
|
-
Upgrade memoc runtime and wrappers in the current project without deleting existing memory.
|
|
5
|
-
Refreshes managed sections based on current project state.
|
|
6
|
-
Trigger: /memoc-upgrade, "upgrade memoc", "update memoc", "refresh memoc runtime".
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
Run `memoc upgrade` in the current working directory.
|
|
10
|
-
|
|
11
|
-
## Steps
|
|
12
|
-
|
|
13
|
-
1. **Find binary** (priority order):
|
|
14
|
-
- Windows: `.\.memoc\bin\memoc.cmd upgrade`
|
|
15
|
-
- macOS/Linux: `.memoc/bin/memoc upgrade`
|
|
16
|
-
- Fallback: `npx @kevin0181/memoc@latest upgrade`
|
|
17
|
-
|
|
18
|
-
2. **Run upgrade** and capture output.
|
|
19
|
-
|
|
20
|
-
3. **Report**:
|
|
21
|
-
- Which files were refreshed vs preserved
|
|
22
|
-
- New memoc version vs previous version (if shown)
|
|
23
|
-
- Any managed sections that were updated
|
|
24
|
-
|
|
25
|
-
## Key behavior
|
|
26
|
-
|
|
27
|
-
Upgrade preserves all manually-written memory content. Only memoc-managed sections (marked with `<!-- memoc:managed -->` or equivalent) are updated. User-written content is never overwritten.
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: memoc-work
|
|
3
|
-
description: >
|
|
4
|
-
Create a conflict-light actor worklog entry for the current work session.
|
|
5
|
-
Records what was done, by whom, and when — for shared repos with multiple actors.
|
|
6
|
-
Trigger: /memoc-work, "log work", "create worklog", "record what I did",
|
|
7
|
-
"add work entry", "memoc log session".
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
Run `memoc work "<title>"` in the current working directory.
|
|
11
|
-
|
|
12
|
-
## Steps
|
|
13
|
-
|
|
14
|
-
1. **Get title** from user's message or args. If not provided, ask: "Brief title for this work entry?"
|
|
15
|
-
|
|
16
|
-
2. **Find binary** (priority order):
|
|
17
|
-
- Windows: `.\.memoc\bin\memoc.cmd work "<title>"`
|
|
18
|
-
- macOS/Linux: `.memoc/bin/memoc work "<title>"`
|
|
19
|
-
- Fallback: `npx @kevin0181/memoc@latest work "<title>"`
|
|
20
|
-
|
|
21
|
-
3. **Run command** and report the created file path.
|
|
22
|
-
|
|
23
|
-
4. **Open the file** and help user fill in the work details:
|
|
24
|
-
- What was done
|
|
25
|
-
- Files changed
|
|
26
|
-
- Decisions made
|
|
27
|
-
- Next steps
|
|
28
|
-
|
|
29
|
-
## Entry format
|
|
30
|
-
|
|
31
|
-
Worklog entries are Markdown scaffolds stored per-actor to avoid merge conflicts in shared repos. Each entry is timestamped and attributed to the current actor (`memoc actor` to check/set).
|