@joshuafolkken/kit 1.1471.0 → 1.1514.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 (267) hide show
  1. package/.claude/settings.json +6 -6
  2. package/.claude/skills/epic-commands/SKILL.md +2 -14
  3. package/.claude/skills/epic-commands/epic-bundle.md +9 -5
  4. package/.claude/skills/epic-commands/execution-waves.md +1 -2
  5. package/.claude/skills/verify-ui/SKILL.md +1 -2
  6. package/.claude/skills/workflow-commands/SKILL.md +7 -9
  7. package/.claude/skills/workflow-commands/background-commands.md +3 -7
  8. package/.claude/skills/workflow-commands/backlogrun-child.md +3 -10
  9. package/.claude/skills/workflow-commands/backlogrun-lanes.md +6 -15
  10. package/.claude/skills/workflow-commands/backlogrun-park.md +2 -8
  11. package/.claude/skills/workflow-commands/backlogrun-progress.md +10 -19
  12. package/.claude/skills/workflow-commands/backlogrun-recovery.md +8 -8
  13. package/.claude/skills/workflow-commands/backlogrun-steps.md +2 -10
  14. package/.claude/skills/workflow-commands/backlogrun.md +31 -50
  15. package/.claude/skills/workflow-commands/chain-rule.md +7 -6
  16. package/.claude/skills/workflow-commands/delegation.md +12 -8
  17. package/.claude/skills/workflow-commands/entry-sequence.md +1 -3
  18. package/.claude/skills/workflow-commands/followup.md +3 -6
  19. package/.claude/skills/workflow-commands/fullrun-steps.md +3 -5
  20. package/.claude/skills/workflow-commands/fullrun.md +4 -6
  21. package/.claude/skills/workflow-commands/halfrun.md +3 -7
  22. package/.claude/skills/workflow-commands/into-target.md +1 -2
  23. package/.claude/skills/workflow-commands/issue-comments.md +3 -3
  24. package/.claude/skills/workflow-commands/issue-scout.md +3 -2
  25. package/.claude/skills/workflow-commands/latest-gate.md +2 -6
  26. package/.claude/skills/workflow-commands/needs-human-review.md +2 -5
  27. package/.claude/skills/workflow-commands/observation-filing.md +0 -14
  28. package/.claude/skills/workflow-commands/observation-ledger.md +4 -9
  29. package/.claude/skills/workflow-commands/pre-gate-cut.md +11 -16
  30. package/.claude/skills/workflow-commands/prerequisite.md +1 -2
  31. package/.claude/skills/workflow-commands/progress-watcher.md +2 -7
  32. package/.claude/skills/workflow-commands/prrun.md +3 -5
  33. package/.claude/skills/workflow-commands/retrospective.md +4 -4
  34. package/.claude/skills/workflow-commands/split-assessment.md +1 -3
  35. package/.claude/skills/workflow-commands/target-repository.md +1 -2
  36. package/.claude/skills/workflow-commands/working-tree-hold.md +2 -4
  37. package/.codex/hooks.json +6 -6
  38. package/.github/actions/setup-node/action.yml +1 -1
  39. package/.github/workflows/ci.yml +1 -1
  40. package/.github/workflows/publish.yml +2 -2
  41. package/CLAUDE.md +1 -1
  42. package/cspell/index.yaml +7 -0
  43. package/dist/CLAUDE.md +1 -1
  44. package/dist/commands/document-section-cli.js +67 -34
  45. package/dist/hooks/batch-guard.js +6 -6
  46. package/dist/hooks/chunk-4KKD2UTK.js +66 -0
  47. package/dist/hooks/{chunk-J47HU5H5.js → chunk-6TS2JD6D.js} +3 -3
  48. package/dist/hooks/chunk-7DSBJVFH.js +50 -0
  49. package/dist/hooks/{chunk-YHBZAJSV.js → chunk-A65Y4YOR.js} +3 -3
  50. package/dist/hooks/{chunk-E7OIKX5Z.js → chunk-APUO6U4J.js} +85 -7
  51. package/dist/hooks/{chunk-IX6TTTI6.js → chunk-EFXE6C37.js} +8 -22
  52. package/dist/hooks/chunk-GP4IEC4O.js +20 -0
  53. package/dist/hooks/{chunk-SHGPANFB.js → chunk-JP45SOCJ.js} +3 -3
  54. package/dist/hooks/{chunk-K4EOONYM.js → chunk-LAOV7NLM.js} +1 -1
  55. package/dist/hooks/chunk-M4HGZV7U.js +83 -0
  56. package/dist/hooks/{chunk-KC5AK2GF.js → chunk-O6GDRNJB.js} +3 -3
  57. package/dist/hooks/{chunk-YYPI7SJZ.js → chunk-PF2NZL2A.js} +5 -5
  58. package/dist/hooks/{chunk-H5HVWYXK.js → chunk-PTICX4OL.js} +3 -4
  59. package/dist/hooks/{chunk-IIGFYXKC.js → chunk-RT27QRJW.js} +581 -1438
  60. package/dist/hooks/{chunk-43ZHT22P.js → chunk-SYOTDYCI.js} +1127 -1089
  61. package/dist/hooks/{chunk-AS74OU3D.js → chunk-TNUMY6NL.js} +1507 -1336
  62. package/dist/hooks/chunk-UPUZF3AN.js +279 -0
  63. package/dist/hooks/{chunk-EUMACUK2.js → chunk-WK6SMBIC.js} +1948 -806
  64. package/dist/hooks/codex-hook-adapter.js +17 -14
  65. package/dist/hooks/duplicate-read-guard.js +7 -7
  66. package/dist/hooks/format-edited.js +5 -4
  67. package/dist/hooks/inputs.json +317 -264
  68. package/dist/hooks/investigation-guard.js +8 -11
  69. package/dist/hooks/pretool-guard.js +16 -13
  70. package/dist/hooks/session-lang.js +370 -25
  71. package/dist/hooks/stop-guard.js +2576 -176
  72. package/dist/josh.js +2124 -277
  73. package/lefthook/base.yml +5 -3
  74. package/package.json +12 -10
  75. package/prompts/collaboration-workflow/file-edits.md +1 -3
  76. package/prompts/collaboration-workflow/gh-rest.md +1 -2
  77. package/prompts/collaboration-workflow/issue-citation.md +2 -4
  78. package/prompts/collaboration-workflow/issue-template.md +10 -2
  79. package/prompts/collaboration-workflow/lane-instructions.md +35 -0
  80. package/prompts/collaboration-workflow/operating-rules.md +2 -6
  81. package/prompts/collaboration-workflow/output-bounds.md +3 -3
  82. package/prompts/collaboration-workflow/overview.md +1 -1
  83. package/prompts/collaboration-workflow/principles.md +14 -8
  84. package/prompts/collaboration-workflow/report-format.md +9 -0
  85. package/prompts/collaboration-workflow/residency.md +12 -8
  86. package/prompts/collaboration-workflow/rule-delivery.md +3 -11
  87. package/prompts/collaboration-workflow/shell-body.md +6 -6
  88. package/prompts/collaboration-workflow/turn-batching.md +5 -5
  89. package/prompts/collaboration-workflow/upstream-interrupt.md +2 -2
  90. package/prompts/collaboration-workflow/wip-cap.md +6 -6
  91. package/prompts/collaboration-workflow.md +1 -0
  92. package/prompts/review.md +4 -5
  93. package/prompts/testing-guide.md +2 -2
  94. package/scripts/agent/agent-argv.ts +20 -4
  95. package/scripts/agent/agent-role-profile.ts +101 -45
  96. package/scripts/agent/agent-safe-text.ts +60 -0
  97. package/scripts/agent/claude-agent-argv.ts +14 -0
  98. package/scripts/agent/codex-agent-argv.ts +2 -0
  99. package/scripts/agent/lane-instructions.ts +144 -0
  100. package/scripts/backlog/backlog-budget.ts +4 -4
  101. package/scripts/backlog/backlog-drive-named.ts +1 -1
  102. package/scripts/backlog/backlog-drive-restore.ts +9 -1
  103. package/scripts/backlog/backlog-occupied.ts +56 -0
  104. package/scripts/backlog/backlog-ready.ts +47 -10
  105. package/scripts/delegation/duplicate-read-guard.ts +2 -2
  106. package/scripts/delegation/investigation-guard.ts +15 -65
  107. package/scripts/delegation/investigation-reads.ts +0 -1
  108. package/scripts/document/document-byte-budget.ts +6 -5
  109. package/scripts/document/document-section-cli.ts +17 -5
  110. package/scripts/document/entry-read-budget.ts +2 -2
  111. package/scripts/document/read-set-cli.ts +4 -1
  112. package/scripts/epic/epic-audit-orphans.ts +5 -8
  113. package/scripts/epic/epic-audit.ts +52 -1
  114. package/scripts/epic/epic-bundle-evidence.ts +49 -26
  115. package/scripts/epic/epic-bundle-referenced.ts +14 -3
  116. package/scripts/epic/epic-bundle.ts +17 -9
  117. package/scripts/followup/git-followup-workflow.ts +19 -1
  118. package/scripts/gate/check-inputs.ts +129 -0
  119. package/scripts/gate/check-reuse.ts +162 -0
  120. package/scripts/gate/core-budget.ts +93 -44
  121. package/scripts/gate/core-wait.ts +130 -0
  122. package/scripts/gate/free-cores.ts +49 -0
  123. package/scripts/gate/gate-ledger.ts +17 -3
  124. package/scripts/gate/gate-plan.ts +23 -1
  125. package/scripts/gate/gate-report.ts +15 -2
  126. package/scripts/gate/gate-run-steps.ts +150 -0
  127. package/scripts/gate/held-mark.ts +55 -0
  128. package/scripts/gate/machine-capacity.ts +70 -11
  129. package/scripts/gate/pre-commit-type-check.ts +14 -1
  130. package/scripts/gate/verification-gate.ts +58 -125
  131. package/scripts/gh/git-gh-issue-rest.ts +1 -0
  132. package/scripts/gh/git-gh-issue-write.ts +24 -2
  133. package/scripts/gh/git-pr.ts +13 -1
  134. package/scripts/git/main-merge-regenerate.ts +78 -0
  135. package/scripts/git/main-merge.ts +14 -5
  136. package/scripts/hooks/batch-guard.ts +5 -8
  137. package/scripts/hooks/pre-commit-lint.ts +91 -0
  138. package/scripts/hooks/pre-push-unit.ts +1 -1
  139. package/scripts/hooks/pretool-guard.ts +27 -52
  140. package/scripts/hooks/reserved-run.ts +1 -0
  141. package/scripts/hooks/run-hook.sh +10 -12
  142. package/scripts/hooks/stop-actions.ts +204 -0
  143. package/scripts/hooks/stop-guard.ts +62 -21
  144. package/scripts/init/hook-launch.ts +12 -7
  145. package/scripts/issue/expected-effect-lint.ts +59 -0
  146. package/scripts/issue/issue-cite-cli.ts +35 -15
  147. package/scripts/issue/issue-classification.ts +1 -1
  148. package/scripts/issue/issue-lint-cli.ts +5 -3
  149. package/scripts/issue/issue-scout-cli.ts +19 -14
  150. package/scripts/issue/markdown-section.ts +19 -5
  151. package/scripts/josh/command-usage.ts +110 -0
  152. package/scripts/josh/josh-command-map.ts +2 -0
  153. package/scripts/josh/josh-command-types.ts +55 -9
  154. package/scripts/josh/josh-commands-ai.ts +13 -0
  155. package/scripts/josh/josh-commands-development.ts +1 -1
  156. package/scripts/josh/josh-commands-hooks.ts +6 -0
  157. package/scripts/josh/josh-commands-lane.ts +10 -1
  158. package/scripts/josh/josh-commands-workflow.ts +5 -0
  159. package/scripts/josh/josh-logic.ts +6 -15
  160. package/scripts/josh/josh-usage-automation.ts +121 -0
  161. package/scripts/josh/josh-usage-backlog.ts +180 -0
  162. package/scripts/josh/josh-usage-developer.ts +230 -0
  163. package/scripts/josh/josh-usage-hooks.ts +38 -0
  164. package/scripts/josh/josh-usage-issue.ts +205 -0
  165. package/scripts/josh/josh-usage-review.ts +101 -0
  166. package/scripts/josh/josh-usage-run.ts +252 -0
  167. package/scripts/josh/josh-usage-session.ts +238 -0
  168. package/scripts/josh/josh-usage-workflow.ts +212 -0
  169. package/scripts/josh/josh.ts +14 -5
  170. package/scripts/josh/package-directory.ts +20 -0
  171. package/scripts/lane/lane-capacity.ts +8 -2
  172. package/scripts/lane/lane-check-stats.ts +56 -0
  173. package/scripts/lane/lane-child-invocation.ts +35 -4
  174. package/scripts/lane/lane-dispatch.ts +3 -3
  175. package/scripts/lane/lane-guard-policy.ts +2 -2
  176. package/scripts/lane/lane-handoff.ts +8 -1
  177. package/scripts/lane/lane-install.ts +12 -4
  178. package/scripts/lane/lane-ledger.ts +43 -1
  179. package/scripts/lane/lane-limit-cli.ts +8 -9
  180. package/scripts/lane/lane-measure-cli.ts +2 -0
  181. package/scripts/lane/lane-preserve.ts +29 -1
  182. package/scripts/lane/lane-registry.ts +9 -7
  183. package/scripts/lane/lane-restart.ts +5 -26
  184. package/scripts/lane/lane-session-action.ts +146 -0
  185. package/scripts/lane/lane-session-broker.ts +57 -138
  186. package/scripts/lane/lane-withdraw-cli.ts +71 -0
  187. package/scripts/lane/lane-withdraw.ts +182 -0
  188. package/scripts/lint/format.ts +4 -4
  189. package/scripts/lint/lint-parallel.ts +10 -3
  190. package/scripts/lint/lint-related-scope.ts +4 -1
  191. package/scripts/notify/telegram-test.ts +10 -5
  192. package/scripts/report/report-format-reference.ts +2 -0
  193. package/scripts/review/acceptance-map-check.ts +61 -0
  194. package/scripts/review/acceptance-map.ts +205 -0
  195. package/scripts/review/review-brief-cli.ts +1 -1
  196. package/scripts/rules/agent-model.ts +59 -0
  197. package/scripts/rules/delivered-rules.ts +11 -2
  198. package/scripts/rules/filing-cap.ts +1 -0
  199. package/scripts/rules/firing-point.ts +6 -5
  200. package/scripts/rules/guard-remedy.ts +117 -0
  201. package/scripts/rules/issue-comments.ts +67 -6
  202. package/scripts/rules/last-prompt.ts +50 -5
  203. package/scripts/rules/oracle-list-cli.ts +7 -0
  204. package/scripts/rules/piped-verification.ts +3 -1
  205. package/scripts/rules/rule-list.ts +4 -1
  206. package/scripts/rules/rule-registry-rows.ts +10 -0
  207. package/scripts/rules/rule-registry.ts +7 -4
  208. package/scripts/rules/rule-rewrite.ts +114 -0
  209. package/scripts/rules/rule-value.ts +7 -1
  210. package/scripts/rules/shell-segments.ts +15 -0
  211. package/scripts/rules/stop-decision.ts +77 -0
  212. package/scripts/rules/stop-rules.ts +147 -47
  213. package/scripts/rules/tail-commands.ts +15 -1
  214. package/scripts/run/board/run-board-cli.ts +2 -0
  215. package/scripts/run/board/run-board-closed.ts +8 -2
  216. package/scripts/run/board/run-board-github.ts +9 -1
  217. package/scripts/run/board/run-board-header.ts +4 -1
  218. package/scripts/run/board/run-board-labels.ts +2 -0
  219. package/scripts/run/board/run-board-layout.ts +1 -1
  220. package/scripts/run/board/run-board-read.ts +16 -0
  221. package/scripts/run/board/run-board-reason.ts +10 -1
  222. package/scripts/run/board/run-board-render-legend.ts +1 -0
  223. package/scripts/run/board/run-board-render-slot.ts +1 -1
  224. package/scripts/run/board/run-board-render-waits.ts +41 -0
  225. package/scripts/run/board/run-board-render.ts +6 -1
  226. package/scripts/run/board/run-board-row-yield.ts +1 -0
  227. package/scripts/run/board/run-board-state.ts +5 -0
  228. package/scripts/run/board/run-board-status.ts +72 -21
  229. package/scripts/run/board/run-board-tick.ts +5 -1
  230. package/scripts/run/cut/run-cut-cli.ts +3 -2
  231. package/scripts/run/cut/run-cut-report.ts +16 -0
  232. package/scripts/run/detached-launch.ts +23 -4
  233. package/scripts/run/entry/run-entry-cli.ts +8 -1
  234. package/scripts/run/event/run-event-render.ts +1 -0
  235. package/scripts/run/event/run-event-scope.ts +19 -1
  236. package/scripts/run/event/run-event-stream-emit.ts +13 -6
  237. package/scripts/run/event/run-event-stream.ts +4 -0
  238. package/scripts/run/hold/run-hold-session.ts +46 -0
  239. package/scripts/run/hold/run-hold.ts +7 -1
  240. package/scripts/run/launch-priority.ts +32 -0
  241. package/scripts/run/merge/run-merge-cli.ts +16 -65
  242. package/scripts/run/merge/run-merge-signals.ts +99 -0
  243. package/scripts/run/merge/run-merge-steps.ts +11 -1
  244. package/scripts/run/merge/run-merge.ts +21 -9
  245. package/scripts/run/run-liveness.ts +1 -1
  246. package/scripts/run/run-poll-hook.ts +157 -0
  247. package/scripts/run/run-step-cli.ts +22 -15
  248. package/scripts/run/run-step-section.ts +85 -0
  249. package/scripts/run/ship/run-ship-cli.ts +5 -12
  250. package/scripts/run/ship/run-ship-detach.ts +9 -0
  251. package/scripts/run/ship/run-ship-next.ts +10 -2
  252. package/scripts/run/ship/run-ship-overlap.ts +195 -0
  253. package/scripts/run/ship/run-ship-pre-detach.ts +33 -15
  254. package/scripts/run/ship/run-ship-preflight.ts +28 -2
  255. package/scripts/run/ship/run-ship-return.ts +31 -7
  256. package/scripts/run/ship/run-ship-review-steps.ts +12 -10
  257. package/scripts/run/ship/run-ship-steps.ts +1 -1
  258. package/scripts/run/ship/run-ship-stop-context.ts +206 -0
  259. package/scripts/run/ship/run-ship-sync.ts +14 -6
  260. package/scripts/test/test-e2e-guard.ts +30 -5
  261. package/scripts/test/test-unit-guard.ts +16 -1
  262. package/scripts/test/unit-worker-share.ts +26 -4
  263. package/scripts/time-runtime/time-shell.ts +29 -4
  264. package/scripts/time-runtime/time-spans.ts +1 -0
  265. package/scripts/time-runtime/time-tool-call.ts +7 -0
  266. package/templates/gitignore +6 -2
  267. package/dist/hooks/chunk-K4LMBQC2.js +0 -68
