k0-board 0.4.0 → 0.5.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.
Files changed (73) hide show
  1. package/.claude/skills/k0-changelog/SKILL.md +2 -2
  2. package/.claude/skills/k0-discuss/SKILL.md +105 -0
  3. package/.claude/skills/k0-discuss/references/rounds.md +280 -0
  4. package/.claude/skills/k0-epic/SKILL.md +196 -0
  5. package/.claude/skills/k0-links/.claude-plugin/plugin.json +6 -0
  6. package/.claude/skills/k0-links/hooks/hooks.json +1 -0
  7. package/.claude/skills/k0-links/hooks/links.js +128 -0
  8. package/.claude/skills/k0-links/hooks/register.js +204 -0
  9. package/.claude/skills/k0-next/SKILL.md +82 -0
  10. package/.claude/skills/k0-order/SKILL.md +123 -0
  11. package/.claude/skills/k0-plan/SKILL.md +156 -0
  12. package/.claude/skills/k0-split/SKILL.md +169 -0
  13. package/.claude/skills/k0-story/SKILL.md +108 -0
  14. package/.claude/skills/k0-ultracode/SKILL.md +251 -0
  15. package/.claude/skills/k0-ultracode/references/agent-brief.md +71 -0
  16. package/.claude/skills/k0-ultracode/references/modes.md +49 -0
  17. package/.claude/skills/k0-verify/SKILL.md +219 -0
  18. package/.claude/skills/k0-whatsnew/SKILL.md +95 -0
  19. package/.claude/skills/k0-work/SKILL.md +212 -0
  20. package/CHANGELOG.md +361 -1
  21. package/README.md +931 -111
  22. package/bin/k0-board.js +79 -11
  23. package/menubar/K0MenuBar.swift +35 -5
  24. package/package.json +13 -1
  25. package/platform/contract.js +30 -5
  26. package/platform/darwin/terminal.js +230 -56
  27. package/platform/index.js +2 -1
  28. package/platform/linux/index.js +3 -0
  29. package/platform/linux/tray.py +10 -10
  30. package/platform/shared/command.js +19 -3
  31. package/platform/shared/tmux.js +32 -14
  32. package/platform/win32/index.js +5 -2
  33. package/platform/win32/terminal.js +24 -8
  34. package/platform/win32/tray.ps1 +13 -13
  35. package/server/backlog.js +618 -0
  36. package/server/changelog.js +13 -13
  37. package/server/db.js +1800 -146
  38. package/server/files.js +60 -21
  39. package/server/git.js +53 -14
  40. package/server/idle.js +15 -13
  41. package/server/index.js +1251 -186
  42. package/server/launcher.js +122 -14
  43. package/server/machine.js +10 -1
  44. package/server/mirror.js +1048 -0
  45. package/server/prices.js +59 -0
  46. package/server/projects.js +57 -12
  47. package/server/servers.js +22 -1
  48. package/server/sessions.js +5 -5
  49. package/server/settings.js +25 -2
  50. package/server/update.js +324 -0
  51. package/server/usage.js +642 -0
  52. package/server/watcher.js +67 -13
  53. package/server/worktree.js +600 -0
  54. package/server/writer.js +98 -26
  55. package/web/awake.js +62 -0
  56. package/web/base.css +4 -0
  57. package/web/board.css +396 -16
  58. package/web/board.js +1182 -152
  59. package/web/changelog.js +3 -3
  60. package/web/files.js +73 -16
  61. package/web/index.html +109 -12
  62. package/web/list.css +536 -0
  63. package/web/list.js +1015 -0
  64. package/web/mentions.js +27 -9
  65. package/web/recency.js +10 -10
  66. package/web/units.js +1 -1
  67. package/web/usage.css +169 -0
  68. package/web/usage.html +78 -0
  69. package/web/usage.js +447 -0
  70. package/web/view.js +22 -3
  71. package/web/whatsnew.css +211 -0
  72. package/web/whatsnew.html +49 -0
  73. package/web/whatsnew.js +339 -0
