@joshuafolkken/kit 1.1094.0 → 1.1128.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/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 +29 -32
- package/.claude/skills/workflow-commands/backlogrun-steps.md +2 -2
- 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 +1 -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-NKOG3XAV.js → chunk-4JZDP5X5.js} +2 -2
- package/dist/hooks/{chunk-3C4YCCEF.js → chunk-5SD2YM7Z.js} +4 -4
- package/dist/hooks/{chunk-OIZUHPJI.js → chunk-77J7IEQM.js} +1 -1
- package/dist/hooks/{chunk-KHWHKJOM.js → chunk-7HVB7SZG.js} +3 -3
- package/dist/hooks/{chunk-UD24EAIL.js → chunk-AIOIOMPX.js} +1875 -104
- package/dist/hooks/{chunk-M2XDCUKD.js → chunk-M7QKEKWO.js} +88 -1783
- package/dist/hooks/{chunk-E54KGFEQ.js → chunk-MKVGBQPA.js} +1 -1
- package/dist/hooks/{chunk-7ZPFAVR7.js → chunk-NXYMNPUQ.js} +3 -3
- package/dist/hooks/{chunk-O4LL4HTI.js → chunk-QVLT52OV.js} +2 -2
- package/dist/hooks/{chunk-IL27YTPH.js → chunk-XYUIQOW3.js} +2 -2
- 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 +180 -179
- 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 +79 -30
- package/dist/version/index.js +36 -20
- package/eslint/rules/unicorn.js +3 -2
- package/package.json +18 -2
- 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/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/document-byte-budget.ts +1 -0
- 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/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/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/kit-written-paths.ts +2 -0
- package/scripts/init/project-profile.ts +3 -6
- package/scripts/init/start-steps.ts +2 -1
- 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/markdown-section.ts +21 -6
- package/scripts/issue/measure-rerun-cli.ts +73 -14
- package/scripts/josh/josh-commands-project.ts +1 -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 +43 -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/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-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-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/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 +1 -3
- package/tsconfig.sonar.json +4 -22
|
@@ -31,9 +31,7 @@ jobs:
|
|
|
31
31
|
persist-credentials: false
|
|
32
32
|
|
|
33
33
|
- name: Setup Node.js
|
|
34
|
-
uses: actions/setup-node
|
|
35
|
-
with:
|
|
36
|
-
node-version: '24'
|
|
34
|
+
uses: ./.github/actions/setup-node
|
|
37
35
|
|
|
38
36
|
- name: Configure GitHub Packages authentication for existing projects
|
|
39
37
|
run: printf '//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}\n' >> "$HOME/.npmrc"
|
|
@@ -25,9 +25,8 @@ jobs:
|
|
|
25
25
|
steps:
|
|
26
26
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
27
27
|
|
|
28
|
-
- uses: actions/setup-node
|
|
28
|
+
- uses: ./.github/actions/setup-node
|
|
29
29
|
with:
|
|
30
|
-
node-version: 24
|
|
31
30
|
registry-url: 'https://npm.pkg.github.com'
|
|
32
31
|
scope: '@joshuafolkken'
|
|
33
32
|
|
|
@@ -54,9 +53,12 @@ jobs:
|
|
|
54
53
|
env:
|
|
55
54
|
LATEST: ${{ steps.registry-latest.outputs.latest }}
|
|
56
55
|
|
|
57
|
-
|
|
56
|
+
# The tag reaches the command through the environment rather than expanded into it, so a step
|
|
57
|
+
# output is never parsed as shell (joshuafolkken/kit#3084).
|
|
58
|
+
- run: pnpm publish --no-git-checks --tag "$PUBLISH_TAG" --registry https://npm.pkg.github.com
|
|
58
59
|
env:
|
|
59
60
|
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
61
|
+
PUBLISH_TAG: ${{ steps.publish-tag.outputs.tag }}
|
|
60
62
|
|
|
61
63
|
publish-npm:
|
|
62
64
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
@@ -71,9 +73,8 @@ jobs:
|
|
|
71
73
|
steps:
|
|
72
74
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
73
75
|
|
|
74
|
-
- uses: actions/setup-node
|
|
76
|
+
- uses: ./.github/actions/setup-node
|
|
75
77
|
with:
|
|
76
|
-
node-version: 24
|
|
77
78
|
registry-url: 'https://registry.npmjs.org'
|
|
78
79
|
|
|
79
80
|
# Before setup-pnpm, for the same reason as publish-github's lookup (joshuafolkken/kit#3060).
|
|
@@ -99,7 +100,9 @@ jobs:
|
|
|
99
100
|
LATEST: ${{ steps.registry-latest.outputs.latest }}
|
|
100
101
|
|
|
101
102
|
- name: Publish to npm
|
|
102
|
-
run: cd "$RUNNER_TEMP" && npm publish kit.tgz --access public --tag $
|
|
103
|
+
run: cd "$RUNNER_TEMP" && npm publish kit.tgz --access public --tag "$PUBLISH_TAG" --registry https://registry.npmjs.org --userconfig /dev/null
|
|
104
|
+
env:
|
|
105
|
+
PUBLISH_TAG: ${{ steps.publish-tag.outputs.tag }}
|
|
103
106
|
|
|
104
107
|
update-production:
|
|
105
108
|
needs: [publish-github, publish-npm]
|
|
@@ -121,9 +124,7 @@ jobs:
|
|
|
121
124
|
with:
|
|
122
125
|
fetch-depth: 0
|
|
123
126
|
|
|
124
|
-
- uses: actions/setup-node
|
|
125
|
-
with:
|
|
126
|
-
node-version: 24
|
|
127
|
+
- uses: ./.github/actions/setup-node
|
|
127
128
|
|
|
128
129
|
- uses: ./.github/actions/setup-pnpm
|
|
129
130
|
with:
|
|
@@ -20,6 +20,8 @@ jobs:
|
|
|
20
20
|
contents: read
|
|
21
21
|
packages: read
|
|
22
22
|
runs-on: ubuntu-latest
|
|
23
|
+
# The scan waits for SonarCloud's Quality Gate, so the limit leaves room for that wait.
|
|
24
|
+
timeout-minutes: 20
|
|
23
25
|
# A consumer that does not use SonarCloud has no SONAR_TOKEN, and the scan would fail on
|
|
24
26
|
# authentication and turn a required check red (joshuafolkken/kit#2815). `secrets` cannot be read
|
|
25
27
|
# in a step `if:`, so the secret is lifted into the job env and the steps branch on that instead.
|
|
@@ -35,6 +37,21 @@ jobs:
|
|
|
35
37
|
if: env.SONAR_TOKEN != ''
|
|
36
38
|
with:
|
|
37
39
|
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
|
40
|
+
# The dependencies are installed before the scan, on a push as well as on a pull request:
|
|
41
|
+
# `tsconfig.sonar.json` extends `@joshuafolkken/kit/tsconfig/base`, which a consumer resolves
|
|
42
|
+
# only from node_modules, so a scan ahead of the install read a config it could not load
|
|
43
|
+
# (joshuafolkken/kit#3082). The new-code check below runs `pnpm josh` from the same install.
|
|
44
|
+
- name: Setup Node.js
|
|
45
|
+
if: env.SONAR_TOKEN != ''
|
|
46
|
+
uses: ./.github/actions/setup-node
|
|
47
|
+
- name: Configure GitHub Packages authentication for existing projects
|
|
48
|
+
if: env.SONAR_TOKEN != ''
|
|
49
|
+
run: printf '//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}\n' >> "$HOME/.npmrc"
|
|
50
|
+
- name: Setup pnpm and install dependencies
|
|
51
|
+
if: env.SONAR_TOKEN != ''
|
|
52
|
+
uses: ./.github/actions/setup-pnpm
|
|
53
|
+
with:
|
|
54
|
+
node-auth-token: ${{ secrets.GITHUB_TOKEN }}
|
|
38
55
|
# SonarCloud's New Code starts at the previous version, so an analysis without
|
|
39
56
|
# `sonar.projectVersion` never moves that start and New Code grows without end, diluting every
|
|
40
57
|
# ratio the Quality Gate judges (joshuafolkken/kit#3045). The version is `package.json`'s, so
|
|
@@ -57,19 +74,6 @@ jobs:
|
|
|
57
74
|
# job (a required PR check) when the pull request adds any new issue, of any type or severity,
|
|
58
75
|
# or any new duplicated block (joshuafolkken/kit#3045). An issue resolved in SonarCloud as
|
|
59
76
|
# accepted or a false positive is not counted. A push to main has no pull request to read.
|
|
60
|
-
- name: Setup Node.js
|
|
61
|
-
if: env.SONAR_TOKEN != '' && github.event_name == 'pull_request'
|
|
62
|
-
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
|
63
|
-
with:
|
|
64
|
-
node-version: '24'
|
|
65
|
-
- name: Configure GitHub Packages authentication for existing projects
|
|
66
|
-
if: env.SONAR_TOKEN != '' && github.event_name == 'pull_request'
|
|
67
|
-
run: printf '//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}\n' >> "$HOME/.npmrc"
|
|
68
|
-
- name: Setup pnpm and install dependencies
|
|
69
|
-
if: env.SONAR_TOKEN != '' && github.event_name == 'pull_request'
|
|
70
|
-
uses: ./.github/actions/setup-pnpm
|
|
71
|
-
with:
|
|
72
|
-
node-auth-token: ${{ secrets.GITHUB_TOKEN }}
|
|
73
77
|
- name: Fail on new Sonar issues or duplicated blocks
|
|
74
78
|
if: env.SONAR_TOKEN != '' && github.event_name == 'pull_request'
|
|
75
79
|
env:
|
package/.pnpmfile.mjs
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// josh-managed-pnpmfile: @joshuafolkken/kit
|
|
2
|
+
// `josh init` / `josh sync` copy this file into every project that publishes (joshuafolkken/kit#3110)
|
|
3
|
+
// and overwrite it while this first line stays; edit it in kit, not here.
|
|
4
|
+
// Strips the Safe Chain `preinstall` from the packed manifest only (joshuafolkken/kit#2693).
|
|
5
|
+
// kit writes it to run Safe Chain for the repository's own development installs; shipped, it becomes
|
|
6
|
+
// a build script every consumer's pnpm refuses to run unapproved, and it could not protect them
|
|
7
|
+
// anyway — their install has already started by the time a dependency's `preinstall` runs. The
|
|
8
|
+
// repository's package.json keeps it; `pnpm pack` and `pnpm publish` call this hook on the copy they
|
|
9
|
+
// write. Any other lifecycle script — a native build, a binary download — is the package's own and
|
|
10
|
+
// ships untouched.
|
|
11
|
+
const SAFE_CHAIN_PACKAGE = '@aikidosec/safe-chain'
|
|
12
|
+
|
|
13
|
+
function is_safe_chain_preinstall(name, command) {
|
|
14
|
+
return name === 'preinstall' && command.includes(SAFE_CHAIN_PACKAGE)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function strip_safe_chain_preinstall(manifest) {
|
|
18
|
+
const scripts = Object.fromEntries(
|
|
19
|
+
Object.entries(manifest.scripts ?? {}).filter(
|
|
20
|
+
([name, command]) => !is_safe_chain_preinstall(name, command),
|
|
21
|
+
),
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
return { ...manifest, scripts }
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const hooks = { beforePacking: strip_safe_chain_preinstall }
|
|
28
|
+
|
|
29
|
+
export { hooks, is_safe_chain_preinstall }
|
package/AGENTS.md
CHANGED
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
# Agent Instructions
|
|
2
2
|
|
|
3
3
|
> **All rules for this repository live in [`CLAUDE.md`](./CLAUDE.md). Read it in full before doing
|
|
4
|
-
> any work here, and follow every rule in it.** This file exists only to point at it.
|
|
5
|
-
> to whatever agent is doing the work, but `CLAUDE.md` is written for Claude Code and names its
|
|
6
|
-
> features — read them as follows.
|
|
4
|
+
> any work here, and follow every rule in it.** This file exists only to point at it.
|
|
7
5
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
- **Skills, `/verify-ui` and `/code-review`.** Where `CLAUDE.md` says to load a skill or run one in a
|
|
12
|
-
subagent, read that skill's `SKILL.md` and follow it in your own session.
|
|
13
|
-
- **The `.claude/settings.json` deny list** is not enforced here. The rules it backs — no commits,
|
|
14
|
-
merges, staging or other shared-state changes without instruction — still bind you.
|
|
15
|
-
- **`AskUserQuestion`** means asking the user in plain text.
|
|
6
|
+
**Codex runs the same hooks from `.codex/hooks.json`**, generated from `.claude/settings.json`; where
|
|
7
|
+
it does not show a hook's output, apply that rule yourself. How to read `CLAUDE.md`'s Claude Code
|
|
8
|
+
features here is `prompts/collaboration-workflow/principles.md` → "Claude Code 以外のエージェントでの読み替え".
|
|
16
9
|
|
|
17
10
|
**Do not copy rules back into this file.** Every change to how agents work in this repository belongs
|
|
18
11
|
in `CLAUDE.md`.
|
package/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. `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. `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 (`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. `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 `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 `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 `prompts/review.md` — a subagent runs `/code-review`, never a main-line `Skill` load. `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 `pro
|
|
|
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. `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`). `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 `prompts/collaboration-workflow/`, indexed by `prompts/collaboration-workflow.md`.
|
|
148
154
|
- **Before writing a rule as prose, place it by `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: `prompts/collaboration-workflow/wip-cap.md`.
|
|
150
156
|
|
|
@@ -162,11 +168,13 @@ Before every `git commit` (follow-up commits included), self-review against `pro
|
|
|
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/GEMINI.md
CHANGED
|
@@ -1,22 +1,13 @@
|
|
|
1
1
|
# Agent Instructions
|
|
2
2
|
|
|
3
3
|
> **All rules for this repository live in [`CLAUDE.md`](./CLAUDE.md). Read it in full before doing
|
|
4
|
-
> any work here, and follow every rule in it.** This file exists only to point at it.
|
|
5
|
-
> to whatever agent is doing the work, but `CLAUDE.md` is written for Claude Code and names its
|
|
6
|
-
> features — read them as follows.
|
|
4
|
+
> any work here, and follow every rule in it.** This file exists only to point at it.
|
|
7
5
|
|
|
8
6
|
@CLAUDE.md
|
|
9
7
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
editing instead of relying on the format-on-edit hook, and cite every Issue with a link and a short
|
|
14
|
-
title instead of relying on the stop-time check.
|
|
15
|
-
- **Skills, `/verify-ui` and `/code-review`.** Where `CLAUDE.md` says to load a skill or run one in a
|
|
16
|
-
subagent, read that skill's `SKILL.md` and follow it in your own session.
|
|
17
|
-
- **The `.claude/settings.json` deny list** is not enforced here. The rules it backs — no commits,
|
|
18
|
-
merges, staging or other shared-state changes without instruction — still bind you.
|
|
19
|
-
- **`AskUserQuestion`** means asking the user in plain text.
|
|
8
|
+
**No hooks run under Gemini**, so every rule a hook delivers is yours to apply unaided. How to read
|
|
9
|
+
`CLAUDE.md`'s Claude Code features here — that list of rules included — is
|
|
10
|
+
`prompts/collaboration-workflow/principles.md` → "Claude Code 以外のエージェントでの読み替え".
|
|
20
11
|
|
|
21
12
|
**Do not copy rules back into this file.** Every change to how agents work in this repository belongs
|
|
22
13
|
in `CLAUDE.md`.
|
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
[](https://github.com/joshuafolkken/kit/actions/workflows/ci.yml)
|
|
13
13
|
[](https://sonarcloud.io/summary/new_code?id=joshuafolkken_kit)
|
|
14
14
|
|
|
15
|
-
**
|
|
15
|
+
**Tell your AI agent the change. It files the GitHub Issue and takes it to a merged PR — the same way in every project.**
|
|
16
16
|
|
|
17
17
|
kit gives Claude Code or Codex (or Gemini, Cursor) your project's rules, checks and an Issue-driven workflow.
|
|
18
18
|
|
|
@@ -54,6 +54,7 @@ Each kit includes the one to its left: app-kit builds on kit, game-kit builds on
|
|
|
54
54
|
| ------------ | ------------------------------------------------ |
|
|
55
55
|
| `kickoff` | Writes the plan on the Issue, then stops |
|
|
56
56
|
| `halfrun` | Implements and self-reviews, stops before commit |
|
|
57
|
+
| `prrun` | Opens a green pull request, stops before merge |
|
|
57
58
|
| `fullrun` | Plans if needed, implements through to merge |
|
|
58
59
|
| `backlogrun` | Runs many Issues unattended |
|
|
59
60
|
|
|
@@ -66,13 +67,17 @@ Each keyword in full: [Run Issues with the workflow keywords](./docs/how-to/run-
|
|
|
66
67
|
|
|
67
68
|
## Quick start
|
|
68
69
|
|
|
69
|
-
Requires Node.js, pnpm and the gh CLI — [how to install them](./docs/setup/prerequisites.md).
|
|
70
|
+
Requires Node.js, pnpm (kit is installed and run with pnpm only) and the gh CLI — [how to install them](./docs/setup/prerequisites.md). Sign in once with `gh auth login` before `josh start`.
|
|
70
71
|
|
|
71
72
|
```bash
|
|
72
73
|
pnpm add -D --allow-build=esbuild --allow-build=unrs-resolver @joshuafolkken/kit
|
|
73
74
|
pnpm exec josh start
|
|
74
75
|
```
|
|
75
76
|
|
|
77
|
+
`josh start` picks the project's profile, writes kit's rules and checks, and creates the GitHub repository and workflow labels when they are missing. On a repository that already has history it opens a setup pull request instead of committing to `main` — merge it before your first run ([what it does](./docs/init.md#josh-init-or-josh-start)).
|
|
78
|
+
|
|
79
|
+
Add the two Telegram credentials to `.env` so a run that needs you can reach you, or `JOSH_NOTIFY=off` to go without — [Set up notifications](./docs/how-to/set-up-notifications.md).
|
|
80
|
+
|
|
76
81
|
Then open your agent and follow the [tutorial](./docs/tutorial.md).
|
|
77
82
|
|
|
78
83
|
No Issue workflow? [Node projects](./docs/setup/full.md#2-install-and-initialize-with-josh-init) · [Other projects](./docs/setup/basic.md)
|
|
@@ -81,4 +86,4 @@ No Issue workflow? [Node projects](./docs/setup/full.md#2-install-and-initialize
|
|
|
81
86
|
|
|
82
87
|
[Tutorial](./docs/tutorial.md) · [How-to](./docs/how-to.md) · [Commands](./docs/josh-commands.md) · [Troubleshooting](./docs/troubleshooting.md) · [All docs](./docs/overview.md)
|
|
83
88
|
|
|
84
|
-
[Releases](https://github.com/joshuafolkken/kit/releases) · [Security](./SECURITY.md) · [Contributing](./
|
|
89
|
+
[Releases](https://github.com/joshuafolkken/kit/releases) · [Security](./SECURITY.md) · [Contributing](./docs/maintainers/README.md) · [MIT](./LICENSE)
|
package/SECURITY.md
CHANGED
|
@@ -30,6 +30,7 @@ The `files` field of `package.json` decides what the published `@joshuafolkken/k
|
|
|
30
30
|
- `.github/` — GitHub Actions workflows (CI, tagging, pull request classification, Dependabot auto-merge, SonarQube and production), composite actions, `dependabot.yml`, the pull request template and the release-notes config. `josh sync` overwrites the distributed workflows; their action references are pinned to commit SHAs. kit's own `publish.yml` ships in the package but is never copied into a project.
|
|
31
31
|
- `lefthook/` — Git hook presets: lint before commit, checks before push.
|
|
32
32
|
- The `preinstall` script `josh init` adds to `package.json` runs `pnpm dlx @aikidosec/safe-chain setup-ci` on every install, then a `node -e` check that only prints a warning, and only outside CI. The `prepare` script it adds runs `lefthook install` when Lefthook is present, then, when tsx is present, kit's `fix-gh-packages` script: only when the project `.npmrc` routes a scope to GitHub Packages, it reads a GitHub token (`NODE_AUTH_TOKEN`, a token in the project `.npmrc`, or `gh auth token`), queries GitHub Packages and rewrites tarball URLs in `pnpm-lock.yaml`.
|
|
33
|
+
- `.pnpmfile.mjs` — a pnpm `beforePacking` hook that removes that safe-chain `preinstall` from the manifest `pnpm pack` and `pnpm publish` write, and changes nothing else. `josh init` and `josh sync` copy it only into a project whose `package.json` is not `private: true`, and never over a pnpmfile of the project's own.
|
|
33
34
|
|
|
34
35
|
**Agent instructions and skills**
|
|
35
36
|
|
package/cspell/index.yaml
CHANGED
|
@@ -41,6 +41,10 @@ ignorePaths:
|
|
|
41
41
|
# - '**/*.min.js'
|
|
42
42
|
# - '**/*.svg'
|
|
43
43
|
words:
|
|
44
|
+
# pnpm's `.pnpmfile.mjs` hook file that strips the safe-chain preinstall at pack time
|
|
45
|
+
# (joshuafolkken/kit#2693). Distributed, because `josh init` / `josh sync` copy that file, which
|
|
46
|
+
# names itself, into a published consumer (joshuafolkken/kit#3110).
|
|
47
|
+
- pnpmfile
|
|
44
48
|
# Git's `--show-toplevel` flag is added to every Codex hook command when `josh sync` copies the
|
|
45
49
|
# hooks into a consumer. The consumer spell-checks that transformed file with this dictionary.
|
|
46
50
|
- toplevel
|
package/dist/CLAUDE.basic.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.
|
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.
|