@kevin0181/memoc 1.4.2 → 1.4.5

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.
Files changed (32) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +353 -303
  3. package/bin/cli.js +4057 -3855
  4. package/package.json +39 -37
  5. package/plugins/memoc/.claude-plugin/plugin.json +8 -0
  6. package/plugins/memoc/.codex-plugin/plugin.json +27 -0
  7. package/plugins/memoc/skills/memoc/SKILL.md +54 -0
  8. package/plugins/memoc/skills/memoc-code/SKILL.md +45 -0
  9. package/plugins/memoc/skills/memoc-compress/SKILL.md +31 -0
  10. package/plugins/memoc/skills/memoc-doctor/SKILL.md +35 -0
  11. package/plugins/memoc/skills/memoc-goal/SKILL.md +19 -0
  12. package/plugins/memoc/skills/memoc-init/SKILL.md +34 -0
  13. package/plugins/memoc/skills/memoc-note/SKILL.md +34 -0
  14. package/plugins/memoc/skills/memoc-scope/SKILL.md +19 -0
  15. package/plugins/memoc/skills/memoc-search/SKILL.md +38 -0
  16. package/plugins/memoc/skills/memoc-simple/SKILL.md +19 -0
  17. package/plugins/memoc/skills/memoc-think/SKILL.md +18 -0
  18. package/plugins/memoc/skills/memoc-upgrade/SKILL.md +27 -0
  19. package/plugins/memoc/skills/memoc-work/SKILL.md +31 -0
  20. package/skills/memoc/SKILL.md +54 -0
  21. package/skills/memoc-code/SKILL.md +45 -0
  22. package/skills/memoc-compress/SKILL.md +31 -0
  23. package/skills/memoc-doctor/SKILL.md +35 -0
  24. package/skills/memoc-goal/SKILL.md +19 -0
  25. package/skills/memoc-init/SKILL.md +34 -0
  26. package/skills/memoc-note/SKILL.md +34 -0
  27. package/skills/memoc-scope/SKILL.md +19 -0
  28. package/skills/memoc-search/SKILL.md +38 -0
  29. package/skills/memoc-simple/SKILL.md +19 -0
  30. package/skills/memoc-think/SKILL.md +18 -0
  31. package/skills/memoc-upgrade/SKILL.md +27 -0
  32. package/skills/memoc-work/SKILL.md +31 -0
package/package.json CHANGED
@@ -1,37 +1,39 @@
1
- {
2
- "name": "@kevin0181/memoc",
3
- "version": "1.4.2",
4
- "description": "Give AI agents a memory. Scaffolds session-to-session context for Claude Code, Codex, Cursor, and more.",
5
- "keywords": [
6
- "ai",
7
- "agent",
8
- "memory",
9
- "context",
10
- "scaffold",
11
- "claude",
12
- "codex",
13
- "llm"
14
- ],
15
- "author": "kevin0181",
16
- "license": "MIT",
17
- "repository": {
18
- "type": "git",
19
- "url": "git+https://github.com/neneee0181/memoc.git"
20
- },
21
- "homepage": "https://github.com/neneee0181/memoc#readme",
22
- "bugs": {
23
- "url": "https://github.com/neneee0181/memoc/issues"
24
- },
25
- "bin": {
26
- "memoc": "bin/cli.js"
27
- },
28
- "scripts": {
29
- "test": "node --test"
30
- },
31
- "files": [
32
- "bin/"
33
- ],
34
- "engines": {
35
- "node": ">=16"
36
- }
37
- }
1
+ {
2
+ "name": "@kevin0181/memoc",
3
+ "version": "1.4.5",
4
+ "description": "Give AI agents a memory. Scaffolds session-to-session context for Claude Code, Codex, Cursor, and more.",
5
+ "keywords": [
6
+ "ai",
7
+ "agent",
8
+ "memory",
9
+ "context",
10
+ "scaffold",
11
+ "claude",
12
+ "codex",
13
+ "llm"
14
+ ],
15
+ "author": "kevin0181",
16
+ "license": "MIT",
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/neneee0181/memoc.git"
20
+ },
21
+ "homepage": "https://github.com/neneee0181/memoc#readme",
22
+ "bugs": {
23
+ "url": "https://github.com/neneee0181/memoc/issues"
24
+ },
25
+ "bin": {
26
+ "memoc": "bin/cli.js"
27
+ },
28
+ "scripts": {
29
+ "test": "node --test"
30
+ },
31
+ "files": [
32
+ "bin/",
33
+ "plugins/",
34
+ "skills/"
35
+ ],
36
+ "engines": {
37
+ "node": ">=16"
38
+ }
39
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "memoc",
3
+ "description": "Agent memory skills for memoc: scaffold, maintain, query, and compact markdown-based project memory.",
4
+ "author": {
5
+ "name": "kevin0181",
6
+ "url": "https://github.com/neneee0181"
7
+ }
8
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "memoc",
3
+ "version": "1.4.5",
4
+ "description": "Agent memory skills for memoc — scaffold, maintain, and query session-to-session AI memory.",
5
+ "author": {
6
+ "name": "kevin0181",
7
+ "url": "https://github.com/neneee0181"
8
+ },
9
+ "homepage": "https://github.com/neneee0181/memoc",
10
+ "repository": "https://github.com/neneee0181/memoc",
11
+ "license": "MIT",
12
+ "keywords": ["memory", "agent", "ai", "context", "scaffold"],
13
+ "skills": "./skills/",
14
+ "interface": {
15
+ "displayName": "memoc",
16
+ "shortDescription": "Session-to-session memory for AI agents.",
17
+ "longDescription": "memoc scaffolds a structured memory system into any codebase so AI agents can pick up exactly where they left off. Skills cover init, upgrade, compress, search, work logs, notes, and health checks.",
18
+ "developerName": "kevin0181",
19
+ "category": "Productivity",
20
+ "capabilities": ["Write", "Read"],
21
+ "websiteURL": "https://github.com/neneee0181/memoc",
22
+ "privacyPolicyURL": "https://github.com/neneee0181/memoc/blob/main/README.md",
23
+ "termsOfServiceURL": "https://github.com/neneee0181/memoc/blob/main/LICENSE",
24
+ "defaultPrompt": ["Use memoc skills to manage agent memory."],
25
+ "brandColor": "#4F46E5"
26
+ }
27
+ }
@@ -0,0 +1,54 @@
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.
@@ -0,0 +1,45 @@
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.
@@ -0,0 +1,31 @@
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
@@ -0,0 +1,35 @@
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
@@ -0,0 +1,19 @@
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.
@@ -0,0 +1,34 @@
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`
@@ -0,0 +1,34 @@
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`
@@ -0,0 +1,19 @@
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.
@@ -0,0 +1,38 @@
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.
@@ -0,0 +1,19 @@
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.
@@ -0,0 +1,18 @@
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.
@@ -0,0 +1,27 @@
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.
@@ -0,0 +1,31 @@
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).
@@ -0,0 +1,54 @@
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.
@@ -0,0 +1,45 @@
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.
@@ -0,0 +1,31 @@
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