@kevin0181/memoc 1.4.5 → 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 +116 -40
- 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/bin/cli.js
CHANGED
|
@@ -707,27 +707,45 @@ function ensureCurrentPathLauncher(mark) {
|
|
|
707
707
|
return true;
|
|
708
708
|
}
|
|
709
709
|
|
|
710
|
-
function ensureRuntimeInstall(mark) {
|
|
711
|
-
const runtimeDir = defaultRuntimeDir();
|
|
712
|
-
const sourceRoot = path.join(__dirname, '..');
|
|
713
|
-
const files = [
|
|
714
|
-
[path.join(sourceRoot, 'bin', 'cli.js'), path.join(runtimeDir, 'bin', 'cli.js')],
|
|
715
|
-
[path.join(sourceRoot, 'package.json'), path.join(runtimeDir, 'package.json')],
|
|
716
|
-
];
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
710
|
+
function ensureRuntimeInstall(mark) {
|
|
711
|
+
const runtimeDir = defaultRuntimeDir();
|
|
712
|
+
const sourceRoot = path.join(__dirname, '..');
|
|
713
|
+
const files = [
|
|
714
|
+
[path.join(sourceRoot, 'bin', 'cli.js'), path.join(runtimeDir, 'bin', 'cli.js')],
|
|
715
|
+
[path.join(sourceRoot, 'package.json'), path.join(runtimeDir, 'package.json')],
|
|
716
|
+
];
|
|
717
|
+
const resourceDirs = [
|
|
718
|
+
[path.join(sourceRoot, 'plugins'), path.join(runtimeDir, 'plugins')],
|
|
719
|
+
[path.join(sourceRoot, 'skills'), path.join(runtimeDir, 'skills')],
|
|
720
|
+
];
|
|
721
|
+
|
|
722
|
+
for (const [src, dest] of files) {
|
|
723
|
+
try {
|
|
724
|
+
const content = fs.readFileSync(src, 'utf8');
|
|
725
|
+
const changed = writeIfChanged(dest, content);
|
|
722
726
|
mark(changed, `runtime ${path.relative(runtimeDir, dest)}`);
|
|
723
727
|
} catch {
|
|
724
|
-
mark('skip', `runtime ${path.basename(dest)} unavailable`);
|
|
725
|
-
}
|
|
726
|
-
}
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
728
|
+
mark('skip', `runtime ${path.basename(dest)} unavailable`);
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
for (const [src, dest] of resourceDirs) {
|
|
733
|
+
try {
|
|
734
|
+
if (!fs.existsSync(src)) {
|
|
735
|
+
mark('skip', `runtime ${path.basename(dest)} unavailable`);
|
|
736
|
+
continue;
|
|
737
|
+
}
|
|
738
|
+
fs.rmSync(dest, { recursive: true, force: true });
|
|
739
|
+
copyDirSync(src, dest);
|
|
740
|
+
mark(true, `runtime ${path.basename(dest)}`);
|
|
741
|
+
} catch {
|
|
742
|
+
mark('skip', `runtime ${path.basename(dest)} unavailable`);
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
chmodExecutable(path.join(runtimeDir, 'bin', 'cli.js'));
|
|
747
|
+
return path.join(runtimeDir, 'bin', 'cli.js');
|
|
748
|
+
}
|
|
731
749
|
|
|
732
750
|
function findWritablePathDir() {
|
|
733
751
|
const dirs = [...new Set((process.env.PATH || '').split(path.delimiter).filter(Boolean))];
|
|
@@ -3808,13 +3826,61 @@ function runInstallPlugin() {
|
|
|
3808
3826
|
process.exit(1);
|
|
3809
3827
|
}
|
|
3810
3828
|
|
|
3811
|
-
const claudeDir = process.env.CLAUDE_CONFIG_DIR || path.join(os.homedir(), '.claude');
|
|
3812
|
-
const cacheDir = path.join(claudeDir, 'plugins', 'cache', 'memoc', 'memoc', VERSION);
|
|
3813
|
-
const
|
|
3814
|
-
const
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
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
|
+
}
|
|
3818
3884
|
|
|
3819
3885
|
// update installed_plugins.json
|
|
3820
3886
|
const installed = readJsonLoose(installedPath) || {};
|
|
@@ -3832,12 +3898,19 @@ function runInstallPlugin() {
|
|
|
3832
3898
|
fs.mkdirSync(path.dirname(installedPath), { recursive: true });
|
|
3833
3899
|
fs.writeFileSync(installedPath, JSON.stringify(installed, null, 2) + '\n');
|
|
3834
3900
|
|
|
3835
|
-
// update settings.json
|
|
3836
|
-
const settings = readJsonLoose(settingsPath) || {};
|
|
3837
|
-
settings.enabledPlugins = settings.enabledPlugins || {};
|
|
3838
|
-
settings.enabledPlugins[PLUGIN_KEY] = true;
|
|
3839
|
-
|
|
3840
|
-
|
|
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 }); }
|
|
3841
3914
|
catch { fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + '\n'); }
|
|
3842
3915
|
|
|
3843
3916
|
const SKILL_NAMES = [
|
|
@@ -3885,7 +3958,7 @@ function runInstallPlugin() {
|
|
|
3885
3958
|
}
|
|
3886
3959
|
|
|
3887
3960
|
console.log('\n memoc plugin installed\n');
|
|
3888
|
-
console.log(' Claude Code ~/.claude/plugins/cache/memoc/');
|
|
3961
|
+
console.log(' Claude Code ~/.claude/plugins/cache/memoc/ + ~/.claude/plugins/marketplaces/memoc/');
|
|
3889
3962
|
console.log(' Codex Desktop ~/.agents/skills/');
|
|
3890
3963
|
console.log(' Skills spec ~/.agents/skills/ (Cursor, Windsurf, and other supported agents)');
|
|
3891
3964
|
console.log('\n Skills:');
|
|
@@ -3905,12 +3978,14 @@ function runUninstallPlugin() {
|
|
|
3905
3978
|
];
|
|
3906
3979
|
|
|
3907
3980
|
const claudeDir = process.env.CLAUDE_CONFIG_DIR || path.join(os.homedir(), '.claude');
|
|
3908
|
-
const cacheBase = path.join(claudeDir, 'plugins', 'cache', 'memoc');
|
|
3909
|
-
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');
|
|
3910
3984
|
const settingsPath = path.join(claudeDir, 'settings.json');
|
|
3911
3985
|
|
|
3912
|
-
// remove Claude Code cache
|
|
3913
|
-
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 });
|
|
3914
3989
|
|
|
3915
3990
|
// remove from installed_plugins.json
|
|
3916
3991
|
const installed = readJsonLoose(installedPath);
|
|
@@ -3934,9 +4009,10 @@ function runUninstallPlugin() {
|
|
|
3934
4009
|
|
|
3935
4010
|
// remove from settings.json
|
|
3936
4011
|
const settings = readJsonLoose(settingsPath);
|
|
3937
|
-
if (settings && settings.enabledPlugins) {
|
|
3938
|
-
delete settings.enabledPlugins[PLUGIN_KEY];
|
|
3939
|
-
|
|
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 }); }
|
|
3940
4016
|
catch { fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + '\n'); }
|
|
3941
4017
|
}
|
|
3942
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).
|