whywiki 0.1.0 → 0.2.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/README.md +51 -97
- package/assets/RULES.md +4 -0
- package/assets/index.md +2 -0
- package/assets/templates/meeting.md +13 -0
- package/dist/layout.js +3 -1
- package/dist/ops.js +1 -1
- package/dist/wiki.js +2 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -7,142 +7,99 @@
|
|
|
7
7
|
|
|
8
8
|
# whywiki
|
|
9
9
|
|
|
10
|
-
**
|
|
10
|
+
**The logbook of all your work. No matter what you do.**
|
|
11
11
|
|
|
12
|
+
[](https://www.npmjs.com/package/whywiki)
|
|
12
13
|
[](LICENSE)
|
|
13
14
|
[](https://nodejs.org)
|
|
14
|
-
[](#works-with)
|
|
15
15
|
|
|
16
16
|
</div>
|
|
17
17
|
|
|
18
18
|
---
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
Code, meetings, trip plans, the pricing call you made in the shower. You do
|
|
21
|
+
the work. Your AI writes it down.
|
|
21
22
|
|
|
22
|
-
|
|
23
|
+
One folder of plain markdown at `~/wiki`, shared by every AI tool you use.
|
|
24
|
+
No account, no server, no app to open.
|
|
23
25
|
|
|
24
|
-
|
|
25
|
-
"second brain." It's a folder of markdown files plus a short list of rules
|
|
26
|
-
your AI has to follow. No account, no server, no embeddings. Just notes in
|
|
27
|
-
git that every AI tool you use can read.
|
|
26
|
+
## Why
|
|
28
27
|
|
|
29
|
-
|
|
28
|
+
Agents now work alongside us. But the tools we use to log work were built for
|
|
29
|
+
humans, not for them.
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
The AI isn't bad. We are just bad at giving it the tools it needs to store its
|
|
32
|
+
own decisions. It can't remember its last ten sessions until someone builds
|
|
33
|
+
the place to keep them.
|
|
32
34
|
|
|
33
|
-
|
|
34
|
-
both agree it's overkill for a five-endpoint app, so you rip it out and go
|
|
35
|
-
back to REST. Lesson learned.
|
|
35
|
+
This is that place.
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
> "This API would be a great fit for GraphQL! Want me to set it up?"
|
|
40
|
-
|
|
41
|
-
It also ran `npm install` in your pnpm project. For the fourteenth time.
|
|
42
|
-
|
|
43
|
-
Your AI has the memory of a goldfish with a very confident personality.
|
|
44
|
-
You're not pair programming. You're running a very expensive Groundhog Day.
|
|
37
|
+
## Install
|
|
45
38
|
|
|
46
|
-
|
|
39
|
+
```bash
|
|
40
|
+
npx whywiki init
|
|
41
|
+
```
|
|
47
42
|
|
|
48
|
-
|
|
49
|
-
|
|
43
|
+
Done. Claude Code and Codex now read the logbook before every task and write
|
|
44
|
+
in it the moment something happens. Already have one? `npx whywiki@latest init`
|
|
45
|
+
upgrades it.
|
|
50
46
|
|
|
51
|
-
|
|
52
|
-
AI writes when one of these happens:
|
|
47
|
+
## What gets logged
|
|
53
48
|
|
|
54
49
|
| What happened | Where it goes |
|
|
55
50
|
|---|---|
|
|
56
|
-
| You picked one
|
|
57
|
-
| You tried
|
|
58
|
-
| You said "always…", "never…", "from now on…" | `house-rules.md`
|
|
59
|
-
|
|
|
60
|
-
|
|
|
51
|
+
| You picked one thing over another | `decisions/` |
|
|
52
|
+
| You tried it and it flopped | `dropped/` 🪦 |
|
|
53
|
+
| You said "always…", "never…", "from now on…" | `house-rules.md` |
|
|
54
|
+
| You're waiting on someone | `open-loops/` |
|
|
55
|
+
| You had a meeting | `meetings/` |
|
|
56
|
+
| How a thing works right now | `topics/` |
|
|
57
|
+
| A plan for one piece of work | `plans/` |
|
|
61
58
|
|
|
62
59
|
Nothing happened? Nothing gets written. You do zero bookkeeping.
|
|
63
60
|
|
|
64
|
-
|
|
61
|
+
Inside a code repo, pages go in that repo's own folder under `projects/`.
|
|
62
|
+
Anywhere else, they go in the main logbook. Search always covers everything,
|
|
63
|
+
and every change is a git commit you can read and undo.
|
|
65
64
|
|
|
66
|
-
|
|
67
|
-
already tried and threw out.
|
|
68
|
-
- **Others live in one app. This lives on your disk.** Plan in ChatGPT, build
|
|
69
|
-
in Claude Code, and nobody starts from zero.
|
|
70
|
-
- **Others are a black box. This is a folder you can `cat`.** Every change is
|
|
71
|
-
a git commit, so you can see what the AI wrote and undo it.
|
|
72
|
-
- **Others hope the AI saves things. This makes it.** Fixed triggers, no vibes.
|
|
65
|
+
## Meetings land here too
|
|
73
66
|
|
|
74
|
-
|
|
67
|
+
Connect your notes tool to your AI: Granola, Notion, Claude, Fireflies, Otter,
|
|
68
|
+
anything it can reach over MCP. Before each task, the AI fetches the meetings
|
|
69
|
+
it hasn't logged yet and files a short page for each one: summary, decisions,
|
|
70
|
+
action items, who was there.
|
|
75
71
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
```
|
|
72
|
+
A decision made in the room also becomes its own decision page. So the coding
|
|
73
|
+
session the next morning already knows what the meeting agreed.
|
|
79
74
|
|
|
80
|
-
|
|
81
|
-
✓ Created ~/wiki
|
|
82
|
-
✓ Claude Code: updated ~/.claude/CLAUDE.md
|
|
83
|
-
✓ Codex: updated ~/.codex/AGENTS.md
|
|
84
|
-
✗ Cursor: Cursor keeps global rules in Settings → Rules. Add this to its instructions:
|
|
85
|
-
Before every task, read ~/wiki/RULES.md and follow it.
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
Claude Code and Codex now load the rules at the start of every session.
|
|
89
|
-
Cursor gets a sticky note to paste. Sorry, Cursor.
|
|
90
|
-
|
|
91
|
-
Run it as often as you like. It never duplicates anything and never touches a
|
|
92
|
-
`~/wiki/` that isn't its own. You only need Node 20+. Git is built in.
|
|
93
|
-
|
|
94
|
-
## What's in the notebook
|
|
95
|
-
|
|
96
|
-
```
|
|
97
|
-
~/wiki/
|
|
98
|
-
├── RULES.md what the AI must do (40 lines, zero essays)
|
|
99
|
-
├── house-rules.md your pet peeves ("we use pnpm")
|
|
100
|
-
├── index.md map of every page
|
|
101
|
-
├── log.md one line per change
|
|
102
|
-
├── topics/ how things work right now
|
|
103
|
-
├── decisions/ "we picked X over Y, because Z"
|
|
104
|
-
├── dropped/ the idea graveyard 🪦
|
|
105
|
-
├── open-loops/ "legal still hasn't replied"
|
|
106
|
-
├── plans/ plans for one piece of work
|
|
107
|
-
└── projects/
|
|
108
|
-
└── your-app/ same folders, one set per code repo
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
Inside a code repo, notes go in that repo's project folder. Anywhere else,
|
|
112
|
-
they go in the main wiki. Reading always searches everything.
|
|
113
|
-
|
|
114
|
-
Each topic page describes how things are **right now**. Old decisions aren't
|
|
115
|
-
deleted. They're stamped `superseded_by` and kept, so two pages never argue.
|
|
75
|
+
Summaries only. Transcripts never go in.
|
|
116
76
|
|
|
117
77
|
## Works with
|
|
118
78
|
|
|
119
79
|
| Tool | Setup |
|
|
120
80
|
|---|---|
|
|
121
|
-
| **Claude Code**, **Codex** | Done by `init
|
|
122
|
-
| **Cursor** | Paste one line, or use MCP |
|
|
81
|
+
| **Claude Code**, **Codex** | Done by `init` |
|
|
82
|
+
| **Cursor** | Paste the one line `init` prints, or use MCP |
|
|
123
83
|
| **Claude desktop** | MCP |
|
|
124
84
|
| **ChatGPT** | MCP over HTTP |
|
|
125
85
|
|
|
126
|
-
`whywiki serve` gives chat apps the exact same powers as the CLI. Nobody gets
|
|
127
|
-
the budget version.
|
|
128
|
-
|
|
129
86
|
```json
|
|
130
87
|
{ "mcpServers": { "whywiki": { "command": "npx", "args": ["-y", "whywiki", "serve"] } } }
|
|
131
88
|
```
|
|
132
89
|
|
|
133
|
-
ChatGPT only talks to servers on the internet. Run the HTTP server
|
|
134
|
-
|
|
90
|
+
ChatGPT only talks to servers on the internet. Run the HTTP server behind an
|
|
91
|
+
HTTPS tunnel you trust and pass the tunnel's hostname:
|
|
135
92
|
|
|
136
93
|
```bash
|
|
137
94
|
npx -y whywiki serve --http --allow-host your-tunnel.example.com
|
|
138
95
|
```
|
|
139
96
|
|
|
140
|
-
It
|
|
97
|
+
It listens on localhost only and rejects every other hostname.
|
|
141
98
|
|
|
142
|
-
> ⚠️ Anyone with the tunnel URL can read and write your
|
|
99
|
+
> ⚠️ Anyone with the tunnel URL can read and write your logbook. Treat it like a password.
|
|
143
100
|
|
|
144
101
|
<details>
|
|
145
|
-
<summary><b>All commands</b> (mostly for the AI
|
|
102
|
+
<summary><b>All commands</b> (mostly for the AI)</summary>
|
|
146
103
|
|
|
147
104
|
```
|
|
148
105
|
whywiki <command> [--root <path>]
|
|
@@ -161,7 +118,7 @@ whywiki <command> [--root <path>]
|
|
|
161
118
|
page content comes from --file or stdin
|
|
162
119
|
```
|
|
163
120
|
|
|
164
|
-
`--root` or `$WHYWIKI_ROOT` points at a
|
|
121
|
+
`--root` or `$WHYWIKI_ROOT` points at a logbook other than `~/wiki`.
|
|
165
122
|
|
|
166
123
|
</details>
|
|
167
124
|
|
|
@@ -170,15 +127,12 @@ whywiki <command> [--root <path>]
|
|
|
170
127
|
**Can I edit it?** Read it, browse it, open it in Obsidian. To change it, ask
|
|
171
128
|
the AI, so the index, log and git history stay in sync.
|
|
172
129
|
|
|
173
|
-
**My AI
|
|
174
|
-
|
|
130
|
+
**My AI skipped the logbook once.** AIs are AIs. If it keeps happening, say
|
|
131
|
+
"from now on…" and it lands in `house-rules.md`.
|
|
175
132
|
|
|
176
133
|
**How do I uninstall?** Delete `~/wiki` and the marked `whywiki` block in your
|
|
177
|
-
agent's instructions file.
|
|
178
|
-
|
|
179
|
-
**What's the logo?** Two question marks holding hands. Every "why" gets an
|
|
180
|
-
answer, and every answer raises another "why."
|
|
134
|
+
agent's instructions file.
|
|
181
135
|
|
|
182
136
|
## License
|
|
183
137
|
|
|
184
|
-
MIT.
|
|
138
|
+
MIT.
|
package/assets/RULES.md
CHANGED
|
@@ -13,6 +13,7 @@ Wiki folder: `{{WIKI}}`. Paths below are relative to it. Commands: `npx -y whywi
|
|
|
13
13
|
2. `search <task keywords>`.
|
|
14
14
|
3. Check `dropped/` and `open-loops/` hits. Never re-propose dropped items unless the user overrides.
|
|
15
15
|
4. Open loop's "Done when" is true → close it.
|
|
16
|
+
5. Meeting-notes tool connected (Granola, Notion, Claude, Fireflies, Otter, any other) → fetch meetings newer than the newest `meetings/` line in `index.md`; none yet → last 7 days. Write each as a `meeting`.
|
|
16
17
|
|
|
17
18
|
## Write when
|
|
18
19
|
- Choice made → `decision`
|
|
@@ -21,6 +22,7 @@ Wiki folder: `{{WIKI}}`. Paths below are relative to it. Commands: `npx -y whywi
|
|
|
21
22
|
- Term defined → `topic`
|
|
22
23
|
- Wiki contradicted → update `topic`, supersede old page
|
|
23
24
|
- Blocked on outside condition → `open-loop`
|
|
25
|
+
- Meeting held or meeting notes shared → `meeting`
|
|
24
26
|
|
|
25
27
|
Write in the same response. No trigger → write nothing.
|
|
26
28
|
|
|
@@ -35,6 +37,8 @@ Write in the same response. No trigger → write nothing.
|
|
|
35
37
|
- Unproven → topic's Open questions.
|
|
36
38
|
- Closed open loop: `status: closed` + Resolution. Never delete.
|
|
37
39
|
- Plans are not current truth.
|
|
40
|
+
- `meeting`: scope `main`, slug `<meeting-date>-<title>`. Summarize; record `source` and `attendees`.
|
|
41
|
+
- Every choice, abandoned approach or blocker in a meeting also gets its own page in the project it is about, else `main`, linked from the meeting.
|
|
38
42
|
- `house-rules`: write the whole file, scope `main`.
|
|
39
43
|
|
|
40
44
|
## Format
|
package/assets/index.md
CHANGED
package/dist/layout.js
CHANGED
|
@@ -2,13 +2,14 @@ import fs from "node:fs";
|
|
|
2
2
|
import os from "node:os";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
|
-
export const PAGE_TYPES = ["topic", "decision", "dropped", "open-loop", "plan"];
|
|
5
|
+
export const PAGE_TYPES = ["topic", "decision", "dropped", "open-loop", "plan", "meeting"];
|
|
6
6
|
export const FOLDER = {
|
|
7
7
|
topic: "topics",
|
|
8
8
|
decision: "decisions",
|
|
9
9
|
dropped: "dropped",
|
|
10
10
|
"open-loop": "open-loops",
|
|
11
11
|
plan: "plans",
|
|
12
|
+
meeting: "meetings",
|
|
12
13
|
};
|
|
13
14
|
export const INDEX_SECTION = {
|
|
14
15
|
topic: "Topics",
|
|
@@ -16,6 +17,7 @@ export const INDEX_SECTION = {
|
|
|
16
17
|
dropped: "Dropped",
|
|
17
18
|
"open-loop": "Open loops",
|
|
18
19
|
plan: "Plans",
|
|
20
|
+
meeting: "Meetings",
|
|
19
21
|
};
|
|
20
22
|
export const SLUG = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
21
23
|
export const DATED = /^\d{4}-\d{2}-\d{2}-/;
|
package/dist/ops.js
CHANGED
|
@@ -32,7 +32,7 @@ export const OPERATIONS = {
|
|
|
32
32
|
run: (w, a) => w.readPage(a.path),
|
|
33
33
|
},
|
|
34
34
|
write_page: {
|
|
35
|
-
description: "Write a page following templates/<type>.md; updates index and log and commits. type: topic, decision, dropped, open-loop, plan, house-rules. scope: main or project:<name>.",
|
|
35
|
+
description: "Write a page following templates/<type>.md; updates index and log and commits. type: topic, decision, dropped, open-loop, plan, meeting, house-rules. scope: main or project:<name>.",
|
|
36
36
|
input: { scope: z.string(), type: z.string(), slug: z.string(), summary: z.string(), content: z.string() },
|
|
37
37
|
run: (w, a) => w.writePage(a),
|
|
38
38
|
},
|
package/dist/wiki.js
CHANGED
|
@@ -126,6 +126,8 @@ export class Wiki {
|
|
|
126
126
|
throw new WikiError(`Unknown type "${input.type}". Use one of: ${[...PAGE_TYPES, "house-rules"].join(", ")}.`);
|
|
127
127
|
}
|
|
128
128
|
const type = input.type;
|
|
129
|
+
if (type === "meeting" && prefix !== "")
|
|
130
|
+
throw new WikiError('meeting is main-only. Use scope "main".');
|
|
129
131
|
if (!SLUG.test(input.slug.replace(DATED, ""))) {
|
|
130
132
|
throw new WikiError(`Invalid slug "${input.slug}". Use lowercase letters, digits and hyphens.`);
|
|
131
133
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "whywiki",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "The logbook of all your work: plain markdown that AI agents read before working and write as things happen",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|