p-backlog 0.2.4 → 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.
Files changed (43) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/README.md +18 -6
  3. package/README.ru.md +17 -5
  4. package/dist/cli.js +2544 -1536
  5. package/dist/web/assets/{ChartTooltip-BYCfK3J2.js → ChartTooltip-DwQKHXkN.js} +2 -2
  6. package/dist/web/assets/CodeTab-BGxsIZMH.js +1 -0
  7. package/dist/web/assets/CostTab-B21EB-7P.js +1 -0
  8. package/dist/web/assets/EffectTab-97OFZkWY.js +1 -0
  9. package/dist/web/assets/Figure-CiIqHKnb.js +1 -0
  10. package/dist/web/assets/OverviewTab-DeoTLTwg.css +1 -0
  11. package/dist/web/assets/OverviewTab-X_g8WfUl.js +1 -0
  12. package/dist/web/assets/QualityTab-DYnFz37G.js +1 -0
  13. package/dist/web/assets/StatsPage-D9gJHHQg.js +1 -0
  14. package/dist/web/assets/StatsTabState-DbuUIt-D.js +1 -0
  15. package/dist/web/assets/StatsTable-Bd3vAxKU.js +1 -0
  16. package/dist/web/assets/UnavailableRepos-D2iehY7u.js +1 -0
  17. package/dist/web/assets/cx-BZTW4xgb.js +58 -0
  18. package/dist/web/assets/index-BrkoyuWi.js +38 -0
  19. package/dist/web/assets/index-CAKUAPJF.css +1 -0
  20. package/dist/web/assets/paths-ZO6w2vYU.js +1 -0
  21. package/dist/web/assets/value-dot-kiMizZCu.js +1 -0
  22. package/dist/web/index.html +4 -4
  23. package/package.json +1 -2
  24. package/skill/backlog/SKILL.md +10 -5
  25. package/skill/backlog-en/SKILL.md +11 -6
  26. package/dist/server.js +0 -3887
  27. package/dist/web/assets/CodeTab-LYNoYtUt.js +0 -1
  28. package/dist/web/assets/CostTab-BNukfYQ_.js +0 -1
  29. package/dist/web/assets/CostTab-CtmH2WbT.css +0 -1
  30. package/dist/web/assets/EffectTab-Bk8BtfaR.js +0 -1
  31. package/dist/web/assets/Figure-BcMtR7CN.js +0 -1
  32. package/dist/web/assets/OverviewTab-Bv0rKc6p.js +0 -1
  33. package/dist/web/assets/OverviewTab-C-NPX9JB.css +0 -1
  34. package/dist/web/assets/QualityTab-N81paNFO.js +0 -1
  35. package/dist/web/assets/StatsPage-D4P63bqv.js +0 -1
  36. package/dist/web/assets/StatsTabState-BcFrx-N3.js +0 -1
  37. package/dist/web/assets/StatsTable-C8h-1NJ7.js +0 -1
  38. package/dist/web/assets/UnavailableRepos-COXy5-Dn.js +0 -1
  39. package/dist/web/assets/i18n-BO0kwLac.js +0 -58
  40. package/dist/web/assets/i18n-BlPq0Oql.css +0 -1
  41. package/dist/web/assets/index-C-8JzRpY.js +0 -38
  42. package/dist/web/assets/index-DyGLN1aL.css +0 -1
  43. package/dist/web/assets/value-dot-X354sZLx.js +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,51 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.0
