@monte3l/groundwork 1.0.3 → 1.0.5
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/README.md +54 -12
- package/dist/assets.d.ts +22 -2
- package/dist/assets.js +40 -15
- package/dist/emit.js +3 -2
- package/dist/harness/rules.js +1 -1
- package/dist/main.js +5 -15
- package/dist/merge-json.d.ts +3 -1
- package/dist/merge-json.js +1 -1
- package/package.json +1 -1
- package/plugin/skills/customize/step-3-round-1.md +25 -17
- package/plugin/src/domain-map.ts +1 -1
- package/plugin/src/pack-map.ts +125 -44
- package/plugin/src/plugin-map.ts +1 -1
- package/templates/core/.claude/hooks/inject-decision-gate.mjs +4 -0
- package/templates/core/.claude/rules/agent-dispatch.md +46 -0
- package/templates/core/CLAUDE.md +41 -60
- package/templates/core/bin/check-exports.mjs +3 -1
- package/templates/core/bin/lib/harness-rules.mjs +1 -1
- package/templates/core/eslint.config.js +2 -0
- package/templates/core/vitest.config.ts +4 -3
- package/templates/packs/README.md +6 -3
- package/templates/packs/{github → claude-github}/files/.github/workflows/claude-pr-review.yml +1 -1
- package/templates/packs/{github → claude-github}/files/.github/workflows/claude.yml +1 -1
- package/templates/packs/claude-github/pack.json +19 -0
- package/templates/packs/github/pack.json +3 -3
- package/templates/packs/harness-extras/pack.json +3 -15
- package/templates/packs/licensing/pack.json +31 -0
- package/templates/packs/publishing/files/tools/release/_package-lock.json +914 -0
- package/templates/packs/publishing/pack.json +3 -14
- package/templates/packs/statusline/pack.json +31 -0
- package/templates/packs/supply-chain/pack.json +1 -1
- package/templates/packs/worktrees/pack.json +2 -1
- /package/templates/packs/{publishing → licensing}/files/REUSE.toml +0 -0
- /package/templates/packs/{publishing → licensing}/files/bin/check-license-headers.mjs +0 -0
- /package/templates/packs/{harness-extras → statusline}/files/.claude/hooks/statusline-layout.mjs +0 -0
- /package/templates/packs/{harness-extras → statusline}/files/.claude/hooks/statusline.mjs +0 -0
- /package/templates/packs/{harness-extras → statusline}/files/.claude/hooks/subagent-statusline.mjs +0 -0
|
@@ -11,6 +11,10 @@
|
|
|
11
11
|
* instead of being discovered when `guard-branch-isolation.mjs` blocks a
|
|
12
12
|
* src/test write on `main`.
|
|
13
13
|
*
|
|
14
|
+
* It sees the line as typed: Claude Code runs `UserPromptSubmit` hooks before
|
|
15
|
+
* a skill or slash command expands (2.1.299), so `/creating-prs fix the lint`
|
|
16
|
+
* is judged on those words, and a bare `/starting-work` carries no change verb.
|
|
17
|
+
*
|
|
14
18
|
* It is advisory: it emits `additionalContext` and exits 0. It never blocks.
|
|
15
19
|
* The heuristic is deliberately loose (inject on any change-intent verb,
|
|
16
20
|
* stay quiet on obvious reads) -- a spurious reminder is cheap; a missed one
|
|
@@ -36,6 +36,52 @@ auto, `acceptEdits` or `bypassPermissions` mode overrides a spoke's
|
|
|
36
36
|
guards bound a spoke, not `permissionMode`. Source:
|
|
37
37
|
[sub-agents](https://code.claude.com/docs/en/sub-agents).
|
|
38
38
|
|
|
39
|
+
## Guard limits and overrides (detail)
|
|
40
|
+
|
|
41
|
+
Sources: [hooks](https://code.claude.com/docs/en/hooks),
|
|
42
|
+
[hooks guide](https://code.claude.com/docs/en/hooks-guide),
|
|
43
|
+
[managed settings](https://code.claude.com/docs/en/managed-settings),
|
|
44
|
+
[mods events](https://code.claude.com/docs/en/plugins/mods/events),
|
|
45
|
+
[sub-agents](https://code.claude.com/docs/en/sub-agents) and
|
|
46
|
+
[agent teams](https://code.claude.com/docs/en/agent-teams).
|
|
47
|
+
|
|
48
|
+
- **The `Bash` screen is conservative.** `guard-hub-src-writes.mjs` blocks
|
|
49
|
+
redirects, `tee`, `sed -i`, `cp`/`mv` into a guarded path, an interpreter
|
|
50
|
+
snippet that writes there, and a copy, move or removal of a parent
|
|
51
|
+
(`rsync -a /tmp/x/ ./`, `rm -rf .`). It cannot see an interpreter running a
|
|
52
|
+
script from a project file, an `eval`, a computed path, a parent of the
|
|
53
|
+
project root (`rm -rf ..`), a workspace container below the project root, a
|
|
54
|
+
build step, a formatter or fixer (`prettier --write`, `eslint --fix`),
|
|
55
|
+
`git rm`/`git mv`, `find -exec`, `xargs` with a computed operand,
|
|
56
|
+
`tar`/`curl -o`, or a very long interpreter call (allowed with a stderr
|
|
57
|
+
note).
|
|
58
|
+
- **Managed settings outrank every project file.** A `managed-settings.json`
|
|
59
|
+
file, an MDM policy or a console-managed policy has no project-level
|
|
60
|
+
override, and `allowManagedHooksOnly` and `allowManagedPermissionRulesOnly`
|
|
61
|
+
mean only managed hooks run and only managed permission rules apply. The
|
|
62
|
+
file lives outside any working tree, so nothing here can detect it. On a
|
|
63
|
+
machine you don't control, run `/status` and read its "Setting sources"
|
|
64
|
+
line: if `guard-hub-src-writes.mjs` and `guard-branch-isolation.mjs` aren't
|
|
65
|
+
running, treat hub-and-spoke as an unenforced checklist.
|
|
66
|
+
- **An installed mod sits below managed settings and above project hooks.** A
|
|
67
|
+
mod that handles `tool.check` can approve a call a non-managed `PreToolUse`
|
|
68
|
+
hook blocked, and project `PreToolUse` hooks run only after the last mod
|
|
69
|
+
calls `next`. Only managed hooks outrank a mod. Check `/plugin` alongside
|
|
70
|
+
`/status`.
|
|
71
|
+
- **Who counts as a writer.** The guard needs a writer-spoke `agent_type` and a
|
|
72
|
+
non-empty `agent_id`. A fork subagent (on by default in every surface since
|
|
73
|
+
Claude Code 2.1.302) is not a writer spoke, so unless its payload reports a
|
|
74
|
+
writer `agent_type` it is treated as the hub (the docs don't say what a
|
|
75
|
+
fork's payload carries). A fork cannot spawn further agents. With agent teams on, an in-process
|
|
76
|
+
teammate has a documented `agent_id`; one built from a writer definition that
|
|
77
|
+
also reports that `agent_type` passes as a writer. A split-pane teammate does
|
|
78
|
+
not get `disallowedTools` (only an in-process one does), so every spoke's
|
|
79
|
+
`tools` list also omits `Agent`.
|
|
80
|
+
- **What `onFailure: "block"` covers.** A failure is a hook that cannot start,
|
|
81
|
+
times out, exits with any code other than 0 or 2, or prints invalid JSON. It
|
|
82
|
+
has no effect on `Stop`, `SubagentStop`, `TaskCompleted`, `TeammateIdle` or
|
|
83
|
+
async hooks.
|
|
84
|
+
|
|
39
85
|
## Dispatch sizing
|
|
40
86
|
|
|
41
87
|
- **Decompose before you dispatch.** Scale the dispatch to task complexity —
|
package/templates/core/CLAUDE.md
CHANGED
|
@@ -87,73 +87,54 @@ Skills, each in `.claude/skills/<name>/`:
|
|
|
87
87
|
sweeps (see Freshness).
|
|
88
88
|
|
|
89
89
|
**The guard also screens `Bash`, but only conservatively.** The same hook
|
|
90
|
-
|
|
91
|
-
`
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
(`allowManagedHooksOnly`) and only managed permission rules apply
|
|
110
|
-
(`allowManagedPermissionRulesOnly`) (see
|
|
111
|
-
[Claude Code's managed-settings docs](https://code.claude.com/docs/en/managed-settings)).
|
|
112
|
-
Nothing in this project can detect or gate against that from inside the
|
|
113
|
-
repo -- the managed file lives outside any working tree, at an OS-level
|
|
114
|
-
path. Run `/status` on a machine you don't control before trusting
|
|
115
|
-
`guard-hub-src-writes.mjs`/`guard-branch-isolation.mjs`: its "Setting
|
|
116
|
-
sources" line names every active source, and if these hooks aren't among
|
|
117
|
-
what's actually running, treat hub-and-spoke as an unenforced checklist
|
|
118
|
-
until confirmed otherwise.
|
|
119
|
-
|
|
120
|
-
**An installed Claude Code mod is a second silent override, below managed
|
|
121
|
-
settings.** Per the
|
|
122
|
-
[hooks guide](https://code.claude.com/docs/en/hooks-guide), a mod that
|
|
123
|
-
handles `tool.check` "can approve a call that your `PreToolUse` hook blocked,
|
|
124
|
-
unless the hook is in managed settings", and project `PreToolUse` hooks run
|
|
125
|
-
only after the last mod calls `next` (see the
|
|
126
|
-
[mods events reference](https://code.claude.com/docs/en/plugins/mods/events)).
|
|
127
|
-
Only managed-settings hooks outrank a mod, and nothing in the repo can detect
|
|
128
|
-
one. Check `/plugin` for installed mods alongside `/status`.
|
|
90
|
+
blocks a `Bash` command that visibly writes into `src/` or `tests/` (redirects,
|
|
91
|
+
`tee`, `sed -i`, `cp`/`mv` into them, an interpreter snippet that writes there,
|
|
92
|
+
a copy, move or removal of a parent of `src/` such as `rm -rf .`) unless the caller is
|
|
93
|
+
`test-author` or `code-implementer`. It cannot catch an indirect write (a
|
|
94
|
+
script from a project file, an `eval`, a computed path, a build step, a
|
|
95
|
+
formatter or fixer, `git rm`/`git mv`, `tar`/`curl -o`), so hub-and-spoke is a
|
|
96
|
+
convention backed by a guard that raises the bar, not a proof. To override it
|
|
97
|
+
deliberately, run the command yourself with the `!` prefix at the Claude Code
|
|
98
|
+
prompt, or edit the hook's registration in `.claude/settings.json`.
|
|
99
|
+
|
|
100
|
+
**Managed settings and mods can silently disable the guards.** A managed
|
|
101
|
+
deployment (`managed-settings.json`, MDM, a console policy) outranks every file
|
|
102
|
+
here, and `allowManagedHooksOnly` runs only managed hooks. An installed mod
|
|
103
|
+
that handles `tool.check` can approve a call a project `PreToolUse` hook
|
|
104
|
+
blocked, and only managed hooks outrank a mod. Nothing in the repo can detect
|
|
105
|
+
either: on a machine you don't control, check `/status` ("Setting sources") and
|
|
106
|
+
`/plugin` before trusting `guard-hub-src-writes.mjs` and
|
|
107
|
+
`guard-branch-isolation.mjs`. Detail and sources:
|
|
108
|
+
`.claude/rules/agent-dispatch.md`.
|
|
129
109
|
|
|
130
110
|
**The guard keys on `agent_id` as well as `agent_type`.** A call counts as a
|
|
131
|
-
writer spoke only with both present, so
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
111
|
+
writer spoke only with both present, so one carrying `agent_type` alone is
|
|
112
|
+
treated as the hub and blocked, as is a fork subagent unless its payload
|
|
113
|
+
reports a writer `agent_type` with an `agent_id` (details and versions in
|
|
114
|
+
`.claude/rules/agent-dispatch.md`). An in-process
|
|
115
|
+
agent-teams teammate has a documented `agent_id`, so one built from a writer
|
|
116
|
+
definition that reports that `agent_type` would pass.
|
|
117
|
+
|
|
118
|
+
**Four guards block when they fail, and a secrets deny rule ships in
|
|
135
119
|
`settings.json`.** `guard-secret-writes`, `guard-hub-src-writes`,
|
|
136
120
|
`guard-branch-isolation` and `guard-protected-paths` carry
|
|
137
|
-
`"onFailure": "block"` (Claude Code 2.1.295 or later)
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
missing `node`
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
`
|
|
148
|
-
`cat`, `head` and `tail` on those files in `Bash`. It does not cover `grep -r`
|
|
149
|
-
or a script that opens the file itself, and nothing else in this baseline does.
|
|
121
|
+
`"onFailure": "block"` (Claude Code 2.1.295 or later): a hook that cannot
|
|
122
|
+
start, times out, exits with any code other than 0 or 2, or prints invalid
|
|
123
|
+
JSON blocks the call instead of letting it through. Each guard still handles
|
|
124
|
+
bad input itself and exits 0 on purpose. Because `guard-hub-src-writes` is also
|
|
125
|
+
on `Bash`, a missing `node` blocks every `Bash` call until fixed (run the
|
|
126
|
+
command with the `!` prefix to get past it). The style guards and
|
|
127
|
+
`guard-git-push-signed` stay fail-open on purpose: the push guard has its own
|
|
128
|
+
parser and the remote's signed-commit rule is the authoritative layer.
|
|
129
|
+
`permissions.deny` blocks `Read(./.env)`, `Read(./.env.*)` and
|
|
130
|
+
`Read(./secrets/**)`, which also covers `cat`, `head` and `tail` on them in
|
|
131
|
+
`Bash`. It does not cover `grep -r` or a script that opens the file itself.
|
|
150
132
|
|
|
151
133
|
**A spoke's `permissionMode` can be overridden.** A session in auto,
|
|
152
134
|
`acceptEdits` or `bypassPermissions` mode overrides a spoke's `permissionMode`
|
|
153
|
-
(the field applies only
|
|
154
|
-
`
|
|
155
|
-
|
|
156
|
-
`disallowedTools: Agent` on every spoke is what keeps this roster flat.
|
|
135
|
+
(the field applies only in `default`, `dontAsk` or `plan`), so the hooks, not
|
|
136
|
+
`permissionMode`, bound a spoke. A subagent can spawn subagents three layers
|
|
137
|
+
deep by default; `disallowedTools: Agent` on every spoke keeps the roster flat.
|
|
157
138
|
|
|
158
139
|
Full dispatch-sizing and recovery guidance: `.claude/rules/agent-dispatch.md`
|
|
159
140
|
(auto-loads when editing `.claude/skills/**` or `.claude/agents/**`).
|
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
* types. Skips cleanly (exit 0, one warning) when the target has no
|
|
13
13
|
* `exports` field -- a project that isn't published doesn't need this gate,
|
|
14
14
|
* and `/customize` removes the step entirely for non-library project kinds
|
|
15
|
-
* rather than leaving a permanently-skipped one behind.
|
|
15
|
+
* rather than leaving a permanently-skipped one behind. attw resolves types
|
|
16
|
+
* with the TypeScript it bundles, not the project's own, so its verdict
|
|
17
|
+
* follows that resolver.
|
|
16
18
|
*/
|
|
17
19
|
import process from "node:process";
|
|
18
20
|
import { execFileSync } from "node:child_process";
|
|
@@ -691,7 +691,7 @@ const descriptionSubstance = {
|
|
|
691
691
|
} else if (description.length > DESCRIPTION_MAX) {
|
|
692
692
|
failures.push({
|
|
693
693
|
subject,
|
|
694
|
-
message: `description is ${description.length} chars; over ${DESCRIPTION_MAX}
|
|
694
|
+
message: `description is ${description.length} chars; over the ${DESCRIPTION_MAX}-char Agent Skills maximum (Claude Code also truncates description + when_to_use at 1,536 in its skill listing)`,
|
|
695
695
|
});
|
|
696
696
|
}
|
|
697
697
|
};
|
|
@@ -65,6 +65,8 @@ export default defineConfig(
|
|
|
65
65
|
"@typescript-eslint/no-non-null-assertion": "error",
|
|
66
66
|
"@typescript-eslint/no-floating-promises": "error",
|
|
67
67
|
"@typescript-eslint/switch-exhaustiveness-check": "error",
|
|
68
|
+
// Overlaps `verbatimModuleSyntax` (typescript-eslint warns the two can
|
|
69
|
+
// report the same import twice); kept for the rule's autofix.
|
|
68
70
|
"@typescript-eslint/consistent-type-imports": "error",
|
|
69
71
|
"@typescript-eslint/no-unused-vars": [
|
|
70
72
|
"error",
|
|
@@ -19,9 +19,10 @@ export default defineConfig({
|
|
|
19
19
|
// barrel pattern): a fresh scaffold's index.ts IS its real content,
|
|
20
20
|
// so excluding it would make this gate measure nothing at all.
|
|
21
21
|
exclude: ["**/*.d.ts"],
|
|
22
|
-
// json emits coverage-final.json: the
|
|
23
|
-
// are 100% on every metric
|
|
24
|
-
//
|
|
22
|
+
// json emits coverage-final.json: the text table can hide files that
|
|
23
|
+
// are 100% on every metric (Vitest sets `skipFull` when it detects an
|
|
24
|
+
// AI coding agent), so the JSON is the authoritative per-file record
|
|
25
|
+
// when investigating a suspected gap.
|
|
25
26
|
reporter: ["text", "html", "json"],
|
|
26
27
|
thresholds: {
|
|
27
28
|
// Scaffold-appropriate starting floor. Raise these to the project's
|
|
@@ -105,9 +105,12 @@ already enumerate groups rather than individual steps.
|
|
|
105
105
|
|
|
106
106
|
| Pack | Contents |
|
|
107
107
|
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
108
|
-
| `harness-extras` | Claude Code session
|
|
108
|
+
| `harness-extras` | Claude Code session hooks: the compaction-handoff hook pair (`PreCompact`, `SessionStart`) and a read-only Bash guard for review spokes. Registers hooks only; no top-level settings keys. |
|
|
109
|
+
| `statusline` | A five-row `statusLine` (session, model, context, quota, work) plus a per-subagent row renderer. The only pack that sets top-level settings keys (`statusLine`, `subagentStatusLine`); a project that already defines either must decide on it, see its `adoptNotes`. |
|
|
109
110
|
| `quality` | Two language-level review aids: a per-file size ratchet gate (`check-file-budget.mjs`, a `build`-group verify step) and a read-only `type-design-analyzer` agent. No hooks, no settings. Adopt-capable and recommended for every project kind. |
|
|
110
|
-
| `github`
|
|
111
|
-
| `
|
|
111
|
+
| `claude-github` | Anthropic's official Claude Code GitHub Action: one workflow wired for `@claude` mention-mode and a second that posts an automated Claude review comment on every PR. A pure file drop: no hooks, no gate. The workflows need an auth secret this pack cannot create and the review spends API credits per PR; see its `adoptNotes`. |
|
|
112
|
+
| `github` | GitHub-hosted collaboration through the `gh` CLI: three skills — `reviewing-dependabot-prs`, `triaging-scan-alerts`, `watching-pr-checks`. No hooks, no gate, no workflows. `triaging-scan-alerts` needs code scanning turned on; see its `adoptNotes`. |
|
|
113
|
+
| `publishing` | A release pipeline: `release.yml` (changesets version-PR / staged, provenance-attested npm publish via trusted publishing), `check-publish-version.mjs` and `check-dts-deps.mjs`. Fresh mode only; see "The wiring contract" above and its `adoptNotes`. |
|
|
114
|
+
| `licensing` | An SPDX/REUSE license-header gate: `check-license-headers.mjs` (a `lint`-group verify step) and a `REUSE.toml` template. Fresh mode only: the one-time backfill (`setupSteps`) fails an established project's `pnpm verify` until it has touched every file; see its `adoptNotes`. |
|
|
112
115
|
| `supply-chain` | Secret scanning (`gitleaks.yml` with a `.gitleaks.toml`) and an OpenSSF Scorecard run (`scorecard.yml`) for any project on GitHub, published or not. A pure file drop of two workflows (read-only apart from the Scorecard job's `security-events` and `id-token` write): no hooks, no settings, no scripts, no gate. Adopt-capable and recommended for every project kind. |
|
|
113
116
|
| `worktrees` | Enforces that all src/tests development happens inside an isolated git worktree, on any branch, for any caller: a `working-in-worktrees` skill (start/status/sync/finish/fan-out), a `SessionStart` hook that installs dependencies into a freshly created worktree, a `PreToolUse` guard stricter than the baseline's own `guard-branch-isolation.mjs`/`guard-hub-src-writes.mjs`, a `repair-core-bare.mjs` hook (`SessionStart`, and `PostToolUse` after `EnterWorktree`/`ExitWorktree`/`Agent`) that resets the `core.bare = true` Claude Code's worktree tools are reported to leave in a normal repo's shared config, and a `.worktreeinclude` copying `.env`/`.env.local`/`.env.*.local` into every worktree Claude Code creates. Changes the day-to-day workflow, not just a nicety — see its `adoptNotes`. |
|
package/templates/packs/{github → claude-github}/files/.github/workflows/claude-pr-review.yml
RENAMED
|
@@ -86,7 +86,7 @@ jobs:
|
|
|
86
86
|
fetch-depth: 0
|
|
87
87
|
|
|
88
88
|
- id: claude
|
|
89
|
-
uses: anthropics/claude-code-action@
|
|
89
|
+
uses: anthropics/claude-code-action@5eb090f3c3afd701a0672cd32981197ca27688f6 # v1.0.253
|
|
90
90
|
with:
|
|
91
91
|
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
92
92
|
# Swap in CLAUDE_CODE_OAUTH_TOKEN or the Workload Identity
|
|
@@ -67,7 +67,7 @@ jobs:
|
|
|
67
67
|
fetch-depth: 1
|
|
68
68
|
|
|
69
69
|
- name: Run Claude Code
|
|
70
|
-
uses: anthropics/claude-code-action@
|
|
70
|
+
uses: anthropics/claude-code-action@5eb090f3c3afd701a0672cd32981197ca27688f6 # v1.0.253
|
|
71
71
|
with:
|
|
72
72
|
# Option 1 (active default): a stored API key. Install the Claude
|
|
73
73
|
# GitHub App (https://github.com/apps/claude) and add
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"name": "claude-github",
|
|
4
|
+
"description": "Anthropic's official Claude Code GitHub Action (anthropics/claude-code-action) on top of the baseline, as two workflows: claude.yml, wired for @claude mention-mode, and claude-pr-review.yml, which posts an automated Claude review comment on every pull request. Pure file drop: no hooks, no settings, no scripts, no verify step. Both need an auth secret this pack cannot create, and the review workflow spends API credits on every PR, so it is a separate pack from `github` rather than a default.",
|
|
5
|
+
"modes": ["fresh", "adopt"],
|
|
6
|
+
"budget": {
|
|
7
|
+
"agents": 0,
|
|
8
|
+
"skills": 0,
|
|
9
|
+
"hooks": 0,
|
|
10
|
+
"workflows": 2,
|
|
11
|
+
"scripts": 0
|
|
12
|
+
},
|
|
13
|
+
"wiring": {
|
|
14
|
+
"settings": {},
|
|
15
|
+
"packageScripts": {},
|
|
16
|
+
"verifySteps": []
|
|
17
|
+
},
|
|
18
|
+
"adoptNotes": "claude.yml only reacts to @claude mentions from a repository owner, member or collaborator (author_association), so an outside commenter on a public repository cannot start a job that holds contents: write and your auth secret. It also commits through the GitHub API (use_commit_signing) so a signed-commits ruleset accepts its work. claude-pr-review.yml runs on every non-bot, non-fork pull request, so it spends API credits on each push -- delete it and keep claude.yml if you only want on-demand help. Both workflows need one thing this pack cannot verify or install: an ANTHROPIC_API_KEY repository secret (the active default), or a CLAUDE_CODE_OAUTH_TOKEN from a Claude subscription, or a Workload Identity Federation setup in the Anthropic Console -- see the comments in .github/workflows/claude.yml for all three. An adopted project that already has its own .github/workflows/claude.yml or claude-pr-review.yml surfaces as an ordinary file conflict -- keep the existing one if it's already configured for that project's own auth choice, since this pack's version would just overwrite a working setup with its own generic defaults. The two workflows ship without an SPDX header on purpose (a header would carry a project-name token that stays literal in an adopt-mode install); a project that also installs `licensing` gets the headers from that pack's `check-license-headers.mjs --fix` backfill. These workflows used to ship inside the `github` pack; a project that installed that pack before the split keeps its files untouched."
|
|
19
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"name": "github",
|
|
4
|
-
"description": "GitHub-hosted collaboration on top of the baseline
|
|
4
|
+
"description": "GitHub-hosted collaboration skills on top of the baseline, all driven by the gh CLI: reviewing-dependabot-prs (classify and batch-merge open Dependabot PRs), triaging-scan-alerts (triage open code-scanning alerts to file:line, report only), and watching-pr-checks (check a PR's CI status and hand off to a project's own /triaging-ci on a real failure). No hooks, no gate, no workflows: the Claude Code GitHub Action workflows are the separate `claude-github` pack.",
|
|
5
5
|
"modes": ["fresh", "adopt"],
|
|
6
6
|
"budget": {
|
|
7
7
|
"agents": 0,
|
|
8
8
|
"skills": 3,
|
|
9
9
|
"hooks": 0,
|
|
10
|
-
"workflows":
|
|
10
|
+
"workflows": 0,
|
|
11
11
|
"scripts": 0
|
|
12
12
|
},
|
|
13
13
|
"wiring": {
|
|
@@ -15,5 +15,5 @@
|
|
|
15
15
|
"packageScripts": {},
|
|
16
16
|
"verifySteps": []
|
|
17
17
|
},
|
|
18
|
-
"adoptNotes": "
|
|
18
|
+
"adoptNotes": "The three skills need only `gh` CLI auth (already required by every other gh-CLI-based skill this baseline ships) and install anywhere a .claude/ directory exists. triaging-scan-alerts reads code-scanning alerts, and nothing in the baseline or this pack produces them: turn on GitHub's CodeQL default setup for the repository (Settings > Code security), or install the `supply-chain` pack, whose scorecard.yml uploads SARIF, otherwise the skill's first call returns \"code scanning is not enabled\" and reports nothing. watching-pr-checks' handoff to /triaging-ci degrades gracefully if the project doesn't have that skill installed -- it still reports the real failure, just without the handoff. The Claude Code GitHub Action workflows (claude.yml, claude-pr-review.yml) used to ship in this pack and are now the separate `claude-github` pack; a project that installed this pack before the split keeps those files untouched."
|
|
19
19
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"name": "harness-extras",
|
|
4
|
-
"description": "Adds Claude Code session ergonomics on top of the baseline: a pair of hooks that carry a work summary across a context-window compaction, a hook that blocks non-read-only Bash commands from read-only review spokes
|
|
4
|
+
"description": "Adds Claude Code session ergonomics on top of the baseline: a pair of hooks that carry a work summary across a context-window compaction, and a hook that blocks non-read-only Bash commands from read-only review spokes. The status line is the separate `statusline` pack.",
|
|
5
5
|
"modes": ["fresh", "adopt"],
|
|
6
6
|
"budget": {
|
|
7
7
|
"agents": 0,
|
|
8
8
|
"skills": 0,
|
|
9
|
-
"hooks":
|
|
9
|
+
"hooks": 3,
|
|
10
10
|
"workflows": 0,
|
|
11
11
|
"scripts": 0
|
|
12
12
|
},
|
|
@@ -51,20 +51,8 @@
|
|
|
51
51
|
}
|
|
52
52
|
]
|
|
53
53
|
},
|
|
54
|
-
"settingsTopLevel": {
|
|
55
|
-
"statusLine": {
|
|
56
|
-
"type": "command",
|
|
57
|
-
"command": "node \"$CLAUDE_PROJECT_DIR/.claude/hooks/statusline.mjs\"",
|
|
58
|
-
"refreshInterval": 30,
|
|
59
|
-
"padding": 1
|
|
60
|
-
},
|
|
61
|
-
"subagentStatusLine": {
|
|
62
|
-
"type": "command",
|
|
63
|
-
"command": "node \"$CLAUDE_PROJECT_DIR/.claude/hooks/subagent-statusline.mjs\""
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
54
|
"packageScripts": {},
|
|
67
55
|
"verifySteps": []
|
|
68
56
|
},
|
|
69
|
-
"adoptNotes": "The
|
|
57
|
+
"adoptNotes": "The compaction hooks install anywhere a .claude/ directory exists, but guard-readonly-bash.mjs imports ../../bin/lib/agent-roster.mjs (the baseline's list of writer spokes) -- copy that file alongside it in an adopted project, or skip that one hook. The PreCompact hook writes tmp/compact-handoff-<session_id>.json under the git worktree the session runs in (from the hook payload's cwd, since CLAUDE_PROJECT_DIR does not follow a session into a linked worktree) -- fresh mode's baseline .gitignore already lists tmp/ unconditionally, but an adopted project's own .gitignore was never touched by adopt mode, so add tmp/ there too before this pack's hooks run, or the handoff artifact can end up committed. The size-ratchet gate and the type-design-analyzer agent that used to ship here are now the separate `quality` pack. The status line that used to ship here is now the separate `statusline` pack, so installing this one never touches a project's own `statusLine` setting."
|
|
70
58
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"name": "licensing",
|
|
4
|
+
"description": "An SPDX/REUSE license-header gate for a new project: check-license-headers.mjs (a lint-group verify step that fails on any git-tracked file with neither an SPDX header nor a REUSE.toml annotation, and inserts missing headers with --fix) and a REUSE.toml template. Fresh mode only, because the one-time backfill fails an established project's pnpm verify until it has touched every file. Split from `publishing` so a project can take the header gate without the npm release pipeline, and the other way round.",
|
|
5
|
+
"modes": ["fresh"],
|
|
6
|
+
"budget": {
|
|
7
|
+
"agents": 0,
|
|
8
|
+
"skills": 0,
|
|
9
|
+
"hooks": 0,
|
|
10
|
+
"workflows": 0,
|
|
11
|
+
"scripts": 0
|
|
12
|
+
},
|
|
13
|
+
"wiring": {
|
|
14
|
+
"settings": {},
|
|
15
|
+
"packageScripts": {},
|
|
16
|
+
"verifySteps": [
|
|
17
|
+
{
|
|
18
|
+
"id": "license-headers",
|
|
19
|
+
"group": "lint",
|
|
20
|
+
"name": "Check SPDX license headers",
|
|
21
|
+
"cmd": ["node", "bin/check-license-headers.mjs"]
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"setupSteps": [
|
|
26
|
+
"git add -A",
|
|
27
|
+
"node bin/check-license-headers.mjs --fix",
|
|
28
|
+
"git add -A"
|
|
29
|
+
],
|
|
30
|
+
"adoptNotes": "REQUIRED right after install, before the first pnpm verify: `git add -A`, then `node bin/check-license-headers.mjs --fix`, then `git add -A` again and commit the result (the gate only checks git-tracked files, so a fresh project with nothing staged passes it vacuously and fails on every file at its first push) -- templates/core has never had a license-header gate before this pack, so every one of its own files (hooks, bin/ scripts, CI workflows, the placeholder src/tests, and the workflows of any other installed pack such as `claude-github` or `supply-chain`) is missing the SPDX header this pack's gate now requires. The shipped REUSE.toml and gate header use NOASSERTION as the license identifier because the pack cannot know the project's license: edit REUSE.toml and the headerLines() function in bin/check-license-headers.mjs once it is decided (a LICENSE file, if one exists, is the source of truth). In a hand-copied install the CLI does not substitute tokens, so replace every literal `__PROJECT_NAME__` in the copied files (REUSE.toml, the SPDX headers) with the project's real name first. Fresh mode only: the backfill fails an established project's pnpm verify until it has touched every file, so it is staged like every other pack (at .groundwork/packs/licensing/) but never auto-installed in adopt mode -- if an adopted project wants it, copy .groundwork/packs/licensing/files/ by hand, dropping the `.staged` suffix from every name (or copy templates/packs/licensing/files/ from this repo directly) and run the backfill above. The license-headers verify step is a lint-group gate and installs anywhere a bin/verify.mjs-shaped gate runner exists; wire it into the project's real one if it differs. REUSE.toml also carries globs for `.gitleaks.toml` and `.worktreeinclude`, the files the `supply-chain` and `worktrees` packs add, so the gate's uncovered-file check passes whether or not those packs are installed. This gate used to ship in the `publishing` pack; a project that installed that pack before the split keeps its files untouched."
|
|
31
|
+
}
|