@joshuafolkken/kit 1.1094.0 → 1.1136.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/investigator.md +17 -0
- package/.claude/settings.json +1 -0
- package/.claude/skills/workflow-commands/SKILL.md +1 -1
- package/.claude/skills/workflow-commands/background-commands.md +36 -85
- package/.claude/skills/workflow-commands/backlogrun-progress.md +31 -34
- package/.claude/skills/workflow-commands/backlogrun-steps.md +2 -2
- package/.claude/skills/workflow-commands/delegation.md +5 -1
- package/.claude/skills/workflow-commands/fullrun.md +5 -4
- package/.claude/skills/workflow-commands/halfrun.md +5 -4
- package/.claude/skills/workflow-commands/latest-gate.md +7 -15
- package/.claude/skills/workflow-commands/pre-gate-cut.md +4 -8
- package/.claude/skills/workflow-commands/split-assessment.md +4 -18
- package/.github/actions/setup-node/action.yml +33 -0
- package/.github/actions/setup-pnpm/action.yml +4 -4
- package/.github/workflows/auto-tag.yml +2 -3
- package/.github/workflows/ci.yml +7 -8
- package/.github/workflows/dependabot-auto-merge.yml +1 -0
- package/.github/workflows/pr-classification.yml +1 -3
- package/.github/workflows/production.yml +1 -0
- package/.github/workflows/publish.yml +10 -9
- package/.github/workflows/sonar-qube.yml +17 -13
- package/.pnpmfile.mjs +29 -0
- package/AGENTS.md +4 -11
- package/CLAUDE.md +24 -17
- package/GEMINI.md +4 -13
- package/README.md +8 -3
- package/SECURITY.md +2 -0
- package/cspell/index.yaml +4 -0
- package/dist/CLAUDE.basic.md +6 -6
- package/dist/CLAUDE.md +24 -17
- package/dist/CLAUDE.static.md +6 -6
- package/dist/config-merge/index.js +33 -9
- package/dist/hooks/batch-guard.js +4 -4
- package/dist/hooks/{chunk-OIZUHPJI.js → chunk-FO2I7UT7.js} +1 -1
- package/dist/hooks/{chunk-NKOG3XAV.js → chunk-GDU26K3J.js} +11 -3
- package/dist/hooks/{chunk-O4LL4HTI.js → chunk-HANSKHES.js} +2 -2
- package/dist/hooks/{chunk-3C4YCCEF.js → chunk-HBKZLITF.js} +4 -4
- package/dist/hooks/{chunk-UD24EAIL.js → chunk-JKKTVDAG.js} +1984 -146
- package/dist/hooks/{chunk-M2XDCUKD.js → chunk-KBXZLMRH.js} +89 -1803
- package/dist/hooks/{chunk-IL27YTPH.js → chunk-KOKOAV6D.js} +2 -2
- package/dist/hooks/{chunk-7ZPFAVR7.js → chunk-LJBLGHEH.js} +59 -19
- package/dist/hooks/{chunk-E54KGFEQ.js → chunk-NFZGFGOR.js} +1 -1
- package/dist/hooks/{chunk-KHWHKJOM.js → chunk-RFWWUI5F.js} +4 -4
- package/dist/hooks/codex-hook-adapter.js +12 -47
- package/dist/hooks/duplicate-read-guard.js +5 -5
- package/dist/hooks/format-edited.js +2 -2
- package/dist/hooks/inputs.json +175 -173
- package/dist/hooks/investigation-guard.js +5 -5
- package/dist/hooks/pretool-guard.js +9 -9
- package/dist/hooks/stop-guard.js +17 -12
- package/dist/josh.js +87 -31
- package/dist/version/index.js +36 -20
- package/eslint/rules/unicorn.js +3 -2
- package/package.json +23 -5
- package/pnpm-workspace.yaml +5 -7
- package/prompts/collaboration-workflow/glossary.md +17 -0
- package/prompts/collaboration-workflow/issue-template.md +1 -1
- package/prompts/collaboration-workflow/operating-rules.md +1 -1
- package/prompts/collaboration-workflow/principles.md +9 -0
- package/prompts/collaboration-workflow.md +1 -0
- package/scripts/backlog/backlog-arrival.ts +30 -10
- package/scripts/backlog/backlog-budget-cli.ts +15 -16
- package/scripts/backlog/backlog-offer-cli.ts +6 -14
- package/scripts/backlog/backlog-plan.ts +29 -18
- package/scripts/backlog/backlog-ready.ts +20 -7
- package/scripts/config-merge/parse-jsonc.ts +33 -3
- package/scripts/config-merge/patch-json-key.ts +13 -6
- package/scripts/cost-runtime/cost-cli.ts +3 -7
- package/scripts/delegation/delegation-policy.ts +9 -1
- package/scripts/delegation/investigation-guard.ts +1 -1
- package/scripts/delegation/investigation-reads.ts +105 -19
- package/scripts/doctor/doctor-consumer.ts +3 -5
- package/scripts/doctor/doctor-io.ts +9 -13
- package/scripts/document/backlogrun-parent-read-set.ts +12 -1
- package/scripts/document/capped-print.ts +74 -0
- package/scripts/document/document-byte-budget.ts +1 -0
- package/scripts/document/document-section-cli.ts +4 -3
- package/scripts/document/entry-read-budget.ts +13 -7
- package/scripts/document/entry-read-set.ts +32 -8
- package/scripts/document/lane-child-read-set.ts +7 -0
- package/scripts/document/read-set-point-of-use.ts +8 -3
- package/scripts/document/read-set-trim.ts +3 -1
- package/scripts/epic/epic-audit.ts +3 -18
- package/scripts/gate/scoped-green.ts +25 -14
- package/scripts/gh/git-gh-issue-list.ts +12 -11
- package/scripts/gh/git-gh-issue-write.ts +4 -1
- package/scripts/gh/git-gh-pr-auto-merge.ts +4 -1
- package/scripts/git/git-command.ts +6 -1
- package/scripts/git/git-spawn-sync.ts +65 -0
- package/scripts/git/git-spawn.ts +5 -4
- package/scripts/git/stash/stash-pop-args.ts +1 -6
- package/scripts/init/claude-kit-only-settings.ts +29 -0
- package/scripts/init/init-copy-content.ts +8 -2
- package/scripts/init/init-file-action.ts +54 -0
- package/scripts/init/init-logic-migrate.ts +35 -17
- package/scripts/init/init-logic-secretlint.ts +1 -1
- package/scripts/init/init-logic.ts +6 -22
- package/scripts/init/init.ts +11 -68
- package/scripts/init/initial-commit.ts +24 -0
- package/scripts/init/kit-written-paths.ts +2 -0
- package/scripts/init/project-profile.ts +3 -6
- package/scripts/init/start-exec.ts +16 -3
- package/scripts/init/start-steps.ts +10 -13
- package/scripts/issue/defect-rate-cli.ts +61 -20
- package/scripts/issue/issue-backlinks.ts +7 -14
- package/scripts/issue/issue-cite.ts +12 -6
- package/scripts/issue/issue-file.ts +5 -12
- package/scripts/issue/issue-read-cli.ts +1 -0
- package/scripts/issue/issue-report-failures.ts +6 -2
- package/scripts/issue/issue-state-cli.ts +1 -1
- package/scripts/issue/markdown-section.ts +21 -6
- package/scripts/issue/measure-rerun-cli.ts +73 -14
- package/scripts/josh/josh-commands-lane.ts +1 -1
- package/scripts/josh/josh-commands-project.ts +8 -1
- package/scripts/josh/josh-commands-workflow.ts +1 -1
- package/scripts/josh/run-github-prerequisite.ts +3 -6
- package/scripts/lane/lane-await.ts +89 -15
- package/scripts/lane/lane-cli.ts +11 -13
- package/scripts/lane/lane-close.ts +4 -1
- package/scripts/lane/lane-launch-cli.ts +10 -16
- package/scripts/lane/openai-review-broker.ts +4 -1
- package/scripts/lib/cli-flags.ts +31 -2
- package/scripts/lib/error-message.ts +12 -1
- package/scripts/lines/line-targets.ts +0 -11
- package/scripts/lines/lines-command.ts +5 -3
- package/scripts/propagate/propagate-git.ts +3 -8
- package/scripts/refactor/refactor-scan.ts +2 -1
- package/scripts/registry-migration/migrate-logic.ts +28 -19
- package/scripts/registry-migration/migrate.ts +6 -5
- package/scripts/release/github-release-cli.ts +14 -3
- package/scripts/release/github-release-environment.ts +1 -0
- package/scripts/release/github-release.ts +103 -17
- package/scripts/release/release-publish.ts +36 -2
- package/scripts/release/release-worktree.ts +97 -2
- package/scripts/review/review-checkout.ts +3 -2
- package/scripts/review/review-record-cli.ts +9 -16
- package/scripts/rules/early-heartbeat.ts +4 -3
- package/scripts/rules/lane-park.ts +9 -0
- package/scripts/rules/stop-rules.ts +7 -4
- package/scripts/run/run-carry-args.ts +8 -12
- package/scripts/run/run-carry-cli.ts +3 -1
- package/scripts/run/run-carry-conversation.ts +94 -0
- package/scripts/run/run-carry-reclaim.ts +37 -0
- package/scripts/run/run-carry.ts +21 -5
- package/scripts/run/run-cut-args.ts +1 -6
- package/scripts/run/run-ending-cli.ts +1 -5
- package/scripts/run/run-entry-cli.ts +40 -9
- package/scripts/run/run-entry-stop.ts +104 -0
- package/scripts/run/run-event-stream-emit.ts +7 -2
- package/scripts/run/run-hold.ts +4 -1
- package/scripts/run/run-liveness-cli.ts +1 -5
- package/scripts/run/run-merge-cli.ts +2 -10
- package/scripts/run/run-merge-steps.ts +4 -1
- package/scripts/run/run-parent-cut-hook.ts +4 -1
- package/scripts/run/run-prep-cli.ts +4 -1
- package/scripts/run/run-progress-args.ts +20 -4
- package/scripts/run/run-progress-cli.ts +31 -29
- package/scripts/run/run-progress-clock.ts +4 -1
- package/scripts/run/run-ship-cli.ts +8 -16
- package/scripts/run/run-ship-probe.ts +4 -1
- package/scripts/run/run-status-cli.ts +2 -15
- package/scripts/run/run-tidy-lanes.ts +4 -1
- package/scripts/run/run-wake-cli.ts +2 -10
- package/scripts/run/run-watcher-guard.ts +9 -5
- package/scripts/safe-chain/pack-hook.ts +92 -0
- package/scripts/sync/sync-ai-files.ts +4 -0
- package/scripts/test/test-declared-changed.ts +13 -16
- package/scripts/test/test-declared.ts +3 -7
- package/scripts/test/test-related.ts +1 -6
- package/scripts/test/test-unit-guard.ts +21 -7
- package/scripts/time-runtime/time-spans.ts +4 -0
- package/scripts/version/version-commands.ts +11 -1
- package/templates/CLAUDE.basic.md +6 -6
- package/templates/workflows/ci.yml +16 -82
- package/templates/workflows/dependabot-auto-merge.yml +1 -0
- package/templates/workflows/github-release.yml +14 -28
- package/tsconfig.sonar.json +4 -22
package/dist/CLAUDE.md
CHANGED
|
@@ -36,7 +36,7 @@ Classify each decision point into one tier and act; stop **only** when the choic
|
|
|
36
36
|
|
|
37
37
|
## Environment Variables
|
|
38
38
|
|
|
39
|
-
A `.env` at the project root: `TELEGRAM_BOT_TOKEN` and `TELEGRAM_CHAT_ID` are required for notifications; `JOSH_SESSION_LANG`, `PORT_SEED` and `JOSH_REPO_PATHS` are optional and personal.
|
|
39
|
+
A `.env` at the project root: `TELEGRAM_BOT_TOKEN` and `TELEGRAM_CHAT_ID` are required for notifications; `JOSH_SESSION_LANG`, `PORT_SEED` and `JOSH_REPO_PATHS` are optional and personal. Details: [environment-variables.md](https://github.com/joshuafolkken/kit/blob/main/docs/environment-variables.md), [josh-commands.md](https://github.com/joshuafolkken/kit/blob/main/docs/josh-commands.md).
|
|
40
40
|
|
|
41
41
|
**GitHub operations are `gh api` (REST) — instructing prose included — and need `gh` installed; some environments lack it.** Auth: `gh auth login`; `GH_TOKEN` in CI/cloud. `node_modules/@joshuafolkken/kit/prompts/collaboration-workflow/gh-rest.md`.
|
|
42
42
|
|
|
@@ -100,12 +100,14 @@ A `.env` at the project root: `TELEGRAM_BOT_TOKEN` and `TELEGRAM_CHAT_ID` are re
|
|
|
100
100
|
|
|
101
101
|
For every code modification, in order:
|
|
102
102
|
|
|
103
|
-
0. **Work summary + test declaration** _(before writing any implementation code)_:
|
|
103
|
+
0. **Work summary + test declaration** _(before writing any implementation code)_: once per Issue, present a two-layer summary in ordinary markdown, **never wrapped in a code fence** — required in fullrun/halfrun/backlogrun even when the Issue body was filled (`kickoff` is exempt). Presentation only, never a confirmation stop. `node_modules/@joshuafolkken/kit/prompts/collaboration-workflow/report-format.md`; `pnpm josh report:lint` checks the form.
|
|
104
104
|
|
|
105
|
+
- **Overview** — three lines, **Now / Change / Check**, one sentence each, in the session language, that a non-programmer can follow; name the concrete subject in each line — subject-less prose is not acceptable. Use no file paths, function or type names, or CLI option flags — only internal identifiers are banned, not names the reader sees on screen.
|
|
106
|
+
- **Details**, then **every change with its test**: `<what changes> — Test: <Unit|E2E> — <file path> — <what it verifies>`. Completion reports lead with **Cause / Fix / Result**.
|
|
105
107
|
- **Tests are required for ALL changes** — zero tests without explicit approval is a violation (bug fixes, timing/animation fixes and refactors included): bug fix → regression test; UI/animation/timing → E2E for the observable change; logic/utility → unit; refactor → tests pinning existing behavior BEFORE the change (`node_modules/@joshuafolkken/kit/prompts/refactoring.md`).
|
|
106
|
-
- **Non-runtime updates (pre-approved manual-only exception)**: a change touching no executable runtime code path
|
|
107
|
-
- **Basic-profile manual-check exception:**
|
|
108
|
-
-
|
|
108
|
+
- **Non-runtime updates (pre-approved manual-only exception)**: a change touching no executable runtime code path — docs, non-executable config, editor/IDE files, cosmetic asset swaps with no selector/path change — may be verified by hand; declare it in Step 0 with the reason. The mechanically exempt (`*.md`, `.editorconfig`, `.idea/**`, `.vscode/**`, `prompts/**`) need no declaration. A runtime change whose test is infeasible needs the reason and user approval.
|
|
109
|
+
- **Basic-profile manual-check exception:** under `josh.profile: basic` (or `static`), a change touching only languages kit cannot test (HTML/CSS, Lua …) is verified by hand — a browser check of layout, links and interactions in the HTML, or actually run the changed code — and reported; JavaScript and TypeScript still need tests. `node_modules/@joshuafolkken/kit/prompts/testing-guide.md`.
|
|
110
|
+
- **`pnpm josh test:declared`** answers `required` / `exempt` / `satisfied` from the changed paths; a runtime change with no test is refused at `pnpm josh git -y` on `required`.
|
|
109
111
|
- **Read a target's line headroom before editing: `pnpm josh lines <path>`** — near the limit, `Target` carries the splitting plan.
|
|
110
112
|
|
|
111
113
|
1. **Refactor first** — before any refactoring, read and follow `node_modules/@joshuafolkken/kit/prompts/refactoring.md`; apply high/medium refactoring to all new/modified code and do not proceed until none remain.
|
|
@@ -129,7 +131,11 @@ Run the full verification set **in order**; do not skip, reorder, or report comp
|
|
|
129
131
|
|
|
130
132
|
## Pre-commit Self-Review (mandatory)
|
|
131
133
|
|
|
132
|
-
Before every `git commit` (follow-up commits included), self-review against `node_modules/@joshuafolkken/kit/prompts/review.md` — a subagent runs `/code-review`, never a main-line `Skill` load
|
|
134
|
+
Before every `git commit` (follow-up commits included), self-review against `node_modules/@joshuafolkken/kit/prompts/review.md` — a subagent runs `/code-review`, never a main-line `Skill` load. `node_modules/@joshuafolkken/kit/prompts/review.md` → "Review round cap".
|
|
135
|
+
|
|
136
|
+
- **Scope** — the staged diff, and `git diff main...HEAD` before opening or updating a PR; level from `pnpm josh review:brief --level-only`.
|
|
137
|
+
- **Rounds** — resolve all high/medium findings, **no further than the round cap**, the last round a verification pass over the fix delta. A confirmed High blocks rather than buying a round past the cap.
|
|
138
|
+
- **Each remaining non-High finding** — fix in place, file it as a follow-up Issue only when it is a confirmed defect that reaches a runtime path (`pnpm josh disposition <path>`), or drop it with a one-line PR note (the default). **A filed finding is run through `pnpm josh epic:bundle <new>` before the current Issue closes.**
|
|
133
139
|
|
|
134
140
|
## Doc Sync Rules
|
|
135
141
|
|
|
@@ -137,14 +143,14 @@ Before every `git commit` (follow-up commits included), self-review against `nod
|
|
|
137
143
|
|
|
138
144
|
## Git Rules
|
|
139
145
|
|
|
140
|
-
- **No commits** unless explicitly requested. **No PR merges, branch deletions, force pushes or other shared-state mutations** unless explicitly requested in the current turn — the default end state is PR still OPEN. **Exception**: invoking `fullrun` authorizes the merge, via `pnpm josh followup
|
|
146
|
+
- **No commits** unless explicitly requested. **No PR merges, branch deletions, force pushes or other shared-state mutations** unless explicitly requested in the current turn — the default end state is PR still OPEN. **Exception**: invoking `fullrun` or `backlogrun` authorizes the merge, via `pnpm josh followup` — `prrun` does not. `.claude/settings.json` denies these, but the deny is narrower than the rule — never read "the tool let me" as permission. `node_modules/@joshuafolkken/kit/prompts/collaboration-workflow/operating-rules.md` → "指示されていない行動は取らない".
|
|
141
147
|
- **Never stage or mutate the git index on your own.** `git add` / `git rm --cached` / `git restore --staged` / `git commit` overwrite the user's snapshot and are denied by settings; inspection is read-only. Staging is allowed only on an explicit current-turn instruction or an authorized commit flow (`pnpm josh git`). `node_modules/@joshuafolkken/kit/prompts/collaboration-workflow/operating-rules.md` → "git index を勝手に変更しない".
|
|
142
148
|
- **For git operations use `pnpm josh git`.** After a failed push, fix, push manually, then `pnpm josh pr` — **never** `gh pr create` directly, which bypasses `closes #N` generation so the Issue will not auto-close.
|
|
143
149
|
- **Start-of-conversation git status is a stale snapshot.** Before acting on any working-tree / index / stash / branch assumption, run `git status` (and `git stash list`) live first.
|
|
144
150
|
|
|
145
151
|
## Collaboration Workflow
|
|
146
152
|
|
|
147
|
-
-
|
|
153
|
+
- The issue-driven flow is `node_modules/@joshuafolkken/kit/prompts/collaboration-workflow/`, indexed by `node_modules/@joshuafolkken/kit/prompts/collaboration-workflow.md`.
|
|
148
154
|
- **Before writing a rule as prose, place it by `node_modules/@joshuafolkken/kit/prompts/collaboration-workflow/residency.md`** — its single source. A computable answer goes to `pnpm josh oracle:list` and an ordering rule to `pnpm josh run:step`, never into `CLAUDE.md` or a prompt file.
|
|
149
155
|
- **Count the target repository's open Issues before filing; above the WIP cap, close one first.** Nothing honestly closable means do not file. A filing the run is blocked by is exempt, and so is an **interrupt** — three tests decide that, never judgement: a verification answers wrongly, a documented workflow cannot complete, or data is lost or written outside the repository; both exemptions proceed, stating the overage. Meeting none of the three, a finding stays discretionary. `pnpm josh rule:guard` states it again at the call that files. The count command and both procedures: `node_modules/@joshuafolkken/kit/prompts/collaboration-workflow/wip-cap.md`.
|
|
150
156
|
|
|
@@ -162,11 +168,13 @@ Before every `git commit` (follow-up commits included), self-review against `nod
|
|
|
162
168
|
| `halfrun [#N \| new]` | Implement + gate, then **stop before commit** for manual verification | + `halfrun.md` + `split-assessment.md` |
|
|
163
169
|
| `backlogrun [#N1 #N2 …]` | Run named Issues and epics in order (an epic runs its children first), then drain the opted-in backlog — dependency order, lanes. `--only` stops after the named list | + `backlogrun.md` + `split-assessment.md` + the `fullrun` set |
|
|
164
170
|
|
|
165
|
-
**`queue` and `epicrun` were removed** —
|
|
171
|
+
**`queue` and `epicrun` were removed** — point `queue` to `backlogrun #N1 #N2 …` and `epicrun` to `backlogrun #E --only`.
|
|
166
172
|
|
|
167
|
-
**
|
|
173
|
+
**The `josh epic:*` commands have their own skill** — `epic:audit`, `epic:next`, `epic:bundle`, and how an epic spans repositories. **Read the `epic-commands` skill before running any of them, before writing an epic that tracks a child in another repository, and right after filing an issue.** Three rules bind outside those commands:
|
|
168
174
|
|
|
169
|
-
|
|
175
|
+
- Recording a decision removes that child's `needs-decision` label (Tier A).
|
|
176
|
+
- **Fixing what the audit finds is Tier A**; park only when the contradiction is a design choice nobody has made.
|
|
177
|
+
- **An epic in another repository is referenced as `owner/repo#N`** — a bare `#N` resolves to this repository's issue.
|
|
170
178
|
|
|
171
179
|
#### Explicit invocation required (MANDATORY)
|
|
172
180
|
|
|
@@ -177,18 +185,17 @@ Never start a `kickoff` / `halfrun` / `prrun` / `fullrun` / `backlogrun` workflo
|
|
|
177
185
|
- Instead, **prompt the user to type the command themselves**, with the exact phrasing: "Please run \`<command>\` to start this task." (e.g. "Please run \`halfrun new\` to start this task.").
|
|
178
186
|
- This applies even when the user authorized a related workflow in an earlier turn — each invocation must be re-typed in the current turn.
|
|
179
187
|
|
|
180
|
-
**A session cut inside a declared budget is not a new invocation
|
|
188
|
+
**A session cut inside a declared budget is not a new invocation — for `backlogrun` alone**: a resumed `backlogrun` continues, while a `fullrun` cut still waits for the keyword. `backlogrun-steps.md` → "The session cut is inside the invocation".
|
|
181
189
|
|
|
182
|
-
**A `backlogrun` parks a child instead of stopping the run
|
|
190
|
+
**A `backlogrun` parks a child instead of stopping the run** — `backlogrun-park.md` → "park and continue".
|
|
183
191
|
|
|
184
192
|
#### Mid-workflow stop notification (`confirmation`)
|
|
185
193
|
|
|
186
|
-
|
|
194
|
+
Before pausing **any** run to wait for the user — a command's stop (`halfrun`'s stop before commit included), an upstream-Issue interrupt, a Tier C confirmation — you MUST send this Telegram, so the user is alerted off-screen:
|
|
187
195
|
|
|
188
196
|
```bash
|
|
189
197
|
pnpm josh notify --task-type confirmation --issue-url "<issue-url>" --body=$'<one-line reason>\n<what is needed from the user>'
|
|
190
198
|
```
|
|
191
199
|
|
|
192
|
-
-
|
|
193
|
-
-
|
|
194
|
-
- Skip the notification when the stop was explicitly requested by the user in the same turn (they already know)
|
|
200
|
+
- Send it once per stop; skip it when the user asked for the stop in this same turn.
|
|
201
|
+
- Pass `--body=...` as one token when the body starts with `-`, otherwise `parseArgs` rejects it.
|
package/dist/CLAUDE.static.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Project instructions
|
|
2
2
|
|
|
3
|
-
-
|
|
4
|
-
-
|
|
5
|
-
- HTML
|
|
6
|
-
-
|
|
7
|
-
- JavaScript
|
|
8
|
-
- Git
|
|
3
|
+
- Respect existing files and the user's settings, and read a file's contents before changing it.
|
|
4
|
+
- Verify every change, and report the results you actually observed.
|
|
5
|
+
- Format HTML, CSS and JavaScript files with Prettier when the project has any.
|
|
6
|
+
- After a change that is visible on screen, check its display and interaction in a browser.
|
|
7
|
+
- After changing JavaScript or TypeScript behavior, add an automated test that checks that behavior.
|
|
8
|
+
- Use the Git or GitHub workflow only when you use Git or GitHub.
|
|
@@ -56,15 +56,39 @@ var string_array_schema = z.array(z.string());
|
|
|
56
56
|
var string_record_schema = z.record(z.string(), z.string());
|
|
57
57
|
|
|
58
58
|
// scripts/config-merge/parse-jsonc.ts
|
|
59
|
-
import
|
|
59
|
+
import { parseTree, printParseErrorCode } from "jsonc-parser";
|
|
60
|
+
function property_key(property) {
|
|
61
|
+
return String(property.children?.[0]?.value);
|
|
62
|
+
}
|
|
63
|
+
function node_value(node) {
|
|
64
|
+
if (node === void 0) return void 0;
|
|
65
|
+
const children = node.children ?? [];
|
|
66
|
+
if (node.type === "array") return children.map((child) => node_value(child));
|
|
67
|
+
if (node.type !== "object") return node.value;
|
|
68
|
+
return Object.fromEntries(
|
|
69
|
+
children.map((property) => [property_key(property), node_value(property.children?.[1])])
|
|
70
|
+
);
|
|
71
|
+
}
|
|
60
72
|
function parse_jsonc(content) {
|
|
61
|
-
const
|
|
62
|
-
|
|
73
|
+
const errors = [];
|
|
74
|
+
const tree = parseTree(content, errors, { allowTrailingComma: true });
|
|
75
|
+
const [first_error] = errors;
|
|
76
|
+
if (first_error !== void 0) {
|
|
77
|
+
throw new SyntaxError(
|
|
78
|
+
`Invalid JSONC: ${printParseErrorCode(first_error.error)} at offset ${String(first_error.offset)}`
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
return json_object_schema.parse(node_value(tree));
|
|
63
82
|
}
|
|
64
83
|
|
|
65
84
|
// scripts/config-merge/patch-json-key.ts
|
|
66
|
-
import {
|
|
67
|
-
|
|
85
|
+
import {
|
|
86
|
+
createScanner,
|
|
87
|
+
findNodeAtLocation,
|
|
88
|
+
getNodeValue,
|
|
89
|
+
parseTree as parseTree2,
|
|
90
|
+
stripComments
|
|
91
|
+
} from "jsonc-parser";
|
|
68
92
|
|
|
69
93
|
// scripts/config-merge/json-format.ts
|
|
70
94
|
var PRINT_WIDTH = 100;
|
|
@@ -146,7 +170,7 @@ function render_value(key, value, has_trailing_comma) {
|
|
|
146
170
|
return document.slice(prefix.length, document.length - suffix.length);
|
|
147
171
|
}
|
|
148
172
|
function parse_root(content) {
|
|
149
|
-
const root =
|
|
173
|
+
const root = parseTree2(content);
|
|
150
174
|
return root?.type === "object" ? root : void 0;
|
|
151
175
|
}
|
|
152
176
|
function replace_range(content, range, text) {
|
|
@@ -192,7 +216,7 @@ function separator_offset(content, offset, limit) {
|
|
|
192
216
|
function has_separator_after(content, offset, limit) {
|
|
193
217
|
return separator_offset(content, offset, limit) !== -1;
|
|
194
218
|
}
|
|
195
|
-
function
|
|
219
|
+
function property_key2(property) {
|
|
196
220
|
const key = property.children?.[0]?.value;
|
|
197
221
|
return typeof key === "string" ? key : void 0;
|
|
198
222
|
}
|
|
@@ -202,7 +226,7 @@ function target_value_end(property) {
|
|
|
202
226
|
}
|
|
203
227
|
function contains_comment(content, node) {
|
|
204
228
|
const text = content.slice(node.offset, node.offset + node.length);
|
|
205
|
-
return
|
|
229
|
+
return stripComments(text) !== text;
|
|
206
230
|
}
|
|
207
231
|
function rebalanced_value(content, key, value_node, has_trailing_comma) {
|
|
208
232
|
if (contains_comment(content, value_node)) return void 0;
|
|
@@ -216,7 +240,7 @@ function rebalanced_value(content, key, value_node, has_trailing_comma) {
|
|
|
216
240
|
return rendered === current ? void 0 : rendered;
|
|
217
241
|
}
|
|
218
242
|
function rebalance(content, property, has_trailing_comma) {
|
|
219
|
-
const key =
|
|
243
|
+
const key = property_key2(property);
|
|
220
244
|
const value_node = property.children?.[1];
|
|
221
245
|
if (key === void 0 || value_node === void 0) return content;
|
|
222
246
|
const rendered = rebalanced_value(content, key, value_node, has_trailing_comma);
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
load_environment_file,
|
|
10
10
|
notice_refusal_path,
|
|
11
11
|
refusal_path
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-KOKOAV6D.js";
|
|
13
|
+
import "./chunk-HANSKHES.js";
|
|
14
|
+
import "./chunk-NFZGFGOR.js";
|
|
15
|
+
import "./chunk-GDU26K3J.js";
|
|
16
16
|
import "./chunk-WPALEIRX.js";
|
|
17
17
|
import "./chunk-RKUAD3I6.js";
|
|
18
18
|
export {
|
|
@@ -358,7 +358,7 @@ var LANE_COMMANDS = {
|
|
|
358
358
|
...LANE_ARGUMENTS,
|
|
359
359
|
description: "Block until any of the named in-flight lane children completes; prints which one finished",
|
|
360
360
|
category: "AI tools",
|
|
361
|
-
reference: ["<issue> [<issue>...]", "automation", ["processes"]],
|
|
361
|
+
reference: ["<issue> [<issue>...] [--owner <pid>]", "automation", ["files", "processes"]],
|
|
362
362
|
default_script_arguments: ["await"]
|
|
363
363
|
},
|
|
364
364
|
"lane:launch": {
|
|
@@ -1059,6 +1059,13 @@ var PROJECT_COMMANDS = {
|
|
|
1059
1059
|
["files", "git", "network", "processes"]
|
|
1060
1060
|
]
|
|
1061
1061
|
},
|
|
1062
|
+
"dogfood:commit": {
|
|
1063
|
+
script: "scripts/dogfood/dogfood-commit-cli.ts",
|
|
1064
|
+
description: "Make the first commit of a dogfood run's own kit-test-* project",
|
|
1065
|
+
category: "Project",
|
|
1066
|
+
reference: ["<dir>", "automation", ["files", "git"]],
|
|
1067
|
+
is_kit_only: true
|
|
1068
|
+
},
|
|
1062
1069
|
init: {
|
|
1063
1070
|
script: "scripts/init/init.ts",
|
|
1064
1071
|
description: "Initialize config in a new project",
|
|
@@ -1077,7 +1084,7 @@ var PROJECT_COMMANDS = {
|
|
|
1077
1084
|
},
|
|
1078
1085
|
"registry:migrate": {
|
|
1079
1086
|
script: "scripts/registry-migration/migrate.ts",
|
|
1080
|
-
description: "Migrate a
|
|
1087
|
+
description: "Migrate a project from GitHub Packages to public npm",
|
|
1081
1088
|
category: "Project",
|
|
1082
1089
|
reference: ["", "developer", ["files", "network", "processes"]]
|
|
1083
1090
|
},
|
|
@@ -1263,7 +1270,7 @@ var WORKFLOW_COMMANDS = {
|
|
|
1263
1270
|
script: "scripts/issue/measure-rerun-cli.ts",
|
|
1264
1271
|
description: "Re-run a merged issue\u2019s baseline command and print the before/after pair",
|
|
1265
1272
|
category: "Workflow",
|
|
1266
|
-
reference: ["<
|
|
1273
|
+
reference: ["<issue-number>", "automation", ["network", "processes", "files"]]
|
|
1267
1274
|
},
|
|
1268
1275
|
// A script rather than an `sh -c` chain, because it has a precondition to enforce: run inside a
|
|
1269
1276
|
// linked work tree it would hijack the default branch from every other one (joshuafolkken/kit#1535).
|
|
@@ -2573,6 +2580,7 @@ function to_spans(events, finished) {
|
|
|
2573
2580
|
is_bundleable: event.is_bundleable,
|
|
2574
2581
|
targets: event.targets,
|
|
2575
2582
|
is_writing: event.is_writing,
|
|
2583
|
+
may_write: event.may_write,
|
|
2576
2584
|
has_prior_reference: event.has_prior_reference,
|
|
2577
2585
|
writes: event.writes,
|
|
2578
2586
|
message_id: event.message_id,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
lane_child_marker
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NFZGFGOR.js";
|
|
4
4
|
import {
|
|
5
5
|
time_bundle_call,
|
|
6
6
|
time_format,
|
|
7
7
|
time_round_trips,
|
|
8
8
|
time_spans,
|
|
9
9
|
time_transcript_line
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-GDU26K3J.js";
|
|
11
11
|
|
|
12
12
|
// scripts/lane/lane-guard-policy.ts
|
|
13
13
|
var DEFAULT_MODE = "refuse";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
investigation_reads
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LJBLGHEH.js";
|
|
4
4
|
import {
|
|
5
5
|
lane_guard_policy
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HANSKHES.js";
|
|
7
7
|
import {
|
|
8
8
|
hook_decision
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-NFZGFGOR.js";
|
|
10
10
|
import {
|
|
11
11
|
json_value,
|
|
12
12
|
time_spans
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-GDU26K3J.js";
|
|
14
14
|
|
|
15
15
|
// scripts/delegation/duplicate-read-guard.ts
|
|
16
16
|
import { statSync } from "node:fs";
|