@joshuafolkken/kit 1.1435.0 → 1.1455.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/backlogrun-handoff-report.md +1 -1
- package/.claude/skills/workflow-commands/backlogrun-park.md +2 -0
- package/.claude/skills/workflow-commands/backlogrun-steps.md +9 -7
- package/.claude/skills/workflow-commands/backlogrun.md +2 -2
- package/.claude/skills/workflow-commands/fullrun-steps.md +1 -1
- package/.claude/skills/workflow-commands/halfrun.md +3 -2
- package/.claude/skills/workflow-commands/kickoff.md +12 -13
- package/.claude/skills/workflow-commands/observation-filing.md +1 -1
- package/.claude/skills/workflow-commands/prerequisite.md +6 -0
- package/.claude/skills/workflow-commands/prrun.md +2 -1
- package/.claude/skills/workflow-commands/retrospective.md +5 -5
- package/.claude/skills/workflow-commands/split-assessment.md +2 -2
- package/CLAUDE.md +1 -1
- package/README.md +10 -19
- package/dist/CLAUDE.md +1 -1
- package/dist/hooks/batch-guard.js +6 -6
- package/dist/hooks/{chunk-3LE6VLSR.js → chunk-3C4XRYG6.js} +18 -5
- package/dist/hooks/{chunk-7KMN5QB5.js → chunk-5H4SSDSD.js} +3 -3
- package/dist/hooks/{chunk-YZXYOAZ3.js → chunk-7WQBPLUN.js} +11 -5
- package/dist/hooks/{chunk-2G5F2YCD.js → chunk-D5QBTOCZ.js} +3 -3
- package/dist/hooks/{chunk-MU4LJFIV.js → chunk-GPLGZ6IC.js} +3 -3
- package/dist/hooks/{chunk-MSYSUSY6.js → chunk-HFGWYGUV.js} +5 -5
- package/dist/hooks/{chunk-JXQBK323.js → chunk-HHI6FO3R.js} +132 -105
- package/dist/hooks/{chunk-XER6SSIB.js → chunk-LIAFCXL7.js} +17 -7
- package/dist/hooks/{chunk-4BHUPFKF.js → chunk-OLMO72ON.js} +1 -1
- package/dist/hooks/{chunk-EMB55BDF.js → chunk-TBJFTSUY.js} +2 -2
- package/dist/hooks/{chunk-5SJSSCJG.js → chunk-UT7YC3N2.js} +1 -1
- package/dist/hooks/{chunk-QL6QTPWN.js → chunk-WNLVGT7E.js} +3 -3
- package/dist/hooks/{chunk-YW452ZAX.js → chunk-Z4XI7CZS.js} +2 -2
- package/dist/hooks/codex-hook-adapter.js +13 -13
- package/dist/hooks/duplicate-read-guard.js +7 -7
- package/dist/hooks/format-edited.js +3 -3
- package/dist/hooks/inputs.json +229 -226
- package/dist/hooks/investigation-guard.js +7 -7
- package/dist/hooks/pretool-guard.js +12 -12
- package/dist/hooks/session-lang.js +3 -3
- package/dist/hooks/stop-guard.js +64 -11
- package/dist/josh.js +34 -11
- package/package.json +1 -1
- package/prompts/collaboration-workflow/issue-template.md +10 -8
- package/prompts/collaboration-workflow/shell-body.md +1 -1
- package/prompts/review.md +8 -4
- package/scripts/auto-ok/auto-ok-judge-cli.ts +125 -0
- package/scripts/auto-ok/auto-ok-judge-read.ts +95 -0
- package/scripts/auto-ok/auto-ok-judge-write.ts +109 -0
- package/scripts/auto-ok/auto-ok-judge.ts +67 -0
- package/scripts/backlog/backlog-drive-cli.ts +14 -0
- package/scripts/backlog/backlog-drive.ts +22 -3
- package/scripts/document/document-byte-budget.ts +1 -1
- package/scripts/fresh-machine/fresh-machine-patterns.ts +60 -15
- package/scripts/gate/project-checks.ts +5 -2
- package/scripts/gh/git-gh-issue-rest.ts +1 -0
- package/scripts/gh/git-gh-issue.ts +9 -0
- package/scripts/gh/git-pr-ai-review.ts +12 -1
- package/scripts/gh/git-pr-confirmation.ts +11 -7
- package/scripts/init/init-actions.ts +3 -3
- package/scripts/init/init-ai-copy.ts +1 -1
- package/scripts/init/init-basic.ts +1 -1
- package/scripts/init/init-bootstrap.ts +6 -2
- package/scripts/init/init-dry-run-report.ts +150 -0
- package/scripts/init/init-dry-run.ts +189 -0
- package/scripts/init/init-install.ts +8 -1
- package/scripts/init/init.ts +57 -19
- package/scripts/init/kit-setup-state.ts +11 -17
- package/scripts/init/own-formatter.ts +21 -0
- package/scripts/init/project-profile.ts +25 -6
- package/scripts/init/start-dry-run.ts +70 -0
- package/scripts/init/start-plan.ts +8 -3
- package/scripts/init/start-setup-pr.ts +13 -24
- package/scripts/init/start-steps.ts +16 -1
- package/scripts/init/start.ts +38 -18
- package/scripts/init/working-tree.ts +116 -0
- package/scripts/issue/issue-auto-ok.ts +68 -99
- package/scripts/issue/issue-file-cli.ts +17 -17
- package/scripts/issue/issue-file.ts +1 -6
- package/scripts/issue/issue-labels.ts +6 -2
- package/scripts/issue/issue-release-cli.ts +69 -23
- package/scripts/issue/issue-release.ts +3 -1
- package/scripts/josh/josh-commands-ai.ts +11 -0
- package/scripts/josh/josh-commands-issue.ts +3 -3
- package/scripts/josh/josh-commands-project.ts +2 -2
- package/scripts/josh/josh-commands-workflow.ts +1 -1
- package/scripts/josh/process-identity.ts +32 -6
- package/scripts/lane/lane-broker-server.ts +69 -0
- package/scripts/lane/lane-session-broker.ts +37 -14
- package/scripts/notify/confirmation-options.ts +59 -0
- package/scripts/notify/notify-opt-in.ts +33 -0
- package/scripts/notify/telegram-notify.ts +25 -8
- package/scripts/notify/telegram-test-logic.ts +33 -1
- package/scripts/notify/telegram-test.ts +4 -2
- package/scripts/observations/observation-ledger-migrate.ts +3 -15
- package/scripts/release/release-issue-close.ts +133 -0
- package/scripts/release/release-publish.ts +12 -1
- package/scripts/repo/repository-labels.ts +11 -1
- package/scripts/review/comment-ranges.ts +199 -0
- package/scripts/review/review-brief-cli.ts +22 -5
- package/scripts/review/review-code-tree.ts +119 -0
- package/scripts/review/review-round2-cli.ts +16 -5
- package/scripts/review/review-round2.ts +30 -10
- package/scripts/review/review-stamps.ts +22 -1
- package/scripts/rules/shell-body-trigger.ts +3 -2
- package/scripts/rules/stop-rules.ts +2 -1
- package/scripts/run/entry/run-entry-stop.ts +6 -3
- package/scripts/run/run-stop-notify.ts +2 -0
- package/scripts/uninstall/distributed-files.ts +1 -1
|
@@ -24,6 +24,6 @@ structure and the label translations are `prompts/collaboration-workflow/report-
|
|
|
24
24
|
- One sentence per line, no internal identifiers, every child named by number. **Never omit
|
|
25
25
|
`Remaining`** — it is the one line that tells this report from a completion report
|
|
26
26
|
- Telegram uses the same format and is **sent with `--task-type confirmation`** (`completion` would
|
|
27
|
-
announce an unfinished epic as done)
|
|
27
|
+
announce an unfinished epic as done), `--recommended` naming the resume command
|
|
28
28
|
- **Write it only when the run stops.** While a run carries on past the threshold it writes none; the
|
|
29
29
|
epic progress comment is the record
|
|
@@ -103,6 +103,8 @@ It never carries:
|
|
|
103
103
|
|
|
104
104
|
- a choice with a clearly better default — that is Tier A: decide it and record it as an Issue comment;
|
|
105
105
|
- whether to run something already planned and opted in with `auto-ok` — the opt-in is that decision;
|
|
106
|
+
- a wait for the next published release — a dependency, `pnpm josh issue:release <N> --wait`
|
|
107
|
+
(`prerequisite.md`);
|
|
106
108
|
- a defect in the running repository's own run tooling — the run fixes it and resumes
|
|
107
109
|
(`prompts/collaboration-workflow/upstream-interrupt.md` → "実行中のリポジトリ自身のラン機構の不具合").
|
|
108
110
|
|
|
@@ -12,12 +12,12 @@ runs is stated by the keyword and its arguments, never inferred from a request's
|
|
|
12
12
|
that would bound this the other way are prohibited** — dropping a run's own filings, and requiring a
|
|
13
13
|
person's `auto-ok` on a child; the brake below bounds it. A Tier C action inside a child still stops that child.
|
|
14
14
|
|
|
15
|
-
**`pnpm josh issue:file`
|
|
16
|
-
`auto-ok: not applied` with the reason; `scripts/issue/issue-auto-ok.ts` is the single source.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
**
|
|
20
|
-
|
|
15
|
+
**`pnpm josh issue:file` judges `auto-ok` and prints it** — `auto-ok: applied` or
|
|
16
|
+
`auto-ok: not applied` with the reason; `scripts/issue/issue-auto-ok.ts` is the single source. Every
|
|
17
|
+
filing is judged the same way, whoever asked for it: the excluded labels, then the body's
|
|
18
|
+
`- 人の判断:` declaration (`issue-template.md`). **Declare `- 人の判断: 要` when the new issue needs a
|
|
19
|
+
person's judgement** — a Tier B toss-up or a Tier C action inside it; `--no-auto-ok` withholds it too.
|
|
20
|
+
The retrospective's filings are judged the same way and count against the same brake.
|
|
21
21
|
|
|
22
22
|
Rationale: `docs/maintainers/backlogrun-steps-rationale.md` → "Why the authorization boundary is shaped this way";
|
|
23
23
|
provenance of each rule: `docs/maintainers/backlogrun-steps-rationale.md` → "Where each rule came from"
|
|
@@ -115,7 +115,8 @@ person, Out of scope) to the person in the session language, with any truncated-
|
|
|
115
115
|
the loop, leaving whatever is still labelled parked.
|
|
116
116
|
|
|
117
117
|
**`needs-decision`, `run:solo`, `run:lane` and `priority:high` are the only workflow labels a run
|
|
118
|
-
applies by hand** — never `
|
|
118
|
+
applies by hand** — never `needs-human-review` (`needs-human-review.md`), and `auto-ok` only through
|
|
119
|
+
`pnpm josh issue:file` or `pnpm josh auto-ok:judge`, which check the exclusions first.
|
|
119
120
|
|
|
120
121
|
Rationale: `docs/maintainers/backlogrun-steps-rationale.md` → "Why the plan and the decision pass come first"
|
|
121
122
|
|
|
@@ -130,6 +131,7 @@ section the row names:
|
|
|
130
131
|
| Handed back | What the session does | Read |
|
|
131
132
|
| --- | --- | --- |
|
|
132
133
|
| `triage` | Label each issue stderr names `run:solo` or `run:lane` (`blocked-by` where one must land first) | "Resolve what the plan can resolve, before starting" above |
|
|
134
|
+
| `judge` | For each number `pnpm josh auto-ok:judge` prints, read the issue (`pnpm josh issue:read <N>`) and answer `--apply <N> --lane\|--solo` or `--decline <N> --reason "<why>"` | `docs/josh-commands-backlog.md` → "`josh auto-ok:judge`" |
|
|
133
135
|
| `offer` | Report what stderr printed — a failed offer, or a named issue whose state stayed unreadable; **never pick an issue by hand** | — |
|
|
134
136
|
| `launch #N` | Read the lane's log and park `#N` | `backlogrun-park.md` → "park and continue" |
|
|
135
137
|
| `merge [<token>] #N` | `environment` ends the run; the others re-read the child | `backlogrun-progress.md` → "Running a named epic's children" |
|
|
@@ -35,7 +35,7 @@ is still that one invocation (`backlogrun-steps.md` → "The session cut is insi
|
|
|
35
35
|
2. **Begin the carry record before the plan** — `pnpm josh run:carry --begin "<invocation>" --owner
|
|
36
36
|
"$PPID"` and `pnpm josh run:wake --start`, in the same turn as the first `pnpm josh ms`.
|
|
37
37
|
3. **What this invocation approves** — the opted-in pool, a run's own filings once bundled, and the
|
|
38
|
-
brake that bounds the amount; the route table's row points at the single source of the `auto-ok`
|
|
38
|
+
brake that bounds the amount; the route table's row points at the single source of the `auto-ok` rule.
|
|
39
39
|
4. **Report the plan before the first child** — `pnpm josh backlog:plan`, then resolve every
|
|
40
40
|
`needs-decision` issue decidable from its body in one pass, recording `blocked-by`, `run:solo` and
|
|
41
41
|
`run:lane` in the same pass.
|
|
@@ -56,7 +56,7 @@ never a whole document (`SKILL.md` → "A section reference is read as a section
|
|
|
56
56
|
| The moment | Read |
|
|
57
57
|
| --- | --- |
|
|
58
58
|
| The entry: the carry record and its answers | `backlogrun-steps.md` → "The session cut is inside the invocation" |
|
|
59
|
-
| What the invocation may merge, and the `auto-ok`
|
|
59
|
+
| What the invocation may merge, and the `auto-ok` rule | `backlogrun-steps.md` → "What one invocation approves" |
|
|
60
60
|
| Before the first child: the plan and the decision pass | `backlogrun-steps.md` → "The plan, before the first child starts" |
|
|
61
61
|
| The driver hands a branch back | `backlogrun-steps.md` → "The loop" |
|
|
62
62
|
| Once per session | `backlogrun-steps.md` → "What runs once per session, not once per issue" |
|
|
@@ -45,7 +45,7 @@ primary checkout; a Claude run keeps it.
|
|
|
45
45
|
## The `fullrun new` step list
|
|
46
46
|
|
|
47
47
|
`kickoff new` + `fullrun #N` in one run. Steps: (1) Derive an English title, or use the provided one.
|
|
48
|
-
(2) Create Issue: `pnpm josh issue:file "<title>" --body-file <body-file> --depth <n
|
|
48
|
+
(2) Create Issue: `pnpm josh issue:file "<title>" --body-file <body-file> --depth <n>`,
|
|
49
49
|
with the labels `kickoff.md` → "Words typed after `new`" maps (per
|
|
50
50
|
`prompts/collaboration-workflow/issue-template.md`) — its duplicate scan runs first, and a candidate
|
|
51
51
|
that covers the same work stops the run rather than filing a second Issue (`issue-scout.md`). Capture
|
|
@@ -35,14 +35,15 @@ the gate. The direct commands follow for shipping without an agent:
|
|
|
35
35
|
`pnpm josh notify --task-type confirmation --issue-url "<issue-url>" --body=$'halfrun ready for manual
|
|
36
36
|
verification\nNext: prrun #<N> | fullrun #<N>\nWithout an agent: pnpm josh git -y "<title> #<N>" && pnpm josh
|
|
37
37
|
followup "<title> #<N>" --notify-message "Implemented <title>\\nCause: ...\\nFix: ...\\nResult:
|
|
38
|
-
...\\n\\nDetails:\\n- <change1>"'
|
|
38
|
+
...\\n\\nDetails:\\n- <change1>"' --recommended "Verify by hand, then prrun #<N>" --alternative "fullrun
|
|
39
|
+
#<N>"`. The stop report names the same two, in the same order.
|
|
39
40
|
**Invoking `halfrun` is _not_ authorization to commit, push, or merge** — do not run `pnpm josh git -y` or `pnpm josh followup` yourself. If the user comes
|
|
40
41
|
back with fixes, treat each as a new round: implement, re-run `pnpm josh gate`, send another
|
|
41
42
|
`confirmation` Telegram, stop again.
|
|
42
43
|
|
|
43
44
|
`halfrun new` or `halfrun new "<title>"`: `kickoff new` + `halfrun #<N>` (no Issue exists yet). Steps
|
|
44
45
|
mirror `fullrun new` (1)–(8): derive an English title (or use the provided one) → create the Issue
|
|
45
|
-
(`pnpm josh issue:file "<title>" --body-file <body-file> --depth <n
|
|
46
|
+
(`pnpm josh issue:file "<title>" --body-file <body-file> --depth <n>`, with the labels
|
|
46
47
|
`kickoff.md` → "Words typed after `new`" maps, body per
|
|
47
48
|
`prompts/collaboration-workflow/issue-template.md`; its duplicate scan is read per `issue-scout.md`) → add `in-progress` (as `fullrun new` (3)) → post the agreed plan → stash
|
|
48
49
|
any pre-existing changes with `git stash push -m "halfrun new: pre-existing changes" -- ':!.josh/observations'`
|
|
@@ -43,8 +43,7 @@ is read on demand when a split is found.
|
|
|
43
43
|
- `kickoff new` or `kickoff new "<title>"`: No Issue exists yet. Steps: (0) **Scope assessment** per
|
|
44
44
|
`split-assessment.md`. If multiple → the **multi-issue split path**; if single → the **single-issue
|
|
45
45
|
path**. **Single-issue path**: (1) Derive an English title from the conversation, or use the provided
|
|
46
|
-
title. (2) Create Issue: `pnpm josh issue:file "<title>" --body-file <body-file> --depth <n
|
|
47
|
-
--requested` plus the labels the words typed after `new` name ("Words typed after `new`", below) (body
|
|
46
|
+
title. (2) Create Issue: `pnpm josh issue:file "<title>" --body-file <body-file> --depth <n>` plus the labels the words typed after `new` name ("Words typed after `new`", below) (body
|
|
48
47
|
per `prompts/collaboration-workflow/issue-template.md`) — its duplicate scan runs first, and a
|
|
49
48
|
candidate that covers the same work stops the run rather than filing a second Issue (`SKILL.md` →
|
|
50
49
|
`issue-scout.md`). Capture `<N>`. (3)
|
|
@@ -52,7 +51,7 @@ is read on demand when a split is found.
|
|
|
52
51
|
Telegram notification. (5) **Stop** — do not implement. **Multi-issue split path**: (1) For each
|
|
53
52
|
independent deliverable, derive a focused English title and create a separate Issue with the
|
|
54
53
|
`route:split` label (its duplicate scan is read per `issue-scout.md`): `pnpm josh issue:file
|
|
55
|
-
"<sub-title>" --body-file <body-file> --depth <n> --route split
|
|
54
|
+
"<sub-title>" --body-file <body-file> --depth <n> --route split` plus the labels the words typed after `new` name. Capture each Issue number. **When the split is filed into a repository other than
|
|
56
55
|
the one this session is running in**, every child body gets the `## Origin` backlink described in the
|
|
57
56
|
cross-package rule the AI documents keep resident, the epic body carries the same link as prose or a
|
|
58
57
|
plain bullet (never as a checkbox row, which would disable its auto-close), and the originating Issue
|
|
@@ -85,15 +84,15 @@ An Issue a consumer can use only once it is published is filed with `--release`
|
|
|
85
84
|
|
|
86
85
|
## Words typed after `new`
|
|
87
86
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
87
|
+
**`auto-ok` is judged by `pnpm josh issue:file`, never typed** — by the same criteria as every
|
|
88
|
+
filing: the excluded labels and the body's `- 人の判断:` declaration, and a `不要` declaration also needs a run label
|
|
89
|
+
(`issue-template.md`).
|
|
90
|
+
`auto ok` typed after `new` adds nothing.
|
|
92
91
|
|
|
93
|
-
**Words after `new`** (`kickoff new
|
|
94
|
-
|
|
92
|
+
**Words after `new`** (`kickoff new high`) are read like `into <target>`, never inferred. Each adds its
|
|
93
|
+
labels to the filing; a word not in the table is asked about:
|
|
95
94
|
|
|
96
|
-
| Typed | Added to `pnpm josh issue:file`
|
|
97
|
-
| --------- |
|
|
98
|
-
| `auto ok` |
|
|
99
|
-
| `high` | `--label priority:high`
|
|
95
|
+
| Typed | Added to `pnpm josh issue:file` |
|
|
96
|
+
| --------- | ------------------------------- |
|
|
97
|
+
| `auto ok` | nothing — `issue:file` judges it |
|
|
98
|
+
| `high` | `--label priority:high` |
|
|
@@ -70,7 +70,7 @@ defines, before the create call.
|
|
|
70
70
|
|
|
71
71
|
- **It is read off the subject, exactly as the table is** — so applying it is not a judgement and not
|
|
72
72
|
a person's to make, which is what separates it from `auto-ok` and `needs-human-review`. Those two
|
|
73
|
-
decide what a run may do (`auto-ok` by `issue:file`'s
|
|
73
|
+
decide what a run may do (`auto-ok` by `issue:file`'s judgement against the criteria —
|
|
74
74
|
`backlogrun-steps.md` → "What one invocation approves"); this one records what an Issue is about
|
|
75
75
|
and withholds nothing.
|
|
76
76
|
- **Applied at filing, not at completion.**
|
|
@@ -28,6 +28,12 @@ action. `pnpm josh run:merge` enforces the computable half: an unfinished child
|
|
|
28
28
|
blocked-by is released to **wait** — no `needs-decision` label, no failure counted — and the backlog
|
|
29
29
|
offer hands it back once its blockers merge.
|
|
30
30
|
|
|
31
|
+
**A wait for the next published release is a dependency too** — never `needs-decision`. Record it
|
|
32
|
+
with `pnpm josh issue:release <M> --wait` (`<M>` blocked by the release Issue, filed when none is
|
|
33
|
+
open), then stash, comment and `pnpm josh run:release <M>` as for a prerequisite below; `fullrun` /
|
|
34
|
+
`halfrun` stop, `backlogrun` continues. Closing the release Issue once a person has published it hands
|
|
35
|
+
`<M>` back to `backlog:next` (`docs/josh-commands-backlog.md` → `josh issue:release`).
|
|
36
|
+
|
|
31
37
|
**File the prerequisite with the `route:tier-a` label**, so a Tier A filing made during implementation
|
|
32
38
|
stays countable by filing route afterwards. **This paragraph belongs to the prerequisite row, not to
|
|
33
39
|
the table** — the label means a filing the run is *blocked by*, so the observation row carries no
|
|
@@ -27,7 +27,8 @@ Where `fullrun` runs `pnpm josh followup` and merges, `prrun` does three things
|
|
|
27
27
|
follows for finishing without an agent:
|
|
28
28
|
`pnpm josh notify --task-type confirmation --issue-url "<issue-url>" --body=$'prrun ready to
|
|
29
29
|
merge: <pr-url>\nNext: fullrun #<N>\nAfter a manual merge, without an agent: pnpm josh followup
|
|
30
|
-
"<title> #<N>"'
|
|
30
|
+
"<title> #<N>"' --recommended "fullrun #<N>" --alternative "Merge by hand, then pnpm josh
|
|
31
|
+
followup"`. The stop report names the same two, in the same order.
|
|
31
32
|
|
|
32
33
|
**Invoking `prrun` is _not_ authorization to merge** — never run `pnpm josh followup` without
|
|
33
34
|
`--no-merge` in a `prrun`. After a person merges by hand, the same `pnpm josh followup "<title> #<N>"`
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
not at the entry.** `SKILL.md` → §2's table keeps the rule itself: run what `run:step` prints once,
|
|
5
5
|
file the improvements worth carrying into the next run, stack the rest, and mark the step done.
|
|
6
6
|
Everything that decides *how* — what the four sections mean, how the top two are chosen, the
|
|
7
|
-
exclusions, and the `auto-ok`
|
|
7
|
+
exclusions, and the `auto-ok` judgement — is here. Read it in full, in the same turn, before filing.
|
|
8
8
|
|
|
9
9
|
**When it fires is not this file's, and not a judgement.** The run driver prints the step the moment the
|
|
10
10
|
backlog drains — `backlog:offer` marks that drain on the event stream and `run:step` fires the
|
|
@@ -56,10 +56,10 @@ Issue, as after any filing.
|
|
|
56
56
|
|
|
57
57
|
## `auto-ok`, and closing the step
|
|
58
58
|
|
|
59
|
-
**What a retrospective files
|
|
60
|
-
`issue:file`
|
|
61
|
-
for a person. **`backlogrun-steps.md` → "What one invocation approves" is that
|
|
62
|
-
source**; it is written there, beside the brakes that bound it, rather than restated here. Every brake still counts a retrospective's filings: the
|
|
59
|
+
**What a retrospective files is judged for `auto-ok`** — an improvement that needs no person's
|
|
60
|
+
judgement declares `- 人の判断: 不要`, so `issue:file` applies the label (with the run label `prompts/collaboration-workflow/issue-template.md` requires) and the next run picks it up
|
|
61
|
+
without waiting for a person. **`backlogrun-steps.md` → "What one invocation approves" is that
|
|
62
|
+
judgement's single source**; it is written there, beside the brakes that bound it, rather than restated here. Every brake still counts a retrospective's filings: the
|
|
63
63
|
ten-per-invocation ceiling, the WIP cap, `--max` and the 150,000-token session budget.
|
|
64
64
|
|
|
65
65
|
**Close with `pnpm josh run:carry --retrospective --summary "<result>" --owner "$PPID"`.** It marks the
|
|
@@ -77,8 +77,8 @@ moment that child merges and closes.
|
|
|
77
77
|
|
|
78
78
|
**Each split child is filed with the `route:split` label** —
|
|
79
79
|
`pnpm josh issue:file "<sub-title>" --body-file <body-file> --depth <n> --route split` — so the
|
|
80
|
-
backlog's composition stays countable by filing route rather than by grepping issue bodies.
|
|
81
|
-
|
|
80
|
+
backlog's composition stays countable by filing route rather than by grepping issue bodies. Each child
|
|
81
|
+
is judged for `auto-ok` like any filing (`kickoff.md` → "Words typed after `new`").
|
|
82
82
|
|
|
83
83
|
## Promote, or create a new epic
|
|
84
84
|
|
package/CLAUDE.md
CHANGED
|
@@ -82,5 +82,5 @@ Never start a `kickoff` / `halfrun` / `prrun` / `fullrun` / `backlogrun` workflo
|
|
|
82
82
|
Before pausing **any** run for the user — a command's stop, an upstream-Issue interrupt, a Tier C confirmation — send once per stop (skip when the user asked for the stop this turn):
|
|
83
83
|
|
|
84
84
|
```bash
|
|
85
|
-
pnpm josh notify --task-type confirmation --issue-url "<
|
|
85
|
+
pnpm josh notify --task-type confirmation --issue-url "<url>" --body=$'<reason>' --recommended "<choice>" --alternative "<other>"
|
|
86
86
|
```
|
package/README.md
CHANGED
|
@@ -6,9 +6,9 @@ kit gives Claude Code or Codex your project's rules and checks.
|
|
|
6
6
|
|
|
7
7
|
## The workflow
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
`backlogrun` takes your Issues to merged PRs — in parallel, unattended:
|
|
10
10
|
|
|
11
|
-

|
|
12
12
|
|
|
13
13
|
[Every keyword, including the ones that stop for you earlier](./docs/how-to/run-issues.md)
|
|
14
14
|
|
|
@@ -23,7 +23,9 @@ Type `backlogrun` and the agent takes the Issues you name from plan to merged PR
|
|
|
23
23
|
|
|
24
24
|
## Quick start
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
Pick one setup ([A or B: what differs](./docs/setup/choose.md)):
|
|
27
|
+
|
|
28
|
+
### A. With GitHub — Issues, PRs and unattended runs
|
|
27
29
|
|
|
28
30
|
Requires [Node.js, pnpm and the gh CLI](./docs/setup/prerequisites.md).
|
|
29
31
|
|
|
@@ -35,9 +37,9 @@ pnpm exec josh start
|
|
|
35
37
|
|
|
36
38
|
Next: [tutorial](./docs/tutorial.md)
|
|
37
39
|
|
|
38
|
-
|
|
40
|
+
#### Your first backlogrun
|
|
39
41
|
|
|
40
|
-
|
|
42
|
+
File Issues with `kickoff new`, then run:
|
|
41
43
|
|
|
42
44
|
```bash
|
|
43
45
|
pnpm josh backlogrun
|
|
@@ -45,7 +47,7 @@ pnpm josh backlogrun
|
|
|
45
47
|
|
|
46
48
|
Details: [Run the backlog unattended](./docs/how-to/run-backlog.md)
|
|
47
49
|
|
|
48
|
-
###
|
|
50
|
+
### B. Without GitHub — AI assistant only
|
|
49
51
|
|
|
50
52
|
Requires [Node.js and pnpm](./docs/setup/prerequisites.md).
|
|
51
53
|
|
|
@@ -55,20 +57,9 @@ pnpm --allow-build=esbuild dlx @joshuafolkken/kit init
|
|
|
55
57
|
|
|
56
58
|
Next: [tutorial](./docs/tutorial.md#without-github-one-change-checked-locally)
|
|
57
59
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
A [`josh fresh:run`](./docs/maintainers/fresh-machine.md) scenario that runs Claude Code needs a sign-in, saved once:
|
|
61
|
-
|
|
62
|
-
1. In a terminal at the kit repository, run:
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
pnpm josh auth:setup
|
|
66
|
-
```
|
|
60
|
+
### Adding kit to an existing project
|
|
67
61
|
|
|
68
|
-
|
|
69
|
-
3. Done when the terminal prints `saved: CLAUDE_CODE_OAUTH_TOKEN (macOS keychain)`. There is no token to copy or write into a file.
|
|
70
|
-
4. To check, run `pnpm josh auth:setup --check`: it prints `ok` and the day it was saved.
|
|
71
|
-
5. When the token expires, Claude Code in the container fails to sign in — start again from step 1.
|
|
62
|
+
Check first: [what kit changes in your project](./docs/how-to/add-kit.md#what-kit-changes-in-your-project)
|
|
72
63
|
|
|
73
64
|
## Docs
|
|
74
65
|
|
package/dist/CLAUDE.md
CHANGED
|
@@ -82,5 +82,5 @@ Never start a `kickoff` / `halfrun` / `prrun` / `fullrun` / `backlogrun` workflo
|
|
|
82
82
|
Before pausing **any** run for the user — a command's stop, an upstream-Issue interrupt, a Tier C confirmation — send once per stop (skip when the user asked for the stop this turn):
|
|
83
83
|
|
|
84
84
|
```bash
|
|
85
|
-
pnpm josh notify --task-type confirmation --issue-url "<
|
|
85
|
+
pnpm josh notify --task-type confirmation --issue-url "<url>" --body=$'<reason>' --recommended "<choice>" --alternative "<other>"
|
|
86
86
|
```
|
|
@@ -9,12 +9,12 @@ 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-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-5H4SSDSD.js";
|
|
13
|
+
import "./chunk-UT7YC3N2.js";
|
|
14
|
+
import "./chunk-GPLGZ6IC.js";
|
|
15
|
+
import "./chunk-LIAFCXL7.js";
|
|
16
|
+
import "./chunk-OLMO72ON.js";
|
|
17
|
+
import "./chunk-3C4XRYG6.js";
|
|
18
18
|
import "./chunk-DGT54IH5.js";
|
|
19
19
|
export {
|
|
20
20
|
DISABLED_VALUES,
|
|
@@ -668,6 +668,7 @@ var START_TIME_FORMAT = "lstart=";
|
|
|
668
668
|
var PID_FLAG = "-p";
|
|
669
669
|
var PROBE_ENVIRONMENT = { TZ: "UTC", LC_ALL: "C" };
|
|
670
670
|
var LIVENESS_SIGNAL = 0;
|
|
671
|
+
var NO_SUCH_PROCESS = "ESRCH";
|
|
671
672
|
var LOWEST_REAL_PID = 1;
|
|
672
673
|
var PROC_START_FIELD_INDEX = 19;
|
|
673
674
|
var BEACON_SCHEME = "socket:";
|
|
@@ -682,15 +683,20 @@ var BEACON_GONE_STATUS = 2;
|
|
|
682
683
|
var SOCKET_PROBE_SOURCE = `const net=require('node:net');const socket=net.createConnection(process.argv[1]);socket.once('connect',()=>process.exit(${String(BEACON_LIVE_STATUS)}));socket.once('error',(error)=>process.exit(['ECONNREFUSED','ENOENT'].includes(error.code)?${String(BEACON_GONE_STATUS)}:${String(BEACON_UNKNOWN_STATUS)}));socket.setTimeout(1000,()=>process.exit(${String(BEACON_UNKNOWN_STATUS)}));`;
|
|
683
684
|
var beacons = /* @__PURE__ */ new Map();
|
|
684
685
|
var exit_cleanup = { is_registered: false };
|
|
685
|
-
function
|
|
686
|
-
if (pid < LOWEST_REAL_PID) return false;
|
|
686
|
+
function signal_refusal(pid) {
|
|
687
687
|
try {
|
|
688
688
|
process.kill(pid, LIVENESS_SIGNAL);
|
|
689
|
-
return
|
|
690
|
-
} catch {
|
|
691
|
-
return
|
|
689
|
+
return void 0;
|
|
690
|
+
} catch (error) {
|
|
691
|
+
return error.code ?? NO_SUCH_PROCESS;
|
|
692
692
|
}
|
|
693
693
|
}
|
|
694
|
+
function is_live_pid(pid) {
|
|
695
|
+
return pid >= LOWEST_REAL_PID && signal_refusal(pid) === void 0;
|
|
696
|
+
}
|
|
697
|
+
function is_present_pid(pid) {
|
|
698
|
+
return pid >= LOWEST_REAL_PID && signal_refusal(pid) !== NO_SUCH_PROCESS;
|
|
699
|
+
}
|
|
694
700
|
function read_proc_start(pid) {
|
|
695
701
|
try {
|
|
696
702
|
const stat = readFileSync(`/proc/${String(pid)}/stat`, "utf8");
|
|
@@ -816,6 +822,11 @@ function is_same_process(pid, recorded_start, read3 = read_start) {
|
|
|
816
822
|
if (recorded_start === void 0) return void 0;
|
|
817
823
|
return matches_recorded_start(pid, recorded_start, read3);
|
|
818
824
|
}
|
|
825
|
+
function is_present_process(pid, recorded_start, read3 = read_start) {
|
|
826
|
+
if (!is_present_pid(pid)) return false;
|
|
827
|
+
if (recorded_start === void 0) return void 0;
|
|
828
|
+
return matches_recorded_start(pid, recorded_start, read3);
|
|
829
|
+
}
|
|
819
830
|
function is_own_process(pid, recorded_start) {
|
|
820
831
|
return pid === process.pid && recorded_start === own_start();
|
|
821
832
|
}
|
|
@@ -824,6 +835,8 @@ var process_identity = {
|
|
|
824
835
|
is_live_beacon,
|
|
825
836
|
is_live_pid,
|
|
826
837
|
is_own_process,
|
|
838
|
+
is_present_pid,
|
|
839
|
+
is_present_process,
|
|
827
840
|
is_same_process,
|
|
828
841
|
open_beacon,
|
|
829
842
|
own_fields,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
lane_guard_policy
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UT7YC3N2.js";
|
|
4
4
|
import {
|
|
5
5
|
hook_decision
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GPLGZ6IC.js";
|
|
7
7
|
import {
|
|
8
8
|
time_batch_guard
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-LIAFCXL7.js";
|
|
10
10
|
|
|
11
11
|
// scripts/hooks/batch-guard.ts
|
|
12
12
|
import { text } from "node:stream/consumers";
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
repo_origin,
|
|
9
9
|
run_event_stream,
|
|
10
10
|
run_event_stream_emit
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-Z4XI7CZS.js";
|
|
12
12
|
import {
|
|
13
13
|
error_text
|
|
14
14
|
} from "./chunk-CDY4NFQG.js";
|
|
@@ -30,10 +30,10 @@ import {
|
|
|
30
30
|
time_density_hook,
|
|
31
31
|
time_shell,
|
|
32
32
|
time_transcript_line
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-LIAFCXL7.js";
|
|
34
34
|
import {
|
|
35
35
|
lane_child_marker
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-OLMO72ON.js";
|
|
37
37
|
import {
|
|
38
38
|
agent_session_environment,
|
|
39
39
|
backlog_budget,
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
has_timed_out,
|
|
43
43
|
json_value,
|
|
44
44
|
process_identity
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-3C4XRYG6.js";
|
|
46
46
|
import {
|
|
47
47
|
COMMAND_TIMEOUT_MS,
|
|
48
48
|
PROJECT_ROOT,
|
|
@@ -1881,7 +1881,8 @@ var EMPTY_BODY = "";
|
|
|
1881
1881
|
var REST_FIELD_NAMES = /* @__PURE__ */ new Map([
|
|
1882
1882
|
["url", "html_url"],
|
|
1883
1883
|
["createdAt", "created_at"],
|
|
1884
|
-
["closedAt", "closed_at"]
|
|
1884
|
+
["closedAt", "closed_at"],
|
|
1885
|
+
["updatedAt", "updated_at"]
|
|
1885
1886
|
]);
|
|
1886
1887
|
var NOT_AN_ISSUE_MESSAGE = "gh api answered something other than an issue object";
|
|
1887
1888
|
var NOT_AN_ISSUE_LISTING_MESSAGE = "gh api answered something other than an issue listing";
|
|
@@ -2508,6 +2509,10 @@ async function issue_list_by_label_summary(label, limit, options) {
|
|
|
2508
2509
|
async function issue_list_by_label_in_repo(label, limit, repo) {
|
|
2509
2510
|
return await issue_list2({ json_fields: SUMMARY_FIELDS, limit, label, repo });
|
|
2510
2511
|
}
|
|
2512
|
+
var JUDGEMENT_FIELDS = "number,title,body,labels,updatedAt";
|
|
2513
|
+
async function issue_list_open_for_judgement(limit) {
|
|
2514
|
+
return await issue_list2({ json_fields: JUDGEMENT_FIELDS, limit });
|
|
2515
|
+
}
|
|
2511
2516
|
var git_gh_issue = {
|
|
2512
2517
|
...git_gh_issue_read,
|
|
2513
2518
|
...git_gh_issue_write,
|
|
@@ -2517,6 +2522,7 @@ var git_gh_issue = {
|
|
|
2517
2522
|
issue_list_by_label_summary,
|
|
2518
2523
|
issue_search_body,
|
|
2519
2524
|
issue_list_open_bodies,
|
|
2525
|
+
issue_list_open_for_judgement,
|
|
2520
2526
|
issue_list_recently_closed
|
|
2521
2527
|
};
|
|
2522
2528
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
investigation_reads
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WNLVGT7E.js";
|
|
4
4
|
import {
|
|
5
5
|
lane_guard_policy
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UT7YC3N2.js";
|
|
7
7
|
import {
|
|
8
8
|
hook_decision
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-GPLGZ6IC.js";
|
|
10
10
|
|
|
11
11
|
// scripts/delegation/investigation-guard.ts
|
|
12
12
|
import { text } from "node:stream/consumers";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
time_density_hook,
|
|
3
3
|
time_hook_transcript
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-LIAFCXL7.js";
|
|
5
5
|
import {
|
|
6
6
|
josh_environment_file
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-OLMO72ON.js";
|
|
8
8
|
import {
|
|
9
9
|
json_value
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-3C4XRYG6.js";
|
|
11
11
|
import {
|
|
12
12
|
stamp_file
|
|
13
13
|
} from "./chunk-DGT54IH5.js";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
investigation_reads
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WNLVGT7E.js";
|
|
4
4
|
import {
|
|
5
5
|
lane_guard_policy
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UT7YC3N2.js";
|
|
7
7
|
import {
|
|
8
8
|
hook_decision
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-GPLGZ6IC.js";
|
|
10
10
|
import {
|
|
11
11
|
time_spans
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-LIAFCXL7.js";
|
|
13
13
|
import {
|
|
14
14
|
json_value
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-3C4XRYG6.js";
|
|
16
16
|
|
|
17
17
|
// scripts/delegation/duplicate-read-guard.ts
|
|
18
18
|
import { statSync } from "node:fs";
|