package/lefthook/base.yml CHANGED
@@ -5,9 +5,11 @@ pre-commit:
5
5
  skip: git diff --cached --quiet
6
6
  run: pnpm josh prevent-main-commit
7
7
 
8
+ # cspell, prettier and eslint go through `josh pre-commit-lint`, which owns their flags so each
9
+ # cache location comes from the constant its ignore rules are asserted against (kit#3948).
8
10
  cspell:
9
11
  glob: '*.{ts,tsx,js,jsx,md,mdx,html,css,scss,yml,yaml,json,properties}'
10
- run: pnpm exec cspell lint --no-must-find-files --no-progress {staged_files}
12
+ run: pnpm josh pre-commit-lint cspell {staged_files}
11
13
 
12
14
  # Scans only staged files, so a secret is caught before it ever enters history —
13
15
  # GitHub push protection and the CodeRabbit gitleaks pass both fire after the fact,
@@ -22,11 +24,11 @@ pre-commit:
22
24
 
23
25
  prettier:
24
26
  glob: '*.{js,jsx,ts,tsx,mjs,cjs,html,css,scss,md,mdx,json,jsonc,yaml,yml}'
25
- run: pnpm exec prettier --check --ignore-unknown {staged_files}
27
+ run: pnpm josh pre-commit-lint prettier {staged_files}
26
28
 