4
+
5
+ CLI contract changes (scripts that parse output or exit codes may need updating):
6
+
7
+ - `take --path --json` prints a single JSON array instead of several JSON objects separated by `---`.
8
+ - `new --json` prints the same task object as `show --json` and `take --json` (with progress, blockers and links) instead of the raw stored task.
9
+ - `deletesAt` in `--json` output is a local ISO time with offset, like `created` and `closed`, instead of UTC.
10
+ - `check` exits with `5` only when there are candidates or task problems; project setup problems (no repos, missing repo, shared prefix) are reported with exit code `0`.
11
+ - `service` on a system without autostart support exits with `4` (the command failed) instead of `3` (refused).
12
+ - `backlog`, `backlog --help` and `backlog <command> --help` print help to stdout with exit code `0`.
13
+ - Argument errors are shown in the interface language and followed by the command's usage. Arguments that used to be ignored are now rejected with exit code `1`: extra words after `project list`, `--confirm` outside `project delete`, an empty `list --status`, `take <ID> --project`, `take --next|--path --force`, a `serve --port` that is not a decimal number from 1 to 65535.
14
+ - `serve` and `service install` reject a `PORT` environment variable that is not a decimal number from 1 to 65535 with exit code `1` instead of silently using 4317. `serve` exits with `0` after a clean stop on SIGTERM, SIGINT or SIGHUP.
15
+ - `stats` prints warnings about unparsed task files and journal lines before the "Open" line; `stats --json` has `unparsedTasks` and `invalidJournalLines`. `totals.open`, the age median and the open weight now count tasks by their history, so an open task whose file cannot be parsed is still counted. `forecast.windowWeeks` is replaced by `forecast.windowDays` — the span the weekly rate is computed over.
16
+ - `stats --json` also has `unknownJournalLines`, and `stats` prints a matching warning. A journal line with a renamed or otherwise unrecognized category, "how found" or resolution value is now read as `unknown` and kept in the quality breakdowns (its own row or `byReason.unknown`) instead of silently dropping out.
17
+ - `hook stop` exits with `0` on internal failures (for example, an unreadable backlog directory) and only prints a warning to stderr, so Claude Code on Windows no longer reports a hook error on every turn.
18
+
19
+ Other changes:
20
+
21
+ - `setup` writes `~/.claude/settings.json` atomically, keeps its key order and file mode, and writes through a symlink (including a dangling one) instead of replacing it.
22
+ - Windows service: `service install|uninstall` stops the process from `server.pid` only after checking that it is this p-backlog server; if the check is impossible, the PID file is kept and a warning is printed.
23
+ - The CLI trims `.runs.jsonl` by itself, so the run log no longer grows without the web server.
24
+ - `dist/server.js` is no longer shipped in the npm package.
25
+ - The server stops cleanly on SIGTERM, SIGINT and SIGHUP: it finishes edits already in progress, closes open browser tabs' event streams and removes its PID file, instead of being killed mid-write.
26
+ - The web UI cannot be embedded in another site's frame (`X-Frame-Options: DENY`, CSP `frame-ancestors 'none'`). The CSP loads scripts, styles and images only from the server itself (images also from `data:`), so an external image in a task description is not shown: text written by an agent cannot make the browser contact a third-party host.
27
+ - A file locked by another process for more than 5 seconds is reported by the API as `503` with an explanation instead of `500`.
28
+
29
+ Fixes:
30
+
31
+ - Re-check: the symbol filter looks the task's symbol up at the task's current line, so a candidate is no longer
32
+ dropped (and the anchor re-attached to a neighbouring function) when lines above the task moved.
33
+ - Re-check: edits that arrive with a merge commit are seen; the diff base follows the first parent; a user's external
34
+ diff tool or `diff.suppressBlankEmpty` no longer breaks hunk parsing; `git log` is limited to the tasks' paths, and a
35
+ git failure is reported instead of silently producing no candidates.
36
+ - Re-check: `verify` clears the anchor when the task's line is past the end of the file, and moves `source` to the
37
+ task's current place when the lines shifted.
38
+ - Task numbers of deleted tasks are never reused, even when `backlog new` races with the cleanup.
39
+ - An unparseable `project.md` no longer makes `backlog new` create a second project with the same prefix.
40
+ - Git worktrees belong to the main repository's project; the hook and checks see commits made in the worktree.
41
+ - The Stop hook remembers what it already told each session separately, so parallel sessions don't repeat each other.
42
+ - Statistics: a task whose file can't be parsed keeps its last status instead of an invented "cancelled"; the open
43
+ count, forecast and debt curve use one history; model prices are matched by exact id (`claude-opus-5-5` added);
44
+ fixes are dated by when they landed on the main branch.
45
+ - Web UI: a focused field no longer overwrites an edit made by the agent meanwhile (a conflict is shown instead); a
46
+ failed background refresh no longer wipes the page and the description draft; errors are shown in the interface
47
+ language; all tabs share one live-update connection, so many open tabs no longer stall.
48
+
3
49
  ## 0.2.4
