@joshuafolkken/kit 1.1094.0 → 1.1136.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 (177) hide show
  1. package/.claude/agents/investigator.md +17 -0
  2. package/.claude/settings.json +1 -0
  3. package/.claude/skills/workflow-commands/SKILL.md +1 -1
  4. package/.claude/skills/workflow-commands/background-commands.md +36 -85
  5. package/.claude/skills/workflow-commands/backlogrun-progress.md +31 -34
  6. package/.claude/skills/workflow-commands/backlogrun-steps.md +2 -2
  7. package/.claude/skills/workflow-commands/delegation.md +5 -1
  8. package/.claude/skills/workflow-commands/fullrun.md +5 -4
  9. package/.claude/skills/workflow-commands/halfrun.md +5 -4
  10. package/.claude/skills/workflow-commands/latest-gate.md +7 -15
  11. package/.claude/skills/workflow-commands/pre-gate-cut.md +4 -8
  12. package/.claude/skills/workflow-commands/split-assessment.md +4 -18
  13. package/.github/actions/setup-node/action.yml +33 -0
  14. package/.github/actions/setup-pnpm/action.yml +4 -4
  15. package/.github/workflows/auto-tag.yml +2 -3
  16. package/.github/workflows/ci.yml +7 -8
  17. package/.github/workflows/dependabot-auto-merge.yml +1 -0
  18. package/.github/workflows/pr-classification.yml +1 -3
  19. package/.github/workflows/production.yml +1 -0
  20. package/.github/workflows/publish.yml +10 -9
  21. package/.github/workflows/sonar-qube.yml +17 -13
  22. package/.pnpmfile.mjs +29 -0
  23. package/AGENTS.md +4 -11
  24. package/CLAUDE.md +24 -17
  25. package/GEMINI.md +4 -13
  26. package/README.md +8 -3
  27. package/SECURITY.md +2 -0
  28. package/cspell/index.yaml +4 -0
  29. package/dist/CLAUDE.basic.md +6 -6
  30. package/dist/CLAUDE.md +24 -17
  31. package/dist/CLAUDE.static.md +6 -6
  32. package/dist/config-merge/index.js +33 -9
  33. package/dist/hooks/batch-guard.js +4 -4
  34. package/dist/hooks/{chunk-OIZUHPJI.js → chunk-FO2I7UT7.js} +1 -1
  35. package/dist/hooks/{chunk-NKOG3XAV.js → chunk-GDU26K3J.js} +11 -3
  36. package/dist/hooks/{chunk-O4LL4HTI.js → chunk-HANSKHES.js} +2 -2
  37. package/dist/hooks/{chunk-3C4YCCEF.js → chunk-HBKZLITF.js} +4 -4
  38. package/dist/hooks/{chunk-UD24EAIL.js → chunk-JKKTVDAG.js} +1984 -146
  39. package/dist/hooks/{chunk-M2XDCUKD.js → chunk-KBXZLMRH.js} +89 -1803
  40. package/dist/hooks/{chunk-IL27YTPH.js → chunk-KOKOAV6D.js} +2 -2
  41. package/dist/hooks/{chunk-7ZPFAVR7.js → chunk-LJBLGHEH.js} +59 -19
  42. package/dist/hooks/{chunk-E54KGFEQ.js → chunk-NFZGFGOR.js} +1 -1
  43. package/dist/hooks/{chunk-KHWHKJOM.js → chunk-RFWWUI5F.js} +4 -4
  44. package/dist/hooks/codex-hook-adapter.js +12 -47
  45. package/dist/hooks/duplicate-read-guard.js +5 -5
  46. package/dist/hooks/format-edited.js +2 -2
  47. package/dist/hooks/inputs.json +175 -173
  48. package/dist/hooks/investigation-guard.js +5 -5
  49. package/dist/hooks/pretool-guard.js +9 -9
  50. package/dist/hooks/stop-guard.js +17 -12
  51. package/dist/josh.js +87 -31
  52. package/dist/version/index.js +36 -20
  53. package/eslint/rules/unicorn.js +3 -2
  54. package/package.json +23 -5
  55. package/pnpm-workspace.yaml +5 -7
  56. package/prompts/collaboration-workflow/glossary.md +17 -0
  57. package/prompts/collaboration-workflow/issue-template.md +1 -1
  58. package/prompts/collaboration-workflow/operating-rules.md +1 -1
  59. package/prompts/collaboration-workflow/principles.md +9 -0
  60. package/prompts/collaboration-workflow.md +1 -0
  61. package/scripts/backlog/backlog-arrival.ts +30 -10
  62. package/scripts/backlog/backlog-budget-cli.ts +15 -16
  63. package/scripts/backlog/backlog-offer-cli.ts +6 -14
  64. package/scripts/backlog/backlog-plan.ts +29 -18
  65. package/scripts/backlog/backlog-ready.ts +20 -7
  66. package/scripts/config-merge/parse-jsonc.ts +33 -3
  67. package/scripts/config-merge/patch-json-key.ts +13 -6
  68. package/scripts/cost-runtime/cost-cli.ts +3 -7
  69. package/scripts/delegation/delegation-policy.ts +9 -1
  70. package/scripts/delegation/investigation-guard.ts +1 -1
  71. package/scripts/delegation/investigation-reads.ts +105 -19
  72. package/scripts/doctor/doctor-consumer.ts +3 -5
  73. package/scripts/doctor/doctor-io.ts +9 -13
  74. package/scripts/document/backlogrun-parent-read-set.ts +12 -1
  75. package/scripts/document/capped-print.ts +74 -0
  76. package/scripts/document/document-byte-budget.ts +1 -0
  77. package/scripts/document/document-section-cli.ts +4 -3
  78. package/scripts/document/entry-read-budget.ts +13 -7
  79. package/scripts/document/entry-read-set.ts +32 -8
  80. package/scripts/document/lane-child-read-set.ts +7 -0
  81. package/scripts/document/read-set-point-of-use.ts +8 -3
  82. package/scripts/document/read-set-trim.ts +3 -1
  83. package/scripts/epic/epic-audit.ts +3 -18
  84. package/scripts/gate/scoped-green.ts +25 -14
  85. package/scripts/gh/git-gh-issue-list.ts +12 -11
  86. package/scripts/gh/git-gh-issue-write.ts +4 -1
  87. package/scripts/gh/git-gh-pr-auto-merge.ts +4 -1
  88. package/scripts/git/git-command.ts +6 -1
  89. package/scripts/git/git-spawn-sync.ts +65 -0
  90. package/scripts/git/git-spawn.ts +5 -4
  91. package/scripts/git/stash/stash-pop-args.ts +1 -6
  92. package/scripts/init/claude-kit-only-settings.ts +29 -0
  93. package/scripts/init/init-copy-content.ts +8 -2
  94. package/scripts/init/init-file-action.ts +54 -0
  95. package/scripts/init/init-logic-migrate.ts +35 -17
  96. package/scripts/init/init-logic-secretlint.ts +1 -1
  97. package/scripts/init/init-logic.ts +6 -22
  98. package/scripts/init/init.ts +11 -68
  99. package/scripts/init/initial-commit.ts +24 -0
  100. package/scripts/init/kit-written-paths.ts +2 -0
  101. package/scripts/init/project-profile.ts +3 -6
  102. package/scripts/init/start-exec.ts +16 -3
  103. package/scripts/init/start-steps.ts +10 -13
  104. package/scripts/issue/defect-rate-cli.ts +61 -20
  105. package/scripts/issue/issue-backlinks.ts +7 -14
  106. package/scripts/issue/issue-cite.ts +12 -6
  107. package/scripts/issue/issue-file.ts +5 -12
  108. package/scripts/issue/issue-read-cli.ts +1 -0
  109. package/scripts/issue/issue-report-failures.ts +6 -2
  110. package/scripts/issue/issue-state-cli.ts +1 -1
  111. package/scripts/issue/markdown-section.ts +21 -6
  112. package/scripts/issue/measure-rerun-cli.ts +73 -14
  113. package/scripts/josh/josh-commands-lane.ts +1 -1
  114. package/scripts/josh/josh-commands-project.ts +8 -1
  115. package/scripts/josh/josh-commands-workflow.ts +1 -1
  116. package/scripts/josh/run-github-prerequisite.ts +3 -6
  117. package/scripts/lane/lane-await.ts +89 -15
  118. package/scripts/lane/lane-cli.ts +11 -13
  119. package/scripts/lane/lane-close.ts +4 -1
  120. package/scripts/lane/lane-launch-cli.ts +10 -16
  121. package/scripts/lane/openai-review-broker.ts +4 -1
  122. package/scripts/lib/cli-flags.ts +31 -2
  123. package/scripts/lib/error-message.ts +12 -1
  124. package/scripts/lines/line-targets.ts +0 -11
  125. package/scripts/lines/lines-command.ts +5 -3
  126. package/scripts/propagate/propagate-git.ts +3 -8
  127. package/scripts/refactor/refactor-scan.ts +2 -1
  128. package/scripts/registry-migration/migrate-logic.ts +28 -19
  129. package/scripts/registry-migration/migrate.ts +6 -5
  130. package/scripts/release/github-release-cli.ts +14 -3
  131. package/scripts/release/github-release-environment.ts +1 -0
  132. package/scripts/release/github-release.ts +103 -17
  133. package/scripts/release/release-publish.ts +36 -2
  134. package/scripts/release/release-worktree.ts +97 -2
  135. package/scripts/review/review-checkout.ts +3 -2
  136. package/scripts/review/review-record-cli.ts +9 -16
  137. package/scripts/rules/early-heartbeat.ts +4 -3
  138. package/scripts/rules/lane-park.ts +9 -0
  139. package/scripts/rules/stop-rules.ts +7 -4
  140. package/scripts/run/run-carry-args.ts +8 -12
  141. package/scripts/run/run-carry-cli.ts +3 -1
  142. package/scripts/run/run-carry-conversation.ts +94 -0
  143. package/scripts/run/run-carry-reclaim.ts +37 -0
  144. package/scripts/run/run-carry.ts +21 -5
  145. package/scripts/run/run-cut-args.ts +1 -6
  146. package/scripts/run/run-ending-cli.ts +1 -5
  147. package/scripts/run/run-entry-cli.ts +40 -9
  148. package/scripts/run/run-entry-stop.ts +104 -0
  149. package/scripts/run/run-event-stream-emit.ts +7 -2
  150. package/scripts/run/run-hold.ts +4 -1
  151. package/scripts/run/run-liveness-cli.ts +1 -5
  152. package/scripts/run/run-merge-cli.ts +2 -10
  153. package/scripts/run/run-merge-steps.ts +4 -1
  154. package/scripts/run/run-parent-cut-hook.ts +4 -1
  155. package/scripts/run/run-prep-cli.ts +4 -1
  156. package/scripts/run/run-progress-args.ts +20 -4
  157. package/scripts/run/run-progress-cli.ts +31 -29
  158. package/scripts/run/run-progress-clock.ts +4 -1
  159. package/scripts/run/run-ship-cli.ts +8 -16
  160. package/scripts/run/run-ship-probe.ts +4 -1
  161. package/scripts/run/run-status-cli.ts +2 -15
  162. package/scripts/run/run-tidy-lanes.ts +4 -1
  163. package/scripts/run/run-wake-cli.ts +2 -10
  164. package/scripts/run/run-watcher-guard.ts +9 -5
  165. package/scripts/safe-chain/pack-hook.ts +92 -0
  166. package/scripts/sync/sync-ai-files.ts +4 -0
  167. package/scripts/test/test-declared-changed.ts +13 -16
  168. package/scripts/test/test-declared.ts +3 -7
  169. package/scripts/test/test-related.ts +1 -6
  170. package/scripts/test/test-unit-guard.ts +21 -7
  171. package/scripts/time-runtime/time-spans.ts +4 -0
  172. package/scripts/version/version-commands.ts +11 -1
  173. package/templates/CLAUDE.basic.md +6 -6
  174. package/templates/workflows/ci.yml +16 -82
  175. package/templates/workflows/dependabot-auto-merge.yml +1 -0
  176. package/templates/workflows/github-release.yml +14 -28
  177. package/tsconfig.sonar.json +4 -22