27
29
  eslint:
28
30
  glob: '*.{js,jsx,ts,tsx,mjs,cjs}'
29
- run: pnpm exec eslint --quiet --cache --cache-strategy content {staged_files}
31
+ run: pnpm josh pre-commit-lint eslint {staged_files}
30
32
 
31
33
  # Routed through `josh pre-commit-type-check` rather than a bare `pnpm exec tsc --noEmit` so the
32
34
  # hook can read the record `pnpm josh gate` leaves behind (kit#1381) — the same reader the
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.1471.0",
2
+ "version": "1.1514.0",
3
3
  "name": "@joshuafolkken/kit",
4
4
  "description": "Development toolkit for AI-assisted projects: formatting, AI assistant rules and a Git/GitHub Issue workflow for any repository, plus lint, type check, tests and hooks for Node projects",
5
5
  "keywords": [
@@ -72,6 +72,7 @@
72
72
  "!scripts/eval",
73
73
  "!scripts/time",
74
74
  "!scripts/cost",
75
+ "!scripts/cost-audit",
75
76
  "!scripts/retrospective",
76
77
  "!scripts/dogfood",
77
78
  "!scripts/metrics",
@@ -97,6 +98,7 @@
97
98
  "!scripts/exports/namespace-members.ts",
98
99
  "!scripts/exports/unused-members.ts",
99
100
  "!scripts/document/generate-catalog.ts",
101
+ "!scripts/document/generate-command-usage.ts",
100
102
  "!scripts/document/issue-citation-budget.ts",
101
103
  "!scripts/document/retired-phrases.ts",
102
104
  "!scripts/document/review-agent-type.ts",
@@ -247,12 +249,12 @@
247
249
  "@eslint/compat": "^2.1.1",
248
250
  "@eslint/js": "^10.0.1",
249
251
  "@ianvs/prettier-plugin-sort-imports": "^4.7.1",
250
- "@playwright/test": "^1.64.0",
252
+ "@playwright/test": "^1.64.1",
251
253
  "@secretlint/secretlint-rule-preset-recommend": "^13.0.7",
252
254
  "@stylistic/eslint-plugin": "^5.10.0",
253
255
  "@types/node": "^26.6.5",
254
256
  "@types/semver": "^7.8.0",
255
- "cspell": "^10.3.6",
257
+ "cspell": "^10.4.0",
256
258
  "esbuild": "^0.28.2",
257
259
  "eslint": "^10.12.0",
258
260
  "eslint-config-prettier": "^10.1.8",
@@ -263,21 +265,21 @@
263
265
  "eslint-plugin-unicorn": "^78.0.0",
264
266
  "eslint_d": "^15.0.3",
265
267
  "globals": "^17.13.0",
266
- "lefthook": "^2.2.1",
268
+ "lefthook": "^2.2.2",
267
269
  "prettier": "^3.9.10",
268
270
  "prettier-plugin-svelte": "^4.1.1",
269
271
  "prettier-plugin-tailwindcss": "^0.8.1",
270
- "rollup": "^4.64.5",
272
+ "rollup": "^4.64.7",
271
273
  "rollup-plugin-dts": "^6.5.1",
272
274
  "secretlint": "^13.0.7",
273
275
  "typescript": "^6.0.3",
274
- "typescript-eslint": "^8.71.1",
275
- "vitest": "^5.0.3"
276
+ "typescript-eslint": "^8.71.2",
277
+ "vitest": "^5.0.4"
276
278
  },
277
279
  "dependencies": {
278
280
  "cli-spinners": "^3.4.0",
279
281
  "csv-parse": "^7.0.3",
280
- "execa": "^10.1.0",
282
+ "execa": "^10.1.1",
281
283
  "js-yaml": "^5.4.3",
282
284
  "jsonc-parser": "^3.3.1",
283
285
  "ora": "^9.4.1",
@@ -285,12 +287,12 @@
285
287
  "string-width": "^8.3.0",
286
288
  "terminal-link": "^5.0.0",
287
289
  "tsx": "^4.23.15",
288
- "zod": "^4.6.6"
290
+ "zod": "^4.6.7"
289
291
  },
290
292
  "devEngines": {
291
293
  "packageManager": {
292
294
  "name": "pnpm",
293
- "version": "12.12.1+sha512.b7f98934c0b1f29a65f5da52f2d7f994e7faad573ffdddea1497fb4dcb5aec051590ee7c7d95a38172b4bfae103a5b83edf2ee866e11731c2cafa96063610ac5",
295
+ "version": "12.13.0+sha512.1e55719bf26e809dce5c5084fdebaa64efb3da9038ae5d68a9f8a68311f1a45841c8c3b76a37298c3b66f6bcc80409a9b7f33c78a7168a3e90fb65a5d8235ae4",
294
296
  "onFail": "download"
295
297
  }
296
298
  },
@@ -32,8 +32,6 @@ PY
32
32
  - ファイル全体の作り直し — 変更後の本文が元とほとんど共有しない場合
33
33
  - 部分編集のほうが大きくなる場合 — `old_string` / `new_string` の合計が全文を超えるとき(このときも Write で書く)
34
34
 
