sumibako 0.2.1 → 0.2.2

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 (3) hide show
  1. package/index.mjs +969 -911
  2. package/package.json +1 -1
  3. package/SKILL.md +0 -235
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sumibako",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "File the plans, specs and notes your coding agent writes into your Sumibako vault, and get a shareable link back.",
5
5
  "type": "module",
6
6
  "bin": {
package/SKILL.md DELETED
@@ -1,235 +0,0 @@
1
- ---
2
- name: sumibako
3
- description: File a plan, spec, ADR, handoff note or research report into the user's Sumibako vault and get back a link they can send to someone. Use when the user asks to save, file, publish or share a document you wrote, or asks for "a link to this", or says a teammate needs to read it. Also use to read, amend or take down a page already in the vault, and to search what is there before writing something new.
4
- license: MIT
5
- compatibility: Requires Node 18+ and network access to sumibako.com
6
- allowed-tools: Bash(npx sumibako search:*) Bash(npx sumibako open:*) Bash(npx sumibako whoami)
7
- metadata:
8
- author: sumibako
9
- version: "0.2.1"
10
- ---
11
-
12
- <!--
13
- `allowed-tools` covers the three commands that only read.
14
-
15
- Deliberately not `publish`, `edit`, `append` or `unpublish`. Publishing puts a
16
- document on the open web and the rest change what is in somebody's vault, and
17
- a skill that pre-approved those would be using this field to talk its way past
18
- the confirmation a person actually wants. Looking things up is the part where
19
- a prompt is pure friction, so that is the part this covers.
20
- -->
21
-
22
-
23
- # Filing documents in Sumibako
24
-
25
- Sumibako is the user's notes vault. This skill puts a Markdown document you
26
- wrote into it and, on request, gives you a public link to hand back.
27
-
28
- ## When to use this
29
-
30
- Reach for it when a document you produced needs to outlive the session or be
31
- read by somebody who is not in it:
32
-
33
- - The user says "save this", "file this", "put this in my notes", "publish
34
- this", "give me a link", "send this to my team", "I need to share this".
35
- - You finished a plan, spec, design, ADR, migration checklist, incident
36
- write-up, research summary or handoff note, and the user wants to keep it.
37
- - You are picking up work and want to know what is already written down:
38
- `sumibako search`, or `sumibako search` with no words to see the vault.
39
- - The user wants something already filed changed: a section added to a running
40
- log, a decision corrected, a page taken back off the web.
41
-
42
- Do **not** use it for things that belong in the repository. Code, tests,
43
- configuration and specs that are reviewed alongside a diff go in the repo and
44
- through a pull request. This is for the documents whose audience is a person,
45
- not a compiler, and often a person who will never open the repo.
46
-
47
- ## Connecting, the first time
48
-
49
- **There is no setup step to do in advance, and nothing for the user to paste.**
50
- Run the command you were going to run. If this machine is not connected yet,
51
- the command prints a link and stops with **exit code 3** without doing any
52
- work:
53
-
54
- ```
55
- Connect this machine to Sumibako:
56
- https://sumibako.com/connect?code=WXYZ-4821
57
-
58
- It should show the code WXYZ-4821. If it does not, the
59
- page belongs to a different request - close it.
60
-
61
- Then run the same command again.
62
- ```
63
-
64
- When you see exit code 3:
65
-
66
- 1. **Give the user the link exactly as printed**, along with the code, and ask
67
- them to open it and approve the request. Do not shorten it, do not describe
68
- it, do not put it behind other text.
69
- 2. **Do not wait, poll, or retry in a loop.** Finish your turn. Nothing is
70
- pending on your side.
71
- 3. **When the user says they have approved it, run the same command again.** It
72
- collects the token and carries on with the original job in one step. You do
73
- not need to run `login` separately.
74
-
75
- Nothing else about this is yours to handle:
76
-
77
- - **Never ask the user for a token**, and never offer to take one in chat. A
78
- token pasted into a conversation is a credential in a transcript.
79
- - **Never run `npx sumibako login` on your own.** It waits for a person, which
80
- is the one thing your shell cannot do. The flow above exists so you do not
81
- have to.
82
- - **Exit code 3 is not a failure.** It means "not connected yet". Any other
83
- non-zero code is a real error and worth reading.
84
-
85
- If the user would rather paste a token they already have, `npx sumibako login
86
- --token <token>` takes one, and CI sets `SUMIBAKO_TOKEN` in the environment and
87
- skips all of this.
88
-
89
- ## Filing a document
90
-
91
- Write the Markdown to a file first, then publish the file. Do not pipe a
92
- document through the command line.
93
-
94
- ```bash
95
- npx sumibako publish docs/plans/auth-rewrite.md
96
- ```
97
-
98
- To get a link the user can send to someone:
99
-
100
- ```bash
101
- npx sumibako publish docs/plans/auth-rewrite.md --public
102
- ```
103
-
104
- The command prints the page's link, and the public link when there is one.
105
- Give the user the public link verbatim. Do not paraphrase or shorten it.
106
-
107
- ### Before you pass `--public`
108
-
109
- `--public` puts the document on the open web. Anyone with the link can read it
110
- without signing in. It is not indexed by search engines, and that is the only
111
- protection it has.
112
-
113
- So do two things first, both briefly:
114
-
115
- 1. **Read what you are about to publish** and check it carries no credentials,
116
- customer data or anything else that should not leave the repository. If you
117
- find something, say so and stop; do not publish it and ask afterwards.
118
- 2. **Say in one line what will become readable**, then publish.
119
-
120
- Keep this to a sentence. It is a check, not a report - narrating the audit at
121
- length is worse than not doing it, because the user stops reading and the one
122
- time it matters gets skipped with everything else.
123
-
124
- If you are unsure whether the user wants it on the web, publish privately
125
- first. `publish` without `--public` files the page and nothing leaves the
126
- account, and `--public` afterwards is one more command.
127
-
128
- ### The permission prompt is not an error
129
-
130
- Publishing reaches the internet, so an agent harness may well stop and ask the
131
- user before the command runs. That is the harness doing its job, and it happens
132
- before Sumibako sees anything.
133
-
134
- When it happens:
135
-
136
- - **Do not retry the command in a loop**, and do not reach for a different tool.
137
- Nothing failed.
138
- - **Do not tell the user that publishing was blocked or that something went
139
- wrong.** Tell them the command is waiting for their approval, and what it will
140
- publish.
141
- - If they approve, run it once. If they decline, leave it and say the document
142
- is still local.
143
-
144
- ## The one rule that matters
145
-
146
- **A file is filed under its path in the repository, so publishing the same file
147
- again updates the same page.** Run it after every revision. You will not create
148
- duplicates, and the user's link keeps working and keeps showing the current
149
- version.
150
-
151
- Only pass `--new` when the user genuinely wants a second, separate page - a new
152
- incident, a different feature. Reaching for it out of caution is how a vault
153
- fills up with eleven copies of one plan.
154
-
155
- ## Changing a page instead of replacing it
156
-
157
- `publish` replaces the whole page, which is right when you still hold the file.
158
- When you do not - the page was written in the app, or in a session that has
159
- ended - read it and change the part that is wrong:
160
-
161
- ```bash
162
- npx sumibako open docs/plans/auth.md --markdown # the page, as Markdown
163
- ```
164
-
165
- That Markdown is the page. Add to it, or replace an exact piece of it:
166
-
167
- ```bash
168
- # add a line to the end, without sending the rest back
169
- npx sumibako append docs/decisions.md "- 2026-09-06: chose Postgres over Dynamo"
170
-
171
- # correct one sentence
172
- npx sumibako edit docs/plans/auth.md \
173
- --find "We will ship this in Q3." \
174
- --replace "We will ship this in Q4, after the migration."
175
-
176
- # rename
177
- npx sumibako edit docs/plans/auth.md --title "Auth rewrite, revised"
178
- ```
179
-
180
- **`--find` must match exactly once.** It is matched against the Markdown that
181
- `open --markdown` prints, not against the words as they look in the app, so
182
- read the page first and paste from what you read. If it appears twice the
183
- command refuses rather than guessing - quote more of the surrounding lines and
184
- try again. Do not work around this by replacing the whole page unless the user
185
- asked for a rewrite.
186
-
187
- Prefer `append` over reading and re-publishing a page you are only adding to.
188
- It sends one line instead of the whole document and cannot disturb the rest.
189
-
190
- ## The rest of the commands
191
-
192
- ```bash
193
- npx sumibako search "auth rewrite" # what is already written down
194
- npx sumibako search # or list the newest pages
195
- npx sumibako open docs/plans/auth.md # the links for a page
196
- npx sumibako open docs/plans/auth.md --markdown # and the page itself
197
- npx sumibako unpublish docs/plans/auth.md # take the link off the web
198
- ```
199
-
200
- ## Writing for it
201
-
202
- The document is rendered as a real page, so ordinary Markdown pays off:
203
-
204
- - **The first heading becomes the page title.** Start with one `#` line saying
205
- what the document is. Or put `title:` in YAML frontmatter.
206
- - Headings, lists, task lists, tables, blockquotes, links and fenced code all
207
- render properly. Tables are worth using for options and trade-offs.
208
- - Code fences keep their language and get syntax highlighting.
209
- - `> [!NOTE]` and `> [!WARNING]` become a bold label on the quote.
210
-
211
- Two things degrade, and the command tells you when they do:
212
-
213
- - **Mermaid diagrams** render as plain code, not pictures. A short prose
214
- description alongside the diagram is worth adding.
215
- - **Raw HTML** is kept as text.
216
-
217
- ## What it will not do
218
-
219
- - It cannot delete a page. The user does that in the app. `unpublish` takes the
220
- link off the web and leaves the writing alone.
221
- - It cannot make a page findable by search engines. Published pages carry
222
- `noindex`; the user turns that on themselves if they want it, per page.
223
- - It cannot read or write anyone else's vault.
224
-
225
- ## Errors worth reading
226
-
227
- - `400` - the request was wrong, and the message says how. From an edit this
228
- is usually a `--find` that matched nothing or matched twice. Read the page
229
- with `open --markdown` and quote it exactly.
230
- - `401` - the token was revoked. The CLI forgets it, so running the same
231
- command again starts a fresh connect and prints a link. Relay that link.
232
- - `403` - the token is not allowed to publish. The user can create one that is.
233
- - `409` - the plan's page limit is reached. Report the message; it says which.
234
- - `413` - the document is too long. Split it.
235
- - `429` - too many requests. Wait the number of seconds it names.