@joshuafolkken/kit 1.1455.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.
- package/.claude/settings.json +6 -6
- package/.claude/skills/dependency-update/SKILL.md +26 -55
- package/.claude/skills/epic-commands/SKILL.md +83 -156
- package/.claude/skills/epic-commands/epic-bundle.md +51 -79
- package/.claude/skills/epic-commands/execution-waves.md +43 -81
- package/.claude/skills/verify-ui/SKILL.md +24 -50
- package/.claude/skills/workflow-commands/SKILL.md +7 -9
- package/.claude/skills/workflow-commands/background-commands.md +31 -46
- package/.claude/skills/workflow-commands/backlogrun-child.md +65 -85
- package/.claude/skills/workflow-commands/backlogrun-lanes.md +86 -125
- package/.claude/skills/workflow-commands/backlogrun-park.md +68 -118
- package/.claude/skills/workflow-commands/backlogrun-progress.md +17 -28
- package/.claude/skills/workflow-commands/backlogrun-recovery.md +17 -26
- package/.claude/skills/workflow-commands/backlogrun-steps.md +35 -52
- package/.claude/skills/workflow-commands/backlogrun.md +31 -50
- package/.claude/skills/workflow-commands/chain-rule.md +31 -40
- package/.claude/skills/workflow-commands/delegation.md +12 -8
- package/.claude/skills/workflow-commands/entry-sequence.md +1 -3
- package/.claude/skills/workflow-commands/followup.md +55 -77
- package/.claude/skills/workflow-commands/fullrun-steps.md +3 -5
- package/.claude/skills/workflow-commands/fullrun.md +4 -6
- package/.claude/skills/workflow-commands/halfrun.md +3 -7
- package/.claude/skills/workflow-commands/into-target.md +1 -2
- package/.claude/skills/workflow-commands/issue-comments.md +43 -60
- package/.claude/skills/workflow-commands/issue-scout.md +3 -2
- package/.claude/skills/workflow-commands/kickoff.md +65 -74
- package/.claude/skills/workflow-commands/latest-gate.md +2 -6
- package/.claude/skills/workflow-commands/needs-human-review.md +2 -5
- package/.claude/skills/workflow-commands/observation-filing.md +59 -118
- package/.claude/skills/workflow-commands/observation-ledger.md +52 -112
- package/.claude/skills/workflow-commands/pre-gate-cut.md +88 -142
- package/.claude/skills/workflow-commands/prerequisite.md +11 -17
- package/.claude/skills/workflow-commands/progress-watcher.md +23 -33
- package/.claude/skills/workflow-commands/prrun.md +3 -5
- package/.claude/skills/workflow-commands/retrospective.md +35 -54
- package/.claude/skills/workflow-commands/split-assessment.md +32 -58
- package/.claude/skills/workflow-commands/target-repository.md +1 -2
- package/.claude/skills/workflow-commands/working-tree-hold.md +54 -73
- package/.codex/hooks.json +6 -6
- package/.github/actions/setup-node/action.yml +1 -1
- package/.github/workflows/ci.yml +1 -1
- package/.github/workflows/publish.yml +2 -2
- package/CLAUDE.md +7 -6
- package/cspell/index.yaml +7 -0
- package/dist/CLAUDE.md +7 -6
- package/dist/commands/document-section-cli.js +67 -34
- package/dist/hooks/batch-guard.js +6 -6
- package/dist/hooks/chunk-4KKD2UTK.js +66 -0
- package/dist/hooks/{chunk-GPLGZ6IC.js → chunk-6TS2JD6D.js} +14 -3
- package/dist/hooks/chunk-7DSBJVFH.js +50 -0
- package/dist/hooks/{chunk-5H4SSDSD.js → chunk-A65Y4YOR.js} +3 -3
- package/dist/hooks/{chunk-3C4XRYG6.js → chunk-APUO6U4J.js} +102 -19
- package/dist/hooks/{chunk-IX6TTTI6.js → chunk-EFXE6C37.js} +8 -22
- package/dist/hooks/chunk-GP4IEC4O.js +20 -0
- package/dist/hooks/chunk-JP45SOCJ.js +56 -0
- package/dist/hooks/{chunk-OLMO72ON.js → chunk-LAOV7NLM.js} +1 -1
- package/dist/hooks/chunk-M4HGZV7U.js +83 -0
- package/dist/hooks/{chunk-TBJFTSUY.js → chunk-O6GDRNJB.js} +9 -7
- package/dist/hooks/{chunk-HFGWYGUV.js → chunk-PF2NZL2A.js} +5 -5
- package/dist/hooks/{chunk-WNLVGT7E.js → chunk-PTICX4OL.js} +4 -5
- package/dist/hooks/{chunk-HHI6FO3R.js → chunk-RT27QRJW.js} +763 -1515
- package/dist/hooks/{chunk-7WQBPLUN.js → chunk-SYOTDYCI.js} +1149 -1095
- package/dist/hooks/{chunk-LIAFCXL7.js → chunk-TNUMY6NL.js} +1519 -1332
- package/dist/hooks/chunk-UPUZF3AN.js +279 -0
- package/dist/hooks/{chunk-Z4XI7CZS.js → chunk-WK6SMBIC.js} +1932 -784
- package/dist/hooks/codex-hook-adapter.js +17 -14
- package/dist/hooks/duplicate-read-guard.js +7 -7
- package/dist/hooks/format-edited.js +5 -4
- package/dist/hooks/inputs.json +302 -247
- package/dist/hooks/investigation-guard.js +8 -11
- package/dist/hooks/pretool-guard.js +16 -13
- package/dist/hooks/session-lang.js +372 -26
- package/dist/hooks/stop-guard.js +2593 -189
- package/dist/josh.js +2128 -282
- package/dist/managed-marker/index.js +1 -2
- package/dist/version/index.js +15 -12
- package/eslint/base.js +2 -1
- package/eslint/rules/unicorn.js +16 -0
- package/lefthook/base.yml +5 -3
- package/package.json +14 -12
- package/prompts/coding-standards.md +12 -22
- package/prompts/collaboration-workflow/file-edits.md +25 -45
- package/prompts/collaboration-workflow/gh-rest.md +19 -36
- package/prompts/collaboration-workflow/glossary.md +5 -7
- package/prompts/collaboration-workflow/issue-citation.md +6 -14
- package/prompts/collaboration-workflow/issue-template.md +40 -32
- package/prompts/collaboration-workflow/lane-instructions.md +35 -0
- package/prompts/collaboration-workflow/operating-rules.md +33 -46
- package/prompts/collaboration-workflow/output-bounds.md +15 -15
- package/prompts/collaboration-workflow/overview.md +14 -19
- package/prompts/collaboration-workflow/plan-comment.md +13 -13
- package/prompts/collaboration-workflow/principles.md +57 -54
- package/prompts/collaboration-workflow/proposal-request.md +1 -9
- package/prompts/collaboration-workflow/report-format.md +41 -49
- package/prompts/collaboration-workflow/residency.md +15 -11
- package/prompts/collaboration-workflow/rule-delivery.md +7 -15
- package/prompts/collaboration-workflow/shell-body.md +10 -20
- package/prompts/collaboration-workflow/turn-batching.md +8 -14
- package/prompts/collaboration-workflow/upstream-interrupt.md +26 -34
- package/prompts/collaboration-workflow/wip-cap.md +26 -32
- package/prompts/collaboration-workflow.md +25 -25
- package/prompts/refactoring.md +33 -43
- package/prompts/review-rubric.md +84 -129
- package/prompts/review.md +110 -141
- package/prompts/sonar-hotspot-handling.md +22 -50
- package/prompts/testing-guide.md +48 -99
- package/scripts/adopt/adopt-toolkits.ts +2 -4
- package/scripts/agent/agent-argv.ts +20 -4
- package/scripts/agent/agent-exit-record.ts +23 -1
- package/scripts/agent/agent-role-profile.ts +101 -45
- package/scripts/agent/agent-safe-text.ts +60 -0
- package/scripts/agent/claude-agent-argv.ts +14 -0
- package/scripts/agent/codex-agent-argv.ts +9 -2
- package/scripts/agent/lane-instructions.ts +144 -0
- package/scripts/backlog/backlog-budget-cli.ts +1 -2
- package/scripts/backlog/backlog-budget.ts +4 -4
- package/scripts/backlog/backlog-drive-carried.ts +26 -0
- package/scripts/backlog/backlog-drive-cli.ts +10 -5
- package/scripts/backlog/backlog-drive-named.ts +3 -5
- package/scripts/backlog/backlog-drive-restore.ts +28 -2
- package/scripts/backlog/backlog-drive-seats.ts +27 -0
- package/scripts/backlog/backlog-drive.ts +11 -6
- package/scripts/backlog/backlog-occupied.ts +56 -0
- package/scripts/backlog/backlog-ready.ts +59 -15
- package/scripts/behavior/behavior-rules.ts +3 -2
- package/scripts/cost-runtime/codex-usage.ts +4 -2
- package/scripts/cost-runtime/cost-cli.ts +1 -2
- package/scripts/delegation/duplicate-read-guard.ts +2 -2
- package/scripts/delegation/investigation-guard.ts +15 -65
- package/scripts/delegation/investigation-reads.ts +1 -2
- package/scripts/discovery/repo-discovery.ts +4 -2
- package/scripts/discovery/repo-origin.ts +2 -4
- package/scripts/doctor/doctor-logic.ts +6 -3
- package/scripts/document/document-byte-budget.ts +28 -27
- package/scripts/document/document-byte-check.ts +1 -2
- package/scripts/document/document-section-cli.ts +17 -5
- package/scripts/document/entry-read-budget.ts +3 -3
- package/scripts/document/read-set-cli.ts +4 -1
- package/scripts/epic/epic-audit-orphans.ts +5 -8
- package/scripts/epic/epic-audit-rationale.ts +8 -2
- package/scripts/epic/epic-audit.ts +52 -1
- package/scripts/epic/epic-bundle-cli.ts +1 -2
- package/scripts/epic/epic-bundle-evidence.ts +49 -26
- package/scripts/epic/epic-bundle-referenced.ts +14 -3
- package/scripts/epic/epic-bundle.ts +17 -9
- package/scripts/epic/epic-chains.ts +6 -2
- package/scripts/epic/epic-close-comment.ts +1 -2
- package/scripts/followup/git-followup-workflow.ts +19 -1
- package/scripts/gate/check-inputs.ts +129 -0
- package/scripts/gate/check-reuse.ts +162 -0
- package/scripts/gate/core-budget.ts +93 -44
- package/scripts/gate/core-wait.ts +130 -0
- package/scripts/gate/free-cores.ts +49 -0
- package/scripts/gate/gate-ledger.ts +17 -3
- package/scripts/gate/gate-plan.ts +23 -1
- package/scripts/gate/gate-report.ts +15 -2
- package/scripts/gate/gate-run-steps.ts +150 -0
- package/scripts/gate/held-mark.ts +55 -0
- package/scripts/gate/machine-capacity.ts +70 -11
- package/scripts/gate/pre-commit-type-check.ts +14 -1
- package/scripts/gate/verification-gate.ts +65 -127
- package/scripts/gh/git-gh-issue-rest.ts +1 -0
- package/scripts/gh/git-gh-issue-write.ts +24 -2
- package/scripts/gh/git-pr.ts +19 -3
- package/scripts/git/git-common-directory.ts +3 -3
- package/scripts/git/git-diff-reads.ts +16 -9
- package/scripts/git/git-execa-error.ts +1 -2
- package/scripts/git/main-merge-regenerate.ts +78 -0
- package/scripts/git/main-merge.ts +14 -5
- package/scripts/hooks/batch-guard.ts +5 -8
- package/scripts/hooks/format-edited-file.ts +10 -4
- package/scripts/hooks/pre-commit-lint.ts +91 -0
- package/scripts/hooks/pre-push-unit.ts +15 -4
- package/scripts/hooks/pretool-guard.ts +48 -79
- package/scripts/hooks/reserved-run.ts +1 -0
- package/scripts/hooks/run-hook.sh +10 -12
- package/scripts/hooks/step-zero-notice.ts +3 -2
- package/scripts/hooks/stop-actions.ts +204 -0
- package/scripts/hooks/stop-guard.ts +62 -21
- package/scripts/init/hook-command-rewrite.ts +6 -2
- package/scripts/init/hook-launch.ts +12 -7
- package/scripts/init/init-logic-deploy-vps.ts +4 -2
- package/scripts/issue/behavior-change-lint.ts +12 -6
- package/scripts/issue/expected-effect-lint.ts +59 -0
- package/scripts/issue/issue-cite-cli.ts +35 -15
- package/scripts/issue/issue-classification.ts +1 -1
- package/scripts/issue/issue-lint-cli.ts +5 -3
- package/scripts/issue/issue-scout-cli.ts +22 -16
- package/scripts/issue/markdown-section.ts +19 -5
- package/scripts/josh/command-usage.ts +110 -0
- package/scripts/josh/file-map-stamp.ts +1 -3
- package/scripts/josh/hook-decision.ts +17 -2
- package/scripts/josh/josh-command-map.ts +2 -0
- package/scripts/josh/josh-command-types.ts +55 -9
- package/scripts/josh/josh-commands-ai.ts +13 -0
- package/scripts/josh/josh-commands-development.ts +1 -1
- package/scripts/josh/josh-commands-hooks.ts +6 -0
- package/scripts/josh/josh-commands-lane.ts +10 -1
- package/scripts/josh/josh-commands-workflow.ts +5 -0
- package/scripts/josh/josh-logic.ts +6 -15
- package/scripts/josh/josh-usage-automation.ts +121 -0
- package/scripts/josh/josh-usage-backlog.ts +180 -0
- package/scripts/josh/josh-usage-developer.ts +230 -0
- package/scripts/josh/josh-usage-hooks.ts +38 -0
- package/scripts/josh/josh-usage-issue.ts +205 -0
- package/scripts/josh/josh-usage-review.ts +101 -0
- package/scripts/josh/josh-usage-run.ts +252 -0
- package/scripts/josh/josh-usage-session.ts +238 -0
- package/scripts/josh/josh-usage-workflow.ts +212 -0
- package/scripts/josh/josh.ts +14 -5
- package/scripts/josh/package-directory.ts +20 -0
- package/scripts/lane/lane-await.ts +3 -2
- package/scripts/lane/lane-capacity.ts +8 -2
- package/scripts/lane/lane-check-stats.ts +56 -0
- package/scripts/lane/lane-child-invocation.ts +49 -5
- package/scripts/lane/lane-dispatch.ts +3 -3
- package/scripts/lane/lane-guard-policy.ts +5 -5
- package/scripts/lane/lane-handoff.ts +8 -1
- package/scripts/lane/lane-install.ts +12 -4
- package/scripts/lane/lane-ledger.ts +52 -1
- package/scripts/lane/lane-limit-cli.ts +8 -9
- package/scripts/lane/lane-load.ts +9 -2
- package/scripts/lane/lane-measure-cli.ts +4 -0
- package/scripts/lane/lane-parked.ts +18 -0
- package/scripts/lane/lane-preserve.ts +29 -1
- package/scripts/lane/lane-process-load.ts +125 -0
- package/scripts/lane/lane-process-stats.ts +93 -0
- package/scripts/lane/lane-registry.ts +17 -10
- package/scripts/lane/lane-restart.ts +5 -26
- package/scripts/lane/lane-session-action.ts +146 -0
- package/scripts/lane/lane-session-broker.ts +68 -125
- package/scripts/lane/lane-spent.ts +14 -3
- package/scripts/lane/lane-stats.ts +1 -0
- package/scripts/lane/lane-withdraw-cli.ts +71 -0
- package/scripts/lane/lane-withdraw.ts +182 -0
- package/scripts/lint/format.ts +4 -4
- package/scripts/lint/lint-parallel.ts +10 -3
- package/scripts/lint/lint-related-scope.ts +4 -1
- package/scripts/managed-marker/managed-marker-logic.ts +1 -2
- package/scripts/notify/telegram-test.ts +10 -5
- package/scripts/overrides/lockfile-overrides.ts +1 -3
- package/scripts/propagate/propagate.ts +1 -2
- package/scripts/release/release-progress.ts +3 -2
- package/scripts/report/report-format-reference.ts +2 -0
- package/scripts/report/report-lint.ts +7 -4
- package/scripts/review/acceptance-map-check.ts +61 -0
- package/scripts/review/acceptance-map.ts +205 -0
- package/scripts/review/review-brief-cli.ts +1 -1
- package/scripts/review/review-record-cli.ts +6 -2
- package/scripts/rules/agent-model.ts +59 -0
- package/scripts/rules/delivered-rules.ts +11 -2
- package/scripts/rules/destructive-command.ts +6 -9
- package/scripts/rules/direct-filing.ts +3 -7
- package/scripts/rules/early-heartbeat.ts +7 -18
- package/scripts/rules/file-body.ts +6 -13
- package/scripts/rules/filing-cap.ts +4 -6
- package/scripts/rules/firing-point.ts +6 -5
- package/scripts/rules/git-force.ts +5 -9
- package/scripts/rules/guard-remedy.ts +117 -0
- package/scripts/rules/implementation-cut.ts +37 -35
- package/scripts/rules/index-guard.ts +4 -7
- package/scripts/rules/issue-comments.ts +67 -16
- package/scripts/rules/josh-git-bare.ts +3 -6
- package/scripts/rules/lane-background.ts +10 -21
- package/scripts/rules/lane-carry-conflict.ts +7 -17
- package/scripts/rules/lane-interactive-ask.ts +6 -11
- package/scripts/rules/lane-park.ts +5 -13
- package/scripts/rules/lane-split-park.ts +2 -7
- package/scripts/rules/lane-switch-main.ts +9 -12
- package/scripts/rules/last-prompt.ts +50 -5
- package/scripts/rules/oracle-consulted.ts +4 -5
- package/scripts/rules/oracle-list-cli.ts +7 -0
- package/scripts/rules/piped-verification.ts +84 -32
- package/scripts/rules/poll-loop.ts +7 -17
- package/scripts/rules/pre-gate-cut.ts +7 -21
- package/scripts/rules/prior-comment-read.ts +7 -5
- package/scripts/rules/protected-files.ts +5 -9
- package/scripts/rules/raw-field-body.ts +3 -7
- package/scripts/rules/rule-body-guard.ts +4 -11
- package/scripts/rules/rule-list.ts +4 -1
- package/scripts/rules/rule-registry-rows.ts +10 -0
- package/scripts/rules/rule-registry.ts +7 -4
- package/scripts/rules/rule-rewrite.ts +114 -0
- package/scripts/rules/rule-value.ts +7 -1
- package/scripts/rules/run-tail-rule.ts +6 -22
- package/scripts/rules/shell-body-trigger.ts +4 -6
- package/scripts/rules/shell-segments.ts +22 -0
- package/scripts/rules/stop-decision.ts +77 -0
- package/scripts/rules/stop-rules.ts +164 -77
- package/scripts/rules/tail-commands.ts +15 -1
- package/scripts/rules/test-declared-commit.ts +4 -10
- package/scripts/rules/third-party-write.ts +5 -10
- package/scripts/rules/worktree-guard.ts +5 -12
- package/scripts/run/board/run-board-cli.ts +2 -0
- package/scripts/run/board/run-board-closed.ts +8 -2
- package/scripts/run/board/run-board-github.ts +19 -3
- package/scripts/run/board/run-board-header.ts +4 -1
- package/scripts/run/board/run-board-idle.ts +31 -0
- package/scripts/run/board/run-board-labels.ts +2 -0
- package/scripts/run/board/run-board-layout.ts +1 -1
- package/scripts/run/board/run-board-read.ts +25 -12
- package/scripts/run/board/run-board-reason.ts +17 -4
- package/scripts/run/board/run-board-render-legend.ts +1 -0
- package/scripts/run/board/run-board-render-slot.ts +1 -1
- package/scripts/run/board/run-board-render-waits.ts +41 -0
- package/scripts/run/board/run-board-render.ts +6 -1
- package/scripts/run/board/run-board-row-yield.ts +1 -0
- package/scripts/run/board/run-board-state.ts +9 -0
- package/scripts/run/board/run-board-status.ts +89 -23
- package/scripts/run/board/run-board-thanks.ts +7 -2
- package/scripts/run/board/run-board-tick.ts +37 -8
- package/scripts/run/carry/run-carry-args.ts +1 -3
- package/scripts/run/carry/run-carry-conversation.ts +7 -2
- package/scripts/run/cut/run-cut-cli.ts +18 -22
- package/scripts/run/cut/run-cut-decline.ts +72 -0
- package/scripts/run/cut/run-cut-ready.ts +74 -0
- package/scripts/run/cut/run-cut-report.ts +29 -0
- package/scripts/run/cut/run-cut.ts +10 -1
- package/scripts/run/detached-launch.ts +23 -4
- package/scripts/run/entry/run-entry-cli.ts +8 -1
- package/scripts/run/event/run-event-render.ts +1 -0
- package/scripts/run/event/run-event-scope.ts +19 -1
- package/scripts/run/event/run-event-stream-emit.ts +13 -6
- package/scripts/run/event/run-event-stream.ts +4 -0
- package/scripts/run/hold/run-hold-cli.ts +14 -3
- package/scripts/run/hold/run-hold-session.ts +46 -0
- package/scripts/run/hold/run-hold.ts +13 -4
- package/scripts/run/launch-priority.ts +32 -0
- package/scripts/run/merge/run-merge-cli.ts +16 -42
- package/scripts/run/merge/run-merge-ship.ts +59 -1
- package/scripts/run/merge/run-merge-signals.ts +99 -0
- package/scripts/run/merge/run-merge-steps.ts +11 -1
- package/scripts/run/merge/run-merge.ts +22 -9
- package/scripts/run/run-ending.ts +31 -3
- package/scripts/run/run-liveness.ts +1 -1
- package/scripts/run/run-parent-cut-hook.ts +5 -10
- package/scripts/run/run-poll-hook.ts +157 -0
- package/scripts/run/run-preflight.ts +1 -2
- package/scripts/run/run-step-cli.ts +22 -15
- package/scripts/run/run-step-section.ts +85 -0
- package/scripts/run/run-stop-notify.ts +1 -2
- package/scripts/run/run-watcher-guard.ts +6 -3
- package/scripts/run/ship/run-ship-cli.ts +5 -12
- package/scripts/run/ship/run-ship-detach.ts +9 -0
- package/scripts/run/ship/run-ship-next.ts +10 -2
- package/scripts/run/ship/run-ship-overlap.ts +195 -0
- package/scripts/run/ship/run-ship-pre-detach.ts +33 -15
- package/scripts/run/ship/run-ship-preflight.ts +28 -2
- package/scripts/run/ship/run-ship-return.ts +31 -7
- package/scripts/run/ship/run-ship-review-steps.ts +25 -14
- package/scripts/run/ship/run-ship-review.ts +15 -2
- package/scripts/run/ship/run-ship-steps.ts +1 -1
- package/scripts/run/ship/run-ship-stop-context.ts +206 -0
- package/scripts/run/ship/run-ship-sync.ts +14 -6
- package/scripts/run/tidy/run-tidy-cli.ts +3 -3
- package/scripts/run/tidy/run-tidy-lanes.ts +3 -2
- package/scripts/safe-chain/project-config.ts +7 -2
- package/scripts/sync/sync-hook-safety.ts +8 -2
- package/scripts/test/test-e2e-guard.ts +30 -5
- package/scripts/test/test-unit-guard.ts +16 -1
- package/scripts/test/unit-worker-share.ts +26 -3
- package/scripts/time-runtime/time-batch-guard.ts +3 -3
- package/scripts/time-runtime/time-hook-transcript.ts +3 -2
- package/scripts/time-runtime/time-shell.ts +39 -4
- package/scripts/time-runtime/time-spans.ts +1 -0
- package/scripts/time-runtime/time-tool-call.ts +7 -0
- package/scripts/version/effective-upstream.ts +3 -4
- package/scripts/version/kit-version-config.ts +8 -2
- package/scripts/version/latest-corepack.ts +1 -2
- package/scripts/version/release-hold.ts +11 -4
- package/scripts/version/version-commands.ts +12 -4
- package/templates/gitignore +6 -2
- package/dist/hooks/chunk-D5QBTOCZ.js +0 -68
- package/dist/hooks/chunk-UT7YC3N2.js +0 -56
|
@@ -18,8 +18,7 @@ function is_marked(text) {
|
|
|
18
18
|
return text.startsWith(MARKER_PREFIX);
|
|
19
19
|
}
|
|
20
20
|
function apply_marker_for_destination(destination, text, package_name) {
|
|
21
|
-
if (!is_workflow_destination(destination)) return text;
|
|
22
|
-
if (is_marked(text)) return text;
|
|
21
|
+
if (!is_workflow_destination(destination) || is_marked(text)) return text;
|
|
23
22
|
return `${marker_block(package_name)}${text}`;
|
|
24
23
|
}
|
|
25
24
|
var managed_marker_logic = {
|
package/dist/version/index.js
CHANGED
|
@@ -141,8 +141,7 @@ function read_matching_version(manifest_path, package_name) {
|
|
|
141
141
|
const parsed = package_named_version_schema.safeParse(
|
|
142
142
|
json_value.parse_or_undefined(readFileSync(manifest_path, "utf8"))
|
|
143
143
|
);
|
|
144
|
-
if (!parsed.success) return void 0;
|
|
145
|
-
if (parsed.data.name !== package_name) return void 0;
|
|
144
|
+
if (!parsed.success || parsed.data.name !== package_name) return void 0;
|
|
146
145
|
return parsed.data.version;
|
|
147
146
|
}
|
|
148
147
|
function walk_up_for_version(start_directory, package_name) {
|
|
@@ -152,9 +151,9 @@ function walk_up_for_version(start_directory, package_name) {
|
|
|
152
151
|
}
|
|
153
152
|
return void 0;
|
|
154
153
|
}
|
|
155
|
-
function resolve_from_base(base_url, package_name, resolve_marker) {
|
|
154
|
+
function resolve_from_base(base_url, package_name, resolve_marker = package_name) {
|
|
156
155
|
try {
|
|
157
|
-
return createRequire(base_url).resolve(resolve_marker
|
|
156
|
+
return createRequire(base_url).resolve(resolve_marker);
|
|
158
157
|
} catch {
|
|
159
158
|
return void 0;
|
|
160
159
|
}
|
|
@@ -281,8 +280,9 @@ function is_latest_withheld(times, latest, minimum_age_minutes, now_ms) {
|
|
|
281
280
|
return published_ms > now_ms - minimum_age_minutes * MS_PER_MINUTE2;
|
|
282
281
|
}
|
|
283
282
|
function resolve_installable(times, latest, minimum_age_minutes, now_ms) {
|
|
284
|
-
if (times === void 0
|
|
285
|
-
|
|
283
|
+
if (times === void 0 || !is_latest_withheld(times, latest, minimum_age_minutes, now_ms)) {
|
|
284
|
+
return void 0;
|
|
285
|
+
}
|
|
286
286
|
const installable = release_age.select_aged_version(times, void 0, minimum_age_minutes, now_ms);
|
|
287
287
|
return installable === latest ? void 0 : installable;
|
|
288
288
|
}
|
|
@@ -307,8 +307,9 @@ function format_release_hold_note(version, latest, installable, minimum_age_minu
|
|
|
307
307
|
return `${head}; an unpinned resolve lands on ${installable}`;
|
|
308
308
|
}
|
|
309
309
|
function build_release_hold_notes(version, latest, installable, minimum_age_minutes) {
|
|
310
|
-
if (version === void 0 || installable === void 0)
|
|
311
|
-
|
|
310
|
+
if (version === void 0 || installable === void 0 || !is_release_age_hold(version, latest, installable)) {
|
|
311
|
+
return [];
|
|
312
|
+
}
|
|
312
313
|
return [format_release_hold_note(version, latest, installable, minimum_age_minutes)];
|
|
313
314
|
}
|
|
314
315
|
var release_hold = {
|
|
@@ -1399,8 +1400,9 @@ function build_extras(config) {
|
|
|
1399
1400
|
}
|
|
1400
1401
|
function build_upstream_effective(upstream, context) {
|
|
1401
1402
|
const { resolve_effective_version, resolve_global_upgrade_command } = upstream;
|
|
1402
|
-
if (resolve_effective_version === void 0
|
|
1403
|
-
|
|
1403
|
+
if (resolve_effective_version === void 0 || resolve_global_upgrade_command === void 0) {
|
|
1404
|
+
return void 0;
|
|
1405
|
+
}
|
|
1404
1406
|
return {
|
|
1405
1407
|
version: resolve_effective_version(context),
|
|
1406
1408
|
upgrade_command: resolve_global_upgrade_command(context)
|
|
@@ -1485,8 +1487,9 @@ function build_idle_message(reports) {
|
|
|
1485
1487
|
}
|
|
1486
1488
|
function describe_effective_outcome(upstream, report, snapshot) {
|
|
1487
1489
|
const { resolve_effective_version } = upstream;
|
|
1488
|
-
if (resolve_effective_version === void 0 || report === void 0)
|
|
1489
|
-
|
|
1490
|
+
if (resolve_effective_version === void 0 || report === void 0 || version_check_logic.build_effective_upgrade_commands(report).length === 0) {
|
|
1491
|
+
return [];
|
|
1492
|
+
}
|
|
1490
1493
|
const after = resolve_effective_version({
|
|
1491
1494
|
latest: snapshot.latest,
|
|
1492
1495
|
upstream_latest: report.latest
|
package/eslint/base.js
CHANGED
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
SPEC_FILENAME_PATTERNS,
|
|
30
30
|
} from './rules/test-filename.js'
|
|
31
31
|
import { typescript_rules } from './rules/typescript.js'
|
|
32
|
-
import { unicorn_rules } from './rules/unicorn.js'
|
|
32
|
+
import { unicorn_rules, unicorn_test_rules } from './rules/unicorn.js'
|
|
33
33
|
|
|
34
34
|
const FILE_PATTERNS = {
|
|
35
35
|
d_ts: ['**/*.d.ts'],
|
|
@@ -234,6 +234,7 @@ export function create_base_config({ gitignore_path, tsconfig_root_dir }) {
|
|
|
234
234
|
// `expect(x).toBe(0.05)` compares deterministic config constants, not computed
|
|
235
235
|
// floats; working around the rule only weakens the assertion.
|
|
236
236
|
'sonarjs/no-floating-point-equality': 'off',
|
|
237
|
+
...unicorn_test_rules,
|
|
237
238
|
},
|
|
238
239
|
},
|
|
239
240
|
{
|
package/eslint/rules/unicorn.js
CHANGED
|
@@ -205,3 +205,19 @@ export const unicorn_rules = {
|
|
|
205
205
|
// たびにエディタと衝突し、可読性の利得なく差分ノイズだけを生むため無効化する(joshuafolkken/kit#3273)。
|
|
206
206
|
'unicorn/no-asterisk-prefix-in-documentation-comments': 'off',
|
|
207
207
|
}
|
|
208
|
+
|
|
209
|
+
// unicorn 78 のベースライン方針(joshuafolkken/kit#3882): 78 は新ルール 2 つ
|
|
210
|
+
// (no-unnecessary-default-arguments / no-repeated-call-wrappers)に加え、型解決とコメントを含む
|
|
211
|
+
// コードの検査を広げたため、既存ルールが新たに報告する。prefer-combined-guards /
|
|
212
|
+
// prefer-minimal-ternary / no-negated-condition / prefer-default-parameters は正当な
|
|
213
|
+
// クリーンアップなので採用し、コードを直す。consistent-boolean-name だけは下記のとおり
|
|
214
|
+
// テストファイルで外す。
|
|
215
|
+
export const unicorn_test_rules = {
|
|
216
|
+
// 78 は vi.fn() / vi.spyOn() / vi.mocked() の戻り型を解決できるようになり、真偽値を返す関数の
|
|
217
|
+
// モックやスパイ(`const write = vi.spyOn(process.stdout, 'write')`)を真偽値の束縛として報告する。
|
|
218
|
+
// 関数値の const を checkVariables で検査するのはプラグインの文書どおりの仕様(77 でも
|
|
219
|
+
// `const f = () => true` は報告される)で、誤検知ではない。ただしテストの束縛はほぼすべて
|
|
220
|
+
// 差し替える関数を名前で示すテストダブルで、`is_write` のような名前は述語の結果のように読めて
|
|
221
|
+
// 誤解を招く。kit が関数名を検査しない(checkFunctions: 'never')のと同じ理由でテストでは外す。
|
|
222
|
+
'unicorn/consistent-boolean-name': 'off',
|
|
223
|
+
}
|
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
|
|
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
|
|
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
|
|
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.
|
|
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",
|
|
@@ -178,7 +180,7 @@
|
|
|
178
180
|
"eslint-plugin-import-x": "^4.17.1",
|
|
179
181
|
"eslint-plugin-promise": "^7.3.0",
|
|
180
182
|
"eslint-plugin-sonarjs": "^4.2.1",
|
|
181
|
-
"eslint-plugin-unicorn": "^
|
|
183
|
+
"eslint-plugin-unicorn": "^78.0.0",
|
|
182
184
|
"globals": "^17.12.0",
|
|
183
185
|
"prettier": "^3.9.9",
|
|
184
186
|
"prettier-plugin-svelte": "^4.1.1",
|
|
@@ -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.
|
|
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.
|
|
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",
|
|
@@ -260,24 +262,24 @@
|
|
|
260
262
|
"eslint-plugin-import-x": "^4.17.1",
|
|
261
263
|
"eslint-plugin-promise": "^7.3.0",
|
|
262
264
|
"eslint-plugin-sonarjs": "^4.2.2",
|
|
263
|
-
"eslint-plugin-unicorn": "^
|
|
265
|
+
"eslint-plugin-unicorn": "^78.0.0",
|
|
264
266
|
"eslint_d": "^15.0.3",
|
|
265
267
|
"globals": "^17.13.0",
|
|
266
|
-
"lefthook": "^2.2.
|
|
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.
|
|
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.
|
|
275
|
-
"vitest": "^5.0.
|
|
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.
|
|
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.
|
|
290
|
+
"zod": "^4.6.7"
|
|
289
291
|
},
|
|
290
292
|
"devEngines": {
|
|
291
293
|
"packageManager": {
|
|
292
294
|
"name": "pnpm",
|
|
293
|
-
"version": "12.
|
|
295
|
+
"version": "12.13.0+sha512.1e55719bf26e809dce5c5084fdebaa64efb3da9038ae5d68a9f8a68311f1a45841c8c3b76a37298c3b66f6bcc80409a9b7f33c78a7168a3e90fb65a5d8235ae4",
|
|
294
296
|
"onFail": "download"
|
|
295
297
|
}
|
|
296
298
|
},
|
|
@@ -1,27 +1,21 @@
|
|
|
1
1
|
# コーディング指針 — lint では表せない書き方
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
lint・型検査の実行手順は `CLAUDE.md` → "Code Change Rules" の検証ゲート(`pnpm josh gate`、実装中は `pnpm josh lint:related` / `pnpm josh test:related`)が単一ソースである。
|
|
3
|
+
関数の構文・品質上限・型安全・早期 return・マジックナンバーは `CLAUDE.md` → "Critical Conventions (non-standard — always apply)"、lint・型検査の実行は `CLAUDE.md` → "Code Change Rules"(`pnpm josh gate`、実装中は `pnpm josh lint:related` / `pnpm josh test:related`)に従う。ここにない命名の細目(クラスのプロパティ・メソッドの `snake_case` など)は `eslint/rules/naming-convention.js` が持つ。**`function` 構文(アロー関数を使わない)と早期 return の 1 行形式は lint が検査しない**ので、書き手とレビューが確かめる。
|
|
6
4
|
|
|
7
5
|
## Conventions
|
|
8
6
|
|
|
9
|
-
`
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
- **Files**: Svelte `PascalCase.svelte(.ts)` · TypeScript `kebab-case.ts` · tests `*.test.ts` / `*.svelte.test.ts`, colocated, never `*.spec.ts` (`prompts/testing-guide.md`) · in `scripts/`, no `../` imports — use `#scripts/*`
|
|
14
|
-
- **Content rules**: user-visible strings use i18n message keys in every locale · comments / test titles English only (`eslint/rules/` may explain rationale in Japanese) · no duplication; `/* @refactor-ignore */` at file top excludes a file from refactoring
|
|
7
|
+
- Naming: `snake_case` variables / functions / params · `PascalCase` types / classes / interfaces / enums · `UPPER_CASE` enum members · booleans prefixed `is_` / `has_` / `should_` / `can_` / `will_` / `did_` · constants `UPPER_CASE` or `snake_case`
|
|
8
|
+
- Functions & exports: multiple functions → a namespace object `export { my_module }` (constants exempt) · no `export default`
|
|
9
|
+
- Files: Svelte `PascalCase.svelte(.ts)` · TypeScript `kebab-case.ts` · tests `*.test.ts` / `*.svelte.test.ts`, colocated, never `*.spec.ts` (`prompts/testing-guide.md`) · in `scripts/`, no `../` imports — use `#scripts/*`
|
|
10
|
+
- Content rules: user-visible strings use i18n message keys in every locale · comments / test titles English only (`eslint/rules/` may explain rationale in Japanese) · no duplication; `/* @refactor-ignore */` at file top excludes a file from refactoring
|
|
15
11
|
|
|
16
12
|
## 📝 基本方針
|
|
17
13
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
- **コメントは「なぜ」だけ、経緯は書かない**: 残すのは一行の理由(そのルールの意図)だけ。「以前は…」という経緯、Issue 番号への参照、計測値は git 履歴と Issue が保持している
|
|
22
|
-
- **文字列も定数化する**: 数値リテラルの抽出は lint が強制するが、繰り返し使用する文字列や識別子も定数化し、意味の分かる名前を付ける
|
|
14
|
+
- **意図が不明瞭な処理は関数に抽出する**: 1 行でも抽出し、関数名で意図を表す(`if (is_eligible_for_service(user))`)
|
|
15
|
+
- **コメントは「なぜ」だけ**: 一行の理由だけを残す。「以前は…」の経緯・Issue 番号・計測値は書かない(git 履歴と Issue が持つ)
|
|
16
|
+
- **文字列も定数化する**: 繰り返す文字列や識別子にも意味の分かる名前の定数を付ける
|
|
23
17
|
- **既存のコード体系に寄り添う**: そのうえで、より良く書けるなら目指す
|
|
24
|
-
- **仕組みを足す前に原因を問う**:
|
|
18
|
+
- **仕組みを足す前に原因を問う**: `prompts/collaboration-workflow/principles.md` → "elegant-design"。重複の撲滅は "no-clones"
|
|
25
19
|
|
|
26
20
|
## 📁 新規作成時の手順
|
|
27
21
|
|
|
@@ -34,16 +28,12 @@ find src -name "*.ts" -o -name "*.svelte" | grep -i [関連キーワード]
|
|
|
34
28
|
|
|
35
29
|
### 2. ファイル分割の指針
|
|
36
30
|
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
- **メインファイルの肥大化を避ける**: メインファイルの肥大化を避けることを優先する。再利用可能な機能や独立した責任を持つ機能は、積極的に別ファイルに分割する。メインファイルは主要な処理フローに集中し、詳細な実装は別ファイルに分離する
|
|
41
|
-
- **過度な分割は避ける**: 小さすぎるファイルの分割は避け、関連する機能は同じファイルにまとめる
|
|
31
|
+
- `CLAUDE.md` → "Quality limits" の上限に近づいたら分割を検討する。編集前に `pnpm josh lines <path>` で余裕を確認する
|
|
32
|
+
- 責任ごと、また他ファイルからも使われうるロジックごとに別ファイルに分け、メインファイルは主要な処理フローに集中させる
|
|
33
|
+
- 小さすぎる分割は避け、関連する機能は同じファイルにまとめる
|
|
42
34
|
|
|
43
35
|
### 3. 名前空間オブジェクトの名付け方
|
|
44
36
|
|
|
45
|
-
複数の関数を名前空間オブジェクトにまとめてエクスポートする規則そのものは上記「Conventions」にある(定数は個別エクスポートでよい)。ここでは名付け方だけを述べる。
|
|
46
|
-
|
|
47
37
|
- ファイル名と名前空間名で意図を明確にする(例: `git-command.ts` → `git_command`)
|
|
48
38
|
- メソッド名は短く、名前空間で補完する(例: `exec_git_branch()` → `git_command.branch()`)
|
|
49
39
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
## ファイル編集はコマンド本文に本文を載せない
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`CLAUDE.md` からは [`rule-delivery.md`](./rule-delivery.md) →「配送されている規則」を経て届く。
|
|
4
4
|
|
|
5
|
-
`pnpm josh rule:guard`(file-body
|
|
5
|
+
`pnpm josh rule:guard`(file-body の行)が、既存ファイルを書き戻すヒアドキュメント・書き込むインタプリタ heredoc / `node -e`・書き込むスクリプトを作るヒアドキュメント・`perl -0pi -e` を拒否する。ガードに見えない Edit / Write の全文書き直しと `sed -i` は以下に従う。
|
|
6
6
|
|
|
7
7
|
### 何を禁じているか
|
|
8
8
|
|
|
9
|
-
**編集後のテキストを丸ごとコマンド行に載せる形を禁じる。**
|
|
9
|
+
**編集後のテキストを丸ごとコマンド行に載せる形を禁じる。** 典型(`NEW_REGION` には置換後の本文が載る):
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
12
|
python3 - <<'PY' # ← 禁止
|
|
@@ -15,64 +15,44 @@ open('CLAUDE.md', 'w').write(text.replace(OLD_REGION, NEW_REGION))
|
|
|
15
15
|
PY
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
`
|
|
19
|
-
|
|
20
|
-
領域を指定して書き換える編集は **Edit ツール**(old / new の差分)で行う。`node -e`、`cat > file <<'EOF'`、`tee file <<'EOF'`、`perl -0pi -e` に長い置換文字列を渡す形も同じ理由で禁止される。
|
|
18
|
+
領域を書き換える編集は Edit ツール(old / new の差分)で行う。`node -e`、`cat > file <<'EOF'`、`tee file <<'EOF'`、`perl -0pi -e` に長い置換文字列を渡す形も禁止。
|
|
21
19
|
|
|
22
20
|
### 判断基準は「本文を丸ごと運ぶか」であり、ツール名ではない
|
|
23
21
|
|
|
24
|
-
禁止の対象は**ツールの種類ではない**。判断は 1 問で決まる。
|
|
25
|
-
|
|
26
22
|
> **そのコマンドは、置換後のテキストを丸ごとコマンド本文に載せているか。**
|
|
27
23
|
|
|
28
24
|
- yes → 禁止。Edit を使う
|
|
29
|
-
- no →
|
|
30
|
-
|
|
31
|
-
したがって短い置換に `sed -i` を使うのは**許される**。パターンと置換語しか運ばないので、Edit の `old_string` / `new_string` より本文が小さい。逆に「Edit を使ったから安全」も成り立たない — 300 行のファイルを全文 `new_string` に入れれば、禁じている形と同じコストになる。次節はその後半を条件として書き下したものである。
|
|
25
|
+
- no → 許可(短い置換の `sed -i` は下の 4 条件つきで可)
|
|
32
26
|
|
|
33
27
|
### 編集は指摘された箇所だけを対象にする(全文書き直しの条件)
|
|
34
28
|
|
|
35
|
-
**既定は部分編集である。**
|
|
36
|
-
|
|
37
|
-
**ファイルを全文書いてよいのは、ファイルそのものを置き換える意図があるときだけである。** 該当するのは次の 3 つで、それ以外は部分編集にする。
|
|
38
|
-
|
|
39
|
-
- **新規ファイルの作成** — 既存本文が無いので、運ぶ重複がそもそも発生しない
|
|
40
|
-
- **ファイル全体の作り直し** — 構成の組み替えや生成物の再生成で、変更後の本文が元の本文とほとんど共有しない場合
|
|
41
|
-
- **部分編集のほうが大きくなる場合** — 変更箇所がファイル全域に散っていて、`old_string` / `new_string` の合計が全文を超えるとき。このときも全文は **Write ツール**で書く — ヒアドキュメントやインタプリタで書き戻す形は、この例外でもガードに拒否される
|
|
29
|
+
**既定は部分編集である。** `old_string` / `new_string` は直す行の周辺までに狭める — Edit / Write の全文書き直しは禁じている形と同じコストを払う。全文を書いてよいのは次の 3 つだけ:
|
|
42
30
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
31
|
+
- 新規ファイルの作成
|
|
32
|
+
- ファイル全体の作り直し — 変更後の本文が元とほとんど共有しない場合
|
|
33
|
+
- 部分編集のほうが大きくなる場合 — `old_string` / `new_string` の合計が全文を超えるとき(このときも Write で書く)
|
|
46
34
|
|
|
47
35
|
### `sed -i` を使う前に満たす 4 条件
|
|
48
36
|
|
|
49
|
-
`sed`
|
|
37
|
+
`sed` は一致した全行を書き換え、一致 0 件でも黙って成功する。使う前に次を満たす。
|
|
50
38
|
|
|
51
|
-
1. **出現回数を先に数える** — `grep -o '<pattern>' <file> | wc -l` が `1`
|
|
52
|
-
2. **メタ文字を持ち込まない — パターン側と置換語側の両方** —
|
|
53
|
-
3. **`-i` の引数はプラットフォームで違う** — BSD / macOS は `sed -i '' 's/…/…/' file`、GNU / Linux は `sed -i 's/…/…/' file
|
|
54
|
-
4. **編集後に自分で整形する** —
|
|
39
|
+
1. **出現回数を先に数える** — `grep -o '<pattern>' <file> | wc -l` が `1` であること。`grep -c` は行数を数えるので使わない
|
|
40
|
+
2. **メタ文字を持ち込まない — パターン側と置換語側の両方** — `/`、`&`、`\`、`.` `*` `[` `]` `^` `$` のいずれかが入るなら Edit を使う
|
|
41
|
+
3. **`-i` の引数はプラットフォームで違う** — BSD / macOS は `sed -i '' 's/…/…/' file`、GNU / Linux は `sed -i 's/…/…/' file`。配布ドキュメントに書くときはこの差を明示する
|
|
42
|
+
4. **編集後に自分で整形する** — Bash 経由の編集では `PostToolUse` の整形が走らない(joshuafolkken/kit#1337)ので `pnpm josh format` を走らせる(`format:edited` は手で呼べない)
|
|
55
43
|
|
|
56
|
-
**4 条件のどれかが面倒に見えたら、そこが Edit を使う場所である。**
|
|
44
|
+
**4 条件のどれかが面倒に見えたら、そこが Edit を使う場所である。**
|
|
57
45
|
|
|
58
|
-
| 形
|
|
59
|
-
|
|
|
60
|
-
| Edit(数行の old / new)
|
|
61
|
-
| `sed -i` の短い置換
|
|
62
|
-
| `python3 - <<'PY'`
|
|
63
|
-
| `cat > file <<'EOF'
|
|
64
|
-
| `cat > new-file <<'EOF'
|
|
65
|
-
| `cat > edit.py <<'EOF'
|
|
66
|
-
|
|
|
46
|
+
| 形 | 可否 |
|
|
47
|
+
| ------------------------------------------------ | ------------------- |
|
|
48
|
+
| Edit(数行の old / new) | 可 |
|
|
49
|
+
| `sed -i` の短い置換 | 上の 4 条件つきで可 |
|
|
50
|
+
| `python3 - <<'PY'` で書き戻す | 不可 |
|
|
51
|
+
| `cat > file <<'EOF'`(既存ファイル) | 不可 |
|
|
52
|
+
| `cat > new-file <<'EOF'`(新規、長文なら Write) | 可 |
|
|
53
|
+
| `cat > edit.py <<'EOF'`(書き込むスクリプト) | 不可 |
|
|
54
|
+
| 読み取り(`cat` / `sed -n` / `grep`) | 可 |
|
|
67
55
|
|
|
68
56
|
### なぜコストが二重になるか
|
|
69
57
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
### なぜ resident に置くか
|
|
73
|
-
|
|
74
|
-
根拠は `docs/maintainers/file-edits-rationale.md` → "Why it is resident"。
|
|
75
|
-
|
|
76
|
-
### マーカーテスト
|
|
77
|
-
|
|
78
|
-
固定している内容は `docs/maintainers/file-edits-rationale.md` → "Marker tests"。
|
|
58
|
+
書き戻す形は本文がコマンドとファイルの両方に載り、コマンドは以降の全リクエストで読み直される。
|
|
@@ -2,54 +2,37 @@
|
|
|
2
2
|
|
|
3
3
|
## 規則
|
|
4
4
|
|
|
5
|
-
**GitHub への操作は `gh api`(REST
|
|
6
|
-
|
|
7
|
-
egress が `403` で拒否されるため、GraphQL を経由するサブコマンドはそこで一切動かない。
|
|
5
|
+
**GitHub への操作は `gh api`(REST)で書く。** `gh issue …` / `gh pr …` / `gh repo …` のサブコマンド形は使わない —
|
|
6
|
+
クラウドセッションでは GraphQL への egress が `403` で拒否される。
|
|
8
7
|
|
|
9
|
-
例外は 2
|
|
8
|
+
例外は 2 つだけ:
|
|
10
9
|
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
- **GitHub Actions のワークフロー** — ランナー上では `gh` が通常どおり動き、`gh pr merge --auto` が使う
|
|
14
|
-
API は GraphQL にしか存在しない。
|
|
10
|
+
- `gh auth token` — ローカルの認証情報を返すだけで、どのエンドポイントにも接続しない
|
|
11
|
+
- GitHub Actions のワークフロー — ランナー上では `gh` が動き、`gh pr merge --auto` の API は GraphQL にしか無い
|
|
15
12
|
|
|
16
13
|
## 認証は環境によって別物である
|
|
17
14
|
|
|
18
|
-
**手元では `gh auth login` を一度実行すれば足り、`GH_TOKEN`
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
**CI とクラウドセッションにはそのキーチェーンが無いので、`GH_TOKEN` を設定する。** どちらか一方しか書かない
|
|
22
|
-
説明は、もう一方の環境で誤った案内になる —— 手元で `gh auth login` 済みの機械に `GH_TOKEN` を設定させたり、
|
|
23
|
-
クラウドで存在しないキーチェーンを探させたりする。
|
|
15
|
+
**手元では `gh auth login` を一度実行すれば足り、`GH_TOKEN` は要らない**(認証情報は OS のキーチェーン)。
|
|
16
|
+
**CI とクラウドセッションにはキーチェーンが無いので、`GH_TOKEN` を設定する。** 説明を書くときは両方を書く。
|
|
24
17
|
|
|
25
18
|
## 散文でも「指示の形」なら REST で書く
|
|
26
19
|
|
|
27
|
-
|
|
28
|
-
実行を指示する形であれば REST で書く。**
|
|
20
|
+
**文書の散文に書いたコマンドでも、読み手に実行を指示する形なら REST で書く。**
|
|
29
21
|
|
|
30
|
-
-
|
|
31
|
-
|
|
32
|
-
-
|
|
33
|
-
GraphQL を経由する」のような CLI の対応状況の記録。書き換えると、何を禁じているのかが読めなくなる。
|
|
22
|
+
- 指示の形(REST で書く)— 「数えるのはコマンド 1 つで済む: `…`」「各子 Issue に `…` でコメントを書く」のように、
|
|
23
|
+
読み手がそのまま打つ書き方
|
|
24
|
+
- 引用の形(そのままでよい)— 「`gh issue create` は使わない」のような禁止の引用や、CLI の対応状況の記録
|
|
34
25
|
|
|
35
|
-
|
|
36
|
-
書き手がこの区別で守る(`docs/maintainers/gh-rest-rationale.md` → "Why the document guard scans fences only")。
|
|
26
|
+
文書ガードはフェンス付きコードブロックだけを走査するので、散文は書き手がこの区別で守る。
|
|
37
27
|
|
|
38
|
-
|
|
39
|
-
`
|
|
28
|
+
書き換えるときは先に `pnpm josh` のコマンドで置き換えられないかを見る(例: `gh issue view` ではなく
|
|
29
|
+
`pnpm josh issue:state <N>`)。
|
|
40
30
|
|
|
41
31
|
## REST 化は `gh` を不要にしない
|
|
42
32
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
`check_gh_installed` は `gh CLI is not installed` と明示するが、git remote からリポジトリを読む側の
|
|
49
|
-
コマンド(`epic:next` / `epic:bundle` / `issue:scout` / `epic --add`)は「Could not read this
|
|
50
|
-
repository from `git remote`, so the children cannot be keyed by repository — check `gh auth status`
|
|
51
|
-
and that this is a checkout with an `origin` remote.」と出るため、原因が `gh` の不在であることが読み取り
|
|
52
|
-
にくい。**そのメッセージを見たら、まず `gh` の有無を確かめる。**
|
|
33
|
+
REST 呼び出しも `execa('gh', ['api', …])` なので、`gh` が無いコンテナでは `pnpm josh epic:next` /
|
|
34
|
+
`pnpm josh pr` / `pnpm josh followup` も完了しない。`epic:next` / `epic:bundle` / `issue:scout` / `epic --add` が
|
|
35
|
+
「Could not read this repository from `git remote`, so the children cannot be keyed by repository — check
|
|
36
|
+
`gh auth status` and that this is a checkout with an `origin` remote.」と出したら、**まず `gh` の有無を確かめる。**
|
|
53
37
|
|
|
54
|
-
|
|
55
|
-
[`docs/cloud-session.md`](https://github.com/joshuafolkken/kit/blob/main/docs/cloud-session.md) にある。
|
|
38
|
+
環境ごとの前提とホストは [`docs/cloud-session.md`](https://github.com/joshuafolkken/kit/blob/main/docs/cloud-session.md)。
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
# ワークフロー用語集
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
各語は 1〜2 行の定義と本文へのポインタだけを持つ。手順・条件・数値はここで言い換えない(joshuafolkken/kit#3080)。
|
|
4
4
|
|
|
5
|
-
`
|
|
6
|
-
|
|
7
|
-
- **lane** — `backlogrun` が子 Issue を並行実行するための、専用ブランチ・`.env`・ポートを持つ git worktree。実装・ゲート・レビューは並行し、マージは直列。→ `.claude/skills/workflow-commands/backlogrun-lanes.md` → "Lanes — running more than one child at a time"
|
|
8
|
-
- **cut** — 実行中のプロセスを意図して終わらせ、新しいプロセスが同じ作業を引き継ぐ境界。レーン子のゲート前の cut と、`backlogrun` のセッション cut がある。→ `.claude/skills/workflow-commands/pre-gate-cut.md` → "The pre-gate cut"、`.claude/skills/workflow-commands/backlogrun-progress.md` → "The hand-off"
|
|
5
|
+
- **lane** — `backlogrun` が子 Issue を並行実行する、専用ブランチ・`.env`・ポートを持つ git worktree。マージは直列。→ `.claude/skills/workflow-commands/backlogrun-lanes.md` → "Lanes — running more than one child at a time"
|
|
6
|
+
- **cut** — プロセスを意図して終わらせ、新しいプロセスが作業を引き継ぐ境界(ゲート前の cut、セッション cut)。→ `.claude/skills/workflow-commands/pre-gate-cut.md` → "The pre-gate cut"、`.claude/skills/workflow-commands/backlogrun-progress.md` → "The hand-off"
|
|
9
7
|
- **hold** — 1 つの作業ツリーを 1 つのランが占有しているという記録。`pnpm josh run:hold` が取り、`pnpm josh run:release` が外す。→ `.claude/skills/workflow-commands/working-tree-hold.md` → "The working-tree hold"
|
|
10
8
|
- **park** — `backlogrun` が自分で決められない子を `needs-decision` で止め、バッチ全体は止めずに次の子へ進むこと。→ `.claude/skills/workflow-commands/backlogrun-park.md` → "park and continue"
|
|
11
|
-
- **point of use** —
|
|
9
|
+
- **point of use** — 文書を入口ではなく、従うべき操作の直前に同じターンで読むこと。→ `.claude/skills/workflow-commands/SKILL.md` → "Four documents are read at the point of use, not at the entry"
|
|
12
10
|
- **entry read** — コマンド起動時に読む文書の集合。`pnpm josh read:set` がその集合と費用を答える。→ `.claude/skills/workflow-commands/SKILL.md` → "Which file to read"
|
|
13
11
|
- **oracle** — 機械的に読める入力だけから規則の答えを計算するコマンド。一覧は `pnpm josh oracle:list`。→ `prompts/collaboration-workflow/residency.md` → "第 0 問"
|
|
14
|
-
- **interrupt** — WIP 上限を超えても起票できる、3
|
|
12
|
+
- **interrupt** — WIP 上限を超えても起票できる、3 条件で決まる発見。上流起票の割り込み Issue とは別。→ `prompts/collaboration-workflow/wip-cap.md` → "割り込み起票"、`prompts/collaboration-workflow/upstream-interrupt.md` → "別パッケージ起因の問題は割り込み Issue で対応する"
|
|
15
13
|
- **Tier** — 判断点の 3 区分。A は可逆で自分で決める、B は拮抗していて人に聞く、C は不可逆・共有状態で明示指示が要る。→ `CLAUDE.md` → "Decision autonomy"、`prompts/collaboration-workflow/operating-rules.md` → "decision-autonomy"
|
|
16
14
|
- **carry** — `backlogrun` の 1 回の起動の予算と進捗を、セッション cut をまたいで引き継ぐ記録(`pnpm josh run:carry`)。→ `.claude/skills/workflow-commands/backlogrun-steps.md` → "The session cut is inside the invocation"
|
|
17
15
|
- **wave** — エピックの子をまとめて並行実行する組。仕組みではなく、依存宣言で表す形。→ `.claude/skills/epic-commands/execution-waves.md` → "Execution waves — parallel, then one alone, then the rest"
|
|
@@ -2,33 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
## セッション向け出力で Issue はリンク+セッション言語の短い要約で参照する(joshuafolkken/kit#1758)
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
**規則**: セッション向け出力で Issue を指すときは、次の 2 つを必ず添える。
|
|
5
|
+
**規則**: セッション向け出力で Issue を指すときは、次の 2 つを必ず添える(対応前の「これから走らせる」「待機中」「対象外」の言及も含む)。
|
|
8
6
|
|
|
9
7
|
1. 番号にチケットへの markdown リンク
|
|
10
|
-
2. セッション言語(`JOSH_SESSION_LANG`、既定 `ja
|
|
11
|
-
|
|
12
|
-
書き方の例:
|
|
8
|
+
2. セッション言語(`JOSH_SESSION_LANG`、既定 `ja`)の短い要約タイトル(全訳でなくてよい)
|
|
13
9
|
|
|
14
10
|
- `[#<N>](https://github.com/<owner>/<repo>/issues/<N>) — <その Issue が何をするものかの短い要約>`
|
|
15
11
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
**要約タイトルは全訳ではなく要約でよい。** 何をするものか分かれば足りる。長い訳を作ることが目的ではない。`issue:cite` が出すタイトルを、必要ならセッション言語に言い換えて使う。
|
|
19
|
-
|
|
20
|
-
**対応前の言及も対象である。** 「これから走らせる」「待機中」「対象外」を並べる場面も含む。
|
|
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 本文)を写すときは引用形に直す。
|
|
21
13
|
|
|
22
14
|
### 適用範囲
|
|
23
15
|
|
|
24
16
|
**対象** — セッション向け出力。会話の説明、計画の提示、進捗報告、完了報告、`AskUserQuestion` の選択肢。
|
|
25
17
|
|
|
26
|
-
**対象外** —
|
|
18
|
+
**対象外** — Issue 本文、Issue / PR コメント。
|
|
27
19
|
|
|
28
20
|
### 英語固定の 3 つとは衝突しない
|
|
29
21
|
|
|
30
|
-
|
|
22
|
+
要約はタイトルではなくセッション内の散文なので、`overview.md` →「出力の言語(`JOSH_SESSION_LANG`)」の英語固定とは矛盾しない。
|
|
31
23
|
|
|
32
24
|
### 停止時の担保(joshuafolkken/kit#2247)
|
|
33
25
|
|
|
34
|
-
`Stop` フック `pnpm 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`)。
|