35
- 実測は `docs/maintainers/file-edits-rationale.md` → "Measured cost of whole-file rewrites"(joshuafolkken/kit#1260)。
36
-
37
35
  ### `sed -i` を使う前に満たす 4 条件
38
36
 
39
37
  `sed` は一致した全行を書き換え、一致 0 件でも黙って成功する。使う前に次を満たす。
@@ -57,4 +55,4 @@ PY
57
55
 
58
56
  ### なぜコストが二重になるか
59
57
 
60
- 書き戻す形は本文がコマンドとファイルの両方に載り、コマンドは以降の全リクエストで読み直される。内訳は `docs/maintainers/file-edits-rationale.md` → "Measured breakdown of command text"、常駐の根拠は `docs/maintainers/file-edits-rationale.md` → "Why it is resident"、固定内容は `docs/maintainers/file-edits-rationale.md` → "Marker tests"。
58
+ 書き戻す形は本文がコマンドとファイルの両方に載り、コマンドは以降の全リクエストで読み直される。
@@ -23,8 +23,7 @@
23
23
  読み手がそのまま打つ書き方
24
24
  - 引用の形(そのままでよい)— 「`gh issue create` は使わない」のような禁止の引用や、CLI の対応状況の記録
25
25
 
26
- 文書ガードはフェンス付きコードブロックだけを走査するので、散文は書き手がこの区別で守る
27
- (`docs/maintainers/gh-rest-rationale.md` → "Why the document guard scans fences only")。
26
+ 文書ガードはフェンス付きコードブロックだけを走査するので、散文は書き手がこの区別で守る。
28
27
 
29
28
  書き換えるときは先に `pnpm josh` のコマンドで置き換えられないかを見る(例: `gh issue view` ではなく
30
29
  `pnpm josh issue:state <N>`)。
@@ -2,8 +2,6 @@
2
2
 
3
3
  ## セッション向け出力で Issue はリンク+セッション言語の短い要約で参照する(joshuafolkken/kit#1758)
4
4
 
5
- 理由は `docs/maintainers/issue-citation-rationale.md` → "Why the rule exists"、発火点の常駐理由は `docs/maintainers/issue-citation-rationale.md` → "Why the trigger is resident in CLAUDE.md"。
6
-
7
5
  **規則**: セッション向け出力で Issue を指すときは、次の 2 つを必ず添える(対応前の「これから走らせる」「待機中」「対象外」の言及も含む)。
8
6
 
9
7
  1. 番号にチケットへの markdown リンク
@@ -11,7 +9,7 @@
11
9
 
12
10
  - `[#<N>](https://github.com/<owner>/<repo>/issues/<N>) — <その Issue が何をするものかの短い要約>`
13
11
 
14
- **この引用行は `pnpm josh issue:cite <N> [<N> ...]` が出す。** 複数 Issue は 1 呼び出しにまとめ、他リポジトリは `--repo <owner/repo>` か `owner/repo#N` 表記(`docs/maintainers/issue-citation-rationale.md` → "Why issue:cite prints the line"、詳細は [docs/josh-commands.md](https://github.com/joshuafolkken/kit/blob/main/docs/josh-commands.md) の `josh issue:cite`)。タイトルは必要ならセッション言語に言い換える。素の `#N` の行(コミットメッセージ・PR 本文・イベント行・Telegram 本文)を写すときは引用形に直す(`docs/maintainers/issue-citation-rationale.md` → "Why josh prints the citation form itself")。
12
+ **この引用行は `pnpm josh issue:cite <N> [<N> ...]` が出す。** 複数 Issue は 1 呼び出しにまとめ、他リポジトリは `--repo <owner/repo>` か `owner/repo#N` 表記(詳細は [docs/josh-commands.md](https://github.com/joshuafolkken/kit/blob/main/docs/josh-commands.md) の `josh issue:cite`)。タイトルは必要ならセッション言語に言い換える。素の `#N` の行(コミットメッセージ・PR 本文・イベント行・Telegram 本文)を写すときは引用形に直す。
15
13
 
16
14
  ### 適用範囲
17
15
 
@@ -25,4 +23,4 @@
25
23
 
26
24
  ### 停止時の担保(joshuafolkken/kit#2247)
27
25
 
28
- `Stop` フック `pnpm josh stop:guard` は返信の地の文に裸の `#N` があると停止をブロックし、`pnpm josh issue:cite <N...>` の実行形を差し戻す。差し戻されたらその実行形で引用し直す(`docs/maintainers/issue-citation-rationale.md` → "How the Stop hook delivers it"、検出が外す範囲は [docs/josh-commands.md](https://github.com/joshuafolkken/kit/blob/main/docs/josh-commands.md) の `josh stop:guard`)。
26
+ `Stop` フック `pnpm josh stop:guard` は返信の地の文に裸の `#N` があると、`issue:cite` と同じ処理で引用行を作り `systemMessage` として表示する(モデルの手番は使わない)。引用できない番号があったときだけ停止をブロックし、`pnpm josh issue:cite <N...>` の実行形を差し戻す。差し戻されたらその実行形で引用し直す(検出が外す範囲は [docs/josh-commands.md](https://github.com/joshuafolkken/kit/blob/main/docs/josh-commands.md) の `josh stop:guard`)。
@@ -43,6 +43,15 @@
43
43
  <実際の出力>
44
44
  ```
45
45
 
46
+ ## 期待効果
47
+
48
+ <`- 目的: 時間短縮` のみ。出典はコマンドと値>
49
+
50
+ - 効く率: <値>
51
+ - 1 回あたりの得: <値>
52
+ - 外れたときの損: <値>
53
+ - 出典: <`pnpm josh lane:stats` → 値>
54
+
46
55
  ## Origin
47
56
 
48
57
  <別リポジトリのセッションから起票した場合のみ。起票元 Issue を `owner/repo#N` 形式で書く。自リポジトリ発の Issue では節ごと省略する>
@@ -57,6 +66,7 @@
57
66
  | `- 種別: 不具合` | `bug` | 報告された症状を直す(無ければ `- 種別: 非不具合`) |
58
67
  | `- 目的: 機能追加` | `enhancement` | 新しい機能。修正・文書・依存更新・保守には書かない |
59
68
  | `- 目的: 機能改善` | `enhancement` | 既存機能の改善。目的が曖昧なら受け入れ条件を具体化してから |
69
+ | `- 目的: 時間短縮` | `enhancement` | 所要時間を短くする。`## 期待効果` の 4 行が必須 |
60
70
  | `- 互換性: 破壊的変更` | `breaking-change` | 契約を変える。移行措置があっても書き、廃止対象と影響を書く |
61
71
  | `- 種別: 振る舞い変更` | なし | AI の振る舞いを変える。下の 3 見出しが必須 |
62
72
  | `- 人の判断: 不要` | `auto-ok`(除外ラベルが無ければ) | 方針の判断・外部アカウント・目視確認のどれも要らない |
@@ -114,5 +124,3 @@
114
124
  ```
115
125
 
116
126
  4. 順序があるときだけ、別ステップで依存を足す(Issue 番号ではなく database id を渡す): `gh api repos/{owner}/{repo}/issues/<N2>/dependencies/blocked_by -F issue_id="$(gh api repos/{owner}/{repo}/issues/<N1> --jq .id)"`
117
-
118
- 各手順の理由は kit の `docs/maintainers/epic-commands-rationale.md` →「Creating an epic by hand」。
@@ -0,0 +1,35 @@
1
+ # Lane session instructions
2
+
3
+ headless のレーン子とレビューセッションは、`CLAUDE.md` を読み込まずにこの文書を起動引数で受け取る(`scripts/agent/lane-instructions.ts`)。`include` 行は起動時に `CLAUDE.md` の節・項目へ置き換わるので、規則の単一ソースは `CLAUDE.md` のまま。
4
+
5
+ - 起動プロンプトがそのまま明示の起動。応答する人はいないので、確認は求めない。
6
+ - `CLAUDE.md` を開き直さない。ここに無い規則は、対話セッションでしか効かない。
7
+
8
+ <!-- include: CLAUDE.md → "Project" -->
9
+
10
+ ## Communication
11
+
12
+ <!-- include: CLAUDE.md → "Fix root causes, not symptoms." -->
13
+ <!-- include: CLAUDE.md → "Cross-package problems" -->
14
+ <!-- include: CLAUDE.md → "Third-party repositories are Tier C." -->
15
+ <!-- include: CLAUDE.md → "No clones" -->
16
+ <!-- include: CLAUDE.md → "Design for elegance and simplicity first." -->
17
+ <!-- include: CLAUDE.md → "Write concise prose" -->
18
+ <!-- include: CLAUDE.md → "Route distributed-doc / config changes upstream to kit." -->
19
+ <!-- include: CLAUDE.md → "Latest-first" -->
20
+ <!-- include: CLAUDE.md → "Output language follows" -->
21
+ <!-- include: CLAUDE.md → "Hook-delivered rules" -->
22
+
23
+ <!-- include: CLAUDE.md → "Decision autonomy" -->
24
+
25
+ <!-- include: CLAUDE.md → "Critical Conventions" -->
26
+
27
+ <!-- include: CLAUDE.md → "Package-First Development" -->
28
+
29
+ <!-- include: CLAUDE.md → "Code Change Rules" -->
30
+
31
+ <!-- include: CLAUDE.md → "Completion gate" -->
32
+
33
+ <!-- include: CLAUDE.md → "Pre-commit Self-Review" -->
34
+
35
+ <!-- include: CLAUDE.md → "Git Rules" -->
@@ -12,10 +12,6 @@
12
12
  - 修正できたら修正内容を、できなかったら失敗チェック名・原因・未解決である旨を `--notify-message` に書く。**完了コメントに失敗を隠してはならない**
13
13
  - ユーザーへの報告でも失敗を「成功」として扱わない
14
14
 
15
- ### ほかの単一ソースにある規則
16
-
17
- auto-merge と `completion` 通知・明示的な起動・`confirmation` 通知・作業ツリーの保持・overrides の保護の置き場は `docs/maintainers/operating-rules-rationale.md` → "Rules that moved to their single source"。
18
-
19
15
  ### 指示されていない行動は取らない
20
16
 
21
17
  `CLAUDE.md` → "Git Rules" の細則。対象には共有ブランチへの push・外部通知の追加送信・リポジトリ設定の変更も含む。
@@ -28,7 +24,7 @@ auto-merge と `completion` 通知・明示的な起動・`confirmation` 通知
28
24
 
29
25
  ### no-self-staging — git index を勝手に変更しない(自律 staging の禁止)
30
26
 
31
- `CLAUDE.md` → "Git Rules" の細則。index には履歴がなく、上書きされたステージ状態は復元できない(`docs/maintainers/operating-rules-rationale.md` → "Why the index is the user's")。
27
+ `CLAUDE.md` → "Git Rules" の細則。index には履歴がなく、上書きされたステージ状態は復元できない。
32
28
 
33
29
  - **調査目的の staging はしない。** 読み取り専用コマンドを使う: `git status --short`、`git diff` / `git diff --stat` / `git diff HEAD`、`git diff --staged`、未追跡ファイルは `git diff --no-index /dev/null <new-file>` か直接読む
34
30
  - staging してよいのは次の 2 ケースだけ。それ以外は実行せずに確認する:
@@ -44,7 +40,7 @@ auto-merge と `completion` 通知・明示的な起動・`confirmation` 通知
44
40
 
45
41
  1〜3 は直後に `pnpm josh stash:pop "<メッセージ>"` で復元する。stash は全 work tree が共有する 1 本のスタックなので、位置指定や引数なしの `git stash pop` は使わない(joshuafolkken/kit#2050)。4 は復元しない — 代わりに stash を子の Issue にコメントで記録する(`prerequisite.md` の stash と同じく、記録だけが後で pop させる手がかり)
46
42
 
47
- - **会話で作った実装をランへ渡す「引き渡し用の stash」も `pnpm josh stash:pop "<メッセージ>"` で復元する。当てたあと stash は消える**(`docs/maintainers/operating-rules-rationale.md` → "Why a handed-over stash is popped")
43
+ - **会話で作った実装をランへ渡す「引き渡し用の stash」も `pnpm josh stash:pop "<メッセージ>"` で復元する。当てたあと stash は消える**
48
44
  - 計画には復元手順としてこの 1 行だけを書く。`git stash apply` / `git stash pop` も「drop しない」という条件も書かない
49
45
  - 計画がガードの拒否する復元形を指していたら、実行側は `stash:pop` に読み替えて続行し、Issue コメントに残す(Tier A)。`needs-decision` では止まらない
50
46
  - stash を残すのは持ち主の判断だけ。持ち主が計画に理由を書き、ランはそこで止まって確認する
@@ -8,7 +8,7 @@
8
8
  }
9
9
  ```
10
10
 
11
- **8,000 文字**(harness の既定は 30,000、最大は 150,000。根拠は `docs/maintainers/output-bounds-rationale.md` → "Why 8,000")。効くのは Bash ツールだけで、`Read` と `Agent` の結果には効かない。
11
+ **8,000 文字**(harness の既定は 30,000、最大は 150,000)。効くのは Bash ツールだけで、`Read` と `Agent` の結果には効かない。
12
12
 
13
13
  ## 切り詰められたときにどうするか
14
14
 
@@ -34,8 +34,8 @@
34
34
  - パイプが避けられないなら `set -o pipefail` を前置する
35
35
  - どの形でも、印字された判定行を読む。終了コードだけを答えにしない
36
36
 
37
- 対象は結果が合否を意味するコマンドだけ — `gate` / `check` / `lint*` / `cspell*` / `test*` / `eval`。**`git log | head` や `gh issue list | head` は対象外であり、意図的にそうしている。** `latest:scope` / `review:brief` も、判定ではなく答えを印字するので `$(...)` で受けてよい。`pnpm josh pretool:guard` は、後段が `tail` /全行読みの `grep` だけの検証パイプラインを `(set -o pipefail; …)` で包み、他のパイプは拒否する(`rule-delivery.md`、`docs/maintainers/output-bounds-rationale.md` → "Why the pipe rule is delivered by a trigger")。
37
+ 対象は結果が合否を意味するコマンドだけ — `gate` / `check` / `lint*` / `cspell*` / `test*` / `eval`。**`git log | head` や `gh issue list | head` は対象外であり、意図的にそうしている。** `latest:scope` / `review:brief` も、判定ではなく答えを印字するので `$(...)` で受けてよい。`pnpm josh pretool:guard` は、後段が `tail` /全行読みの `grep` だけの検証パイプラインを `(set -o pipefail; …)` で包み、他のパイプは拒否する(`rule-delivery.md`)。
38
38
 
39
39
  ## 検査
40
40
 
41
- `scripts/lib/bash-output-cap.test.ts` が、配布設定の上限がこの文書の値と一致し、既定より小さく最大を超えないことを固定する(`docs/maintainers/output-bounds-rationale.md` → "What the tests pin")。
41
+ `scripts/lib/bash-output-cap.test.ts` が、配布設定の上限がこの文書の値と一致し、既定より小さく最大を超えないことを固定する。
@@ -24,7 +24,7 @@
24
24
  2. コード内コメント、テストタイトル(`describe` / `it` / `expect`)、コミットメッセージ
25
25
  3. スクリプトが出力する固定文字列: Telegram のヘッダーラベル(`Planning` / `Completion` など)、`Issue:` / `PR:` の URL ラベル、`--notify-message` 省略時の既定メッセージ
26
26
 
27
- `JOSH_SESSION_LANG` は開発者個人の設定で、`.env`(gitignore 済み)に置く。設定値は毎ターン `UserPromptSubmit` フック(`scripts/hooks/run-hook.sh session-lang`、Codex は `.codex/hooks.json`)が差し込み、未設定なら出さない。フックが走らないハーネス(Gemini / Cursor)は `.env` を読む。既定の理由は `docs/maintainers/overview-rationale.md` → "Why the session language defaults the way it does"。
27
+ `JOSH_SESSION_LANG` は開発者個人の設定で、`.env`(gitignore 済み)に置く。設定値は毎ターン `UserPromptSubmit` フック(`scripts/hooks/run-hook.sh session-lang`、Codex は `.codex/hooks.json`)が差し込み、未設定なら出さない。フックが走らないハーネス(Gemini / Cursor)は `.env` を読む。
28
28
 
29
29
  ### 配布ドキュメントの層ごとの言語(joshuafolkken/kit#2997)
30
30
 
@@ -1,7 +1,5 @@
1
1
  # 原則
2
2
 
3
- 経緯と適用例は [`docs/maintainers/principles-rationale.md`](../../docs/maintainers/principles-rationale.md) の各節にあり、実行中には読まない。
4
-
5
3
  ## no-clones — クローン禁止・単一ソース化
6
4
 
7
5
  既存の非自明なロジック(別ファイル・別モジュール・上流依存を含む別パッケージにあるもの)を、ソースを変えずに済ませるために**コピー・移植・再実装しない**。複製したくなったら、全消費者が import する共有モジュール/export/パッケージへ単一ソース化する。
@@ -11,14 +9,25 @@
11
9
  - 「X を触るな」という制約でクローンを黙って正当化しない。「クリーンな修正は kit の変更が必要、代替はクローン、どちらにする?」と先に提示する
12
10
  - 複製は、単一ソース化の代替案とコストを提示し、ユーザーの明示承認を得た後にのみ行う
13
11
 
14
- 計測は `pnpm josh clone:scan`(`pnpm josh oracle:list` の決定オラクル)。リポジトリ内と `JOSH_REPO_PATHS` の他リポジトリを跨いだ複製の件数と各 `file:line`(`[same-file|cross-file|cross-repo]`、なしは `clean`)を印字する(`docs/maintainers/principles-rationale.md` → "Why clone:scan exists")。
12
+ 計測は `pnpm josh clone:scan`(`pnpm josh oracle:list` の決定オラクル)。リポジトリ内と `JOSH_REPO_PATHS` の他リポジトリを跨いだ複製の件数と各 `file:line`(`[same-file|cross-file|cross-repo]`、なしは `clean`)を印字する。
15
13
 
16
14
  ## elegant-design — 設計はエレガント・シンプルを第一目標にする
17
15
 
18
- フック・ガード・ルール・抽象化を足す前に、**原因側を直せばその仕組みが要らなくならないか**を問う。要らなくなるなら足さず、原因を直す。検出・通知・叱責を強化する前に、その入力を生んでいる側を断つ。適用例は `docs/maintainers/principles-rationale.md` → "An application of simplicity-first"。
16
+ フック・ガード・ルール・抽象化を足す前に、**原因側を直せばその仕組みが要らなくならないか**を問う。要らなくなるなら足さず、原因を直す。検出・通知・叱責を強化する前に、その入力を生んでいる側を断つ。
19
17
 
20
18
  書かれたコードの可読性は `prompts/coding-standards.md` の担当で、ここはどの仕組みをどこへ足すかの規則である。互いの本文を写さず、指すだけにする。
21
19
 
20
+ ## automate-first — 判断の要らない手順は AI に渡さず自動化する
21
+
22
+ AI の判断が要らない手順は、AI に読ませて実行させない。規則を足すときは、次の順で最初に成り立つ形を選ぶ。
23
+
24
+ 1. コマンド — 手順そのものを `pnpm josh <command>` にする
25
+ 2. フックの自動実行 — フックがその場で実行する、または呼び出しを `updatedInput` で書き換える
26
+ 3. 差し戻しガード — 正しい形が呼び出しから決まらないときだけ拒否する
27
+ 4. 文書 — 上の 3 つのどれも成り立たないときだけ書く
28
+
29
+ 下の段を選ぶときは、上の段が成り立たない理由を示す。配置の問いは `residency.md` →「自動化の問い」、ガードの理由は `scripts/rules/guard-remedy.ts` の `why` に書く。
30
+
22
31
  ## quality-priority — 品質目標が衝突したときの優先順位
23
32
 
24
33
  上の段は、下の段のために犠牲にしない。
@@ -42,13 +51,11 @@
42
51
  docs・prompts・skills・拒否文・Issue・PR の文章に適用する。
43
52
 
44
53
  - 本文には、いつ何をするか(条件と動作)だけを書く
45
- - 理由と経緯は rationale 文書に置き、本文からは見出しで指す
54
+ - 理由と経緯は rationale 文書に置き、本文からは指さない — 根拠文書(`docs/maintainers/`)の側から手順を指す
46
55
  - 太字は 1 節に 1 つまで。箇条書き先頭の見出し語は数えない。`→ "…"` で引かれている太字は消さない
47
56
  - 同じ内容を言い換えて繰り返さない
48
57
  - ファイルや節が自分自身を説明する文(「このファイルは〜である」)を書かない
49
58
 
50
- 導入時のベースラインは `docs/maintainers/principles-rationale.md` → "Why concise-prose exists"。
51
-
52
59
  ## consult-vs-execute — 相談と実行を区別する
53
60
 
54
61
  ユーザーが進め方・理由を尋ねたり目標を述べたりした(「どうすべき?」「how should we…」「なぜ」「〜したい」「〜の方が良い?」)ときは、**分析と推奨のみ**を返し、ファイル編集・Issue 作成などのアクションは取らない。目標の表明は計画の依頼であって、実行の承認ではない。
@@ -87,7 +94,6 @@ docs・prompts・skills・拒否文・Issue・PR の文章に適用する。
87
94
  **規則の本体は `CLAUDE.md` にしか無い。** `AGENTS.md`・`GEMINI.md`・`.cursorrules` は「規則は `CLAUDE.md` にある。作業前に全文を読むこと」と「規則を書き戻さない」だけを書いた導線である(`.cursorrules` は Svelte MCP の案内だけを足す)。
88
95
 
89
96
  - 規則の追加・変更・節の追加は `CLAUDE.md` に 1 回だけ書き、導線文書には書き戻さない
90
- - 経緯と機械的な検査は `docs/maintainers/principles-rationale.md` → "Why AGENTS and GEMINI are pointers"、`@CLAUDE.md` 行と他ツールでの未検証は `docs/maintainers/principles-rationale.md` → "The include line, and what has not been verified"
91
97
 
92
98
  ### Claude Code 以外のエージェントでの読み替え
93
99
 
@@ -94,6 +94,15 @@
94
94
 
95
95
  **実行証跡は「動くこと」の証拠であり、gate の緑ではない**(joshuafolkken/kit#2246)。同じ証跡を PR 本文の `## 実機証跡` 節(コマンド+実出力のフェンス)にも置く。無い実行時の変更は `pnpm josh followup` がマージを拒否する(#2446)。
96
96
 
97
+ ### PR 本文の受け入れ条件の対応表
98
+
99
+ `## 受け入れ条件の対応` 節の行の形(`pnpm josh pr` が識別子つきの `未記入` 行を付け、`pnpm josh followup` が照合する — `scripts/review/acceptance-map.ts`):
100
+
101
+ ```md
102
+ - `ac-1a2b3c4d` <条件> — 満たした: <テスト名・`file:line`・実行出力のいずれか>
103
+ - `ac-5e6f7a8b` <条件> — 見送り: #<切り出した Issue> <理由>
104
+ ```
105
+
97
106
  **`run:carry` の実行証跡は `JOSH_TEMP_ROOT` を新しい一時ディレクトリに向けて取る(必須)。** 状態レコードは本物の run と共有なので、`JOSH_TEMP_ROOT="$(mktemp -d)" pnpm josh run:carry --begin …` のように各コマンドの頭に付ける(`docs/environment-variables.md` → "Runs")。`run:merge` は main の同期・lane の close・GitHub への書き込みを行うため、これでは切り離せない。
98
107
 
99
108
  ### 区切りの報告(完了報告と区別する・必須)
@@ -1,6 +1,6 @@
1
1
  ## 常駐ドキュメントと skill の分担(何を常駐に残すか)
2
2
 
3
- 規則を置く・移す・引退させるターンに読む(joshuafolkken/kit#2891)。規則のトリガは `CLAUDE.md` に 1 度だけ、手順と数値は導線の先に 1 度だけ書く。`CLAUDE.md` の上限は `scripts/document/resident-budget.ts` の `RESIDENT_CEILING_BYTES`(残りは `pnpm josh bytes CLAUDE.md`)。**置き場所は重要度ではなく、下の問いを順に当てて決める。** 経緯は `docs/maintainers/claude-md-history.md` と `docs/maintainers/residency-rationale.md`。
3
+ 規則を置く・移す・引退させるターンに読む(joshuafolkken/kit#2891)。規則のトリガは `CLAUDE.md` に 1 度だけ、手順と数値は導線の先に 1 度だけ書く。`CLAUDE.md` の上限は `scripts/document/resident-budget.ts` の `RESIDENT_CEILING_BYTES`(残りは `pnpm josh bytes CLAUDE.md`)。**置き場所は重要度ではなく、下の問いを順に当てて決める。**
4
4
 
5
5
  ### 第 0 問(先に問う)
6
6
 
@@ -14,11 +14,17 @@
14
14
 
15
15
  そうであれば、規則はドライバの状態遷移に書き、文書は導線 1 行だけにする。`pnpm josh run:step <N>` が次の 1 手を計算する(`scripts/run/run-step.ts`、joshuafolkken/kit#2248)。
16
16
 
17
+ ### 自動化の問い(順序の問いの次に問う)
18
+
19
+ > **その手順は、AI の判断なしに実行できるか。**
20
+
21
+ できるなら、コマンドかフックの自動実行にし、文書にも差し戻しガードにもしない(`principles.md` →「automate-first」)。文書やガードとして置くのは、自動化できない理由を示せるときだけである。ガードの理由は `scripts/rules/guard-remedy.ts` の `why` が必須項目として持ち、`pnpm josh rule:list` が `not automated` として印字する。理由のないガードは `guard-remedy.test.ts` が落とす。
22
+
17
23
  ### 第 1 問 — 引き金を名指しできるか
18
24
 
19
25
  > **その規則が効き始める瞬間を、1 件のツール呼び出しとして名指しできるか。**
20
26
 
21
- できるなら、規則本文を常駐から出し、配送ガードの行に `scripts/rules/rule-registry.ts` の項目を添え、[`rule-delivery.md`](./rule-delivery.md) が指す `pnpm josh rule:list` の一覧に載せる(joshuafolkken/kit#1524)。**規則ごとのトリガ行は常駐に残さない** — `CLAUDE.md` には一覧への導線 1 行だけを置く。フックが走らないセッションは一覧を自己点検に使う(`principles.md` →「Claude Code 以外のエージェントでの読み替え」)。根拠は `docs/maintainers/residency-rationale.md` → "Why a delivered rule leaves no resident line"。
27
+ できるなら、規則本文を常駐から出し、配送ガードの行に `scripts/rules/rule-registry.ts` の項目を添え、[`rule-delivery.md`](./rule-delivery.md) が指す `pnpm josh rule:list` の一覧に載せる(joshuafolkken/kit#1524)。**規則ごとのトリガ行は常駐に残さない** — `CLAUDE.md` には一覧への導線 1 行だけを置く。フックが走らないセッションは一覧を自己点検に使う(`principles.md` →「Claude Code 以外のエージェントでの読み替え」)。
22
28
 
23
29
  ### 第 2 問 — skill なしのターンでも効く必要があるか
24
30
 
@@ -29,9 +35,7 @@
29
35
  ### 残すときの書き方と予算
30
36
 
31
37
  - **常駐規則は、トリガと導線の 2 つで書く。** **判定は、導線を一度も開かないターンでも常駐の記述だけで正しく振る舞えるかである。**
32
- - **削ることは移すことであり、削除は理由を示して初めて許される例外である。** 先に導線の先へ移し、マーカーテストも付け替える。引退の 3 条件は `docs/maintainers/residency-rationale.md` → "Trigger and pointer, and the narrow retirement route"
33
- - 経緯(Issue 番号・なぜ・計測・却下案)は `docs/maintainers/<topic>-rationale.md` に置く。Issue 番号引用の件数は `scripts/document/issue-citation-budget.ts` のラチェットに従う — 減らしたら記録も下げる(`docs/maintainers/residency-rationale.md` → "The issue-citation ratchet")
34
- - 引用は本文があるファイルを直接指す(`docs/maintainers/residency-rationale.md` → "A pointer-only topic file is never cited")
35
- - 予算が詰まったら回収で解く。**引き上げは Tier C として扱う** — `RESIDENT_CEILING_BYTES`・`RESIDENT_HEADROOM_BYTES`・`RE_INLINE_GUARD_HEADROOM_BYTES` の緩和は、`docs/maintainers/residency-rationale.md` → "When the ceiling may be raised" の 3 条件を示し、ユーザーの明示指示を得てから行う
36
-
37
- 常駐に残る規則と配送へ移した規則の一覧は `docs/maintainers/residency-rationale.md` → "The resident-rule list"。そのほかの経緯: `docs/maintainers/residency-rationale.md` → "The reduction freeze and its retraction"、`docs/maintainers/residency-rationale.md` → "Measurement decides what leaves"、`docs/maintainers/residency-rationale.md` → "The `rule:value` readings"、`docs/maintainers/residency-rationale.md` → "Why the delivered list carries no count"、`docs/maintainers/residency-rationale.md` → "Why the workflow index is split by topic"、`docs/maintainers/residency-rationale.md` → "One list, not two"、`docs/maintainers/residency-rationale.md` → "The resident budget"。
38
+ - **削ることは移すことであり、削除は理由を示して初めて許される例外である。** 先に導線の先へ移し、マーカーテストも付け替える。移さず引退させてよいのは 3 条件がすべて揃うときだけ — 同じ文書に単一ソースが宣言された文の写しである・単一ソースと突き合わせてほかにない文を含まない・マーカーテストが固定していない。揃わなければ候補と証拠を記録して規則は残す
39
+ - 経緯(Issue 番号・なぜ・計測・却下案)は `docs/maintainers/<topic>-rationale.md` に置き、その冒頭で説明する手順文書を名指しする。**参照の向きは根拠 → 手順だけ** — AI が読む文書から根拠文書は指さない(`scripts/document/rationale-documents.test.ts` が検出する)。Issue 番号引用の件数は `scripts/document/issue-citation-budget.ts` のラチェットに従う — 減らしたら記録も下げる
40
+ - 引用は本文があるファイルを直接指す
41
+ - 予算が詰まったら回収で解く。**引き上げは Tier C として扱う** — `RESIDENT_CEILING_BYTES`・`RESIDENT_HEADROOM_BYTES`・`RE_INLINE_GUARD_HEADROOM_BYTES` の緩和は、3 条件(回収の余地が尽きたことを計測で示す・需要が 1 規則ではなく常駐すべき規則数の増加から来る・増やす量は需要と回収可能量の差だけで丸めない)を示し、ユーザーの明示指示を得てから行う。条件が揃うこと自体は指示ではない
@@ -2,30 +2,22 @@
2
2
 
3
3
  規則の届け方は**常駐**(`CLAUDE.md` に書き毎ターン読み込ませる)と**引き金つき配送**(効く瞬間にフックが本文を突きつける)の 2 つ。
4
4
 
5
- ## なぜ配送が要るのか
6
-
7
- `docs/maintainers/rule-delivery-rationale.md` → "Why delivery is needed"。
8
-
9
5
  ## 判定基準 — 引き金を特定できるか
10
6
 
11
7
  どの規則を配送へ移すかは [`residency.md`](./residency.md) →「第 1 問」に従う。
12
8
 
13
9
  ## 機構 — 1 本だけ、新規に作らない
14
10
 
15
- 入口は `PreToolUse` の `pnpm josh pretool:guard`(バッチング / 調査 / 規則の 3 ガード)と Stop フックの `pnpm josh stop:guard` の 2 つ。**2 本目の配送経路を作るのは `CLAUDE.md` →「No clones」が禁じるクローン**である。配送は呼び出しの書き換え(`updatedInput`)でもよい — 規則の結果そのものを機械的に作れる形に限る。書き換えは `pnpm josh rule:value` が `rewritten` として数える。配線・停止スイッチ・拒否の優先順位: `docs/maintainers/rule-delivery-rationale.md` → "The mechanism"。
11
+ 入口は `PreToolUse` の `pnpm josh pretool:guard`(バッチング / 調査 / 規則の 3 ガード)と Stop フックの `pnpm josh stop:guard` の 2 つ。**2 本目の配送経路を作るのは `CLAUDE.md` →「No clones」が禁じるクローン**である。配送は呼び出しの書き換え(`updatedInput`)でもよい — 規則の結果そのものを機械的に作れる形に限る。書き換えは `pnpm josh rule:value` が `rewritten` として数える。どのガードが書き換えるかは `scripts/rules/guard-remedy.ts` の分類表が単一ソース。
16
12
 
17
13
  ## 配送されている規則
18
14
 
19
15
  一覧は `pnpm josh rule:list` が `scripts/rules/delivered-rules.ts` から生成する(joshuafolkken/kit#3399)。各項目は規則の単一ソース・発火点・発火しないときを持ち、フックが走らないエージェントはその出力を自己適用のチェックリストにする(`principles.md`)。
20
16
 
21
- **引き金はシェルのコマンド文字列しか見えない**(node 内の REST や `gh api --input <file>` は掛からない)ので、常駐側にトリガ 1 行を残す(`docs/maintainers/rule-delivery-rationale.md` → "Shell evaluation of a body is one more row of the same mechanism")。
17
+ **引き金はシェルのコマンド文字列しか見えない**(node 内の REST や `gh api --input <file>` は掛からない)ので、常駐側にトリガ 1 行を残す。
22
18
 
23
19
  引き金が発火しないターンでは何も起きないのが仕様で、各項目の発火しない状態は「規則が守られている状態」と一致させる。一致が取れない規則は常駐に残す。
24
20
 
25
21
  ## 配送は 1 ラン 1 回
26
22
 
27
- 配送文はラン 1 回につき 1 度しか出ないので、**「同じ呼び出しをもう一度出せ」と明記する**。例外: 繰り返す行為を止める項目は毎回発火し(joshuafolkken/kit#1570)、前提の行為を求める項目は前提が末尾に現れるまで毎回拒否する(joshuafolkken/kit#2807)— その配送文にはそれぞれ「これは毎回発火する」「前提が末尾に現れるまで拒否する」と明記する。バッチングと調査の 2 ガードは違反が間隔分続けば再び発火する(joshuafolkken/kit#2164)。前提の証拠を読めないときは拒否する。経緯: `docs/maintainers/rule-delivery-rationale.md` → "One delivery per run"。配送文の長さの上限と経緯の置き場所: `docs/maintainers/rule-delivery-rationale.md` → "Why a refusal is the action and the next command"。
28
-
29
- ## マーカーテスト
30
-
31
- `docs/maintainers/rule-delivery-rationale.md` → "Marker tests"。
23
+ 配送文はラン 1 回につき 1 度しか出ないので、**「同じ呼び出しをもう一度出せ」と明記する**。例外: 繰り返す行為を止める項目は毎回発火し(joshuafolkken/kit#1570)、前提の行為を求める項目は前提が末尾に現れるまで毎回拒否する(joshuafolkken/kit#2807)— その配送文にはそれぞれ「これは毎回発火する」「前提が末尾に現れるまで拒否する」と明記する。バッチングと調査の 2 ガードは違反が間隔分続けば再び発火する(joshuafolkken/kit#2164)。前提の証拠を読めないときは拒否する。
@@ -10,9 +10,9 @@
10
10
  gh api repos/{owner}/{repo}/issues/1535/comments -f body="… `pnpm josh ms` は …"
11
11
  ```
12
12
 
13
- `pnpm josh followup --notify-message "…"` も同じく壊れる。経緯は `docs/maintainers/shell-body-rationale.md` → "The incidents — two kinds of damage, one cause"。
13
+ `pnpm josh followup --notify-message "…"` も同じく壊れる。
14
14
 
15
- 発火するのは `` ` `` と `$` で、`!` ではない(`docs/maintainers/shell-body-rationale.md` → "Why `!` is not a trigger")。
15
+ 発火するのは `` ` `` と `$` で、`!` ではない。
16
16
 
17
17
  ### 安全な書き方
18
18
 
@@ -25,16 +25,16 @@ pnpm josh followup "<title> #<N>" --notify-message-file <path>
25
25
  pnpm josh notify --task-type confirmation --issue-url "<url>" --body-file <path> --recommended "<choice>"
26
26
  ```
27
27
 
28
- PR コメントも `pnpm josh issue:comment <N> --body-file <path>` で投稿する(REST では PR コメントは issue コメント)。`gh issue comment` / `gh pr comment` は使わない(`docs/maintainers/shell-body-rationale.md` → "Why no `gh` subcommand is written in an executable block")。
28
+ PR コメントも `pnpm josh issue:comment <N> --body-file <path>` で投稿する(REST では PR コメントは issue コメント)。`gh issue comment` / `gh pr comment` は使わない。
29
29
 
30
30
  ### コメント投稿は `pnpm josh issue:comment` の 1 綴りだけ(joshuafolkken/kit#2304)
31
31
 
32
- `gh api` の `-f body=@<path>` / `--raw-field body=@<path>` は `@<path>` というリテラルを黙って投稿する(`docs/maintainers/shell-body-rationale.md` → "The comments lost to `-f body=@`")。**Issue/PR コメントの投稿は `pnpm josh issue:comment <N> --body-file <path>` ただ 1 綴りに寄せる。** `-f body=@…` は `pnpm josh rule:guard` が実行前に拒否する(`raw-field-body` 行、`scripts/rules/raw-field-body.ts`)。Issue body 書き換えの `-X PATCH ... --field body=@<path>` は `-F` 側で安全なのでそのまま使う。
32
+ `gh api` の `-f body=@<path>` / `--raw-field body=@<path>` は `@<path>` というリテラルを黙って投稿する。**Issue/PR コメントの投稿は `pnpm josh issue:comment <N> --body-file <path>` ただ 1 綴りに寄せる。** `-f body=@…` は `pnpm josh rule:guard` が実行前に拒否する(`raw-field-body` 行、`scripts/rules/raw-field-body.ts`)。Issue body 書き換えの `-X PATCH ... --field body=@<path>` は `-F` 側で安全なのでそのまま使う。
33
33
 
34
- `--body-file` / `--notify-message-file` は `-` で標準入力を読む(実装は `scripts/josh/cli-body.ts`)。`--body` と `--body-file` の同時指定は拒否される(`docs/maintainers/shell-body-rationale.md` → "Why `--body` and `--body-file` together are refused")。
34
+ `--body-file` / `--notify-message-file` は `-` で標準入力を読む(実装は `scripts/josh/cli-body.ts`)。`--body` と `--body-file` の同時指定は拒否される。
35
35
 
36
36
  **`$'…'` も安全である。** ANSI-C クォートの中では置換も展開も起きないので、`CLAUDE.md` の `--body=$'…'` はそのまま使う。長い本文はファイルにする。
37
37
 
38
38
  ### 引き金つき配送
39
39
 
40
- `pnpm josh rule:guard` は、二重引用符の本文値にバッククォートか `$` を含む `Bash` 呼び出しを拒否する。拒否されたら本文をファイルに移して出し直す。**引き金が見えない綴り(`-b`・`-f title=` など)でも、フックが走らないエージェントでも規則は同じく拘束する。** 見えない綴りの一覧は `docs/maintainers/shell-body-rationale.md` → "Why it is a triggered delivery"、引き金の設計は `docs/maintainers/shell-body-rationale.md` → "Why the trigger reads the body, not the flag"、固定するテストは `docs/maintainers/shell-body-rationale.md` → "Marker tests"。
40
+ `pnpm josh rule:guard` は、二重引用符の本文値にバッククォートか `$` を含む `Bash` 呼び出しを拒否する。拒否されたら本文をファイルに移して出し直す。**引き金が見えない綴り(`-b`・`-f title=` など)でも、フックが走らないエージェントでも規則は同じく拘束する。**
@@ -1,6 +1,6 @@
1
1
  # 独立した呼び出しは同じターンに載せる(joshuafolkken/kit#1304)
2
2
 
3
- 常駐側には [`rule-delivery.md`](./rule-delivery.md) →「配送されている規則」への導線だけが残り、規則本文は `pnpm josh batch:guard` が効く瞬間に配送する(`docs/maintainers/turn-batching-rationale.md` → "Why it left residency (joshuafolkken/kit#1524)")。
3
+ 常駐側には [`rule-delivery.md`](./rule-delivery.md) →「配送されている規則」への導線だけが残り、規則本文は `pnpm josh batch:guard` が効く瞬間に配送する。
4
4
 
5
5
  ## 何を求めているか
6
6
 
@@ -9,7 +9,7 @@
9
9
  - no → その呼び出しは、依存していない他の呼び出しと同じターンに載せる
10
10
  - yes → 結果を待つ。別のターンになるのが正しい
11
11
 
12
- ファイル 3 つを 3 ターンで読む、`git status` と `pnpm josh issue:state` を別ターンに分ける — いずれも禁止。**費用は仕事の量ではなく往復の回数にある。**(`docs/maintainers/turn-batching-rationale.md` → "Why the number of turns is the cost")
12
+ ファイル 3 つを 3 ターンで読む、`git status` と `pnpm josh issue:state` を別ターンに分ける — いずれも禁止。**費用は仕事の量ではなく往復の回数にある。**
13
13
 
14
14
  ## 判断基準は「依存の有無」であって、呼び出しの種類ではない
15
15
 
@@ -21,12 +21,12 @@
21
21
 
22
22
  ## ガードが見えないところ — ここでは自分で規則を当てる
23
23
 
24
- 中断中のターン・`Write`・書き込む `josh` サブコマンドや連鎖した行・ツールを呼ばないターン・ガードが `off` のレーン子でも、規則は同じく拘束する。一覧は `docs/maintainers/turn-batching-rationale.md` → "Where the guard cannot see"、却下した案は `docs/maintainers/turn-batching-rationale.md` → "Rejected mechanisms" と `docs/maintainers/turn-batching-rationale.md` → "How the guard's scope grew"。
24
+ 中断中のターン・`Write`・書き込む `josh` サブコマンドや連鎖した行・ツールを呼ばないターン・ガードが `off` のレーン子でも、規則は同じく拘束する。
25
25
 
26
26
  ## 事後の計測 — 実行タイミングレポートの `Round trips:`
27
27
 
28
- round trip は 1 ターンがまとめて出した呼び出しのかたまり 1 つで、1.50 呼び出し/往復を下回ると 1 行の指摘が出る。`tool-less turns`(発話だけのターン)は自分で減らす。実装は `scripts/time-runtime/time-round-trips.ts`、読み方は `docs/maintainers/turn-batching-rationale.md` → "Reading the round-trip measurement"。
28
+ round trip は 1 ターンがまとめて出した呼び出しのかたまり 1 つで、1.50 呼び出し/往復を下回ると 1 行の指摘が出る。`tool-less turns`(発話だけのターン)は自分で減らす。実装は `scripts/time-runtime/time-round-trips.ts`。
29
29
 
30
30
  ## 実装中の独立編集に効く合成コマンド(joshuafolkken/kit#2202)
31
31
 
32
- **Step 0 が対象ファイルを列挙したら、`pnpm josh read:files <path> …` で読み取りを 1 回に畳み、続く独立した編集は `pnpm josh edit:files` の 1 呼び出しで送る**(`old` が 1 箇所に一致しなければ拒否される)。ガードが `read:files` / `edit:files` を手渡したら、その 1 呼び出しで出し直す。形式は `docs/josh-commands-run.md` →「`josh read:files`」と「`josh edit:files`」、経緯は `docs/maintainers/turn-batching-rationale.md` → "The composite commands"。固定するテストは `docs/maintainers/turn-batching-rationale.md` → "What the marker test pins"。
32
+ **Step 0 が対象ファイルを列挙したら、`pnpm josh read:files <path> …` で読み取りを 1 回に畳み、続く独立した編集は `pnpm josh edit:files` の 1 呼び出しで送る**(`old` が 1 箇所に一致しなければ拒否される)。ガードが `read:files` / `edit:files` を手渡したら、その 1 呼び出しで出し直す。形式は `docs/josh-commands-run.md` →「`josh read:files`」と「`josh edit:files`」。
@@ -4,7 +4,7 @@
4
4
 
5
5
  ### 無条件ルール: 起票は確認なし、停止は必ず
6
6
 
7
- **「今の作業をブロックするか」は判定しない。** 上流の欠陥は、発見した時点で例外なく同じ手順を通る(`docs/maintainers/upstream-interrupt-rationale.md` → "Why there is no blocking test")。
7
+ **「今の作業をブロックするか」は判定しない。** 上流の欠陥は、発見した時点で例外なく同じ手順を通る。
8
8
 
9
9
  - 起票は Tier A — 起票するか・どこへ起票するかをユーザーに確認しない。対象は first-party に限る(→「第三者リポジトリへの書き込みは Tier C(明示指示が必要)」)
10
10
  - **停止は無条件**。Issue を作ってから停止し、待つか先送りするかはユーザーが決める
@@ -33,7 +33,7 @@
33
33
  「起票は確認なし」は first-party だけに成り立つ。
34
34
 
35
35
  - **判定は `pnpm josh repo:party [<owner/repo>]` が答える**: `first-party` / `third-party` / `unknown`(unknown は third-party 扱いしない)。fork や contribute しているだけの org リポジトリも third-party
36
- - **third-party への書き込みは種別を問わず Tier C**: Issue・コメント・PR・Discussion・レビュー、既存 Issue のクローズ・編集も、その turn のユーザーの明示指示なしに行わない。正しい診断も許可ではない(`docs/maintainers/upstream-interrupt-rationale.md` → "Why third-party writes are Tier C"、`docs/maintainers/upstream-interrupt-rationale.md` → "Why a correct diagnosis is not authorization")
36
+ - **third-party への書き込みは種別を問わず Tier C**: Issue・コメント・PR・Discussion・レビュー、既存 Issue のクローズ・編集も、その turn のユーザーの明示指示なしに行わない。正しい診断も許可ではない
37
37
  - third-party と判明したら: (1) 自分たちの側の Issue に証拠込みで所見を `## Upstream candidate` 見出しで記録する(`## Upstream issues` は使わない)。(2) 報告本文の下書きをその Issue 内に用意する。(3) 対象プロジェクト名と報告内容を書いた `confirmation` Telegram を送って停止する
38
38
  - 下書きの前に揃える証拠: 自プロジェクトの外で成立する最小再現(無ければ「プロジェクト組み込みの再現しかない」と明記)、全主張の検証、既存 Issue の検索
39
39
 
@@ -1,6 +1,6 @@
1
1
  # オープン Issue の WIP 上限
2
2
 
3
- 常駐も配送もされず(joshuafolkken/kit#1524)、起票コマンドが守らせる(直接起票は `direct-filing` が拒否する)。保留文は `scripts/issue/issue-wip.ts` の `HELD_MESSAGE`(`docs/maintainers/wip-cap-rationale.md` → "Tests that pin the wording")、背景は `docs/maintainers/wip-cap-rationale.md` → "Why a cap is needed — the measurement"。
3
+ 常駐も配送もされず(joshuafolkken/kit#1524)、起票コマンドが守らせる(直接起票は `direct-filing` が拒否する)。保留文は `scripts/issue/issue-wip.ts` の `HELD_MESSAGE`。
4
4
 
5
5
  ## 規則
6
6
 
@@ -30,13 +30,13 @@
30
30
 
31
31
  前提 Issue(`prerequisite.md`)、別パッケージ起因の割り込み Issue、ユーザーが `new` と打った入口、`issue:scout` が重複無しと答えた新規作業、そして分割判定が作る子 Issue と epic。
32
32
 
33
- - **上限を理由に止めない。** 理由は `docs/maintainers/wip-cap-rationale.md` → "Why a filing a run is blocked by is not stopped"。
33
+ - **上限を理由に止めない。**
34
34
  - **分割の子がここに入る理由**: 分割を検出した `fullrun` / `halfrun` は「子と epic を起票して STOP」と定められており(`fullrun.md` / `halfrun.md`)、分割するかは分割判定の側が決める。
35
35
  - 超過した事実は完了報告に 1 行書く(例: 「オープン 34 件で起票した」)。
36
36
 
37
37
  ### 割り込み起票 — 上限が効かない側(3 条件で機械的に決める)
38
38
 
39
- 重大な欠陥の発見は、ランを止めていなくても捨てない(`docs/maintainers/wip-cap-rationale.md` → "Where the interrupt category comes from")。対象はこのリポジトリの欠陥で、発見したランをブロックしていないもの(別パッケージ起因は `upstream-interrupt.md`、実行が詰まる側)。
39
+ 重大な欠陥の発見は、ランを止めていなくても捨てない。対象はこのリポジトリの欠陥で、発見したランをブロックしていないもの(別パッケージ起因は `upstream-interrupt.md`、実行が詰まる側)。
40
40
 
41
41
  #### 3 条件 — 該当するかは判断ではない
42
42
 
@@ -48,7 +48,7 @@
48
48
 
49
49
  **3 つのいずれにも当たらない発見は、従来どおり裁量側の出口を取る。** 改善案、設計上の好み、未検証の疑い、「あとで直したい」がこれに当たる。
50
50
 
51
- **深刻さの自己申告は条件ではない。** 理由は `docs/maintainers/wip-cap-rationale.md` → "Why self-reported severity is not a condition"。
51
+ **深刻さの自己申告は条件ではない。**
52
52
 
53
53
  #### 該当したときの手順
54
54
 
@@ -59,9 +59,9 @@
59
59
  ```
60
60
 
61
61
  2. 超過している事実と当たった条件の番号を、両方とも本文に 1 行書く(例:「オープン 37 件で起票。3 条件のうち 2(文書化された手順が完了できない)に該当」)。
62
- 3. 次に実行されるものとして挿入する。epic の下なら `pnpm josh epic --add <E> <N>` で**位置を指定せずに**追加する(`<E>` が epic、`<N>` が割り込み)。**`--before` / `--after` を使ってはならない。** それらは `blocked-by` を書き込み、**偽の依存関係**になる。**順序は実行側が持つ** — 先に提示させたいときは行だけを動かす `--order-before <M>` を使う(`docs/maintainers/wip-cap-rationale.md` → "Why an addition names no position")。**epic の下に無いなら挿入先そのものが無い**ので、4 だけを行う。
62
+ 3. 次に実行されるものとして挿入する。epic の下なら `pnpm josh epic --add <E> <N>` で**位置を指定せずに**追加する(`<E>` が epic、`<N>` が割り込み)。**`--before` / `--after` を使ってはならない。** それらは `blocked-by` を書き込み、**偽の依存関係**になる。**順序は実行側が持つ** — 先に提示させたいときは行だけを動かす `--order-before <M>` を使う。**epic の下に無いなら挿入先そのものが無い**ので、4 だけを行う。
63
63
  4. 着手は既にある承認の内側でのみ、指示を待たずに行う。`backlogrun` の中なら次の子として着手してよい。バッチの外では `CLAUDE.md` →「Explicit invocation required」が効き、起票と挿入まで済ませて打つべきコマンド(`fullrun #<N>`)を報告して止まる。**割り込みは上限の例外であって、明示起動規則の例外ではない。**
64
64
 
65
65
  起票と、実行されるようにするところまでが 1 つのまとまりである — epic の下で追加しなければ `epic:next` は候補に出さない。**epic の外にある割り込みでは、まとまりの後半は 4 の報告そのもの**である。
66
66
 
67
- 割り込みを単独で走らせるか並列レーンで走らせるかは `.claude/skills/workflow-commands/backlogrun-lanes.md` → "A solo run" に従う(`docs/maintainers/wip-cap-rationale.md` → "Why a solo run")。上限の数字の変え方は `docs/maintainers/wip-cap-rationale.md` → "Changing the cap itself"、分割判定・レビュー上限と一緒に動く理由は `docs/maintainers/wip-cap-rationale.md` → "The three move together" と `docs/maintainers/wip-cap-rationale.md` → "Why the three landed in one commit"。
67
+ 割り込みを単独で走らせるか並列レーンで走らせるかは `.claude/skills/workflow-commands/backlogrun-lanes.md` → "A solo run" に従う。
@@ -29,3 +29,4 @@
29
29
  | コマンド出力が文脈へ持ち込む量の上限 | [`output-bounds.md`](./collaboration-workflow/output-bounds.md) |
30
30
  | 運用ルール | [`operating-rules.md`](./collaboration-workflow/operating-rules.md) |
31
31
  | 用語集 — lane・cut・hold・park など | [`glossary.md`](./collaboration-workflow/glossary.md) |
32
+ | headless のレーン子・レビューの起動時の規則セット | [`lane-instructions.md`](./collaboration-workflow/lane-instructions.md) |