memgineering 0.0.0 → 0.1.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.
@@ -0,0 +1,177 @@
1
+ ---
2
+ name: memgineering-memory
3
+ description: Use when the user asks about something they told you before, refers to a past decision, wants their own notes searched, or says something worth keeping. Triggers include "what did I decide about X", "check my notes", "how do we deploy again", "remember this", "예전에 뭐라고 정했더라", "내 노트에서 찾아줘", "이거 기억해둬", "what do you know about my setup". Covers recall, open, remember, revise, undo, and resurface against the user's own brain folder.
4
+ type: skill
5
+ allowed-tools: Bash(memgineering:*)
6
+ ---
7
+
8
+ # Working with the user's brain
9
+
10
+ A **brain** is a folder of the user's own notes. It is not this tool's
11
+ database: they wrote those files, they can open them in any editor, and
12
+ memgineering reads them and keeps a derived index outside the folder. Deleting
13
+ that index costs a rebuild and nothing else.
14
+
15
+ Everything below assumes the brain is already linked. If a command answers
16
+ `no brain is linked yet`, see "Getting connected" at the bottom.
17
+
18
+ ## Answering from what they already know
19
+
20
+ Recall first whenever the question sounds settled — a past decision, their
21
+ setup, their preferences, why something is the way it is.
22
+
23
+ ```
24
+ memgineering recall "how do we deploy"
25
+ ```
26
+
27
+ ```
28
+ ## recall: how do we deploy (2 cards)
29
+
30
+ ### 1. Deploy is manual
31
+ stated
32
+
33
+ > launchctl kickstart on the Mac Studio, no CD pipeline
34
+
35
+ `open: deploy-manual`
36
+ ```
37
+
38
+ The output is already shaped for your context — headings, a quoted summary,
39
+ and a handle. Paste it in as-is rather than reformatting it into prose.
40
+
41
+ **But read it before you use it.** These are candidates ranked by relevance,
42
+ not a list of answers: anything matching a word from the query is returned, so
43
+ the tail of a long result can be only loosely related. That is deliberate —
44
+ for a memory system, failing to return a note someone knows is there is worse
45
+ than returning one they can ignore. Use the top matches that actually answer
46
+ the question and leave the rest; quoting all of them back as if each were
47
+ relevant is how a useful recall turns into noise.
48
+
49
+ Then open only what matters:
50
+
51
+ ```
52
+ memgineering open deploy-manual # the claims behind the card
53
+ memgineering open deploy-manual --detail summary # + its headings
54
+ memgineering open deploy-manual --detail chunks # + every section
55
+ memgineering open deploy-manual --section preflight # one section
56
+ memgineering open deploy-manual --detail full # the whole note
57
+ ```
58
+
59
+ `open` takes a handle, a full id, a path inside the brain, or a note's exact
60
+ title — so when you already know what you want, skip the recall.
61
+
62
+ ### When one round trip is enough
63
+
64
+ ```
65
+ memgineering recall "deploy" --limit 1 --detail full
66
+ ```
67
+
68
+ Best match, read whole, one call. Use this when the user's question clearly
69
+ points at one note.
70
+
71
+ ### Nothing matched
72
+
73
+ Say so. Only titles, aliases and summaries are searched, so suggest broader
74
+ words — but do not go read their folder yourself to compensate. A brain that
75
+ answers "nothing" is giving you real information.
76
+
77
+ ## Writing things down
78
+
79
+ ```
80
+ memgineering remember "deploys are manual — launchctl by hand, no CD"
81
+ ```
82
+
83
+ Lands immediately as its own note and is recallable at once. There is no
84
+ approval queue: the design trades permission-before for correction-after, and
85
+ every write records how to reverse it.
86
+
87
+ ```
88
+ memgineering undo # the last change
89
+ memgineering undo <op_id> # a specific one
90
+ memgineering log # what has changed, and what can still be undone
91
+ ```
92
+
93
+ Write down: decisions and their reasons, constraints, corrections the user
94
+ made to you, how something actually works once you found out. Skip: things
95
+ true only inside this conversation, and anything they said they did not want
96
+ kept.
97
+
98
+ **Recall first, then decide which verb.** If what you just learned answers a
99
+ note that is already there — the vague one, the one that says "nobody wrote
100
+ this down" — `revise` it instead. `remember` would leave two current notes on
101
+ the same subject and the next recall would return both, which is the
102
+ re-discovery problem the user was trying to end. New subject → `remember`.
103
+ Existing subject, now settled → `revise`.
104
+
105
+ ### Changing a conclusion
106
+
107
+ ```
108
+ memgineering revise deploy-manual \
109
+ --claim "Deploying is manual — pushing to main does nothing." \
110
+ --summary "manual only, no CD"
111
+ ```
112
+
113
+ - `--action supersede` (default) replaces the conclusion
114
+ - `--action reinforce` keeps it and adds support
115
+ - `--action conflict` records that two notes disagree without picking a winner
116
+ - `--dry-run` shows the diff and writes nothing
117
+
118
+ This only ever rewrites the memory block in a note's frontmatter. The prose is
119
+ the user's; neither this command nor you should rewrite it uninvited.
120
+
121
+ ### Retiring versus excluding
122
+
123
+ ```
124
+ memgineering retire <ref> --reason "the date moved" # no longer current, still visible
125
+ memgineering exclude path/to/note.md # stop reading it entirely
126
+ ```
127
+
128
+ Retiring keeps the note in recall, ranked last and labelled. Excluding takes it
129
+ out of the index and never touches the file. If the user says "delete", ask
130
+ which they mean — they are different, and guessing picks one.
131
+
132
+ ## Starting a session
133
+
134
+ ```
135
+ memgineering resurface
136
+ ```
137
+
138
+ No query. It ranks by what has been recalled in this folder before, how
139
+ recently, and which of the user's base notes have gone unread — the things you
140
+ should already know here before they have to tell you again.
141
+
142
+ ## What to raise with the user
143
+
144
+ The tool does not ask; you decide. Say something, once and plainly, when:
145
+
146
+ - the output marks the target `⚠ critical target` — that is `01_BASE/`, the
147
+ files defining who they are and what you may do
148
+ - you are about to record something said in passing that may be sensitive
149
+ - what you learned contradicts a memory currently marked current
150
+
151
+ Everything else: do it, and mention it in a sentence.
152
+
153
+ ## Rules
154
+
155
+ - **Never edit brain files with Read/Write/Edit.** Only the CLI records the
156
+ change and keeps `undo` working; a hand edit is invisible to both.
157
+ - **Never invent a handle or id.** They come from `recall`, `resurface`, `open`.
158
+ - **Store full ids, not short handles**, anywhere durable — your own memory, a
159
+ document, a ticket. `open` prints the full `id:` for exactly this.
160
+ - **`--json`** when you need to parse rather than read.
161
+ - **Several brains** (personal, team, a repo's own) resolve by where you are.
162
+ If a command says the choice is ambiguous, pass `--vault <path>` — or bind
163
+ the directory once with `memgineering use <brain>`.
164
+
165
+ ## Getting connected
166
+
167
+ ```
168
+ memgineering link ~/Documents/Notes # notes they already keep
169
+ memgineering init ~/brain # nothing yet — creates the layout
170
+ ```
171
+
172
+ `link` shows exactly what would be stored and asks first; run it in a terminal
173
+ the user can see, and let them answer. Do not pass `--yes` on their behalf.
174
+
175
+ With no terminal attached it says so instead of assuming the answer was no.
176
+ Show them `memgineering link <path> --dry-run` — same disclosure, writes
177
+ nothing — and run with `--yes` only once they have actually said yes.
@@ -0,0 +1,141 @@
1
+ ---
2
+ name: memgineering-setup
3
+ description: Use when installing or configuring memgineering — after `npm i -g memgineering`, when the user asks to set it up, connect their notes, install it into their agents, turn auto-update on or off, or when a memgineering command reports that no brain is linked. Triggers include "set up memgineering", "connect my notes", "메모리 설정해줘", "노트 연결", "memgineering setup", "no brain is linked".
4
+ type: skill
5
+ allowed-tools: Bash(memgineering:*)
6
+ ---
7
+
8
+ # Setting memgineering up
9
+
10
+ Two things have to happen, and they are separate on purpose:
11
+
12
+ 1. **Register with the agents** — so this and every other AI tool on the
13
+ machine knows the brain exists. One command.
14
+ 2. **Connect a brain** — which folder holds the notes. This one is the user's
15
+ decision, and it involves showing them what gets stored.
16
+
17
+ ## 1. Register
18
+
19
+ ```
20
+ memgineering setup --agent
21
+ ```
22
+
23
+ `--agent` is the non-interactive path, meant for you: it detects the installed
24
+ tools, injects the guidance block, installs these skills, and takes its
25
+ remaining answers from flags rather than prompts.
26
+
27
+ ```
28
+ memgineering setup --agent \
29
+ --tools claude,codex \ # default: everything detected
30
+ --auto-update on \ # default: on, and recommended
31
+ --hook on # SessionStart resurface, Claude Code only
32
+ ```
33
+
34
+ Look at `memgineering setup --dry-run` first if you want to report what would
35
+ change before changing it.
36
+
37
+ **Ask the user before choosing for them** when a flag would set policy rather
38
+ than mechanics: auto-update is the one that matters, since it means the tool
39
+ updates itself. Recommend `on` — old versions can lose access to hosted
40
+ features later — but it is theirs to decide.
41
+
42
+ If the user would rather click than type, `memgineering setup --human` gives
43
+ them a checkbox screen. Run it and let them drive; do not answer for them.
44
+
45
+ **After setup, the agent session has to restart** for the guidance to load.
46
+ Say so — the user will otherwise wonder why nothing changed.
47
+
48
+ ## 2. Connect a brain
49
+
50
+ Two cases, and picking the wrong one is disruptive.
51
+
52
+ **They already keep notes somewhere** — Obsidian, a folder of markdown,
53
+ anything:
54
+
55
+ ```
56
+ memgineering link ~/Documents/Notes
57
+ ```
58
+
59
+ This prints exactly what would be indexed and what would be refused, including
60
+ a sample of the real lines that would be stored, then asks. **Run it and stop.**
61
+ Let them read it and answer. Do not pass `--yes` for them: the screen is the
62
+ one moment they decide what this tool may read, and answering on their behalf
63
+ takes that away.
64
+
65
+ If your shell has no terminal attached, `link` will say so rather than
66
+ pretending the answer was no. When that happens, show them the decision
67
+ instead of making it:
68
+
69
+ ```
70
+ memgineering link ~/Documents/Notes --dry-run
71
+ ```
72
+
73
+ That prints the same disclosure and writes nothing: every note that would be
74
+ indexed with the exact line that would be stored, plus any file the credential
75
+ scanner is holding back. Put it in front of them, wait for a real yes, and
76
+ only then run with `--yes` — which records the decision they actually made.
77
+
78
+ If they cannot see your terminal at all, hand them the command rather than
79
+ answering for them.
80
+
81
+ **What to tell them, in one line before they answer:** the title and first
82
+ paragraph of every note listed gets stored outside the folder, and if the
83
+ session-start hook is on, a few of those summaries appear in every new session
84
+ without anyone asking. Anything they would not want in either place goes in a
85
+ `.memgdeny` file at the top of the folder — one path per line, no wildcards:
86
+
87
+ ```
88
+ 30_personal/medical.md
89
+ journal/ (a trailing slash covers a whole folder)
90
+ ```
91
+
92
+ If it refuses because a `.memgdeny` line matches no file, that is working as
93
+ intended — a rule with a wrong path protects nothing. Fix the paths it
94
+ suggests, or remove the lines.
95
+
96
+ **They have no notes yet**:
97
+
98
+ ```
99
+ memgineering init ~/brain
100
+ ```
101
+
102
+ Creates the layout — eleven folders and five base files — and links it. Then
103
+ tell them to fill in `01_BASE/USER.md` and leave the rest; the folders are
104
+ there for when they are needed, not as homework.
105
+
106
+ ### Several brains
107
+
108
+ Normal: a personal one, a team folder that syncs, one per repository. Which
109
+ one answers is decided by where you are, in this order:
110
+
111
+ 1. `--vault <path>`
112
+ 2. a `.memgineering` pointer file, found by walking up from the cwd
113
+ 3. the brain the current directory is inside
114
+ 4. the only one linked
115
+
116
+ If it says the choice is ambiguous, bind the directory once:
117
+
118
+ ```
119
+ memgineering use ~/brains/work
120
+ ```
121
+
122
+ Inside a repository this writes a relative path, so it can be committed and
123
+ will resolve for a teammate who links the same brain.
124
+
125
+ ## Checking it worked
126
+
127
+ ```
128
+ memgineering recall "anything" # should answer, even if with "nothing matched"
129
+ memgineering log # what this brain has recorded
130
+ ```
131
+
132
+ ## Turning things off
133
+
134
+ ```
135
+ memgineering setup --agent --auto-update off
136
+ memgineering unlink # stop reading a brain; notes untouched
137
+ memgineering unlink --purge # also delete the local index and undo snapshots
138
+ ```
139
+
140
+ `MEMGINEERING_NO_UPDATE=1` skips the update check for a single run without
141
+ changing the setting.
@@ -1,7 +1,2 @@
1
1
  #!/usr/bin/env node
2
-
3
- "use strict";
4
-
5
- console.log("memgineering is coming soon.");
6
- console.log("https://memgineering.com");
7
-
2
+ import '../dist/index.js';