@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,20 @@
|
|
|
1
|
+
// scripts/lib/ancestor-directories.ts
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
var MAX_DEPTH = 64;
|
|
4
|
+
function list(start_directory) {
|
|
5
|
+
const directories = [];
|
|
6
|
+
let current = path.resolve(start_directory);
|
|
7
|
+
while (directories.length < MAX_DEPTH && !directories.includes(current)) {
|
|
8
|
+
directories.push(current);
|
|
9
|
+
current = path.dirname(current);
|
|
10
|
+
}
|
|
11
|
+
return directories;
|
|
12
|
+
}
|
|
13
|
+
function nearest(start_directory, is_match) {
|
|
14
|
+
return list(start_directory).find((directory) => is_match(directory));
|
|
15
|
+
}
|
|
16
|
+
var ancestor_directories = { list, nearest };
|
|
17
|
+
|
|
18
|
+
export {
|
|
19
|
+
ancestor_directories
|
|
20
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import {
|
|
2
|
+
lane_child_marker
|
|
3
|
+
} from "./chunk-LAOV7NLM.js";
|
|
4
|
+
|
|
5
|
+
// scripts/lane/lane-guard-policy.ts
|
|
6
|
+
var DEFAULT_MODE = "refuse";
|
|
7
|
+
var OFF_MODE = "off";
|
|
8
|
+
var LANE_GUARD_POLICY = [
|
|
9
|
+
{
|
|
10
|
+
id: "investigation",
|
|
11
|
+
mode_in_lane_child: "refuse",
|
|
12
|
+
because: "the notice was measured not to move the reading \u2014 52% of lane cost stayed in main-line exploration \u2014 and the refusal fires once per accumulation, a round trip the child survives as it survives the rule row, so the child is refused like the main line"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
id: "batching",
|
|
16
|
+
mode_in_lane_child: "off",
|
|
17
|
+
because: "a refusal ends a child turn and every advisory notice was measured not to move the call density, so the guard is off and the density stays readable through `josh time:density`"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
id: "duplicate-read",
|
|
21
|
+
mode_in_lane_child: "notice",
|
|
22
|
+
because: "a refusal ends a child turn, yet unchanged re-reads are measured in lane children above all, so the child is nudged to scroll up to the earlier read by a notice rather than killed"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: "rule",
|
|
26
|
+
mode_in_lane_child: "refuse",
|
|
27
|
+
because: "it carries the lane-only rules a child depends on (`pre-gate-cut`, `implementation-cut`, `lane-park`) and the safety rules it must still obey, and a notice was rejected despite the collateral a refusal costs a batched sibling, because a cut carried as prose was measured never to fire"
|
|
28
|
+
}
|
|
29
|
+
];
|
|
30
|
+
var KNOWN_GUARD_IDS = LANE_GUARD_POLICY.map((entry) => entry.id);
|
|
31
|
+
function entry_for(id) {
|
|
32
|
+
return LANE_GUARD_POLICY.find((entry) => entry.id === id.trim());
|
|
33
|
+
}
|
|
34
|
+
function mode_in_lane_child(id) {
|
|
35
|
+
return entry_for(id)?.mode_in_lane_child ?? DEFAULT_MODE;
|
|
36
|
+
}
|
|
37
|
+
function mode_here(id, directory = process.cwd(), source = process.env) {
|
|
38
|
+
const lane_mode = mode_in_lane_child(id);
|
|
39
|
+
if (lane_mode === DEFAULT_MODE) return DEFAULT_MODE;
|
|
40
|
+
return lane_child_marker.is_child_of(directory, source) ? lane_mode : DEFAULT_MODE;
|
|
41
|
+
}
|
|
42
|
+
function is_suppressed_here(id, directory = process.cwd(), source = process.env) {
|
|
43
|
+
return mode_here(id, directory, source) === OFF_MODE;
|
|
44
|
+
}
|
|
45
|
+
var lane_guard_policy = {
|
|
46
|
+
LANE_GUARD_POLICY,
|
|
47
|
+
KNOWN_GUARD_IDS,
|
|
48
|
+
entry_for,
|
|
49
|
+
mode_in_lane_child,
|
|
50
|
+
mode_here,
|
|
51
|
+
is_suppressed_here
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export {
|
|
55
|
+
lane_guard_policy
|
|
56
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// scripts/init/distributed-paths.ts
|
|
2
|
+
var KIT_PACKAGE_PATH_PREFIX = "node_modules/@joshuafolkken/kit/";
|
|
3
|
+
var PROMPTS_PACKAGE_PREFIX = `${KIT_PACKAGE_PATH_PREFIX}prompts/`;
|
|
4
|
+
var ESLINT_PACKAGE_PREFIX = `${KIT_PACKAGE_PATH_PREFIX}eslint/`;
|
|
5
|
+
var GITHUB_REPO_BLOB_BASE = "https://github.com/joshuafolkken/kit/blob/main/";
|
|
6
|
+
var GITHUB_REPO_TREE_BASE = "https://github.com/joshuafolkken/kit/tree/main/";
|
|
7
|
+
var CLAUDE_MD_IMPORT_LINE = "@node_modules/@joshuafolkken/kit/dist/CLAUDE.md";
|
|
8
|
+
var OLD_CLAUDE_MD_BOOTSTRAP = "> Fresh checkout: if kit is not installed, run `pnpm install` first, then reread this file before doing any other work.";
|
|
9
|
+
var CLAUDE_MD_BOOTSTRAP = '> Fresh checkout: before `pnpm install`, run `pnpm config get "@joshuafolkken:registry"` from the project root to check the effective registry, including user-level settings. If it points to GitHub Packages, [set up authentication](https://github.com/joshuafolkken/kit/blob/main/docs/authentication.md#1-get-a-token-from-the-gh-cli) first. Then run `pnpm install` and reread this file before doing any other work.';
|
|
10
|
+
function transform_prompt_paths(content) {
|
|
11
|
+
return content.replaceAll(
|
|
12
|
+
/`prompts\/([^`*]+)`/gu,
|
|
13
|
+
(_match, prompt_path) => `\`${PROMPTS_PACKAGE_PREFIX}${prompt_path}\``
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
function transform_eslint_paths(content) {
|
|
17
|
+
return content.replaceAll(
|
|
18
|
+
/`eslint\/([^`*]+)`/gu,
|
|
19
|
+
(_match, eslint_path) => `\`${ESLINT_PACKAGE_PREFIX}${eslint_path}\``
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
function transform_test_file_paths(content) {
|
|
23
|
+
return content.replaceAll(
|
|
24
|
+
/`([^`*]+\.(?:test|spec)\.ts)`/gu,
|
|
25
|
+
(_match, test_path) => `\`${GITHUB_REPO_BLOB_BASE}${test_path}\``
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
function github_url_base(reference_path) {
|
|
29
|
+
return reference_path.endsWith("/") ? GITHUB_REPO_TREE_BASE : GITHUB_REPO_BLOB_BASE;
|
|
30
|
+
}
|
|
31
|
+
function transform_documentation_paths(content) {
|
|
32
|
+
return content.replaceAll(
|
|
33
|
+
/`(docs\/[^`*]*)`/gu,
|
|
34
|
+
(_match, documentation_path) => `\`${github_url_base(documentation_path)}${documentation_path}\``
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
function transform_distributed_paths(content) {
|
|
38
|
+
const with_prompts = transform_prompt_paths(content);
|
|
39
|
+
const with_eslint = transform_eslint_paths(with_prompts);
|
|
40
|
+
const with_tests = transform_test_file_paths(with_eslint);
|
|
41
|
+
return transform_documentation_paths(with_tests);
|
|
42
|
+
}
|
|
43
|
+
function ensure_claude_md_import(existing) {
|
|
44
|
+
if (existing === void 0) return `${CLAUDE_MD_BOOTSTRAP}
|
|
45
|
+
|
|
46
|
+
${CLAUDE_MD_IMPORT_LINE}
|
|
47
|
+
`;
|
|
48
|
+
const updated = existing.replace(OLD_CLAUDE_MD_BOOTSTRAP, () => CLAUDE_MD_BOOTSTRAP);
|
|
49
|
+
if (updated.includes(CLAUDE_MD_IMPORT_LINE)) {
|
|
50
|
+
if (updated.includes(CLAUDE_MD_BOOTSTRAP)) return updated;
|
|
51
|
+
return `${CLAUDE_MD_BOOTSTRAP}
|
|
52
|
+
|
|
53
|
+
${updated}`;
|
|
54
|
+
}
|
|
55
|
+
return `${CLAUDE_MD_BOOTSTRAP}
|
|
56
|
+
|
|
57
|
+
${CLAUDE_MD_IMPORT_LINE}
|
|
58
|
+
|
|
59
|
+
${updated}`;
|
|
60
|
+
}
|
|
61
|
+
var FULL_CLAUDE_MD_LINES = /* @__PURE__ */ new Set([
|
|
62
|
+
CLAUDE_MD_BOOTSTRAP,
|
|
63
|
+
OLD_CLAUDE_MD_BOOTSTRAP,
|
|
64
|
+
CLAUDE_MD_IMPORT_LINE
|
|
65
|
+
]);
|
|
66
|
+
function remove_claude_md_import(content) {
|
|
67
|
+
const lines = content.split("\n");
|
|
68
|
+
return lines.filter((line, index) => {
|
|
69
|
+
if (FULL_CLAUDE_MD_LINES.has(line)) return false;
|
|
70
|
+
return line !== "" || !FULL_CLAUDE_MD_LINES.has(lines[index - 1] ?? "");
|
|
71
|
+
}).join("\n");
|
|
72
|
+
}
|
|
73
|
+
var distributed_paths = {
|
|
74
|
+
transform_prompt_paths,
|
|
75
|
+
transform_distributed_paths,
|
|
76
|
+
ensure_claude_md_import,
|
|
77
|
+
remove_claude_md_import,
|
|
78
|
+
CLAUDE_MD_IMPORT_LINE
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export {
|
|
82
|
+
distributed_paths
|
|
83
|
+
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolve_local_bin,
|
|
3
3
|
resolve_package_bin
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-EFXE6C37.js";
|
|
5
5
|
import {
|
|
6
6
|
ESLINT_EDIT_CACHE_FLAGS,
|
|
7
7
|
time_density_hook
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-TNUMY6NL.js";
|
|
9
9
|
import {
|
|
10
10
|
file_reader,
|
|
11
11
|
json_value
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-APUO6U4J.js";
|
|
13
13
|
import {
|
|
14
14
|
HOOK_PROCESS_TIMEOUT_MS
|
|
15
15
|
} from "./chunk-DGT54IH5.js";
|
|
@@ -230,8 +230,9 @@ function is_eslint_config_input(relative_path) {
|
|
|
230
230
|
}
|
|
231
231
|
function plan_daemon_restart(file_path, project_root) {
|
|
232
232
|
const relative = relative_to_root(project_root, file_path);
|
|
233
|
-
if (relative === void 0 || !is_eslint_config_input(relative))
|
|
234
|
-
|
|
233
|
+
if (relative === void 0 || !is_eslint_config_input(relative) || resolve_daemon_cli(ESLINT_DAEMON, project_root) === void 0) {
|
|
234
|
+
return [];
|
|
235
|
+
}
|
|
235
236
|
return [{ bin: ESLINT_DAEMON, command_arguments: [DAEMON_RESTART] }];
|
|
236
237
|
}
|
|
237
238
|
function resolve_invocations(command, project_root) {
|
|
@@ -267,8 +268,9 @@ async function run_command(command, project_root) {
|
|
|
267
268
|
return outcome;
|
|
268
269
|
}
|
|
269
270
|
function eslint_unfixed(command, outcome) {
|
|
270
|
-
if (command.bin !== ESLINT_BIN
|
|
271
|
-
|
|
271
|
+
if (command.bin !== ESLINT_BIN || outcome.exit_code === 0 || outcome.stdout.length === 0) {
|
|
272
|
+
return void 0;
|
|
273
|
+
}
|
|
272
274
|
return outcome.stdout;
|
|
273
275
|
}
|
|
274
276
|
function format_diagnostics(unfixed) {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
investigation_reads
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PTICX4OL.js";
|
|
4
4
|
import {
|
|
5
5
|
lane_guard_policy
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-JP45SOCJ.js";
|
|
7
7
|
import {
|
|
8
8
|
hook_decision
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6TS2JD6D.js";
|
|
10
10
|
import {
|
|
11
11
|
time_spans
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-TNUMY6NL.js";
|
|
13
13
|
import {
|
|
14
14
|
json_value
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-APUO6U4J.js";
|
|
16
16
|
|
|
17
17
|
// scripts/delegation/duplicate-read-guard.ts
|
|
18
18
|
import { statSync } from "node:fs";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
hook_decision
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6TS2JD6D.js";
|
|
4
4
|
import {
|
|
5
5
|
cost_blocks,
|
|
6
6
|
time_batch_guard,
|
|
7
7
|
time_bundle_call,
|
|
8
8
|
time_shell,
|
|
9
9
|
time_spans
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-TNUMY6NL.js";
|
|
11
11
|
import {
|
|
12
12
|
cost_transcript
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-APUO6U4J.js";
|
|
14
14
|
|
|
15
15
|
// scripts/delegation/investigation-reads.ts
|
|
16
16
|
import path2 from "node:path";
|
|
@@ -176,7 +176,7 @@ var SEARCH_LABELS = new Set(
|
|
|
176
176
|
SEARCH_COMMANDS.map((command) => time_shell.bash_label(command))
|
|
177
177
|
);
|
|
178
178
|
var INVESTIGATOR_AGENT = "investigator";
|
|
179
|
-
var REASON = `\u26D4 investigation: ${String(delegation_policy.INVESTIGATION_FILE_THRESHOLD)} files read and not edited, or ${String(delegation_policy.INVESTIGATION_SEARCH_TURN_THRESHOLD)} search turns, since the last delegated unit
|
|
179
|
+
var REASON = `\u26D4 investigation: ${String(delegation_policy.INVESTIGATION_FILE_THRESHOLD)} files read and not edited, or ${String(delegation_policy.INVESTIGATION_SEARCH_TURN_THRESHOLD)} search turns, since the last delegated unit. Run \`pnpm josh delegate investigation\`, then dispatch the \`${INVESTIGATOR_AGENT}\` agent (\`kit:${INVESTIGATOR_AGENT}\` in a consumer); it returns \`file:line\` citations, never the file text. Keep main-line reads to files you will edit; every read-only search turn counts. \`.claude/skills/workflow-commands/delegation.md\``;
|
|
180
180
|
var INSTRUCTION_PATHS = ["prompts", ".claude/skills"];
|
|
181
181
|
var INSTRUCTION_FILES = /* @__PURE__ */ new Set(["CLAUDE.md", "AGENTS.md", "GEMINI.md"]);
|
|
182
182
|
var REPOSITORY_ROOT = process.cwd();
|
|
@@ -348,7 +348,6 @@ var investigation_reads = {
|
|
|
348
348
|
is_session_artifact,
|
|
349
349
|
is_subject_file,
|
|
350
350
|
projected_count,
|
|
351
|
-
repository_relative,
|
|
352
351
|
resolved,
|
|
353
352
|
should_block,
|
|
354
353
|
tally_of
|