@joshuafolkken/kit 1.1455.0 → 1.1514.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.json +6 -6
- package/.claude/skills/dependency-update/SKILL.md +26 -55
- package/.claude/skills/epic-commands/SKILL.md +83 -156
- package/.claude/skills/epic-commands/epic-bundle.md +51 -79
- package/.claude/skills/epic-commands/execution-waves.md +43 -81
- package/.claude/skills/verify-ui/SKILL.md +24 -50
- package/.claude/skills/workflow-commands/SKILL.md +7 -9
- package/.claude/skills/workflow-commands/background-commands.md +31 -46
- package/.claude/skills/workflow-commands/backlogrun-child.md +65 -85
- package/.claude/skills/workflow-commands/backlogrun-lanes.md +86 -125
- package/.claude/skills/workflow-commands/backlogrun-park.md +68 -118
- package/.claude/skills/workflow-commands/backlogrun-progress.md +17 -28
- package/.claude/skills/workflow-commands/backlogrun-recovery.md +17 -26
- package/.claude/skills/workflow-commands/backlogrun-steps.md +35 -52
- package/.claude/skills/workflow-commands/backlogrun.md +31 -50
- package/.claude/skills/workflow-commands/chain-rule.md +31 -40
- package/.claude/skills/workflow-commands/delegation.md +12 -8
- package/.claude/skills/workflow-commands/entry-sequence.md +1 -3
- package/.claude/skills/workflow-commands/followup.md +55 -77
- package/.claude/skills/workflow-commands/fullrun-steps.md +3 -5
- package/.claude/skills/workflow-commands/fullrun.md +4 -6
- package/.claude/skills/workflow-commands/halfrun.md +3 -7
- package/.claude/skills/workflow-commands/into-target.md +1 -2
- package/.claude/skills/workflow-commands/issue-comments.md +43 -60
- package/.claude/skills/workflow-commands/issue-scout.md +3 -2
- package/.claude/skills/workflow-commands/kickoff.md +65 -74
- package/.claude/skills/workflow-commands/latest-gate.md +2 -6
- package/.claude/skills/workflow-commands/needs-human-review.md +2 -5
- package/.claude/skills/workflow-commands/observation-filing.md +59 -118
- package/.claude/skills/workflow-commands/observation-ledger.md +52 -112
- package/.claude/skills/workflow-commands/pre-gate-cut.md +88 -142
- package/.claude/skills/workflow-commands/prerequisite.md +11 -17
- package/.claude/skills/workflow-commands/progress-watcher.md +23 -33
- package/.claude/skills/workflow-commands/prrun.md +3 -5
- package/.claude/skills/workflow-commands/retrospective.md +35 -54
- package/.claude/skills/workflow-commands/split-assessment.md +32 -58
- package/.claude/skills/workflow-commands/target-repository.md +1 -2
- package/.claude/skills/workflow-commands/working-tree-hold.md +54 -73
- package/.codex/hooks.json +6 -6
- package/.github/actions/setup-node/action.yml +1 -1
- package/.github/workflows/ci.yml +1 -1
- package/.github/workflows/publish.yml +2 -2
- package/CLAUDE.md +7 -6
- package/cspell/index.yaml +7 -0
- package/dist/CLAUDE.md +7 -6
- package/dist/commands/document-section-cli.js +67 -34
- package/dist/hooks/batch-guard.js +6 -6
- package/dist/hooks/chunk-4KKD2UTK.js +66 -0
- package/dist/hooks/{chunk-GPLGZ6IC.js → chunk-6TS2JD6D.js} +14 -3
- package/dist/hooks/chunk-7DSBJVFH.js +50 -0
- package/dist/hooks/{chunk-5H4SSDSD.js → chunk-A65Y4YOR.js} +3 -3
- package/dist/hooks/{chunk-3C4XRYG6.js → chunk-APUO6U4J.js} +102 -19
- package/dist/hooks/{chunk-IX6TTTI6.js → chunk-EFXE6C37.js} +8 -22
- package/dist/hooks/chunk-GP4IEC4O.js +20 -0
- package/dist/hooks/chunk-JP45SOCJ.js +56 -0
- package/dist/hooks/{chunk-OLMO72ON.js → chunk-LAOV7NLM.js} +1 -1
- package/dist/hooks/chunk-M4HGZV7U.js +83 -0
- package/dist/hooks/{chunk-TBJFTSUY.js → chunk-O6GDRNJB.js} +9 -7
- package/dist/hooks/{chunk-HFGWYGUV.js → chunk-PF2NZL2A.js} +5 -5
- package/dist/hooks/{chunk-WNLVGT7E.js → chunk-PTICX4OL.js} +4 -5
- package/dist/hooks/{chunk-HHI6FO3R.js → chunk-RT27QRJW.js} +763 -1515
- package/dist/hooks/{chunk-7WQBPLUN.js → chunk-SYOTDYCI.js} +1149 -1095
- package/dist/hooks/{chunk-LIAFCXL7.js → chunk-TNUMY6NL.js} +1519 -1332
- package/dist/hooks/chunk-UPUZF3AN.js +279 -0
- package/dist/hooks/{chunk-Z4XI7CZS.js → chunk-WK6SMBIC.js} +1932 -784
- package/dist/hooks/codex-hook-adapter.js +17 -14
- package/dist/hooks/duplicate-read-guard.js +7 -7
- package/dist/hooks/format-edited.js +5 -4
- package/dist/hooks/inputs.json +302 -247
- package/dist/hooks/investigation-guard.js +8 -11
- package/dist/hooks/pretool-guard.js +16 -13
- package/dist/hooks/session-lang.js +372 -26
- package/dist/hooks/stop-guard.js +2593 -189
- package/dist/josh.js +2128 -282
- package/dist/managed-marker/index.js +1 -2
- package/dist/version/index.js +15 -12
- package/eslint/base.js +2 -1
- package/eslint/rules/unicorn.js +16 -0
- package/lefthook/base.yml +5 -3
- package/package.json +14 -12
- package/prompts/coding-standards.md +12 -22
- package/prompts/collaboration-workflow/file-edits.md +25 -45
- package/prompts/collaboration-workflow/gh-rest.md +19 -36
- package/prompts/collaboration-workflow/glossary.md +5 -7
- package/prompts/collaboration-workflow/issue-citation.md +6 -14
- package/prompts/collaboration-workflow/issue-template.md +40 -32
- package/prompts/collaboration-workflow/lane-instructions.md +35 -0
- package/prompts/collaboration-workflow/operating-rules.md +33 -46
- package/prompts/collaboration-workflow/output-bounds.md +15 -15
- package/prompts/collaboration-workflow/overview.md +14 -19
- package/prompts/collaboration-workflow/plan-comment.md +13 -13
- package/prompts/collaboration-workflow/principles.md +57 -54
- package/prompts/collaboration-workflow/proposal-request.md +1 -9
- package/prompts/collaboration-workflow/report-format.md +41 -49
- package/prompts/collaboration-workflow/residency.md +15 -11
- package/prompts/collaboration-workflow/rule-delivery.md +7 -15
- package/prompts/collaboration-workflow/shell-body.md +10 -20
- package/prompts/collaboration-workflow/turn-batching.md +8 -14
- package/prompts/collaboration-workflow/upstream-interrupt.md +26 -34
- package/prompts/collaboration-workflow/wip-cap.md +26 -32
- package/prompts/collaboration-workflow.md +25 -25
- package/prompts/refactoring.md +33 -43
- package/prompts/review-rubric.md +84 -129
- package/prompts/review.md +110 -141
- package/prompts/sonar-hotspot-handling.md +22 -50
- package/prompts/testing-guide.md +48 -99
- package/scripts/adopt/adopt-toolkits.ts +2 -4
- package/scripts/agent/agent-argv.ts +20 -4
- package/scripts/agent/agent-exit-record.ts +23 -1
- package/scripts/agent/agent-role-profile.ts +101 -45
- package/scripts/agent/agent-safe-text.ts +60 -0
- package/scripts/agent/claude-agent-argv.ts +14 -0
- package/scripts/agent/codex-agent-argv.ts +9 -2
- package/scripts/agent/lane-instructions.ts +144 -0
- package/scripts/backlog/backlog-budget-cli.ts +1 -2
- package/scripts/backlog/backlog-budget.ts +4 -4
- package/scripts/backlog/backlog-drive-carried.ts +26 -0
- package/scripts/backlog/backlog-drive-cli.ts +10 -5
- package/scripts/backlog/backlog-drive-named.ts +3 -5
- package/scripts/backlog/backlog-drive-restore.ts +28 -2
- package/scripts/backlog/backlog-drive-seats.ts +27 -0
- package/scripts/backlog/backlog-drive.ts +11 -6
- package/scripts/backlog/backlog-occupied.ts +56 -0
- package/scripts/backlog/backlog-ready.ts +59 -15
- package/scripts/behavior/behavior-rules.ts +3 -2
- package/scripts/cost-runtime/codex-usage.ts +4 -2
- package/scripts/cost-runtime/cost-cli.ts +1 -2
- package/scripts/delegation/duplicate-read-guard.ts +2 -2
- package/scripts/delegation/investigation-guard.ts +15 -65
- package/scripts/delegation/investigation-reads.ts +1 -2
- package/scripts/discovery/repo-discovery.ts +4 -2
- package/scripts/discovery/repo-origin.ts +2 -4
- package/scripts/doctor/doctor-logic.ts +6 -3
- package/scripts/document/document-byte-budget.ts +28 -27
- package/scripts/document/document-byte-check.ts +1 -2
- package/scripts/document/document-section-cli.ts +17 -5
- package/scripts/document/entry-read-budget.ts +3 -3
- package/scripts/document/read-set-cli.ts +4 -1
- package/scripts/epic/epic-audit-orphans.ts +5 -8
- package/scripts/epic/epic-audit-rationale.ts +8 -2
- package/scripts/epic/epic-audit.ts +52 -1
- package/scripts/epic/epic-bundle-cli.ts +1 -2
- package/scripts/epic/epic-bundle-evidence.ts +49 -26
- package/scripts/epic/epic-bundle-referenced.ts +14 -3
- package/scripts/epic/epic-bundle.ts +17 -9
- package/scripts/epic/epic-chains.ts +6 -2
- package/scripts/epic/epic-close-comment.ts +1 -2
- package/scripts/followup/git-followup-workflow.ts +19 -1
- package/scripts/gate/check-inputs.ts +129 -0
- package/scripts/gate/check-reuse.ts +162 -0
- package/scripts/gate/core-budget.ts +93 -44
- package/scripts/gate/core-wait.ts +130 -0
- package/scripts/gate/free-cores.ts +49 -0
- package/scripts/gate/gate-ledger.ts +17 -3
- package/scripts/gate/gate-plan.ts +23 -1
- package/scripts/gate/gate-report.ts +15 -2
- package/scripts/gate/gate-run-steps.ts +150 -0
- package/scripts/gate/held-mark.ts +55 -0
- package/scripts/gate/machine-capacity.ts +70 -11
- package/scripts/gate/pre-commit-type-check.ts +14 -1
- package/scripts/gate/verification-gate.ts +65 -127
- package/scripts/gh/git-gh-issue-rest.ts +1 -0
- package/scripts/gh/git-gh-issue-write.ts +24 -2
- package/scripts/gh/git-pr.ts +19 -3
- package/scripts/git/git-common-directory.ts +3 -3
- package/scripts/git/git-diff-reads.ts +16 -9
- package/scripts/git/git-execa-error.ts +1 -2
- package/scripts/git/main-merge-regenerate.ts +78 -0
- package/scripts/git/main-merge.ts +14 -5
- package/scripts/hooks/batch-guard.ts +5 -8
- package/scripts/hooks/format-edited-file.ts +10 -4
- package/scripts/hooks/pre-commit-lint.ts +91 -0
- package/scripts/hooks/pre-push-unit.ts +15 -4
- package/scripts/hooks/pretool-guard.ts +48 -79
- package/scripts/hooks/reserved-run.ts +1 -0
- package/scripts/hooks/run-hook.sh +10 -12
- package/scripts/hooks/step-zero-notice.ts +3 -2
- package/scripts/hooks/stop-actions.ts +204 -0
- package/scripts/hooks/stop-guard.ts +62 -21
- package/scripts/init/hook-command-rewrite.ts +6 -2
- package/scripts/init/hook-launch.ts +12 -7
- package/scripts/init/init-logic-deploy-vps.ts +4 -2
- package/scripts/issue/behavior-change-lint.ts +12 -6
- package/scripts/issue/expected-effect-lint.ts +59 -0
- package/scripts/issue/issue-cite-cli.ts +35 -15
- package/scripts/issue/issue-classification.ts +1 -1
- package/scripts/issue/issue-lint-cli.ts +5 -3
- package/scripts/issue/issue-scout-cli.ts +22 -16
- package/scripts/issue/markdown-section.ts +19 -5
- package/scripts/josh/command-usage.ts +110 -0
- package/scripts/josh/file-map-stamp.ts +1 -3
- package/scripts/josh/hook-decision.ts +17 -2
- package/scripts/josh/josh-command-map.ts +2 -0
- package/scripts/josh/josh-command-types.ts +55 -9
- package/scripts/josh/josh-commands-ai.ts +13 -0
- package/scripts/josh/josh-commands-development.ts +1 -1
- package/scripts/josh/josh-commands-hooks.ts +6 -0
- package/scripts/josh/josh-commands-lane.ts +10 -1
- package/scripts/josh/josh-commands-workflow.ts +5 -0
- package/scripts/josh/josh-logic.ts +6 -15
- package/scripts/josh/josh-usage-automation.ts +121 -0
- package/scripts/josh/josh-usage-backlog.ts +180 -0
- package/scripts/josh/josh-usage-developer.ts +230 -0
- package/scripts/josh/josh-usage-hooks.ts +38 -0
- package/scripts/josh/josh-usage-issue.ts +205 -0
- package/scripts/josh/josh-usage-review.ts +101 -0
- package/scripts/josh/josh-usage-run.ts +252 -0
- package/scripts/josh/josh-usage-session.ts +238 -0
- package/scripts/josh/josh-usage-workflow.ts +212 -0
- package/scripts/josh/josh.ts +14 -5
- package/scripts/josh/package-directory.ts +20 -0
- package/scripts/lane/lane-await.ts +3 -2
- package/scripts/lane/lane-capacity.ts +8 -2
- package/scripts/lane/lane-check-stats.ts +56 -0
- package/scripts/lane/lane-child-invocation.ts +49 -5
- package/scripts/lane/lane-dispatch.ts +3 -3
- package/scripts/lane/lane-guard-policy.ts +5 -5
- package/scripts/lane/lane-handoff.ts +8 -1
- package/scripts/lane/lane-install.ts +12 -4
- package/scripts/lane/lane-ledger.ts +52 -1
- package/scripts/lane/lane-limit-cli.ts +8 -9
- package/scripts/lane/lane-load.ts +9 -2
- package/scripts/lane/lane-measure-cli.ts +4 -0
- package/scripts/lane/lane-parked.ts +18 -0
- package/scripts/lane/lane-preserve.ts +29 -1
- package/scripts/lane/lane-process-load.ts +125 -0
- package/scripts/lane/lane-process-stats.ts +93 -0
- package/scripts/lane/lane-registry.ts +17 -10
- package/scripts/lane/lane-restart.ts +5 -26
- package/scripts/lane/lane-session-action.ts +146 -0
- package/scripts/lane/lane-session-broker.ts +68 -125
- package/scripts/lane/lane-spent.ts +14 -3
- package/scripts/lane/lane-stats.ts +1 -0
- package/scripts/lane/lane-withdraw-cli.ts +71 -0
- package/scripts/lane/lane-withdraw.ts +182 -0
- package/scripts/lint/format.ts +4 -4
- package/scripts/lint/lint-parallel.ts +10 -3
- package/scripts/lint/lint-related-scope.ts +4 -1
- package/scripts/managed-marker/managed-marker-logic.ts +1 -2
- package/scripts/notify/telegram-test.ts +10 -5
- package/scripts/overrides/lockfile-overrides.ts +1 -3
- package/scripts/propagate/propagate.ts +1 -2
- package/scripts/release/release-progress.ts +3 -2
- package/scripts/report/report-format-reference.ts +2 -0
- package/scripts/report/report-lint.ts +7 -4
- package/scripts/review/acceptance-map-check.ts +61 -0
- package/scripts/review/acceptance-map.ts +205 -0
- package/scripts/review/review-brief-cli.ts +1 -1
- package/scripts/review/review-record-cli.ts +6 -2
- package/scripts/rules/agent-model.ts +59 -0
- package/scripts/rules/delivered-rules.ts +11 -2
- package/scripts/rules/destructive-command.ts +6 -9
- package/scripts/rules/direct-filing.ts +3 -7
- package/scripts/rules/early-heartbeat.ts +7 -18
- package/scripts/rules/file-body.ts +6 -13
- package/scripts/rules/filing-cap.ts +4 -6
- package/scripts/rules/firing-point.ts +6 -5
- package/scripts/rules/git-force.ts +5 -9
- package/scripts/rules/guard-remedy.ts +117 -0
- package/scripts/rules/implementation-cut.ts +37 -35
- package/scripts/rules/index-guard.ts +4 -7
- package/scripts/rules/issue-comments.ts +67 -16
- package/scripts/rules/josh-git-bare.ts +3 -6
- package/scripts/rules/lane-background.ts +10 -21
- package/scripts/rules/lane-carry-conflict.ts +7 -17
- package/scripts/rules/lane-interactive-ask.ts +6 -11
- package/scripts/rules/lane-park.ts +5 -13
- package/scripts/rules/lane-split-park.ts +2 -7
- package/scripts/rules/lane-switch-main.ts +9 -12
- package/scripts/rules/last-prompt.ts +50 -5
- package/scripts/rules/oracle-consulted.ts +4 -5
- package/scripts/rules/oracle-list-cli.ts +7 -0
- package/scripts/rules/piped-verification.ts +84 -32
- package/scripts/rules/poll-loop.ts +7 -17
- package/scripts/rules/pre-gate-cut.ts +7 -21
- package/scripts/rules/prior-comment-read.ts +7 -5
- package/scripts/rules/protected-files.ts +5 -9
- package/scripts/rules/raw-field-body.ts +3 -7
- package/scripts/rules/rule-body-guard.ts +4 -11
- package/scripts/rules/rule-list.ts +4 -1
- package/scripts/rules/rule-registry-rows.ts +10 -0
- package/scripts/rules/rule-registry.ts +7 -4
- package/scripts/rules/rule-rewrite.ts +114 -0
- package/scripts/rules/rule-value.ts +7 -1
- package/scripts/rules/run-tail-rule.ts +6 -22
- package/scripts/rules/shell-body-trigger.ts +4 -6
- package/scripts/rules/shell-segments.ts +22 -0
- package/scripts/rules/stop-decision.ts +77 -0
- package/scripts/rules/stop-rules.ts +164 -77
- package/scripts/rules/tail-commands.ts +15 -1
- package/scripts/rules/test-declared-commit.ts +4 -10
- package/scripts/rules/third-party-write.ts +5 -10
- package/scripts/rules/worktree-guard.ts +5 -12
- package/scripts/run/board/run-board-cli.ts +2 -0
- package/scripts/run/board/run-board-closed.ts +8 -2
- package/scripts/run/board/run-board-github.ts +19 -3
- package/scripts/run/board/run-board-header.ts +4 -1
- package/scripts/run/board/run-board-idle.ts +31 -0
- package/scripts/run/board/run-board-labels.ts +2 -0
- package/scripts/run/board/run-board-layout.ts +1 -1
- package/scripts/run/board/run-board-read.ts +25 -12
- package/scripts/run/board/run-board-reason.ts +17 -4
- package/scripts/run/board/run-board-render-legend.ts +1 -0
- package/scripts/run/board/run-board-render-slot.ts +1 -1
- package/scripts/run/board/run-board-render-waits.ts +41 -0
- package/scripts/run/board/run-board-render.ts +6 -1
- package/scripts/run/board/run-board-row-yield.ts +1 -0
- package/scripts/run/board/run-board-state.ts +9 -0
- package/scripts/run/board/run-board-status.ts +89 -23
- package/scripts/run/board/run-board-thanks.ts +7 -2
- package/scripts/run/board/run-board-tick.ts +37 -8
- package/scripts/run/carry/run-carry-args.ts +1 -3
- package/scripts/run/carry/run-carry-conversation.ts +7 -2
- package/scripts/run/cut/run-cut-cli.ts +18 -22
- package/scripts/run/cut/run-cut-decline.ts +72 -0
- package/scripts/run/cut/run-cut-ready.ts +74 -0
- package/scripts/run/cut/run-cut-report.ts +29 -0
- package/scripts/run/cut/run-cut.ts +10 -1
- package/scripts/run/detached-launch.ts +23 -4
- package/scripts/run/entry/run-entry-cli.ts +8 -1
- package/scripts/run/event/run-event-render.ts +1 -0
- package/scripts/run/event/run-event-scope.ts +19 -1
- package/scripts/run/event/run-event-stream-emit.ts +13 -6
- package/scripts/run/event/run-event-stream.ts +4 -0
- package/scripts/run/hold/run-hold-cli.ts +14 -3
- package/scripts/run/hold/run-hold-session.ts +46 -0
- package/scripts/run/hold/run-hold.ts +13 -4
- package/scripts/run/launch-priority.ts +32 -0
- package/scripts/run/merge/run-merge-cli.ts +16 -42
- package/scripts/run/merge/run-merge-ship.ts +59 -1
- package/scripts/run/merge/run-merge-signals.ts +99 -0
- package/scripts/run/merge/run-merge-steps.ts +11 -1
- package/scripts/run/merge/run-merge.ts +22 -9
- package/scripts/run/run-ending.ts +31 -3
- package/scripts/run/run-liveness.ts +1 -1
- package/scripts/run/run-parent-cut-hook.ts +5 -10
- package/scripts/run/run-poll-hook.ts +157 -0
- package/scripts/run/run-preflight.ts +1 -2
- package/scripts/run/run-step-cli.ts +22 -15
- package/scripts/run/run-step-section.ts +85 -0
- package/scripts/run/run-stop-notify.ts +1 -2
- package/scripts/run/run-watcher-guard.ts +6 -3
- package/scripts/run/ship/run-ship-cli.ts +5 -12
- package/scripts/run/ship/run-ship-detach.ts +9 -0
- package/scripts/run/ship/run-ship-next.ts +10 -2
- package/scripts/run/ship/run-ship-overlap.ts +195 -0
- package/scripts/run/ship/run-ship-pre-detach.ts +33 -15
- package/scripts/run/ship/run-ship-preflight.ts +28 -2
- package/scripts/run/ship/run-ship-return.ts +31 -7
- package/scripts/run/ship/run-ship-review-steps.ts +25 -14
- package/scripts/run/ship/run-ship-review.ts +15 -2
- package/scripts/run/ship/run-ship-steps.ts +1 -1
- package/scripts/run/ship/run-ship-stop-context.ts +206 -0
- package/scripts/run/ship/run-ship-sync.ts +14 -6
- package/scripts/run/tidy/run-tidy-cli.ts +3 -3
- package/scripts/run/tidy/run-tidy-lanes.ts +3 -2
- package/scripts/safe-chain/project-config.ts +7 -2
- package/scripts/sync/sync-hook-safety.ts +8 -2
- package/scripts/test/test-e2e-guard.ts +30 -5
- package/scripts/test/test-unit-guard.ts +16 -1
- package/scripts/test/unit-worker-share.ts +26 -3
- package/scripts/time-runtime/time-batch-guard.ts +3 -3
- package/scripts/time-runtime/time-hook-transcript.ts +3 -2
- package/scripts/time-runtime/time-shell.ts +39 -4
- package/scripts/time-runtime/time-spans.ts +1 -0
- package/scripts/time-runtime/time-tool-call.ts +7 -0
- package/scripts/version/effective-upstream.ts +3 -4
- package/scripts/version/kit-version-config.ts +8 -2
- package/scripts/version/latest-corepack.ts +1 -2
- package/scripts/version/release-hold.ts +11 -4
- package/scripts/version/version-commands.ts +12 -4
- package/templates/gitignore +6 -2
- package/dist/hooks/chunk-D5QBTOCZ.js +0 -68
- package/dist/hooks/chunk-UT7YC3N2.js +0 -56
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import type { CommandUsage } from './josh-command-types'
|
|
2
|
+
|
|
3
|
+
// The usage of the epic and backlog commands `docs/josh-commands-backlog.md` documents under "Epics
|
|
4
|
+
// and backlog", keyed by command name. The page's usage blocks are generated from this table and
|
|
5
|
+
// `josh help <command>` prints it, so an example or a flag is written once, here (#3938).
|
|
6
|
+
const EXCLUDE = '--exclude <N>'
|
|
7
|
+
const BUDGET = '--answer candidates --started "$started" --active "$active"'
|
|
8
|
+
const REPO = '--repo <owner/repo>'
|
|
9
|
+
const JUST_MERGED = 'skip the issue just merged'
|
|
10
|
+
const EXCLUDE_1630 = '--exclude 1630'
|
|
11
|
+
|
|
12
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
13
|
+
const BACKLOG_USAGE: Readonly<Record<string, CommandUsage>> = {
|
|
14
|
+
epic: {
|
|
15
|
+
examples: [
|
|
16
|
+
{ arguments: '"Epic: split the parser work" 101 102 103' },
|
|
17
|
+
{ arguments: '"Epic: staged rollout" 101 102 --ordered' },
|
|
18
|
+
{ arguments: '"Epic: ..." 101 102 --rationale-file rationale.md' },
|
|
19
|
+
{ arguments: '--promote 858 101 102 103', note: 'turn an existing issue into an epic' },
|
|
20
|
+
{ arguments: '--add 893 894', note: 'track #894, declaring no order for it' },
|
|
21
|
+
{ arguments: '--add 893 894 --before 891', note: '#894 must finish before #891' },
|
|
22
|
+
{ arguments: '--add 893 894 --after 890', note: '#894 starts once #890 is done' },
|
|
23
|
+
{ arguments: '--add 893 894 --decision-file why.md', note: '…and record why, in one call' },
|
|
24
|
+
{
|
|
25
|
+
arguments: '--reconcile 2184',
|
|
26
|
+
note: 'rewrite the body to match the recorded blocked-by, and record any order the body declared',
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
flags: [
|
|
30
|
+
{
|
|
31
|
+
names: ['--ordered'],
|
|
32
|
+
description:
|
|
33
|
+
'argument order is the dependency order; writes the arrow chain, records the matching `blocked-by` relations, and adds a `### Declared order` entry under `## Decisions`.',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
names: ['--rationale-file <path|->'],
|
|
37
|
+
description: 'split rationale prose (`-` reads stdin).',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
names: ['--origin <owner/repo#N>'],
|
|
41
|
+
description: 'backlink when the split originated in another repository.',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
names: ['--before <M>'],
|
|
45
|
+
description:
|
|
46
|
+
'with `--add`: insert before `#M`, re-pointing what `#M` was waiting on so the chain is never broken.',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
names: ['--after <M>'],
|
|
50
|
+
description:
|
|
51
|
+
'with `--add`: start after `#M`; branches when `#M` already has a successor, extends when it is a tail.',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
names: ['--order-before <M>', '--order-after <M>'],
|
|
55
|
+
description: 'with `--add`: move the task-list row only; write no `blocked-by` relation.',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
names: ['--decision-file <path|->'],
|
|
59
|
+
description: 'with `--add`: record why the child was placed.',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
names: ['--remove <E> <M> <N> [<N2> …]'],
|
|
63
|
+
description:
|
|
64
|
+
'delete a declared order from the body and the relations; each consecutive pair is one link.',
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
},
|
|
68
|
+
'epic:next': {
|
|
69
|
+
examples: [
|
|
70
|
+
{ arguments: '858' },
|
|
71
|
+
{ arguments: '858 --repo joshuafolkken/kit', note: 'just the next child for one repository' },
|
|
72
|
+
{ arguments: '858 --repo joshuafolkken/kit --lanes', note: 'one child per free lane there' },
|
|
73
|
+
],
|
|
74
|
+
flags: [
|
|
75
|
+
{
|
|
76
|
+
names: [REPO],
|
|
77
|
+
description:
|
|
78
|
+
'answer for one repository; stdout carries one token (an issue number, or `wait`/`stop`/`complete`), everything else on stderr.',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
names: ['--lanes'],
|
|
82
|
+
description:
|
|
83
|
+
'print one issue number per free lane (requires `--repo`); `JOSH_LANE_LIMIT` sets the ceiling, default 4. Prints `triage` instead while any candidate carries neither `run:solo` nor `run:lane` (the triage gate in `josh backlog:next`).',
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
},
|
|
87
|
+
'epic:bundle': { examples: [{ arguments: '874' }] },
|
|
88
|
+
'epic:audit': { examples: [{ arguments: '858' }] },
|
|
89
|
+
'epic:check': { examples: [{ arguments: '700' }] },
|
|
90
|
+
'auto-ok:next': {
|
|
91
|
+
examples: [{ arguments: '' }, { arguments: '--exclude 906', note: JUST_MERGED }],
|
|
92
|
+
flags: [
|
|
93
|
+
{
|
|
94
|
+
names: [EXCLUDE],
|
|
95
|
+
description: 'drop issues from the answer; comma-separated, repeatable.',
|
|
96
|
+
},
|
|
97
|
+
],
|
|
98
|
+
},
|
|
99
|
+
'auto-ok:judge': {
|
|
100
|
+
examples: [
|
|
101
|
+
{ arguments: '', note: 'the issues that still owe a judgement' },
|
|
102
|
+
{ arguments: '--apply 912 --lane', note: 'opt it in, with its run label' },
|
|
103
|
+
{ arguments: '--decline 913 --reason "<why>"', note: 'record why it stays out' },
|
|
104
|
+
],
|
|
105
|
+
flags: [
|
|
106
|
+
{
|
|
107
|
+
names: ['--apply <N> --lane|--solo'],
|
|
108
|
+
description:
|
|
109
|
+
'checks the exclusions again against the labels as they stand, applies the run label and then `auto-ok`, and notes it on the progress board.',
|
|
110
|
+
},
|
|
111
|
+
{ names: ['--decline <N> --reason <text>'], description: 'applies nothing.' },
|
|
112
|
+
],
|
|
113
|
+
},
|
|
114
|
+
'backlog:next': {
|
|
115
|
+
examples: [{ arguments: '' }, { arguments: EXCLUDE_1630, note: JUST_MERGED }],
|
|
116
|
+
flags: [
|
|
117
|
+
{
|
|
118
|
+
names: [EXCLUDE],
|
|
119
|
+
description: 'drop issues from every bucket; comma-separated, repeatable.',
|
|
120
|
+
},
|
|
121
|
+
],
|
|
122
|
+
},
|
|
123
|
+
'backlog:plan': {
|
|
124
|
+
examples: [
|
|
125
|
+
{ arguments: '' },
|
|
126
|
+
{ arguments: EXCLUDE_1630, note: 'after #1630 merged' },
|
|
127
|
+
{ arguments: '--waves', note: 'the run order, wave by wave' },
|
|
128
|
+
],
|
|
129
|
+
flags: [
|
|
130
|
+
{ names: [EXCLUDE], description: 'same exclusion as `backlog:next`.' },
|
|
131
|
+
{
|
|
132
|
+
names: ['--waves'],
|
|
133
|
+
description:
|
|
134
|
+
'print the order the run takes, wave by wave, assuming each wave merges before the next. Read-only.',
|
|
135
|
+
},
|
|
136
|
+
],
|
|
137
|
+
},
|
|
138
|
+
'backlog:stalled': { examples: [{ arguments: '' }] },
|
|
139
|
+
'backlog:budget': {
|
|
140
|
+
examples: [
|
|
141
|
+
{ arguments: BUDGET },
|
|
142
|
+
{ arguments: '--answer exhausted --started "$started" --active "$active" --idle 60' },
|
|
143
|
+
{ arguments: `${BUDGET} --merged 3 --running 2 --max 5` },
|
|
144
|
+
],
|
|
145
|
+
flags: [
|
|
146
|
+
{
|
|
147
|
+
names: ['--answer <candidates|exhausted|blocked|parked|unreadable|untriaged>'],
|
|
148
|
+
description: "`backlog:next`'s answer, mapped.",
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
names: ['--started', '--active'],
|
|
152
|
+
description:
|
|
153
|
+
'when the invocation began / when it last had work (required unless the watch is off).',
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
names: ['--idle <minutes>'],
|
|
157
|
+
description:
|
|
158
|
+
'once nothing can proceed, keep polling this long, counted from `--active` (default 480, 8 hours; `--idle 0` turns the watch off).',
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
names: ['--max <count>'],
|
|
162
|
+
description:
|
|
163
|
+
'issues one invocation may take (default unlimited); `--merged` and `--running` count against it.',
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
names: ['--json'],
|
|
167
|
+
description: 'collapse verdict and reason into `{"budget": "<verdict>", "reason": "…"}`.',
|
|
168
|
+
},
|
|
169
|
+
],
|
|
170
|
+
},
|
|
171
|
+
'backlog:offer': {
|
|
172
|
+
examples: [{ arguments: '--started "$started" --active "$active" --running 2 --retries 1' }],
|
|
173
|
+
},
|
|
174
|
+
'backlog:drive': {
|
|
175
|
+
examples: [{ arguments: '--owner "$PPID" [--max <n>] [--idle <minutes>] [--only]' }],
|
|
176
|
+
},
|
|
177
|
+
}
|
|
178
|
+
/* eslint-enable @typescript-eslint/naming-convention */
|
|
179
|
+
|
|
180
|
+
export { BACKLOG_USAGE }
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import { ports } from '#ports'
|
|
2
|
+
import type { CommandUsage } from './josh-command-types'
|
|
3
|
+
|
|
4
|
+
// The usage of the commands `docs/josh-commands.md` documents, keyed by command name. The page's
|
|
5
|
+
// usage blocks are generated from this table and `josh help <command>` prints it, so an example or a
|
|
6
|
+
// flag is written once, here (#3932).
|
|
7
|
+
// The unseeded ports are read from `ports/index.js`, their one definition (#818).
|
|
8
|
+
const UNSEEDED: Readonly<Record<string, string | undefined>> = {}
|
|
9
|
+
const NARROWED = { arguments: 'scripts/thing.ts', note: 'narrow by the given files instead' }
|
|
10
|
+
|
|
11
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
12
|
+
const DEVELOPER_USAGE: Readonly<Record<string, CommandUsage>> = {
|
|
13
|
+
gate: {
|
|
14
|
+
examples: [
|
|
15
|
+
{ arguments: '' },
|
|
16
|
+
{ arguments: '--verbose', note: "every check's output, passing ones included" },
|
|
17
|
+
{ arguments: '--force', note: 're-run even on a tree already recorded green' },
|
|
18
|
+
{ arguments: '--no-unit', note: 'the static checks only (CI only)' },
|
|
19
|
+
],
|
|
20
|
+
},
|
|
21
|
+
lint: { examples: [{ arguments: '' }] },
|
|
22
|
+
'lint:related': { examples: [{ arguments: '' }, NARROWED] },
|
|
23
|
+
lines: {
|
|
24
|
+
examples: [{ arguments: 'scripts/hooks/format-edited-file.ts scripts/josh/josh-logic.ts' }],
|
|
25
|
+
},
|
|
26
|
+
bytes: {
|
|
27
|
+
examples: [
|
|
28
|
+
{ arguments: 'docs/josh-commands.md', note: 'one document' },
|
|
29
|
+
{ arguments: '', note: 'scan: every budgeted document near its ceiling' },
|
|
30
|
+
],
|
|
31
|
+
},
|
|
32
|
+
metrics: {
|
|
33
|
+
examples: [
|
|
34
|
+
{ arguments: '', note: "print the totals and check them against the merge-base's" },
|
|
35
|
+
{ arguments: '--accept --reason "<why>"', note: "record this branch's growth and why" },
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
format: { examples: [{ arguments: '' }] },
|
|
39
|
+
'cspell:dot': { examples: [{ arguments: '', note: 'includes dotfiles' }] },
|
|
40
|
+
behavior: { examples: [{ arguments: '' }] },
|
|
41
|
+
'exports:unused': { examples: [{ arguments: '' }] },
|
|
42
|
+
'test:unit': { examples: [{ arguments: '' }] },
|
|
43
|
+
'test:related': {
|
|
44
|
+
examples: [
|
|
45
|
+
{ arguments: '' },
|
|
46
|
+
NARROWED,
|
|
47
|
+
{ arguments: '--silent', note: 'flags are forwarded to vitest' },
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
'test:declared': {
|
|
51
|
+
examples: [
|
|
52
|
+
{ arguments: '' },
|
|
53
|
+
{ arguments: '--match', note: 'check Step 0 declarations on stdin' },
|
|
54
|
+
{ arguments: '--help', note: 'print usage, including the --match stdin form' },
|
|
55
|
+
],
|
|
56
|
+
},
|
|
57
|
+
'test:e2e': { examples: [{ arguments: '' }] },
|
|
58
|
+
test: { examples: [{ arguments: '' }] },
|
|
59
|
+
check: { examples: [{ arguments: '' }] },
|
|
60
|
+
port: {
|
|
61
|
+
examples: [
|
|
62
|
+
{
|
|
63
|
+
arguments: 'dev',
|
|
64
|
+
note: `${String(ports.resolve_development_port(UNSEEDED))} with no seed set`,
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
arguments: 'preview',
|
|
68
|
+
note: `${String(ports.resolve_preview_port(UNSEEDED))} with no seed set`,
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
},
|
|
72
|
+
profile: { examples: [{ arguments: '' }] },
|
|
73
|
+
init: {
|
|
74
|
+
examples: [
|
|
75
|
+
{
|
|
76
|
+
arguments: '',
|
|
77
|
+
note: 'create/merge config files, install and format (--no-install skips both, --dry-run only prints the plan)',
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
},
|
|
81
|
+
'registry:migrate': { examples: [{ arguments: '' }] },
|
|
82
|
+
sync: { examples: [{ arguments: '', note: 'overwrite managed files' }] },
|
|
83
|
+
uninstall: {
|
|
84
|
+
examples: [
|
|
85
|
+
{ arguments: '', note: 'show the plan, then ask' },
|
|
86
|
+
{ arguments: '--yes', note: 'remove without asking' },
|
|
87
|
+
],
|
|
88
|
+
},
|
|
89
|
+
adopt: {
|
|
90
|
+
examples: [
|
|
91
|
+
{ arguments: '' },
|
|
92
|
+
{ arguments: '--dry-run', note: 'report the steps without touching anything' },
|
|
93
|
+
],
|
|
94
|
+
flags: [{ names: ['--dry-run'], description: 'report the plan without writing.' }],
|
|
95
|
+
},
|
|
96
|
+
git: {
|
|
97
|
+
examples: [
|
|
98
|
+
{ arguments: '', note: 'interactive' },
|
|
99
|
+
{ arguments: '-y', note: 'unattended (no TTY required)' },
|
|
100
|
+
{ arguments: '-y "title"', note: 'set commit message prefix' },
|
|
101
|
+
{ arguments: '-y "<title> #<N>"', note: 'follow-up commit on the same branch' },
|
|
102
|
+
{
|
|
103
|
+
arguments: '-y --skip-commit --skip-push',
|
|
104
|
+
note: 'open the PR without committing/pushing',
|
|
105
|
+
},
|
|
106
|
+
],
|
|
107
|
+
flags: [
|
|
108
|
+
{
|
|
109
|
+
names: ['-y', '--yes'],
|
|
110
|
+
description: 'run non-interactively; works without a TTY (agent or CI shell).',
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
names: ['--skip-commit', '--skip-push'],
|
|
114
|
+
description: 'recover/open a PR without a new commit or push.',
|
|
115
|
+
},
|
|
116
|
+
],
|
|
117
|
+
},
|
|
118
|
+
pr: { examples: [{ arguments: '', note: 'open the PR for the current <N>-<slug> branch' }] },
|
|
119
|
+
'review:findings': { examples: [{ arguments: '' }] },
|
|
120
|
+
'main:sync': { examples: [{ arguments: '' }] },
|
|
121
|
+
'main:merge': { examples: [{ arguments: '' }] },
|
|
122
|
+
version: {
|
|
123
|
+
examples: [
|
|
124
|
+
{ arguments: '' },
|
|
125
|
+
{
|
|
126
|
+
arguments: '--upgrade',
|
|
127
|
+
note: 'upgrade global + project to latest, then re-run fix-gh-packages',
|
|
128
|
+
},
|
|
129
|
+
],
|
|
130
|
+
flags: [
|
|
131
|
+
{
|
|
132
|
+
names: ['--upgrade'],
|
|
133
|
+
description:
|
|
134
|
+
'upgrade both the global install (`pnpm add -g`) and the project devDependency (`pnpm add -D` + `fix-gh-packages`); already-current or not-installed targets are skipped.',
|
|
135
|
+
},
|
|
136
|
+
],
|
|
137
|
+
},
|
|
138
|
+
ranges: { examples: [{ arguments: '' }] },
|
|
139
|
+
doctor: {
|
|
140
|
+
examples: [
|
|
141
|
+
{ arguments: '', note: 'diagnose only' },
|
|
142
|
+
{ arguments: '--fix', note: 'reclaim the global josh by removing a stale kit shim' },
|
|
143
|
+
{ arguments: '--ports', note: 'also print the per-repository port-seed table' },
|
|
144
|
+
],
|
|
145
|
+
flags: [
|
|
146
|
+
{
|
|
147
|
+
names: ['--fix'],
|
|
148
|
+
description:
|
|
149
|
+
'remove a shadowing binary **only if it is a kit shim** (its body references `@joshuafolkken/kit` or the removed `install-bin` script); any other binary is left and reported for manual review. Also the one-shot recovery for an old project that re-created the global shim.',
|
|
150
|
+
},
|
|
151
|
+
{ names: ['--ports'], description: 'additionally print the port-seed table (see below).' },
|
|
152
|
+
],
|
|
153
|
+
},
|
|
154
|
+
audit: { examples: [{ arguments: '' }] },
|
|
155
|
+
overrides: {
|
|
156
|
+
examples: [
|
|
157
|
+
{ arguments: '', note: 'verify overrides unchanged' },
|
|
158
|
+
{ arguments: '--save', note: 'snapshot current merged overrides' },
|
|
159
|
+
],
|
|
160
|
+
flags: [
|
|
161
|
+
{
|
|
162
|
+
names: ['--save'],
|
|
163
|
+
description:
|
|
164
|
+
'write the current merged overrides to `.overrides-snapshot.json` (gitignored); later runs compare against it and exit non-zero on any add, removal, or change.',
|
|
165
|
+
},
|
|
166
|
+
],
|
|
167
|
+
},
|
|
168
|
+
backlogrun: {
|
|
169
|
+
examples: [
|
|
170
|
+
{ arguments: '', note: 'start in Claude, then show the board' },
|
|
171
|
+
{ arguments: '3437 --only', note: 'the arguments go to backlogrun as typed' },
|
|
172
|
+
{ arguments: '--agent codex', note: 'start in Codex' },
|
|
173
|
+
{ arguments: '--stop', note: 'stop the run in this repository' },
|
|
174
|
+
],
|
|
175
|
+
},
|
|
176
|
+
'lane:limit': {
|
|
177
|
+
examples: [
|
|
178
|
+
{ arguments: '8', note: "raise or lower the live run's limit to 8" },
|
|
179
|
+
{ arguments: '', note: 'print the limit, the lanes in use and the free lanes' },
|
|
180
|
+
{ arguments: '--reset', note: 'clear the override; JOSH_LANE_LIMIT applies again' },
|
|
181
|
+
],
|
|
182
|
+
},
|
|
183
|
+
'lane:withdraw': {
|
|
184
|
+
examples: [{ arguments: '3769 --reason "folded into a broader issue"' }],
|
|
185
|
+
},
|
|
186
|
+
'test:red': { examples: [{ arguments: '', note: 'red, green, no-test or test-only' }] },
|
|
187
|
+
start: {
|
|
188
|
+
examples: [
|
|
189
|
+
{ arguments: '', note: 'asks for the profile and the repository' },
|
|
190
|
+
{
|
|
191
|
+
arguments: '--yes --github --profile basic',
|
|
192
|
+
note: 'unattended, including the GitHub repository',
|
|
193
|
+
},
|
|
194
|
+
],
|
|
195
|
+
flags: [
|
|
196
|
+
{ names: ['--profile basic|full'], description: 'the profile, without asking.' },
|
|
197
|
+
{ names: ['--yes'], description: 'take the defaults — not consent to write to GitHub.' },
|
|
198
|
+
{ names: ['--github'], description: 'create the GitHub repository and push `main`.' },
|
|
199
|
+
{ names: ['--public'], description: 'create the repository public instead of private.' },
|
|
200
|
+
{
|
|
201
|
+
names: ['--init-command "<command>"'],
|
|
202
|
+
description: 'run this setup command in place of `josh init`.',
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
names: ['--push-preflight-command "<command>"'],
|
|
206
|
+
description:
|
|
207
|
+
'a check run before the first step when the plan pushes; a failure stops the run before it writes anything.',
|
|
208
|
+
},
|
|
209
|
+
{ names: ['--dry-run'], description: 'print the plan and change nothing.' },
|
|
210
|
+
],
|
|
211
|
+
},
|
|
212
|
+
latest: { examples: [{ arguments: '', note: 'full update (update + audit + pnpm)' }] },
|
|
213
|
+
'latest:corepack': { examples: [{ arguments: '', note: 'update pnpm only' }] },
|
|
214
|
+
'latest:update': { examples: [{ arguments: '', note: 'update dependencies only' }] },
|
|
215
|
+
'lane:restart': {
|
|
216
|
+
examples: [{ arguments: '3769', note: "prints the fresh child's pid" }],
|
|
217
|
+
},
|
|
218
|
+
'rule:value': {
|
|
219
|
+
examples: [
|
|
220
|
+
{ arguments: '' },
|
|
221
|
+
{
|
|
222
|
+
arguments: '--refresh',
|
|
223
|
+
note: 'write the reading to the loop-head cache instead of stdout',
|
|
224
|
+
},
|
|
225
|
+
],
|
|
226
|
+
},
|
|
227
|
+
}
|
|
228
|
+
/* eslint-enable @typescript-eslint/naming-convention */
|
|
229
|
+
|
|
230
|
+
export { DEVELOPER_USAGE }
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { CommandUsage } from './josh-command-types'
|
|
2
|
+
|
|
3
|
+
// The usage of the Claude Code and Codex hook commands `docs/josh-commands-automation.md` documents
|
|
4
|
+
// under "Development", keyed by command name. A hook is fed its payload as JSON on stdin, so each
|
|
5
|
+
// example names the event that runs it rather than an argument. The page's usage blocks are generated
|
|
6
|
+
// from this table and `josh help <command>` prints it, so an example is written once, here (#3981).
|
|
7
|
+
const PRE_TOOL_USE = 'run by the PreToolUse hook, the pending tool call as JSON on stdin'
|
|
8
|
+
const IN_PRETOOL_GUARD = 'run inside pretool:guard, not wired on its own'
|
|
9
|
+
|
|
10
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
11
|
+
const HOOK_USAGE: Readonly<Record<string, CommandUsage>> = {
|
|
12
|
+
'format:edited': {
|
|
13
|
+
examples: [
|
|
14
|
+
{ arguments: '', note: 'run by the PostToolUse hook, the tool call as JSON on stdin' },
|
|
15
|
+
],
|
|
16
|
+
},
|
|
17
|
+
'batch:guard': { examples: [{ arguments: '', note: IN_PRETOOL_GUARD }] },
|
|
18
|
+
'investigation:guard': { examples: [{ arguments: '', note: PRE_TOOL_USE }] },
|
|
19
|
+
'duplicate-read:guard': { examples: [{ arguments: '', note: IN_PRETOOL_GUARD }] },
|
|
20
|
+
'rule:guard': { examples: [{ arguments: '', note: PRE_TOOL_USE }] },
|
|
21
|
+
'rule:list': { examples: [{ arguments: '', note: 'print every trigger-delivered rule' }] },
|
|
22
|
+
'pretool:guard': { examples: [{ arguments: '', note: PRE_TOOL_USE }] },
|
|
23
|
+
'codex:hook-adapter': {
|
|
24
|
+
examples: [
|
|
25
|
+
{ arguments: 'pretool', note: 'a Codex PreToolUse payload on stdin' },
|
|
26
|
+
{ arguments: 'posttool', note: 'a Codex PostToolUse payload on stdin' },
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
'stop:guard': {
|
|
30
|
+
examples: [{ arguments: '', note: 'run by the Stop hook, the stop payload as JSON on stdin' }],
|
|
31
|
+
},
|
|
32
|
+
'session:lang': {
|
|
33
|
+
examples: [{ arguments: '', note: 'run by the UserPromptSubmit hook; `ja` prints nothing' }],
|
|
34
|
+
},
|
|
35
|
+
}
|
|
36
|
+
/* eslint-enable @typescript-eslint/naming-convention */
|
|
37
|
+
|
|
38
|
+
export { HOOK_USAGE }
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import type { CommandUsage } from './josh-command-types'
|
|
2
|
+
|
|
3
|
+
// The usage of the issue commands `docs/josh-commands-backlog.md` documents under "Issues", keyed by
|
|
4
|
+
// command name. The page's usage blocks are generated from this table and `josh help <command>`
|
|
5
|
+
// prints it, so an example or a flag is written once, here (#3938). The epic and backlog commands are
|
|
6
|
+
// `josh-usage-backlog.ts`, the review and delegation commands `josh-usage-review.ts`.
|
|
7
|
+
const REPO = '--repo <owner/repo>'
|
|
8
|
+
const BODY_FILE = '--body-file <path>'
|
|
9
|
+
const CONCURRENT = 'several numbers, read concurrently'
|
|
10
|
+
const REPO_FLAG = {
|
|
11
|
+
names: [REPO],
|
|
12
|
+
description: 'read a child in another repository; applies to every number.',
|
|
13
|
+
}
|
|
14
|
+
const JSON_FLAG = { names: ['--json'], description: 'print the verdict and reason as JSON.' }
|
|
15
|
+
|
|
16
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
17
|
+
const ISSUE_USAGE: Readonly<Record<string, CommandUsage>> = {
|
|
18
|
+
'issue:read': {
|
|
19
|
+
examples: [{ arguments: '1715' }, { arguments: '1715 1567 1605', note: CONCURRENT }],
|
|
20
|
+
},
|
|
21
|
+
'issue:ack': { examples: [{ arguments: '3773' }] },
|
|
22
|
+
'issue:state': {
|
|
23
|
+
examples: [
|
|
24
|
+
{ arguments: '42', note: 'single-number shape' },
|
|
25
|
+
{ arguments: '42 43 44', note: 'each block headed by `issue:`' },
|
|
26
|
+
{ arguments: '42 43 --repo joshuafolkken/app-kit', note: 'a child in another repo' },
|
|
27
|
+
],
|
|
28
|
+
flags: [REPO_FLAG],
|
|
29
|
+
},
|
|
30
|
+
'issue:release': {
|
|
31
|
+
examples: [
|
|
32
|
+
{ arguments: '3360' },
|
|
33
|
+
{ arguments: '3716 --wait', note: 'blocked by the release issue instead' },
|
|
34
|
+
],
|
|
35
|
+
flags: [
|
|
36
|
+
{
|
|
37
|
+
names: ['--wait'],
|
|
38
|
+
description:
|
|
39
|
+
'the issue is blocked by the release issue instead, so `backlog:next` offers it again once the release ships (`.claude/skills/workflow-commands/prerequisite.md`).',
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
'issue:scout': {
|
|
44
|
+
examples: [
|
|
45
|
+
{ arguments: '"Stop the gate re-running after every edit"' },
|
|
46
|
+
{ arguments: '"<title>" --body "parent: #1246"' },
|
|
47
|
+
{ arguments: '"<title>" --body-file draft.md' },
|
|
48
|
+
],
|
|
49
|
+
flags: [
|
|
50
|
+
{
|
|
51
|
+
names: ['--body "<text>"'],
|
|
52
|
+
description:
|
|
53
|
+
'supply references (`#N`) in a `parent: #N` line or an acceptance-criteria section so the epic half has a number to work from; without one there (a background mention does not count) it prints `Epic: not asked`.',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
names: [BODY_FILE],
|
|
57
|
+
description:
|
|
58
|
+
'pass the whole draft, including its purpose, requirements and acceptance criteria. A file that cannot be read ends the command rather than being treated as "no candidates".',
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
},
|
|
62
|
+
'issue:file': {
|
|
63
|
+
examples: [
|
|
64
|
+
{ arguments: '"<title>" --body-file body.md --depth 1' },
|
|
65
|
+
{
|
|
66
|
+
arguments:
|
|
67
|
+
'"<title>" --body-file body.md --depth 0 --route tier-a --repo joshuafolkken/kit',
|
|
68
|
+
},
|
|
69
|
+
{ arguments: '"<title>" --body-file body.md --depth 1 --distinct 2801,2795' },
|
|
70
|
+
],
|
|
71
|
+
flags: [
|
|
72
|
+
{ names: [BODY_FILE], description: 'the body. Required.' },
|
|
73
|
+
{
|
|
74
|
+
names: ['--depth <0|1|2>'],
|
|
75
|
+
description:
|
|
76
|
+
'the depth label. Required. The criteria are `.claude/skills/workflow-commands/observation-filing.md` → "The depth test".',
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
names: ['--route <tier-a|split|interrupt|review-cap>'],
|
|
80
|
+
description:
|
|
81
|
+
'the `route:` label naming the filing route. Omit it for a filing with no route.',
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
names: ['--label <name>'],
|
|
85
|
+
description: 'an extra label (for example `epic`). Repeatable.',
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
names: [REPO],
|
|
89
|
+
description: 'the target repository. Defaults to this repository.',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
names: ['--distinct <N,…>'],
|
|
93
|
+
description: 'duplicate candidates you read and judged distinct.',
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
names: ['--over-cap'],
|
|
97
|
+
description: 'the run is blocked by this filing; the cap lets it through.',
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
names: ['--no-auto-ok'],
|
|
101
|
+
description: "needs a person's judgement (Tier B / C); no `auto-ok`.",
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
names: ['--release'],
|
|
105
|
+
description:
|
|
106
|
+
"a consumer can use the change only once it is published. The filed issue becomes a blocker of the target's release issue (step 10).",
|
|
107
|
+
},
|
|
108
|
+
],
|
|
109
|
+
},
|
|
110
|
+
'issue:fold-existing': { examples: [{ arguments: 'assessment.json --json' }] },
|
|
111
|
+
'issue:fold': {
|
|
112
|
+
examples: [
|
|
113
|
+
{
|
|
114
|
+
arguments: '"First finding" "Second finding"',
|
|
115
|
+
note: 'fold | separate | no-fold-needed | undetermined',
|
|
116
|
+
},
|
|
117
|
+
{ arguments: '"a" "b" --not-separable', note: 'the pair is really one deliverable → fold' },
|
|
118
|
+
{ arguments: '"a" "b" --json', note: 'the verdict and reason, machine-readable' },
|
|
119
|
+
],
|
|
120
|
+
flags: [
|
|
121
|
+
{
|
|
122
|
+
names: ['--not-separable'],
|
|
123
|
+
description:
|
|
124
|
+
'declare the judgement half: the findings are one deliverable, so they fold whatever their size.',
|
|
125
|
+
},
|
|
126
|
+
JSON_FLAG,
|
|
127
|
+
],
|
|
128
|
+
},
|
|
129
|
+
'issue:cite': {
|
|
130
|
+
examples: [
|
|
131
|
+
{ arguments: '2220' },
|
|
132
|
+
{ arguments: '2220 1758 1252', note: CONCURRENT },
|
|
133
|
+
{ arguments: '45 --repo joshuafolkken/app-kit', note: 'bare numbers in another repository' },
|
|
134
|
+
{ arguments: 'joshuafolkken/app-kit#45 2220', note: 'per-token owner/repo#N notation' },
|
|
135
|
+
],
|
|
136
|
+
flags: [
|
|
137
|
+
{
|
|
138
|
+
names: [REPO],
|
|
139
|
+
description:
|
|
140
|
+
'the repository for every bare number; a token written `owner/repo#N` overrides it for itself.',
|
|
141
|
+
},
|
|
142
|
+
],
|
|
143
|
+
},
|
|
144
|
+
'issue:comment': {
|
|
145
|
+
examples: [
|
|
146
|
+
{
|
|
147
|
+
arguments: '2304 --body-file .claude/tmp/park.md',
|
|
148
|
+
note: 'the body from a file — no shell evaluates it',
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
arguments: '2304 --body "a short note"',
|
|
152
|
+
note: 'inline, for a body with no backticks or $',
|
|
153
|
+
},
|
|
154
|
+
],
|
|
155
|
+
flags: [
|
|
156
|
+
{
|
|
157
|
+
names: ['--body <text>'],
|
|
158
|
+
description: 'the comment body, inline. Trimmed, with `\\n` expanded to a newline.',
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
names: [BODY_FILE],
|
|
162
|
+
description:
|
|
163
|
+
'read the body from a file, or from stdin with `-`. The safe form the rule steers every caller toward.',
|
|
164
|
+
},
|
|
165
|
+
],
|
|
166
|
+
},
|
|
167
|
+
'pkg:scout': {
|
|
168
|
+
examples: [{ arguments: '"date formatting" --size 5' }],
|
|
169
|
+
flags: [
|
|
170
|
+
{ names: ['--size <n>'], description: 'how many candidates to fetch and rank (default 10).' },
|
|
171
|
+
],
|
|
172
|
+
},
|
|
173
|
+
'issue:lint': { examples: [{ arguments: '.claude/tmp/issue-body.md' }] },
|
|
174
|
+
'defect:rate': {
|
|
175
|
+
examples: [{ arguments: '', note: 'the last 14 days' }, { arguments: '--days 30' }],
|
|
176
|
+
flags: [
|
|
177
|
+
{
|
|
178
|
+
names: ['--days <n>'],
|
|
179
|
+
description:
|
|
180
|
+
'the window in whole days (default 14, at most 3650). Anything else prints the usage and exits 1.',
|
|
181
|
+
},
|
|
182
|
+
],
|
|
183
|
+
},
|
|
184
|
+
'issue:backlinks': { examples: [{ arguments: '2123' }] },
|
|
185
|
+
'report:lint': { examples: [{ arguments: '< summary.md' }] },
|
|
186
|
+
'stash:pop': {
|
|
187
|
+
examples: [
|
|
188
|
+
{ arguments: '"backlogrun: parked #2028"' },
|
|
189
|
+
{
|
|
190
|
+
arguments: '"backlogrun: josh latest before lanes" --dir "$dir"',
|
|
191
|
+
note: "into a lane's work tree",
|
|
192
|
+
},
|
|
193
|
+
],
|
|
194
|
+
flags: [
|
|
195
|
+
{
|
|
196
|
+
names: ['--dir <path>'],
|
|
197
|
+
description:
|
|
198
|
+
'applies the pop in that work tree (`git -C <path>`); without it the pop lands in the current checkout. The stack is shared, so it reads the same either way.',
|
|
199
|
+
},
|
|
200
|
+
],
|
|
201
|
+
},
|
|
202
|
+
}
|
|
203
|
+
/* eslint-enable @typescript-eslint/naming-convention */
|
|
204
|
+
|
|
205
|
+
export { ISSUE_USAGE }
|