notionmemory 0.1.0__tar.gz

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 (96) hide show
  1. notionmemory-0.1.0/LICENSE +21 -0
  2. notionmemory-0.1.0/PKG-INFO +106 -0
  3. notionmemory-0.1.0/README.md +80 -0
  4. notionmemory-0.1.0/notionmemory/__init__.py +0 -0
  5. notionmemory-0.1.0/notionmemory/agent_skills/calendar/SKILL.md +65 -0
  6. notionmemory-0.1.0/notionmemory/agent_skills/library/SKILL.md +48 -0
  7. notionmemory-0.1.0/notionmemory/agent_skills/memory/SKILL.md +60 -0
  8. notionmemory-0.1.0/notionmemory/agent_skills/settings/SKILL.md +42 -0
  9. notionmemory-0.1.0/notionmemory/agent_skills/templates/SKILL.md +286 -0
  10. notionmemory-0.1.0/notionmemory/app.py +24 -0
  11. notionmemory-0.1.0/notionmemory/cli.py +1082 -0
  12. notionmemory-0.1.0/notionmemory/core/__init__.py +0 -0
  13. notionmemory-0.1.0/notionmemory/core/agent_runtime.py +99 -0
  14. notionmemory-0.1.0/notionmemory/core/config.py +88 -0
  15. notionmemory-0.1.0/notionmemory/core/detection.py +105 -0
  16. notionmemory-0.1.0/notionmemory/core/i18n.py +18 -0
  17. notionmemory-0.1.0/notionmemory/core/install/__init__.py +0 -0
  18. notionmemory-0.1.0/notionmemory/core/install/codex.py +163 -0
  19. notionmemory-0.1.0/notionmemory/core/install/handlers.py +399 -0
  20. notionmemory-0.1.0/notionmemory/core/install/manifest.py +121 -0
  21. notionmemory-0.1.0/notionmemory/core/install/receipt.py +31 -0
  22. notionmemory-0.1.0/notionmemory/core/install/runner.py +94 -0
  23. notionmemory-0.1.0/notionmemory/core/install/spec.py +20 -0
  24. notionmemory-0.1.0/notionmemory/core/install/teardown.py +245 -0
  25. notionmemory-0.1.0/notionmemory/core/integrations.py +127 -0
  26. notionmemory-0.1.0/notionmemory/core/messages.py +159 -0
  27. notionmemory-0.1.0/notionmemory/core/notion_auth.py +92 -0
  28. notionmemory-0.1.0/notionmemory/core/notion_client.py +51 -0
  29. notionmemory-0.1.0/notionmemory/core/notion_markdown.py +263 -0
  30. notionmemory-0.1.0/notionmemory/core/paths.py +54 -0
  31. notionmemory-0.1.0/notionmemory/core/registry.py +53 -0
  32. notionmemory-0.1.0/notionmemory/core/skill_assets.py +19 -0
  33. notionmemory-0.1.0/notionmemory/core/skill_base.py +81 -0
  34. notionmemory-0.1.0/notionmemory/hooks/__init__.py +0 -0
  35. notionmemory-0.1.0/notionmemory/hooks/common.py +19 -0
  36. notionmemory-0.1.0/notionmemory/hooks/save_reminder.py +53 -0
  37. notionmemory-0.1.0/notionmemory/hooks/session_start.py +216 -0
  38. notionmemory-0.1.0/notionmemory/skills/__init__.py +0 -0
  39. notionmemory-0.1.0/notionmemory/skills/calendar/__init__.py +0 -0
  40. notionmemory-0.1.0/notionmemory/skills/calendar/notion_db.py +137 -0
  41. notionmemory-0.1.0/notionmemory/skills/calendar/routing.py +100 -0
  42. notionmemory-0.1.0/notionmemory/skills/calendar/skill.py +40 -0
  43. notionmemory-0.1.0/notionmemory/skills/calendar/store.py +275 -0
  44. notionmemory-0.1.0/notionmemory/skills/git/__init__.py +0 -0
  45. notionmemory-0.1.0/notionmemory/skills/git/flusher.py +139 -0
  46. notionmemory-0.1.0/notionmemory/skills/git/hooks.py +123 -0
  47. notionmemory-0.1.0/notionmemory/skills/git/queue.py +98 -0
  48. notionmemory-0.1.0/notionmemory/skills/git/skill.py +34 -0
  49. notionmemory-0.1.0/notionmemory/skills/library/__init__.py +0 -0
  50. notionmemory-0.1.0/notionmemory/skills/library/crawl.py +110 -0
  51. notionmemory-0.1.0/notionmemory/skills/library/index.py +113 -0
  52. notionmemory-0.1.0/notionmemory/skills/library/retrieve.py +32 -0
  53. notionmemory-0.1.0/notionmemory/skills/library/skill.py +43 -0
  54. notionmemory-0.1.0/notionmemory/skills/memory/__init__.py +0 -0
  55. notionmemory-0.1.0/notionmemory/skills/memory/notion_db.py +213 -0
  56. notionmemory-0.1.0/notionmemory/skills/memory/skill.py +44 -0
  57. notionmemory-0.1.0/notionmemory/skills/memory/store.py +176 -0
  58. notionmemory-0.1.0/notionmemory/skills/templates/__init__.py +0 -0
  59. notionmemory-0.1.0/notionmemory/skills/templates/coerce.py +235 -0
  60. notionmemory-0.1.0/notionmemory/skills/templates/document.py +256 -0
  61. notionmemory-0.1.0/notionmemory/skills/templates/filters.py +363 -0
  62. notionmemory-0.1.0/notionmemory/skills/templates/introspect.py +624 -0
  63. notionmemory-0.1.0/notionmemory/skills/templates/profile.py +151 -0
  64. notionmemory-0.1.0/notionmemory/skills/templates/render.py +140 -0
  65. notionmemory-0.1.0/notionmemory/skills/templates/skill.py +61 -0
  66. notionmemory-0.1.0/notionmemory/skills/templates/store.py +288 -0
  67. notionmemory-0.1.0/notionmemory/skills/templates/types.py +85 -0
  68. notionmemory-0.1.0/notionmemory/web/__init__.py +0 -0
  69. notionmemory-0.1.0/notionmemory/web/assets/app.js +451 -0
  70. notionmemory-0.1.0/notionmemory/web/assets/design.css +119 -0
  71. notionmemory-0.1.0/notionmemory/web/assets/i18n.json +156 -0
  72. notionmemory-0.1.0/notionmemory/web/assets/index.html +32 -0
  73. notionmemory-0.1.0/notionmemory/web/assets/styles.css +617 -0
  74. notionmemory-0.1.0/notionmemory/web/jobs.py +41 -0
  75. notionmemory-0.1.0/notionmemory/web/server.py +244 -0
  76. notionmemory-0.1.0/notionmemory.egg-info/PKG-INFO +106 -0
  77. notionmemory-0.1.0/notionmemory.egg-info/SOURCES.txt +94 -0
  78. notionmemory-0.1.0/notionmemory.egg-info/dependency_links.txt +1 -0
  79. notionmemory-0.1.0/notionmemory.egg-info/entry_points.txt +2 -0
  80. notionmemory-0.1.0/notionmemory.egg-info/requires.txt +4 -0
  81. notionmemory-0.1.0/notionmemory.egg-info/top_level.txt +1 -0
  82. notionmemory-0.1.0/pyproject.toml +50 -0
  83. notionmemory-0.1.0/setup.cfg +4 -0
  84. notionmemory-0.1.0/tests/test_app.py +20 -0
  85. notionmemory-0.1.0/tests/test_artifact_contract.py +81 -0
  86. notionmemory-0.1.0/tests/test_cli.py +317 -0
  87. notionmemory-0.1.0/tests/test_cli_calendar.py +152 -0
  88. notionmemory-0.1.0/tests/test_cli_git.py +134 -0
  89. notionmemory-0.1.0/tests/test_cli_library.py +110 -0
  90. notionmemory-0.1.0/tests/test_cli_templates.py +695 -0
  91. notionmemory-0.1.0/tests/test_install_language.py +46 -0
  92. notionmemory-0.1.0/tests/test_install_skip_skills.py +40 -0
  93. notionmemory-0.1.0/tests/test_onboarding_cli_i18n.py +56 -0
  94. notionmemory-0.1.0/tests/test_packaging.py +109 -0
  95. notionmemory-0.1.0/tests/test_plugin_manifests.py +83 -0
  96. notionmemory-0.1.0/tests/test_skill_md.py +204 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Jaewoo Jeon
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,106 @@
1
+ Metadata-Version: 2.4
2
+ Name: notionmemory
3
+ Version: 0.1.0
4
+ Summary: Notion as a second-brain hub for coding agents: memory, calendar, templates, and library skills.
5
+ Author-email: Jaewoo Jeon <learnsteam.kr@gmail.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/legojeon/notionmemory
8
+ Project-URL: Repository, https://github.com/legojeon/notionmemory
9
+ Project-URL: Issues, https://github.com/legojeon/notionmemory/issues
10
+ Keywords: notion,second-brain,claude-code,codex,agent-memory,skills
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Operating System :: MacOS
16
+ Classifier: Operating System :: POSIX :: Linux
17
+ Classifier: Topic :: Utilities
18
+ Requires-Python: >=3.13
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Requires-Dist: PyYAML>=6.0
22
+ Requires-Dist: Flask>=3.0.0
23
+ Requires-Dist: requests>=2.31.0
24
+ Requires-Dist: keyring>=25
25
+ Dynamic: license-file
26
+
27
+ # notionmemory
28
+
29
+ Turn Notion into a second-brain hub for coding agents (Claude Code, Codex).
30
+ notionmemory ships a set of installable **skills** — long-term memory, calendar,
31
+ templates, and library recall — plus session hooks that surface the right context
32
+ automatically.
33
+
34
+ > Skills and CLI onboarding output are available in English (default) and Korean
35
+ > (`config language: en|ko`). A longer Korean guide is at [`docs/README.ko.md`](docs/README.ko.md).
36
+
37
+ ## Install
38
+
39
+ 1) Backend (required, both harnesses):
40
+
41
+ ```bash
42
+ pipx install notionmemory # or: uv tool install notionmemory / pip install --user notionmemory
43
+ ```
44
+
45
+ 2a) Claude Code (plugin):
46
+
47
+ ```bash
48
+ /plugin marketplace add legojeon/notionmemory
49
+ /plugin install notionmemory@notionmemory
50
+ # skills appear as notionmemory:calendar, notionmemory:memory, …
51
+ # Do NOT also run `notionmemory install --claude` (the plugin already installs skills + hooks).
52
+ ```
53
+
54
+ 2b) Codex (plugin + hooks):
55
+
56
+ ```bash
57
+ codex plugin marketplace add legojeon/notionmemory
58
+ codex plugin add notionmemory@notionmemory
59
+ notionmemory install --codex --skip-skills --trust-codex-hooks # hooks + trust (plugin owns the skills)
60
+ # --skip-skills: don't mirror skills, the plugin already provides them
61
+ # --trust-codex-hooks: required or Codex will silently not fire the installed hooks
62
+ ```
63
+
64
+ Prefer no plugin? One uniform command sets up both harnesses (skills unnamespaced):
65
+
66
+ ```bash
67
+ pipx install notionmemory && notionmemory install
68
+ ```
69
+
70
+ Codex users: `notionmemory install` will tell you to also run `notionmemory install --codex --trust-codex-hooks` before Codex hooks fire.
71
+
72
+ The marketplace source is this repository. If you're working from a local clone
73
+ before it's reachable as `legojeon/notionmemory`, add it by path instead:
74
+ `codex plugin marketplace add "$(pwd)"` / `claude plugin marketplace add "$(pwd)"`.
75
+
76
+ Run `notionmemory serve` to open the settings dashboard and connect your Notion
77
+ token (stored in your OS keyring, never in config).
78
+
79
+ ## Skills
80
+
81
+ - **memory** — save/recall long-term decisions & patterns in a Notion Second Brain
82
+ - **calendar** — read/create/move events in a Notion calendar DB
83
+ - **templates** — CRUD over your registered Notion templates & databases
84
+ - **library** — content search across your Notion pages
85
+ - **settings** — local web dashboard for connections & configuration
86
+
87
+ ## Upgrade
88
+
89
+ notionmemory installs files on your system (skill mirrors, session/git hooks,
90
+ state). To upgrade cleanly — including removing skills that a new version has
91
+ retired — run `notionmemory teardown` then reinstall. `teardown` removes only what
92
+ it installed; your Notion pages, config, and keyring token are preserved by
93
+ default (see `notionmemory teardown --dry-run`).
94
+
95
+ ## Uninstall
96
+
97
+ ```bash
98
+ notionmemory teardown # removes skills, hooks, local state
99
+ notionmemory teardown --purge-config --purge-secrets # also config + token
100
+ ```
101
+
102
+ Notion databases and pages are never deleted.
103
+
104
+ ## License
105
+
106
+ MIT — see [LICENSE](LICENSE).
@@ -0,0 +1,80 @@
1
+ # notionmemory
2
+
3
+ Turn Notion into a second-brain hub for coding agents (Claude Code, Codex).
4
+ notionmemory ships a set of installable **skills** — long-term memory, calendar,
5
+ templates, and library recall — plus session hooks that surface the right context
6
+ automatically.
7
+
8
+ > Skills and CLI onboarding output are available in English (default) and Korean
9
+ > (`config language: en|ko`). A longer Korean guide is at [`docs/README.ko.md`](docs/README.ko.md).
10
+
11
+ ## Install
12
+
13
+ 1) Backend (required, both harnesses):
14
+
15
+ ```bash
16
+ pipx install notionmemory # or: uv tool install notionmemory / pip install --user notionmemory
17
+ ```
18
+
19
+ 2a) Claude Code (plugin):
20
+
21
+ ```bash
22
+ /plugin marketplace add legojeon/notionmemory
23
+ /plugin install notionmemory@notionmemory
24
+ # skills appear as notionmemory:calendar, notionmemory:memory, …
25
+ # Do NOT also run `notionmemory install --claude` (the plugin already installs skills + hooks).
26
+ ```
27
+
28
+ 2b) Codex (plugin + hooks):
29
+
30
+ ```bash
31
+ codex plugin marketplace add legojeon/notionmemory
32
+ codex plugin add notionmemory@notionmemory
33
+ notionmemory install --codex --skip-skills --trust-codex-hooks # hooks + trust (plugin owns the skills)
34
+ # --skip-skills: don't mirror skills, the plugin already provides them
35
+ # --trust-codex-hooks: required or Codex will silently not fire the installed hooks
36
+ ```
37
+
38
+ Prefer no plugin? One uniform command sets up both harnesses (skills unnamespaced):
39
+
40
+ ```bash
41
+ pipx install notionmemory && notionmemory install
42
+ ```
43
+
44
+ Codex users: `notionmemory install` will tell you to also run `notionmemory install --codex --trust-codex-hooks` before Codex hooks fire.
45
+
46
+ The marketplace source is this repository. If you're working from a local clone
47
+ before it's reachable as `legojeon/notionmemory`, add it by path instead:
48
+ `codex plugin marketplace add "$(pwd)"` / `claude plugin marketplace add "$(pwd)"`.
49
+
50
+ Run `notionmemory serve` to open the settings dashboard and connect your Notion
51
+ token (stored in your OS keyring, never in config).
52
+
53
+ ## Skills
54
+
55
+ - **memory** — save/recall long-term decisions & patterns in a Notion Second Brain
56
+ - **calendar** — read/create/move events in a Notion calendar DB
57
+ - **templates** — CRUD over your registered Notion templates & databases
58
+ - **library** — content search across your Notion pages
59
+ - **settings** — local web dashboard for connections & configuration
60
+
61
+ ## Upgrade
62
+
63
+ notionmemory installs files on your system (skill mirrors, session/git hooks,
64
+ state). To upgrade cleanly — including removing skills that a new version has
65
+ retired — run `notionmemory teardown` then reinstall. `teardown` removes only what
66
+ it installed; your Notion pages, config, and keyring token are preserved by
67
+ default (see `notionmemory teardown --dry-run`).
68
+
69
+ ## Uninstall
70
+
71
+ ```bash
72
+ notionmemory teardown # removes skills, hooks, local state
73
+ notionmemory teardown --purge-config --purge-secrets # also config + token
74
+ ```
75
+
76
+ Notion databases and pages are never deleted.
77
+
78
+ ## License
79
+
80
+ MIT — see [LICENSE](LICENSE).
File without changes
@@ -0,0 +1,65 @@
1
+ ---
2
+ name: calendar
3
+ description: List, add, update, and cancel my events in the Notion Calendar DB. Use when the user says things like "what's on tomorrow/this week", "schedule a meeting/add an event", or "move/cancel an event". Searching past decisions or memories is the memory skill.
4
+ ---
5
+
6
+ # calendar — list / add / update / cancel
7
+
8
+ Command to run (the `notionmemory` command is registered on PATH at install time — run it as-is from any project):
9
+
10
+ ```bash
11
+ notionmemory calendar list [--from YYYY-MM-DD] [--to YYYY-MM-DD] [--days N]
12
+ notionmemory calendar add "<title>" --start "YYYY-MM-DD HH:MM" [--end "YYYY-MM-DD HH:MM"] [--location "<location>"] [--link <url>] [--notes "<notes>"] [--source claude|codex]
13
+ notionmemory calendar update <event_id> [--title "..."] [--start "..."] [--end "..."] [--location "..."] [--link <url>] [--status Scheduled|Done|Canceled]
14
+ notionmemory calendar cancel <event_id>
15
+ notionmemory calendar setup
16
+ ```
17
+
18
+ ## Conventions
19
+
20
+ 1. Relative time expressions ("tomorrow at 3pm", "next Monday") must be **converted by the agent to `YYYY-MM-DD HH:MM` based on the current date** before being passed in. A date with no time produces an all-day event.
21
+ 2. Before update/cancel, always run `list` first to find the target, show it to the user, and get **explicit confirmation**.
22
+ 3. After add/update, echo the printed event_id back to the user.
23
+ 4. Indicate the saving actor: `--source claude` for a Claude Code session, `--source codex` for Codex.
24
+ 5. **Do not copy event text verbatim into the Second Brain.** Only save decisions or facts that arose from an event via the memory skill, linking the Notion page URL that `add` printed via memory's `--link`.
25
+ 6. `cancel` records Status=Canceled and then sends the page to the Notion trash (it also disappears from the calendar app, recoverable within 30 days) — tell the user this happened.
26
+ 7. If the CLI prints Notion Calendar app connection instructions (on first DB creation), relay them to the user verbatim. If the user asks "it's not showing up in the app / how do I connect it", run `calendar setup` to show the instructions — app setup has no API, so it can't be applied automatically.
27
+
28
+ ## Where to write — different from reading
29
+
30
+ Reading can merge multiple sources, but writing must **pick exactly one**. When
31
+ `notionmemory calendar add` returns exit 2 with a list of candidates, that means "where to
32
+ write hasn't been decided." **Don't pick arbitrarily — ask the user.**
33
+
34
+ ```
35
+ Where should I add this?
36
+ 1. Calendar DB (built-in)
37
+ 2. Tasks DB in the my-planner template
38
+ → just this time / going forward
39
+ ```
40
+
41
+ Translate the answer into a command:
42
+
43
+ | User's answer | What to run |
44
+ |---|---|
45
+ | Just this time · Calendar DB | `notionmemory calendar add ... --here` |
46
+ | Just this time · template | Check properties with `notionmemory templates show <slug>` → `notionmemory templates add <slug> <db-key> --set ...` |
47
+ | Going forward · Calendar DB | `notionmemory calendar target calendar`, then `calendar add` again |
48
+ | Going forward · template | `notionmemory calendar target template:<slug>/<db-key>` |
49
+
50
+ **Only use `calendar target` when the user explicitly says "going forward."** Promoting a
51
+ one-off answer to a permanent default means the user won't be able to trace "why does this
52
+ go here?" weeks later.
53
+
54
+ If the write target is set to a template, `calendar add` will tell you which command to run
55
+ and refuse — calendar does **not** write to another template's database. Follow the guidance
56
+ it gives and use the `templates` commands instead. Always confirm property names with
57
+ `templates show <slug>` — never guess them.
58
+
59
+ ## Find content with library
60
+
61
+ Finding things **by content** — "where did I file this / how did I do X before" — is not
62
+ this skill's job but `library`'s: `notionmemory library search "<query>"`. It searches
63
+ across your Second Brain, registered templates, and general documents, attaching the
64
+ source to every hit. Don't conclude "nothing here" from a single source.
65
+ (Date/status **filter** queries are still this skill's job — library only searches text content.)
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: library
3
+ description: Use this to find where something is organized in my Notion. When the user's own Notion content (pages, documents, Second Brain) needs to be found by content — "where did I organize this", "how did I handle X before", "let's reuse that paper summary elsewhere" — run the notionmemory CLI with this skill.
4
+ ---
5
+
6
+ # library
7
+
8
+ Finds **"what something is about"** across my entire Notion. Whether it's a page, a document,
9
+ or a Second Brain entry, and regardless of whether it's a template or a plain document, it finds
10
+ it by content in one shot.
11
+
12
+ ```
13
+ notionmemory library search "<query>" [--limit N] # ranked pointers (source · title · section · id)
14
+ notionmemory library read <page-id> # live-read the found page's body (block ids inline)
15
+ notionmemory library refresh [--full] # refresh the index (--full for a full crawl)
16
+ notionmemory library status # index age · count
17
+ ```
18
+
19
+ `search` returns **pointers, not body content** — `content · [page-id] title > section`,
20
+ `memory · [mem-id] title`. Each pointer carries its source.
21
+
22
+ ## Three usage modes
23
+
24
+ - **locate** — Just show the pointers from `search`. Do not read the body.
25
+ - **pull** — Live-read only the top 1–2 candidates with `library read <page-id>` and use that.
26
+ The read output has block ids inline, so if you need to revisit a specific part, use those.
27
+ Do not bulk-read every candidate (delegate below if 3+ sources).
28
+ - **sweep** — When you need to sweep 3+ sources and synthesize, **delegate to a subagent**.
29
+ Have the subagent read the candidates and return **only the answer + sources (ids)**, so the
30
+ raw body content doesn't flood the main context. (Delegation conditions: 3+ sources, synthesis
31
+ needed, read-only. Source pointers must always be returned.)
32
+
33
+ ## If the index is empty or stale
34
+
35
+ If session start injects "library index: none" or a stale age, the index doesn't exist yet or is
36
+ out of date. **Tell the user you're building the search index**, then run `library refresh --full`
37
+ before searching (this crawls the whole workspace and takes time, so don't do it silently). For
38
+ queries where recency matters, like "what did I write today," also `refresh` first.
39
+
40
+ ## Limits
41
+
42
+ - **The index only knows titles and headings.** A page whose relevant content lives only in the
43
+ body, not in the title or headings, may not be found — try broadening the query with synonyms
44
+ (e.g., "container orchestration" → "Kubernetes"), or ask the user which page they mean.
45
+ - Search reflects the current index, so **a page you just created may not show up until you
46
+ refresh.**
47
+ - **Date/status filters** ("tomorrow's schedule", "incomplete todos") belong to calendar/templates'
48
+ structured queries, not library. library only finds things by "what they're about" (text).
@@ -0,0 +1,60 @@
1
+ ---
2
+ name: memory
3
+ description: Saves, searches, and deletes long-term memories in a Notion Second Brain. Use when the user says "remember this / save this / note that", when you've learned a decision, pattern, or preference with lasting value, or when past context would help ("did we ever" do this before).
4
+ ---
5
+
6
+ # memory — remember / recall / forget
7
+
8
+ Executable commands (the `notionmemory` command is registered on PATH at install time — run it as-is from any project):
9
+
10
+ ```bash
11
+ notionmemory remember "<content>" --type <t> --concepts "a,b,c" [--files "x.py,y.ts"] [--project <p>] [--source claude|codex] [--related <mem_id>] [--link <notion_page_url>] [--supersedes <mem_id>] [--auto]
12
+ notionmemory recall "<query>" [--type <t>] [--project <p>] [--top N]
13
+ notionmemory recall --get <mem_id>
14
+ notionmemory forget <mem_id>
15
+ ```
16
+
17
+ ## remember conventions
18
+
19
+ 1. Preserve the user's own wording in content — no reinterpreting or over-summarizing.
20
+ 2. concepts should be **2-5 items, lowercase, specific**: `jwt-refresh-rotation` correct / `auth` wrong.
21
+ 3. If there are referenced file paths, record them in `--files` (real paths only, never guess).
22
+ 4. Choose `--type`: pattern (a recurring code pattern) / preference (a user preference) / architecture (a structural decision) / bug (a bug and its fix) / workflow (a work procedure) / fact (anything else).
23
+ 5. Indicate who is saving: `--source claude` for a Claude Code session, `--source codex` for Codex.
24
+ 6. **When the agent decides on its own to save something, always attach `--auto`.** Saves the user explicitly requested go without `--auto`. If it exits 2 ("auto-save is off"), give up on saving and move on quietly.
25
+ 7. When replacing an existing memory, use `--supersedes <mem_id>` (the original is preserved as Superseded); use `--related <mem_id>` for related memories and `--link <url>` for a related Notion page.
26
+ 8. After saving, echo the printed mem_id and concepts back to the user verbatim — those are the future search terms.
27
+
28
+ ## recall conventions
29
+
30
+ - Use the user's own wording as the query as-is. Narrow with `--project`/`--type` when a project or topic is mentioned.
31
+ - **Never fabricate results**: report exactly what comes back, and if it falls back to "no results," say so plainly and suggest 2-3 alternative search terms. Never make things up.
32
+ - Use `recall --get <mem_id>` when the full content is needed.
33
+
34
+ ## forget conventions
35
+
36
+ - Before deleting, always use recall to find the target, show it to the user, and get **explicit confirmation**.
37
+ - Tell the user this sets Status=Forgotten (not a hard delete).
38
+
39
+ ## Anti-patterns
40
+
41
+ WRONG: `--concepts "stuff, code, notes"` — unfindable later.
42
+ RIGHT: `--concepts "jwt-refresh-rotation, token-revocation"` — specific and searchable.
43
+
44
+ WRONG: recall returns nothing, so you answer with a guess like "it was probably discussed last week."
45
+ RIGHT: "No matching memories. Should I try searching for `refresh token` or `session expiry` instead?"
46
+
47
+ ## Checklist
48
+
49
+ - content preserves the user's own wording.
50
+ - concepts: 2-5 items, lowercase, specific.
51
+ - `--auto` is attached when the agent decided to save on its own.
52
+ - recall results were reported exactly as returned.
53
+
54
+ ## Find content with library
55
+
56
+ Finding things **by content** — "where did I file this / how did I do X before" — is not
57
+ this skill's job but `library`'s: `notionmemory library search "<query>"`. It searches
58
+ across your Second Brain, registered templates, and general documents, attaching the
59
+ source to every hit. Don't conclude "nothing here" from a single source.
60
+ (Date/status **filter** queries are still this skill's job — library only searches text content.)
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: settings
3
+ description: Opens the notionmemory web settings dashboard. Use this skill when the user says something like "open notionmemory settings" or "show me the connections/settings screen" — it (re)starts the local settings server if needed and opens the browser.
4
+ ---
5
+
6
+ # settings
7
+
8
+ When the user wants to open notionmemory's settings screen (connections, skill options), follow the steps below in order.
9
+
10
+ ## 1. Check if it's already running
11
+
12
+ ```bash
13
+ curl -s -o /dev/null -w "%{http_code}" http://localhost:8765/api/skills
14
+ ```
15
+
16
+ - If the response is `200`, the server is already running — don't start a new one, skip ahead to step 3.
17
+
18
+ ## 2. If it's not running, start it in the background
19
+
20
+ Use the `notionmemory` command (registered on PATH at install time).
21
+
22
+ ```bash
23
+ nohup notionmemory serve >/tmp/notionmemory-serve.log 2>&1 &
24
+ ```
25
+
26
+ - Wait about 1 second, then re-run the `curl` from step 1 to confirm you get `200`. If it doesn't come up, check `/tmp/notionmemory-serve.log` and report the cause to the user.
27
+
28
+ ## 3. Open the browser
29
+
30
+ ```bash
31
+ open http://localhost:8765
32
+ ```
33
+
34
+ ## 4. Tell the user
35
+
36
+ - URL: `http://localhost:8765`
37
+ - This screen is **settings-only** — it stores connections (Notion PAT, etc.), skill option defaults, and **per-template prompts** (how and in what tone to fill each template). The actual work of reading material and authoring/organizing it into Notion is done by the `templates` skill (`templates create-page` to create the structure → `templates block`/`templates image` to author content).
38
+ - To stop the server: `pkill -f "notionmemory serve"`
39
+
40
+ ## Notes
41
+
42
+ - The port is fixed at `8765`. The server keeps running in the background, so let the user know to stop it with the `pkill` command above once they're done.