@joshuafolkken/kit 1.1050.0 → 1.1128.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 +9 -8
- package/.claude/skills/epic-commands/SKILL.md +5 -7
- package/.claude/skills/workflow-commands/SKILL.md +20 -12
- package/.claude/skills/workflow-commands/background-commands.md +36 -84
- package/.claude/skills/workflow-commands/backlogrun-child.md +1 -1
- package/.claude/skills/workflow-commands/backlogrun-lanes.md +8 -6
- package/.claude/skills/workflow-commands/backlogrun-progress.md +30 -33
- package/.claude/skills/workflow-commands/backlogrun-steps.md +12 -12
- package/.claude/skills/workflow-commands/backlogrun.md +2 -2
- package/.claude/skills/workflow-commands/chain-rule.md +4 -2
- package/.claude/skills/workflow-commands/delegation.md +3 -3
- package/.claude/skills/workflow-commands/followup-reference.md +1 -1
- package/.claude/skills/workflow-commands/followup.md +7 -3
- package/.claude/skills/workflow-commands/fullrun-steps.md +3 -2
- package/.claude/skills/workflow-commands/fullrun.md +8 -6
- package/.claude/skills/workflow-commands/halfrun.md +19 -21
- package/.claude/skills/workflow-commands/issue-comments.md +1 -1
- package/.claude/skills/workflow-commands/issue-fold-existing.md +10 -10
- package/.claude/skills/workflow-commands/issue-scout.md +1 -1
- package/.claude/skills/workflow-commands/kickoff.md +9 -4
- package/.claude/skills/workflow-commands/latest-gate.md +8 -16
- package/.claude/skills/workflow-commands/needs-human-review.md +1 -1
- package/.claude/skills/workflow-commands/observation-filing.md +3 -3
- package/.claude/skills/workflow-commands/pre-gate-cut.md +4 -8
- package/.claude/skills/workflow-commands/prerequisite.md +1 -1
- package/.claude/skills/workflow-commands/prrun.md +36 -0
- package/.claude/skills/workflow-commands/retrospective.md +1 -1
- package/.claude/skills/workflow-commands/split-assessment.md +4 -18
- package/.claude/skills/workflow-commands/working-tree-hold.md +22 -2
- package/.codex/hooks.json +16 -20
- package/.github/actions/setup-node/action.yml +33 -0
- package/.github/actions/setup-pnpm/action.yml +93 -0
- package/.github/dependabot.yml +5 -1
- package/.github/workflows/auto-tag.yml +2 -3
- package/.github/workflows/ci.yml +31 -134
- package/.github/workflows/dependabot-auto-merge.yml +1 -0
- package/.github/workflows/pr-classification.yml +6 -44
- package/.github/workflows/production.yml +1 -0
- package/.github/workflows/publish.yml +43 -47
- package/.github/workflows/sonar-qube.yml +41 -4
- package/.pnpmfile.mjs +29 -0
- package/AGENTS.md +5 -2
- package/CLAUDE.md +33 -27
- package/GEMINI.md +5 -2
- package/README.md +66 -20
- package/SECURITY.md +37 -6
- package/cspell/index.yaml +6 -1
- package/dist/CLAUDE.basic.md +6 -6
- package/dist/CLAUDE.md +33 -27
- package/dist/CLAUDE.static.md +6 -6
- package/dist/config-merge/index.js +48 -12
- package/dist/hooks/batch-guard.js +4 -4
- package/dist/hooks/{chunk-7VPDUBRN.js → chunk-4JZDP5X5.js} +152 -155
- package/dist/hooks/{chunk-HJIISEAC.js → chunk-5SD2YM7Z.js} +5 -13
- package/dist/hooks/{chunk-NAS4C7GP.js → chunk-77J7IEQM.js} +2 -2
- package/dist/hooks/{chunk-DMQN45FN.js → chunk-7HVB7SZG.js} +3 -3
- package/dist/hooks/{chunk-RLDX5SOC.js → chunk-AIOIOMPX.js} +4413 -1970
- package/dist/hooks/{chunk-5BK3K7V4.js → chunk-M7QKEKWO.js} +873 -2049
- package/dist/hooks/{chunk-WQ4OSBSS.js → chunk-MKVGBQPA.js} +2 -2
- package/dist/hooks/{chunk-EJDX2TOB.js → chunk-NXYMNPUQ.js} +7 -88
- package/dist/hooks/{chunk-NJQOBE6L.js → chunk-QVLT52OV.js} +2 -7
- package/dist/hooks/{chunk-GQ7KP45M.js → chunk-XYUIQOW3.js} +2 -2
- package/dist/hooks/codex-hook-adapter.js +12 -48
- package/dist/hooks/duplicate-read-guard.js +5 -5
- package/dist/hooks/format-edited.js +2 -2
- package/dist/hooks/inputs.json +280 -0
- package/dist/hooks/investigation-guard.js +5 -5
- package/dist/hooks/pretool-guard.js +9 -9
- package/dist/hooks/session-lang.js +0 -1
- package/dist/hooks/stop-guard.js +192 -333
- package/dist/josh.js +240 -148
- package/dist/managed-marker/index.js +2 -1
- package/dist/version/index.js +70 -78
- package/eslint/rules/promise.js +5 -0
- package/eslint/rules/unicorn.js +3 -2
- package/package.json +26 -5
- package/pnpm-workspace.yaml +5 -7
- package/prompts/collaboration-workflow/glossary.md +17 -0
- package/prompts/collaboration-workflow/issue-citation.md +5 -5
- package/prompts/collaboration-workflow/issue-template.md +1 -1
- package/prompts/collaboration-workflow/operating-rules.md +5 -5
- package/prompts/collaboration-workflow/overview.md +13 -1
- package/prompts/collaboration-workflow/principles.md +9 -0
- package/prompts/collaboration-workflow/report-format.md +1 -1
- package/prompts/collaboration-workflow/residency.md +3 -3
- package/prompts/collaboration-workflow/rule-delivery.md +1 -1
- package/prompts/collaboration-workflow/turn-batching.md +3 -3
- package/prompts/collaboration-workflow/upstream-interrupt.md +1 -1
- package/prompts/collaboration-workflow/wip-cap.md +25 -22
- package/prompts/collaboration-workflow.md +6 -8
- package/prompts/review-rubric.md +1 -1
- package/prompts/review.md +3 -3
- package/prompts/sonar-hotspot-handling.md +11 -3
- package/prompts/testing-guide.md +3 -3
- package/scripts/adopt/adopt-toolkits.ts +0 -2
- package/scripts/adopt/adopt.ts +0 -2
- package/scripts/agent/agent-argv.ts +0 -2
- package/scripts/agent/agent-diagnostics.ts +1 -1
- package/scripts/agent/agent-role-profile.ts +0 -7
- package/scripts/agent/claude-agent-argv.ts +0 -2
- package/scripts/agent/codex-agent-argv.ts +1 -1
- package/scripts/agent/codex-hooks.ts +92 -0
- package/scripts/agent/interactive-ask.ts +1 -1
- package/scripts/auto-ok/auto-ok-cli.ts +6 -16
- package/scripts/backlog/backlog-arrival.ts +30 -10
- package/scripts/backlog/backlog-budget-cli.ts +15 -16
- package/scripts/backlog/backlog-budget.ts +0 -2
- package/scripts/backlog/backlog-defect-priority.ts +2 -2
- package/scripts/backlog/backlog-drive-cli.ts +10 -8
- package/scripts/backlog/backlog-drive-named-offer.ts +16 -3
- package/scripts/backlog/backlog-drive-named.ts +2 -1
- package/scripts/backlog/backlog-drive.ts +76 -16
- package/scripts/backlog/backlog-named.ts +0 -3
- package/scripts/backlog/backlog-next.ts +9 -15
- package/scripts/backlog/backlog-offer-cli.ts +6 -19
- package/scripts/backlog/backlog-plan-cli.ts +1 -7
- package/scripts/backlog/backlog-plan.ts +30 -19
- package/scripts/backlog/backlog-pool.ts +3 -6
- package/scripts/backlog/backlog-rank.ts +2 -2
- package/scripts/backlog/backlog-ready.ts +39 -10
- package/scripts/backlog/backlog-scope.ts +1 -3
- package/scripts/backlog/backlog-stalled-detect.ts +2 -2
- package/scripts/backlog/backlog-stalled.ts +0 -1
- package/scripts/backlog/backlog-waves.ts +5 -2
- package/scripts/behavior/behavior-cli.ts +1 -1
- package/scripts/build/build-codex-hooks.ts +26 -0
- package/scripts/build/build-hooks.ts +85 -9
- package/scripts/build/hook-bundle-stamp.ts +111 -0
- package/scripts/cases/cases-cli.ts +1 -1
- package/scripts/cases/cases-logic.ts +1 -1
- package/scripts/ci/composite-actions.ts +30 -0
- package/scripts/ci/pr-classification.ts +3 -3
- package/scripts/claude/workflow-destination.ts +10 -1
- package/scripts/clone/clone-fingerprint.ts +0 -1
- package/scripts/clone/clone-scan-cli.ts +1 -1
- package/scripts/clone/clone-scan.ts +1 -1
- package/scripts/config-merge/json-format.ts +0 -1
- package/scripts/config-merge/parse-jsonc.ts +33 -3
- package/scripts/config-merge/patch-json-key.ts +13 -6
- package/scripts/config-merge/patch-yaml-list.ts +1 -1
- package/scripts/cost-runtime/codex-usage.ts +2 -9
- package/scripts/cost-runtime/cost-attribute.ts +0 -1
- package/scripts/cost-runtime/cost-cli.ts +3 -10
- package/scripts/cost-runtime/cost-corpus.ts +0 -2
- package/scripts/cost-runtime/cost-format.ts +0 -3
- package/scripts/cost-runtime/cost-pricing.ts +0 -1
- package/scripts/cost-runtime/cost-tokens.ts +0 -1
- package/scripts/delegation/delegation-cli.ts +1 -1
- package/scripts/delegation/delegation-policy.ts +0 -1
- package/scripts/delegation/duplicate-read-guard.ts +0 -8
- package/scripts/delegation/fanout-cli.ts +1 -1
- package/scripts/delegation/fanout.ts +0 -2
- package/scripts/delegation/investigation-reads.ts +1 -164
- package/scripts/discovery/repo-map-logic.ts +0 -1
- package/scripts/discovery/repo-party-cli.ts +1 -1
- package/scripts/doctor/doctor-consumer.ts +6 -10
- package/scripts/doctor/doctor-io.ts +9 -13
- package/scripts/doctor/doctor-logic.ts +0 -4
- package/scripts/doctor/doctor.ts +14 -9
- package/scripts/document/backlogrun-parent-read-set.ts +12 -1
- package/scripts/document/document-byte-budget.ts +5 -5
- package/scripts/document/document-byte-check.ts +0 -1
- package/scripts/document/document-read-cli.ts +0 -2
- package/scripts/document/document-section-cli.ts +1 -1
- package/scripts/document/document-section.ts +0 -3
- package/scripts/document/edit-files-cli.ts +0 -1
- package/scripts/document/entry-read-budget.ts +21 -7
- package/scripts/document/entry-read-set.ts +32 -8
- package/scripts/document/lane-child-read-set.ts +8 -6
- package/scripts/document/read-files-cli.ts +0 -4
- package/scripts/document/read-set-cli.ts +0 -2
- package/scripts/document/read-set-point-of-use.ts +9 -3
- package/scripts/document/read-set-pricing.ts +0 -1
- package/scripts/document/read-set-trim.ts +4 -2
- package/scripts/epic/epic-add.ts +1 -1
- package/scripts/epic/epic-audit-cli.ts +1 -4
- package/scripts/epic/epic-audit-orphans.ts +1 -3
- package/scripts/epic/epic-audit-rationale.ts +0 -1
- package/scripts/epic/epic-audit-report.ts +0 -2
- package/scripts/epic/epic-audit.ts +8 -22
- package/scripts/epic/epic-bundle-cli.ts +1 -1
- package/scripts/epic/epic-bundle-evidence.ts +0 -1
- package/scripts/epic/epic-bundle-referenced.ts +1 -5
- package/scripts/epic/epic-bundle.ts +0 -4
- package/scripts/epic/epic-busy.ts +4 -5
- package/scripts/epic/epic-candidate-confirm.ts +0 -5
- package/scripts/epic/epic-classify.ts +2 -2
- package/scripts/epic/epic-cli-argv.ts +0 -1
- package/scripts/epic/epic-close-comment.ts +1 -1
- package/scripts/epic/epic-close.ts +5 -2
- package/scripts/epic/epic-cross-repo.ts +2 -4
- package/scripts/epic/epic-decision.ts +0 -1
- package/scripts/epic/epic-fetch.ts +2 -2
- package/scripts/epic/epic-index.ts +2 -3
- package/scripts/epic/epic-issue.ts +1 -15
- package/scripts/epic/epic-lane-offer.ts +9 -8
- package/scripts/epic/epic-nested.ts +1 -1
- package/scripts/epic/epic-next-read.ts +1 -3
- package/scripts/epic/epic-next-views.ts +0 -1
- package/scripts/epic/epic-next.ts +1 -10
- package/scripts/epic/epic-parse.ts +0 -1
- package/scripts/epic/epic-promote.ts +0 -9
- package/scripts/epic/epic-rank.ts +2 -2
- package/scripts/epic/epic-read.ts +1 -2
- package/scripts/epic/epic-reconcile.ts +1 -1
- package/scripts/epic/epic-reference.ts +1 -13
- package/scripts/epic/epic-relation-recheck.ts +1 -1
- package/scripts/epic/epic-relations.ts +1 -1
- package/scripts/epic/epic-remove.ts +1 -1
- package/scripts/epic/epic-report.ts +0 -1
- package/scripts/epic/epic-run.ts +2 -3
- package/scripts/epic/epic-shape.ts +1 -1
- package/scripts/epic/epic-solo-stale.ts +107 -0
- package/scripts/epic/epic-solo.ts +3 -2
- package/scripts/epic/epic-triage.ts +1 -1
- package/scripts/epic/epic-validate.ts +1 -1
- package/scripts/epic/epic.ts +1 -1
- package/scripts/exports/unused-members-cli.ts +53 -0
- package/scripts/{git → followup}/followup-issue-number.ts +1 -6
- package/scripts/{git → followup}/git-followup-cleanup.ts +2 -1
- package/scripts/{git → followup}/git-followup-finish.ts +1 -3
- package/scripts/{git → followup}/git-followup-flush.ts +2 -2
- package/scripts/{git → followup}/git-followup-issue-close.ts +2 -2
- package/scripts/{git → followup}/git-followup-label.ts +4 -4
- package/scripts/followup/git-followup-merged.ts +112 -0
- package/scripts/{git → followup}/git-followup-pending.ts +1 -1
- package/scripts/{git → followup}/git-followup-workflow.ts +19 -11
- package/scripts/{git → followup}/git-pr-followup-wrapup.ts +9 -3
- package/scripts/{git → followup}/git-pr-followup.ts +53 -16
- package/scripts/gate/core-budget.ts +3 -9
- package/scripts/gate/gate-plan.ts +7 -4
- package/scripts/gate/gate-report.ts +0 -6
- package/scripts/gate/gate-tree.ts +1 -1
- package/scripts/gate/pre-commit-type-check.ts +0 -6
- package/scripts/gate/project-checks.ts +7 -8
- package/scripts/gate/scoped-green.ts +0 -1
- package/scripts/gate/type-check-step.ts +1 -1
- package/scripts/gate/verification-gate.ts +0 -2
- package/scripts/gh/fix-gh-packages.ts +15 -12
- package/scripts/gh/gh-spawn.ts +2 -2
- package/scripts/{git → gh}/git-ai-review-scan.ts +1 -5
- package/scripts/{git → gh}/git-gh-check.ts +2 -1
- package/scripts/{git → gh}/git-gh-exec.ts +1 -1
- package/scripts/{git → gh}/git-gh-failure.ts +1 -1
- package/scripts/{git → gh}/git-gh-helpers.ts +0 -1
- package/scripts/{git → gh}/git-gh-issue-list.ts +13 -10
- package/scripts/{git → gh}/git-gh-issue-read.ts +1 -1
- package/scripts/{git → gh}/git-gh-issue-rest.ts +6 -3
- package/scripts/{git → gh}/git-gh-issue-write.ts +4 -1
- package/scripts/{git → gh}/git-gh-pr-auto-merge.ts +4 -1
- package/scripts/{git → gh}/git-gh-pr-read.ts +24 -0
- package/scripts/{git → gh}/git-gh-pr-rest.ts +5 -2
- package/scripts/{git → gh}/git-gh-pr-review.ts +2 -2
- package/scripts/{git → gh}/git-gh-pr-rollup.ts +1 -3
- package/scripts/{git → gh}/git-gh-pr.ts +3 -1
- package/scripts/{git → gh}/git-pr-ai-review.ts +2 -5
- package/scripts/{git → gh}/git-pr-checks-eval.ts +0 -10
- package/scripts/{git → gh}/git-pr-checks-parse.ts +4 -20
- package/scripts/{git → gh}/git-pr-checks.ts +2 -1
- package/scripts/{git → gh}/git-pr-coderabbit.ts +2 -5
- package/scripts/{git → gh}/git-pr-confirmation.ts +1 -3
- package/scripts/{git → gh}/git-pr-managed-config.ts +2 -3
- package/scripts/{git → gh}/git-pr.ts +3 -3
- package/scripts/git/changed-file-scope.ts +0 -1
- package/scripts/git/git-branch.ts +3 -6
- package/scripts/git/git-command.ts +6 -1
- package/scripts/git/git-commit.ts +1 -1
- package/scripts/git/git-common-directory.ts +80 -24
- package/scripts/git/git-error.ts +66 -9
- package/scripts/git/git-issue.ts +1 -1
- package/scripts/git/git-preflight.ts +2 -2
- package/scripts/git/git-prompt.ts +6 -31
- package/scripts/git/git-push.ts +1 -1
- package/scripts/git/git-spawn-sync.ts +65 -0
- package/scripts/git/git-spawn.ts +5 -4
- package/scripts/git/git-staging.ts +1 -0
- package/scripts/git/git-status.ts +1 -1
- package/scripts/git/git-workflow.ts +1 -1
- package/scripts/git/gone-branch.ts +1 -0
- package/scripts/git/listing-cutoff.ts +1 -1
- package/scripts/git/main-merge.ts +1 -1
- package/scripts/git/main-sync.ts +19 -1
- package/scripts/git/parse-json-array.ts +0 -3
- package/scripts/git/repository-lock.ts +16 -16
- package/scripts/git/{git-stash.ts → stash/git-stash.ts} +1 -1
- package/scripts/git/{stash-pop-args.ts → stash/stash-pop-args.ts} +2 -7
- package/scripts/git/{stash-pop-cli.ts → stash/stash-pop-cli.ts} +0 -1
- package/scripts/git/{stash-sweep-lock.ts → stash/stash-sweep-lock.ts} +3 -3
- package/scripts/hooks/codex-hook-adapter.ts +0 -1
- package/scripts/hooks/edited-cspell.ts +1 -1
- package/scripts/hooks/format-edited-file.ts +2 -0
- package/scripts/hooks/pre-push-unit.ts +0 -4
- package/scripts/hooks/pretool-guard.ts +22 -4
- package/scripts/hooks/reserved-run.ts +1 -1
- package/scripts/hooks/step-zero-notice.ts +76 -0
- package/scripts/hooks/stop-guard.ts +47 -21
- package/scripts/init/claude-plugin-config.ts +4 -5
- package/scripts/init/hook-command-rewrite.ts +16 -8
- package/scripts/init/hook-launch.ts +41 -15
- package/scripts/init/init-basic.ts +2 -5
- package/scripts/init/init-file-action.ts +54 -0
- package/scripts/init/init-logic-migrate.ts +35 -17
- package/scripts/init/init-logic-secretlint.ts +1 -1
- package/scripts/init/init-logic.ts +10 -19
- package/scripts/init/init.ts +11 -71
- package/scripts/init/kit-written-paths.ts +2 -0
- package/scripts/init/project-profile.ts +9 -17
- package/scripts/init/start-exec.ts +1 -1
- package/scripts/init/start-setup-pr.ts +6 -6
- package/scripts/init/start-steps.ts +3 -1
- package/scripts/issue/behavior-change-lint.ts +0 -1
- package/scripts/issue/defect-rate-cli.ts +64 -23
- package/scripts/issue/defect-rate.ts +1 -2
- package/scripts/{git → issue}/git-next-issues.ts +3 -3
- package/scripts/issue/issue-backlinks-cli.ts +1 -5
- package/scripts/issue/issue-backlinks.ts +7 -14
- package/scripts/issue/issue-cite-cli.ts +2 -6
- package/scripts/issue/issue-cite.ts +12 -8
- package/scripts/issue/issue-classification.ts +1 -9
- package/scripts/issue/issue-closing-pr.ts +4 -4
- package/scripts/issue/issue-comment-cli.ts +2 -2
- package/scripts/issue/issue-file-cli.ts +5 -5
- package/scripts/issue/issue-file.ts +7 -14
- package/scripts/issue/issue-fold-cli.ts +1 -1
- package/scripts/issue/issue-fold-existing-cli.ts +1 -1
- package/scripts/{git → issue}/issue-labels.ts +8 -0
- package/scripts/issue/issue-lint-cli.ts +1 -1
- package/scripts/issue/issue-merged.ts +2 -2
- package/scripts/{git → issue}/issue-rank.ts +1 -1
- package/scripts/issue/issue-read-cli.ts +8 -47
- package/scripts/issue/issue-read.ts +0 -2
- package/scripts/issue/issue-report-failures.ts +80 -0
- package/scripts/issue/issue-scout-cli.ts +1 -7
- package/scripts/issue/issue-scout-closed.ts +2 -2
- package/scripts/issue/issue-scout.ts +0 -2
- package/scripts/issue/issue-state-cli.ts +5 -46
- package/scripts/issue/issue-state.ts +1 -5
- package/scripts/issue/markdown-section.ts +21 -6
- package/scripts/issue/measure-rerun-cli.ts +74 -15
- package/scripts/issue/reproduction-measure.ts +1 -1
- package/scripts/josh/cli-body.ts +1 -1
- package/scripts/josh/file-map-stamp.ts +0 -3
- package/scripts/josh/josh-command-map.ts +2 -0
- package/scripts/josh/josh-commands-ai.ts +9 -102
- package/scripts/josh/josh-commands-backlog.ts +5 -1
- package/scripts/josh/josh-commands-development.ts +8 -1
- package/scripts/josh/josh-commands-issue.ts +2 -2
- package/scripts/josh/josh-commands-maintenance.ts +7 -0
- package/scripts/josh/josh-commands-project.ts +7 -1
- package/scripts/josh/josh-commands-run.ts +114 -0
- package/scripts/josh/josh-commands-versioning.ts +8 -0
- package/scripts/josh/josh-commands-workflow.ts +3 -3
- package/scripts/josh/path-decision.ts +0 -3
- package/scripts/josh/process-owner.ts +16 -0
- package/scripts/josh/run-github-prerequisite.ts +3 -6
- package/scripts/josh/session-language-cli.ts +0 -1
- package/scripts/lane/lane-await.ts +46 -19
- package/scripts/lane/lane-capacity.ts +6 -3
- package/scripts/lane/lane-child-invocation.ts +20 -7
- package/scripts/lane/lane-cli.ts +1 -4
- package/scripts/lane/lane-close.ts +5 -4
- package/scripts/lane/lane-dispatch.ts +3 -4
- package/scripts/lane/lane-environment.ts +0 -9
- package/scripts/lane/lane-handoff.ts +38 -0
- package/scripts/lane/lane-launch-cli.ts +31 -27
- package/scripts/lane/lane-open.ts +0 -3
- package/scripts/lane/lane-output.ts +0 -1
- package/scripts/lane/lane-registry.ts +9 -0
- package/scripts/lane/openai-lane-ship.ts +2 -0
- package/scripts/lane/openai-lane-supervisor-decision.ts +2 -1
- package/scripts/lane/openai-lane-supervisor.ts +6 -4
- package/scripts/lane/openai-review-broker.ts +7 -1
- package/scripts/lib/bounded-pool.ts +1 -0
- package/scripts/lib/cli-flags.ts +31 -2
- package/scripts/lib/error-message.ts +12 -1
- package/scripts/lib/json-value.ts +5 -4
- package/scripts/lib/poll.ts +3 -1
- package/scripts/lib/timed-fetch.ts +15 -0
- package/scripts/lib/timeouts.ts +13 -0
- package/scripts/{yaml → lib}/yaml-document.ts +3 -1
- package/scripts/{bytes → lines}/bytes-command.ts +0 -2
- package/scripts/lines/line-targets.ts +0 -11
- package/scripts/lines/lines-command.ts +5 -4
- package/scripts/lint/lint-related-scope.ts +0 -1
- package/scripts/lint/lint-related.ts +1 -1
- package/scripts/{git → notify}/telegram-notify.ts +2 -2
- package/scripts/{git → notify}/telegram-test.ts +4 -4
- package/scripts/observations/observation-ledger-home.ts +0 -1
- package/scripts/observations/observation-ledger-line.ts +0 -1
- package/scripts/observations/observation-ledger-migrate.ts +1 -1
- package/scripts/observations/observations-flush-landing.ts +3 -3
- package/scripts/observations/observations-flush.ts +2 -2
- package/scripts/overrides/lockfile-overrides.ts +1 -1
- package/scripts/overrides/overrides-logic.ts +1 -1
- package/scripts/package/package-scout-cli.ts +2 -7
- package/scripts/package/package-scout.ts +0 -2
- package/scripts/propagate/propagate-git-failure.ts +0 -1
- package/scripts/propagate/propagate-git.ts +3 -10
- package/scripts/propagate/propagate-publish.ts +2 -3
- package/scripts/propagate/propagate-run.ts +0 -2
- package/scripts/propagate/propagate-steps.ts +3 -5
- package/scripts/propagate/propagate-targets.ts +0 -4
- package/scripts/propagate/propagate.ts +0 -4
- package/scripts/refactor/import-graph.ts +0 -1
- package/scripts/refactor/refactor-lint.ts +0 -2
- package/scripts/refactor/refactor-scan.ts +2 -2
- package/scripts/refactor/refactor-targets.ts +0 -1
- package/scripts/registry-migration/migrate-logic.ts +28 -21
- package/scripts/registry-migration/migrate.ts +25 -14
- package/scripts/release/github-release-cli.ts +19 -6
- package/scripts/release/github-release-environment.ts +46 -0
- package/scripts/release/github-release.ts +151 -94
- package/scripts/release/release-history.ts +0 -1
- package/scripts/release/release-plan.ts +0 -1
- package/scripts/release/release-publish.ts +38 -5
- package/scripts/release/release-scope-cli.ts +1 -2
- package/scripts/release/release-tag.ts +2 -4
- package/scripts/release/release-worktree.ts +97 -2
- package/scripts/repo/auto-merge-setting-logic.ts +1 -4
- package/scripts/repo/repo-setting.ts +1 -1
- package/scripts/repo/repository-labels.ts +3 -3
- package/scripts/repo/required-checks-logic.ts +206 -0
- package/scripts/repo/required-checks-report.ts +71 -0
- package/scripts/repo/ruleset-check-cli.ts +53 -0
- package/scripts/repo/ruleset-check.ts +147 -0
- package/scripts/report/report-lint-cli.ts +0 -4
- package/scripts/review/disposition-cli.ts +1 -1
- package/scripts/review/live-evidence.ts +1 -1
- package/scripts/review/review-attest-cli.ts +0 -6
- package/scripts/review/review-attest.ts +4 -16
- package/scripts/review/review-brief-cli.ts +23 -6
- package/scripts/review/review-brief.ts +21 -8
- package/scripts/review/review-checkout.ts +3 -2
- package/scripts/review/review-diff-parts.ts +89 -0
- package/scripts/review/review-diff-write.ts +97 -0
- package/scripts/review/review-finding-ledger.ts +0 -1
- package/scripts/review/review-record-cli.ts +10 -17
- package/scripts/review/review-record.ts +0 -1
- package/scripts/review/review-round2-cli.ts +1 -1
- package/scripts/review/review-stamps.ts +0 -3
- package/scripts/review/review-tree.ts +14 -2
- package/scripts/rules/decision-oracle-stage.ts +18 -0
- package/scripts/rules/decision-oracle.ts +10 -7
- package/scripts/rules/delivered-rules.ts +9 -1
- package/scripts/rules/destructive-command.ts +119 -0
- package/scripts/rules/direct-filing.ts +1 -1
- package/scripts/rules/early-heartbeat.ts +4 -3
- package/scripts/rules/file-body.ts +0 -3
- package/scripts/rules/filing-cap.ts +0 -2
- package/scripts/rules/gh-api.ts +7 -2
- package/scripts/rules/git-argv.ts +18 -7
- package/scripts/rules/git-force.ts +0 -2
- package/scripts/rules/implementation-cut.ts +0 -1
- package/scripts/rules/index-guard.ts +71 -0
- package/scripts/rules/issue-citation.ts +50 -25
- package/scripts/rules/lane-background.ts +15 -7
- package/scripts/rules/lane-park.ts +22 -6
- package/scripts/rules/last-prompt.ts +1 -0
- package/scripts/rules/oracle-consulted.ts +1 -1
- package/scripts/rules/oracle-firing.ts +1 -0
- package/scripts/rules/oracle-list-cli.ts +0 -3
- package/scripts/rules/permission-guards.ts +14 -0
- package/scripts/rules/protected-files.ts +74 -0
- package/scripts/rules/reply-language.ts +1 -1
- package/scripts/rules/rule-body-guard.ts +0 -3
- package/scripts/rules/rule-value-cli.ts +0 -1
- package/scripts/rules/shell-body-trigger.ts +0 -1
- package/scripts/rules/shell-segments.ts +0 -1
- package/scripts/rules/stop-rules.ts +20 -9
- package/scripts/rules/tail-commands.ts +1 -1
- package/scripts/rules/test-declared-commit.ts +1 -1
- package/scripts/rules/third-party-write.ts +0 -1
- package/scripts/rules/worktree-guard.ts +26 -9
- package/scripts/run/run-carry-args.ts +8 -12
- package/scripts/run/run-carry-cli.ts +0 -2
- package/scripts/run/run-carry-stash.ts +2 -2
- package/scripts/run/run-carry-streak.ts +1 -1
- package/scripts/run/run-cut-args.ts +1 -6
- package/scripts/run/run-cut-cli.ts +0 -7
- package/scripts/run/run-cut.ts +8 -54
- package/scripts/run/run-ending-cli.ts +2 -6
- package/scripts/run/run-ending.ts +1 -4
- package/scripts/run/run-entry-cli.ts +133 -25
- package/scripts/run/run-entry-stop.ts +104 -0
- package/scripts/run/run-entry.ts +0 -1
- package/scripts/run/run-event-cli.ts +0 -2
- package/scripts/run/run-event-follow.ts +1 -0
- package/scripts/run/run-event-render.ts +1 -1
- package/scripts/run/run-event-scope.ts +53 -4
- package/scripts/run/run-event-stream-emit.ts +7 -2
- package/scripts/run/run-event-stream.ts +0 -3
- package/scripts/run/run-event-watch.ts +1 -0
- package/scripts/run/run-halfrun-resume.ts +20 -7
- package/scripts/run/run-headless.ts +2 -2
- package/scripts/run/run-hold-cli.ts +33 -10
- package/scripts/run/run-hold.ts +29 -6
- package/scripts/run/run-issue-number.ts +1 -1
- package/scripts/run/run-liveness-cli.ts +2 -6
- package/scripts/run/run-liveness.ts +2 -3
- package/scripts/run/run-merge-cli.ts +7 -23
- package/scripts/run/run-merge-steps.ts +5 -5
- package/scripts/run/run-merge.ts +1 -1
- package/scripts/run/run-next-cli.ts +1 -1
- package/scripts/run/run-parent-cut-hook.ts +4 -2
- package/scripts/run/run-preflight.ts +2 -9
- package/scripts/run/run-prep-cli.ts +6 -3
- package/scripts/run/run-prep-locate.ts +1 -1
- package/scripts/run/run-progress-args.ts +20 -4
- package/scripts/run/run-progress-cli.ts +35 -36
- package/scripts/run/run-progress-clock.ts +10 -35
- package/scripts/run/run-progress-config.ts +0 -4
- package/scripts/run/run-progress-read.ts +1 -2
- package/scripts/run/run-progress.ts +1 -2
- package/scripts/run/run-prrun-resume.ts +117 -0
- package/scripts/run/run-report-cli.ts +1 -2
- package/scripts/run/run-report.ts +0 -1
- package/scripts/run/run-retrospective.ts +1 -1
- package/scripts/run/run-review-cli.ts +0 -3
- package/scripts/run/run-review-steps.ts +2 -0
- package/scripts/run/run-review.ts +0 -2
- package/scripts/run/run-ship-cli.ts +29 -19
- package/scripts/run/run-ship-detach.ts +1 -0
- package/scripts/run/run-ship-next.ts +106 -0
- package/scripts/run/run-ship-preflight.ts +1 -1
- package/scripts/run/run-ship-probe.ts +4 -1
- package/scripts/run/run-ship-return.ts +8 -3
- package/scripts/run/run-ship-review-steps.ts +18 -4
- package/scripts/run/run-ship-review.ts +11 -0
- package/scripts/run/run-ship-scoped.ts +1 -0
- package/scripts/run/run-ship-steps.ts +1 -1
- package/scripts/run/run-ship.ts +0 -1
- package/scripts/run/run-stage-read.ts +62 -0
- package/scripts/run/run-stage.ts +160 -0
- package/scripts/run/run-status-cli.ts +3 -16
- package/scripts/run/run-step-cli.ts +21 -14
- package/scripts/run/run-step.ts +1 -1
- package/scripts/run/run-stop-notify.ts +1 -3
- package/scripts/run/run-stranded-cli.ts +0 -4
- package/scripts/run/run-stranded-detect.ts +2 -2
- package/scripts/run/run-tail-cli.ts +17 -11
- package/scripts/run/run-tail.ts +2 -0
- package/scripts/run/run-tidy-lanes.ts +6 -2
- package/scripts/run/run-tidy-stashes.ts +12 -12
- package/scripts/run/run-wake-cli.ts +4 -13
- package/scripts/run/run-wake-loop.ts +2 -2
- package/scripts/run/run-wake.ts +2 -4
- package/scripts/run/run-watcher-guard-cli.ts +0 -4
- package/scripts/run/run-watcher-guard.ts +18 -12
- package/scripts/run/run-watcher-hook.ts +1 -1
- package/scripts/safe-chain/ci-installer-pin.ts +11 -5
- package/scripts/safe-chain/pack-hook.ts +92 -0
- package/scripts/safe-chain/project-config.ts +1 -1
- package/scripts/security/security-audit-provision-logic.ts +0 -1
- package/scripts/security/security-audit-provision.ts +3 -2
- package/scripts/security/security-audit.ts +0 -1
- package/scripts/security/security-updates-logic.ts +0 -1
- package/scripts/sonar/sonar-hotspots-cli.ts +10 -52
- package/scripts/sonar/sonar-hotspots.ts +0 -1
- package/scripts/sonar/sonar-new-code-cli.ts +150 -0
- package/scripts/sonar/sonar-new-code.ts +79 -0
- package/scripts/sonar/sonar-project.ts +97 -0
- package/scripts/split/split-assess-cli.ts +1 -1
- package/scripts/split/split-assess.ts +2 -5
- package/scripts/sync/managed-config-scope-cli.ts +1 -1
- package/scripts/sync/skill-migration.ts +0 -1
- package/scripts/sync/sync-ai-files.ts +4 -0
- package/scripts/sync/sync-hook-safety.ts +2 -3
- package/scripts/sync/sync.ts +1 -8
- package/scripts/sync/template-source-logic.ts +0 -1
- package/scripts/sync/workflow-pin-logic.ts +16 -28
- package/scripts/test/test-declared-changed.ts +13 -16
- package/scripts/test/test-declared-logic.ts +0 -1
- package/scripts/test/test-declared.ts +3 -9
- package/scripts/test/test-red-commit.ts +2 -2
- package/scripts/test/test-red.ts +14 -7
- package/scripts/test/test-type-logic.ts +1 -1
- package/scripts/test/unit-worker-share.ts +7 -16
- package/scripts/time-runtime/time-batch-guard.ts +1 -2
- package/scripts/time-runtime/time-bundle-call.ts +0 -1
- package/scripts/time-runtime/time-bundles.ts +0 -4
- package/scripts/time-runtime/time-density-hook.ts +0 -2
- package/scripts/time-runtime/time-followup-stage.ts +1 -1
- package/scripts/time-runtime/time-format.ts +0 -73
- package/scripts/time-runtime/time-round-trips.ts +0 -4
- package/scripts/time-runtime/time-single-check.ts +1 -1
- package/scripts/time-runtime/time-spans.ts +1 -1
- package/scripts/time-runtime/time-transcript-line.ts +1 -2
- package/scripts/ui/ui-routes-cli.ts +0 -5
- package/scripts/ui/ui-routes.ts +0 -5
- package/scripts/version/effective-upstream.ts +2 -2
- package/scripts/version/latest-corepack.ts +7 -9
- package/scripts/version/latest-scope-cli.ts +0 -2
- package/scripts/version/latest-update.ts +0 -2
- package/scripts/version/npm-registry.ts +2 -2
- package/scripts/version/publishable-range-check.ts +1 -1
- package/scripts/version/release-hold.ts +0 -4
- package/scripts/version/running-binary.ts +2 -2
- package/scripts/version/version-check-logic.ts +0 -2
- package/scripts/version/version-commands.ts +11 -1
- package/scripts/version/version-remote.ts +3 -3
- package/scripts/version/version-targets.ts +4 -4
- package/templates/CLAUDE.basic.md +6 -6
- package/templates/sonar-project.properties +28 -1
- package/templates/workflows/ci.yml +16 -82
- package/templates/workflows/dependabot-auto-merge.yml +6 -3
- package/templates/workflows/github-release.yml +79 -0
- package/tsconfig.sonar.json +4 -22
- package/prompts/collaboration-workflow/cross-repo-epic.md +0 -5
- package/prompts/collaboration-workflow/epic-audit.md +0 -5
- package/prompts/collaboration-workflow/epic-bundle.md +0 -5
- package/scripts/init/plugin-install-hint.ts +0 -47
- package/scripts/version/parse-json.ts +0 -13
- /package/scripts/{git → followup}/git-followup-stages.ts +0 -0
- /package/scripts/{git → gh}/git-gh-api-path.ts +0 -0
- /package/scripts/{git → gh}/git-gh-command.ts +0 -0
- /package/scripts/{git → gh}/git-gh-issue.ts +0 -0
- /package/scripts/{git → gh}/git-gh-pr-snapshot.ts +0 -0
- /package/scripts/{git → gh}/git-gh-reachability.ts +0 -0
- /package/scripts/{git → gh}/git-gh-repo.ts +0 -0
- /package/scripts/{git → gh}/git-gh-rest-state.ts +0 -0
- /package/scripts/{git → gh}/git-pr-checks-watch.ts +0 -0
- /package/scripts/{git → gh}/git-pr-error.ts +0 -0
- /package/scripts/{git → gh}/git-pr-messages.ts +0 -0
- /package/scripts/{git → gh}/github-issue-url.ts +0 -0
- /package/scripts/git/{stash-orphans.ts → stash/stash-orphans.ts} +0 -0
- /package/scripts/{git → issue}/issue-reference.ts +0 -0
- /package/scripts/{git → lib}/animation-helpers.ts +0 -0
- /package/scripts/{git → lib}/git-animation.ts +0 -0
- /package/scripts/{git → notify}/git-notify.ts +0 -0
- /package/scripts/{git → notify}/telegram-test-logic.ts +0 -0
package/dist/version/index.js
CHANGED
|
@@ -66,6 +66,19 @@ import { existsSync, readFileSync } from "node:fs";
|
|
|
66
66
|
import { createRequire } from "node:module";
|
|
67
67
|
import path from "node:path";
|
|
68
68
|
|
|
69
|
+
// scripts/lib/json-value.ts
|
|
70
|
+
function parse_or_undefined(text) {
|
|
71
|
+
try {
|
|
72
|
+
return JSON.parse(text);
|
|
73
|
+
} catch {
|
|
74
|
+
return void 0;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
function is_record(value) {
|
|
78
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
79
|
+
}
|
|
80
|
+
var json_value = { parse_or_undefined, is_record };
|
|
81
|
+
|
|
69
82
|
// scripts/lib/schemas.ts
|
|
70
83
|
import { z } from "zod";
|
|
71
84
|
var overrides_snapshot_schema = z.record(z.string(), z.string());
|
|
@@ -98,22 +111,13 @@ var json_object_schema = z.record(z.string(), z.unknown());
|
|
|
98
111
|
var string_array_schema = z.array(z.string());
|
|
99
112
|
var string_record_schema = z.record(z.string(), z.string());
|
|
100
113
|
|
|
101
|
-
// scripts/version/parse-json.ts
|
|
102
|
-
function safe_json_parse(raw) {
|
|
103
|
-
try {
|
|
104
|
-
return JSON.parse(raw);
|
|
105
|
-
} catch {
|
|
106
|
-
return void 0;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
114
|
// scripts/version/effective-upstream.ts
|
|
111
115
|
var PACKAGE_JSON = "package.json";
|
|
112
116
|
var MAX_WALK_DEPTH = 64;
|
|
113
117
|
function read_matching_version(manifest_path, package_name) {
|
|
114
118
|
if (!existsSync(manifest_path)) return void 0;
|
|
115
119
|
const parsed = package_named_version_schema.safeParse(
|
|
116
|
-
|
|
120
|
+
json_value.parse_or_undefined(readFileSync(manifest_path, "utf8"))
|
|
117
121
|
);
|
|
118
122
|
if (!parsed.success) return void 0;
|
|
119
123
|
if (parsed.data.name !== package_name) return void 0;
|
|
@@ -258,13 +262,9 @@ function build_release_hold_notes(version, latest, installable, minimum_age_minu
|
|
|
258
262
|
return [format_release_hold_note(version, latest, installable, minimum_age_minutes)];
|
|
259
263
|
}
|
|
260
264
|
var release_hold = {
|
|
261
|
-
HOLD_LABEL,
|
|
262
|
-
is_at_or_above,
|
|
263
|
-
is_latest_withheld,
|
|
264
265
|
resolve_installable,
|
|
265
266
|
is_release_age_hold,
|
|
266
267
|
format_window,
|
|
267
|
-
format_release_hold_note,
|
|
268
268
|
build_release_hold_notes
|
|
269
269
|
};
|
|
270
270
|
|
|
@@ -283,7 +283,7 @@ function read_running_version(self_directory) {
|
|
|
283
283
|
const package_path = resolve_self_package_path(self_directory);
|
|
284
284
|
if (!existsSync2(package_path)) return void 0;
|
|
285
285
|
const parsed = package_version_schema.safeParse(
|
|
286
|
-
|
|
286
|
+
json_value.parse_or_undefined(readFileSync3(package_path, "utf8"))
|
|
287
287
|
);
|
|
288
288
|
return parsed.success ? parsed.data.version : void 0;
|
|
289
289
|
}
|
|
@@ -463,19 +463,23 @@ var version_check_logic = {
|
|
|
463
463
|
format_dual_version_output,
|
|
464
464
|
format_running_line,
|
|
465
465
|
format_upstream_lines,
|
|
466
|
-
format_upstream_global_line,
|
|
467
466
|
build_dual_upgrade_commands,
|
|
468
467
|
build_upstream_upgrade_commands,
|
|
469
468
|
build_upstream_upgrade_notes,
|
|
470
469
|
build_effective_upgrade_commands,
|
|
471
470
|
build_effective_upgrade_notes,
|
|
472
|
-
build_project_upgrade_commands,
|
|
473
471
|
format_update_command,
|
|
474
472
|
format_effective_outcome,
|
|
475
473
|
build_upgrade_shell_command,
|
|
476
474
|
unique_upgrade_commands
|
|
477
475
|
};
|
|
478
476
|
|
|
477
|
+
// scripts/git/git-execa-error.ts
|
|
478
|
+
function has_timed_out(error) {
|
|
479
|
+
if (typeof error !== "object" || error === null || !("timedOut" in error)) return false;
|
|
480
|
+
return error.timedOut === true;
|
|
481
|
+
}
|
|
482
|
+
|
|
479
483
|
// scripts/josh/agent-session-environment.ts
|
|
480
484
|
var SESSION_ID_KEY = "CLAUDE_CODE_SESSION_ID";
|
|
481
485
|
var PARENT_SESSION_KEYS = [
|
|
@@ -561,24 +565,27 @@ var agent_session_environment = {
|
|
|
561
565
|
function message_of(error) {
|
|
562
566
|
return error instanceof Error ? error.message : String(error);
|
|
563
567
|
}
|
|
564
|
-
var
|
|
568
|
+
var DEBUG_ENV_KEY = "JOSH_DEBUG";
|
|
569
|
+
function trace_swallowed(where, error) {
|
|
570
|
+
if ((process.env[DEBUG_ENV_KEY] ?? "").trim() === "") return;
|
|
571
|
+
process.stderr.write(`josh debug: ${where}: ${message_of(error)}
|
|
572
|
+
`);
|
|
573
|
+
}
|
|
574
|
+
var error_text = { message_of, trace_swallowed };
|
|
565
575
|
|
|
566
|
-
// scripts/
|
|
576
|
+
// scripts/gh/git-gh-exec.ts
|
|
567
577
|
import { execa as execa2, execaSync } from "execa";
|
|
568
578
|
|
|
569
|
-
// scripts/
|
|
570
|
-
|
|
571
|
-
if (typeof error !== "object" || error === null || !("timedOut" in error)) return false;
|
|
572
|
-
return error.timedOut === true;
|
|
573
|
-
}
|
|
579
|
+
// scripts/lib/timeouts.ts
|
|
580
|
+
var COMMAND_TIMEOUT_MS = 3e4;
|
|
574
581
|
|
|
575
|
-
// scripts/
|
|
582
|
+
// scripts/gh/git-gh-check.ts
|
|
576
583
|
import { execa } from "execa";
|
|
577
584
|
var GH_NOT_INSTALLED_MSG = "gh CLI is not installed. Install it from https://cli.github.com/";
|
|
578
585
|
var gh_check = {};
|
|
579
586
|
async function run_gh_check() {
|
|
580
587
|
try {
|
|
581
|
-
await execa("gh", ["--version"]);
|
|
588
|
+
await execa("gh", ["--version"], { timeout: COMMAND_TIMEOUT_MS });
|
|
582
589
|
} catch {
|
|
583
590
|
delete gh_check.promise;
|
|
584
591
|
throw new Error(GH_NOT_INSTALLED_MSG);
|
|
@@ -589,9 +596,6 @@ async function check_gh_installed() {
|
|
|
589
596
|
await gh_check.promise;
|
|
590
597
|
}
|
|
591
598
|
|
|
592
|
-
// scripts/git/git-gh-failure.ts
|
|
593
|
-
import { z as z3 } from "zod";
|
|
594
|
-
|
|
595
599
|
// scripts/git/parse-json-array.ts
|
|
596
600
|
var MALFORMED_JSON = /* @__PURE__ */ Symbol("malformed-json");
|
|
597
601
|
function parse_json_loose(raw_json) {
|
|
@@ -602,37 +606,17 @@ function parse_json_loose(raw_json) {
|
|
|
602
606
|
throw error;
|
|
603
607
|
}
|
|
604
608
|
}
|
|
605
|
-
function parse_json_array_or_undefined(raw_json, element_schema) {
|
|
606
|
-
const value = parse_json_loose(raw_json);
|
|
607
|
-
if (value === MALFORMED_JSON || !Array.isArray(value)) return void 0;
|
|
608
|
-
return element_schema.array().parse(value);
|
|
609
|
-
}
|
|
610
|
-
function read_json_listing(raw_json, element_schema) {
|
|
611
|
-
try {
|
|
612
|
-
const rows = parse_json_array_or_undefined(raw_json, element_schema);
|
|
613
|
-
return rows === void 0 ? { kind: "unreadable" } : { kind: "read", rows };
|
|
614
|
-
} catch {
|
|
615
|
-
return { kind: "unexpected_shape" };
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
|
-
function parse_json_array_safe(raw_json, element_schema) {
|
|
619
|
-
const value = parse_json_loose(raw_json);
|
|
620
|
-
if (value === MALFORMED_JSON) return [];
|
|
621
|
-
return element_schema.array().parse(value);
|
|
622
|
-
}
|
|
623
609
|
function parse_json_object_safe(raw_json, schema) {
|
|
624
610
|
const value = parse_json_loose(raw_json);
|
|
625
611
|
if (value === MALFORMED_JSON) return void 0;
|
|
626
612
|
return schema.parse(value);
|
|
627
613
|
}
|
|
628
614
|
var parse_json = {
|
|
629
|
-
|
|
630
|
-
parse_json_array_or_undefined,
|
|
631
|
-
parse_json_object_safe,
|
|
632
|
-
read_json_listing
|
|
615
|
+
parse_json_object_safe
|
|
633
616
|
};
|
|
634
617
|
|
|
635
|
-
// scripts/
|
|
618
|
+
// scripts/gh/git-gh-failure.ts
|
|
619
|
+
import { z as z3 } from "zod";
|
|
636
620
|
var error_document_schema = z3.object({ status: z3.union([z3.string(), z3.number()]).optional() }).catch({});
|
|
637
621
|
var GH_FAILURE_FIELD = "gh_failure";
|
|
638
622
|
function has_gh_failure(error) {
|
|
@@ -660,7 +644,7 @@ function failure_of(error) {
|
|
|
660
644
|
}
|
|
661
645
|
var gh_failure = { attach, classify_stdout, failure_of, parse_response_status };
|
|
662
646
|
|
|
663
|
-
// scripts/
|
|
647
|
+
// scripts/gh/git-gh-exec.ts
|
|
664
648
|
var BODY_FROM_STDIN = "-";
|
|
665
649
|
var GH_REQUEST_TIMEOUT_MS = 6e4;
|
|
666
650
|
function to_timeout_option(timeout_ms) {
|
|
@@ -1031,18 +1015,23 @@ function is_package_entry(line) {
|
|
|
1031
1015
|
function is_github_tarball_line(line) {
|
|
1032
1016
|
return line.trimStart().startsWith("tarball: https://npm.pkg.github.com/");
|
|
1033
1017
|
}
|
|
1034
|
-
function
|
|
1035
|
-
|
|
1018
|
+
function package_id(key) {
|
|
1019
|
+
const name = fix_gh_packages_logic.package_path_from_key(key);
|
|
1020
|
+
return `${name}@${fix_gh_packages_logic.package_version_from_key(key)}`;
|
|
1021
|
+
}
|
|
1022
|
+
function clean_scoped_line(line, id, integrities) {
|
|
1023
|
+
if (!id) return line;
|
|
1036
1024
|
if (is_github_tarball_line(line)) return void 0;
|
|
1037
1025
|
const cleaned = remove_flow_tarball(line);
|
|
1038
|
-
const pair = integrities.get(
|
|
1026
|
+
const pair = integrities.get(id);
|
|
1039
1027
|
if (pair === void 0) return cleaned;
|
|
1040
1028
|
return cleaned.split(`integrity: ${pair[0]}`).join(`integrity: ${pair[1]}`);
|
|
1041
1029
|
}
|
|
1042
|
-
function
|
|
1043
|
-
if (!is_package_entry(line)) return
|
|
1044
|
-
const prefix =
|
|
1045
|
-
|
|
1030
|
+
function next_scoped_id(line, id) {
|
|
1031
|
+
if (!is_package_entry(line)) return id;
|
|
1032
|
+
const prefix = ` '${SCOPE}/`;
|
|
1033
|
+
if (!line.startsWith(prefix)) return "";
|
|
1034
|
+
return package_id(line.slice(" '".length).split("'", 1)[0] ?? "");
|
|
1046
1035
|
}
|
|
1047
1036
|
function integrity_pair(old_integrity, npm_integrity) {
|
|
1048
1037
|
if (old_integrity === void 0 || npm_integrity === void 0) return void 0;
|
|
@@ -1051,24 +1040,24 @@ function integrity_pair(old_integrity, npm_integrity) {
|
|
|
1051
1040
|
function lock_integrities(lockfile, npm_integrities) {
|
|
1052
1041
|
const packages = fix_gh_packages_logic.parse_lockfile_packages(lockfile);
|
|
1053
1042
|
const pairs = /* @__PURE__ */ new Map();
|
|
1054
|
-
const
|
|
1055
|
-
for (const [key, entry] of
|
|
1056
|
-
const
|
|
1057
|
-
const pair = integrity_pair(entry.resolution?.integrity, npm_integrities.get(
|
|
1058
|
-
if (pair !== void 0) pairs.set(
|
|
1043
|
+
const scoped_entries = Object.entries(packages).filter(([key]) => key.startsWith(`${SCOPE}/`));
|
|
1044
|
+
for (const [key, entry] of scoped_entries) {
|
|
1045
|
+
const id = package_id(key);
|
|
1046
|
+
const pair = integrity_pair(entry.resolution?.integrity, npm_integrities.get(id));
|
|
1047
|
+
if (pair !== void 0) pairs.set(id, pair);
|
|
1059
1048
|
}
|
|
1060
1049
|
return pairs;
|
|
1061
1050
|
}
|
|
1062
1051
|
function push_if_defined(lines, cleaned) {
|
|
1063
1052
|
if (cleaned !== void 0) lines.push(cleaned);
|
|
1064
1053
|
}
|
|
1065
|
-
function
|
|
1066
|
-
let
|
|
1054
|
+
function rewrite_scoped_lockfile(lockfile, npm_integrities) {
|
|
1055
|
+
let id = "";
|
|
1067
1056
|
const lines = [];
|
|
1068
1057
|
const integrities = lock_integrities(lockfile, npm_integrities);
|
|
1069
1058
|
for (const line of lockfile.split("\n")) {
|
|
1070
|
-
|
|
1071
|
-
const cleaned =
|
|
1059
|
+
id = next_scoped_id(line, id);
|
|
1060
|
+
const cleaned = clean_scoped_line(line, id, integrities);
|
|
1072
1061
|
push_if_defined(lines, cleaned);
|
|
1073
1062
|
}
|
|
1074
1063
|
return lines.join("\n");
|
|
@@ -1098,7 +1087,7 @@ function previous_registry(project_npmrc, user_npmrc) {
|
|
|
1098
1087
|
}
|
|
1099
1088
|
function plan(project_npmrc, user_npmrc, lockfile) {
|
|
1100
1089
|
const packages = scoped_packages(lockfile);
|
|
1101
|
-
const blocked =
|
|
1090
|
+
const blocked = [];
|
|
1102
1091
|
if (has_duplicate_mapping(project_npmrc, user_npmrc)) blocked.push("duplicate registry mappings");
|
|
1103
1092
|
const unsupported = unsupported_registry(project_npmrc);
|
|
1104
1093
|
if (unsupported !== void 0) blocked.push(unsupported);
|
|
@@ -1110,9 +1099,7 @@ var migrate_logic = {
|
|
|
1110
1099
|
plan,
|
|
1111
1100
|
github_tarballs,
|
|
1112
1101
|
is_github_tarball,
|
|
1113
|
-
|
|
1114
|
-
registry_of,
|
|
1115
|
-
scoped_packages,
|
|
1102
|
+
rewrite_scoped_lockfile,
|
|
1116
1103
|
scoped_versions
|
|
1117
1104
|
};
|
|
1118
1105
|
|
|
@@ -1146,7 +1133,7 @@ function read_packument(package_name, accept) {
|
|
|
1146
1133
|
{ reject: false, timeout: REQUEST_TIMEOUT_MS }
|
|
1147
1134
|
);
|
|
1148
1135
|
if (result.exitCode !== 0) return void 0;
|
|
1149
|
-
return
|
|
1136
|
+
return json_value.parse_or_undefined(result.stdout);
|
|
1150
1137
|
}
|
|
1151
1138
|
function is_github_scope(scope) {
|
|
1152
1139
|
const is_cached_github = github_scopes.get(scope);
|
|
@@ -1211,7 +1198,7 @@ function read_github_release_times(versions_endpoint) {
|
|
|
1211
1198
|
const endpoint = with_page_size(versions_endpoint, TIMES_PAGE_SIZE);
|
|
1212
1199
|
const stdout = git_gh_exec.read_gh_api_sync({ path: endpoint, jq_filter: TIMES_JQ });
|
|
1213
1200
|
if (stdout === void 0) return void 0;
|
|
1214
|
-
const parsed = release_age.release_times_schema.safeParse(
|
|
1201
|
+
const parsed = release_age.release_times_schema.safeParse(json_value.parse_or_undefined(stdout));
|
|
1215
1202
|
return parsed.success ? parsed.data : void 0;
|
|
1216
1203
|
}
|
|
1217
1204
|
function fetch_release_times(versions_endpoint, package_name) {
|
|
@@ -1256,13 +1243,13 @@ function build_pnpm_ls_arguments(package_name) {
|
|
|
1256
1243
|
return ["ls", "-g", "--json", package_name];
|
|
1257
1244
|
}
|
|
1258
1245
|
function parse_global_version(stdout, package_name) {
|
|
1259
|
-
const parsed = pnpm_ls_global_schema.safeParse(
|
|
1246
|
+
const parsed = pnpm_ls_global_schema.safeParse(json_value.parse_or_undefined(stdout));
|
|
1260
1247
|
if (!parsed.success) return void 0;
|
|
1261
1248
|
return parsed.data[0]?.dependencies?.[package_name]?.version;
|
|
1262
1249
|
}
|
|
1263
1250
|
function parse_project_version(raw) {
|
|
1264
1251
|
if (raw === void 0) return void 0;
|
|
1265
|
-
const parsed = package_version_schema.safeParse(
|
|
1252
|
+
const parsed = package_version_schema.safeParse(json_value.parse_or_undefined(raw));
|
|
1266
1253
|
return parsed.success ? parsed.data.version : void 0;
|
|
1267
1254
|
}
|
|
1268
1255
|
function read_global_version(package_name) {
|
|
@@ -1300,6 +1287,7 @@ var version_targets = {
|
|
|
1300
1287
|
var FAILURE_EXIT_CODE = 1;
|
|
1301
1288
|
var ALREADY_UP_TO_DATE = "Already up to date";
|
|
1302
1289
|
var NO_QUARANTINE_MINUTES2 = 0;
|
|
1290
|
+
var UPGRADE_TIMEOUT_MS = 6e5;
|
|
1303
1291
|
function read_release_hold(package_config, latest, versions) {
|
|
1304
1292
|
if (versions.every((version) => version === void 0 || version === latest)) return void 0;
|
|
1305
1293
|
const minimum_age_minutes = release_age.read_nearest_minimum_release_age(process.cwd());
|
|
@@ -1384,7 +1372,11 @@ function run_check(config) {
|
|
|
1384
1372
|
);
|
|
1385
1373
|
}
|
|
1386
1374
|
function run_upgrade_command(command) {
|
|
1387
|
-
const result = execaSync4("sh", ["-c", command], {
|
|
1375
|
+
const result = execaSync4("sh", ["-c", command], {
|
|
1376
|
+
stdio: "inherit",
|
|
1377
|
+
reject: false,
|
|
1378
|
+
timeout: UPGRADE_TIMEOUT_MS
|
|
1379
|
+
});
|
|
1388
1380
|
return result.exitCode ?? FAILURE_EXIT_CODE;
|
|
1389
1381
|
}
|
|
1390
1382
|
function run_all_upgrade_commands(commands) {
|
package/eslint/rules/promise.js
CHANGED
|
@@ -5,6 +5,11 @@ export const promise_rules = {
|
|
|
5
5
|
'promise/param-names': 'error',
|
|
6
6
|
'promise/no-nesting': 'error',
|
|
7
7
|
|
|
8
|
+
// ループ内で 1 つずつ await すると、独立した処理まで直列になる。Sonar の S9382 と同じ指摘を
|
|
9
|
+
// ローカルのゲートで先に出す。ポーリングや順序が意味を持つ処理など意図的な逐次は、
|
|
10
|
+
// `// eslint-disable-next-line no-await-in-loop -- <理由>` で理由を残して抑止する。
|
|
11
|
+
'no-await-in-loop': 'error',
|
|
12
|
+
|
|
8
13
|
// `promise-function-async` を有効にしている以上、`require-await` は同時に満たせない。
|
|
9
14
|
// Promise を返す契約の関数(execa モックなど)は async である必要がある一方、
|
|
10
15
|
// 実際に await する対象を持たないため `require-await` が必ず発火する。
|
package/eslint/rules/unicorn.js
CHANGED
|
@@ -80,8 +80,9 @@ export const unicorn_rules = {
|
|
|
80
80
|
'unicorn/custom-error-definition': 'error',
|
|
81
81
|
// throw new Error()の形式を強制
|
|
82
82
|
'unicorn/throw-new-error': 'error',
|
|
83
|
-
//
|
|
84
|
-
|
|
83
|
+
// 空ファイルを禁止する。コメントだけのファイルは許可する: `sv create` の足場 `src/lib/index.ts` は
|
|
84
|
+
// コメント 1 行だけで、手を加えていないプロジェクトで lint が落ちてしまうため(#3069)
|
|
85
|
+
'unicorn/no-empty-file': ['error', { allowComments: true }],
|
|
85
86
|
// 静的なみずからのみのクラスを禁止
|
|
86
87
|
'unicorn/no-static-only-class': 'error',
|
|
87
88
|
// this別名を禁止(arrow functionを使うべき)
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.
|
|
2
|
+
"version": "1.1128.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": [
|
|
6
6
|
"ai",
|
|
7
7
|
"claude-code",
|
|
8
8
|
"cli",
|
|
9
|
+
"codex",
|
|
9
10
|
"developer-tools",
|
|
10
11
|
"eslint",
|
|
11
12
|
"prettier",
|
|
@@ -58,6 +59,7 @@
|
|
|
58
59
|
".ncurc.json",
|
|
59
60
|
".prettierignore",
|
|
60
61
|
"pnpm-workspace.yaml",
|
|
62
|
+
".pnpmfile.mjs",
|
|
61
63
|
"tsconfig.sonar.json",
|
|
62
64
|
"playwright.config.ts",
|
|
63
65
|
"!**/*.test.ts",
|
|
@@ -85,12 +87,16 @@
|
|
|
85
87
|
"!scripts/build/shim-shell.ts",
|
|
86
88
|
"!scripts/claude/skill-meta.ts",
|
|
87
89
|
"!scripts/document/document-scan.ts",
|
|
90
|
+
"!scripts/exports/member-usage.ts",
|
|
91
|
+
"!scripts/exports/namespace-escape.ts",
|
|
92
|
+
"!scripts/exports/namespace-members.ts",
|
|
93
|
+
"!scripts/exports/unused-members.ts",
|
|
88
94
|
"!scripts/document/generate-catalog.ts",
|
|
89
95
|
"!scripts/document/retired-phrases.ts",
|
|
90
96
|
"!scripts/document/review-agent-type.ts",
|
|
91
97
|
"!scripts/document/single-source.ts",
|
|
98
|
+
"!scripts/hooks/hook-bundle-ready.ts",
|
|
92
99
|
"!scripts/hooks/prompt-hooks.ts",
|
|
93
|
-
"!scripts/init/hook-command-bootstrap.ts",
|
|
94
100
|
"!scripts/josh/josh-script-reader.ts",
|
|
95
101
|
"!scripts/package/production-dependency-graph.ts",
|
|
96
102
|
"!scripts/rules/delivered-rules-harness.ts",
|
|
@@ -156,6 +162,7 @@
|
|
|
156
162
|
"peerDependencies": {
|
|
157
163
|
"@eslint/compat": "^2.1.1",
|
|
158
164
|
"@eslint/js": "^10.0.1",
|
|
165
|
+
"@ianvs/prettier-plugin-sort-imports": "^4.7.1",
|
|
159
166
|
"@playwright/test": ">=1.0.0",
|
|
160
167
|
"@stylistic/eslint-plugin": "^5.10.0",
|
|
161
168
|
"eslint": "^10.0.0",
|
|
@@ -166,6 +173,9 @@
|
|
|
166
173
|
"eslint-plugin-sonarjs": "^4.2.1",
|
|
167
174
|
"eslint-plugin-unicorn": "^76.0.0",
|
|
168
175
|
"globals": "^17.12.0",
|
|
176
|
+
"prettier": "^3.9.9",
|
|
177
|
+
"prettier-plugin-svelte": "^4.1.1",
|
|
178
|
+
"prettier-plugin-tailwindcss": "^0.8.1",
|
|
169
179
|
"typescript": "^6.0.3",
|
|
170
180
|
"typescript-eslint": "^8.70.1"
|
|
171
181
|
},
|
|
@@ -179,6 +189,9 @@
|
|
|
179
189
|
"@eslint/js": {
|
|
180
190
|
"optional": true
|
|
181
191
|
},
|
|
192
|
+
"@ianvs/prettier-plugin-sort-imports": {
|
|
193
|
+
"optional": true
|
|
194
|
+
},
|
|
182
195
|
"@stylistic/eslint-plugin": {
|
|
183
196
|
"optional": true
|
|
184
197
|
},
|
|
@@ -206,6 +219,15 @@
|
|
|
206
219
|
"globals": {
|
|
207
220
|
"optional": true
|
|
208
221
|
},
|
|
222
|
+
"prettier": {
|
|
223
|
+
"optional": true
|
|
224
|
+
},
|
|
225
|
+
"prettier-plugin-svelte": {
|
|
226
|
+
"optional": true
|
|
227
|
+
},
|
|
228
|
+
"prettier-plugin-tailwindcss": {
|
|
229
|
+
"optional": true
|
|
230
|
+
},
|
|
209
231
|
"typescript": {
|
|
210
232
|
"optional": true
|
|
211
233
|
},
|
|
@@ -238,7 +260,7 @@
|
|
|
238
260
|
"prettier": "^3.9.9",
|
|
239
261
|
"prettier-plugin-svelte": "^4.1.1",
|
|
240
262
|
"prettier-plugin-tailwindcss": "^0.8.1",
|
|
241
|
-
"rollup": "^4.
|
|
263
|
+
"rollup": "^4.64.0",
|
|
242
264
|
"rollup-plugin-dts": "^6.5.1",
|
|
243
265
|
"secretlint": "^13.0.6",
|
|
244
266
|
"typescript": "^6.0.3",
|
|
@@ -251,7 +273,6 @@
|
|
|
251
273
|
"jsonc-parser": "^3.3.1",
|
|
252
274
|
"ora": "^9.4.1",
|
|
253
275
|
"semver": "^7.8.5",
|
|
254
|
-
"strip-json-comments": "^5.0.3",
|
|
255
276
|
"tsx": "^4.23.15",
|
|
256
277
|
"zod": "^4.6.5"
|
|
257
278
|
},
|
|
@@ -263,7 +284,7 @@
|
|
|
263
284
|
}
|
|
264
285
|
},
|
|
265
286
|
"scripts": {
|
|
266
|
-
"build": "tsx scripts/build/build-bin.ts && tsx scripts/build/build-hooks.ts && tsx scripts/build/build-version.ts && tsx scripts/build/build-config-merge.ts && tsx scripts/build/build-managed-marker.ts && tsx scripts/build/build-self-sync-guard.ts && tsx scripts/build/build-claude-md.ts",
|
|
287
|
+
"build": "tsx scripts/build/build-bin.ts && tsx scripts/build/build-hooks.ts && tsx scripts/build/build-version.ts && tsx scripts/build/build-config-merge.ts && tsx scripts/build/build-managed-marker.ts && tsx scripts/build/build-self-sync-guard.ts && tsx scripts/build/build-claude-md.ts && tsx scripts/build/build-codex-hooks.ts",
|
|
267
288
|
"josh": "tsx scripts/josh/josh.ts"
|
|
268
289
|
}
|
|
269
290
|
}
|
package/pnpm-workspace.yaml
CHANGED
|
@@ -28,11 +28,9 @@ minimumReleaseAgeExclude:
|
|
|
28
28
|
|
|
29
29
|
overrides:
|
|
30
30
|
svelte: ^5.55.7
|
|
31
|
-
|
|
32
|
-
#
|
|
33
|
-
#
|
|
34
|
-
#
|
|
35
|
-
#
|
|
31
|
+
# An indirect dep a within-range re-resolution could not lift past its parents' pins, floored at the
|
|
32
|
+
# smallest release clearing its OSV advisory (joshuafolkken/kit#2200; user-approved 2026-09-21 to
|
|
33
|
+
# override indirect packages). A caret so `josh latest`'s re-resolution keeps it current within the
|
|
34
|
+
# major without reintroducing the advisory. The devalue, postcss and nanoid floors were removed once
|
|
35
|
+
# their parents' ranges exceeded them (joshuafolkken/kit#3091).
|
|
36
36
|
vite: ^8.0.16 # OSV — vite 8.0.8 → 8.0.16
|
|
37
|
-
postcss: ^8.5.23 # OSV — postcss 8.5.16 → 8.5.23
|
|
38
|
-
nanoid: ^3.3.18 # OSV — nanoid 3.3.15 → 3.3.18
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# ワークフロー用語集
|
|
2
|
+
|
|
3
|
+
**これは定義集であり、規則を定める場所ではない。** 各語は 1〜2 行の定義と、その語の本文がある単一ソースへのポインタだけを持つ。手順・条件・数値は指し先が持ち、ここでは言い換えない — 言い換えた行は指し先より先に古くなる(joshuafolkken/kit#3080)。
|
|
4
|
+
|
|
5
|
+
`scripts/document/workflow-glossary.test.ts` が、下の主要語が定義されていることと、各ポインタが実在する節に解決することを検査する。
|
|
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"
|
|
9
|
+
- **hold** — 1 つの作業ツリーを 1 つのランが占有しているという記録。`pnpm josh run:hold` が取り、`pnpm josh run:release` が外す。→ `.claude/skills/workflow-commands/working-tree-hold.md` → "The working-tree hold"
|
|
10
|
+
- **park** — `backlogrun` が自分で決められない子を `needs-decision` で止め、バッチ全体は止めずに次の子へ進むこと。→ `.claude/skills/workflow-commands/backlogrun-park.md` → "park and continue"
|
|
11
|
+
- **point of use** — 文書を入口ではなく、その文書に従うべき操作と同じターンで、その操作の直前に読むこと。→ `.claude/skills/workflow-commands/SKILL.md` → "Four documents are read at the point of use, not at the entry"
|
|
12
|
+
- **entry read** — コマンド起動時に読む文書の集合。`pnpm josh read:set` がその集合と費用を答える。→ `.claude/skills/workflow-commands/SKILL.md` → "Which file to read"
|
|
13
|
+
- **oracle** — 機械的に読める入力だけから規則の答えを計算するコマンド。一覧は `pnpm josh oracle:list`。→ `prompts/collaboration-workflow/residency.md` → "第 0 問"
|
|
14
|
+
- **interrupt** — WIP 上限を超えても起票できる、3 条件で決まる発見。別パッケージ起因の上流起票(割り込み Issue)とは別の区分。→ `prompts/collaboration-workflow/wip-cap.md` → "割り込み起票"、`prompts/collaboration-workflow/upstream-interrupt.md` → "別パッケージ起因の問題は割り込み Issue で対応する"
|
|
15
|
+
- **Tier** — 判断点の 3 区分。A は可逆で自分で決める、B は拮抗していて人に聞く、C は不可逆・共有状態で明示指示が要る。→ `CLAUDE.md` → "Decision autonomy"、`prompts/collaboration-workflow/operating-rules.md` → "意思決定の自律ポリシー"
|
|
16
|
+
- **carry** — `backlogrun` の 1 回の起動の予算と進捗を、セッション cut をまたいで引き継ぐ記録(`pnpm josh run:carry`)。→ `.claude/skills/workflow-commands/backlogrun-steps.md` → "The session cut is inside the invocation"
|
|
17
|
+
- **wave** — エピックの子をまとめて並行実行する組。仕組みではなく、依存宣言で表す形。→ `.claude/skills/epic-commands/SKILL.md` → "Execution waves"
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
# セッション向け出力で Issue
|
|
1
|
+
# セッション向け出力で Issue はリンク+セッション言語の短い要約で参照する
|
|
2
2
|
|
|
3
|
-
## セッション向け出力で Issue
|
|
3
|
+
## セッション向け出力で Issue はリンク+セッション言語の短い要約で参照する(joshuafolkken/kit#1758)
|
|
4
4
|
|
|
5
5
|
セッション向けの出力で Issue を指すとき、番号だけを書くと読み手は何の話か判断できず、番号を内容に解決するために毎回 GitHub を開くことになる。実際、実行中の backlogrun の報告が番号の羅列になり、オーナーから「番号だけ言われても詳細がわからない」という指摘を受けた。配布ドキュメントは Issue / PR の**タイトル**を英語に固定しているが、**セッション向け出力の中で Issue をどう言及するか**は定めていなかったため、番号だけの言及が規則に反しない状態だった。
|
|
6
6
|
|
|
7
7
|
**規則**: セッション向け出力で Issue を指すときは、次の 2 つを必ず添える。
|
|
8
8
|
|
|
9
9
|
1. 番号にチケットへの markdown リンク
|
|
10
|
-
2.
|
|
10
|
+
2. セッション言語(`JOSH_SESSION_LANG`、既定 `ja`)の短い要約タイトル
|
|
11
11
|
|
|
12
12
|
書き方の例:
|
|
13
13
|
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
**この引用行は手で組み立てるものではなく、`pnpm josh issue:cite <N> [<N> ...]` が出す。** 番号を並べて渡すと、貼れる引用行を 1 呼び出しでまとめて出す(複数 Issue に 1 回、他リポジトリは `--repo <owner/repo>` あるいは `owner/repo#N` 表記)。正しい形にタイトル取得の往復が要るために裸の `#N` に落ちていたので、安い道と正しい道を同じコマンドにした。要約はその Issue のタイトルをそのまま用いる。詳細は [docs/josh-commands.md](https://github.com/joshuafolkken/kit/blob/main/docs/josh-commands.md) の `josh issue:cite` を参照。
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
**要約タイトルは全訳ではなく要約でよい。** 何をするものか分かれば足りる。長い訳を作ることが目的ではない。`issue:cite` が出すタイトルを、必要ならセッション言語に言い換えて使う。
|
|
19
19
|
|
|
20
20
|
**対応前の言及も対象である。** 「これから走らせる」「待機中」「対象外」を並べる場面こそ、読み手が内容を知らないまま番号を読むことになるため、事後の報告だけを対象にすると指摘の半分しか解決しない。
|
|
21
21
|
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
|
|
28
28
|
### 英語固定の 3 つとは衝突しない
|
|
29
29
|
|
|
30
|
-
英語のままにするものは従来どおり 3 つ — Issue / PR
|
|
30
|
+
英語のままにするものは従来どおり 3 つ — Issue / PR のタイトル、コード内コメント・テスト名・コミットメッセージ、スクリプトが出力する固定文字列。この規則が変えるのは、セッション向け出力の地の文における言及の書き方だけである。番号に添えるセッション言語の要約は GitHub 上の**タイトル**ではなく、セッション内の散文の一部なので、タイトルの英語固定とは別物であり矛盾しない。
|
|
31
31
|
|
|
32
32
|
### なぜ CLAUDE.md に常駐させるか
|
|
33
33
|
|
|
@@ -76,7 +76,7 @@ Issue には次の要素を必ず含める。
|
|
|
76
76
|
- **互換性を壊す変更は影響を本文で宣言する。** 既存の利用者、API、設定の契約を変える場合は、`## 背景` の直下に `- 互換性: 破壊的変更` を書き、廃止対象と影響を説明する。移行措置や事前案内があっても破壊的変更なら宣言する。この宣言があれば `pnpm josh issue:file` が `breaking-change` ラベルを同じ作成リクエストに付ける。互換性を保つ変更には付けない。影響が曖昧なら起票文案で対象の利用者と契約を明確にしてから分類する
|
|
77
77
|
- **本文が宣言する分類ラベルは `pnpm josh issue:file` がすべて起票時に付ける。** `bug`、`enhancement`、`breaking-change` は組み合わせて付くことがある。`depth`・`route` などのラベルと併せて 1 回の作成リクエストで付け、宣言が無いとき(`issue:lint` の `labels: none`)は分類ラベルを付けない。Issue が `enhancement` と `breaking-change` の両方を持つとき、PR のリリース分類は `breaking-change` 一つにする。Issue の目的の分類と PR のリリース分類を区別する
|
|
78
78
|
- **`## 発火点`** には、その規則が破れる瞬間に最初に呼ばれるツールコール名を 1 つ書く。名前は `prompts/collaboration-workflow/rule-delivery.md` の配送表に載る、フックで配送可能なツール(`Bash` / `Edit` / `Read` / `Write` / `AskUserQuestion`)と突き合わせる。**表に無い名前**(そもそもツールコール名でない)と**不一致**(既知のツールだが配送できない)は区別して印字され、joshuafolkken/kit#2201 の「規則は正しいが名指ししたコールが実際に破れるコールの 1 つ後ろ」を起票時に検出する
|
|
79
|
-
- **`## ベースライン`** は **「コマンド + 値」** で書く。``- `<測定コマンド>` → <現在の値>`` の形に限り、自然文だけの測定説明は受け付けない(再実行できないため)。マージ後に `pnpm josh measure:rerun`
|
|
79
|
+
- **`## ベースライン`** は **「コマンド + 値」** で書く。``- `<測定コマンド>` → <現在の値>`` の形に限り、自然文だけの測定説明は受け付けない(再実行できないため)。マージ後に `pnpm josh measure:rerun <N>` が同じコマンドをやり直し(本文は shell として実行されるため、作者が `OWNER` / `MEMBER` / `COLLABORATOR` の Issue に限る)、**before / after の対**を印字する。値が動かなかったとき、反証された前提として `docs/maintainers/observations/` の、その時点のブランチが指す Issue のファイルに 1 行追記される(既存の append-only 台帳を使い、別の台帳は作らない)
|
|
80
80
|
- **`## 再現`** は **「コマンド + 実際の出力」** で書く。コマンドを backtick、出力をフェンス(``` または ~~~)で囲む。自然文の「確認した」は再実行できないため受け付けない(`## ベースライン` と同じ理由)。読みだけの起票を起票時に弾くためである
|
|
81
81
|
- **検査は `pnpm josh issue:lint <path>` が行う。** 対象判定・3 見出しの有無・発火点の配送可否・ベースラインが「コマンド + 値」か・再現が「コマンド + 実際の出力」かと、起票時に必要な分類ラベルを、起票前の本文ファイルからまとめて答える(`pnpm josh issue:file` は起票前に同じ検査を行い、問題があれば起票しない)
|
|
82
82
|
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
|
|
28
28
|
PR マージ・ブランチ削除・force push・共有ブランチへの push・外部通知の追加送信・リポジトリ設定の変更など、**共有状態に影響する操作はその場でユーザーに明示指示されたものだけ実行する**。
|
|
29
29
|
|
|
30
|
-
- `fullrun` の auto-merge
|
|
30
|
+
- `fullrun` と `backlogrun` の auto-merge は、それぞれの指示自体に含まれるため許可される(本文は [`followup.md`](../../.claude/skills/workflow-commands/followup.md)、`backlogrun` の子への継承は [`backlogrun-child.md`](../../.claude/skills/workflow-commands/backlogrun-child.md))。`prrun` はマージを認可しない。それ以外の状況で勝手にマージしてはならない
|
|
31
31
|
- `kickoff` / `pnpm josh followup` 単独実行は文書化されたスコープで終了する。PR が OPEN のまま完了したら状態を報告して停止する
|
|
32
32
|
- 「チェックが全部 green だから次のステップに進む」は承認ではない
|
|
33
|
-
- **`gh pr merge` の直接実行は kit 配布の `.claude/settings.json` の `deny
|
|
34
|
-
- **同じ規則が禁じる force push とブランチ削除も deny に載っている**(joshuafolkken/kit#1062
|
|
33
|
+
- **`gh pr merge` の直接実行は kit 配布の `.claude/settings.json` の `permissions.deny` で機械的に遮断されている。** パターンの一覧はそのファイルが一次情報であり、ここでは書き写さない。 `fullrun` の auto-merge は `pnpm josh followup` が node スクリプト内部から gh を起動するため影響を受けない — Bash マッチャに見えるのは `pnpm josh …` だけである。**ただし deny は実装であって規則ではない** — パターンが取りこぼす綴りを禁じているのは本節の規則のほうである
|
|
34
|
+
- **同じ規則が禁じる force push とブランチ削除も deny に載っている**(joshuafolkken/kit#1062)。**deny は規則より狭いが、その差は配送ガードが埋めている** — `git -C` を前置した綴り、短縮フラグをまとめた綴り(`git push -uf`)、`:` をリテラルにできず glob が照合できない `git push origin :branch` は、いずれも `pnpm josh rule:guard` の `git-force` 行が argv を解析して拒否する(joshuafolkken/kit#2120)。**「マージ経路は deny が保証している」とは読まないこと**
|
|
35
35
|
- **共有状態に影響する操作(このセクションの対象=Tier C)は迷ったら確認する。** 確認のコストは低いが、意図しない操作の巻き戻しは高コスト
|
|
36
36
|
- ただしこの「迷ったら確認」は Tier C に限る。**可逆な実装・設計判断(Tier A)は別ルール**(下記「意思決定の自律ポリシー」)に従う
|
|
37
37
|
|
|
@@ -51,8 +51,8 @@ PR マージ・ブランチ削除・force push・共有ブランチへの push
|
|
|
51
51
|
- **レーンの中で競合を解決したあとの「解決済み」の記録は、ケース 2 に含まれる(Tier A)。** レーンは run 専用の作業ツリーで、守るべき利用者の staging はない。利用者に `git add` の許可を求めず、`pnpm josh git -y` で記録する。手順は `.claude/skills/workflow-commands/chain-rule.md` →「origin/main is merged in before the gate」の 1 か所にだけ書く(joshuafolkken/kit#2445)
|
|
52
52
|
- 同じ理由で、`git reset` / `git checkout -- <path>` / `git restore <path>` など index や作業ツリーを破壊的に書き換える操作も、自分の判断で実行しない
|
|
53
53
|
- **`git stash` は例外的に、明文化されたフローの中でのみ自動実行してよい**: `fullrun new` / `halfrun new` の手順 5(作業ツリーに変更がある状態で `josh latest` を回す前の退避)、`backlogrun` のラン開始時の `josh latest`、「別パッケージ起因の問題は割り込み Issue で対応する」、および `backlogrun` が epic の子を始める前の preflight(`pnpm josh run:hold <N>` が `reclaim` と答えたときの回収 — joshuafolkken/kit#926, joshuafolkken/kit#1965)。**この 5 番目だけが復元を伴わない。前の 4 つはいずれも直後に `pnpm josh stash:pop "<メッセージ>"` で復元することが手順に含まれている**(stash はリポジトリ単位の 1 本のスタックを全 work tree が共有するため、位置指定や引数なしの `git stash pop` は別のレーンが最後に積んだ stash を取り込む — メッセージで対象を特定する。joshuafolkken/kit#2050)。 回収するのは異常終了したランの置き土産であって、いま実行中のランの作業ではないから、pop して戻す先がない。**代わりに stash を子の Issue にコメントで記録する** — 前提 Issue で中断するときの stash(`SKILL.md` §2d)と同じく、**その記録だけが後で pop させられる唯一の手がかり**であり、記録し忘れた stash は誰にも拾われない。これら以外の場面で退避したくなったときは、実行せずに先に確認する
|
|
54
|
-
- **この禁止は kit 配布の `.claude/settings.json` の `deny
|
|
55
|
-
- **「拒否される操作」と「禁止された操作」は同じ集合ではない。** deny に載っているのは上記の直接実行だけだが、このセクションが同じく禁じている `git checkout -- <path>` / `git restore <path>` / 認可外の `git stash`(bare・メッセージ無し push・位置指定 pop など。メッセージ付き `git stash push -m` と `pnpm josh stash:pop` は認可済みなので通る)は、`pnpm josh rule:guard` の `worktree-mutation` 行が拒否する(joshuafolkken/kit#2120
|
|
54
|
+
- **この禁止は kit 配布の `.claude/settings.json` の `permissions.deny`(staging・index の書き換え・`git commit` の直接実行)で機械的にも遮断されている。** `pnpm josh git` は node スクリプト内部から git を起動するため影響を受けず、承認済みのコミットフロー(上記ケース 2)は従来どおり動く。**deny には「そのターンでユーザーが明示指示した」という例外がないため、上記ケース 1 も AI 側では実行できない** — その場合はユーザー自身の端末で実行してもらう。**ユーザーが明示的にコミットを指示した場合も同じで**、承認済みのコミットは `pnpm josh git` を通す(`git commit` まで deny に入れた理由は `docs/maintainers/operating-rules-rationale.md` → "Why the index is the user's")
|
|
55
|
+
- **「拒否される操作」と「禁止された操作」は同じ集合ではない。** deny に載っているのは上記の直接実行だけだが、このセクションが同じく禁じている `git checkout -- <path>` / `git restore <path>` / 認可外の `git stash`(bare・メッセージ無し push・位置指定 pop など。メッセージ付き `git stash push -m` と `pnpm josh stash:pop` は認可済みなので通る)は、`pnpm josh rule:guard` の `worktree-mutation` 行が拒否する(joshuafolkken/kit#2120)。同じ配送ガードは、`index-mutation` 行(`git add` / `commit` / `reset` / `rm` / `mv` / `restore --staged`)、`worktree-mutation` 行の強制 `git clean -f`、`destructive-command` 行(`rm -rf`・`gh repo delete` / `archive`・`gh pr close`・`gh api -X DELETE`。Issue ラベルの削除だけは除く)、`protected-file` 行(`.env` の読み取りと kit 以外での `.claude/settings.json` の編集)も拒否する(joshuafolkken/kit#2983)。これらは事故防止のためであり、回避を防ぐ境界ではない。**ツールが通したことを許可と読み替えてはならない** — 何をしてよいかを決めるのは deny でも配送ガードでもなくこのルールである(フックは Claude Code にしか届かない)
|
|
56
56
|
|
|
57
57
|
### 意思決定の自律ポリシー(確認停止を減らす)
|
|
58
58
|
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
`kickoff` / `fullrun` / `halfrun` / `backlogrun` の**操作手順**は、常時ロードされる `CLAUDE.md` からは外され、`.claude/skills/workflow-commands/` に置かれている(joshuafolkken/kit#854)。`CLAUDE.md` に残るのはキーワードとスキルへの導線、およびスキルが読み込まれていない状態でも効く必要のある規則だけである。依存更新後の overrides / `devEngines` 検証手順も同様に `.claude/skills/dependency-update/` へ移した。**どの規則が「残す」側かは →「常駐ドキュメントと skill の分担(何を常駐に残すか)」が判定基準と全 4 件を定義する。**
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
規則の本文は話題ファイルか skill のどちらか 1 か所にだけ置き(どちらに置くかは →「常駐ドキュメントと skill の分担」)、規則が使う数字はコードの定数と、それを述べる 1 文書にだけ置く。**他の文書はその置き場所を指すだけで言い直さない** — 同じ内容を 2 か所に書くと、片方を変えた瞬間にもう片方が古くなる(joshuafolkken/kit#2996)。
|
|
23
23
|
|
|
24
24
|
### 出力の言語(`JOSH_SESSION_LANG`)
|
|
25
25
|
|
|
@@ -33,3 +33,15 @@
|
|
|
33
33
|
3. **スクリプトが出力する固定文字列**: Telegram のヘッダーラベル(`Planning` / `Completion` など)、`Issue:` / `PR:` の URL ラベル、`--notify-message` 省略時の既定メッセージ。AI が書く文面ではなく、翻訳の仕組みも持たない。
|
|
34
34
|
|
|
35
35
|
`JOSH_SESSION_LANG` は **開発者個人の設定**であり、`.env`(gitignore 済み・非コミット)に置く。リポジトリ共有の設定ではないため、consumer ごと・開発者ごとに自由に変えてよい。`josh sync` で上書きされることもない。**解決値は毎ターン、`UserPromptSubmit` フック(`pnpm josh session:lang`)が 1 度だけコンテキストへ差し込む**ので、エージェントが `.env` を読まなくても言語を取り違えない(最初のターンで二重解決していたため `SessionStart` からは外した)。フック出力を表示しないハーネス(Codex / Gemini / Cursor)は従来どおり `.env` を読んで解決する。この変数がスクリプトの挙動を変えることはなく(`session:lang` が解決値を表示のために読むだけ)、制御するのは AI が書く文面の言語だけである。
|
|
36
|
+
|
|
37
|
+
### 配布ドキュメントの層ごとの言語(joshuafolkken/kit#2997)
|
|
38
|
+
|
|
39
|
+
`JOSH_SESSION_LANG` が決めるのはセッションと成果物の散文であり、配布ドキュメントそのものの言語ではない。ドキュメントは**層ごとに 1 つの言語**で書き、1 つの層の中で言語を混ぜない。
|
|
40
|
+
|
|
41
|
+
| 層 | 言語 |
|
|
42
|
+
| --------------------------------------------------------------------------------------- | ------ |
|
|
43
|
+
| `CLAUDE.md`、`AGENTS.md` / `GEMINI.md`、スキル(`.claude/skills/`)、フックが差し込む文 | 英語 |
|
|
44
|
+
| `prompts/` のトピックファイル(次の行の 3 文書を除く) | 日本語 |
|
|
45
|
+
| `prompts/review.md`、`prompts/review-rubric.md`、`prompts/sonar-hotspot-handling.md` | 英語 |
|
|
46
|
+
|
|
47
|
+
英語の層から日本語のトピックファイルの節を指すポインターは、その**見出しを原文のまま**引く(例: `principles.md` → 「クローン禁止」)。見出しは `pnpm josh doc:section` が節を引くキーであり、訳すと解決しなくなるため、これは言語の混在ではない。
|
|
@@ -72,3 +72,12 @@
|
|
|
72
72
|
- **導線文書に規則を書き戻さない。** そこに書かれた規則は、次の改訂で更新し忘れる 4 つ目の置き場になる
|
|
73
73
|
- `scripts/document/ai-document-pointers.test.ts` が機械的に守る。導線文書に規則本体が再出現した場合、導線の一文が消えた場合、`CLAUDE.md` が単一ソースであることの記述が消えた場合に落ちる
|
|
74
74
|
- 経緯は `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"
|
|
75
|
+
|
|
76
|
+
### Claude Code 以外のエージェントでの読み替え
|
|
77
|
+
|
|
78
|
+
`CLAUDE.md` は Claude Code 向けに書かれており、その機能を名指しする。Codex・Gemini CLI など別のエージェントは次のように読み替える。導線文書が持つのはツール固有の 1 行だけで、共通の読み替えはこの節にしか無い(joshuafolkken/kit#3079)。
|
|
79
|
+
|
|
80
|
+
- **フック**: フックが走らない、または出力が見えないツールでは、フックが届ける規則を自分で適用する。その一覧は手書きせず、[`rule-delivery.md`](./rule-delivery.md) →「配送されている規則」の表を正とする — 表の各行が、そのツールでは自分で守る規則である。表の外でフックが担う 3 つも同じく自分で行う — 最初の実行時コード編集の前に Step 0 の作業サマリを提示する、編集ごとの整形フックに頼らず編集後に `pnpm josh lint:related` と `pnpm josh cspell:dot` を走らせる、`JOSH_SESSION_LANG` は注入を待たずに `.env` から解決する。フックの全体は `.claude/settings.json` の `hooks` が正である
|
|
81
|
+
- **Skill・`/verify-ui`・`/code-review`**: `CLAUDE.md` が skill のロードやサブエージェントでの実行を指示する箇所では、その skill の `SKILL.md` を読み、自分のセッションで従う
|
|
82
|
+
- **`.claude/settings.json` の deny list** は効かない。それが裏付ける規則 — 指示なしのコミット・マージ・ステージングその他の共有状態変更をしない — はそのまま拘束する
|
|
83
|
+
- **`AskUserQuestion`** は、ユーザーに平文で尋ねることを指す
|