@joshuafolkken/kit 1.1784.0 → 1.2116.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/agents/reviewer-verification.md +19 -0
- package/.claude/agents/reviewer.md +19 -0
- package/.claude/settings.json +5 -6
- package/.claude/skills/dependency-update/SKILL.md +9 -10
- package/.claude/skills/workflow-commands/SKILL.md +6 -6
- package/.claude/skills/workflow-commands/background-commands.md +8 -5
- package/.claude/skills/workflow-commands/backlogrun-child.md +3 -1
- package/.claude/skills/workflow-commands/backlogrun-lanes.md +1 -1
- package/.claude/skills/workflow-commands/backlogrun-park.md +5 -2
- package/.claude/skills/workflow-commands/backlogrun-progress.md +2 -3
- package/.claude/skills/workflow-commands/backlogrun-recovery.md +1 -1
- package/.claude/skills/workflow-commands/backlogrun-steps.md +3 -2
- package/.claude/skills/workflow-commands/backlogrun.md +1 -1
- package/.claude/skills/workflow-commands/chain-rule.md +41 -32
- package/.claude/skills/workflow-commands/delegation.md +6 -6
- package/.claude/skills/workflow-commands/entry-sequence.md +2 -2
- package/.claude/skills/workflow-commands/followup.md +7 -5
- package/.claude/skills/workflow-commands/fullrun-steps.md +6 -6
- package/.claude/skills/workflow-commands/fullrun.md +1 -1
- package/.claude/skills/workflow-commands/issue-comments.md +9 -4
- package/.claude/skills/workflow-commands/issue-fold-existing.md +2 -1
- package/.claude/skills/workflow-commands/kickoff.md +2 -2
- package/.claude/skills/workflow-commands/observation-filing.md +1 -1
- package/.claude/skills/workflow-commands/observation-ledger.md +6 -4
- package/.claude/skills/workflow-commands/pre-gate-cut.md +9 -7
- package/.claude/skills/workflow-commands/prerequisite.md +3 -2
- package/.claude/skills/workflow-commands/retrospective.md +2 -2
- package/.claude/skills/workflow-commands/split-assessment.md +7 -5
- package/.codex/hooks.json +5 -5
- package/.github/actions/setup-pnpm/action.yml +9 -16
- package/.github/dependabot.yml +16 -0
- package/.github/workflows/auto-tag.yml +45 -0
- package/.github/workflows/ci.yml +155 -15
- package/.github/workflows/dependabot-auto-merge.yml +63 -4
- package/.github/workflows/production.yml +8 -0
- package/.github/workflows/publish.yml +60 -45
- package/.vscode/settings.json +19 -0
- package/CLAUDE.md +5 -12
- package/SECURITY.md +2 -2
- package/dist/CLAUDE.md +5 -12
- package/dist/commands/document-read-cli.js +2 -1
- package/dist/commands/document-section-main.js +2 -1
- package/dist/commands/read-set-cli.js +194 -134
- package/dist/commands/run-prep-main.js +9694 -10173
- package/dist/commands/run-step-cli.js +22138 -18285
- package/dist/hooks/audit-provision.js +23 -5
- package/dist/hooks/chunk-3GKE653K.js +6204 -0
- package/dist/hooks/chunk-45CJJOO7.js +1243 -0
- package/dist/hooks/{chunk-CWMBGKYW.js → chunk-5PM2JRGV.js} +2153 -856
- package/dist/hooks/{chunk-WR2KQAYZ.js → chunk-7SIUNQXK.js} +1207 -1470
- package/dist/hooks/{chunk-O2YBIDSI.js → chunk-CQD4LJE6.js} +1682 -1130
- package/dist/hooks/{chunk-VWWCFGWK.js → chunk-OPSRGWFU.js} +1 -1
- package/dist/hooks/{chunk-XGBNSWEI.js → chunk-UJ3FPMMM.js} +132 -49
- package/dist/hooks/chunk-VVNYJWEI.js +30 -0
- package/dist/hooks/chunk-Z6DQJKH3.js +2806 -0
- package/dist/hooks/codex-hook-adapter.js +8 -8
- package/dist/hooks/format-edited.js +4 -5
- package/dist/hooks/inputs.json +386 -360
- package/dist/hooks/pretool-guard.js +7 -6
- package/dist/hooks/session-lang.js +101 -258
- package/dist/hooks/stop-guard.js +1744 -2576
- package/dist/josh.js +7133 -6368
- package/dist/version/index.js +161 -1
- package/eslint/rules/comment-why-only.js +108 -0
- package/package.json +16 -9
- package/prompts/coding-standards.md +1 -1
- package/prompts/collaboration-workflow/file-edits.md +14 -11
- package/prompts/collaboration-workflow/issue-citation.md +0 -4
- package/prompts/collaboration-workflow/issue-template.md +40 -21
- package/prompts/collaboration-workflow/lane-instructions.md +3 -1
- package/prompts/collaboration-workflow/measurement.md +8 -1
- package/prompts/collaboration-workflow/operating-rules.md +11 -2
- package/prompts/collaboration-workflow/output-bounds.md +6 -2
- package/prompts/collaboration-workflow/plan-comment.md +1 -1
- package/prompts/collaboration-workflow/principles.md +9 -0
- package/prompts/collaboration-workflow/residency.md +3 -2
- package/prompts/collaboration-workflow/rule-delivery.md +13 -1
- package/prompts/collaboration-workflow/upstream-interrupt.md +2 -2
- package/prompts/collaboration-workflow/wip-cap.md +3 -1
- package/prompts/review-rubric.md +8 -0
- package/prompts/review.md +31 -22
- package/prompts/testing-guide.md +1 -0
- package/scripts/agent/agent-argv.ts +14 -16
- package/scripts/agent/agent-provider.ts +138 -0
- package/scripts/agent/agent-role-profile.ts +108 -156
- package/scripts/agent/agent-safe-text.ts +20 -5
- package/scripts/agent/api-usage-limit.ts +65 -0
- package/scripts/agent/claude-agent-argv.ts +19 -9
- package/scripts/agent/codex-agent-argv.ts +118 -22
- package/scripts/agent/usage-limit-reset.ts +179 -0
- package/scripts/auth/claude-token-output.ts +2 -2
- package/scripts/auto-ok/auto-ok-author.ts +53 -0
- package/scripts/auto-ok/auto-ok-cli.ts +20 -9
- package/scripts/backlog/backlog-defect-priority.ts +1 -1
- package/scripts/backlog/backlog-drive-cli.ts +6 -1
- package/scripts/backlog/backlog-drive-hold.ts +3 -3
- package/scripts/backlog/backlog-drive-idle.ts +10 -0
- package/scripts/backlog/backlog-drive-launch-pass.ts +90 -0
- package/scripts/backlog/backlog-drive-launch.ts +8 -2
- package/scripts/backlog/backlog-drive-named-offer.ts +73 -30
- package/scripts/backlog/backlog-drive-named.ts +28 -7
- package/scripts/backlog/backlog-drive-paused.ts +5 -4
- package/scripts/backlog/backlog-drive-restore.ts +11 -3
- package/scripts/backlog/backlog-drive.ts +21 -60
- package/scripts/backlog/backlog-gate-scope.ts +61 -0
- package/scripts/backlog/backlog-measure-close.ts +112 -0
- package/scripts/backlog/backlog-next.ts +39 -49
- package/scripts/backlog/backlog-occupied.ts +2 -2
- package/scripts/backlog/backlog-overlap.ts +42 -8
- package/scripts/backlog/backlog-plan-cli.ts +4 -1
- package/scripts/backlog/backlog-plan-comment.ts +81 -0
- package/scripts/backlog/backlog-plan-read.ts +19 -6
- package/scripts/backlog/backlog-pool.ts +50 -12
- package/scripts/backlog/backlog-rank.ts +60 -13
- package/scripts/backlog/backlog-stalled-detect.ts +2 -1
- package/scripts/backlog/backlog-waves.ts +17 -2
- package/scripts/backlog/backlogrun-launch.ts +7 -4
- package/scripts/cost-runtime/context-cut-payback.ts +27 -25
- package/scripts/cost-runtime/cost-cli.ts +37 -16
- package/scripts/cost-runtime/cost-pricing.ts +9 -0
- package/scripts/cost-runtime/cost-verdict.ts +4 -1
- package/scripts/delegation/delegation-policy.ts +2 -2
- package/scripts/delegation/duplicate-read-guard.ts +1 -0
- package/scripts/delegation/investigation-guard.ts +14 -2
- package/scripts/delegation/investigation-reads.ts +45 -23
- package/scripts/dependabot/dependabot-cooldown.ts +3 -2
- package/scripts/discovery/repo-party.ts +80 -20
- package/scripts/discovery/session-owner-pin.ts +51 -0
- package/scripts/document/capped-print.ts +1 -1
- package/scripts/document/command-reference-line-budget.ts +42 -0
- package/scripts/document/document-byte-budget.ts +17 -7
- package/scripts/document/document-checks.ts +20 -0
- package/scripts/document/document-ratchet-check.ts +101 -0
- package/scripts/document/document-section.ts +1 -0
- package/scripts/document/entry-read-budget.ts +7 -3
- package/scripts/document/issue-citation-budget.ts +94 -0
- package/scripts/epic/epic-cli-argv.ts +2 -2
- package/scripts/epic/epic-fetch.ts +4 -2
- package/scripts/epic/epic-graph.ts +7 -2
- package/scripts/epic/epic-issue.ts +3 -1
- package/scripts/epic/epic-rank.ts +5 -0
- package/scripts/exports/unused-members-check.ts +62 -0
- package/scripts/exports/unused-members-cli.ts +6 -51
- package/scripts/followup/followup-ci-path.ts +67 -0
- package/scripts/followup/followup-coderabbit-retrigger.ts +261 -0
- package/scripts/followup/followup-coderabbit-wait.ts +13 -10
- package/scripts/followup/followup-failed-tests.ts +160 -0
- package/scripts/followup/followup-job-needs.ts +100 -0
- package/scripts/followup/followup-job-rerun.ts +303 -0
- package/scripts/followup/followup-main-move.ts +113 -0
- package/scripts/followup/git-followup-finish.ts +43 -11
- package/scripts/followup/git-followup-pending.ts +3 -3
- package/scripts/followup/git-followup-stages.ts +41 -11
- package/scripts/followup/git-pr-followup-checks.ts +55 -16
- package/scripts/followup/git-pr-followup-wrapup.ts +24 -5
- package/scripts/followup/git-pr-followup.ts +62 -27
- package/scripts/fresh-machine/fresh-machine-script.ts +5 -9
- package/scripts/fresh-machine/specs/kit-test-backlogrun-python.json +2 -2
- package/scripts/fresh-machine/specs/kit-test-backlogrun.json +2 -2
- package/scripts/gate/busy-average.ts +34 -2
- package/scripts/gate/check-related-pinned.ts +43 -0
- package/scripts/gate/check-related-reuse.ts +64 -0
- package/scripts/gate/check-related-section.ts +57 -0
- package/scripts/gate/check-related-unplanned.ts +34 -0
- package/scripts/gate/check-related.ts +265 -0
- package/scripts/gate/command-memory.ts +1 -1
- package/scripts/gate/core-admission.ts +24 -6
- package/scripts/gate/core-budget-timing.ts +20 -6
- package/scripts/gate/core-budget.ts +40 -11
- package/scripts/gate/core-wait-record.ts +3 -2
- package/scripts/gate/core-wait.ts +25 -2
- package/scripts/gate/core-weights.ts +15 -7
- package/scripts/gate/gate-labels.ts +46 -0
- package/scripts/gate/gate-ledger.ts +14 -6
- package/scripts/gate/gate-plan.ts +103 -58
- package/scripts/gate/gate-report.ts +9 -7
- package/scripts/gate/gate-run-steps.ts +26 -3
- package/scripts/gate/gate-skip.ts +45 -6
- package/scripts/gate/gate-static-group.ts +60 -0
- package/scripts/gate/gate-steps.ts +2 -1
- package/scripts/gate/gate-tree.ts +4 -2
- package/scripts/gate/hook-gate-reuse.ts +19 -2
- package/scripts/gate/metrics-totals.ts +59 -0
- package/scripts/gate/scoped-green.ts +68 -15
- package/scripts/gate/since-green.ts +14 -6
- package/scripts/gate/structural-checks.ts +96 -0
- package/scripts/gate/verification-gate.ts +51 -16
- package/scripts/gate/verification-inputs.ts +21 -6
- package/scripts/gate/verification-tail.ts +52 -0
- package/scripts/gh/gh-author-association.ts +23 -2
- package/scripts/gh/git-ai-review-scan.ts +1 -1
- package/scripts/gh/git-gh-api-path.ts +12 -3
- package/scripts/gh/git-gh-comments-unreadable.ts +36 -0
- package/scripts/gh/git-gh-exec.ts +32 -2
- package/scripts/gh/git-gh-issue-read.ts +4 -2
- package/scripts/gh/git-gh-issue-rest.ts +1 -0
- package/scripts/gh/git-gh-issue-write.ts +8 -2
- package/scripts/gh/git-gh-issue.ts +12 -5
- package/scripts/gh/git-gh-pr-auto-merge.ts +13 -6
- package/scripts/gh/git-gh-pr-graphql-state.ts +56 -0
- package/scripts/gh/git-gh-pr-read.ts +74 -13
- package/scripts/gh/git-gh-pr-rest.ts +3 -1
- package/scripts/gh/git-gh-pr-snapshot.ts +22 -7
- package/scripts/gh/git-gh-pr-too-large.ts +20 -0
- package/scripts/gh/git-gh-pr.ts +21 -7
- package/scripts/gh/git-gh-retry.ts +141 -0
- package/scripts/gh/git-pr-ai-review.ts +15 -6
- package/scripts/gh/git-pr-checks-eval.ts +3 -0
- package/scripts/gh/git-pr-checks.ts +5 -5
- package/scripts/git/base-tree.ts +30 -0
- package/scripts/git/change-base.ts +4 -10
- package/scripts/git/changed-paths-sync.ts +63 -0
- package/scripts/git/changed-paths.ts +16 -1
- package/scripts/git/git-common-directory.ts +11 -1
- package/scripts/git/git-diff-reads.ts +66 -20
- package/scripts/git/git-error.ts +9 -2
- package/scripts/git/git-schemas.ts +13 -0
- package/scripts/git/git-worktree.ts +13 -0
- package/scripts/git/gone-branch.ts +4 -1
- package/scripts/git/main-merge-budget-conflict.ts +89 -0
- package/scripts/git/main-merge-guard.ts +55 -18
- package/scripts/git/main-merge-regenerate.ts +59 -25
- package/scripts/git/main-merge.ts +53 -5
- package/scripts/git/no-base-checkout.ts +127 -0
- package/scripts/git/stash/git-stash.ts +11 -2
- package/scripts/git/stash/stash-push-cli.ts +10 -0
- package/scripts/hooks/batch-guard.ts +40 -21
- package/scripts/hooks/edited-cspell.ts +37 -11
- package/scripts/hooks/format-edited-file.ts +22 -2
- package/scripts/hooks/lane-plan-guard.ts +50 -0
- package/scripts/hooks/pre-commit-lint-switch.ts +9 -0
- package/scripts/hooks/pre-commit-lint.ts +14 -1
- package/scripts/hooks/pre-push-related-switch.ts +10 -0
- package/scripts/hooks/pre-push-unit.ts +76 -10
- package/scripts/hooks/pretool-guard.ts +2 -0
- package/scripts/hooks/reserved-run.ts +14 -1
- package/scripts/hooks/run-hook.sh +23 -8
- package/scripts/hooks/step-zero-notice.ts +6 -1
- package/scripts/hooks/stop-actions.ts +3 -15
- package/scripts/hooks/stop-guard.ts +7 -6
- package/scripts/init/distributed-paths.ts +1 -0
- package/scripts/init/hook-command-rewrite.ts +5 -1
- package/scripts/init/hook-launch.ts +4 -2
- package/scripts/issue/aggregation-split.ts +52 -0
- package/scripts/issue/defect-origin-line.ts +19 -1
- package/scripts/issue/defect-rate-cli.ts +5 -102
- package/scripts/issue/defect-report.ts +4 -4
- package/scripts/issue/effect-audit-cli.ts +178 -0
- package/scripts/issue/effect-audit.ts +185 -0
- package/scripts/issue/expected-effect-lint.ts +64 -9
- package/scripts/issue/git-next-issues.ts +5 -0
- package/scripts/issue/issue-body-or-comment.ts +38 -4
- package/scripts/issue/issue-cite-cli.ts +1 -3
- package/scripts/issue/issue-classification.ts +1 -0
- package/scripts/issue/issue-closing-pr.ts +8 -1
- package/scripts/issue/issue-evidence-exit.ts +4 -2
- package/scripts/issue/issue-file-cap.ts +58 -0
- package/scripts/issue/issue-file-cli.ts +111 -38
- package/scripts/issue/issue-file-deferral.ts +52 -0
- package/scripts/issue/issue-file-fold.ts +29 -10
- package/scripts/issue/issue-file-interrupt.ts +85 -0
- package/scripts/issue/issue-file-lane-hint.ts +30 -0
- package/scripts/issue/issue-file.ts +43 -6
- package/scripts/issue/issue-labels.ts +19 -2
- package/scripts/issue/issue-lint-cli.ts +27 -2
- package/scripts/issue/issue-measured-cli.ts +13 -35
- package/scripts/issue/issue-measured-close.ts +58 -0
- package/scripts/issue/issue-not-before-label.ts +2 -2
- package/scripts/issue/issue-not-before.ts +4 -1
- package/scripts/issue/issue-priority-cli.ts +60 -0
- package/scripts/issue/issue-priority-raise.ts +55 -0
- package/scripts/issue/issue-priority.ts +174 -43
- package/scripts/issue/issue-rank.ts +21 -4
- package/scripts/issue/issue-read-cli.ts +32 -6
- package/scripts/issue/issue-read.ts +37 -12
- package/scripts/issue/issue-sample-gate.ts +95 -74
- package/scripts/issue/issue-sample-prime.ts +127 -0
- package/scripts/issue/issue-sample-required.ts +57 -0
- package/scripts/issue/issue-sample-source.ts +12 -11
- package/scripts/issue/issue-search.ts +124 -0
- package/scripts/issue/issue-state.ts +13 -1
- package/scripts/issue/issue-template-section.ts +43 -0
- package/scripts/issue/issue-watch-diff.ts +31 -1
- package/scripts/issue/issue-watch-hook.ts +11 -2
- package/scripts/issue/issue-watch.ts +55 -12
- package/scripts/issue/markdown-section.ts +1 -0
- package/scripts/issue/measure-declaration.ts +121 -0
- package/scripts/issue/measure-rerun-cli.ts +7 -70
- package/scripts/issue/plan-consumers-section.ts +22 -1
- package/scripts/issue/reproduction-measure.ts +3 -1
- package/scripts/issue/size-estimate.ts +90 -0
- package/scripts/issue/trusted-measure.ts +84 -0
- package/scripts/josh/command-usage.ts +3 -2
- package/scripts/josh/durable-state-migrate.ts +105 -0
- package/scripts/josh/durable-state.ts +112 -0
- package/scripts/josh/josh-aliases.ts +95 -0
- package/scripts/josh/josh-command-map.ts +1 -82
- package/scripts/josh/josh-commands-agent-hooks.ts +6 -6
- package/scripts/josh/josh-commands-ai.ts +5 -5
- package/scripts/josh/josh-commands-development.ts +59 -58
- package/scripts/josh/josh-commands-issue-write.ts +23 -4
- package/scripts/josh/josh-commands-issue.ts +32 -0
- package/scripts/josh/josh-commands-lane.ts +87 -4
- package/scripts/josh/josh-commands-lint.ts +16 -3
- package/scripts/josh/josh-commands-maintenance.ts +15 -0
- package/scripts/josh/josh-commands-review.ts +41 -6
- package/scripts/josh/josh-commands-ship.ts +56 -8
- package/scripts/josh/josh-commands-test-check.ts +80 -0
- package/scripts/josh/josh-commands-workflow.ts +1 -1
- package/scripts/josh/josh-environment-file.ts +43 -3
- package/scripts/josh/josh-in-process.ts +2 -2
- package/scripts/josh/josh-logic.ts +5 -3
- package/scripts/josh/josh-run.ts +19 -1
- package/scripts/josh/run-record-path.ts +15 -0
- package/scripts/josh/stamp-file.ts +11 -2
- package/scripts/lane/lane-adopt-cli.ts +98 -0
- package/scripts/lane/lane-adopt.ts +208 -0
- package/scripts/lane/lane-await.ts +5 -8
- package/scripts/lane/lane-baseline.ts +123 -0
- package/scripts/lane/lane-breakdown-cli.ts +64 -0
- package/scripts/lane/lane-breakdown-implement.ts +170 -0
- package/scripts/lane/lane-breakdown-laps.ts +107 -0
- package/scripts/lane/lane-breakdown-pinned.ts +76 -0
- package/scripts/lane/lane-breakdown-text.ts +145 -0
- package/scripts/lane/lane-breakdown.ts +239 -0
- package/scripts/lane/lane-check-stats.ts +29 -8
- package/scripts/lane/lane-child-invocation.ts +9 -2
- package/scripts/lane/lane-child-mark-keys.ts +12 -0
- package/scripts/lane/lane-child-marker.ts +20 -1
- package/scripts/lane/lane-ci-path-stats.ts +73 -0
- package/scripts/lane/lane-claim-stats.ts +84 -0
- package/scripts/lane/lane-close.ts +8 -3
- package/scripts/lane/lane-dispatch-log.ts +3 -3
- package/scripts/lane/lane-dispatch.ts +2 -2
- package/scripts/lane/lane-gap-stats.ts +7 -6
- package/scripts/lane/lane-guard-policy.ts +7 -1
- package/scripts/lane/lane-implement-stats.ts +207 -0
- package/scripts/lane/lane-implement-subagents.ts +90 -0
- package/scripts/lane/lane-investigation-switch.ts +16 -0
- package/scripts/lane/lane-ledger-kind.ts +31 -0
- package/scripts/lane/lane-ledger-schema-ship.ts +49 -0
- package/scripts/lane/lane-ledger-schema.ts +119 -36
- package/scripts/lane/lane-ledger-write.ts +257 -0
- package/scripts/lane/lane-ledger.ts +31 -177
- package/scripts/lane/lane-load.ts +1 -1
- package/scripts/lane/lane-measure-cli.ts +176 -59
- package/scripts/lane/lane-net-read.ts +44 -0
- package/scripts/lane/lane-net-time.ts +212 -0
- package/scripts/lane/lane-open.ts +16 -7
- package/scripts/lane/lane-output.ts +2 -4
- package/scripts/lane/lane-overrun-prompt.ts +147 -0
- package/scripts/lane/lane-overrun.ts +274 -0
- package/scripts/lane/lane-paths.ts +24 -1
- package/scripts/lane/lane-pause-cli.ts +4 -1
- package/scripts/lane/lane-paused-spans.ts +97 -0
- package/scripts/lane/lane-plan-check.ts +207 -0
- package/scripts/lane/lane-plan-cli.ts +41 -0
- package/scripts/lane/lane-plan.ts +144 -0
- package/scripts/lane/lane-registry.ts +14 -1
- package/scripts/lane/lane-relaunch.ts +1 -1
- package/scripts/lane/lane-round-one-stats.ts +51 -0
- package/scripts/lane/lane-sampler.ts +23 -4
- package/scripts/lane/lane-session-action.ts +93 -18
- package/scripts/lane/lane-session-broker.ts +49 -21
- package/scripts/lane/lane-session-reread-main.ts +14 -0
- package/scripts/lane/lane-session-reread.ts +51 -0
- package/scripts/lane/lane-ship-lap-stats.ts +74 -0
- package/scripts/lane/lane-sleep.ts +58 -0
- package/scripts/lane/lane-spent.ts +1 -1
- package/scripts/lane/lane-split-stats.ts +28 -0
- package/scripts/lane/lane-stage-stats.ts +13 -1
- package/scripts/lane/lane-state.ts +41 -9
- package/scripts/lane/lane-stats-tables.ts +58 -0
- package/scripts/lane/lane-stats.ts +21 -5
- package/scripts/lane/lane-stop-stats.ts +51 -19
- package/scripts/lane/lane-tail-stats.ts +32 -0
- package/scripts/lane/lane-transcript-calls.ts +67 -10
- package/scripts/lane/lane-transcript-stats.ts +44 -12
- package/scripts/lane/lane-value-cell.ts +72 -0
- package/scripts/lane/lane-value.ts +118 -0
- package/scripts/lane/lane-withdraw-closed.ts +124 -0
- package/scripts/lane/lane-withdraw.ts +108 -31
- package/scripts/lane/lane-yield.ts +85 -0
- package/scripts/lane/openai-lane-ship.ts +12 -11
- package/scripts/lane/openai-lane-supervisor-decision.ts +6 -8
- package/scripts/lane/openai-lane-supervisor-owner.ts +5 -8
- package/scripts/lane/openai-lane-supervisor.ts +5 -4
- package/scripts/lib/poll.ts +38 -9
- package/scripts/lib/settled-together.ts +10 -0
- package/scripts/lib/shell-quote.ts +21 -0
- package/scripts/lib/token-shape.ts +111 -0
- package/scripts/lint/eslint-daemon-sources.ts +79 -0
- package/scripts/lint/eslint-daemon.ts +45 -6
- package/scripts/lint/eslint-warm-cli.ts +7 -0
- package/scripts/lint/eslint-warm.ts +66 -0
- package/scripts/lint/import-graph.ts +141 -11
- package/scripts/lint/lint-gate-scope.ts +2 -2
- package/scripts/lint/lint-parallel.ts +54 -6
- package/scripts/lint/lint-related.ts +154 -33
- package/scripts/lint/rename-cli.ts +179 -0
- package/scripts/lint/rename-identifier.ts +192 -0
- package/scripts/lint/type-only-imports.ts +58 -0
- package/scripts/notify/telegram-notify.ts +12 -3
- package/scripts/observations/observation-record.ts +42 -16
- package/scripts/observations/observations-flush.ts +32 -9
- package/scripts/overrides/overrides-check.ts +9 -1
- package/scripts/release/release-approval-prune.ts +7 -1
- package/scripts/repo/required-checks-logic.ts +4 -1
- package/scripts/repo/ruleset-check.ts +4 -3
- package/scripts/report/markdown-shape.ts +28 -0
- package/scripts/report/report-format-reference.ts +15 -1
- package/scripts/report/report-labels.ts +12 -1
- package/scripts/report/report-lint-child-summary.ts +94 -0
- package/scripts/report/report-lint-cli.ts +26 -7
- package/scripts/report/report-lint.ts +2 -20
- package/scripts/review/prose-stale-cli.ts +88 -0
- package/scripts/review/prose-stale-scan.ts +152 -0
- package/scripts/review/review-attest.ts +73 -23
- package/scripts/review/review-brief-cli.ts +68 -19
- package/scripts/review/review-brief-paths.ts +22 -0
- package/scripts/review/review-brief.ts +14 -7
- package/scripts/review/review-comment-carry.ts +47 -0
- package/scripts/review/review-comment-round.ts +85 -22
- package/scripts/review/review-finding-ledger.ts +109 -7
- package/scripts/review/review-finding-text.ts +43 -0
- package/scripts/review/review-interaction.ts +11 -0
- package/scripts/review/review-lane-handover.ts +68 -0
- package/scripts/review/review-lint-cli.ts +57 -0
- package/scripts/review/review-lint-findings.ts +92 -0
- package/scripts/review/review-lint-sections.ts +80 -0
- package/scripts/review/review-lint.ts +221 -0
- package/scripts/review/review-prior-findings.ts +102 -0
- package/scripts/review/review-readers-scan.ts +4 -2
- package/scripts/review/review-record-cli.ts +177 -54
- package/scripts/review/review-record-code-round.ts +55 -0
- package/scripts/review/review-record-comment.ts +60 -0
- package/scripts/review/review-record-interaction.ts +35 -0
- package/scripts/review/review-record-pinned.ts +108 -0
- package/scripts/review/review-record.ts +25 -1
- package/scripts/review/review-reviewed-tree.ts +307 -0
- package/scripts/review/review-round-one-closure.ts +62 -0
- package/scripts/review/review-round-reuse.ts +106 -0
- package/scripts/review/review-round2-cli.ts +91 -29
- package/scripts/review/review-round2-skip-comment.ts +55 -0
- package/scripts/review/review-round2.ts +24 -8
- package/scripts/review/review-stamps.ts +7 -3
- package/scripts/review/review-stop-log.ts +20 -6
- package/scripts/review/review-stops-cli.ts +2 -1
- package/scripts/review/review-submit-cli.ts +101 -0
- package/scripts/rules/agent-model.ts +1 -1
- package/scripts/rules/bash-triggers.ts +3 -3
- package/scripts/rules/concise-reply.ts +88 -0
- package/scripts/rules/credential-body.ts +77 -0
- package/scripts/rules/decision-oracle.ts +1 -1
- package/scripts/rules/delivered-rules.ts +36 -17
- package/scripts/rules/destructive-command.ts +3 -11
- package/scripts/rules/direct-issue-comment.ts +34 -12
- package/scripts/rules/direct-issue-read.ts +191 -0
- package/scripts/rules/direct-pr-create.ts +4 -24
- package/scripts/rules/early-heartbeat.ts +2 -0
- package/scripts/rules/edit-tool.ts +27 -0
- package/scripts/rules/file-edit-rows.ts +17 -0
- package/scripts/rules/file-rewrite.ts +146 -0
- package/scripts/rules/firing-point.ts +3 -2
- package/scripts/rules/gh-api.ts +128 -7
- package/scripts/rules/gh-repo-selector.ts +84 -0
- package/scripts/rules/git-force.ts +2 -2
- package/scripts/rules/guard-remedy.ts +14 -5
- package/scripts/rules/implementation-cut.ts +61 -28
- package/scripts/rules/investigator-foreground.ts +231 -0
- package/scripts/rules/issue-citation.ts +15 -60
- package/scripts/rules/issue-comments.ts +9 -4
- package/scripts/rules/josh-git-bare.ts +1 -1
- package/scripts/rules/lane-background.ts +41 -13
- package/scripts/rules/lane-direct-tool.ts +107 -9
- package/scripts/rules/lane-interactive-ask.ts +4 -1
- package/scripts/rules/lane-park.ts +4 -2
- package/scripts/rules/lane-spilled-read.ts +90 -0
- package/scripts/rules/lane-split-park.ts +1 -1
- package/scripts/rules/lane-switch-main.ts +4 -4
- package/scripts/rules/last-prompt.ts +20 -47
- package/scripts/rules/oracle-consulted.ts +1 -1
- package/scripts/rules/permission-guards.ts +5 -1
- package/scripts/rules/piped-verification-shapes.ts +110 -0
- package/scripts/rules/piped-verification.ts +67 -17
- package/scripts/rules/poll-loop.ts +72 -9
- package/scripts/rules/pr-merge.ts +5 -5
- package/scripts/rules/pre-gate-cut.ts +3 -3
- package/scripts/rules/protected-files.ts +88 -24
- package/scripts/rules/reply-language.ts +3 -17
- package/scripts/rules/reply-prose.ts +34 -0
- package/scripts/rules/repo-admin.ts +132 -0
- package/scripts/rules/reviewer-foreground.ts +88 -0
- package/scripts/rules/round-one-check-related.ts +120 -0
- package/scripts/rules/rule-body-guard.ts +5 -15
- package/scripts/rules/rule-value-cache.ts +53 -5
- package/scripts/rules/rule-value-candidates.ts +84 -0
- package/scripts/rules/rule-value-cli.ts +59 -11
- package/scripts/rules/rule-value.ts +17 -4
- package/scripts/rules/run-tail-rule.ts +1 -1
- package/scripts/rules/sed-in-place.ts +196 -0
- package/scripts/rules/shell-segments.ts +10 -2
- package/scripts/rules/stop-rule-rows.ts +1 -13
- package/scripts/rules/stop-rules.ts +33 -58
- package/scripts/rules/test-declared-commit.ts +1 -1
- package/scripts/rules/third-party-write.ts +110 -23
- package/scripts/rules/timed-rerun.ts +1 -1
- package/scripts/rules/turn-filings.ts +90 -0
- package/scripts/rules/worktree-guard.ts +22 -7
- package/scripts/run/board/run-board-ending-reason.ts +6 -2
- package/scripts/run/board/run-board-fit.ts +24 -1
- package/scripts/run/board/run-board-found.ts +134 -0
- package/scripts/run/board/run-board-header.ts +8 -0
- package/scripts/run/board/run-board-labels.ts +11 -1
- package/scripts/run/board/run-board-lane-time.ts +1 -0
- package/scripts/run/board/run-board-link.ts +15 -2
- package/scripts/run/board/run-board-notes.ts +7 -1
- package/scripts/run/board/run-board-operation.ts +4 -2
- package/scripts/run/board/run-board-phase.ts +2 -5
- package/scripts/run/board/run-board-plan.ts +1 -1
- package/scripts/run/board/run-board-read.ts +46 -1
- package/scripts/run/board/run-board-reason.ts +20 -8
- package/scripts/run/board/run-board-render-checks.ts +3 -2
- package/scripts/run/board/run-board-render-drawn.ts +11 -0
- package/scripts/run/board/run-board-render-found.ts +157 -0
- package/scripts/run/board/run-board-render-lead.ts +9 -0
- package/scripts/run/board/run-board-render-legend.ts +19 -0
- package/scripts/run/board/run-board-render-tail.ts +1 -1
- package/scripts/run/board/run-board-render.ts +82 -18
- package/scripts/run/board/run-board-spin.ts +1 -3
- package/scripts/run/board/run-board-status.ts +2 -0
- package/scripts/run/board/run-board-tick.ts +39 -10
- package/scripts/run/carry/run-carry-ended.ts +3 -2
- package/scripts/run/carry/run-carry.ts +3 -2
- package/scripts/run/cut/run-cut-cli.ts +33 -133
- package/scripts/run/cut/run-cut-digest.ts +152 -0
- package/scripts/run/cut/run-cut-handoff.ts +52 -8
- package/scripts/run/cut/run-cut-report.ts +24 -3
- package/scripts/run/cut/run-cut-resume.ts +129 -0
- package/scripts/run/cut/run-cut-review.ts +105 -0
- package/scripts/run/cut/run-cut.ts +18 -7
- package/scripts/run/detached-launch.ts +1 -1
- package/scripts/run/entry/run-entry-cli.ts +88 -19
- package/scripts/run/entry/run-entry-spill.ts +83 -0
- package/scripts/run/entry/run-entry-stop.ts +5 -1
- package/scripts/run/entry/run-entry-trust.ts +91 -0
- package/scripts/run/event/run-event-baseline.ts +56 -0
- package/scripts/run/event/run-event-filed.ts +9 -3
- package/scripts/run/event/run-event-overrun.ts +197 -0
- package/scripts/run/event/run-event-render.ts +4 -0
- package/scripts/run/event/run-event-stream.ts +25 -3
- package/scripts/run/hold/run-stop-notify.ts +3 -8
- package/scripts/run/merge/run-merge-cap.ts +57 -0
- package/scripts/run/merge/run-merge-cli.ts +66 -23
- package/scripts/run/merge/run-merge-outcome.ts +2 -0
- package/scripts/run/merge/run-merge-ship.ts +13 -3
- package/scripts/run/merge/run-merge-signals.ts +40 -23
- package/scripts/run/merge/run-merge-steps.ts +56 -36
- package/scripts/run/merge/run-merge-usage-limit.ts +53 -0
- package/scripts/run/merge/run-merge-withdrawn.ts +53 -0
- package/scripts/run/merge/run-merge.ts +41 -14
- package/scripts/run/review/run-review-cli.ts +306 -20
- package/scripts/run/review/run-review-early-push.ts +121 -0
- package/scripts/run/review/run-review-join-read.ts +94 -0
- package/scripts/run/review/run-review-pinned-accepted.ts +126 -0
- package/scripts/run/review/run-review-pinned-join.ts +216 -0
- package/scripts/run/review/run-review-pinned-steps.ts +383 -0
- package/scripts/run/review/run-review-pinned-tree.ts +37 -0
- package/scripts/run/review/run-review-pinned.ts +53 -0
- package/scripts/run/review/run-review-steps.ts +70 -34
- package/scripts/run/review/run-review.ts +26 -6
- package/scripts/run/run-parent-cut-hook.ts +3 -4
- package/scripts/run/run-prep.ts +1 -0
- package/scripts/run/run-stage-read.ts +2 -6
- package/scripts/run/run-step-cli.ts +17 -5
- package/scripts/run/run-step-lane-plan.ts +27 -0
- package/scripts/run/run-step-section.ts +26 -7
- package/scripts/run/run-step.ts +5 -2
- package/scripts/run/ship/run-ship-args.ts +19 -0
- package/scripts/run/ship/run-ship-brokered-review.ts +106 -0
- package/scripts/run/ship/run-ship-cli.ts +131 -39
- package/scripts/run/ship/run-ship-conflict-probe.ts +59 -0
- package/scripts/run/ship/run-ship-detach.ts +10 -4
- package/scripts/run/ship/run-ship-handover.ts +106 -0
- package/scripts/run/ship/run-ship-infra-retry.ts +16 -1
- package/scripts/run/ship/run-ship-lap.ts +63 -0
- package/scripts/run/ship/run-ship-next.ts +27 -26
- package/scripts/run/ship/run-ship-overlap.ts +8 -3
- package/scripts/run/ship/run-ship-place.ts +9 -2
- package/scripts/run/ship/run-ship-planned.ts +92 -0
- package/scripts/run/ship/run-ship-pre-detach-pinned.ts +197 -0
- package/scripts/run/ship/run-ship-pre-detach-timed.ts +7 -8
- package/scripts/run/ship/run-ship-pre-detach.ts +77 -23
- package/scripts/run/ship/run-ship-preflight.ts +16 -4
- package/scripts/run/ship/run-ship-probe.ts +23 -9
- package/scripts/run/ship/run-ship-relaunch-cap.ts +43 -7
- package/scripts/run/ship/run-ship-relaunch.ts +51 -0
- package/scripts/run/ship/run-ship-return.ts +103 -29
- package/scripts/run/ship/run-ship-review-reason.ts +24 -0
- package/scripts/run/ship/run-ship-review-steps.ts +230 -59
- package/scripts/run/ship/run-ship-review.ts +171 -51
- package/scripts/run/ship/run-ship-reviewer.ts +138 -42
- package/scripts/run/ship/run-ship-scoped.ts +39 -10
- package/scripts/run/ship/run-ship-stage.ts +49 -13
- package/scripts/run/ship/run-ship-steps.ts +24 -4
- package/scripts/run/ship/run-ship-stop-cause.ts +43 -2
- package/scripts/run/ship/run-ship-stop-context.ts +50 -13
- package/scripts/run/ship/run-ship-sync.ts +171 -30
- package/scripts/run/ship/run-ship-synced-scope.ts +178 -0
- package/scripts/run/ship/run-ship-wait-cli.ts +145 -0
- package/scripts/run/ship/run-ship-waiter.ts +114 -0
- package/scripts/run/ship/run-ship.ts +16 -2
- package/scripts/run/wake/run-wake-caffeinate.ts +48 -0
- package/scripts/run/wake/run-wake-cli.ts +6 -113
- package/scripts/run/wake/run-wake-code.ts +53 -11
- package/scripts/run/wake/run-wake-driver.ts +5 -3
- package/scripts/run/wake/run-wake-finish.ts +137 -0
- package/scripts/run/wake/run-wake-loop.ts +5 -3
- package/scripts/run/wake/run-wake-ports.ts +11 -3
- package/scripts/run/wake/run-wake-session.ts +2 -0
- package/scripts/run/wake/run-wake.ts +3 -2
- package/scripts/safe-chain/ci-installer-pin.ts +49 -8
- package/scripts/safe-chain/project-config.ts +3 -2
- package/scripts/security/secretlint-scan.ts +42 -9
- package/scripts/security/security-audit-provision-main.ts +9 -1
- package/scripts/security/security-audit-provision.ts +1 -1
- package/scripts/security/security-audit.ts +21 -1
- package/scripts/security/sonar-file.ts +10 -5
- package/scripts/split/split-assess.ts +12 -3
- package/scripts/split/split-early-notice.ts +116 -0
- package/scripts/split/split-measure.ts +20 -2
- package/scripts/split/split-resolution.ts +107 -0
- package/scripts/test/direct-importers.ts +185 -0
- package/scripts/test/pure-files-entries.ts +83 -0
- package/scripts/test/related-heavy-tests.ts +81 -0
- package/scripts/test/test-no-base.ts +88 -0
- package/scripts/test/test-pinned-cache-logic.ts +363 -0
- package/scripts/test/test-pinned-cache.ts +337 -0
- package/scripts/test/test-pinned-emit.ts +49 -0
- package/scripts/test/test-pinned-functions.ts +116 -0
- package/scripts/test/test-pinned-ledger.ts +80 -0
- package/scripts/test/test-pinned-logic.ts +208 -20
- package/scripts/test/test-pinned-main.ts +84 -18
- package/scripts/test/test-pinned-pool.ts +73 -0
- package/scripts/test/test-pinned-probe.ts +254 -0
- package/scripts/test/test-pinned-prune-logic.ts +118 -0
- package/scripts/test/test-pinned-reach.ts +194 -0
- package/scripts/test/test-pinned-record.ts +196 -0
- package/scripts/test/test-pinned-rewire.ts +148 -0
- package/scripts/test/test-pinned-spawn.ts +81 -0
- package/scripts/test/test-pinned-stage.ts +70 -0
- package/scripts/test/test-pinned.ts +258 -47
- package/scripts/test/test-reach-cli.ts +61 -0
- package/scripts/test/test-read-map.ts +35 -11
- package/scripts/test/test-read-recording.ts +17 -5
- package/scripts/test/test-read-trace.ts +26 -8
- package/scripts/test/test-red-logic.ts +46 -7
- package/scripts/test/test-red.ts +34 -14
- package/scripts/test/test-related-claim.ts +37 -0
- package/scripts/test/test-related-main.ts +4 -1
- package/scripts/test/test-related-moved.ts +91 -0
- package/scripts/test/test-related-record.ts +43 -23
- package/scripts/test/test-related-scope.ts +99 -34
- package/scripts/test/test-related-synced.ts +135 -0
- package/scripts/test/test-related-touched.ts +84 -0
- package/scripts/test/test-related.ts +167 -83
- package/scripts/test/test-unit-guard.ts +28 -5
- package/scripts/test/unit-durations.ts +41 -0
- package/scripts/test/unit-worker-share.ts +5 -4
- package/scripts/test/vitest-cache-directory.ts +19 -0
- package/scripts/test/vitest-cli-excludes.ts +14 -0
- package/scripts/test/vitest-failure-summary.ts +111 -0
- package/scripts/test/whole-suite-files.ts +12 -1
- package/scripts/time-runtime/time-batch-guard.ts +42 -4
- package/scripts/time-runtime/time-bundle-call.ts +1 -1
- package/scripts/time-runtime/time-bundles.ts +36 -5
- package/scripts/time-runtime/time-markers.ts +2 -2
- package/scripts/time-runtime/time-search-call.ts +38 -0
- package/scripts/time-runtime/time-shell.ts +1 -1
- package/scripts/time-runtime/time-transcript-line.ts +17 -5
- package/scripts/version/development-engines-verdict.ts +124 -0
- package/scripts/version/latest-corepack.ts +2 -0
- package/templates/gitignore +2 -0
- package/templates/workflows/ci.yml +41 -0
- package/dist/hooks/chunk-AZX4FGQ3.js +0 -207
- package/dist/hooks/chunk-PT5R6UJD.js +0 -7131
- package/dist/hooks/chunk-TUIFS5E7.js +0 -72
- package/dist/hooks/chunk-YCDOIR3I.js +0 -3456
- package/scripts/cost-runtime/context-cut-threshold.ts +0 -11
- package/scripts/rules/filing-cap.ts +0 -139
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: reviewer-verification
|
|
3
|
+
description: The pre-commit review's round 2 (the verification pass) in one agent — the `reviewer` agent at the verification effort. Dispatch it for the round `pnpm josh review:brief --round 2` describes, with the `model` the brief prints.
|
|
4
|
+
tools: Read, Grep, Glob, Bash, Edit, Write
|
|
5
|
+
model: sonnet
|
|
6
|
+
effort: high
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
You are the review itself, not a launcher of one. The brief you are handed is the whole
|
|
10
|
+
`/code-review` invocation: the level on its first line, the rubric it names, the checkout it pins and
|
|
11
|
+
its `review:attest` step.
|
|
12
|
+
|
|
13
|
+
- Review the diff in this agent, against the rubric the brief names. You carry no `Skill` and no
|
|
14
|
+
`Agent` tool, so the review never forks a second agent that reads the same diff and brief again.
|
|
15
|
+
- Run `pnpm josh review:attest <nonce>` from the checkout the brief pins, as the brief says. Never run
|
|
16
|
+
`pnpm josh review:brief` yourself: a new brief drops the attestation you left.
|
|
17
|
+
- Apply a fix only where the brief's level and your dispatcher ask for one; never commit, stage or push.
|
|
18
|
+
- Return the findings in the rubric's output format; check it first with `pnpm josh review:lint`
|
|
19
|
+
(round 2: `--round 2`; findings on stdin) and fix what it reports.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: reviewer
|
|
3
|
+
description: The pre-commit review in one agent — reads the `pnpm josh review:brief` it is handed, reviews the diff against the rubric the brief names, and runs the brief's `review:attest` step. Dispatch it for the `/code-review` round of `chain-rule.md` step 1, with the `model` the brief prints.
|
|
4
|
+
tools: Read, Grep, Glob, Bash, Edit, Write
|
|
5
|
+
model: opus
|
|
6
|
+
effort: medium
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
You are the review itself, not a launcher of one. The brief you are handed is the whole
|
|
10
|
+
`/code-review` invocation: the level on its first line, the rubric it names, the checkout it pins and
|
|
11
|
+
its `review:attest` step.
|
|
12
|
+
|
|
13
|
+
- Review the diff in this agent, against the rubric the brief names. You carry no `Skill` and no
|
|
14
|
+
`Agent` tool, so the review never forks a second agent that reads the same diff and brief again.
|
|
15
|
+
- Run `pnpm josh review:attest <nonce>` from the checkout the brief pins, as the brief says. Never run
|
|
16
|
+
`pnpm josh review:brief` yourself: a new brief drops the attestation you left.
|
|
17
|
+
- Apply a fix only where the brief's level and your dispatcher ask for one; never commit, stage or push.
|
|
18
|
+
- Return the findings in the rubric's output format; check it first with `pnpm josh review:lint`
|
|
19
|
+
(round 2: `--round 2`; findings on stdin) and fix what it reports.
|
package/.claude/settings.json
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"permissions": {
|
|
3
|
-
"defaultMode": "bypassPermissions",
|
|
4
3
|
"allow": ["Bash(*)"],
|
|
5
4
|
"deny": [
|
|
6
5
|
"Bash(rm -rf *)",
|
|
@@ -54,7 +53,7 @@
|
|
|
54
53
|
"hooks": [
|
|
55
54
|
{
|
|
56
55
|
"type": "command",
|
|
57
|
-
"command": "project_root=\"${CLAUDE_PROJECT_DIR:-$( (unset GIT_ALTERNATE_OBJECT_DIRECTORIES GIT_COMMON_DIR GIT_DIR GIT_INDEX_FILE GIT_NAMESPACE GIT_OBJECT_DIRECTORY GIT_WORK_TREE; git rev-parse --show-toplevel 2>/dev/null) || git rev-parse --show-toplevel)}\" && cd \"$project_root\" && sh scripts/hooks/run-hook.sh audit-provision",
|
|
56
|
+
"command": "export JOSH_HOOK_CWD=\"$PWD\" && project_root=\"${CLAUDE_PROJECT_DIR:-$( (unset GIT_ALTERNATE_OBJECT_DIRECTORIES GIT_COMMON_DIR GIT_DIR GIT_INDEX_FILE GIT_NAMESPACE GIT_OBJECT_DIRECTORY GIT_WORK_TREE; git rev-parse --show-toplevel 2>/dev/null) || git rev-parse --show-toplevel)}\" && cd \"$project_root\" && sh scripts/hooks/run-hook.sh audit-provision --session-start",
|
|
58
57
|
"timeout": 180
|
|
59
58
|
}
|
|
60
59
|
]
|
|
@@ -66,7 +65,7 @@
|
|
|
66
65
|
"hooks": [
|
|
67
66
|
{
|
|
68
67
|
"type": "command",
|
|
69
|
-
"command": "project_root=\"${CLAUDE_PROJECT_DIR:-$( (unset GIT_ALTERNATE_OBJECT_DIRECTORIES GIT_COMMON_DIR GIT_DIR GIT_INDEX_FILE GIT_NAMESPACE GIT_OBJECT_DIRECTORY GIT_WORK_TREE; git rev-parse --show-toplevel 2>/dev/null) || git rev-parse --show-toplevel)}\" && cd \"$project_root\" && sh scripts/hooks/run-hook.sh session-lang",
|
|
68
|
+
"command": "export JOSH_HOOK_CWD=\"$PWD\" && project_root=\"${CLAUDE_PROJECT_DIR:-$( (unset GIT_ALTERNATE_OBJECT_DIRECTORIES GIT_COMMON_DIR GIT_DIR GIT_INDEX_FILE GIT_NAMESPACE GIT_OBJECT_DIRECTORY GIT_WORK_TREE; git rev-parse --show-toplevel 2>/dev/null) || git rev-parse --show-toplevel)}\" && cd \"$project_root\" && sh scripts/hooks/run-hook.sh session-lang",
|
|
70
69
|
"timeout": 10
|
|
71
70
|
}
|
|
72
71
|
]
|
|
@@ -78,7 +77,7 @@
|
|
|
78
77
|
"hooks": [
|
|
79
78
|
{
|
|
80
79
|
"type": "command",
|
|
81
|
-
"command": "project_root=\"${CLAUDE_PROJECT_DIR:-$( (unset GIT_ALTERNATE_OBJECT_DIRECTORIES GIT_COMMON_DIR GIT_DIR GIT_INDEX_FILE GIT_NAMESPACE GIT_OBJECT_DIRECTORY GIT_WORK_TREE; git rev-parse --show-toplevel 2>/dev/null) || git rev-parse --show-toplevel)}\" && cd \"$project_root\" && sh scripts/hooks/run-hook.sh pretool-guard",
|
|
80
|
+
"command": "export JOSH_HOOK_CWD=\"$PWD\" && project_root=\"${CLAUDE_PROJECT_DIR:-$( (unset GIT_ALTERNATE_OBJECT_DIRECTORIES GIT_COMMON_DIR GIT_DIR GIT_INDEX_FILE GIT_NAMESPACE GIT_OBJECT_DIRECTORY GIT_WORK_TREE; git rev-parse --show-toplevel 2>/dev/null) || git rev-parse --show-toplevel)}\" && cd \"$project_root\" && sh scripts/hooks/run-hook.sh pretool-guard",
|
|
82
81
|
"timeout": 20
|
|
83
82
|
}
|
|
84
83
|
]
|
|
@@ -90,7 +89,7 @@
|
|
|
90
89
|
"hooks": [
|
|
91
90
|
{
|
|
92
91
|
"type": "command",
|
|
93
|
-
"command": "project_root=\"${CLAUDE_PROJECT_DIR:-$( (unset GIT_ALTERNATE_OBJECT_DIRECTORIES GIT_COMMON_DIR GIT_DIR GIT_INDEX_FILE GIT_NAMESPACE GIT_OBJECT_DIRECTORY GIT_WORK_TREE; git rev-parse --show-toplevel 2>/dev/null) || git rev-parse --show-toplevel)}\" && cd \"$project_root\" && sh scripts/hooks/run-hook.sh format-edited",
|
|
92
|
+
"command": "export JOSH_HOOK_CWD=\"$PWD\" && project_root=\"${CLAUDE_PROJECT_DIR:-$( (unset GIT_ALTERNATE_OBJECT_DIRECTORIES GIT_COMMON_DIR GIT_DIR GIT_INDEX_FILE GIT_NAMESPACE GIT_OBJECT_DIRECTORY GIT_WORK_TREE; git rev-parse --show-toplevel 2>/dev/null) || git rev-parse --show-toplevel)}\" && cd \"$project_root\" && sh scripts/hooks/run-hook.sh format-edited",
|
|
94
93
|
"timeout": 90
|
|
95
94
|
}
|
|
96
95
|
]
|
|
@@ -102,7 +101,7 @@
|
|
|
102
101
|
"hooks": [
|
|
103
102
|
{
|
|
104
103
|
"type": "command",
|
|
105
|
-
"command": "project_root=\"${CLAUDE_PROJECT_DIR:-$( (unset GIT_ALTERNATE_OBJECT_DIRECTORIES GIT_COMMON_DIR GIT_DIR GIT_INDEX_FILE GIT_NAMESPACE GIT_OBJECT_DIRECTORY GIT_WORK_TREE; git rev-parse --show-toplevel 2>/dev/null) || git rev-parse --show-toplevel)}\" && cd \"$project_root\" && sh scripts/hooks/run-hook.sh stop-guard",
|
|
104
|
+
"command": "export JOSH_HOOK_CWD=\"$PWD\" && project_root=\"${CLAUDE_PROJECT_DIR:-$( (unset GIT_ALTERNATE_OBJECT_DIRECTORIES GIT_COMMON_DIR GIT_DIR GIT_INDEX_FILE GIT_NAMESPACE GIT_OBJECT_DIRECTORY GIT_WORK_TREE; git rev-parse --show-toplevel 2>/dev/null) || git rev-parse --show-toplevel)}\" && cd \"$project_root\" && sh scripts/hooks/run-hook.sh stop-guard",
|
|
106
105
|
"timeout": 20
|
|
107
106
|
}
|
|
108
107
|
]
|
|
@@ -34,16 +34,15 @@ over-bumped entry: restore it immediately, investigate, and report — never kee
|
|
|
34
34
|
|
|
35
35
|
## 3. `devEngines` — the one expected change
|
|
36
36
|
|
|
37
|
-
**
|
|
38
|
-
`
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
the
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
`
|
|
45
|
-
|
|
46
|
-
kept: `josh sync` moving `devEngines.packageManager.onFail` from `"error"` to `"download"`.
|
|
37
|
+
**Read the verdict line, never compare by eye.** `pnpm josh overrides` prints it first, and
|
|
38
|
+
`josh latest` prints it after its pnpm bump — `HEAD`'s `package.json` against the working tree
|
|
39
|
+
(`scripts/version/development-engines-verdict.ts`). Quote it:
|
|
40
|
+
|
|
41
|
+
- `devEngines: unchanged` / `devEngines: kept` — keep. `kept` is the lockstep pnpm bump (the version
|
|
42
|
+
byte-identical to the `packageManager` pin, `+sha512…` suffix included) or `josh sync` moving
|
|
43
|
+
`onFail` from `"error"` to `"download"`.
|
|
44
|
+
- `devEngines: restore (<reason>)` — restore + ask. Also restore when something other than
|
|
45
|
+
`josh latest` / `josh sync` touched it.
|
|
47
46
|
|
|
48
47
|
## 4. When the bump breaks something — fix forward
|
|
49
48
|
|
|
@@ -47,7 +47,7 @@ Each is fetched at its named scope, in the same turn, by the named command that
|
|
|
47
47
|
| ----------------------- | ------------------------------------------------------------------------------ |
|
|
48
48
|
| `latest-gate.md` | `run:prep` answers `latest: required` — before `josh latest:if-required` runs |
|
|
49
49
|
| `followup.md` → "Run `pnpm josh followup`" | Before issuing `pnpm josh followup`, in that same turn |
|
|
50
|
-
| `chain-rule.md` → "Run the review-to-merge chain" | Before the first `pnpm josh gate` launch (`fullrun` / `prrun` / `backlogrun
|
|
50
|
+
| `chain-rule.md` → "Run the review-to-merge chain" | Before the first `pnpm josh gate` launch (`fullrun` / `prrun` / `backlogrun`; a lane child reads "A lane child" alone) — the gate overlaps the review |
|
|
51
51
|
| `background-commands.md` → "Background the gate and push" | Before backgrounding `pnpm josh gate` — the first long-running command a run detaches (`fullrun` / `halfrun` / `prrun` / `backlogrun`) |
|
|
52
52
|
|
|
53
53
|
A `latest: skip` answer reads nothing. **A lane child that parks reads
|
|
@@ -75,7 +75,7 @@ from — read at that trigger, never restated here.
|
|
|
75
75
|
| --- | --- | --- |
|
|
76
76
|
| First call of any entry | `#N`: `pnpm josh run:entry <N> --to <command>` (claims the tree, except `kickoff`); `new` (not `kickoff`): `pnpm josh run:hold`; `busy` / `unknown` stop | `working-tree-hold.md` |
|
|
77
77
|
| `run:entry` prints its stage line | The command sets how far a run goes, the Issue where it starts; **`start: reached` redoes nothing** — stop (at `merged`, the next line answers) | `docs/how-to/run-issues.md` |
|
|
78
|
-
| Same turn as the hold (not a dispatched child, not `kickoff`) | `pnpm josh cost --cut`; `under` continues, `over` stops — `run:entry` notifies and runs `run:release` (by hand for `new`) | `backlogrun-progress.md` → "The hand-off" (
|
|
78
|
+
| Same turn as the hold (not a dispatched child, not `kickoff`) | `pnpm josh cost --cut`; `under` continues, `over` stops — `run:entry` notifies and runs `run:release` (by hand for `new`) | `backlogrun-progress.md` → "The hand-off" (model-priced threshold) |
|
|
79
79
|
| An entry typed with an `owner/repo#` prefix or a short `repo#` name | Resolve the target and its checkout; an explicit foreign owner stops the run | `target-repository.md` |
|
|
80
80
|
| A `new` entry typed with an `into <target>` suffix | Insert the artifact into the named epic with `pnpm josh epic --add <E> <N>` | `into-target.md` |
|
|
81
81
|
| Before any work starts (every entry) | The split assessment; the default is not to split — separability **and** a scope clearly over one gate must hold together; a `fullrun` / `halfrun` that finds a split files the epic and **stops** | `split-assessment.md` → "The question" |
|
|
@@ -85,12 +85,12 @@ from — read at that trigger, never restated here.
|
|
|
85
85
|
| Before delegating any run step | `pnpm josh delegate <step>` decides eligibility, never you | `delegation.md` |
|
|
86
86
|
| The pre-implementation reading reaches 3 unedited files | Delegate the unread investigation; a file this run will edit is read in the main line | `delegation.md` → "The pre-implementation reading" |
|
|
87
87
|
| Immediately before implementation | Present the two-layer work summary (once per Issue); `kickoff` posts a plan instead | `prompts/collaboration-workflow/report-format.md` |
|
|
88
|
-
| While implementing | Re-run one check by name, not the whole gate — `pnpm josh lint:related`, `pnpm josh cspell:dot`, `pnpm josh test:related
|
|
89
|
-
| Implementation is done | Refactor → `
|
|
88
|
+
| While implementing | Re-run one check by name, not the whole gate — `pnpm josh lint:related`, `pnpm josh cspell:dot`, `pnpm josh test:related --touched` (full reach once the implementation is done); `pnpm josh review:brief` refuses a brief on a tree the last two were not green on | `chain-rule.md` |
|
|
89
|
+
| Implementation is done | Refactor → `main:merge` (no lane child) → `pnpm josh gate` beside a subagent `/code-review`, joined before the commit → round cap → PR → merge | `chain-rule.md` → "Run the review-to-merge chain" |
|
|
90
90
|
| A review has run | Its verdict counts only once `pnpm josh review:attest --check` answers `ok`; `missing` / `mismatch` are refusals `pnpm josh followup` blocks the merge on | `chain-rule.md` → "The brief names the checkout, and a review that read another one is refused" |
|
|
91
91
|
| A command can take minutes | Issue it in the background; the turn never ends at the push (`pnpm josh followup` stays foreground) | `background-commands.md` → "Background the gate and push" |
|
|
92
92
|
| E2E gate | The CI E2E job where the command ends in a PR (`fullrun` / `prrun` / `backlogrun`, enforced by `pnpm josh followup`); you run `pnpm josh test:e2e` yourself where it does not (`halfrun`) | `prompts/testing-guide.md` → "Closing the E2E gate without a human run" |
|
|
93
|
-
| Filing any new Issue | `pnpm josh issue:file` — it runs the `issue:scout` scan
|
|
93
|
+
| Filing any new Issue | `pnpm josh issue:file` — it runs the `issue:scout` scan; read its duplicate and epic answers | `issue-scout.md` |
|
|
94
94
|
| Another Issue here must land first | A prerequisite is a dependency, not a park — file it, stash, record the dependency; `fullrun` / `halfrun` stop, `backlogrun` continues | `prerequisite.md` |
|
|
95
95
|
| Something worth filing, none of the three | Unattended: file it (Tier A, first-party); else ask; a delegated child returns it to the parent instead | `observation-filing.md` |
|
|
96
96
|
| A defect in kit's own verification turns up | It runs alone when all three conditions hold; a batch resumes once it merges | `backlogrun-lanes.md` → "A solo run" |
|
|
@@ -98,7 +98,7 @@ from — read at that trigger, never restated here.
|
|
|
98
98
|
| `backlogrun`'s authorization | The whole `auto-ok` opted-in pool as well as its named items; `pnpm josh backlog:next` offers them | `backlogrun.md` |
|
|
99
99
|
| `run:step` prints the retrospective step (a run drained its backlog and stopped, not a lane child) | Run what it prints once, file 0–2 improvements, then `pnpm josh run:carry --retrospective` | `retrospective.md` |
|
|
100
100
|
| Any artifact prose (Issue bodies, comments, Telegram) | Session language (`JOSH_SESSION_LANG`, default `ja`); Issue/PR titles stay English | `prompts/collaboration-workflow/overview.md` |
|
|
101
|
-
| Any mid-workflow stop | `stop:guard` sends the `confirmation` Telegram; on its refusal, send it | `
|
|
101
|
+
| Any mid-workflow stop | `stop:guard` sends the `confirmation` Telegram; on its refusal, send it | `rule-delivery.md` → "stop-notify" |
|
|
102
102
|
|
|
103
103
|
## 3. What stays resident, and what is read from here
|
|
104
104
|
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
- **The clean path folds the region into one backgrounded `pnpm josh ship`** (preflight → gate → `git -y` →
|
|
6
6
|
foreground `followup` → `run:tail`). The calls below serve a due second round.
|
|
7
|
-
- Background `pnpm josh gate` beside the review; join it before commit.
|
|
7
|
+
- Background `pnpm josh gate` beside the review; join it before commit. Also `lint:related` /
|
|
8
|
+
`test:related` / `check:related` / `metrics` with work to overlap: a wait past the 5-min cache TTL
|
|
9
|
+
rewrites the context.
|
|
8
10
|
- Issue `pnpm josh git -y` in the background; its completion resumes the run, so the turn never ends
|
|
9
11
|
at the push.
|
|
10
12
|
- `pnpm josh followup` stays in the foreground (`followup.md`).
|
|
@@ -16,18 +18,19 @@
|
|
|
16
18
|
session-cost check after the merge.
|
|
17
19
|
- A lane child's hand-off or pre-gate cut is the sole turn boundary before the push (`chain-rule.md`).
|
|
18
20
|
|
|
19
|
-
Use harness detachment so completion returns to the run. Foreground timeouts stay within the cap.
|
|
20
|
-
|
|
21
21
|
## How the wait ends — the task's exit, never a regex over its output
|
|
22
22
|
|
|
23
23
|
**Background it from the first, then end the turn.** A `run_in_background` command re-invokes the run
|
|
24
24
|
when it *exits* — that completion notification is what ends the wait, not a regex match or the block
|
|
25
|
-
limit.
|
|
25
|
+
limit. A backgrounded `Agent` → the same; in a lane child → the `lane-background` row of `pnpm josh rule:list`.
|
|
26
26
|
|
|
27
|
-
**Never hand-write a `while`/`until` … `sleep` loop over the output file** — a regex that never matches
|
|
27
|
+
**Never hand-write a `while`/`until` … `sleep` loop over the output file, or a counted `for` that sleeps** — a regex that never matches
|
|
28
28
|
waits to the block limit, one that matches a mid-run line exits early. the `poll-loop` row of `pnpm josh rule:list` refuses it
|
|
29
29
|
(`prompts/collaboration-workflow/rule-delivery.md`).
|
|
30
30
|
|
|
31
|
+
Nor a `sleep` chain followed by a read before the completion notification (`sleep 20; tail …/x.output`,
|
|
32
|
+
`sleep 20; ps -p <pid>`) — the same poll unrolled; the same row refuses it.
|
|
33
|
+
|
|
31
34
|
**To glance at interim output, `Read` the output file once**, never in a sleep loop. CI is waited on by
|
|
32
35
|
`pnpm josh followup`; a progress heartbeat is `run:progress --wait`'s job (`early-heartbeat` refuses a
|
|
33
36
|
hand-armed timer).
|
|
@@ -67,7 +67,7 @@ unit, run the child in the parent's context and still ask the hand-off at every
|
|
|
67
67
|
number, and that it runs as `fullrun #<N>` under that authorization; the unit refuses a brief without
|
|
68
68
|
it.
|
|
69
69
|
- A child whose ship waits on its merge frees its lane — the next child launches beside it, and a
|
|
70
|
-
stop at `followup` relaunches the child
|
|
70
|
+
stop at `followup` relaunches the child at most one lane past the limit: `run-ship-place.ts`.
|
|
71
71
|
|
|
72
72
|
### What the summary carries, and how long it may be
|
|
73
73
|
|
|
@@ -78,6 +78,8 @@ unit, run the child in the parent's context and still ask the hand-off at every
|
|
|
78
78
|
delegated child does not take this route"); decisions not yet logged; what was left undone, on whose
|
|
79
79
|
authority.
|
|
80
80
|
- **Cut**: the changed-file list, per-round review detail, restated rules.
|
|
81
|
+
- Before the final message → `pnpm josh report:lint --child-summary < summary.md` (labels in the
|
|
82
|
+
session language).
|
|
81
83
|
|
|
82
84
|
The person-facing report (`prompts/collaboration-workflow/report-format.md` → 「完了報告(セッション向け)」)
|
|
83
85
|
is unchanged.
|
|
@@ -87,7 +87,7 @@ Everything else is unchanged; `pnpm josh followup` releases the lane's hold at t
|
|
|
87
87
|
**The child is started as a process of its own, not as a subagent of this session** (`lane:dispatch`,
|
|
88
88
|
`lane:launch`'s final step):
|
|
89
89
|
|
|
90
|
-
- **It records where the child writes** — `<
|
|
90
|
+
- **It records where the child writes** — `<common git dir>/josh/run-state/josh-lane-dispatch-<N>-<key>.log`, which survives a reboot.
|
|
91
91
|
- **A refusal is an empty capture beside a non-zero exit**, with a `warning` Telegram. **Park that
|
|
92
92
|
child and name the log the message carries**; never re-dispatch into the same lane without reading it.
|
|
93
93
|
- **A child that started with nowhere to write exits zero and warns** — **wait on that lane with
|
|
@@ -72,7 +72,9 @@ lane:launch <N>`.
|
|
|
72
72
|
|
|
73
73
|
- a design choice nobody has made;
|
|
74
74
|
- a Tier B toss-up, or a Tier C action (`CLAUDE.md` → "Decision autonomy");
|
|
75
|
-
- an upstream defect in another package, whose wait-or-defer is the person's (`upstream-interrupt.md`)
|
|
75
|
+
- an upstream defect in another package, whose wait-or-defer is the person's (`upstream-interrupt.md`);
|
|
76
|
+
- information only the web holds — no lane launches a web tool (`scripts/agent/claude-agent-argv.ts`),
|
|
77
|
+
so a person fetches it.
|
|
76
78
|
|
|
77
79
|
It never carries:
|
|
78
80
|
|
|
@@ -81,7 +83,8 @@ It never carries:
|
|
|
81
83
|
- a wait for the next published release — a dependency, `pnpm josh issue:release <N> --wait`
|
|
82
84
|
(`prerequisite.md`);
|
|
83
85
|
- a defect in the running repository's own run tooling — the run fixes it and resumes
|
|
84
|
-
(`prompts/collaboration-workflow/upstream-interrupt.md` → "実行中のリポジトリ自身のラン機構の不具合")
|
|
86
|
+
(`prompts/collaboration-workflow/upstream-interrupt.md` → "実行中のリポジトリ自身のラン機構の不具合"),
|
|
87
|
+
its filing carrying the `- 原因の park:` line when it parked or stopped an Issue (`issue-template.md` → I);
|
|
85
88
|
- a wait on an open blocker or a start date — `run:merge` releases it (`run-merge-steps.ts`);
|
|
86
89
|
- a mechanical failure — the driver applies `run:stalled` (`RUN_STALLED_LABEL` in `issue-labels.ts`).
|
|
87
90
|
|
|
@@ -44,9 +44,8 @@ summary, and who propagates" below.
|
|
|
44
44
|
**The check is asked at every merge, and delegation does not excuse it** — `pnpm josh cost --cut`
|
|
45
45
|
after every child's merge and `pnpm josh ms`, never wired to `pnpm josh delegate epic-child`. Crossing it **hands the session off to a fresh one,
|
|
46
46
|
carrying the budget** (`backlogrun-steps.md` → "The session cut is inside the invocation"); it is not a
|
|
47
|
-
stop. The threshold is `
|
|
48
|
-
|
|
49
|
-
implementation-phase cut").
|
|
47
|
+
stop. The threshold is the one `pnpm josh cost --cut` prints, priced at the session's model and
|
|
48
|
+
shared by the scheduler entry, hand-off and the lane worker cut (`pre-gate-cut.md` → "The threshold").
|
|
50
49
|
|
|
51
50
|
| It answers | What the run does |
|
|
52
51
|
| --- | --- |
|
|
@@ -44,7 +44,7 @@ On a person's instruction to drop a running child, run `pnpm josh lane:withdraw
|
|
|
44
44
|
|
|
45
45
|
## Conflicts are not predicted
|
|
46
46
|
|
|
47
|
-
**This path is the fallback**: every `fullrun`
|
|
47
|
+
**This path is the fallback**: every `fullrun` merges origin/main ahead of the gate
|
|
48
48
|
(`chain-rule.md` → "origin/main is merged in before the gate"), so it covers an overlap that lands on
|
|
49
49
|
`main` *after* it. **Nothing here forecasts which children will overlap** — a conflicting pull request
|
|
50
50
|
comes back `mergeStateStatus: DIRTY`, which `git-pr-checks-eval.ts` reads as a **failure**, so `pnpm josh
|
|
@@ -26,7 +26,7 @@ judgement** — a Tier B toss-up or a Tier C action inside it; `--no-auto-ok` wi
|
|
|
26
26
|
| --- | --- | --- |
|
|
27
27
|
| `--max` | merges per invocation — a run's own filing competes for it | `run:carry --merged` |
|
|
28
28
|
| `--idle` (8 hours unless typed) | how long the run waits once nothing can proceed | `--active`, the moment its hands became free |
|
|
29
|
-
| **Ten filings per
|
|
29
|
+
| **Ten filings per originating work item** | additions to the pool on **every** filing route (`prerequisite.md`) — `route:tier-a`, `route:interrupt` and a review branch-2 filing are exempt from the depth test (`observation-filing.md`), never from this ceiling | `scripts/issue/issue-file-cap.ts` |
|
|
30
30
|
| The WIP cap on open issues | the pool across invocations | `prompts/collaboration-workflow/wip-cap.md` |
|
|
31
31
|
|
|
32
32
|
**This section is the single source of how the `epic:bundle` obligation and this boundary meet.**
|
|
@@ -39,7 +39,8 @@ runs in a delegated unit"), read back with `pnpm josh issue:state <N>`. `pnpm jo
|
|
|
39
39
|
#N2 …` renders the order (`scripts/backlog/backlog-named.ts`).
|
|
40
40
|
|
|
41
41
|
**A named issue that cannot finish parks, and the rest of the named list is skipped**; the run drains
|
|
42
|
-
the pool and reports what was not started (`backlog_named.after_failure`).
|
|
42
|
+
the pool and reports what was not started (`backlog_named.after_failure`). One already closed or parked
|
|
43
|
+
when offered is booked done alone and skips nothing. A `needs-human-review` named
|
|
43
44
|
issue stops the whole run. **`--only` runs the named list and stops there, draining no pool** — a
|
|
44
45
|
failure ends the run, and `--only` with no named issues is refused (`backlog_named.startup`).
|
|
45
46
|
|
|
@@ -70,7 +70,7 @@ reference is read as a section").
|
|
|
70
70
|
| Guard | Limit | On reaching it |
|
|
71
71
|
| --- | --- | --- |
|
|
72
72
|
| Children per run | 30 | Stop and report; an epic this large should be split. |
|
|
73
|
-
| Issues filed per
|
|
73
|
+
| Issues filed per originating work item | `prerequisite.md`'s cap (`issue:file` refuses the 11th) | Stop and report. |
|
|
74
74
|
| Consecutive child failures | 3 | Stop and report; something is wrong with the environment, not the children. |
|
|
75
75
|
|
|
76
76
|
A failure that is not consecutive parks its child and the run continues.
|
|
@@ -5,48 +5,54 @@
|
|
|
5
5
|
This is the execution contract for `fullrun` and `backlogrun`, and for `prrun` up to the pull request: a `prrun` never issues `pnpm josh ship` or a merging `pnpm josh followup` — it opens the pull request with `pnpm josh git -y` and ends by `prrun.md` → "The difference — the end of the run". The record below is reference only.
|
|
6
6
|
Review results and successful pushes are never turn boundaries.
|
|
7
7
|
|
|
8
|
-
0. **A lane child
|
|
9
|
-
the implementer's self-check"),
|
|
10
|
-
(`report-format.md` → "PR
|
|
11
|
-
"
|
|
12
|
-
`check`
|
|
13
|
-
|
|
14
|
-
`
|
|
8
|
+
0. **A lane child** (no `main:merge`: ship's sync merges main, stopping `conflict`): the self-check (`prompts/review.md` → "Before round 1 —
|
|
9
|
+
the implementer's self-check"), `pnpm josh check:related` (a metrics notice → its verdict line), `pnpm josh run:review` — its `--join`'s `test:pinned` lines
|
|
10
|
+
answer the self-check's question 1 — the ship body draft filled in beside the gate (`report-format.md` → "PR
|
|
11
|
+
本文の受け入れ条件の対応表"), then its `/code-review` subagent (as `run:review` prints) — on two briefs, two `reviewer`s side by side, the second recorded with `review:record --interaction --issue <N>` — not backgrounded — a turn end kills it — then `run:review --join`, `review:attest --check`, the
|
|
12
|
+
round's fixes, no `check:related` after them unless a brief follows (one before `--join` is refused, `round-one-check-related`), `pnpm josh review:record --issue <N> [<finding> ...]` (round 2 stays ship's; it stamps the fixed tree, so ship reuses this round 1 and round 2 reads what moved since, unless round 2 would skip a move — never reopen `run:review`, which refuses it; on `Interaction review now due`, record that pass before the ship, running it first if none ran beside round 1; on `test:pinned restarted`, go on to the ship without waiting — its pre-detach reads that check), `pnpm josh ship --detach --review "<title> #<N>"`
|
|
13
|
+
(`--cite <N>`; `--unpinned-ok "<reason>"` when `run:review` needed it). On `launched` with
|
|
14
|
+
`pnpm josh cost --cut` `under`, run `pnpm josh ship:wait <N>` (`timeout` 600000) and follow
|
|
15
|
+
it (`docs/josh-commands-run.md` → "`josh ship:wait`"); else, or on `busy`, **end the turn**. No `pnpm josh gate`,
|
|
16
|
+
`check:related`, `check` or `metrics` before it or a re-detach, by hand: ship reuses the scoped
|
|
17
|
+
pair green on this tree and base (no fix, main unmoved) and runs the gate after its sync (`scripts/run/ship/run-ship-steps.ts`); a standalone `check` or
|
|
18
|
+
`metrics` leaves no record it reuses. A stop no session waits on relaunches a child
|
|
15
19
|
whose prompt carries the failed output's tail and the changed files (`pnpm josh ship --log <N>` when
|
|
16
|
-
the stage printed nothing)
|
|
17
|
-
the fix — `pnpm josh ship --detach`, `--review` only if the stopped ship carried it and stopped before
|
|
18
|
-
round 2, which is final, or the review went stale (`scripts/run/ship/run-ship-next.ts`)
|
|
19
|
-
|
|
20
|
-
`
|
|
21
|
-
|
|
22
|
-
1. Run `pnpm josh main:merge`. **Then issue `pnpm josh run:cut <N>` alone, before
|
|
20
|
+
the stage printed nothing), on a review stop the sweep of each finding's other sites the stop note
|
|
21
|
+
directs, and (Anthropic lane) the re-detach to run after the fix — `pnpm josh ship --detach`, `--review` only if the stopped ship carried it and stopped before
|
|
22
|
+
round 2, which is final, or the review went stale (`scripts/run/ship/run-ship-next.ts`).
|
|
23
|
+
A preflight stop `unplanned: <files>` → take one of the two ways out it prints, then re-detach
|
|
24
|
+
— unless its `lane:plan` answers `yield` (`docs/josh-commands-run.md` → "`josh ship`").
|
|
25
|
+
`failed` → step 1.
|
|
26
|
+
1. Run `pnpm josh main:merge`. **Then issue `pnpm josh run:cut <N>` alone, before `check:related` and
|
|
23
27
|
the gate** — the pre-gate cut (a no-op outside a lane). Then answer the self-check
|
|
24
|
-
(`prompts/review.md` → "Before round 1 — the implementer's self-check"),
|
|
25
|
-
`
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
(`prompts/review.md` → "Before round 1 — the implementer's self-check"), its question 1 left to
|
|
29
|
+
`run:review --join`, run the final scoped lint/test pair with `pnpm josh check:related` and
|
|
30
|
+
`pnpm josh run:review`: it starts `pnpm josh test:pinned` and `pnpm josh gate` in the background
|
|
31
|
+
and writes the `/code-review` brief to a file, printing its path and prompt, in one call, so they overlap; two briefs take two `reviewer`s side by side, the second recorded with
|
|
32
|
+
`review:record --interaction`. Launch the `/code-review` subagent as the `reviewer`
|
|
33
|
+
agent type (`kit:reviewer` in a consumer) with that prompt verbatim and its `model` — the alias of the `model=` id the brief prints (`claude-opus-5-5` → `opus`)
|
|
34
|
+
(`.claude/agents/reviewer.md`; never a guessed type name).
|
|
29
35
|
Never load the review skill in the main line.
|
|
30
36
|
2. Once the review returns, run `pnpm josh run:review --join` to join and read the gate before
|
|
31
|
-
committing; it exits non-zero on a red gate. Fix any red check, then rerun the affected scoped check
|
|
37
|
+
committing (`--join --fixing` if round 1 has fixes to make); it exits non-zero on a red gate, `3` on an `unpinned` line (its note names the `--unpinned-ok` call). Fix any red check, then rerun the affected scoped check
|
|
32
38
|
and gate. Never version-bump a child (`pnpm josh release` decides).
|
|
33
39
|
3. Before acting on any review round, run `pnpm josh review:attest --check`. `missing` or `mismatch`
|
|
34
40
|
discards it without counting; rerun against the brief's checkout. A review error receives a
|
|
35
41
|
`confirmation` Telegram and stops.
|
|
36
42
|
4. Route the attested verdict mechanically:
|
|
37
43
|
- Clean or Low-only round 1: no second round. Fix, file, or drop each Low with a one-line reason.
|
|
38
|
-
- High/Medium round 1: fix it, then ask `pnpm josh review:round2 --
|
|
39
|
-
|
|
40
|
-
`pnpm josh review:brief --round 2` beside CI.
|
|
44
|
+
- High/Medium round 1: fix and record it (below), then ask `pnpm josh review:round2 --record <N>`
|
|
45
|
+
(it comments a skip). On `required`, open the PR first and run round 2 from
|
|
46
|
+
`pnpm josh review:brief --round 2` beside CI as `reviewer-verification` (`kit:` in a consumer).
|
|
41
47
|
- Round 2 is final. Fix a branch-1 finding, run its scoped check, push it, then run the gate. Dispose
|
|
42
48
|
of remaining non-High findings; a confirmed High blocks and receives a `confirmation` Telegram.
|
|
43
|
-
|
|
49
|
+
Outside step 0, round-1 fixes run one scoped check and the gate before `git -y`.
|
|
44
50
|
Once a round's verdict is attested, record its findings with `pnpm josh review:record --issue <N>
|
|
45
|
-
[<category>:<severity>:<file> ...]`
|
|
51
|
+
['[<disposition> ]<category>:<severity>:<file> — <reason>' ...]` (each one quoted argument; none if
|
|
52
|
+
clean; dispositions: its usage). **A round 2 that
|
|
46
53
|
passes takes `--comment`** (`observation-ledger.md` → "The commit path").
|
|
47
54
|
**`pnpm josh followup` refuses the merge until the round is recorded**
|
|
48
55
|
(`pnpm josh review:record --check --issue <N>`).
|
|
49
|
-
A change to the run tooling also takes the interaction review: `prompts/review.md` → "Interaction review".
|
|
50
56
|
5. **The clean path ships in one call** — with no second round due, background
|
|
51
57
|
`pnpm josh ship "<title> #<N>" --body-file <evidence.md>` — the file carries `## 実機証跡` and
|
|
52
58
|
`## 受け入れ条件の対応` (`report-format.md`), both asked at the preflight: PR preflight → gate → `git -y` →
|
|
@@ -67,17 +73,20 @@ These are the gate → review → PR → merge facts other documents cite; this
|
|
|
67
73
|
|
|
68
74
|
- **The gate runs beside this review, not in front of it** — started with the review, joined before the
|
|
69
75
|
commit. A red gate is fixed and re-run whatever the review concluded.
|
|
70
|
-
- **origin/main is merged in before the gate** — `pnpm josh main:merge` is the last edit, so the scoped
|
|
71
|
-
pair and the gate run once over it; a conflict fires `backlogrun-recovery.md` → "Conflicts are not
|
|
76
|
+
- **origin/main is merged in before the gate** — `pnpm josh main:merge` (in a lane, ship's sync) is the last edit, so the scoped
|
|
77
|
+
pair and the gate run once over it (in a lane, ship's, after `run:review`'s over the unmerged tree); a conflict fires `backlogrun-recovery.md` → "Conflicts are not
|
|
72
78
|
predicted" early. **This is the one place a conflicted merge's procedure is written**: `main:merge`
|
|
73
79
|
refuses when uncommitted changes touch a path the default branch also changed, or the index holds
|
|
74
80
|
unresolved or staged paths — commit first with `pnpm josh git -y`, rerun, and **never stash around the
|
|
75
81
|
merge**. A merge stopped on a conflict: remove the markers, then `pnpm josh git -y` stages the
|
|
76
82
|
resolution and records the merge commit — **Tier A**; a lane child never asks a person for `git add`.
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
83
|
+
A lane child's resolution of ship's `conflict` stop: markers removed → the re-detach the stop
|
|
84
|
+
prints (step 0), which records the merge commit and runs the scoped pair and the gate.
|
|
85
|
+
- **One related-check command answers once per tree** — while implementing re-run one check per edit
|
|
86
|
+
(`lint:related` / `cspell:dot` / `test:related --touched`), one full-reach `test:related` once the
|
|
87
|
+
implementation is done (`docs/josh-commands.md` → "`josh test:related`"), then `pnpm josh check:related` once
|
|
88
|
+
before `run:review`, a review round's fixes once after the last (in a lane, none after `run:review`); `check:related` is those three plus `check`. In kit `lint:related` reports a metrics total past the
|
|
89
|
+
merge-base; accept it with its reason before `pnpm josh ship`, or its pre-detach check stops.
|
|
81
90
|
- **The pull request opens between the rounds, so CI runs beside round 2** — round 1 runs on the
|
|
82
91
|
uncommitted tree and its High/Medium fixes land before the commit; the verification pass runs against
|
|
83
92
|
the open pull request.
|
|
@@ -46,9 +46,10 @@ forecast** — where the guard refuses, not a budget. Brief the unit on what was
|
|
|
46
46
|
**Dispatch the unit as the `investigator` agent** (`kit:investigator` in a consumer) — read-only, on
|
|
47
47
|
the `model` its definition names.
|
|
48
48
|
|
|
49
|
-
**The main line does not idle while the unit reads
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
**The main line does not idle while the unit reads** — the reads of files this run will edit go in
|
|
50
|
+
the same message (the `investigator-foreground` row of `pnpm josh rule:list`); then verify the unit's
|
|
51
|
+
cited lines. Independent investigations launch
|
|
52
|
+
together; a brief that needs another unit's answer waits for that answer.
|
|
52
53
|
|
|
53
54
|
**When the Issue already names the file, function or rule, read that edit target in the main line.**
|
|
54
55
|
It is not `survey`, and it is not `diagnosis`: the unit describes how the subject works;
|
|
@@ -56,6 +57,5 @@ the main line decides what that means and what to change.
|
|
|
56
57
|
|
|
57
58
|
## A `general-purpose` subagent names its model
|
|
58
59
|
|
|
59
|
-
**A `general-purpose` dispatch
|
|
60
|
-
|
|
61
|
-
`agent-model` row of `pnpm josh rule:list`.
|
|
60
|
+
**A `general-purpose` dispatch sets `model`** — `sonnet` for routine work, `opus` for judgment (the
|
|
61
|
+
`agent-model` row of `pnpm josh rule:list`).
|
|
@@ -24,7 +24,7 @@ short-circuits with a non-zero exit. The numbered steps are the detail behind ea
|
|
|
24
24
|
3. **Ask the session boundary in the same turn as the hold** — `pnpm josh cost --cut`. `under`
|
|
25
25
|
continues; `over` (or unanswerable) stops before the title — `run:entry` sends the `confirmation`
|
|
26
26
|
Telegram and runs `run:release` (`stop notified: …`); by hand only for `new`. **Skip it when
|
|
27
|
-
dispatched by a batch** (that batch owns the question). The verdict and the
|
|
27
|
+
dispatched by a batch** (that batch owns the question). The verdict and the model-priced threshold
|
|
28
28
|
are the command's own.
|
|
29
29
|
4. **Gather the mechanical reads — `pnpm josh run:prep <N>`**: `issue:read`'s body and comments
|
|
30
30
|
(`issue-comments.md`), `issue:state`'s state, labels and `human_review`, and `latest:scope`'s
|
|
@@ -54,7 +54,7 @@ lane child starts none and never reads that document (`pnpm josh read:set lane-c
|
|
|
54
54
|
source of the filing, the pause and the epic:bundle branch.
|
|
55
55
|
- **An observation** — `observation-filing.md` (ask first if interactive).
|
|
56
56
|
|
|
57
|
-
**The per-
|
|
57
|
+
**The per-origin filing cap is `prerequisite.md`'s** (`issue:file`'s own step); on its refusal, stop and report.
|
|
58
58
|
|
|
59
59
|
**The `into <target>` suffix** (a `new` entry) inserts the artifact into a named epic —
|
|
60
60
|
`into-target.md`, read when the suffix is typed.
|
|
@@ -22,15 +22,17 @@ request already merged by hand** (a `prrun` stop) runs only the post-merge tail;
|
|
|
22
22
|
Issue is not posted twice, so re-running is safe. Keep the default Issue target. Ignore a finding only
|
|
23
23
|
after verifying it is inapplicable; rate-limit text is not a finding.
|
|
24
24
|
|
|
25
|
-
**A red rate-limited CodeRabbit check is cleared by a retrigger, not a bypass.**
|
|
26
|
-
window
|
|
27
|
-
|
|
28
|
-
again.
|
|
25
|
+
**A red rate-limited CodeRabbit check is cleared by a retrigger, not a bypass.** `followup` waits
|
|
26
|
+
out the window (≤30 min) and posts `@coderabbitai review` once per pull request. On its
|
|
27
|
+
no-retrigger note, do that and rerun `followup`. Bypassing a second rate limit is Tier C.
|
|
29
28
|
|
|
30
29
|
A pre-merge failure stops the run; an unverifiable AI finding or CI failure needing input sends a
|
|
31
30
|
`confirmation` Telegram. A post-merge cleanup failure is named and does not undo the merge; run the
|
|
32
31
|
named recovery without rerunning `followup`. The printed result is authoritative.
|
|
33
32
|
|
|
33
|
+
A CI job red only on tests outside the change → `followup` reruns it once, after ship's main merge
|
|
34
|
+
when main moved a failed test (`scripts/followup/followup-main-move.ts`).
|
|
35
|
+
|
|
34
36
|
After the merge `run:tail` returns to the default branch — `ship` runs it; after a bare `followup`, run
|
|
35
37
|
`pnpm josh run:tail <N>`. In a lane the parent uses `pnpm josh lane:close <N>`. Never delete the branch unless requested. The sections below are read when the output needs reading.
|
|
36
38
|
|
|
@@ -56,7 +58,7 @@ Invoking `fullrun` is itself the explicit authorization to merge.
|
|
|
56
58
|
reflexively: a SHA pin flagged "not matching the tag" is checked with `gh api
|
|
57
59
|
repos/<owner>/<repo>/commits/<tag> --jq '.sha'`, and the bypass cites that command.
|
|
58
60
|
- **The merge is `followup`'s, not yours** — `.claude/settings.json` refuses `gh pr merge` and its
|
|
59
|
-
`gh api` spellings (`
|
|
61
|
+
`gh api` spellings (`operating-rules.md` → "git-rules"). Do **not** pass `--delete-branch` unless asked.
|
|
60
62
|
- **A failed merge** (branch protection, a conflict) is reported and stops the run — never retried with
|
|
61
63
|
other flags. To skip the merge, use `kickoff` or say "do not merge" in the same turn and pass
|
|
62
64
|
`--no-merge`.
|
|
@@ -11,13 +11,13 @@ File Issues with `pnpm josh issue:file` (it applies the classification labels);
|
|
|
11
11
|
budget allowed the run, and `run:release <N>` takes it back off.
|
|
12
12
|
2. Read the Issue and its comments off `run:entry`'s `run:prep` report (`issue-comments.md`).
|
|
13
13
|
3. **Record the agreed plan** with `pnpm josh issue:plan <N> --body-file <path>`, adding
|
|
14
|
-
`--title "<title>"` when the title is not in English or can be phrased more clearly (
|
|
15
|
-
|
|
16
|
-
with `pnpm josh plan:consumers` — `kickoff.md` step 4).
|
|
14
|
+
`--title "<title>"` when the title is not in English or can be phrased more clearly (the plan goes
|
|
15
|
+
into the body when it is blank and its author has write access, otherwise into a comment; its
|
|
16
|
+
`### 影響を受ける既存の利用者` section is drafted with `pnpm josh plan:consumers` — `kickoff.md` step 4).
|
|
17
17
|
4. Run `pnpm josh ms`, then update dependencies only where the `run:prep` report answers
|
|
18
18
|
`latest: required` — `latest-gate.md` is its single source, and on `required` load the
|
|
19
19
|
`dependency-update` skill afterwards. **A dispatched lane child skips `pnpm josh ms`** — it refuses
|
|
20
|
-
in a lane, and
|
|
20
|
+
in a lane, and ship's sync brings the latest default in before its gate. The parent runs
|
|
21
21
|
`pnpm josh ms` in the primary checkout, never the child — `backlogrun-lanes.md` and
|
|
22
22
|
`backlogrun-child.md` are the single sources.
|
|
23
23
|
5. Implement. The `plan` event `run:board` draws 📝 from is written by code — by `run:entry` for a
|
|
@@ -48,8 +48,8 @@ in the session language: `pnpm josh issue:plan <N> --body-file <path>` (its cons
|
|
|
48
48
|
`pnpm josh run:prep <N>`; on `latest: required` run `pnpm josh latest:if-required` and load the `dependency-update`
|
|
49
49
|
skill; on `skip` neither runs (`latest-gate.md` is the single source). If (5) answered `stashed`,
|
|
50
50
|
`pnpm josh stash:pop "fullrun new: pre-existing changes"`. (8) Implement. (9) Run the verification gate (as in `chain-rule.md`; only the first review round
|
|
51
|
-
runs here). (9a) **Ask `pnpm josh review:round2 --
|
|
52
|
-
round 1
|
|
51
|
+
runs here). (9a) **Ask `pnpm josh review:round2 --record <N>` whether a second round is due**, once
|
|
52
|
+
round 1 is fixed and recorded, before the commit. (10) Where the tree was edited after the first gate
|
|
53
53
|
started, re-run `pnpm josh gate` and join it. (11) `pnpm josh git -y "<title> #<N>"` — the pull request
|
|
54
54
|
opens here, between the two rounds. (11a) Run the **second round** now beside the CI, where (9a)
|
|
55
55
|
answered `required` (brief `pnpm josh review:brief --round 2`); a finding it fixes in place is pushed
|
|
@@ -17,7 +17,7 @@ run's next single action. `chain-rule.md`, `followup.md`, `background-commands.m
|
|
|
17
17
|
|
|
18
18
|
- **A lane child asks whether it is a resume first — `pnpm josh run:cut --resume <N>`** (`run:entry` asks it
|
|
19
19
|
before the hold); on `resume` it skips the title, plan, hold and implementation and goes to the gate. At the pre-gate
|
|
20
|
-
boundary —
|
|
20
|
+
boundary of `chain-rule.md` step 1 — step 0's ship fallen through, before the gate — it takes the cut with
|
|
21
21
|
`pnpm josh run:cut <N>` (the ordered step in `chain-rule.md`, which names the cut's single source),
|
|
22
22
|
and it records any park on the Issue before the stop notify. A run that is not a lane child never
|
|
23
23
|
reads the cut's document.
|
|
@@ -8,12 +8,17 @@ turn as whatever else the run needs:
|
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
pnpm josh issue:read <N> [<N> ...] # body and comments, one call per batch
|
|
11
|
-
gh api repos
|
|
11
|
+
gh api repos/<owner>/<repo>/issues/<N>/comments --jq '.[] | {user: .user.login, created_at, body}'
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
**Type the first line**; it **says when a comment listing could not be read rather than showing no
|
|
15
|
-
comments**. The `gh api` form is
|
|
16
|
-
|
|
15
|
+
comments**. The `gh api` form is **cross-repository only** (the command takes no `--repo`); a read
|
|
16
|
+
of this repository's Issue, its comments or its timeline — `repos/{owner}/…` or the repository
|
|
17
|
+
spelled out, and `gh issue view` — is refused (`pnpm josh rule:list` → `direct-issue-read`).
|
|
18
|
+
|
|
19
|
+
An Issue whose author has no write access stops at `run:entry` until a person with write access
|
|
20
|
+
plans it with `kickoff #N`; the run then follows that plan (`scripts/run/entry/run-entry-trust.ts`).
|
|
21
|
+
A trust read that failed stops there too, naming the failed read.
|
|
17
22
|
|
|
18
23
|
**This repository writes its agreements into comments and then reads only bodies.** **What the
|
|
19
24
|
reading is for**: the scope boundary — work a comment moved elsewhere or added here; an auto-decision
|
|
@@ -83,4 +88,4 @@ and refuses every other body-only read; the Codex adapter refuses them all** (`p
|
|
|
83
88
|
## A person's update mid-run
|
|
84
89
|
|
|
85
90
|
When the hook, `review:attest --check` or `followup` shows an Issue update, read it as above, fix what it
|
|
86
|
-
changes, then `pnpm josh issue:ack <N>`. The watch: `docs/josh-commands-backlog.md` → "`josh issue:ack`".
|
|
91
|
+
changes, then `pnpm josh issue:ack <N>`. A withheld-body notice (author without write access) needs no ack. The watch: `docs/josh-commands-backlog.md` → "`josh issue:ack`".
|
|
@@ -21,7 +21,8 @@ pnpm josh issue:fold-existing assessment.json --json > result.json
|
|
|
21
21
|
jq -e '.verdict == "fold"' result.json
|
|
22
22
|
jq '{body: .body}' result.json > patch.json
|
|
23
23
|
gh api -X PATCH repos/{owner}/{repo}/issues/<N> --input patch.json
|
|
24
|
+
pnpm josh issue:priority <N>
|
|
24
25
|
pnpm josh issue:read <N>
|
|
25
26
|
```
|
|
26
27
|
|
|
27
|
-
Re-read it and confirm the original requirements, the decisions recorded in comments, the added requirements and the verification all remain. A failed write or re-read means the fold is not complete. A fold never creates a new Issue. `separate` returns to the ordinary filing path, and `inspect` re-reads the missing information.
|
|
28
|
+
A body edit applies no label: `pnpm josh issue:priority <N>` applies the body's floor (`issue-template.md` → F). Re-read it and confirm the original requirements, the decisions recorded in comments, the added requirements and the verification all remain. A failed write or re-read means the fold is not complete. A fold never creates a new Issue. `separate` returns to the ordinary filing path, and `inspect` re-reads the missing information.
|