4
50
 
5
51
  - A clearer description on npm and GitHub, and a rewritten README introduction: out-of-scope fixes stay out of pull requests, audit findings don't get lost, tasks keep the context the agent needs. No code changes.
package/README.md CHANGED
@@ -103,7 +103,7 @@ If there's no project yet, `backlog new` creates it.
103
103
  | `backlog new --title <t> --category <category> [--type task\|epic] [--priority low\|medium\|high\|critical] [--tags a,b] [--found review\|incidental] [--source file:line] [--epic ID] [--blocked-by ID,…] [--related ID,…] [--project id] [--force] [--json]` | Creates a task, the description is read from stdin; a similar open task refuses the command (code 3), `--force` creates it anyway; `--found review` marks a review finding, the default is `incidental` (noticed in passing) |
104
104
  | `backlog list [--query q] [--status s,…] [--tag t,…] [--project id \| --all-projects] [--json]` | Lists tasks, by default the open tasks of the current project |
105
105
  | `backlog show <ID> [--json]` | The full task: links, blockers, warnings |
106
- | `backlog take <ID> \| --next [--project id] [--force] [--json]` | Takes a task into progress, checking blockers |
106
+ | `backlog take <ID> [--force] [--json]` \| `--next [--project id] [--json]` | Takes a task into progress, checking blockers |
107
107
  | `backlog take --path <file\|directory> [--project id] [--json]` | Takes into progress every open task inside the path |
108
108
  | `backlog status <ID> <backlog\|in-progress\|blocked\|done\|cancelled>` | Changes the status |
109
109
  | `backlog priority <ID> <low\|medium\|high\|critical>` | Changes the priority |
@@ -122,8 +122,11 @@ If there's no project yet, `backlog new` creates it.
122
122
  | `backlog service install \| uninstall \| status` | Autostarts the web server at login: launchd on macOS, systemd --user on Linux, a Startup-folder script on Windows; `status` shows whether it is installed and responding |
123
123
 
124
124
  Exit codes: `0` success, `1` argument or rule error, `2` not found, `3` refused (the task is closed,
125
- blocked, or every matching task is blocked), `4` the command failed, `5` `check` found something to
126
- re-check.
125
+ blocked, or every matching task is blocked), `4` the command failed, `5` `check` found candidates or task problems to
126
+ work through.
127
+
128
+ With `--json`, `new`, `show`, and `take` print the same task object (with progress, blockers, and links),
129
+ while `list` and `take --path` print an array of such objects.
127
130
 
128
131
  A project that's no longer maintained is marked inactive: its tasks drop out of the combined "Projects"
129
132
  scope's list and statistics, but the project's own page works as usual. Checks (`backlog check`), the Stop
@@ -238,9 +241,18 @@ the Stop hook by hand:
238
241
  rm ~/.claude/skills/backlog # or $CLAUDE_SKILLS_DIR / $CLAUDE_CONFIG_DIR/skills, if set
