hypomnema 1.0.0
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/.claude-plugin/plugin.json +11 -0
- package/LICENSE +21 -0
- package/README.ko.md +160 -0
- package/README.md +160 -0
- package/commands/.gitkeep +0 -0
- package/commands/crystallize.md +116 -0
- package/commands/doctor.md +66 -0
- package/commands/feedback.md +67 -0
- package/commands/graph.md +54 -0
- package/commands/ingest.md +85 -0
- package/commands/init.md +101 -0
- package/commands/lint.md +55 -0
- package/commands/query.md +55 -0
- package/commands/resume.md +48 -0
- package/commands/stats.md +39 -0
- package/commands/uninstall.md +52 -0
- package/commands/upgrade.md +63 -0
- package/commands/verify.md +60 -0
- package/docs/.gitkeep +0 -0
- package/docs/ARCHITECTURE.md +183 -0
- package/docs/CONTRIBUTING.md +115 -0
- package/docs/TEST-CASES.md +580 -0
- package/hooks/.gitkeep +0 -0
- package/hooks/hooks.json +109 -0
- package/hooks/hypo-auto-commit.mjs +36 -0
- package/hooks/hypo-auto-stage.mjs +30 -0
- package/hooks/hypo-compact-guard.mjs +71 -0
- package/hooks/hypo-cwd-change.mjs +91 -0
- package/hooks/hypo-file-watch.mjs +47 -0
- package/hooks/hypo-first-prompt.mjs +59 -0
- package/hooks/hypo-hot-rebuild.mjs +95 -0
- package/hooks/hypo-lookup.mjs +178 -0
- package/hooks/hypo-personal-check.mjs +195 -0
- package/hooks/hypo-session-start.mjs +141 -0
- package/hooks/hypo-shared.mjs +213 -0
- package/package.json +37 -0
- package/scripts/.gitkeep +0 -0
- package/scripts/bump-version.mjs +53 -0
- package/scripts/crystallize.mjs +153 -0
- package/scripts/doctor.mjs +361 -0
- package/scripts/feedback.mjs +130 -0
- package/scripts/graph.mjs +183 -0
- package/scripts/ingest.mjs +130 -0
- package/scripts/init.mjs +515 -0
- package/scripts/lib/frontmatter.mjs +11 -0
- package/scripts/lib/hypo-ignore.mjs +54 -0
- package/scripts/lib/hypo-root.mjs +53 -0
- package/scripts/lint.mjs +210 -0
- package/scripts/query.mjs +124 -0
- package/scripts/resume.mjs +115 -0
- package/scripts/stats.mjs +132 -0
- package/scripts/uninstall.mjs +188 -0
- package/scripts/upgrade.mjs +538 -0
- package/scripts/verify.mjs +172 -0
- package/skills/.gitkeep +0 -0
- package/skills/crystallize/SKILL.md +85 -0
- package/skills/graph/SKILL.md +54 -0
- package/skills/ingest/SKILL.md +83 -0
- package/skills/lint/SKILL.md +55 -0
- package/skills/query/SKILL.md +58 -0
- package/skills/verify/SKILL.md +92 -0
- package/templates/.gitkeep +0 -0
- package/templates/.hypoignore +18 -0
- package/templates/Home.md +34 -0
- package/templates/Overview.md +50 -0
- package/templates/SCHEMA.md +106 -0
- package/templates/hot.md +22 -0
- package/templates/hypo-automation.md +69 -0
- package/templates/hypo-config.md +41 -0
- package/templates/hypo-guide.md +146 -0
- package/templates/hypo-help.md +53 -0
- package/templates/index.md +44 -0
- package/templates/log.md +25 -0
- package/templates/pages/_index.md +61 -0
- package/templates/projects/_template/hot.md +28 -0
- package/templates/projects/_template/index.md +39 -0
- package/templates/projects/_template/prd.md +29 -0
- package/templates/projects/_template/session-state.md +9 -0
- package/templates/session-state.md +12 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Ingest an external source into the wiki
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
You are running `/hypo:ingest`. Save a raw source and synthesize it into wiki pages.
|
|
6
|
+
|
|
7
|
+
## What this does
|
|
8
|
+
|
|
9
|
+
- Saves raw source content to `sources/<slug>.<ext>` (never edited after)
|
|
10
|
+
- Synthesizes the source into one or more pages in `pages/`
|
|
11
|
+
- Updates `index.md` with new or updated pages
|
|
12
|
+
- Appends an entry to `log.md`
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Step 1 — Collect source details
|
|
17
|
+
|
|
18
|
+
Ask the user:
|
|
19
|
+
|
|
20
|
+
1. **Source**: "What is the source? (paste text, provide a file path, or give a URL)"
|
|
21
|
+
2. **Slug**: "What slug should this source have? (e.g. `openai-swarm-paper`, `team-retro-2026-04`)"
|
|
22
|
+
- Default: derive from title or filename
|
|
23
|
+
|
|
24
|
+
If a URL is provided, fetch the content. If a file path is provided, read it.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Step 2 — Check for orphaned sources
|
|
29
|
+
|
|
30
|
+
Locate the Hypomnema package root. Run the ingest helper to surface existing orphaned sources:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
node <package-root>/scripts/ingest.mjs [--hypo-dir="<path>"]
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
If there are orphaned sources already in `sources/`, ask: "There are N unprocessed sources — do you want to ingest one of those instead?"
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Step 3 — Save raw source
|
|
41
|
+
|
|
42
|
+
Save the raw content to `sources/<slug>.<ext>` (use `.md` for text, `.txt` for plain text, `.pdf` or original extension for documents).
|
|
43
|
+
|
|
44
|
+
Do **not** modify or summarize in the sources file — save it as-is.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Step 4 — Synthesize
|
|
49
|
+
|
|
50
|
+
Read and synthesize the source:
|
|
51
|
+
|
|
52
|
+
1. **Check index.md** — does a page on this topic already exist?
|
|
53
|
+
- If yes: update the existing page (merge new information, mark `updated:` today)
|
|
54
|
+
- If no: create a new page in `pages/` with `type: source-summary` and `source: <slug>`
|
|
55
|
+
|
|
56
|
+
2. **Frontmatter** for new pages:
|
|
57
|
+
```yaml
|
|
58
|
+
---
|
|
59
|
+
title: "<descriptive title>"
|
|
60
|
+
type: source-summary
|
|
61
|
+
updated: YYYY-MM-DD
|
|
62
|
+
tags: [<relevant tags>]
|
|
63
|
+
source: <slug>
|
|
64
|
+
confidence: high | medium | low
|
|
65
|
+
evidence_strength: direct
|
|
66
|
+
---
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
3. **Content**: synthesis in your own words — not a copy of the source. Include key insights, quotes as blockquotes, and cross-links to related pages.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Step 5 — Update index.md and log.md
|
|
74
|
+
|
|
75
|
+
- Append a line to `index.md`: `- [[pages/<slug>]] — <one-line description>`
|
|
76
|
+
- Append to `log.md`: `- YYYY-MM-DD ingest: [[pages/<slug>]] from sources/<slug>.<ext>`
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Step 6 — Report
|
|
81
|
+
|
|
82
|
+
Show:
|
|
83
|
+
- ✓ Saved source: `sources/<slug>.<ext>`
|
|
84
|
+
- ✓ Created/Updated: `pages/<slug>.md`
|
|
85
|
+
- ↪ Updated: `index.md`, `log.md`
|
package/commands/init.md
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Initialize a new Hypomnema wiki
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
You are running `/hypo:init`. Set up a new personal wiki powered by Hypomnema.
|
|
6
|
+
|
|
7
|
+
**If the user passes a remote URL** (e.g. `/hypo:init --from-remote git@github.com:user/wiki.git`), skip the wizard and go directly to [Step 2a — From Remote](#step-2a).
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## What this does
|
|
12
|
+
|
|
13
|
+
- Creates the Hypomnema directory structure (`pages/`, `projects/`, `sources/`, etc.)
|
|
14
|
+
- Copies baseline template files (`index.md`, `hot.md`, `log.md`, `hypo-config.md`, `SCHEMA.md`, `hypo-guide.md`)
|
|
15
|
+
- Installs Claude Code hooks for automatic context injection
|
|
16
|
+
- Merges hook entries into `~/.claude/settings.json` (idempotent)
|
|
17
|
+
- Optionally sets up git with a remote
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Step 1 — Wizard
|
|
22
|
+
|
|
23
|
+
Ask the following questions **one at a time**. Use the default if the user presses Enter.
|
|
24
|
+
|
|
25
|
+
1. **Wiki directory**
|
|
26
|
+
> "Where should your wiki live? [~/hypomnema]"
|
|
27
|
+
Default: `~/hypomnema`
|
|
28
|
+
|
|
29
|
+
2. **Install hooks**
|
|
30
|
+
> "Install Claude Code hooks for automatic context injection? [yes]"
|
|
31
|
+
Default: yes
|
|
32
|
+
|
|
33
|
+
3. **Codex hooks** — ask only if the user answered **yes** to hooks AND `~/.codex/` exists
|
|
34
|
+
> "Also install Codex-compatible hooks in ~/.codex/hooks/? [yes]"
|
|
35
|
+
Default: yes
|
|
36
|
+
Skip this question if hooks=no or `~/.codex/` does not exist.
|
|
37
|
+
|
|
38
|
+
4. **Git remote** (optional)
|
|
39
|
+
> "Git remote URL for sync/backup? (Enter to skip)"
|
|
40
|
+
Default: skip
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Step 2a — From Remote (skip wizard) {#step-2a}
|
|
45
|
+
|
|
46
|
+
If the user provided `--from-remote <url>`, run:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
node <package-root>/scripts/init.mjs \
|
|
50
|
+
--from-remote="<url>" \
|
|
51
|
+
--hypo-dir="<hypo-dir>" \
|
|
52
|
+
[--no-hooks] \
|
|
53
|
+
[--codex]
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
- `--hypo-dir` defaults to `~/hypomnema` if not specified.
|
|
57
|
+
- The script clones the remote, validates that `hypo-config.md` exists, installs hooks, and merges `~/.claude/settings.json`.
|
|
58
|
+
- If the cloned repo is not a Hypomnema wiki (no `hypo-config.md`), the clone is removed and the command exits with an error.
|
|
59
|
+
- Skip to **Step 3** after running.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Step 2 — Run the init script (new wiki)
|
|
64
|
+
|
|
65
|
+
Locate the Hypomnema package root (the directory containing this file's parent `commands/`).
|
|
66
|
+
Then run:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
node <package-root>/scripts/init.mjs \
|
|
70
|
+
--hypo-dir="<hypo-dir>" \
|
|
71
|
+
[--no-hooks] \
|
|
72
|
+
[--codex] \
|
|
73
|
+
[--git-remote=<url>] \
|
|
74
|
+
[--no-git-init]
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Add `--dry-run` first to preview the changes, then run without it.
|
|
78
|
+
|
|
79
|
+
After init, the user can edit `.hypoignore` directly to exclude any files or directories from hook context.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Step 3 — Report results
|
|
84
|
+
|
|
85
|
+
Show the script output to the user:
|
|
86
|
+
- ✓ Created files/dirs (includes journal/, projects/_template/, first commit)
|
|
87
|
+
- ⊘ Skipped (already existed — no overwrites)
|
|
88
|
+
- ↪ Merged into settings.json / pushed to remote
|
|
89
|
+
- ✗ Errors (if any)
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Step 4 — Next steps
|
|
94
|
+
|
|
95
|
+
After a successful init, tell the user:
|
|
96
|
+
|
|
97
|
+
1. **Restart Claude Code** (or reload the window) so the new hooks take effect.
|
|
98
|
+
2. Run `/hypo:doctor` to verify the installation.
|
|
99
|
+
3. Open `<hypo-dir>/hypo-guide.md` to read the operations guide.
|
|
100
|
+
|
|
101
|
+
If hooks were installed: note that `~/.claude/settings.json` was updated and a restart is required.
|
package/commands/lint.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Validate wiki pages for frontmatter correctness and broken wikilinks
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
You are running `/hypo:lint`. Validate all wiki pages for frontmatter correctness and broken `[[wikilink]]` references.
|
|
6
|
+
|
|
7
|
+
## What this checks
|
|
8
|
+
|
|
9
|
+
- Every `.md` file under `pages/` and `projects/` should have frontmatter (missing frontmatter is a warning)
|
|
10
|
+
- Required fields: `title`, `type`
|
|
11
|
+
- `type` must be one of the recognised values (concept, source-summary, learning, adr, …)
|
|
12
|
+
- `updated` field should be present
|
|
13
|
+
- All `[[wikilinks]]` must resolve to an existing page slug
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Step 1 — Locate package root
|
|
18
|
+
|
|
19
|
+
Locate the Hypomnema package root (the directory containing this file's parent `commands/`).
|
|
20
|
+
|
|
21
|
+
If the user specified a Hypomnema directory, pass it as `--hypo-dir="<path>"`. Otherwise omit the flag and the script resolves the Hypomnema root automatically via `HYPO_DIR` → `hypo-config.md` scan → `~/hypomnema`.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Step 2 — Run lint
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
node <package-root>/scripts/lint.mjs [--hypo-dir="<path>"] [--json] [--fix]
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Options:
|
|
32
|
+
- `--json` — output results as JSON (useful for tooling)
|
|
33
|
+
- `--fix` — auto-add missing `updated` field (safe repairs only; no other fields are modified)
|
|
34
|
+
|
|
35
|
+
Show the output verbatim.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Step 3 — Interpret results
|
|
40
|
+
|
|
41
|
+
- `✓ No lint issues found` — Hypomnema is clean
|
|
42
|
+
- `✗ <file>: <message>` — error (missing required field or malformed frontmatter); must be fixed
|
|
43
|
+
- `⚠ <file>: <message>` — warning (unknown type, missing `updated`, broken link); worth fixing
|
|
44
|
+
|
|
45
|
+
A non-zero exit code means at least one **error** was found (warnings alone do not produce a non-zero exit code).
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Step 4 — Offer to fix
|
|
50
|
+
|
|
51
|
+
For **broken wikilinks**: list the affected files and ask if the user wants help correcting the links now.
|
|
52
|
+
|
|
53
|
+
For **missing `updated`**: suggest running with `--fix` to auto-add `updated: <today>` to each affected page's frontmatter. Note: `--fix` only repairs files that already have a valid, closed frontmatter block — files with no frontmatter or malformed frontmatter are skipped.
|
|
54
|
+
|
|
55
|
+
For **missing required fields** (`title`, `type`): open the affected files and help the user fill them in.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Query the wiki and synthesize an answer from relevant pages
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
You are running `/hypo:query`. Answer a question by searching the wiki and synthesizing from relevant pages.
|
|
6
|
+
|
|
7
|
+
## What this does
|
|
8
|
+
|
|
9
|
+
- Searches `pages/` and `projects/` for pages relevant to the query
|
|
10
|
+
- Reads and cross-references the top matches
|
|
11
|
+
- Synthesizes a grounded answer citing `[[page-slug]]` links
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Step 1 — Understand the query
|
|
16
|
+
|
|
17
|
+
Ask the user what they want to know if it was not provided in the command invocation.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Step 2 — Locate package root and search
|
|
22
|
+
|
|
23
|
+
Locate the Hypomnema package root (the directory containing this file's parent `commands/`).
|
|
24
|
+
|
|
25
|
+
Run full-text search:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
node <package-root>/scripts/query.mjs \
|
|
29
|
+
--q="<query terms>" \
|
|
30
|
+
[--hypo-dir="<path>"] \
|
|
31
|
+
[--limit=10]
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Step 3 — Read relevant pages
|
|
37
|
+
|
|
38
|
+
Read `index.md` first to understand the page catalog, then read the top-scoring pages returned by the search script (up to 5).
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Step 4 — Synthesize answer
|
|
43
|
+
|
|
44
|
+
Write a clear, concise answer that:
|
|
45
|
+
- Cites source pages as `[[slug]]` links
|
|
46
|
+
- Notes confidence level if any source is speculative
|
|
47
|
+
- Flags if no relevant pages were found ("Hypomnema does not currently have a page on this topic.")
|
|
48
|
+
|
|
49
|
+
If the query surfaces a gap, offer to create a new page or run `/hypo:ingest` on a relevant source.
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Step 5 — Offer follow-ups
|
|
54
|
+
|
|
55
|
+
After answering, suggest 1–2 related pages the user might want to read next.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Resume the most recent session for an active project
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
You are running `/hypo:resume`. Load the session state for an active project and pick up where you left off.
|
|
6
|
+
|
|
7
|
+
## What this does
|
|
8
|
+
|
|
9
|
+
- Reads `projects/<name>/session-state.md` (next tasks)
|
|
10
|
+
- Reads `projects/<name>/hot.md` (what was done last session)
|
|
11
|
+
- Offers to continue from the last stopping point
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Step 1 — Resolve project
|
|
16
|
+
|
|
17
|
+
If the user named a project in the command invocation, use that. Otherwise, locate the Hypomnema package root and run:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
node <package-root>/scripts/resume.mjs [--hypo-dir="<path>"] [--project=<name>]
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The script will resolve the most recently active project from `hot.md` if `--project` is omitted.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Step 2 — Present session state
|
|
28
|
+
|
|
29
|
+
Show the output from the script:
|
|
30
|
+
- **Project** name
|
|
31
|
+
- **Next tasks** from `session-state.md`
|
|
32
|
+
- **Background** from `hot.md` (what was done last session, condensed)
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Step 3 — Offer to continue
|
|
37
|
+
|
|
38
|
+
After presenting the state, ask:
|
|
39
|
+
|
|
40
|
+
> "Ready to pick up from here? Which task should we start with?"
|
|
41
|
+
|
|
42
|
+
If the session-state lists numbered tasks, offer them as options. Start immediately once the user selects one.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Step 4 — On completion of a task
|
|
47
|
+
|
|
48
|
+
When a task is marked done, offer to update `session-state.md` to reflect the new state before closing.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Show statistics about the wiki
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
You are running `/hypo:stats`. Display a summary of wiki health and activity.
|
|
6
|
+
|
|
7
|
+
## What this shows
|
|
8
|
+
|
|
9
|
+
- Total page count, broken down by type
|
|
10
|
+
- Number of projects and sources
|
|
11
|
+
- ADR count
|
|
12
|
+
- Date of last recorded activity
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Step 1 — Locate package root
|
|
17
|
+
|
|
18
|
+
Locate the Hypomnema package root (the directory containing this file's parent `commands/`).
|
|
19
|
+
|
|
20
|
+
If the user specified a Hypomnema directory, pass it as `--hypo-dir="<path>"`. Otherwise omit the flag.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Step 2 — Run the stats script
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
node <package-root>/scripts/stats.mjs [--hypo-dir="<path>"] [--json]
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Step 3 — Report results
|
|
33
|
+
|
|
34
|
+
Show the output verbatim. Then add a brief health commentary:
|
|
35
|
+
|
|
36
|
+
- If `sources` is 0: "No external sources yet — consider running `/hypo:ingest` with a document or URL."
|
|
37
|
+
- If `missingFrontmatter` > 0: "N page(s) missing frontmatter — run `/hypo:lint` to identify them."
|
|
38
|
+
- If `lastActivity` is more than 14 days ago: "Last activity was over 2 weeks ago — consider a `/hypo:crystallize` pass."
|
|
39
|
+
- Otherwise: "Wiki looks active and healthy."
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Remove Hypomnema hooks and clean up settings.json
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
You are running `/hypo:uninstall`. Remove Hypomnema from this machine.
|
|
6
|
+
|
|
7
|
+
## What this does
|
|
8
|
+
|
|
9
|
+
- Removes Hypomnema hook files from `~/.claude/hooks/` (and optionally `~/.codex/hooks/`)
|
|
10
|
+
- Strips Hypomnema entries from `~/.claude/settings.json`, leaving all other hooks untouched
|
|
11
|
+
- **Dry-run by default** — shows what would be removed without making any changes
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Step 1 — Confirm intent
|
|
16
|
+
|
|
17
|
+
Say:
|
|
18
|
+
> "This will remove Hypomnema hooks from your system. Your wiki files are NOT deleted.
|
|
19
|
+
> Run in dry-run mode first to preview changes? [yes]"
|
|
20
|
+
|
|
21
|
+
Default: yes (dry-run first)
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Step 2 — Dry run
|
|
26
|
+
|
|
27
|
+
Run:
|
|
28
|
+
```
|
|
29
|
+
node scripts/uninstall.mjs
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Show the output to the user. Ask:
|
|
33
|
+
> "Proceed with removal? (yes / no)"
|
|
34
|
+
|
|
35
|
+
If no → abort and confirm nothing was changed.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Step 3 — Apply (if confirmed)
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
node scripts/uninstall.mjs --apply
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
If the user also wants Codex hooks removed, append `--codex`.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Notes
|
|
50
|
+
|
|
51
|
+
- Wiki content (`~/hypomnema/`) is never touched — only hook files and settings.json entries
|
|
52
|
+
- To reinstall, run `/hypo:init`
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Check for Hypomnema updates and optionally apply them
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
You are running `/hypo:upgrade`. Check if the installed Hypomnema wiki is out of date and offer to apply updates.
|
|
6
|
+
|
|
7
|
+
## What this checks
|
|
8
|
+
|
|
9
|
+
- **SCHEMA version**: compares `~/hypomnema/SCHEMA.md` version against the package's current version
|
|
10
|
+
- **Hook files**: checks if any hooks in `~/.claude/hooks/` are stale or missing
|
|
11
|
+
- **settings.json**: checks if all hook registrations are present in `~/.claude/settings.json`
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Step 1 — Locate package root
|
|
16
|
+
|
|
17
|
+
Locate the Hypomnema package root (the directory containing this file's parent `commands/`).
|
|
18
|
+
|
|
19
|
+
If the user specified a Hypomnema directory, pass it as `--hypo-dir="<path>"`. Otherwise omit the flag.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Step 2 — Run upgrade check
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
node <package-root>/scripts/upgrade.mjs [--hypo-dir="<path>"]
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Show the output verbatim.
|
|
30
|
+
|
|
31
|
+
> **Note**: If a major SCHEMA bump is detected, this step generates a `MIGRATION-vX.Y.md` file in the Hypomnema root. This is a new informational file — no existing files are overwritten.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Step 3 — Interpret and summarise
|
|
36
|
+
|
|
37
|
+
- `✓` — up to date, no action needed
|
|
38
|
+
- `⚠` — minor update available (stale hook or missing settings entry)
|
|
39
|
+
- `✗` — major version bump or missing hook files (action required)
|
|
40
|
+
|
|
41
|
+
For a **major SCHEMA bump**: point the user to the generated `MIGRATION-vX.Y.md` file in their Hypomnema root and ask them to review it before applying.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Step 4 — Confirm before applying
|
|
46
|
+
|
|
47
|
+
If there is anything to update, ask the user:
|
|
48
|
+
|
|
49
|
+
> Updates found: [list what needs updating].
|
|
50
|
+
> Apply now? Hook files will be overwritten and settings.json will be merged.
|
|
51
|
+
> Note: SCHEMA.md is never auto-overwritten — update it manually after reviewing the diff. (y/N)
|
|
52
|
+
|
|
53
|
+
- If **yes** → run with `--apply`:
|
|
54
|
+
```bash
|
|
55
|
+
node <package-root>/scripts/upgrade.mjs [--hypo-dir="<path>"] --apply
|
|
56
|
+
```
|
|
57
|
+
- If **no** → tell the user they can apply later by running `/hypo:upgrade` again.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Step 5 — Post-apply
|
|
62
|
+
|
|
63
|
+
After applying, recommend running `/hypo:doctor` to verify the installation is healthy.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Check verify_by fields and surface overdue or missing verifications
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
You are running `/hypo:verify`. Audit wiki pages for overdue or missing `verify_by` fields.
|
|
6
|
+
|
|
7
|
+
## What this does
|
|
8
|
+
|
|
9
|
+
- Scans `pages/` and `projects/` for pages of types `adr`, `page`, `learning`, `concept`, `playbook`, `tool-eval`
|
|
10
|
+
- Reports overdue pages (past `verify_by_date`), upcoming (within 14 days), and pages missing a `verify_by` question
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Step 1 — Locate package root and run
|
|
15
|
+
|
|
16
|
+
Locate the Hypomnema package root (the directory containing this file's parent `commands/`).
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
node <package-root>/scripts/verify.mjs [--hypo-dir="<path>"] [--file=<path>]
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Options:
|
|
23
|
+
- `--file=<path>` — check a single page only (useful after editing a page)
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Step 2 — Report results
|
|
28
|
+
|
|
29
|
+
Show the script output verbatim:
|
|
30
|
+
- `✗ Overdue` — page is past its `verify_by_date`; requires immediate review
|
|
31
|
+
- `⚠ Due soon` — within 14 days
|
|
32
|
+
- `⚠ Missing verify_by` — tracked page has no verification question set
|
|
33
|
+
- `✓` — all pages up to date
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Step 3 — Offer to review overdue pages
|
|
38
|
+
|
|
39
|
+
For each overdue page, ask:
|
|
40
|
+
|
|
41
|
+
> "[[<slug>]] is overdue for verification. The question was: '<verify_by>'. Is this still accurate?"
|
|
42
|
+
|
|
43
|
+
If the user confirms it is still accurate:
|
|
44
|
+
- Update `verify_by_date` to a new future date (suggest 90 days from today)
|
|
45
|
+
|
|
46
|
+
If the user says it is outdated:
|
|
47
|
+
- Help update the page content
|
|
48
|
+
- Reset `verify_by_date` and optionally revise `verify_by`
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Step 4 — Add missing verify_by fields
|
|
53
|
+
|
|
54
|
+
For pages missing `verify_by`, suggest a verification question based on the page type:
|
|
55
|
+
- `concept` / `learning`: "Is this still the recommended approach?"
|
|
56
|
+
- `playbook`: "Has this procedure been tested recently?"
|
|
57
|
+
- `tool-eval`: "Is this evaluation still current? Check for a newer version."
|
|
58
|
+
- `adr`: "Is this decision still in effect, or has it been superseded?"
|
|
59
|
+
|
|
60
|
+
Ask the user to confirm the question, then add it to the frontmatter.
|
package/docs/.gitkeep
ADDED
|
File without changes
|