@joshuafolkken/kit 1.1010.0 → 1.1050.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 +1 -5
- package/.claude/skills/dependency-update/SKILL.md +6 -3
- package/.claude/skills/epic-commands/SKILL.md +46 -17
- package/.claude/skills/verify-ui/SKILL.md +1 -1
- package/.claude/skills/workflow-commands/SKILL.md +10 -25
- package/.claude/skills/workflow-commands/background-commands.md +1 -1
- package/.claude/skills/workflow-commands/backlogrun-child.md +6 -4
- package/.claude/skills/workflow-commands/backlogrun-lanes.md +1 -1
- package/.claude/skills/workflow-commands/backlogrun-park.md +6 -0
- package/.claude/skills/workflow-commands/backlogrun-progress.md +30 -36
- package/.claude/skills/workflow-commands/backlogrun-steps.md +16 -16
- package/.claude/skills/workflow-commands/backlogrun.md +3 -12
- package/.claude/skills/workflow-commands/chain-rule.md +2 -2
- package/.claude/skills/workflow-commands/followup-reference.md +2 -2
- package/.claude/skills/workflow-commands/fullrun-steps.md +4 -3
- package/.claude/skills/workflow-commands/fullrun.md +1 -1
- package/.claude/skills/workflow-commands/halfrun.md +2 -1
- package/.claude/skills/workflow-commands/into-target.md +1 -1
- package/.claude/skills/workflow-commands/issue-comments.md +1 -1
- package/.claude/skills/workflow-commands/observation-filing.md +80 -126
- package/.claude/skills/workflow-commands/pre-gate-cut.md +33 -36
- package/.claude/skills/workflow-commands/prerequisite.md +1 -1
- package/.claude/skills/workflow-commands/working-tree-hold.md +2 -2
- package/.codex/hooks.json +1 -5
- package/.github/workflows/auto-tag.yml +21 -0
- package/.github/workflows/publish.yml +9 -10
- package/.github/workflows/sonar-qube.yml +1 -1
- package/AGENTS.md +4 -25
- package/CLAUDE.md +24 -38
- package/GEMINI.md +4 -24
- package/README.md +22 -56
- package/dist/CLAUDE.md +24 -38
- package/dist/hooks/batch-guard.js +4 -4
- package/dist/hooks/{chunk-6PSTVOLH.js → chunk-5BK3K7V4.js} +114 -90
- package/dist/hooks/{chunk-PAXMLGSS.js → chunk-7VPDUBRN.js} +93 -175
- package/dist/hooks/{chunk-KPZN42RT.js → chunk-DMQN45FN.js} +3 -3
- package/dist/hooks/{chunk-WMIR5SNX.js → chunk-EJDX2TOB.js} +13 -3
- package/dist/hooks/{chunk-A2H5I2VD.js → chunk-GQ7KP45M.js} +2 -2
- package/dist/hooks/{chunk-4GDR2YTV.js → chunk-HJIISEAC.js} +4 -4
- package/dist/hooks/{chunk-AWTFKKFW.js → chunk-NAS4C7GP.js} +6 -33
- package/dist/hooks/{chunk-56LGMJJV.js → chunk-NJQOBE6L.js} +2 -2
- package/dist/hooks/{chunk-EZLHXKJ6.js → chunk-RLDX5SOC.js} +1222 -941
- package/dist/hooks/{chunk-GBJUERYK.js → chunk-WQ4OSBSS.js} +10 -3
- package/dist/hooks/codex-hook-adapter.js +10 -10
- package/dist/hooks/duplicate-read-guard.js +5 -5
- package/dist/hooks/format-edited.js +15 -34
- package/dist/hooks/investigation-guard.js +5 -5
- package/dist/hooks/pretool-guard.js +23 -16
- package/dist/hooks/stop-guard.js +21 -200
- package/dist/josh.js +42 -125
- package/dist/version/index.js +466 -42
- package/eslint/base.js +2 -11
- package/package.json +36 -10
- package/prompts/coding-standards.md +15 -290
- package/prompts/collaboration-workflow/cross-repo-epic.md +2 -51
- package/prompts/collaboration-workflow/epic-audit.md +2 -53
- package/prompts/collaboration-workflow/epic-bundle.md +2 -106
- package/prompts/collaboration-workflow/file-edits.md +6 -53
- package/prompts/collaboration-workflow/issue-template.md +4 -4
- package/prompts/collaboration-workflow/operating-rules.md +18 -75
- package/prompts/collaboration-workflow/principles.md +74 -0
- package/prompts/collaboration-workflow/residency.md +55 -15
- package/prompts/collaboration-workflow/rule-delivery.md +5 -46
- package/prompts/collaboration-workflow/shell-body.md +7 -9
- package/prompts/collaboration-workflow/turn-batching.md +21 -37
- package/prompts/collaboration-workflow/upstream-interrupt.md +1 -1
- package/prompts/collaboration-workflow/wip-cap.md +15 -18
- package/prompts/collaboration-workflow.md +22 -28
- package/prompts/sonar-hotspot-handling.md +1 -1
- package/scripts/adopt/adopt-logic.ts +2 -2
- package/scripts/adopt/adopt-toolkits.ts +3 -1
- package/scripts/adopt/adopt.ts +2 -2
- package/scripts/agent/agent-event.ts +2 -9
- package/scripts/agent/agent-exit-record.ts +2 -9
- package/scripts/auto-ok/auto-ok-cli.ts +9 -9
- package/scripts/backlog/backlog-budget-cli.ts +2 -6
- package/scripts/backlog/backlog-drive-cli.ts +20 -10
- package/scripts/backlog/backlog-drive.ts +50 -16
- package/scripts/backlog/backlog-next.ts +24 -8
- package/scripts/backlog/backlog-offer-cli.ts +6 -5
- package/scripts/backlog/backlog-plan-cli.ts +5 -1
- package/scripts/backlog/backlog-plan.ts +1 -1
- package/scripts/backlog/backlog-pool.ts +31 -11
- package/scripts/backlog/backlog-rank.ts +106 -0
- package/scripts/backlog/backlog-waves.ts +42 -29
- package/scripts/build/build-bin.ts +2 -1
- package/scripts/build/build-config-merge.ts +2 -1
- package/scripts/build/build-hooks.ts +31 -6
- package/scripts/build/build-managed-marker.ts +2 -1
- package/scripts/build/build-self-sync-guard.ts +2 -1
- package/scripts/build/build-version.ts +2 -1
- package/scripts/cases/cases-logic.ts +2 -6
- package/scripts/ci/pr-classification.ts +13 -11
- package/scripts/cost-runtime/cost-transcript.ts +4 -11
- package/scripts/delegation/delegation-policy.ts +11 -0
- package/scripts/doctor/doctor-consumer.ts +5 -12
- package/scripts/doctor/doctor-ports.ts +2 -2
- package/scripts/document/document-byte-budget.ts +13 -21
- package/scripts/document/document-section.ts +2 -6
- package/scripts/document/entry-read-budget.ts +6 -5
- package/scripts/{git/git-epic-add-body.ts → epic/epic-add-body.ts} +23 -23
- package/scripts/{git/git-epic-add-plan.ts → epic/epic-add-plan.ts} +23 -26
- package/scripts/{git/git-epic-add.ts → epic/epic-add.ts} +17 -17
- package/scripts/epic/epic-audit-cli.ts +4 -4
- package/scripts/epic/epic-audit-orphans.ts +2 -2
- package/scripts/epic/epic-audit-rationale.ts +1 -1
- package/scripts/epic/epic-audit.ts +1 -1
- package/scripts/{git/git-epic-body.ts → epic/epic-body.ts} +6 -6
- package/scripts/epic/epic-bundle-cli.ts +1 -1
- package/scripts/epic/epic-bundle.ts +2 -2
- package/scripts/epic/epic-candidate-confirm.ts +2 -1
- package/scripts/{git/git-epic-chains.ts → epic/epic-chains.ts} +4 -4
- package/{scripts-ai → scripts/epic}/epic-check.ts +5 -4
- package/{scripts-ai → scripts/epic}/epic-cli.ts +4 -4
- package/scripts/{git/git-epic-close-comment.ts → epic/epic-close-comment.ts} +9 -9
- package/scripts/{git/git-epic-close.ts → epic/epic-close.ts} +23 -19
- package/scripts/epic/epic-cross-repo.ts +21 -38
- package/scripts/{git/git-epic-decision.ts → epic/epic-decision.ts} +12 -14
- package/scripts/epic/epic-fetch.ts +3 -3
- package/scripts/epic/epic-graph.ts +3 -3
- package/scripts/epic/epic-index.ts +2 -2
- package/scripts/epic/epic-issue.ts +1 -1
- package/scripts/epic/epic-lane-offer.ts +11 -22
- package/scripts/epic/epic-next.ts +3 -3
- package/scripts/{git/git-epic-parse.ts → epic/epic-parse.ts} +3 -3
- package/scripts/{git/git-epic-promote.ts → epic/epic-promote.ts} +10 -10
- package/scripts/epic/epic-rank.ts +37 -0
- package/scripts/{git/git-epic-read.ts → epic/epic-read.ts} +9 -9
- package/scripts/{git/git-epic-reconcile.ts → epic/epic-reconcile.ts} +18 -20
- package/scripts/{git/git-epic-reference.ts → epic/epic-reference.ts} +4 -23
- package/scripts/epic/epic-relation-recheck.ts +4 -3
- package/scripts/{git/git-epic-relations.ts → epic/epic-relations.ts} +5 -5
- package/scripts/{git/git-epic-remove-plan.ts → epic/epic-remove-plan.ts} +17 -19
- package/scripts/{git/git-epic-remove.ts → epic/epic-remove.ts} +13 -13
- package/scripts/{git/git-epic-run.ts → epic/epic-run.ts} +27 -27
- package/scripts/{git/git-epic-sections.ts → epic/epic-sections.ts} +6 -6
- package/scripts/{git/git-epic-shape.ts → epic/epic-shape.ts} +7 -7
- package/scripts/epic/epic-solo.ts +29 -28
- package/scripts/{git/git-epic-validate.ts → epic/epic-validate.ts} +13 -13
- package/{scripts-ai → scripts/epic}/epic.ts +17 -16
- package/scripts/gh/fix-gh-packages.ts +2 -1
- package/scripts/gh/gh-spawn.ts +12 -10
- package/scripts/git/constants.ts +1 -1
- package/scripts/git/git-branch.ts +10 -1
- package/scripts/git/git-command.ts +2 -2
- package/scripts/git/git-error.ts +2 -5
- package/scripts/git/git-execa-error.ts +6 -1
- package/{scripts-ai → scripts/git}/git-followup-finish.ts +7 -7
- package/scripts/git/git-followup-flush.ts +74 -48
- package/scripts/git/git-followup-issue-close.ts +2 -2
- package/scripts/git/git-followup-label.ts +1 -1
- package/scripts/git/git-followup-pending.ts +1 -1
- package/{scripts-ai → scripts/git}/git-followup-workflow.ts +23 -11
- package/scripts/git/git-gh-exec.ts +85 -26
- package/scripts/git/git-gh-issue-read.ts +2 -2
- package/scripts/git/git-gh-issue-rest.ts +2 -2
- package/scripts/git/git-gh-issue-write.ts +6 -6
- package/scripts/git/git-gh-pr-read.ts +0 -21
- package/scripts/git/git-gh-pr.ts +2 -23
- package/scripts/git/git-next-issues.ts +34 -5
- package/scripts/git/git-pr-followup-wrapup.ts +2 -6
- package/scripts/git/git-preflight.ts +25 -10
- package/scripts/git/git-push-transport.ts +12 -69
- package/scripts/git/git-spawn.ts +79 -3
- package/scripts/git/git-ssh-keepalive.ts +74 -0
- package/scripts/git/git-staging.ts +21 -9
- package/{scripts-ai → scripts/git}/git-workflow.ts +11 -11
- package/scripts/git/github-issue-url.ts +1 -1
- package/scripts/git/gone-branch.ts +3 -2
- package/scripts/git/issue-labels.ts +13 -1
- package/scripts/git/issue-rank.ts +89 -0
- package/scripts/git/issue-reference.ts +19 -0
- package/scripts/git/main-merge.ts +2 -1
- package/scripts/git/main-sync.ts +3 -2
- package/scripts/git/schemas.ts +1 -1
- package/scripts/git/stash-pop-args.ts +7 -13
- package/scripts/git/stash-pop-cli.ts +2 -1
- package/{scripts-ai → scripts/git}/telegram-test-logic.ts +2 -2
- package/{scripts-ai → scripts/git}/telegram-test.ts +7 -7
- package/scripts/hooks/format-edited-cli.ts +15 -0
- package/scripts/hooks/format-edited-file.ts +2 -9
- package/scripts/hooks/format-rewrite-notice.ts +2 -8
- package/scripts/hooks/pretool-guard-cli.ts +21 -0
- package/scripts/hooks/pretool-guard.ts +14 -15
- package/scripts/init/init-ai-copy.ts +2 -5
- package/scripts/init/init.ts +8 -4
- package/scripts/init/start-exec.ts +7 -1
- package/scripts/init/start-plan.ts +18 -5
- package/scripts/init/start-setup-pr.ts +46 -19
- package/scripts/init/start-steps.ts +43 -10
- package/scripts/init/start.ts +42 -11
- package/scripts/issue/issue-cite.ts +19 -1
- package/scripts/issue/issue-comment-cli.ts +2 -1
- package/scripts/issue/issue-file-cli.ts +2 -1
- package/scripts/issue/issue-fold-cli.ts +9 -16
- package/scripts/issue/issue-scout-cli.ts +8 -13
- package/scripts/issue/measure-rerun-cli.ts +7 -6
- package/scripts/josh/josh-command-map.ts +0 -102
- package/scripts/josh/josh-commands-ai.ts +2 -2
- package/scripts/josh/josh-commands-backlog.ts +1 -1
- package/scripts/josh/josh-commands-development.ts +3 -3
- package/scripts/josh/josh-commands-project.ts +1 -1
- package/scripts/josh/josh-commands-workflow.ts +4 -4
- package/scripts/lane/lane-child-marker.ts +16 -2
- package/scripts/lane/lane-cli.ts +34 -15
- package/scripts/lane/lane-open.ts +3 -2
- package/scripts/lane/lane-registry.ts +3 -6
- package/scripts/lane/lane-report.ts +10 -4
- package/scripts/lib/cli-flags.ts +20 -2
- package/scripts/lib/error-message.ts +9 -0
- package/scripts/lib/read-file.ts +26 -2
- package/scripts/observations/observation-ledger-home.ts +98 -26
- package/scripts/observations/observation-ledger-migrate.ts +26 -21
- package/scripts/observations/observation-ledger-prepare.ts +10 -20
- package/scripts/observations/observation-ledger.ts +58 -25
- package/scripts/observations/observations-flush-cli.ts +6 -23
- package/scripts/observations/observations-flush-landing.ts +2 -1
- package/scripts/observations/observations-flush.ts +29 -20
- package/scripts/package/package-scout-cli.ts +8 -16
- package/scripts/ports/port-command.ts +2 -1
- package/scripts/propagate/propagate-plan.ts +185 -0
- package/scripts/propagate/propagate-publish.ts +6 -7
- package/scripts/propagate/propagate-run.ts +5 -1
- package/scripts/propagate/propagate-steps.ts +18 -2
- package/scripts/propagate/propagate-targets.ts +13 -2
- package/scripts/propagate/propagate.ts +63 -44
- package/scripts/refactor/import-graph.ts +2 -6
- package/scripts/registry-migration/migrate-logic.ts +1 -0
- package/scripts/registry-migration/migrate.ts +3 -2
- package/scripts/registry-migration/user-npmrc.ts +2 -2
- package/scripts/release/github-release.ts +1 -1
- package/scripts/release/release-cli.ts +2 -1
- package/scripts/repo/repo-setting.ts +10 -8
- package/scripts/review/review-attest.ts +44 -0
- package/scripts/review/review-brief-cli.ts +49 -2
- package/scripts/review/review-brief.ts +46 -1
- package/scripts/review/review-finding-ledger.ts +3 -3
- package/scripts/review/review-findings-cli.ts +4 -11
- package/scripts/review/review-record-cli.ts +14 -11
- package/scripts/review/review-record.ts +6 -16
- package/scripts/review/review-stamps.ts +7 -0
- package/scripts/rules/decision-oracle.ts +2 -2
- package/scripts/rules/implementation-cut.ts +1 -1
- package/scripts/rules/issue-fold.ts +1 -2
- package/scripts/rules/lane-carry-conflict.ts +1 -2
- package/scripts/rules/lane-park.ts +1 -2
- package/scripts/rules/pre-gate-cut.ts +2 -2
- package/scripts/rules/rule-body-guard.ts +2 -2
- package/scripts/rules/rule-value-cache.ts +99 -0
- package/scripts/rules/rule-value-cli.ts +10 -9
- package/scripts/rules/rule-value.ts +1 -1
- package/scripts/run/run-carry-args.ts +2 -6
- package/scripts/run/run-carry-cli.ts +5 -7
- package/scripts/run/run-cut-args.ts +7 -13
- package/scripts/run/run-ending-cli.ts +4 -7
- package/scripts/run/run-event-stream.ts +2 -5
- package/scripts/run/run-headless.ts +22 -6
- package/scripts/run/run-liveness-cli.ts +4 -7
- package/scripts/run/run-parent-cut-hook.ts +144 -0
- package/scripts/run/run-progress-args.ts +2 -6
- package/scripts/run/run-progress-cli.ts +2 -1
- package/scripts/run/run-progress-read.ts +2 -1
- package/scripts/run/run-progress.ts +21 -8
- package/scripts/run/run-ship-cli.ts +6 -74
- package/scripts/run/run-ship-preflight.ts +87 -0
- package/scripts/run/run-ship-review-steps.ts +5 -26
- package/scripts/run/run-ship-review.ts +9 -0
- package/scripts/run/run-ship-scoped.ts +44 -0
- package/scripts/run/run-ship-stage.ts +5 -1
- package/scripts/run/run-ship-steps.ts +105 -0
- package/scripts/run/run-ship.ts +2 -0
- package/scripts/run/run-tail-cli.ts +3 -3
- package/scripts/run/run-tidy-stashes.ts +7 -14
- package/scripts/run/run-wake-cli.ts +4 -8
- package/scripts/run/run-wake-describe.ts +19 -1
- package/scripts/run/run-wake-driver.ts +15 -2
- package/scripts/run/run-wake-session.ts +14 -4
- package/scripts/run/run-watcher-hook.ts +1 -1
- package/scripts/safe-chain/project-config.ts +3 -6
- package/scripts/security/security-audit-provision.ts +6 -7
- package/scripts/sonar/sonar-hotspots-cli.ts +2 -1
- package/scripts/sync/directory-copy-guard.ts +2 -1
- package/scripts/sync/sync-ai-files.ts +3 -3
- package/scripts/sync/template-source-logic.ts +3 -4
- package/scripts/test/e2e-retry-check.ts +3 -6
- package/scripts/time-runtime/time-bundle-call.ts +2 -2
- package/scripts/ui/ui-routes-cli.ts +3 -6
- package/scripts/version/bump-version.ts +2 -1
- package/scripts/version/npm-registry.ts +97 -0
- package/scripts/version/version-commands.ts +5 -4
- package/scripts/version/version-remote.ts +38 -33
- package/scripts/version/version-targets.ts +3 -3
- package/.claude/skills/workflow-commands/rule-residency.md +0 -267
- package/evals/scenarios/consult-not-execute.json +0 -20
- package/evals/scenarios/no-implicit-workflow.json +0 -26
- package/evals/scenarios/overrides-both-locations.json +0 -29
- package/evals/scenarios/upstream-interrupt.json +0 -23
- package/evals/scenarios/workflow-skill-loaded.json +0 -16
- package/prompts/agent-lint-protocol.json +0 -79
- package/prompts/agent-rules.md +0 -63
- package/prompts/collaboration-workflow/consultation-vs-execution.md +0 -8
- package/prompts/collaboration-workflow/distributed-docs.md +0 -7
- package/prompts/collaboration-workflow/durable-rules.md +0 -24
- package/prompts/collaboration-workflow/latest-first.md +0 -14
- package/prompts/collaboration-workflow/no-clones.md +0 -11
- package/prompts/collaboration-workflow/simplicity-first.md +0 -9
- package/prompts/collaboration-workflow/single-source-rules.md +0 -13
- package/scripts/build/shim-shell.ts +0 -25
- package/scripts/claude/skill-meta.ts +0 -37
- package/scripts/document/document-scan.ts +0 -108
- package/scripts/document/generate-catalog.ts +0 -69
- package/scripts/document/retired-phrases.ts +0 -143
- package/scripts/document/review-agent-type.ts +0 -46
- package/scripts/document/single-source.ts +0 -73
- package/scripts/git/git-fixture-workspace.ts +0 -88
- package/scripts/hooks/format-edited-file-fixtures.ts +0 -109
- package/scripts/hooks/prompt-hooks.ts +0 -38
- package/scripts/init/hook-command-bootstrap.ts +0 -83
- package/scripts/issue/issue-logic.ts +0 -50
- package/scripts/josh/__snapshots__/josh-command-map.test.ts.snap +0 -1227
- package/scripts/josh/josh-script-reader.ts +0 -11
- package/scripts/package/production-dependency-graph.ts +0 -68
- package/scripts/retrospective/retrospective-cli.ts +0 -97
- package/scripts/retrospective/retrospective.ts +0 -127
- package/scripts/rules/delivered-rules-harness.ts +0 -72
- package/scripts/rules/top-level-scripts-guard.ts +0 -47
- package/scripts/run/run-carry-flush.ts +0 -58
- package/scripts/run/run-transcript.golden.txt +0 -57
- package/scripts/run/run-wake-work.ts +0 -108
- package/scripts/sync/dependabot-pin-logic.ts +0 -135
- package/scripts/test/classify-isolation.ts +0 -149
- package/scripts/test/http-fault-injection.ts +0 -79
- package/scripts/test/josh-harness-environment.ts +0 -260
- package/scripts/test/josh-harness.ts +0 -96
- package/scripts/test/pilot-files.ts +0 -452
- package/scripts/test/pilot-measure.ts +0 -78
- package/scripts/test/test-network-guard.ts +0 -453
- package/scripts/test/test-repository-guard.ts +0 -317
- package/scripts/test/test-state-guard.ts +0 -85
- package/scripts/test/test-stdout-guard.ts +0 -54
- package/scripts/test/test-telegram-guard.ts +0 -90
- package/scripts/test/unit-guard-environment.ts +0 -12
- package/scripts/test/unit-projects.ts +0 -139
- package/scripts/test/vitest-include-globs.ts +0 -12
- package/scripts/time-runtime/time-batch-guard-fixtures.ts +0 -66
- package/scripts-ai/completion-gate.ts +0 -13
- package/scripts-ai/environment-loader.ts +0 -9
- /package/{scripts-ai → scripts/epic}/epic-cli-argv.ts +0 -0
- /package/{scripts-ai → scripts/epic}/epic-cli-remove.ts +0 -0
- /package/{scripts-ai → scripts/git}/followup-issue-number.ts +0 -0
package/dist/josh.js
CHANGED
|
@@ -1,9 +1,35 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
// scripts/doctor/doctor-consumer.ts
|
|
4
|
-
import { existsSync
|
|
4
|
+
import { existsSync } from "node:fs";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
|
|
7
|
+
// scripts/lib/read-file.ts
|
|
8
|
+
import { readFileSync } from "node:fs";
|
|
9
|
+
var ABSENT_CODE = "ENOENT";
|
|
10
|
+
function is_absent(error) {
|
|
11
|
+
return error instanceof Error && "code" in error && error.code === ABSENT_CODE;
|
|
12
|
+
}
|
|
13
|
+
function read_optional(path5) {
|
|
14
|
+
try {
|
|
15
|
+
return readFileSync(path5, "utf8");
|
|
16
|
+
} catch (error) {
|
|
17
|
+
if (is_absent(error)) return void 0;
|
|
18
|
+
throw error;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function read_file_or_empty(path5) {
|
|
22
|
+
return read_optional(path5) ?? "";
|
|
23
|
+
}
|
|
24
|
+
function read_if_readable(path5) {
|
|
25
|
+
try {
|
|
26
|
+
return readFileSync(path5, "utf8");
|
|
27
|
+
} catch {
|
|
28
|
+
return void 0;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
var file_reader = { read_optional, read_file_or_empty, read_if_readable };
|
|
32
|
+
|
|
7
33
|
// scripts/lib/spawn-exit.ts
|
|
8
34
|
var SPAWN_ERROR_EXIT_CODE = 2;
|
|
9
35
|
var SIGNAL_KILL_EXIT_CODE = 1;
|
|
@@ -50,15 +76,8 @@ var settings_schema = z.object({
|
|
|
50
76
|
var STATE_OK = "ok";
|
|
51
77
|
var STATE_TARGET_MISSING = "target-missing";
|
|
52
78
|
var STATE_MISSING = "missing";
|
|
53
|
-
function read_optional(file_path) {
|
|
54
|
-
try {
|
|
55
|
-
return existsSync(file_path) ? readFileSync(file_path, "utf8") : void 0;
|
|
56
|
-
} catch {
|
|
57
|
-
return void 0;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
79
|
function parse_manifest(root) {
|
|
61
|
-
const content =
|
|
80
|
+
const content = file_reader.read_if_readable(path.join(root, "package.json"));
|
|
62
81
|
if (content === void 0) return void 0;
|
|
63
82
|
const parsed = manifest_schema.safeParse(safe_json_parse(content));
|
|
64
83
|
return parsed.success ? parsed.data : void 0;
|
|
@@ -73,7 +92,7 @@ function is_kit_consumer(root) {
|
|
|
73
92
|
return lists_kit_dependency(manifest) || existsSync(path.join(root, NODE_MODULES, KIT_PACKAGE_NAME));
|
|
74
93
|
}
|
|
75
94
|
function is_plugin_declared(root) {
|
|
76
|
-
const content =
|
|
95
|
+
const content = file_reader.read_if_readable(path.join(root, SETTINGS_PATH));
|
|
77
96
|
if (content === void 0) return false;
|
|
78
97
|
const parsed = settings_schema.safeParse(safe_json_parse(content));
|
|
79
98
|
return parsed.success && parsed.data.enabledPlugins?.[PLUGIN_ID] === true;
|
|
@@ -87,7 +106,7 @@ function configured_hooks_path(root) {
|
|
|
87
106
|
return value === "" ? void 0 : value;
|
|
88
107
|
}
|
|
89
108
|
function claude_md_state(root) {
|
|
90
|
-
const content =
|
|
109
|
+
const content = file_reader.read_if_readable(path.join(root, CLAUDE_MD));
|
|
91
110
|
if (content === void 0) return STATE_MISSING;
|
|
92
111
|
if (!content.includes(CLAUDE_MD_POINTER)) return STATE_OK;
|
|
93
112
|
return existsSync(path.join(root, NODE_MODULES, KIT_PACKAGE_NAME, "dist", CLAUDE_MD)) ? STATE_OK : STATE_TARGET_MISSING;
|
|
@@ -313,7 +332,7 @@ var BACKLOG_COMMANDS = {
|
|
|
313
332
|
script: "scripts/backlog/backlog-offer-cli.ts",
|
|
314
333
|
description: "Collapse a backlogrun loop-head event into one call: read backlog:next, ask backlog:budget, return the verdict and any issues to start",
|
|
315
334
|
category: "AI tools",
|
|
316
|
-
reference: ["[options]", "automation", ["network"]]
|
|
335
|
+
reference: ["[options]", "automation", ["files", "network", "processes"]]
|
|
317
336
|
},
|
|
318
337
|
"backlog:drive": {
|
|
319
338
|
script: "scripts/backlog/backlog-drive-cli.ts",
|
|
@@ -550,7 +569,7 @@ var AI_COMMANDS = {
|
|
|
550
569
|
reference: ["<message>", "automation", ["git"]]
|
|
551
570
|
},
|
|
552
571
|
epic: {
|
|
553
|
-
script: "scripts
|
|
572
|
+
script: "scripts/epic/epic.ts",
|
|
554
573
|
description: "Create an epic issue from its child issue numbers",
|
|
555
574
|
category: "AI tools",
|
|
556
575
|
reference: ["<title> <issue...> [--ordered]", "automation", ["network"]]
|
|
@@ -574,7 +593,7 @@ var AI_COMMANDS = {
|
|
|
574
593
|
reference: ["<epic>", "automation", ["network"]]
|
|
575
594
|
},
|
|
576
595
|
"epic:check": {
|
|
577
|
-
script: "scripts
|
|
596
|
+
script: "scripts/epic/epic-check.ts",
|
|
578
597
|
description: "Check an epic issue against the tracking requirements",
|
|
579
598
|
category: "AI tools",
|
|
580
599
|
reference: ["<epic>", "automation", ["network"]]
|
|
@@ -901,7 +920,7 @@ var DEV_COMMANDS = {
|
|
|
901
920
|
script: "scripts/rules/rule-value-cli.ts",
|
|
902
921
|
description: "Print each delivered rule's unaided compliance \u2014 runs reached, kept rate, refusals",
|
|
903
922
|
category: "AI tools",
|
|
904
|
-
reference: ["", "developer", ["
|
|
923
|
+
reference: ["[--refresh]", "developer", ["files"]]
|
|
905
924
|
},
|
|
906
925
|
format: {
|
|
907
926
|
script: "scripts/lint/format.ts",
|
|
@@ -910,7 +929,7 @@ var DEV_COMMANDS = {
|
|
|
910
929
|
reference: ["", "developer", ["files", "processes"]]
|
|
911
930
|
},
|
|
912
931
|
"format:edited": {
|
|
913
|
-
script: "scripts/hooks/format-edited-
|
|
932
|
+
script: "scripts/hooks/format-edited-cli.ts",
|
|
914
933
|
description: "Claude Code hook: format the file just edited (reads the tool call on stdin)",
|
|
915
934
|
category: "Development",
|
|
916
935
|
reference: ["", "automation", ["files", "processes"]]
|
|
@@ -928,7 +947,7 @@ var DEV_COMMANDS = {
|
|
|
928
947
|
// node's own `--env-file` parser with node's own precedence.
|
|
929
948
|
},
|
|
930
949
|
"pretool:guard": {
|
|
931
|
-
script: "scripts/hooks/pretool-guard.ts",
|
|
950
|
+
script: "scripts/hooks/pretool-guard-cli.ts",
|
|
932
951
|
description: "Claude Code hook: the batch, investigation and rule guards in one process (reads the tool call on stdin)",
|
|
933
952
|
category: "Development",
|
|
934
953
|
reference: ["", "automation", ["none"]]
|
|
@@ -1186,7 +1205,7 @@ var PROJECT_COMMANDS = {
|
|
|
1186
1205
|
description: "Set a project up for the GitHub Issue workflow, from git init to the setup PR",
|
|
1187
1206
|
category: "Project",
|
|
1188
1207
|
reference: [
|
|
1189
|
-
`${PROFILE_ARGUMENTS} [--yes] [--github] [--public]`,
|
|
1208
|
+
`${PROFILE_ARGUMENTS} [--yes] [--github] [--public] [--init-command <command>]`,
|
|
1190
1209
|
"developer",
|
|
1191
1210
|
["files", "git", "network", "processes"]
|
|
1192
1211
|
]
|
|
@@ -1294,7 +1313,7 @@ var VERSIONING_COMMANDS = {
|
|
|
1294
1313
|
};
|
|
1295
1314
|
|
|
1296
1315
|
// scripts/josh/josh-commands-workflow.ts
|
|
1297
|
-
var GIT_WORKFLOW_SCRIPT = "scripts
|
|
1316
|
+
var GIT_WORKFLOW_SCRIPT = "scripts/git/git-workflow.ts";
|
|
1298
1317
|
var GIT_MESSAGE_ARGUMENTS = "[-y] <message>";
|
|
1299
1318
|
var WORKFLOW_COMMANDS = {
|
|
1300
1319
|
git: {
|
|
@@ -1319,7 +1338,7 @@ var WORKFLOW_COMMANDS = {
|
|
|
1319
1338
|
// session, and `followup` with them the merge step of every `fullrun` there. `doctor` was moved to
|
|
1320
1339
|
// this form for the same reason in joshuafolkken/kit#869.
|
|
1321
1340
|
//
|
|
1322
|
-
// Nothing is lost by relaxing it: both scripts already
|
|
1341
|
+
// Nothing is lost by relaxing it: both scripts already load `.env` through `josh_environment_file`
|
|
1323
1342
|
// themselves, so the file is read either way and node's precedence — an existing environment
|
|
1324
1343
|
// variable wins over the file — is node's own in both spellings.
|
|
1325
1344
|
//
|
|
@@ -1327,7 +1346,7 @@ var WORKFLOW_COMMANDS = {
|
|
|
1327
1346
|
// than dropped: `telegram_notify.send` now throws on missing credentials and on a failed send, so
|
|
1328
1347
|
// `josh notify` exits non-zero instead of warning and answering 0.
|
|
1329
1348
|
followup: {
|
|
1330
|
-
script: "scripts
|
|
1349
|
+
script: "scripts/git/git-followup-workflow.ts",
|
|
1331
1350
|
description: "Follow-up git workflow",
|
|
1332
1351
|
category: "Workflow",
|
|
1333
1352
|
reference: [
|
|
@@ -1338,7 +1357,7 @@ var WORKFLOW_COMMANDS = {
|
|
|
1338
1357
|
tsx_arguments: OPTIONAL_ENV_FILE_FLAGS
|
|
1339
1358
|
},
|
|
1340
1359
|
notify: {
|
|
1341
|
-
script: "scripts
|
|
1360
|
+
script: "scripts/git/telegram-test.ts",
|
|
1342
1361
|
description: "Send Telegram notification",
|
|
1343
1362
|
category: "Workflow",
|
|
1344
1363
|
reference: ["--task-type <type> --body <text>", "automation", ["notifications"]],
|
|
@@ -1431,8 +1450,6 @@ var ALIASES = {
|
|
|
1431
1450
|
ln: "lines",
|
|
1432
1451
|
by: "bytes",
|
|
1433
1452
|
f: "format",
|
|
1434
|
-
fd: "format:edited",
|
|
1435
|
-
bg: "batch:guard",
|
|
1436
1453
|
sd: "cspell:dot",
|
|
1437
1454
|
bh: "behavior",
|
|
1438
1455
|
t: "test",
|
|
@@ -1441,8 +1458,6 @@ var ALIASES = {
|
|
|
1441
1458
|
td: "test:declared",
|
|
1442
1459
|
trd: "test:red",
|
|
1443
1460
|
te: "test:e2e",
|
|
1444
|
-
er: "e2e:retry-check",
|
|
1445
|
-
sl: "session:lang",
|
|
1446
1461
|
c: "check",
|
|
1447
1462
|
pt: "port",
|
|
1448
1463
|
i: "init",
|
|
@@ -1450,19 +1465,12 @@ var ALIASES = {
|
|
|
1450
1465
|
st: "start",
|
|
1451
1466
|
sy: "sync",
|
|
1452
1467
|
rmi: "registry:migrate",
|
|
1453
|
-
sys: "sync:scope",
|
|
1454
1468
|
g: "git",
|
|
1455
1469
|
gp: "pr",
|
|
1456
|
-
prc: "pr:classification",
|
|
1457
|
-
fu: "followup",
|
|
1458
|
-
nf: "notify",
|
|
1459
|
-
obf: "observations:flush",
|
|
1460
|
-
mrr: "measure:rerun",
|
|
1461
1470
|
ms: "main:sync",
|
|
1462
1471
|
mm: "main:merge",
|
|
1463
1472
|
bp: "bump",
|
|
1464
1473
|
re: "release",
|
|
1465
|
-
res: "release:scope",
|
|
1466
1474
|
v: "version",
|
|
1467
1475
|
r: "ranges",
|
|
1468
1476
|
dr: "doctor",
|
|
@@ -1470,107 +1478,16 @@ var ALIASES = {
|
|
|
1470
1478
|
ad: "adopt",
|
|
1471
1479
|
ov: "overrides",
|
|
1472
1480
|
a: "audit",
|
|
1473
|
-
ap: "audit:provision",
|
|
1474
1481
|
rt: "reconcile-templates",
|
|
1475
1482
|
u: "latest",
|
|
1476
|
-
lg: "latest:guard",
|
|
1477
1483
|
lc: "latest:corepack",
|
|
1478
1484
|
lu: "latest:update",
|
|
1479
|
-
ls: "latest:scope",
|
|
1480
|
-
pm: "prevent-main-commit",
|
|
1481
|
-
cm: "check-commit-message",
|
|
1482
|
-
ss: "secretlint-scan",
|
|
1483
|
-
ppu: "pre-push-unit",
|
|
1484
|
-
rer: "reserved-run",
|
|
1485
|
-
ptc: "pre-commit-type-check",
|
|
1486
|
-
ird: "issue:read",
|
|
1487
|
-
ist: "issue:state",
|
|
1488
|
-
isc: "issue:scout",
|
|
1489
|
-
ifl: "issue:file",
|
|
1490
|
-
isf: "issue:fold",
|
|
1491
|
-
isfe: "issue:fold-existing",
|
|
1492
|
-
dfr: "defect:rate",
|
|
1493
|
-
ici: "issue:cite",
|
|
1494
|
-
icm: "issue:comment",
|
|
1495
|
-
pks: "pkg:scout",
|
|
1496
|
-
iln: "issue:lint",
|
|
1497
|
-
ibl: "issue:backlinks",
|
|
1498
|
-
rl: "report:lint",
|
|
1499
|
-
ep: "epic",
|
|
1500
|
-
ec: "epic:check",
|
|
1501
|
-
en: "epic:next",
|
|
1502
|
-
ea: "epic:audit",
|
|
1503
|
-
eb: "epic:bundle",
|
|
1504
|
-
ao: "auto-ok:next",
|
|
1505
|
-
bl: "backlog:next",
|
|
1506
|
-
blo: "backlog:offer",
|
|
1507
|
-
bld: "backlog:drive",
|
|
1508
|
-
blp: "backlog:plan",
|
|
1509
|
-
bls: "backlog:stalled",
|
|
1510
|
-
bb: "backlog:budget",
|
|
1511
|
-
co: "cost",
|
|
1512
|
-
ds: "doc:section",
|
|
1513
|
-
rs: "read:set",
|
|
1514
|
-
dcr: "doc:read",
|
|
1515
|
-
rf: "read:files",
|
|
1516
|
-
ef: "edit:files",
|
|
1517
|
-
rfs: "refactor:scan",
|
|
1518
1485
|
tm: "time",
|
|
1519
1486
|
tmd: "time:density",
|
|
1520
1487
|
rtr: "retrospective",
|
|
1521
|
-
rb: "review:brief",
|
|
1522
|
-
r2: "review:round2",
|
|
1523
|
-
ra: "review:attest",
|
|
1524
|
-
rvr: "review:record",
|
|
1525
1488
|
rvf: "review:findings",
|
|
1526
|
-
dp: "disposition",
|
|
1527
|
-
dg: "delegate",
|
|
1528
|
-
fo: "fanout",
|
|
1529
|
-
rh: "run:hold",
|
|
1530
|
-
rr: "run:release",
|
|
1531
|
-
rc: "run:carry",
|
|
1532
|
-
rtd: "run:tidy",
|
|
1533
|
-
rw: "run:wake",
|
|
1534
|
-
rct: "run:cut",
|
|
1535
|
-
rv: "run:liveness",
|
|
1536
|
-
red: "run:ending",
|
|
1537
|
-
rg: "run:progress",
|
|
1538
|
-
rp: "run:prep",
|
|
1539
|
-
ren: "run:entry",
|
|
1540
|
-
rtl: "run:tail",
|
|
1541
|
-
shp: "ship",
|
|
1542
|
-
rst: "run:status",
|
|
1543
|
-
rn: "run:next",
|
|
1544
|
-
rsp: "run:step",
|
|
1545
|
-
rpy: "repo:party",
|
|
1546
|
-
rmg: "run:merge",
|
|
1547
|
-
rrp: "run:report",
|
|
1548
|
-
rrv: "run:review",
|
|
1549
|
-
rev: "run:event",
|
|
1550
|
-
sp: "stash:pop",
|
|
1551
|
-
lno: "lane:open",
|
|
1552
|
-
lnc: "lane:close",
|
|
1553
|
-
lnl: "lane:list",
|
|
1554
|
-
lnp: "lane:prune",
|
|
1555
|
-
lnv: "lane:output",
|
|
1556
|
-
lnd: "lane:dispatch",
|
|
1557
|
-
lna: "lane:await",
|
|
1558
|
-
lnla: "lane:launch",
|
|
1559
|
-
rwg: "run:watcher:guard",
|
|
1560
|
-
rsd: "run:stranded",
|
|
1561
|
-
ig: "investigation:guard",
|
|
1562
|
-
drg: "duplicate-read:guard",
|
|
1563
|
-
rug: "rule:guard",
|
|
1564
1489
|
ruv: "rule:value",
|
|
1565
|
-
|
|
1566
|
-
sg: "stop:guard",
|
|
1567
|
-
ev: "eval",
|
|
1568
|
-
ol: "oracle:list",
|
|
1569
|
-
sa: "split:assess",
|
|
1570
|
-
shs: "sonar:hotspots",
|
|
1571
|
-
uir: "ui:routes",
|
|
1572
|
-
cs: "clone:scan",
|
|
1573
|
-
ca: "cases"
|
|
1490
|
+
ev: "eval"
|
|
1574
1491
|
};
|
|
1575
1492
|
|
|
1576
1493
|
// scripts/josh/josh-composite-arguments.ts
|