@joshuafolkken/kit 1.1136.0 → 1.1166.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.json +4 -4
- package/.claude/skills/epic-commands/SKILL.md +27 -239
- package/.claude/skills/epic-commands/epic-bundle.md +115 -0
- package/.claude/skills/epic-commands/execution-waves.md +126 -0
- package/.claude/skills/workflow-commands/SKILL.md +48 -194
- package/.claude/skills/workflow-commands/background-commands.md +1 -1
- package/.claude/skills/workflow-commands/backlogrun-child.md +12 -123
- package/.claude/skills/workflow-commands/backlogrun-lanes.md +11 -60
- package/.claude/skills/workflow-commands/backlogrun-park.md +10 -8
- package/.claude/skills/workflow-commands/backlogrun-progress.md +17 -173
- package/.claude/skills/workflow-commands/backlogrun-recovery.md +155 -0
- package/.claude/skills/workflow-commands/backlogrun-steps.md +64 -144
- package/.claude/skills/workflow-commands/backlogrun.md +5 -4
- package/.claude/skills/workflow-commands/chain-rule.md +3 -2
- package/.claude/skills/workflow-commands/delegation.md +2 -2
- package/.claude/skills/workflow-commands/entry-sequence.md +62 -0
- package/.claude/skills/workflow-commands/followup.md +104 -181
- package/.claude/skills/workflow-commands/fullrun-steps.md +8 -9
- package/.claude/skills/workflow-commands/fullrun.md +16 -73
- package/.claude/skills/workflow-commands/halfrun.md +10 -36
- package/.claude/skills/workflow-commands/into-target.md +4 -4
- package/.claude/skills/workflow-commands/issue-comments.md +7 -8
- package/.claude/skills/workflow-commands/issue-scout.md +6 -6
- package/.claude/skills/workflow-commands/kickoff.md +6 -6
- package/.claude/skills/workflow-commands/needs-human-review.md +6 -6
- package/.claude/skills/workflow-commands/observation-filing.md +21 -172
- package/.claude/skills/workflow-commands/observation-ledger.md +150 -0
- package/.claude/skills/workflow-commands/pre-gate-cut.md +33 -93
- package/.claude/skills/workflow-commands/prerequisite.md +6 -6
- package/.claude/skills/workflow-commands/progress-watcher.md +90 -0
- package/.claude/skills/workflow-commands/prrun.md +5 -5
- package/.claude/skills/workflow-commands/retrospective.md +9 -9
- package/.claude/skills/workflow-commands/split-assessment.md +2 -2
- package/.claude/skills/workflow-commands/target-repository.md +2 -2
- package/.claude/skills/workflow-commands/working-tree-hold.md +7 -5
- package/.codex/hooks.json +4 -4
- package/AGENTS.md +1 -6
- package/CLAUDE.md +58 -120
- package/GEMINI.md +1 -6
- package/dist/CLAUDE.md +58 -120
- package/dist/hooks/batch-guard.js +4 -4
- package/dist/hooks/{chunk-NFZGFGOR.js → chunk-5KTCMCOT.js} +14 -1
- package/dist/hooks/{chunk-LJBLGHEH.js → chunk-A6P7PN7P.js} +4 -6
- package/dist/hooks/{chunk-FO2I7UT7.js → chunk-ANJ2WGFD.js} +1 -1
- package/dist/hooks/{chunk-GDU26K3J.js → chunk-DYAVAM6S.js} +563 -126
- package/dist/hooks/{chunk-RFWWUI5F.js → chunk-ENA7P5FB.js} +3 -3
- package/dist/hooks/{chunk-KBXZLMRH.js → chunk-GU5MATVE.js} +213 -65
- package/dist/hooks/chunk-GYNGP7HI.js +56 -0
- package/dist/hooks/{chunk-HBKZLITF.js → chunk-URJA6XY4.js} +4 -4
- package/dist/hooks/{chunk-KOKOAV6D.js → chunk-V2BTOZHT.js} +6 -4
- package/dist/hooks/{chunk-JKKTVDAG.js → chunk-ZDZ555YH.js} +100 -20
- package/dist/hooks/codex-hook-adapter.js +10 -10
- package/dist/hooks/duplicate-read-guard.js +5 -5
- package/dist/hooks/format-edited.js +2 -2
- package/dist/hooks/inputs.json +193 -192
- package/dist/hooks/investigation-guard.js +5 -5
- package/dist/hooks/pretool-guard.js +11 -10
- package/dist/hooks/stop-guard.js +5 -5
- package/dist/josh.js +25 -2
- package/dist/version/index.js +5 -1
- package/package.json +2 -1
- package/prompts/collaboration-workflow/file-edits.md +11 -10
- package/prompts/collaboration-workflow/gh-rest.md +2 -4
- package/prompts/collaboration-workflow/glossary.md +1 -1
- package/prompts/collaboration-workflow/issue-citation.md +5 -9
- package/prompts/collaboration-workflow/issue-template.md +40 -115
- package/prompts/collaboration-workflow/operating-rules.md +4 -5
- package/prompts/collaboration-workflow/output-bounds.md +12 -78
- package/prompts/collaboration-workflow/overview.md +7 -13
- package/prompts/collaboration-workflow/plan-comment.md +11 -39
- package/prompts/collaboration-workflow/principles.md +3 -4
- package/prompts/collaboration-workflow/report-format.md +28 -74
- package/prompts/collaboration-workflow/residency.md +12 -109
- package/prompts/collaboration-workflow/rule-delivery.md +98 -97
- package/prompts/collaboration-workflow/shell-body.md +3 -13
- package/prompts/collaboration-workflow/turn-batching.md +14 -88
- package/prompts/collaboration-workflow/upstream-interrupt.md +12 -14
- package/prompts/collaboration-workflow/wip-cap.md +6 -45
- package/prompts/collaboration-workflow.md +1 -13
- package/prompts/review-rubric.md +8 -71
- package/prompts/review.md +25 -55
- package/prompts/testing-guide.md +18 -67
- package/scripts/agent/agent-role-profile.ts +1 -1
- package/scripts/agent/codex-hooks.ts +3 -12
- package/scripts/backlog/backlog-budget.ts +1 -1
- package/scripts/backlog/backlog-drive-cli.ts +4 -3
- package/scripts/backlog/backlog-drive-offer-argv.ts +10 -1
- package/scripts/backlog/backlog-offer.ts +6 -6
- package/scripts/behavior/behavior-rules.ts +11 -4
- package/scripts/delegation/investigation-reads.ts +5 -5
- package/scripts/discovery/repo-discovery.ts +21 -7
- package/scripts/discovery/repo-origin.ts +26 -0
- package/scripts/discovery/repo-party.ts +42 -1
- package/scripts/document/backlogrun-parent-read-set.ts +14 -15
- package/scripts/document/document-byte-budget.ts +34 -20
- package/scripts/document/entry-read-budget.ts +21 -9
- package/scripts/document/lane-child-read-set.ts +12 -14
- package/scripts/document/read-set-cli.ts +4 -4
- package/scripts/document/read-set-point-of-use.ts +10 -2
- package/scripts/document/resident-budget.ts +47 -0
- package/scripts/epic/epic-shape.ts +10 -13
- package/scripts/epic/epic-solo.ts +1 -1
- package/scripts/exports/unused-members-cli.ts +7 -3
- package/scripts/gh/git-gh-api-path.ts +7 -0
- package/scripts/hooks/pretool-guard-cli.ts +2 -2
- package/scripts/hooks/pretool-guard.ts +45 -2
- package/scripts/hooks/run-hook.sh +41 -0
- package/scripts/init/hook-command-rewrite.ts +18 -35
- package/scripts/init/hook-launch.ts +21 -32
- package/scripts/issue/issue-auto-ok.ts +95 -0
- package/scripts/issue/issue-file-cli.ts +53 -7
- package/scripts/issue/issue-file.ts +28 -5
- package/scripts/issue/issue-labels.ts +12 -12
- package/scripts/issue/issue-rank.ts +1 -1
- package/scripts/issue/issue-read-cli.ts +3 -3
- package/scripts/issue/issue-read.ts +2 -2
- package/scripts/issue/issue-scout-cli.ts +2 -2
- package/scripts/issue/issue-state-cli.ts +1 -1
- package/scripts/issue/issue-state.ts +2 -2
- package/scripts/issue/issue-wip.ts +70 -0
- package/scripts/josh/hook-decision.ts +17 -0
- package/scripts/josh/josh-commands-development.ts +10 -0
- package/scripts/josh/josh-commands-issue.ts +2 -2
- package/scripts/lines/bytes-command.ts +29 -6
- package/scripts/observations/observation-ledger-line.ts +1 -1
- package/scripts/release/release-progress.ts +167 -0
- package/scripts/release/release-publish.ts +19 -8
- package/scripts/release/release-tag.ts +22 -8
- package/scripts/rules/decision-oracle-stage.ts +1 -1
- package/scripts/rules/decision-oracle.ts +6 -6
- package/scripts/rules/delivered-rules.ts +11 -11
- package/scripts/rules/direct-pr-create.ts +110 -0
- package/scripts/rules/file-body.ts +98 -42
- package/scripts/rules/filing-cap.ts +2 -2
- package/scripts/rules/filing-offer.ts +1 -1
- package/scripts/rules/gh-api.ts +18 -1
- package/scripts/rules/implementation-cut.ts +3 -1
- package/scripts/rules/lane-background.ts +67 -10
- package/scripts/rules/permission-guards.ts +10 -2
- package/scripts/rules/stop-rules.ts +4 -4
- package/scripts/rules/test-declared-commit.ts +1 -1
- package/scripts/rules/third-party-write.ts +56 -12
- package/scripts/run/run-cut-handoff.ts +21 -1
- package/scripts/run/run-entry-cli.ts +11 -3
- package/scripts/run/run-hold-cli.ts +16 -2
- package/scripts/run/run-label.ts +50 -0
- package/scripts/run/run-merge-steps.ts +8 -3
- package/scripts/run/run-merge.ts +1 -1
- package/scripts/run/run-prep-cli.ts +6 -2
- package/scripts/run/run-prep.ts +17 -0
- package/scripts/run/run-ship-preflight.ts +34 -3
- package/scripts/run/run-ship-review-steps.ts +1 -1
- package/scripts/run/run-ship-review.ts +26 -5
- package/scripts/run/run-step-cli.ts +20 -7
- package/scripts/run/run-wake-driver.ts +24 -1
- package/scripts/run/run-wake-session.ts +2 -1
- package/scripts/test/test-declared-logic.ts +1 -1
- package/scripts/time-runtime/time-batch-guard.ts +52 -16
- package/scripts/time-runtime/time-density-hook.ts +20 -2
- package/scripts/time-runtime/time-density.ts +4 -3
- package/scripts/time-runtime/time-markers.ts +15 -4
- package/scripts/version/npm-registry.ts +11 -1
- package/templates/workflows/ci.yml +9 -1
- package/.claude/skills/workflow-commands/followup-reference.md +0 -118
- package/dist/hooks/chunk-HANSKHES.js +0 -464
package/CLAUDE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Claude Code Instructions
|
|
2
2
|
|
|
3
|
-
> **This file is the entry point for every agent rule.** `AGENTS.md` and `GEMINI.md` are pointers to it
|
|
3
|
+
> **This file is the entry point for every agent rule.** `AGENTS.md` and `GEMINI.md` are pointers to it. A rule's trigger is written **once**, here; its procedure and numbers **once**, at its pointer (the single source). History and rationale: `docs/maintainers/claude-md-history.md`.
|
|
4
4
|
|
|
5
5
|
## Project
|
|
6
6
|
|
|
@@ -8,169 +8,117 @@ Stack: TypeScript · pnpm · SvelteKit · Vitest · Playwright · TailwindCSS ·
|
|
|
8
8
|
|
|
9
9
|
## Communication
|
|
10
10
|
|
|
11
|
-
- **Answer opinion-seeking questions from a neutral standpoint.** A leading question
|
|
12
|
-
- **Fix root causes, not symptoms.**
|
|
13
|
-
- **Cross-package problems → file the upstream Issue, then stop.** A defect
|
|
14
|
-
- **Third-party repositories are Tier C.** Decide
|
|
15
|
-
- **No clones — single-source, even across package boundaries.**
|
|
16
|
-
- **Design for elegance and simplicity first.** Before adding a
|
|
17
|
-
- **Distinguish consultation from execution.** A question
|
|
18
|
-
- **Route distributed-doc / config changes upstream to kit.** In a consumer repo never edit kit-distributed docs/config
|
|
19
|
-
- **Latest-first, fix forward — pin back only as a last resort.**
|
|
20
|
-
- **Output language follows `JOSH_SESSION_LANG`** (default `ja
|
|
21
|
-
- **Cite an Issue with a number-link and a short title in the session language
|
|
22
|
-
- **Durable rules belong in prompts/docs, not local MEMORY.**
|
|
23
|
-
- **Never carry a file's new text inside a shell command.**
|
|
11
|
+
- **Answer opinion-seeking questions from a neutral standpoint.** A leading question is not a cue to agree — recommend the option you genuinely judge best.
|
|
12
|
+
- **Fix root causes, not symptoms.** Where the proper fix is out of scope, surface the root cause instead of papering over it.
|
|
13
|
+
- **Cross-package problems → file the upstream Issue, then stop.** A defect in another package (a dependency, or `josh` / kit tooling) is never worked around locally — **weakening a verification gate is a workaround too**. File it (first-party Tier A, third-party Tier C) and stop. `prompts/collaboration-workflow/upstream-interrupt.md`.
|
|
14
|
+
- **Third-party repositories are Tier C.** Decide the party with `pnpm josh repo:party`; every write to a tracker we do not own needs explicit current-turn instruction. `prompts/collaboration-workflow/upstream-interrupt.md`.
|
|
15
|
+
- **No clones — single-source, even across package boundaries.** Duplicate non-trivial logic only after presenting the alternative and getting explicit approval. `prompts/collaboration-workflow/principles.md` → "クローン禁止".
|
|
16
|
+
- **Design for elegance and simplicity first.** Before adding a hook, guard, rule or abstraction, ask whether fixing the cause makes it unnecessary. `prompts/collaboration-workflow/principles.md` → "設計はエレガント".
|
|
17
|
+
- **Distinguish consultation from execution.** A question or goal statement asks for analysis only — act on an explicit imperative or a workflow keyword. `prompts/collaboration-workflow/principles.md` → "相談と実行".
|
|
18
|
+
- **Route distributed-doc / config changes upstream to kit.** In a consumer repo never edit kit-distributed docs/config (`josh sync` overwrites them); in kit you are the source. `prompts/collaboration-workflow/principles.md` → "配布ドキュメント".
|
|
19
|
+
- **Latest-first, fix forward — pin back only as a last resort.** `prompts/collaboration-workflow/principles.md` → "最新優先".
|
|
20
|
+
- **Output language follows `JOSH_SESSION_LANG`** (default `ja`) for session output and artifact prose; English for Issue/PR titles, code comments, test titles, commit messages and script strings. `prompts/collaboration-workflow/overview.md`.
|
|
21
|
+
- **Cite an Issue with a number-link and a short title in the session language.** `prompts/collaboration-workflow/issue-citation.md`.
|
|
22
|
+
- **Durable rules belong in prompts/docs, not local MEMORY.** `prompts/collaboration-workflow/principles.md` → "恒久ルール".
|
|
23
|
+
- **Never carry a file's new text inside a shell command.** Use the Edit tool, not a heredoc. `prompts/collaboration-workflow/file-edits.md`.
|
|
24
24
|
- **Never put a body in shell double quotes** — a backtick or `$` there is _executed_; pass the body by path. `prompts/collaboration-workflow/shell-body.md`.
|
|
25
|
-
- **Put every call that does not depend on another's result in the same turn.** **The criterion is whether this call's input needs another call's result, not what kind of call it is** — edits are covered exactly as reads are. `pnpm josh batch:guard`
|
|
25
|
+
- **Put every call that does not depend on another's result in the same turn.** **The criterion is whether this call's input needs another call's result, not what kind of call it is** — edits are covered exactly as reads are. `pnpm josh batch:guard` enforces it; `prompts/collaboration-workflow/rule-delivery.md`.
|
|
26
26
|
|
|
27
27
|
### Decision autonomy (minimize confirmation stops)
|
|
28
28
|
|
|
29
|
-
Classify each decision point
|
|
29
|
+
Classify each decision point and act; stop **only** when it genuinely needs the user's judgment. `prompts/collaboration-workflow/operating-rules.md` → 「意思決定の自律ポリシー(確認停止を減らす)」.
|
|
30
30
|
|
|
31
|
-
- **Tier A — reversible implementation / design choices** (library
|
|
32
|
-
- **Tier B — genuine toss-up.**
|
|
33
|
-
- **Tier C — irreversible / shared-state / out-of-scope actions** (merge, branch delete, force push, destructive ops, repo
|
|
31
|
+
- **Tier A — reversible implementation / design choices** (library, naming, layout, tests, refactor shape; placing a filed Issue into an epic; self-correction). Pick the clearly-better option, proceed, log it.
|
|
32
|
+
- **Tier B — genuine toss-up.** The only tier that stops — ask with the candidates and trade-offs.
|
|
33
|
+
- **Tier C — irreversible / shared-state / out-of-scope actions** (merge, branch delete, force push, destructive ops, repo settings, out-of-scope work, `devEngines` / overrides edits): explicit user instruction only, never auto-decided. Deleting a git-tracked file is reversible, so it is not a destructive op — inspect the target first and surface any contradiction.
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
Log auto-decisions: an Issue comment inside an Issue workflow, otherwise a one-line "Auto-decided: `<choice>` over `<alt>` because `<reason>`" in the reply.
|
|
36
36
|
|
|
37
37
|
## Environment Variables
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
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`.
|
|
39
|
+
`.env`: `TELEGRAM_BOT_TOKEN` / `TELEGRAM_CHAT_ID` required; `JOSH_SESSION_LANG`, `PORT_SEED`, `JOSH_REPO_PATHS` optional — [environment-variables.md](https://github.com/joshuafolkken/kit/blob/main/docs/environment-variables.md). **GitHub operations are `gh api` (REST)** — `prompts/collaboration-workflow/gh-rest.md`.
|
|
42
40
|
|
|
43
41
|
## Critical Conventions (non-standard — always apply)
|
|
44
42
|
|
|
43
|
+
Most are lint-enforced; `function` syntax and the early-return one-liner are not. Craft guidance: `prompts/coding-standards.md`.
|
|
44
|
+
|
|
45
45
|
### Naming
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
- Types / classes / interfaces / enums: `PascalCase`; enum members: `UPPER_CASE`
|
|
49
|
-
- Booleans: prefix `is_` / `has_` / `should_` / `can_` / `will_` / `did_`
|
|
50
|
-
- Constants: `UPPER_CASE` or `snake_case`
|
|
47
|
+
`snake_case` variables / functions / params · `PascalCase` types / classes / interfaces / enums · `UPPER_CASE` enum members · booleans prefixed `is_` / `has_` / `should_` / `can_` / `will_` / `did_` · constants `UPPER_CASE` or `snake_case`.
|
|
51
48
|
|
|
52
49
|
### Functions & exports
|
|
53
50
|
|
|
54
|
-
|
|
55
|
-
- Multiple functions in a file: group into a namespace object `export { my_module }` (constants exempt)
|
|
56
|
-
- No `export default`
|
|
51
|
+
`function` syntax, not arrows (named SvelteKit route handlers may use the typed-const arrow idiom) · multiple functions → a namespace object `export { my_module }` (constants exempt) · no `export default`.
|
|
57
52
|
|
|
58
53
|
### Files
|
|
59
54
|
|
|
60
|
-
|
|
61
|
-
- Test files: `*.test.ts` (node/unit) / `*.svelte.test.ts` (component/browser) — never `*.spec.ts`; colocate beside the code under test (no top-level `tests/`). Lint-enforced by `eslint/rules/test-filename.js`.
|
|
62
|
-
- `scripts/` is grouped into subdirectories; relative parent-directory imports (`../`) are banned by ESLint — use the `#scripts/*` subpath import for cross-directory imports (e.g. `import { schema } from '#scripts/lib/schemas'`), and keep same-directory/into-subdirectory imports relative.
|
|
55
|
+
Svelte `PascalCase.svelte(.ts)` · TypeScript `kebab-case.ts` · tests `*.test.ts` / `*.svelte.test.ts`, colocated, never `*.spec.ts` (`prompts/testing-guide.md`) · in `scripts/`, no `../` imports — use `#scripts/*`.
|
|
63
56
|
|
|
64
57
|
### Quality limits
|
|
65
58
|
|
|
66
|
-
- Function complexity ≤5 · nesting ≤2 · function ≤25 lines · file ≤300 lines · params ≤4 · statements per function ≤10 · cognitive complexity ≤4
|
|
67
|
-
-
|
|
68
|
-
- Magic numbers: extract all literals except `0`, `1`, `-1` to named `UPPER_CASE` constants
|
|
69
|
-
- No `any` · no unused vars · no floating promises · type assertions (`as`) are restricted
|
|
70
|
-
- All function params and return types must be explicitly typed
|
|
71
|
-
- Early return: single `return` under 100 chars → one-liner `if (x) return y`; otherwise block syntax
|
|
72
|
-
|
|
73
|
-
### Svelte
|
|
74
|
-
|
|
75
|
-
- `$state` reactive variables are reassignable
|
|
76
|
-
- Props interface name `Props` is allowed by ESLint
|
|
77
|
-
- DOM manipulation is restricted
|
|
59
|
+
- Function complexity ≤5 · nesting ≤2 · function ≤25 lines · file ≤300 lines · params ≤4 · statements per function ≤10 · cognitive complexity ≤4 — line counts are code lines, not physical lines (`pnpm josh lint`); test files allow 35 code lines per function.
|
|
60
|
+
- No magic numbers beyond `0`, `1`, `-1` · no `any` · restricted `as` · explicit param and return types · single short early return → one-liner `if (x) return y`.
|
|
78
61
|
|
|
79
62
|
### Content rules
|
|
80
63
|
|
|
81
|
-
- i18n:
|
|
82
|
-
- Comments / test titles
|
|
83
|
-
- No
|
|
84
|
-
- `/* @refactor-ignore */` at file top excludes a file from refactoring
|
|
64
|
+
- i18n: user-visible strings use message keys in every locale.
|
|
65
|
+
- Comments / test titles: English only (`eslint/rules/` may explain rationale in Japanese).
|
|
66
|
+
- No duplication; `/* @refactor-ignore */` at file top excludes a file from refactoring.
|
|
85
67
|
|
|
86
68
|
### Dependency overrides (`pnpm-workspace.yaml` / `package.json`)
|
|
87
69
|
|
|
88
|
-
-
|
|
70
|
+
- Effective overrides live in `pnpm-workspace.yaml`; check both files.
|
|
89
71
|
- **NEVER** remove or modify entries in **either** location without explicit user approval.
|
|
90
|
-
- **NEVER** modify the `devEngines` field in `package.json` without explicit user confirmation.
|
|
91
|
-
-
|
|
72
|
+
- **NEVER** modify the `devEngines` field in `package.json` without explicit user confirmation.
|
|
73
|
+
- After any dependency-update command, load the `dependency-update` skill before reporting anything about the pins.
|
|
92
74
|
|
|
93
75
|
## Package-First Development
|
|
94
76
|
|
|
95
|
-
|
|
96
|
-
- Prefer modern, actively-maintained packages (maintenance, popularity, bundle size, TypeScript support, license, fit). **If one is clearly the best fit, select it** (Tier A — log it); **only when two or more are genuinely close**, present about three ranked options and let the user choose.
|
|
97
|
-
- **Measure the choice before you judge it — `pnpm josh pkg:scout <keywords>`:** `clear` → select it (Tier A), `close` → ask (Tier B). Metrics and threshold: `docs/josh-commands-automation.md`.
|
|
77
|
+
Before building a feature, check for a well-maintained package — measure with `pnpm josh pkg:scout <keywords>`: `clear` → select it (Tier A), `close` → ask (Tier B).
|
|
98
78
|
|
|
99
79
|
## Code Change Rules
|
|
100
80
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
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`.
|
|
111
|
-
- **Read a target's line headroom before editing: `pnpm josh lines <path>`** — near the limit, `Target` carries the splitting plan.
|
|
112
|
-
|
|
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.
|
|
114
|
-
2. **Tests** — implement those declared in Step 0 (`prompts/testing-guide.md`); prefer stable `data-testid` selectors over locale strings.
|
|
115
|
-
3. **Verification gate** — `pnpm josh gate` (lint, type check, spell check, unit tests **concurrently**); fix all before reporting done. One gate per run; while implementing re-run a single check by name (`pnpm josh lint:related` / `pnpm josh cspell:dot` / `pnpm josh test:related`). Add legitimate flagged terms to `cspell.config.yaml`. Each `Edit` / `Write` triggers a `pnpm josh format:edited` hook, so a file may differ from what you wrote. Docs- or config-only changes still run it.
|
|
116
|
-
4. **IDE feedback** — zero errors on every changed file; never say "it should pass" without running commands. Do not modify `eslint.config.js` unless explicitly asked.
|
|
81
|
+
0. **Work summary + test declaration** — before writing any implementation code, once per Issue (required in fullrun/halfrun/backlogrun; `kickoff` exempt), never wrapped in a code fence, never a confirmation stop. `prompts/collaboration-workflow/report-format.md`; `pnpm josh report:lint`.
|
|
82
|
+
- **Overview** — **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.
|
|
83
|
+
- **Details** — every change with its test: `<what changes> — Test: <Unit|E2E> — <file path> — <what it verifies>`. Completion reports lead with **Cause / Fix / Result**.
|
|
84
|
+
- **Tests are required for ALL changes** — zero tests without explicit approval is a violation. Exceptions (non-runtime and basic-profile manual checks): `prompts/testing-guide.md`. `pnpm josh test:declared` answers from the changed paths; a runtime change with no test is refused at `pnpm josh git -y` on `required`.
|
|
85
|
+
- Read a target's headroom first: `pnpm josh lines <path>`.
|
|
86
|
+
1. **Refactor first** — `prompts/refactoring.md`; no high/medium refactoring left on new/modified code.
|
|
87
|
+
2. **Tests** — those declared in Step 0 (`prompts/testing-guide.md`).
|
|
88
|
+
3. **Verification gate** — `pnpm josh gate`; while implementing re-run one check (`pnpm josh lint:related` / `pnpm josh cspell:dot` / `pnpm josh test:related`). Add legitimate flagged terms to `cspell.config.yaml`.
|
|
89
|
+
4. **IDE feedback** — zero errors on changed files; never say "it should pass" without running it. Do not modify `eslint.config.js` unless asked.
|
|
117
90
|
|
|
118
91
|
## Completion gate (before you tell the user work is done)
|
|
119
92
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
0. **Test gate** — no tests added? Stop and add them, unless a Step 0 exception (non-runtime or basic) or explicit approval covers the change.
|
|
123
|
-
1. **Refactor** — Code Change Rules Step 1.
|
|
124
|
-
2. **`pnpm josh gate`** — Step 3.
|
|
125
|
-
3. **Self-review** — Pre-commit Self-Review below.
|
|
126
|
-
4. **IDE feedback** — Step 4.
|
|
127
|
-
5. **E2E** — the CI E2E job when a PR is open (`pnpm josh followup` blocks the merge on it), `pnpm josh test:e2e` run by you when there is none; a printed skip is the answer for a project with no suite. `prompts/testing-guide.md` → "Closing the E2E gate without a human run".
|
|
128
|
-
6. **Live-execution evidence** — a runtime change's PR body carries a `## 実機証跡` section (command + actual fenced output), or `pnpm josh followup` refuses the merge. `prompts/collaboration-workflow/report-format.md`.
|
|
129
|
-
|
|
130
|
-
**UI verification (screenshot):** any change to the rendered UI is **not** done until you have looked at the result — capture the affected screen with the `/verify-ui` skill and confirm it matches the intent. If none can be produced, ask the user to verify visually.
|
|
93
|
+
In order, none skipped: tests (Step 0) → refactor → `pnpm josh gate` → Pre-commit Self-Review → IDE feedback → E2E (`prompts/testing-guide.md` → "Closing the E2E gate without a human run") → live-execution evidence (`prompts/collaboration-workflow/report-format.md`). **UI verification:** a rendered-UI change is not done until you have looked at it with `/verify-ui`, or asked the user to.
|
|
131
94
|
|
|
132
95
|
## Pre-commit Self-Review (mandatory)
|
|
133
96
|
|
|
134
|
-
Before every `git commit
|
|
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.**
|
|
97
|
+
Before every `git commit`, a subagent runs `/code-review` per `prompts/review.md` — level from `pnpm josh review:brief --level-only`, no further than the round cap (`prompts/review.md` → "Review round cap"). Each remaining non-High finding: fix it, 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 PR note.
|
|
139
98
|
|
|
140
99
|
## Doc Sync Rules
|
|
141
100
|
|
|
142
|
-
|
|
101
|
+
When `josh bump` changes the version, update `docs/` for any changed behavior before committing.
|
|
143
102
|
|
|
144
103
|
## Git Rules
|
|
145
104
|
|
|
146
|
-
- **No commits** unless explicitly requested. **No
|
|
147
|
-
- **Never stage or mutate the git index on your own
|
|
148
|
-
- **
|
|
149
|
-
- **
|
|
105
|
+
- **No commits** unless explicitly requested. **No merges, branch deletions, force pushes or other shared-state mutations** unless requested in the current turn — except 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.
|
|
106
|
+
- **Never stage or mutate the git index on your own** — only on explicit instruction or via `pnpm josh git`. `prompts/collaboration-workflow/operating-rules.md` → "git index を勝手に変更しない".
|
|
107
|
+
- **Use `pnpm josh git`; open a PR with `pnpm josh pr`** — `pnpm josh rule:guard` refuses a direct `gh pr create`.
|
|
108
|
+
- **Run `git status` (and `git stash list`) live** before acting on any tree assumption.
|
|
150
109
|
|
|
151
110
|
## Collaboration Workflow
|
|
152
111
|
|
|
153
|
-
- The issue-driven flow
|
|
154
|
-
- **
|
|
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`.
|
|
112
|
+
- The issue-driven flow: `prompts/collaboration-workflow.md`. **Before writing a rule as prose, place it by `prompts/collaboration-workflow/residency.md`** — computable answers go to `pnpm josh oracle:list`, ordering to `pnpm josh run:step`.
|
|
113
|
+
- **File through `pnpm josh issue:file` — it counts the target repository's open Issues, never a hand count; 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. `prompts/collaboration-workflow/wip-cap.md`.
|
|
156
114
|
|
|
157
115
|
### Shorthand Commands
|
|
158
116
|
|
|
159
|
-
`kickoff`, `fullrun`, `prrun`, `halfrun`
|
|
160
|
-
|
|
161
|
-
**Read the skill before running any part of a command — including the first `gh` call.**
|
|
162
|
-
|
|
163
|
-
| Typed keyword | What it does | Read first |
|
|
164
|
-
| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
|
|
165
|
-
| `kickoff [#N \| new]` | Plan only — normalize title, post the plan, notify, **stop** | `workflow-commands` skill + `kickoff.md` + `split-assessment.md` |
|
|
166
|
-
| `fullrun [#N \| new]` | Plan → implement → gate → PR → **merge** → notify | + `fullrun.md` + `split-assessment.md` + `chain-rule.md` |
|
|
167
|
-
| `prrun [#N \| new]` | `fullrun` up to a green, mergeable PR, then **stop** for a person to merge by hand | + `prrun.md` + the `fullrun` set |
|
|
168
|
-
| `halfrun [#N \| new]` | Implement + gate, then **stop before commit** for manual verification | + `halfrun.md` + `split-assessment.md` |
|
|
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 |
|
|
117
|
+
`kickoff`, `fullrun`, `prrun`, `halfrun`, `backlogrun` (with `#N` / `new`) are procedures in the `workflow-commands` skill — read it before any part of a command, including the first `gh` call. **What stays here is decided by one question: must the rule fire on a turn where no skill was loaded?** Explicit invocation, the mid-workflow stop notification, the `overrides` / `devEngines` prohibitions, the UI-verification gate and the three `epic:*` rules below all do.
|
|
170
118
|
|
|
171
119
|
**`queue` and `epicrun` were removed** — point `queue` to `backlogrun #N1 #N2 …` and `epicrun` to `backlogrun #E --only`.
|
|
172
120
|
|
|
173
|
-
|
|
121
|
+
Read the `epic-commands` skill before any `josh epic:*` command, before writing an epic that tracks a child in another repository, and when `epic:bundle` places a filed issue. Three rules bind outside it:
|
|
174
122
|
|
|
175
123
|
- Recording a decision removes that child's `needs-decision` label (Tier A).
|
|
176
124
|
- **Fixing what the audit finds is Tier A**; park only when the contradiction is a design choice nobody has made.
|
|
@@ -178,24 +126,14 @@ Before every `git commit` (follow-up commits included), self-review against `pro
|
|
|
178
126
|
|
|
179
127
|
#### Explicit invocation required (MANDATORY)
|
|
180
128
|
|
|
181
|
-
Never start a `kickoff` / `halfrun` / `prrun` / `fullrun` / `backlogrun` workflow (
|
|
182
|
-
|
|
183
|
-
- Conversational requests like "implement X", "fix Y", "open a PR for Z" are **NOT** implicit invocations — do not infer authorization from the request shape.
|
|
184
|
-
- Do **NOT** ask confirmation questions like "Shall I run `fullrun`?". A confirmation prompt is not a substitute for explicit invocation.
|
|
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.").
|
|
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.
|
|
187
|
-
|
|
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".
|
|
189
|
-
|
|
190
|
-
**A `backlogrun` parks a child instead of stopping the run** — `backlogrun-park.md` → "park and continue".
|
|
129
|
+
Never start a `kickoff` / `halfrun` / `prrun` / `fullrun` / `backlogrun` workflow (`#N` / `new` included) unless the user typed the keyword in the **current turn's prompt** — a conversational request ("implement X") is not one, and an earlier turn's authorization does not carry over. Never ask "Shall I run `fullrun`?"; say "Please run \`<command>\` to start this task." A resumed `backlogrun` inside its declared budget continues (`backlogrun-steps.md` → "The session cut is inside the invocation").
|
|
191
130
|
|
|
192
131
|
#### Mid-workflow stop notification (`confirmation`)
|
|
193
132
|
|
|
194
|
-
Before pausing **any** run
|
|
133
|
+
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):
|
|
195
134
|
|
|
196
135
|
```bash
|
|
197
136
|
pnpm josh notify --task-type confirmation --issue-url "<issue-url>" --body=$'<one-line reason>\n<what is needed from the user>'
|
|
198
137
|
```
|
|
199
138
|
|
|
200
|
-
|
|
201
|
-
- Pass `--body=...` as one token when the body starts with `-`, otherwise `parseArgs` rejects it.
|
|
139
|
+
Keep `--body=...` one token when the body starts with `-`, otherwise `parseArgs` rejects it.
|
package/GEMINI.md
CHANGED
|
@@ -5,9 +5,4 @@
|
|
|
5
5
|
|
|
6
6
|
@CLAUDE.md
|
|
7
7
|
|
|
8
|
-
**No hooks run under Gemini
|
|
9
|
-
`CLAUDE.md`'s Claude Code features here — that list of rules included — is
|
|
10
|
-
`prompts/collaboration-workflow/principles.md` → "Claude Code 以外のエージェントでの読み替え".
|
|
11
|
-
|
|
12
|
-
**Do not copy rules back into this file.** Every change to how agents work in this repository belongs
|
|
13
|
-
in `CLAUDE.md`.
|
|
8
|
+
**No hooks run under Gemini** — apply every hook-delivered rule yourself, per `prompts/collaboration-workflow/principles.md` → "Claude Code 以外のエージェントでの読み替え". Do not copy rules back into this file.
|