package/dist/CLAUDE.md CHANGED
@@ -36,7 +36,7 @@ Classify each decision point into one tier and act; stop **only** when the choic
36
36
 
37
37
  ## Environment Variables
38
38
 
39
- A `.env` at the project root: `TELEGRAM_BOT_TOKEN` and `TELEGRAM_CHAT_ID` are required for notifications; `JOSH_SESSION_LANG`, `PORT_SEED` and `JOSH_REPO_PATHS` are optional and personal. Setup and semantics: [docs/scripts-ai.md](https://github.com/joshuafolkken/kit/blob/main/docs/scripts-ai.md) and [docs/josh-commands.md](https://github.com/joshuafolkken/kit/blob/main/docs/josh-commands.md).
39
+ A `.env` at the project root: `TELEGRAM_BOT_TOKEN` and `TELEGRAM_CHAT_ID` are required for notifications; `JOSH_SESSION_LANG`, `PORT_SEED` and `JOSH_REPO_PATHS` are optional and personal. Details: [environment-variables.md](https://github.com/joshuafolkken/kit/blob/main/docs/environment-variables.md), [josh-commands.md](https://github.com/joshuafolkken/kit/blob/main/docs/josh-commands.md).
40
40
 
41
41
  **GitHub operations are `gh api` (REST) — instructing prose included — and need `gh` installed; some environments lack it.** Auth: `gh auth login`; `GH_TOKEN` in CI/cloud. `node_modules/@joshuafolkken/kit/prompts/collaboration-workflow/gh-rest.md`.
42
42
 
@@ -100,12 +100,14 @@ A `.env` at the project root: `TELEGRAM_BOT_TOKEN` and `TELEGRAM_CHAT_ID` are re
100
100
 
101
101
  For every code modification, in order:
102
102
 
103
- 0. **Work summary + test declaration** _(before writing any implementation code)_: a two-layer summary — a plain-language overview a non-programmer can follow (three lines, **Now / Change / Check**, one sentence each, in the session language; name the concrete subject in each line — subject-less prose is not acceptable; no file paths, function or type names, or CLI option flags — only internal identifiers are banned, not names the reader sees on screen), **Details**, then **every change with its test** (`<what changes> — Test: <Unit|E2E> — <file path> — <what it verifies>`). Ordinary markdown, **never wrapped in a code fence**, once per Issue before implementation — required in fullrun/halfrun/backlogrun even when the Issue body was filled (`kickoff` is exempt); completion reports lead with **Cause / Fix / Result**. `node_modules/@joshuafolkken/kit/prompts/collaboration-workflow/report-format.md`; `pnpm josh report:lint` checks the form, and a session's first runtime `Edit` / `Write` points here. Presentation only, never a confirmation stop.
103
+ 0. **Work summary + test declaration** _(before writing any implementation code)_: once per Issue, present a two-layer summary in ordinary markdown, **never wrapped in a code fence** — required in fullrun/halfrun/backlogrun even when the Issue body was filled (`kickoff` is exempt). Presentation only, never a confirmation stop. `node_modules/@joshuafolkken/kit/prompts/collaboration-workflow/report-format.md`; `pnpm josh report:lint` checks the form.
104
104
 
105
+ - **Overview** — three lines, **Now / Change / Check**, one sentence each, in the session language, that a non-programmer can follow; name the concrete subject in each line — subject-less prose is not acceptable. Use no file paths, function or type names, or CLI option flags — only internal identifiers are banned, not names the reader sees on screen.
106
+ - **Details**, then **every change with its test**: `<what changes> — Test: <Unit|E2E> — <file path> — <what it verifies>`. Completion reports lead with **Cause / Fix / Result**.
105
107
  - **Tests are required for ALL changes** — zero tests without explicit approval is a violation (bug fixes, timing/animation fixes and refactors included): bug fix → regression test; UI/animation/timing → E2E for the observable change; logic/utility → unit; refactor → tests pinning existing behavior BEFORE the change (`node_modules/@joshuafolkken/kit/prompts/refactoring.md`).
106
- - **Non-runtime updates (pre-approved manual-only exception)**: a change touching no executable runtime code path may proceed with manual verification — declare it in Step 0 and state why. It covers docs, non-executable config, editor/IDE files, and cosmetic asset swaps with no selector/path change; the mechanically exempt (`*.md`, `.editorconfig`, `.idea/**`, `.vscode/**`, `prompts/**`) are recognized by the command below, and the rest stay the exemption a person declares. A test infeasible for a runtime change needs its reason stated and user approval.
107
- - **Basic-profile manual-check exception:** when `package.json` records `josh.profile: basic` (or its former name `static`) and the change touches only files in languages kit cannot test (HTML/CSS, or sources such as Lua), verify by hand instead of with an automated test. For HTML/CSS, open the page in a browser and check layout, links and interactions in the HTML at the intended screen widths; for any other source, actually run the changed code. Report what you observed either way. JavaScript and TypeScript files still need automated tests, even when changed alongside. `pnpm josh test:declared` prints `exempt` with the reason in this case only.
108
- - **The commit stage answers this mechanically**: `pnpm josh test:declared` prints `required` / `exempt` / `satisfied` from the changed paths, and a runtime change with no test is refused at `pnpm josh git -y` on `required` — add the declared test or declare the non-runtime exception, then reissue (`node_modules/@joshuafolkken/kit/prompts/collaboration-workflow/rule-delivery.md`).
108
+ - **Non-runtime updates (pre-approved manual-only exception)**: a change touching no executable runtime code path — docs, non-executable config, editor/IDE files, cosmetic asset swaps with no selector/path change — may be verified by hand; declare it in Step 0 with the reason. The mechanically exempt (`*.md`, `.editorconfig`, `.idea/**`, `.vscode/**`, `prompts/**`) need no declaration. A runtime change whose test is infeasible needs the reason and user approval.
109
+ - **Basic-profile manual-check exception:** under `josh.profile: basic` (or `static`), a change touching only languages kit cannot test (HTML/CSS, Lua …) is verified by hand — a browser check of layout, links and interactions in the HTML, or actually run the changed code — and reported; JavaScript and TypeScript still need tests. `node_modules/@joshuafolkken/kit/prompts/testing-guide.md`.
110
+ - **`pnpm josh test:declared`** answers `required` / `exempt` / `satisfied` from the changed paths; a runtime change with no test is refused at `pnpm josh git -y` on `required`.
109
111
  - **Read a target's line headroom before editing: `pnpm josh lines <path>`** — near the limit, `Target` carries the splitting plan.
110
112
 
111
113
  1. **Refactor first** — before any refactoring, read and follow `node_modules/@joshuafolkken/kit/prompts/refactoring.md`; apply high/medium refactoring to all new/modified code and do not proceed until none remain.
@@ -129,7 +131,11 @@ Run the full verification set **in order**; do not skip, reorder, or report comp
129
131
 
130
132
  ## Pre-commit Self-Review (mandatory)
131
133
 
132
- Before every `git commit` (follow-up commits included), self-review against `node_modules/@joshuafolkken/kit/prompts/review.md` — a subagent runs `/code-review`, never a main-line `Skill` load: the staged diff, and `git diff main...HEAD` before opening or updating a PR. Level from `pnpm josh review:brief --level-only`; resolve all high/medium findings; iterate — **no further than the round cap**, the last round a verification pass over the fix delta. Then route each remaining non-High finding through the three-way disposition: fix in place, file it as a follow-up Issue only when it is a confirmed defect that reaches a runtime path (`pnpm josh disposition <path>` answers `runtime` / `non-runtime`) — or drop it with a one-line PR note (the default). **A filed finding is run through `pnpm josh epic:bundle <new>` before the current Issue closes.** A confirmed High blocks rather than buying a round past the cap. `node_modules/@joshuafolkken/kit/prompts/review.md` → "Review round cap".
134
+ Before every `git commit` (follow-up commits included), self-review against `node_modules/@joshuafolkken/kit/prompts/review.md` — a subagent runs `/code-review`, never a main-line `Skill` load. `node_modules/@joshuafolkken/kit/prompts/review.md` → "Review round cap".
135
+
136
+ - **Scope** — the staged diff, and `git diff main...HEAD` before opening or updating a PR; level from `pnpm josh review:brief --level-only`.
137
+ - **Rounds** — resolve all high/medium findings, **no further than the round cap**, the last round a verification pass over the fix delta. A confirmed High blocks rather than buying a round past the cap.
138
+ - **Each remaining non-High finding** — fix in place, file it as a follow-up Issue only when it is a confirmed defect that reaches a runtime path (`pnpm josh disposition <path>`), or drop it with a one-line PR note (the default). **A filed finding is run through `pnpm josh epic:bundle <new>` before the current Issue closes.**
133
139
 
134
140
  ## Doc Sync Rules
135
141
 
@@ -137,14 +143,14 @@ Before every `git commit` (follow-up commits included), self-review against `nod
137
143
 
138
144
  ## Git Rules
139
145
 
140
- - **No commits** unless explicitly requested. **No PR merges, branch deletions, force pushes or other shared-state mutations** unless explicitly requested in the current turn — the default end state is PR still OPEN. **Exception**: invoking `fullrun` authorizes the merge, via `pnpm josh followup`. `.claude/settings.json` denies these, but the deny is narrower than the rule — never read "the tool let me" as permission. `node_modules/@joshuafolkken/kit/prompts/collaboration-workflow/operating-rules.md` → "指示されていない行動は取らない".
146
+ - **No commits** unless explicitly requested. **No PR merges, branch deletions, force pushes or other shared-state mutations** unless explicitly requested in the current turn — the default end state is PR still OPEN. **Exception**: invoking `fullrun` or `backlogrun` authorizes the merge, via `pnpm josh followup` — `prrun` does not. `.claude/settings.json` denies these, but the deny is narrower than the rule — never read "the tool let me" as permission. `node_modules/@joshuafolkken/kit/prompts/collaboration-workflow/operating-rules.md` → "指示されていない行動は取らない".
141
147
  - **Never stage or mutate the git index on your own.** `git add` / `git rm --cached` / `git restore --staged` / `git commit` overwrite the user's snapshot and are denied by settings; inspection is read-only. Staging is allowed only on an explicit current-turn instruction or an authorized commit flow (`pnpm josh git`). `node_modules/@joshuafolkken/kit/prompts/collaboration-workflow/operating-rules.md` → "git index を勝手に変更しない".
142
148
  - **For git operations use `pnpm josh git`.** After a failed push, fix, push manually, then `pnpm josh pr` — **never** `gh pr create` directly, which bypasses `closes #N` generation so the Issue will not auto-close.
143
149
  - **Start-of-conversation git status is a stale snapshot.** Before acting on any working-tree / index / stash / branch assumption, run `git status` (and `git stash list`) live first.
144
150
 
145
151
  ## Collaboration Workflow
146
152
 
147
- - For the issue-driven proposal/plan/execution/notification flow, follow `node_modules/@joshuafolkken/kit/prompts/collaboration-workflow/` (indexed by `node_modules/@joshuafolkken/kit/prompts/collaboration-workflow.md`; each topic is its own file).
153
+ - The issue-driven flow is `node_modules/@joshuafolkken/kit/prompts/collaboration-workflow/`, indexed by `node_modules/@joshuafolkken/kit/prompts/collaboration-workflow.md`.
148
154
  - **Before writing a rule as prose, place it by `node_modules/@joshuafolkken/kit/prompts/collaboration-workflow/residency.md`** — its single source. A computable answer goes to `pnpm josh oracle:list` and an ordering rule to `pnpm josh run:step`, never into `CLAUDE.md` or a prompt file.
149
155
  - **Count the target repository's open Issues before filing; above the WIP cap, close one first.** Nothing honestly closable means do not file. A filing the run is blocked by is exempt, and so is an **interrupt** — three tests decide that, never judgement: a verification answers wrongly, a documented workflow cannot complete, or data is lost or written outside the repository; both exemptions proceed, stating the overage. Meeting none of the three, a finding stays discretionary. `pnpm josh rule:guard` states it again at the call that files. The count command and both procedures: `node_modules/@joshuafolkken/kit/prompts/collaboration-workflow/wip-cap.md`.
150
156
 
@@ -162,11 +168,13 @@ Before every `git commit` (follow-up commits included), self-review against `nod
162
168
  | `halfrun [#N \| new]` | Implement + gate, then **stop before commit** for manual verification | + `halfrun.md` + `split-assessment.md` |
163
169
  | `backlogrun [#N1 #N2 …]` | Run named Issues and epics in order (an epic runs its children first), then drain the opted-in backlog — dependency order, lanes. `--only` stops after the named list | + `backlogrun.md` + `split-assessment.md` + the `fullrun` set |
164
170
 
165
- **`queue` and `epicrun` were removed** — tell a user who types `queue` to run `backlogrun #N1 #N2 …`, and one who types `epicrun` to run `backlogrun #E --only` (drop `--only` to also drain the backlog).
171
+ **`queue` and `epicrun` were removed** — point `queue` to `backlogrun #N1 #N2 …` and `epicrun` to `backlogrun #E --only`.
166
172
 
167
- **Three rules decide what a run does when the work turns out not to be one Issue** — the split assessment every entry point applies identically (**its default is not to split**: separability **and** a scope clearly exceeding one verification gate — the size guide in `split-assessment.md`, measured by `pnpm josh split:assess` — must both hold), a prerequisite discovered mid-run (a dependency, not parked), and a named `backlogrun` item that is not an epic. All bind only after a command has started, so all are read from the `workflow-commands` skill: `split-assessment.md`, `SKILL.md` → §2d, `backlogrun-child.md` → "When `#N` is not an epic", and `fullrun.md` / `halfrun.md` / `backlogrun.md` for the branch each entry takes.
173
+ **The `josh epic:*` commands have their own skill** — `epic:audit`, `epic:next`, `epic:bundle`, and how an epic spans repositories. **Read the `epic-commands` skill before running any of them, before writing an epic that tracks a child in another repository, and right after filing an issue.** Three rules bind outside those commands:
168
174
 
169
- **The `josh epic:*` commands have their own skill** — `epic:audit`, `epic:next`, `epic:bundle`, and how an epic spans repositories. **Read the `epic-commands` skill before running any of them, before writing an epic that tracks a child in another repository, and right after filing an issue.** Three rules stay here because they bind outside those commands: **recording a decision removes that child's `needs-decision` label** (Tier A); **fixing what the audit finds is Tier A**, park only when the contradiction is a design choice nobody has made; and **an epic in another repository is referenced as `owner/repo#N`** (a bare `#N` resolves to this repository's issue). Canonical reference: `.claude/skills/epic-commands/SKILL.md`.
175
+ - Recording a decision removes that child's `needs-decision` label (Tier A).
176
+ - **Fixing what the audit finds is Tier A**; park only when the contradiction is a design choice nobody has made.
177
+ - **An epic in another repository is referenced as `owner/repo#N`** — a bare `#N` resolves to this repository's issue.
170
178
 
171
179
  #### Explicit invocation required (MANDATORY)
172
180
 
@@ -177,18 +185,17 @@ Never start a `kickoff` / `halfrun` / `prrun` / `fullrun` / `backlogrun` workflo
177
185
  - Instead, **prompt the user to type the command themselves**, with the exact phrasing: "Please run \`<command>\` to start this task." (e.g. "Please run \`halfrun new\` to start this task.").
178
186
  - This applies even when the user authorized a related workflow in an earlier turn — each invocation must be re-typed in the current turn.
179
187
 
180
- **A session cut inside a declared budget is not a new invocation** — a `backlogrun` cut and resumed is the one invocation a person typed, and it continues rather than waiting to be retyped; **`backlogrun` alone**, though — a `fullrun` cut still waits for the keyword. Single source: `backlogrun-steps.md` → "The session cut is inside the invocation".
188
+ **A session cut inside a declared budget is not a new invocation — for `backlogrun` alone**: a resumed `backlogrun` continues, while a `fullrun` cut still waits for the keyword. `backlogrun-steps.md` → "The session cut is inside the invocation".
181
189
 
182
- **A `backlogrun` parks a child instead of stopping the run**, and its procedure is read from `backlogrun-park.md` → "park and continue", which is that rule's single source.
190
+ **A `backlogrun` parks a child instead of stopping the run** — `backlogrun-park.md` → "park and continue".
183
191
 
184
192
  #### Mid-workflow stop notification (`confirmation`)
185
193
 
186
- Whenever you pause **any** run mid-execution to wait for the user — a `kickoff` / `halfrun` / `prrun` / `fullrun` stop, an upstream-Issue interrupt, a Tier C confirmation — you MUST send a Telegram notification **before** stopping, so the user is alerted off-screen. `halfrun`'s built-in stop before commit is a confirmation pause and follows this same rule.
194
+ Before pausing **any** run to wait for the user — a command's stop (`halfrun`'s stop before commit included), an upstream-Issue interrupt, a Tier C confirmation — you MUST send this Telegram, so the user is alerted off-screen:
187
195
 
188
196
  ```bash
189
197
  pnpm josh notify --task-type confirmation --issue-url "<issue-url>" --body=$'<one-line reason>\n<what is needed from the user>'
190
198
  ```
191
199
 
192
- - Use `--body=...` (single token) when the body starts with `-`, otherwise `parseArgs` rejects it
193
- - Send only once per stop — do not spam if you re-evaluate within the same pause
194
- - Skip the notification when the stop was explicitly requested by the user in the same turn (they already know)
200
+ - Send it once per stop; skip it when the user asked for the stop in this same turn.
201
+ - Pass `--body=...` as one token when the body starts with `-`, otherwise `parseArgs` rejects it.
@@ -1,8 +1,8 @@
1
1
  # Project instructions
2
2
 
3
- - 既存のファイルと利用者の設定を尊重し、変更する前に内容を確認する。
4
- - 変更には検証を付け、実行した結果を報告する。
5
- - HTML、CSS、JavaScript のファイルがある場合は Prettier で整形する。
6
- - 画面に見える変更をした場合はブラウザーで表示と操作を確認する。
7
- - JavaScript または TypeScript の動作を変更した場合は、その動作を確認する自動テストを追加する。
8
- - Git や GitHub を使う場合だけ、それぞれのワークフローを利用する。
3
+ - Respect existing files and the user's settings, and read a file's contents before changing it.
4
+ - Verify every change, and report the results you actually observed.
5
+ - Format HTML, CSS and JavaScript files with Prettier when the project has any.
6
+ - After a change that is visible on screen, check its display and interaction in a browser.
7
+ - After changing JavaScript or TypeScript behavior, add an automated test that checks that behavior.
8
+ - Use the Git or GitHub workflow only when you use Git or GitHub.
@@ -56,15 +56,39 @@ var string_array_schema = z.array(z.string());
56
56
  var string_record_schema = z.record(z.string(), z.string());
57
57
 
58
58
  // scripts/config-merge/parse-jsonc.ts
59
- import strip_json_comments from "strip-json-comments";
59
+ import { parseTree, printParseErrorCode } from "jsonc-parser";
60
+ function property_key(property) {
61
+ return String(property.children?.[0]?.value);
62
+ }
63
+ function node_value(node) {
64
+ if (node === void 0) return void 0;
65
+ const children = node.children ?? [];
66
+ if (node.type === "array") return children.map((child) => node_value(child));
67
+ if (node.type !== "object") return node.value;
68
+ return Object.fromEntries(
69
+ children.map((property) => [property_key(property), node_value(property.children?.[1])])
70
+ );
71
+ }
60
72
  function parse_jsonc(content) {
61
- const stripped = strip_json_comments(content, { trailingCommas: true });
62
- return json_object_schema.parse(JSON.parse(stripped));
73
+ const errors = [];
74
+ const tree = parseTree(content, errors, { allowTrailingComma: true });
75
+ const [first_error] = errors;
76
+ if (first_error !== void 0) {
77
+ throw new SyntaxError(
78
+ `Invalid JSONC: ${printParseErrorCode(first_error.error)} at offset ${String(first_error.offset)}`
79
+ );
80
+ }
81
+ return json_object_schema.parse(node_value(tree));
63
82
  }
64
83
 
65
84
  // scripts/config-merge/patch-json-key.ts
66
- import { createScanner, findNodeAtLocation, getNodeValue, parseTree } from "jsonc-parser";
67
- import strip_json_comments2 from "strip-json-comments";
85
+ import {
86
+ createScanner,
87
+ findNodeAtLocation,
88
+ getNodeValue,
89
+ parseTree as parseTree2,
90
+ stripComments
91
+ } from "jsonc-parser";
68
92
 
69
93
  // scripts/config-merge/json-format.ts
70
94
  var PRINT_WIDTH = 100;
@@ -146,7 +170,7 @@ function render_value(key, value, has_trailing_comma) {
146
170
  return document.slice(prefix.length, document.length - suffix.length);
147
171
  }
148
172
  function parse_root(content) {
149
- const root = parseTree(content);
173
+ const root = parseTree2(content);
150
174
  return root?.type === "object" ? root : void 0;
151
175
  }
152
176
  function replace_range(content, range, text) {
@@ -192,7 +216,7 @@ function separator_offset(content, offset, limit) {
192
216
  function has_separator_after(content, offset, limit) {
193
217
  return separator_offset(content, offset, limit) !== -1;
194
218
  }
195
- function property_key(property) {
219
+ function property_key2(property) {
196
220
  const key = property.children?.[0]?.value;
197
221
  return typeof key === "string" ? key : void 0;
198
222
  }
@@ -202,7 +226,7 @@ function target_value_end(property) {
202
226
  }
203
227
  function contains_comment(content, node) {
204
228
  const text = content.slice(node.offset, node.offset + node.length);
205
- return strip_json_comments2(text) !== text;
229
+ return stripComments(text) !== text;
206
230
  }
207
231
  function rebalanced_value(content, key, value_node, has_trailing_comma) {
208
232
  if (contains_comment(content, value_node)) return void 0;
@@ -216,7 +240,7 @@ function rebalanced_value(content, key, value_node, has_trailing_comma) {
216
240
  return rendered === current ? void 0 : rendered;
217
241
  }
218
242
  function rebalance(content, property, has_trailing_comma) {
219
- const key = property_key(property);
243
+ const key = property_key2(property);
220
244
  const value_node = property.children?.[1];
221
245
  if (key === void 0 || value_node === void 0) return content;
222
246
  const rendered = rebalanced_value(content, key, value_node, has_trailing_comma);
@@ -9,10 +9,10 @@ import {
9
9
  load_environment_file,
10
10
  notice_refusal_path,
11
11
  refusal_path
12
- } from "./chunk-IL27YTPH.js";
13
- import "./chunk-O4LL4HTI.js";
14
- import "./chunk-E54KGFEQ.js";
15
- import "./chunk-NKOG3XAV.js";
12
+ } from "./chunk-KOKOAV6D.js";
13
+ import "./chunk-HANSKHES.js";
14
+ import "./chunk-NFZGFGOR.js";
15
+ import "./chunk-GDU26K3J.js";
16
16
  import "./chunk-WPALEIRX.js";
17
17
  import "./chunk-RKUAD3I6.js";
18
18
  export {
@@ -6,7 +6,7 @@ import {
6
6
  ESLINT_EDIT_CACHE_FLAGS,
7
7
  file_reader,
8
8
  time_density_hook
9
- } from "./chunk-NKOG3XAV.js";
9
+ } from "./chunk-GDU26K3J.js";
10
10
 
11
11
  // scripts/hooks/format-edited-file.ts
12
12
  import { existsSync as existsSync2 } from "node:fs";
@@ -358,7 +358,7 @@ var LANE_COMMANDS = {
358
358
  ...LANE_ARGUMENTS,
359
359
  description: "Block until any of the named in-flight lane children completes; prints which one finished",
360
360
  category: "AI tools",
361
- reference: ["<issue> [<issue>...]", "automation", ["processes"]],
361
+ reference: ["<issue> [<issue>...] [--owner <pid>]", "automation", ["files", "processes"]],
362
362
  default_script_arguments: ["await"]
363
363
  },
364
364
  "lane:launch": {
@@ -1059,6 +1059,13 @@ var PROJECT_COMMANDS = {
1059
1059
  ["files", "git", "network", "processes"]
1060
1060
  ]
1061
1061
  },
1062
+ "dogfood:commit": {
1063
+ script: "scripts/dogfood/dogfood-commit-cli.ts",
1064
+ description: "Make the first commit of a dogfood run's own kit-test-* project",
1065
+ category: "Project",
1066
+ reference: ["<dir>", "automation", ["files", "git"]],
1067
+ is_kit_only: true
1068
+ },
1062
1069
  init: {
1063
1070
  script: "scripts/init/init.ts",
1064
1071
  description: "Initialize config in a new project",
@@ -1077,7 +1084,7 @@ var PROJECT_COMMANDS = {
1077
1084
  },
1078
1085
  "registry:migrate": {
1079
1086
  script: "scripts/registry-migration/migrate.ts",
1080
- description: "Migrate a kit-only project from GitHub Packages to public npm",
1087
+ description: "Migrate a project from GitHub Packages to public npm",
1081
1088
  category: "Project",
1082
1089
  reference: ["", "developer", ["files", "network", "processes"]]
1083
1090
  },
@@ -1263,7 +1270,7 @@ var WORKFLOW_COMMANDS = {
1263
1270
  script: "scripts/issue/measure-rerun-cli.ts",
1264
1271
  description: "Re-run a merged issue\u2019s baseline command and print the before/after pair",
1265
1272
  category: "Workflow",
1266
- reference: ["<path>", "automation", ["processes", "files"]]
1273
+ reference: ["<issue-number>", "automation", ["network", "processes", "files"]]
1267
1274
  },
1268
1275
  // A script rather than an `sh -c` chain, because it has a precondition to enforce: run inside a
1269
1276
  // linked work tree it would hijack the default branch from every other one (joshuafolkken/kit#1535).
@@ -2573,6 +2580,7 @@ function to_spans(events, finished) {
2573
2580
  is_bundleable: event.is_bundleable,
2574
2581
  targets: event.targets,
2575
2582
  is_writing: event.is_writing,
2583
+ may_write: event.may_write,
2576
2584
  has_prior_reference: event.has_prior_reference,
2577
2585
  writes: event.writes,
2578
2586
  message_id: event.message_id,
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  lane_child_marker
3
- } from "./chunk-E54KGFEQ.js";
3
+ } from "./chunk-NFZGFGOR.js";
4
4
  import {
5
5
  time_bundle_call,
6
6
  time_format,
7
7
  time_round_trips,
8
8
  time_spans,
9
9
  time_transcript_line
10
- } from "./chunk-NKOG3XAV.js";
10
+ } from "./chunk-GDU26K3J.js";
11
11
 
12
12
  // scripts/lane/lane-guard-policy.ts
13
13
  var DEFAULT_MODE = "refuse";
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  investigation_reads
3
- } from "./chunk-7ZPFAVR7.js";
3
+ } from "./chunk-LJBLGHEH.js";
4
4
  import {
5
5
  lane_guard_policy
6
- } from "./chunk-O4LL4HTI.js";
6
+ } from "./chunk-HANSKHES.js";
7
7
  import {
8
8
  hook_decision
9
- } from "./chunk-E54KGFEQ.js";
9
+ } from "./chunk-NFZGFGOR.js";
10
10
  import {
11
11
  json_value,
12
12
  time_spans
13
- } from "./chunk-NKOG3XAV.js";
13
+ } from "./chunk-GDU26K3J.js";
14
14
 
15
15
  // scripts/delegation/duplicate-read-guard.ts
16
16
  import { statSync } from "node:fs";