@kevin0181/memoc 1.4.6 → 1.4.11
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 +151 -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
|
@@ -3812,10 +3812,42 @@ function readJsonLoose(fp) {
|
|
|
3812
3812
|
return JSON.parse(cleaned);
|
|
3813
3813
|
} catch { return null; }
|
|
3814
3814
|
}
|
|
3815
|
-
|
|
3816
|
-
function
|
|
3817
|
-
const
|
|
3818
|
-
|
|
3815
|
+
|
|
3816
|
+
function writePiMemocExtension(dest, skillNames) {
|
|
3817
|
+
const lines = [
|
|
3818
|
+
'import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";',
|
|
3819
|
+
'',
|
|
3820
|
+
'const SKILLS: Array<[string, string]> = [',
|
|
3821
|
+
...skillNames.map((name) => {
|
|
3822
|
+
const command = name;
|
|
3823
|
+
return ` ["${command}", "${name}"],`;
|
|
3824
|
+
}),
|
|
3825
|
+
'];',
|
|
3826
|
+
'',
|
|
3827
|
+
'export default function memocPiExtension(pi: ExtensionAPI) {',
|
|
3828
|
+
' for (const [command, skillName] of SKILLS) {',
|
|
3829
|
+
' pi.registerCommand(command, {',
|
|
3830
|
+
' description: `Run ${skillName} skill`,',
|
|
3831
|
+
' handler: async (args, ctx) => {',
|
|
3832
|
+
' const message = args.trim() ? `/skill:${skillName} ${args.trim()}` : `/skill:${skillName}`;',
|
|
3833
|
+
' if (ctx.isIdle()) pi.sendUserMessage(message);',
|
|
3834
|
+
' else {',
|
|
3835
|
+
' pi.sendUserMessage(message, { deliverAs: "followUp" });',
|
|
3836
|
+
' ctx.ui.notify(`Queued ${skillName}`, "info");',
|
|
3837
|
+
' }',
|
|
3838
|
+
' },',
|
|
3839
|
+
' });',
|
|
3840
|
+
' }',
|
|
3841
|
+
'}',
|
|
3842
|
+
'',
|
|
3843
|
+
];
|
|
3844
|
+
fs.mkdirSync(path.dirname(dest), { recursive: true });
|
|
3845
|
+
fs.writeFileSync(dest, lines.join('\n'));
|
|
3846
|
+
}
|
|
3847
|
+
|
|
3848
|
+
function runInstallPlugin() {
|
|
3849
|
+
const os = require('os');
|
|
3850
|
+
const PLUGIN_KEY = 'memoc@memoc';
|
|
3819
3851
|
|
|
3820
3852
|
const pkgRoot = path.join(__dirname, '..');
|
|
3821
3853
|
const pluginSrc = path.join(pkgRoot, 'plugins', 'memoc');
|
|
@@ -3826,13 +3858,61 @@ function runInstallPlugin() {
|
|
|
3826
3858
|
process.exit(1);
|
|
3827
3859
|
}
|
|
3828
3860
|
|
|
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
|
-
|
|
3861
|
+
const claudeDir = process.env.CLAUDE_CONFIG_DIR || path.join(os.homedir(), '.claude');
|
|
3862
|
+
const cacheDir = path.join(claudeDir, 'plugins', 'cache', 'memoc', 'memoc', VERSION);
|
|
3863
|
+
const marketplaceDir = path.join(claudeDir, 'plugins', 'marketplaces', 'memoc');
|
|
3864
|
+
const marketplacePluginDir = path.join(marketplaceDir, 'plugins', 'memoc');
|
|
3865
|
+
const claudeMarketplacePath = path.join(marketplaceDir, '.claude-plugin', 'marketplace.json');
|
|
3866
|
+
const agentsMarketplacePath = path.join(marketplaceDir, '.agents', 'plugins', 'marketplace.json');
|
|
3867
|
+
const installedPath = path.join(claudeDir, 'plugins', 'installed_plugins.json');
|
|
3868
|
+
const settingsPath = path.join(claudeDir, 'settings.json');
|
|
3869
|
+
|
|
3870
|
+
// copy plugin files to Claude's cache and local marketplace registry
|
|
3871
|
+
copyDirSync(pluginSrc, cacheDir);
|
|
3872
|
+
copyDirSync(pluginSrc, marketplacePluginDir);
|
|
3873
|
+
const claudeMarketplace = {
|
|
3874
|
+
$schema: 'https://anthropic.com/claude-code/marketplace.schema.json',
|
|
3875
|
+
name: 'memoc',
|
|
3876
|
+
description: 'memoc skills and plugin installer for Claude Code, Codex, and skills-compatible coding agents.',
|
|
3877
|
+
owner: {
|
|
3878
|
+
name: 'kevin0181',
|
|
3879
|
+
},
|
|
3880
|
+
plugins: [{
|
|
3881
|
+
name: 'memoc',
|
|
3882
|
+
description: 'Session-to-session memory and coding guardrail skills for AI coding agents.',
|
|
3883
|
+
author: {
|
|
3884
|
+
name: 'kevin0181',
|
|
3885
|
+
},
|
|
3886
|
+
source: './plugins/memoc',
|
|
3887
|
+
category: 'productivity',
|
|
3888
|
+
homepage: 'https://github.com/neneee0181/memoc',
|
|
3889
|
+
}],
|
|
3890
|
+
};
|
|
3891
|
+
const agentsMarketplace = {
|
|
3892
|
+
name: 'memoc',
|
|
3893
|
+
interface: {
|
|
3894
|
+
displayName: 'memoc',
|
|
3895
|
+
},
|
|
3896
|
+
plugins: [{
|
|
3897
|
+
name: 'memoc',
|
|
3898
|
+
source: {
|
|
3899
|
+
source: 'local',
|
|
3900
|
+
path: './plugins/memoc',
|
|
3901
|
+
},
|
|
3902
|
+
policy: {
|
|
3903
|
+
installation: 'AVAILABLE',
|
|
3904
|
+
authentication: 'ON_INSTALL',
|
|
3905
|
+
},
|
|
3906
|
+
category: 'Productivity',
|
|
3907
|
+
}],
|
|
3908
|
+
};
|
|
3909
|
+
for (const [marketplacePath, marketplace] of [
|
|
3910
|
+
[claudeMarketplacePath, claudeMarketplace],
|
|
3911
|
+
[agentsMarketplacePath, agentsMarketplace],
|
|
3912
|
+
]) {
|
|
3913
|
+
fs.mkdirSync(path.dirname(marketplacePath), { recursive: true });
|
|
3914
|
+
fs.writeFileSync(marketplacePath, JSON.stringify(marketplace, null, 2) + '\n');
|
|
3915
|
+
}
|
|
3836
3916
|
|
|
3837
3917
|
// update installed_plugins.json
|
|
3838
3918
|
const installed = readJsonLoose(installedPath) || {};
|
|
@@ -3850,12 +3930,19 @@ function runInstallPlugin() {
|
|
|
3850
3930
|
fs.mkdirSync(path.dirname(installedPath), { recursive: true });
|
|
3851
3931
|
fs.writeFileSync(installedPath, JSON.stringify(installed, null, 2) + '\n');
|
|
3852
3932
|
|
|
3853
|
-
// update settings.json
|
|
3854
|
-
const settings = readJsonLoose(settingsPath) || {};
|
|
3855
|
-
settings.enabledPlugins = settings.enabledPlugins || {};
|
|
3856
|
-
settings.enabledPlugins[PLUGIN_KEY] = true;
|
|
3857
|
-
|
|
3858
|
-
|
|
3933
|
+
// update settings.json
|
|
3934
|
+
const settings = readJsonLoose(settingsPath) || {};
|
|
3935
|
+
settings.enabledPlugins = settings.enabledPlugins || {};
|
|
3936
|
+
settings.enabledPlugins[PLUGIN_KEY] = true;
|
|
3937
|
+
settings.extraKnownMarketplaces = settings.extraKnownMarketplaces || {};
|
|
3938
|
+
settings.extraKnownMarketplaces.memoc = {
|
|
3939
|
+
source: {
|
|
3940
|
+
source: 'directory',
|
|
3941
|
+
path: marketplaceDir,
|
|
3942
|
+
},
|
|
3943
|
+
};
|
|
3944
|
+
fs.mkdirSync(path.dirname(settingsPath), { recursive: true });
|
|
3945
|
+
try { fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + '\n', { mode: 0o600 }); }
|
|
3859
3946
|
catch { fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + '\n'); }
|
|
3860
3947
|
|
|
3861
3948
|
const SKILL_NAMES = [
|
|
@@ -3873,9 +3960,13 @@ function runInstallPlugin() {
|
|
|
3873
3960
|
const agentsDir = path.join(os.homedir(), '.agents');
|
|
3874
3961
|
const agentSkills = path.join(agentsDir, 'skills');
|
|
3875
3962
|
const skillLockPath = path.join(agentsDir, '.skill-lock.json');
|
|
3876
|
-
const skillsSrc = path.join(pkgRoot, 'skills');
|
|
3877
|
-
|
|
3878
|
-
|
|
3963
|
+
const skillsSrc = path.join(pkgRoot, 'skills');
|
|
3964
|
+
const piDir = process.env.PI_CODING_AGENT_DIR || path.join(os.homedir(), '.pi', 'agent');
|
|
3965
|
+
const piSkills = path.join(piDir, 'skills');
|
|
3966
|
+
const piExtension = path.join(piDir, 'extensions', 'memoc.ts');
|
|
3967
|
+
const piSettingsPath = path.join(piDir, 'settings.json');
|
|
3968
|
+
|
|
3969
|
+
if (fs.existsSync(skillsSrc)) {
|
|
3879
3970
|
const skillLock = readJsonLoose(skillLockPath) || { version: 3, skills: {} };
|
|
3880
3971
|
if (!skillLock.skills) skillLock.skills = {};
|
|
3881
3972
|
for (const name of DEPRECATED_SKILL_NAMES) {
|
|
@@ -3886,8 +3977,9 @@ function runInstallPlugin() {
|
|
|
3886
3977
|
for (const name of SKILL_NAMES) {
|
|
3887
3978
|
const src = path.join(skillsSrc, name);
|
|
3888
3979
|
if (!fs.existsSync(src)) continue;
|
|
3889
|
-
copyDirSync(src, path.join(agentSkills, name));
|
|
3890
|
-
|
|
3980
|
+
copyDirSync(src, path.join(agentSkills, name));
|
|
3981
|
+
copyDirSync(src, path.join(piSkills, name));
|
|
3982
|
+
const prev = skillLock.skills[name] || {};
|
|
3891
3983
|
skillLock.skills[name] = {
|
|
3892
3984
|
source: 'neneee0181/memoc',
|
|
3893
3985
|
sourceType: 'npm',
|
|
@@ -3898,14 +3990,25 @@ function runInstallPlugin() {
|
|
|
3898
3990
|
updatedAt: now,
|
|
3899
3991
|
};
|
|
3900
3992
|
}
|
|
3901
|
-
fs.mkdirSync(agentsDir, { recursive: true });
|
|
3902
|
-
fs.writeFileSync(skillLockPath, JSON.stringify(skillLock, null, 2) + '\n');
|
|
3903
|
-
|
|
3904
|
-
|
|
3993
|
+
fs.mkdirSync(agentsDir, { recursive: true });
|
|
3994
|
+
fs.writeFileSync(skillLockPath, JSON.stringify(skillLock, null, 2) + '\n');
|
|
3995
|
+
|
|
3996
|
+
for (const name of DEPRECATED_SKILL_NAMES) {
|
|
3997
|
+
const oldPiDest = path.join(piSkills, name);
|
|
3998
|
+
if (fs.existsSync(oldPiDest)) fs.rmSync(oldPiDest, { recursive: true, force: true });
|
|
3999
|
+
}
|
|
4000
|
+
writePiMemocExtension(piExtension, SKILL_NAMES);
|
|
4001
|
+
const piSettings = readJsonLoose(piSettingsPath) || {};
|
|
4002
|
+
piSettings.enableSkillCommands = true;
|
|
4003
|
+
fs.mkdirSync(path.dirname(piSettingsPath), { recursive: true });
|
|
4004
|
+
fs.writeFileSync(piSettingsPath, JSON.stringify(piSettings, null, 2) + '\n');
|
|
4005
|
+
}
|
|
4006
|
+
|
|
3905
4007
|
console.log('\n memoc plugin installed\n');
|
|
3906
|
-
console.log(' Claude Code ~/.claude/plugins/cache/memoc/');
|
|
4008
|
+
console.log(' Claude Code ~/.claude/plugins/cache/memoc/ + ~/.claude/plugins/marketplaces/memoc/');
|
|
3907
4009
|
console.log(' Codex Desktop ~/.agents/skills/');
|
|
3908
4010
|
console.log(' Skills spec ~/.agents/skills/ (Cursor, Windsurf, and other supported agents)');
|
|
4011
|
+
console.log(' Pi Dev ~/.pi/agent/skills/ + ~/.pi/agent/extensions/memoc.ts');
|
|
3909
4012
|
console.log('\n Skills:');
|
|
3910
4013
|
for (const s of SKILL_NAMES) console.log(` /${s}`);
|
|
3911
4014
|
console.log('\n Restart open agent apps to reload skills.\n');
|
|
@@ -3923,12 +4026,14 @@ function runUninstallPlugin() {
|
|
|
3923
4026
|
];
|
|
3924
4027
|
|
|
3925
4028
|
const claudeDir = process.env.CLAUDE_CONFIG_DIR || path.join(os.homedir(), '.claude');
|
|
3926
|
-
const cacheBase = path.join(claudeDir, 'plugins', 'cache', 'memoc');
|
|
3927
|
-
const
|
|
4029
|
+
const cacheBase = path.join(claudeDir, 'plugins', 'cache', 'memoc');
|
|
4030
|
+
const marketplaceBase = path.join(claudeDir, 'plugins', 'marketplaces', 'memoc');
|
|
4031
|
+
const installedPath = path.join(claudeDir, 'plugins', 'installed_plugins.json');
|
|
3928
4032
|
const settingsPath = path.join(claudeDir, 'settings.json');
|
|
3929
4033
|
|
|
3930
|
-
// remove Claude Code cache
|
|
3931
|
-
if (fs.existsSync(cacheBase)) fs.rmSync(cacheBase, { recursive: true, force: true });
|
|
4034
|
+
// remove Claude Code cache
|
|
4035
|
+
if (fs.existsSync(cacheBase)) fs.rmSync(cacheBase, { recursive: true, force: true });
|
|
4036
|
+
if (fs.existsSync(marketplaceBase)) fs.rmSync(marketplaceBase, { recursive: true, force: true });
|
|
3932
4037
|
|
|
3933
4038
|
// remove from installed_plugins.json
|
|
3934
4039
|
const installed = readJsonLoose(installedPath);
|
|
@@ -3938,12 +4043,17 @@ function runUninstallPlugin() {
|
|
|
3938
4043
|
}
|
|
3939
4044
|
|
|
3940
4045
|
// remove from ~/.agents/skills/
|
|
3941
|
-
const agentsDir = path.join(os.homedir(), '.agents');
|
|
3942
|
-
const skillLockPath = path.join(agentsDir, '.skill-lock.json');
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
4046
|
+
const agentsDir = path.join(os.homedir(), '.agents');
|
|
4047
|
+
const skillLockPath = path.join(agentsDir, '.skill-lock.json');
|
|
4048
|
+
const piDir = process.env.PI_CODING_AGENT_DIR || path.join(os.homedir(), '.pi', 'agent');
|
|
4049
|
+
const piExtension = path.join(piDir, 'extensions', 'memoc.ts');
|
|
4050
|
+
for (const name of SKILL_NAMES) {
|
|
4051
|
+
const d = path.join(agentsDir, 'skills', name);
|
|
4052
|
+
if (fs.existsSync(d)) fs.rmSync(d, { recursive: true, force: true });
|
|
4053
|
+
const piSkillDir = path.join(piDir, 'skills', name);
|
|
4054
|
+
if (fs.existsSync(piSkillDir)) fs.rmSync(piSkillDir, { recursive: true, force: true });
|
|
4055
|
+
}
|
|
4056
|
+
if (fs.existsSync(piExtension)) fs.rmSync(piExtension, { force: true });
|
|
3947
4057
|
const skillLock = readJsonLoose(skillLockPath);
|
|
3948
4058
|
if (skillLock && skillLock.skills) {
|
|
3949
4059
|
for (const name of SKILL_NAMES) delete skillLock.skills[name];
|
|
@@ -3952,9 +4062,10 @@ function runUninstallPlugin() {
|
|
|
3952
4062
|
|
|
3953
4063
|
// remove from settings.json
|
|
3954
4064
|
const settings = readJsonLoose(settingsPath);
|
|
3955
|
-
if (settings && settings.enabledPlugins) {
|
|
3956
|
-
delete settings.enabledPlugins[PLUGIN_KEY];
|
|
3957
|
-
|
|
4065
|
+
if (settings && settings.enabledPlugins) {
|
|
4066
|
+
delete settings.enabledPlugins[PLUGIN_KEY];
|
|
4067
|
+
if (settings.extraKnownMarketplaces) delete settings.extraKnownMarketplaces.memoc;
|
|
4068
|
+
try { fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + '\n', { mode: 0o600 }); }
|
|
3958
4069
|
catch { fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + '\n'); }
|
|
3959
4070
|
}
|
|
3960
4071
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kevin0181/memoc",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.11",
|
|
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.
|