@@ -87,11 +87,11 @@ export function unreleasedSection(md) {
87
87
  * This is the rule that keeps the page honest. A repository that has been dirty since March
88
88
  * and that you have not opened since is not news, and a summary that repeats it every single
89
89
  * morning is a summary you stop reading. Something has to have happened IN the window — a
90
- * commit, a file saved, a card moved — and only then is it worth saying what is still
90
+ * commit, a file saved, a story moved — and only then is it worth saying what is still
91
91
  * outstanding there.
92
92
  */
93
93
  export function isActive(repo) {
94
- return !!(repo && (repo.commits.length || repo.dirty.length || repo.cards.length))
94
+ return !!(repo && (repo.commits.length || repo.dirty.length || repo.stories.length))
95
95
  }
96
96
 
97
97
  /** Keeps only what falls inside a window, and drops the repositories left with nothing. */
@@ -102,7 +102,7 @@ export function narrow(repos, from, to) {
102
102
  ...r,
103
103
  commits: r.commits.filter((c) => inside(Date.parse(c.at))),
104
104
  dirty: r.dirty.filter((f) => inside(f.at)),
105
- cards: r.cards.filter((c) => inside(c.touched)),
105
+ stories: r.stories.filter((c) => inside(c.touched)),
106
106
  }))
107
107
  .filter(isActive)
108
108
  }
@@ -149,9 +149,9 @@ function stampDirty(dir, paths) {
149
149
 
150
150
  async function gather(from, to) {
151
151
  const projects = listProjects().filter((p) => fs.existsSync(path.join(p.path, '.git')))
152
- const cards = db.eventsBetween(from, to)
152
+ const stories = db.eventsBetween(from, to)
153
153
  const byRepo = new Map()
154
- for (const c of cards) {
154
+ for (const c of stories) {
155
155
  if (!byRepo.has(c.project_path)) byRepo.set(c.project_path, [])
156
156
  byRepo.get(c.project_path).push(c)
157
157
  }
@@ -174,7 +174,7 @@ async function gather(from, to) {
174
174
  dirty: stampDirty(p.path, dirty),
175
175
  dirtyTotal: dirty.length,
176
176
  unreleased: unreleasedOf(p.path),
177
- cards: (byRepo.get(p.path) ?? []).map((c) => ({
177
+ stories: (byRepo.get(p.path) ?? []).map((c) => ({
178
178
  title: c.title,
179
179
  description: c.description || '',
180
180
  status: c.status,
@@ -192,8 +192,8 @@ export function totals(repos) {
192
192
  let online = 0
193
193
  let local = 0
194
194
  let dirty = 0
195
- let cardsOpen = 0
196
- let cardsDone = 0
195
+ let storiesOpen = 0
196
+ let storiesDone = 0
197
197
  for (const r of repos) {
198
198
  commits += r.commits.length
199
199
  for (const c of r.commits) {
@@ -201,12 +201,12 @@ export function totals(repos) {
201
201
  else if (c.online === false) local++
202
202
  }
203
203
  dirty += r.dirty.length
204
- for (const c of r.cards) {
205
- if (c.done) cardsDone++
206
- else cardsOpen++
204
+ for (const c of r.stories) {
205
+ if (c.done) storiesDone++
206
+ else storiesOpen++
207
207
  }
208
208
  }
209
- return { repositories: repos.length, commits, online, local, dirty, cardsOpen, cardsDone }
209
+ return { repositories: repos.length, commits, online, local, dirty, storiesOpen, storiesDone }
210
210
  }
211
211
 
212
212
  /**
@@ -228,7 +228,7 @@ export async function facts(period, now = Date.now()) {
228
228
  for (const r of gathered) {
229
229
  for (const c of r.commits) stamps.push(Date.parse(c.at))
230
230
  for (const f of r.dirty) stamps.push(f.at)
231
- for (const c of r.cards) stamps.push(c.touched)
231
+ for (const c of r.stories) stamps.push(c.touched)
232
232
  }
233
233
  const day = lastActiveDay(stamps, now)
234
234
  // Nothing at all in the last month: rather than an arbitrary day, show today and say so.