239
242
  ```
240
243
 
241
- and delete the `Stop` hook entry from `~/.claude/settings.json` (or `$CLAUDE_SETTINGS_PATH`) — on
242
- macOS/Linux it's the command `command -v backlog >/dev/null && backlog hook stop || true`, on Windows a
243
- PowerShell command starting with `if (Get-Command backlog.cmd ...)`.
244
+ and delete the `Stop` hook entry from `~/.claude/settings.json` (or `$CLAUDE_SETTINGS_PATH`). On macOS/Linux
245
+ it is
246
+
247
+ ```json
248
+ { "type": "command", "command": "command -v backlog >/dev/null && backlog hook stop || true" }
249
+ ```
250
+
251
+ and on Windows
252
+
253
+ ```json
254
+ { "type": "command", "shell": "powershell", "command": "if (Get-Command backlog.cmd -ErrorAction SilentlyContinue) { backlog.cmd hook stop }" }
255
+ ```
244
256
 
245
257
  On Windows, the Startup-folder script does not restart a crashed server the way launchd `KeepAlive` or
246
258
  systemd `Restart=on-failure` do — after a crash, run `backlog service install` again or start it with
package/README.ru.md CHANGED
@@ -101,7 +101,7 @@
101
101
  | `backlog new --title <t> --category <категория> [--type task\|epic] [--priority low\|medium\|high\|critical] [--tags a,b] [--found review\|incidental] [--source файл:строка] [--epic ID] [--blocked-by ID,…] [--related ID,…] [--project id] [--force] [--json]` | Создаёт задачу, описание читается из stdin; похожая открытая задача — отказ (код 3), `--force` создаёт всё равно; `--found review` — находка ревью, по умолчанию `incidental` (замечено попутно) |
102
102
  | `backlog list [--query q] [--status s,…] [--tag t,…] [--project id \| --all-projects] [--json]` | Список задач, по умолчанию открытые задачи текущего проекта |
103
103
  | `backlog show <ID> [--json]` | Задача целиком: связи, блокеры, предупреждения |
104
- | `backlog take <ID> \| --next [--project id] [--force] [--json]` | Берёт задачу в работу, проверяя блокеры |
104
+ | `backlog take <ID> [--force] [--json]` \| `--next [--project id] [--json]` | Берёт задачу в работу, проверяя блокеры |
105
105
  | `backlog take --path <файл\|каталог> [--project id] [--json]` | Берёт в работу все открытые задачи внутри пути |
106
106
  | `backlog status <ID> <backlog\|in-progress\|blocked\|done\|cancelled>` | Меняет статус |
107
107
  | `backlog priority <ID> <low\|medium\|high\|critical>` | Меняет приоритет |
@@ -121,7 +121,10 @@
121
121
 
122
122
  Коды выхода: `0` — успех, `1` — ошибка аргументов или правил, `2` — не найдено, `3` — отказ (задача
123
123
  закрыта, заблокирована или все подходящие заблокированы), `4` — команда не выполнилась, `5` — у `check`
124
- есть что перепроверить.
124
+ есть кандидаты или проблемы задач, которые надо разобрать.
125
+
126
+ С `--json` команды `new`, `show` и `take` печатают один и тот же объект задачи (с прогрессом, блокерами и
127
+ связями), а `list` и `take --path` — массив таких объектов.
125
128
 
126
129
  Проект, который больше не ведётся, помечается неактивным: его задачи не попадают в список и статистику
127
130
  режима «Проекты», но страница проекта работает как обычно. Проверки (`backlog check`), Stop-хук и
@@ -232,9 +235,18 @@ npm uninstall -g p-backlog
232
235
  rm ~/.claude/skills/backlog # или $CLAUDE_SKILLS_DIR / $CLAUDE_CONFIG_DIR/skills, если заданы
233
236
  ```
234
237
 
235
- и удалите запись хука `Stop` из `~/.claude/settings.json` (или `$CLAUDE_SETTINGS_PATH`) — на
236
- macOS/Linux это команда `command -v backlog >/dev/null && backlog hook stop || true`, на Windows —
237
- команда PowerShell, начинающаяся с `if (Get-Command backlog.cmd ...)`.
238
+ и удалите запись хука `Stop` из `~/.claude/settings.json` (или `$CLAUDE_SETTINGS_PATH`). На macOS/Linux
239
+ это
240
+
241
+ ```json
242
+ { "type": "command", "command": "command -v backlog >/dev/null && backlog hook stop || true" }
243
+ ```
244
+
245
+ а на Windows
246
+
247
+ ```json
248
+ { "type": "command", "shell": "powershell", "command": "if (Get-Command backlog.cmd -ErrorAction SilentlyContinue) { backlog.cmd hook stop }" }
249
+ ```
238
250
 
239
251
  На Windows скрипт в папке «Автозагрузка» не перезапускает сервер после падения — в отличие от `KeepAlive`
240
252
  у launchd или `Restart=on-failure` у systemd; после сбоя запустите `backlog service install` заново или