k0-board 0.1.2 → 0.3.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/skills/k0-changelog/SKILL.md +96 -0
- package/CHANGELOG.md +185 -1
- package/README.md +289 -20
- package/bin/k0-board.js +51 -3
- package/package.json +6 -3
- package/platform/contract.js +30 -0
- package/platform/darwin/index.js +18 -3
- package/platform/darwin/servers.js +16 -0
- package/platform/index.js +9 -1
- package/platform/linux/index.js +18 -1
- package/platform/linux/servers.js +41 -0
- package/platform/shared/listeners.js +121 -0
- package/platform/shared/servers.js +111 -0
- package/platform/win32/index.js +15 -1
- package/platform/win32/servers.js +73 -0
- package/server/changelog.js +242 -0
- package/server/db.js +69 -0
- package/server/git.js +135 -0
- package/server/guard.js +31 -0
- package/server/idle.js +56 -0
- package/server/index.js +177 -36
- package/server/launcher.js +5 -1
- package/server/machine.js +9 -0
- package/server/paths.js +5 -4
- package/server/servers.js +481 -0
- package/server/settings.js +121 -0
- package/server/watcher.js +8 -1
- package/server/writer.js +128 -0
- package/web/board.css +137 -7
- package/web/board.js +285 -10
- package/web/changelog.css +185 -0
- package/web/changelog.html +43 -0
- package/web/changelog.js +298 -0
- package/web/index.html +8 -2
- package/web/recency.js +86 -0
- package/web/view.js +3 -1
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: k0-changelog
|
|
3
|
+
description: Writes the summary of a stretch of work — what got committed, what is already online, what is still sitting on this machine — from the facts k0 hands over on standard input. k0 calls it by itself when somebody opens the ChangeLog page, and it is what turns a list of commits into something a person can read. Use this skill when the user types "/k0-changelog", or asks "what did I do yesterday", "write up my week", "summarise what I shipped". Do not use it to look the facts up: they arrive on standard input already, and this skill never runs git itself.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /k0-changelog
|
|
7
|
+
|
|
8
|
+
You are handed, on standard input, a JSON description of everything that happened in a stretch
|
|
9
|
+
of time across somebody's repositories. Write it up so they can read it over a coffee and know
|
|
10
|
+
where they stand.
|
|
11
|
+
|
|
12
|
+
Your entire reply is the summary. It is printed as it is, so there is no room for a preamble,
|
|
13
|
+
no "here is your summary", no closing offer of further help, and no code fence around the
|
|
14
|
+
whole thing. Markdown, starting at the first word that belongs to the summary.
|
|
15
|
+
|
|
16
|
+
## What arrives
|
|
17
|
+
|
|
18
|
+
```json
|
|
19
|
+
{
|
|
20
|
+
"period": "yesterday",
|
|
21
|
+
"from": "…", "to": "…",
|
|
22
|
+
"totals": { "repositories": 3, "commits": 11, "online": 9, "local": 2, "dirty": 4, … },
|
|
23
|
+
"repositories": [
|
|
24
|
+
{
|
|
25
|
+
"name": "k0",
|
|
26
|
+
"commits": [{ "at": "…", "subject": "…", "body": "…", "online": true }],
|
|
27
|
+
"unpushed_total": 2,
|
|
28
|
+
"uncommitted_files": ["web/board.js"],
|
|
29
|
+
"unreleased_changelog": ["### Fixed", "- the board stays pinned to the bar"],
|
|
30
|
+
"cards": [{ "title": "…", "description": "…", "status": "IDLE", "done": false }]
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
`online: true` means that commit has left this machine. `online: false` means it is done but
|
|
37
|
+
still only here. `unpushed_total` counts those from before this window too — a commit made on
|
|
38
|
+
Tuesday and still sitting here on Friday is worth a mention.
|
|
39
|
+
|
|
40
|
+
## What to write
|
|
41
|
+
|
|
42
|
+
**One opening paragraph**, no heading above it. Two or three sentences: how many repositories
|
|
43
|
+
were touched, what actually got out, and what did not. Write the sentence you would say out
|
|
44
|
+
loud if somebody asked how yesterday went — not a table read aloud.
|
|
45
|
+
|
|
46
|
+
**Then one block per repository**, in the order they arrive:
|
|
47
|
+
|
|
48
|
+
```markdown
|
|
49
|
+
## k0
|
|
50
|
+
|
|
51
|
+
**The zoom moves ten per cent at a time, and the button that puts a column away stays put.**
|
|
52
|
+
|
|
53
|
+
Two touches to the board. The zoom used to jump in steps too wide to land on 90%, and the
|
|
54
|
+
button that folds a column away appeared and disappeared depending on the session: now it is
|
|
55
|
+
always there.
|
|
56
|
+
|
|
57
|
+
- The zoom goes down ten per cent a click, so 90% is one click away
|
|
58
|
+
- The button that puts a column away no longer blinks with the session
|
|
59
|
+
- The `Old` column now reads like `Others`
|
|
60
|
+
|
|
61
|
+
**Done, not online yet:** two commits still on this machine, and three changelog lines written
|
|
62
|
+
but not yet closed into a version.
|
|
63
|
+
**Still half-done:** three files changed and never committed.
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
The bold first line is the point of the whole thing: it says **what is different now**, not
|
|
67
|
+
what was modified. Not "the zoom step was made configurable" but "the zoom moves ten per cent
|
|
68
|
+
at a time". If you cannot say what is different, the commit subjects will usually say it for
|
|
69
|
+
you — they were written by the same person you are writing for.
|
|
70
|
+
|
|
71
|
+
Keep a block short. A paragraph, a handful of bullets, and the two closing lines when there is
|
|
72
|
+
something to put in them. This is a summary somebody reads standing up.
|
|
73
|
+
|
|
74
|
+
## Rules
|
|
75
|
+
|
|
76
|
+
- **Write in the language of the facts.** The commit subjects and the card titles tell you what
|
|
77
|
+
language this person works in: write in that one, and do not translate anything. The headings,
|
|
78
|
+
the bold lines, the bullets — all of it in their language.
|
|
79
|
+
- **Leave the words of the trade alone.** *commit*, *push*, *branch*, *changelog* are what these
|
|
80
|
+
things are called in every language, and they do not decline: six commits, not *sei commessi*.
|
|
81
|
+
Translate the sentence around them, never the word itself.
|
|
82
|
+
- **Do not invent.** If a commit subject does not say what it did, say what it says and leave
|
|
83
|
+
it there. A summary that guesses is worse than a summary that is short.
|
|
84
|
+
- **What changed for whoever uses the thing, not which function moved.** No file paths, no
|
|
85
|
+
function names, no jargon, unless the repository itself is a tool for programmers and the
|
|
86
|
+
commit already speaks that way.
|
|
87
|
+
- **Never print commit hashes.** They are not in what you are given, and they should not be in
|
|
88
|
+
what you write.
|
|
89
|
+
- **Leave out the two closing lines when they are empty.** No "nothing left half-done": an
|
|
90
|
+
absent line already says that, and a line saying nothing is one more line to read.
|
|
91
|
+
- **No emoji and no exclamation marks.** Nothing is exciting; things happened.
|
|
92
|
+
- **If a repository has only uncommitted files and nothing else**, that is still worth a block —
|
|
93
|
+
it just says work is in progress there, and what it is about.
|
|
94
|
+
- **If `repositories` is empty**, write one line saying so and stop. Do not pad it out, do not
|
|
95
|
+
encourage anybody, do not suggest what they might do next. Nothing happened, and saying that
|
|
96
|
+
plainly is the whole job.
|
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,188 @@ All notable changes to this project are documented here. The format follows
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.3.0]
|
|
10
|
+
|
|
11
|
+
k0 could already tell you what each session was costing you in memory, and `Close` on a card was
|
|
12
|
+
already how you gave it back. This version is k0 remembering to do that for you: a terminal left
|
|
13
|
+
untouched all day is shut by itself, and the card it belongs to stays exactly where it was, ready
|
|
14
|
+
to be picked up again. It is careful about which ones — never one that is working, never one with
|
|
15
|
+
a question on screen — and it is the first thing in k0 you can change without changing k0, in a
|
|
16
|
+
settings file that writes itself.
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- **The terminals you have stopped using close themselves, and the work stays.** A session left
|
|
21
|
+
open goes on costing memory whether or not anybody is looking at it — the `claude` process, the
|
|
22
|
+
MCP servers it started, the browsers those opened — and `Close` on a card has always been the
|
|
23
|
+
cure. Now k0 remembers to do it for you: **after twelve hours with nothing happening, a yellow
|
|
24
|
+
card's terminal is shut and its memory given back**. Nothing is lost. The card stays exactly
|
|
25
|
+
where it is with the status it had, and **Resume** picks the conversation up where it was, the
|
|
26
|
+
same as it always did. Only yellow — *Your turn* — is ever touched: a card that is **working**
|
|
27
|
+
is somebody mid-thought, and a card with a **question or a plan on screen** would lose the very
|
|
28
|
+
thing it was showing you, because a dialog that is open has not been written to the transcript
|
|
29
|
+
yet. A session sitting in a **shell** is left alone too — there may be a command of yours
|
|
30
|
+
running in it, and k0 cannot see what. A window you were using an hour ago is never closed,
|
|
31
|
+
whatever the card's history says: every clock k0 has for that session is consulted and the
|
|
32
|
+
newest one wins.
|
|
33
|
+
- **A card says who closed it, and the top bar says the closing is on.** Where a card used to read
|
|
34
|
+
*session closed* it now reads *closed automatically* if it was k0 that tidied it away — same
|
|
35
|
+
italic, same place, one word different. And the memory chip at the end of the top bar carries the
|
|
36
|
+
hours in lighter type: **RAM 79% · CPU 19% · closes at 8h**, with the whole sentence on hover.
|
|
37
|
+
That is where it belongs, because that is where the memory is already being talked about, and
|
|
38
|
+
something that closes your windows for you should never be a surprise. Switched off, the chip
|
|
39
|
+
says nothing rather than *0h* — which would read as "closes immediately" — and the hover says so
|
|
40
|
+
instead.
|
|
41
|
+
- **Settings, in a file that is the list of them.** `~/.k0/config.json` — on Windows
|
|
42
|
+
`%LOCALAPPDATA%\k0\config.json` — written out on the first run with every setting already in it
|
|
43
|
+
at its default, so opening it is how you find out what there is to change. It sits beside the
|
|
44
|
+
board rather than inside the app, so an update cannot throw it away, and k0 picks up a change by
|
|
45
|
+
itself without anything being restarted. `closeIdleTerminalsAfterHours` is the first entry:
|
|
46
|
+
**set it to `0` and the closing above never happens**. There is no settings page on the board and
|
|
47
|
+
there is not going to be one — the board is for what changes during a working day —
|
|
48
|
+
so `k0-board doctor` prints the whole list too, with what is in force and where the file is.
|
|
49
|
+
|
|
50
|
+
### Fixed
|
|
51
|
+
|
|
52
|
+
- **Resuming a session no longer types the old prompt back in.** A card's prompt belongs to the
|
|
53
|
+
moment the session starts; on **Resume** the conversation had already answered it hours ago, and
|
|
54
|
+
putting it back under the cursor was at best something stale in the way — at worst it was sent,
|
|
55
|
+
because where pasting is not available k0 types it instead. Start is unchanged.
|
|
56
|
+
|
|
57
|
+
## [0.2.0]
|
|
58
|
+
|
|
59
|
+
k0 could always tell you how the work stood. This version lets it tell you whether the work is
|
|
60
|
+
*running*: a globe in each column heading says whether that repository's site is up, and switches
|
|
61
|
+
it on or off from the board. The server it starts belongs to nobody and outlives everything —
|
|
62
|
+
the session that asked for it, the other sessions, and k0 itself — which is the one thing a dev
|
|
63
|
+
server started inside a session could never do.
|
|
64
|
+
|
|
65
|
+
### Added
|
|
66
|
+
|
|
67
|
+
- **A globe next to every repository: is the site up, and one click to change it.** Last on a
|
|
68
|
+
column's heading, after the git mark. Grey is off, green is up, it breathes while it is coming
|
|
69
|
+
up, and red means it was started and did not come up — with the reason and the log a hover
|
|
70
|
+
away. **One click switches it, two restart it**, and while it is green the repository's **name
|
|
71
|
+
is underlined with a green dashed line** and becomes a link that opens the site in another tab,
|
|
72
|
+
on the port it is really listening on. The line is the same green as the globe and stays for as
|
|
73
|
+
long as the server does, so a repository that is up can be told apart from across the board
|
|
74
|
+
without going near it. A
|
|
75
|
+
repository gets one when its `package.json` has a `dev` script, or failing that a `serve` one:
|
|
76
|
+
nothing to configure, nothing to fill in. The point of it is where the server lives: k0 starts
|
|
77
|
+
it **detached and owned by nobody**, so it survives the session that asked for it, every other
|
|
78
|
+
session, and k0 restarting under it. A dev server started inside a session belongs to that
|
|
79
|
+
session and dies with it, which is what made "is the site up" a question nobody could answer
|
|
80
|
+
from the board. k0 also **never asks the server whether it is up** — it makes no network
|
|
81
|
+
requests, here as everywhere else — so "up" means the process is alive and the system says it
|
|
82
|
+
is holding a TCP port open, which is both stronger evidence and where the real port in the
|
|
83
|
+
tooltip comes from. And a server **you** started by hand in a terminal turns the globe green on
|
|
84
|
+
its own within a few seconds, and switches off from the board like any other: a globe that only
|
|
85
|
+
knew about its own servers would sit grey next to a site that is plainly running. On Windows
|
|
86
|
+
that last part is missing, because nothing there can read another process's working directory,
|
|
87
|
+
and k0 says so instead of drawing those servers as off. Tried on a real board, against a
|
|
88
|
+
repository that had a `server-restart` skill to compare with: the globe went green on port
|
|
89
|
+
4321 — read off the running process, not off the port written in the skill — the name opened
|
|
90
|
+
the site, a double click brought it back on a new process with nothing orphaned behind it, and
|
|
91
|
+
a server started by hand in a terminal was picked up and then switched off from the board. And
|
|
92
|
+
the one that matters: after `k0-board restart` the globe was still green and the site still
|
|
93
|
+
answering on the same process.
|
|
94
|
+
|
|
95
|
+
### Changed
|
|
96
|
+
|
|
97
|
+
- **A column's heading is two groups now, and the count of post-its is gone.** What you press is
|
|
98
|
+
on the left — the `+` and the fold — and what tells you how things stand is on the right: the
|
|
99
|
+
git mark, and the globe after it. The number that used to follow the repository name has been
|
|
100
|
+
taken out. It sat in the middle of the row taking up the room the name now uses, and it was
|
|
101
|
+
never the answer to a question anybody had: the post-its are right there to be counted, and
|
|
102
|
+
the number moved every time a filter did. Long repository names now give up characters to an
|
|
103
|
+
ellipsis instead of pushing the marks off the end of the row.
|
|
104
|
+
|
|
105
|
+
### Fixed
|
|
106
|
+
|
|
107
|
+
- **A tab left open no longer shows you the old interface.** k0 sent its own pages and stylesheets
|
|
108
|
+
with no instruction about keeping them, so the browser decided for itself — and a board left
|
|
109
|
+
open all day went on using the stylesheet it loaded that morning. It showed up the first time
|
|
110
|
+
the globe arrived: the servers switched on and off correctly and the board redrew every second,
|
|
111
|
+
but the heading kept the shape it had before, because the page redraws itself and the stylesheet
|
|
112
|
+
does not. After an update it is worse than confusing: the new k0 on disk, the old one on screen.
|
|
113
|
+
They are a few kilobytes over a connection to your own machine, so nothing is kept now.
|
|
114
|
+
|
|
115
|
+
- **`Close` gives the memory back without closing the work.** A link at the end of a card's row,
|
|
116
|
+
after `Done` and quieter than it: it stops the session and shuts its terminal — which is where
|
|
117
|
+
the memory was going — and leaves the card exactly where it is, with the colour it had. The one
|
|
118
|
+
asking you something stays red, the one holding a plan up stays amber, the one at your turn
|
|
119
|
+
stays yellow, and `Resume` picks the conversation up where it left off. Until now the only way
|
|
120
|
+
to give a machine its memory back was `Done`, which also declares the work finished, so a dozen
|
|
121
|
+
windows open meant choosing between a struggling computer and a board that lies. It is not there
|
|
122
|
+
while a session is working: stopping one mid-thought is not memory saved, it is work lost. Tried
|
|
123
|
+
on a real board, on a session weighing 380 MB: the window and the process were gone in a second
|
|
124
|
+
and a bit, the card stayed where it was, and `Resume` came back to the same conversation.
|
|
125
|
+
- **A ChangeLog page that tells you what you have been doing.** The list-shaped button next to
|
|
126
|
+
the `+` opens a page of its own that reads like a release note: an opening paragraph on how the
|
|
127
|
+
day went, then one block per repository saying what is different now — and, underneath it, what
|
|
128
|
+
is **done but not out yet**. A commit still sitting on your machine, changelog lines written
|
|
129
|
+
but never closed into a version, files never committed. Four windows across the top — Today,
|
|
130
|
+
Yesterday, Week, Month — and it opens on none of them: it opens on the last day you actually
|
|
131
|
+
worked, so on a Monday you get Friday instead of an empty page. Only repositories you touched
|
|
132
|
+
in that window appear, so the one that has been dirty since March stops turning up every
|
|
133
|
+
morning as if it were news, and only your own commits are counted, so a repository shared with
|
|
134
|
+
other people still tells you about your day. The facts sit folded under each block, one line to
|
|
135
|
+
open them, with every commit marked green if it is online and amber if it is still only here.
|
|
136
|
+
The words are written by the Claude Code already on your machine — no key to paste, no account
|
|
137
|
+
to configure, nothing leaving the machine — and they come out in the language you commit in,
|
|
138
|
+
because they are written out of your own commit messages. Nothing is stored: the page is
|
|
139
|
+
written again every time you open it. Without Claude Code it still opens, with the facts and a
|
|
140
|
+
line saying why the rest is missing.
|
|
141
|
+
- **The board keeps itself down to what you are working on.** A repository you have not touched
|
|
142
|
+
since the day before your last piece of work folds away by itself: its column leaves the board
|
|
143
|
+
and its name appears in `Old`, the new column next to `Others` and built exactly like it — a
|
|
144
|
+
`+`, a name and the git mark. Click that row and the column comes back at full width for the
|
|
145
|
+
rest of the visit, with everything that was in it. There is nothing to switch on — with a dozen
|
|
146
|
+
repositories open, you arrive in the morning and the three or four you are actually on are the
|
|
147
|
+
ones standing there, side by side. The day is counted back from your last piece of work rather
|
|
148
|
+
than from the clock, so on Monday you find Friday's work instead of an empty board. A column
|
|
149
|
+
with something going on in it — working, planning, asking you something, holding a plan up for
|
|
150
|
+
approval — never folds, whatever its age; a terminal simply left open at *Your turn* folds like
|
|
151
|
+
anything else, and folding closes nothing. And nothing folds while you are looking at it: the
|
|
152
|
+
board tidies itself on the next reload, never out from under your hands.
|
|
153
|
+
- **A column can be put away now.** Next to a column's `+`, a button that folds it immediately
|
|
154
|
+
instead of waiting for it to go quiet — for a repository you are finished with for the day. It
|
|
155
|
+
goes faint and refuses on a column with something going on in it, and says why if you hover it.
|
|
156
|
+
It is remembered across reloads, until you fetch the column back or something in it wakes up.
|
|
157
|
+
It closes nothing: no session is stopped and no terminal is shut. What closes a session is
|
|
158
|
+
`Close` or `Done` on a card.
|
|
159
|
+
- **The installation ends on the board.** `npx k0-board` now opens it in your browser once
|
|
160
|
+
everything is in place, after the cards have been imported, so the first thing you see is your
|
|
161
|
+
own work and there is no address to copy out of the terminal. `--no-open` finishes without it,
|
|
162
|
+
for installing over SSH. Where the name `k0.localhost` does not resolve, k0 falls back to
|
|
163
|
+
`127.0.0.1` rather than leaving you on a blank page.
|
|
164
|
+
|
|
165
|
+
### Changed
|
|
166
|
+
|
|
167
|
+
- **The zoom goes ten per cent at a time.** `+` and `−` used to jump from 100% straight to 80%,
|
|
168
|
+
or up to 125%: the steps in between simply did not exist, and the only way to a size like 90%
|
|
169
|
+
was a pinch on the trackpad — if you knew to try it. Now every click is ten points — 90%, 80%,
|
|
170
|
+
70% and so on, still stopping at 30% and 200% — so where the next one lands is something you
|
|
171
|
+
can guess before you press it. The pinch still gets you to anything in between, and from there
|
|
172
|
+
the next click picks the nearest step.
|
|
173
|
+
- **Nothing here changes what you see using k0.** The work went underneath, and it was worth doing
|
|
174
|
+
for two reasons. The tests now run on the machinery Node already ships with rather than on a loop
|
|
175
|
+
written by hand, which turns seven pass-or-fail files into five hundred and twenty-one named
|
|
176
|
+
checks — still a quarter of a second, still nothing to install, but a failure now names the one
|
|
177
|
+
thing that broke instead of the file it was in. And two parts that had never been tested at all
|
|
178
|
+
are: the one that decides whether a request reaching k0 may be answered, which is what stands
|
|
179
|
+
between a web page you happen to have open and a program that opens terminals on your machine,
|
|
180
|
+
and the one that keeps your cards, which is where a mistake loses work you cannot get back.
|
|
181
|
+
Every build from now on refuses to go backwards on how much of k0 is covered.
|
|
182
|
+
- **The reasoning behind k0 is now written down where it can be found.** Two documents for whoever
|
|
183
|
+
works on it: the shape of what k0 remembers, and how its tests are put together and what they
|
|
184
|
+
deliberately leave alone. Neither is shipped with the package.
|
|
185
|
+
- **Nothing changes for you here either.** Putting out a new version of k0 — the documents brought
|
|
186
|
+
up to date, the tests run, and the version that reaches the registry — is now one road written
|
|
187
|
+
down rather than a sequence somebody has to remember, with a single stop to ask before the step
|
|
188
|
+
that cannot be undone. Like the two documents above, it is for whoever works on k0 and is not in
|
|
189
|
+
the package.
|
|
190
|
+
|
|
9
191
|
## [0.1.2]
|
|
10
192
|
|
|
11
193
|
Two things that were in the way every day: a field nobody needed, and a notification that opened
|
|
@@ -92,7 +274,9 @@ here is everything that had to change for it to be somebody else's tool as well.
|
|
|
92
274
|
- The personal fixtures k0 grew up on. `test/clean.test.mjs` now fails the build if any of them
|
|
93
275
|
come back.
|
|
94
276
|
|
|
95
|
-
[Unreleased]: https://github.com/alessio-ragni/k0-board/compare/v0.
|
|
277
|
+
[Unreleased]: https://github.com/alessio-ragni/k0-board/compare/v0.3.0...HEAD
|
|
278
|
+
[0.3.0]: https://github.com/alessio-ragni/k0-board/compare/v0.2.0...v0.3.0
|
|
279
|
+
[0.2.0]: https://github.com/alessio-ragni/k0-board/compare/v0.1.2...v0.2.0
|
|
96
280
|
[0.1.2]: https://github.com/alessio-ragni/k0-board/compare/v0.1.1...v0.1.2
|
|
97
281
|
[0.1.1]: https://github.com/alessio-ragni/k0-board/compare/v0.1.0...v0.1.1
|
|
98
282
|
[0.1.0]: https://github.com/alessio-ragni/k0-board/releases/tag/v0.1.0
|