@monte3l/groundwork 1.0.4 → 1.1.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/README.md +62 -13
- 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/SKILL.md +17 -0
- package/plugin/skills/customize/step-3-round-1.md +105 -20
- package/plugin/src/domain-map.ts +1 -1
- package/plugin/src/pack-map.ts +177 -44
- package/plugin/src/plugin-map.ts +277 -28
- 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/settings.json +11 -1
- package/templates/core/.claude/skills/creating-prs/SKILL.md +1 -0
- package/templates/core/.claude/skills/finishing-work/SKILL.md +1 -0
- package/templates/core/.claude/skills/harness-guidance/SKILL.md +1 -0
- package/templates/core/.claude/skills/starting-work/SKILL.md +20 -0
- package/templates/core/.claude/skills/triaging-ci/SKILL.md +1 -0
- package/templates/core/.claude/skills/typescript-guidance/SKILL.md +1 -0
- package/templates/core/.claude/skills/writing-commits/SKILL.md +1 -0
- package/templates/core/CLAUDE.md +44 -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 +8 -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/frontend/files/.claude/agents/ui-reviewer.md +132 -0
- package/templates/packs/frontend/files/.claude/skills/new-component/SKILL.md +72 -0
- package/templates/packs/frontend/pack.json +19 -0
- package/templates/packs/github/files/.claude/skills/reviewing-dependabot-prs/SKILL.md +4 -0
- package/templates/packs/github/files/.claude/skills/triaging-scan-alerts/SKILL.md +3 -0
- package/templates/packs/github/files/.claude/skills/watching-pr-checks/SKILL.md +4 -0
- package/templates/packs/github/pack.json +3 -3
- package/templates/packs/harness-extras/files/.claude/hooks/guard-readonly-bash.mjs +1117 -122
- package/templates/packs/harness-extras/pack.json +3 -15
- package/templates/packs/licensing/pack.json +31 -0
- package/templates/packs/publishing/pack.json +3 -14
- package/templates/packs/quality/files/.claude/agents/type-design-analyzer.md +1 -1
- package/templates/packs/service/files/.claude/agents/performance-analyzer.md +96 -0
- package/templates/packs/service/files/.claude/skills/api-doc/SKILL.md +67 -0
- package/templates/packs/service/files/.claude/skills/api-doc/openapi-template.yaml +48 -0
- package/templates/packs/service/pack.json +19 -0
- package/templates/packs/statusline/pack.json +31 -0
- package/templates/packs/supply-chain/pack.json +1 -1
- package/templates/packs/worktrees/files/.claude/skills/working-in-worktrees/SKILL.md +20 -5
- 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
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: new-component
|
|
3
|
+
description: Adds a new component to a UI project by mirroring an existing sibling component's conventions, then runs it through the test-author, code-implementer and ui-reviewer loop. Use for /new-component, "add a new component", "scaffold a component", "create a UI component", or when asked for a component that should look and be tested like the ones already in the project.
|
|
4
|
+
argument-hint: "[component-name]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# new-component
|
|
8
|
+
|
|
9
|
+
A new component should look like the ones already in the project: same
|
|
10
|
+
folder layout, naming, props style, test style and, where the project has
|
|
11
|
+
them, story or example files. Shipping fixed templates would be wrong for
|
|
12
|
+
most projects (the framework is unknown here), so this skill reads a
|
|
13
|
+
**sibling** component and copies its conventions instead of inventing new
|
|
14
|
+
ones.
|
|
15
|
+
|
|
16
|
+
The hub plans and dispatches; it never writes `src/` or test code itself.
|
|
17
|
+
Writing is the job of `test-author` and `code-implementer`.
|
|
18
|
+
|
|
19
|
+
## Steps
|
|
20
|
+
|
|
21
|
+
### 1 — Find a sibling
|
|
22
|
+
|
|
23
|
+
Find the closest existing component to the one being asked for: same kind
|
|
24
|
+
(a form control, a layout piece, a list item), same folder, or the most
|
|
25
|
+
recently added. Read it in full, with its test file and any story or example
|
|
26
|
+
file beside it. Record, in a short list:
|
|
27
|
+
|
|
28
|
+
- the **framework** and file extensions in use (read them from the sibling
|
|
29
|
+
and from `package.json`; never assume one);
|
|
30
|
+
- where files live and how they are named (one folder per component or one
|
|
31
|
+
file, an index file, a barrel export);
|
|
32
|
+
- how props or inputs are typed, how state is held, how styles are attached;
|
|
33
|
+
- how the sibling is tested and what it asserts;
|
|
34
|
+
- how the sibling handles accessibility: element choice, labels, keyboard
|
|
35
|
+
handling, focus.
|
|
36
|
+
|
|
37
|
+
If there is no sibling (the project has no component yet), stop and ask the
|
|
38
|
+
owner which framework and conventions to use. Do not pick a framework and do
|
|
39
|
+
not add a **dependency** to make a component possible: a new package is a
|
|
40
|
+
decision for the owner, not a side effect of this skill.
|
|
41
|
+
|
|
42
|
+
### 2 — Write the contract
|
|
43
|
+
|
|
44
|
+
Before any code, write the component's contract in a few lines: its name and
|
|
45
|
+
location (mirroring the sibling), its props or inputs, its states (default,
|
|
46
|
+
disabled, loading, error, empty), its keyboard behaviour, and its accessible
|
|
47
|
+
name and role. Settle the element first: prefer a native element (`button`,
|
|
48
|
+
`a`, `input`) over a generic element with a role added.
|
|
49
|
+
|
|
50
|
+
Confirm anything the sibling does not answer with the owner before going on.
|
|
51
|
+
|
|
52
|
+
### 3 — Run the loop
|
|
53
|
+
|
|
54
|
+
1. `test-author` writes failing tests from the contract, following the
|
|
55
|
+
sibling's test style, and confirms they fail for the right reason.
|
|
56
|
+
2. `code-implementer` makes them pass, following the sibling's layout and
|
|
57
|
+
naming, and adds the story or example file only if the sibling has one.
|
|
58
|
+
3. `ui-reviewer` reviews the new files for accessibility. Name the files to
|
|
59
|
+
review in the dispatch prompt, since it has no shell. `code-reviewer` runs
|
|
60
|
+
alongside it as usual.
|
|
61
|
+
4. Must-fix findings go back to `code-implementer`, and the loop repeats until
|
|
62
|
+
clean.
|
|
63
|
+
|
|
64
|
+
If the project has no `test-author` or `code-implementer` (an adopted project
|
|
65
|
+
that dropped them), say so and stop: ask the owner to restore the writer
|
|
66
|
+
spokes, because the hub never writes `src/` itself.
|
|
67
|
+
|
|
68
|
+
### 4 — Report
|
|
69
|
+
|
|
70
|
+
Say which sibling was mirrored, the files added, what `ui-reviewer` reported
|
|
71
|
+
including everything it listed as NOT CHECKED, and the checks only a browser
|
|
72
|
+
or a screen reader can settle.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"name": "frontend",
|
|
4
|
+
"description": "Two aids for a project that builds UI, on top of the baseline: a read-only ui-reviewer agent that does a static accessibility review of changed components, markup and styles against WCAG 2.2 (level AA, plus the animation criterion at AAA) and reports anything that needs a browser as NOT CHECKED, and a new-component skill that scaffolds a component by mirroring an existing sibling component's conventions and routing the work through the baseline's test-author, code-implementer and ui-reviewer loop. No hooks, no settings, no gate, no framework templates.",
|
|
5
|
+
"modes": ["fresh", "adopt"],
|
|
6
|
+
"budget": {
|
|
7
|
+
"agents": 1,
|
|
8
|
+
"skills": 1,
|
|
9
|
+
"hooks": 0,
|
|
10
|
+
"workflows": 0,
|
|
11
|
+
"scripts": 0
|
|
12
|
+
},
|
|
13
|
+
"wiring": {
|
|
14
|
+
"settings": {},
|
|
15
|
+
"packageScripts": {},
|
|
16
|
+
"verifySteps": []
|
|
17
|
+
},
|
|
18
|
+
"adoptNotes": "Both files install anywhere a .claude/ directory exists and need no gate runner. ui-reviewer is a read-only review spoke (model claude-sonnet-5-5 at medium effort, tools Read, Grep and Glob only, so it never runs a command): nothing in the baseline's hub-and-spoke instructions dispatches it by name, so ask for it after changing UI, or add it to the project's own CLAUDE.md review step. It reviews source statically and cannot measure contrast, focus order or layout, so it reports those as NOT CHECKED instead of guessing. new-component ships no framework templates: it reads an existing sibling component to learn the project's layout, naming and test conventions, so it works best with at least one component already in the project (with none it stops and asks the owner which conventions to use), and it hands the writing to test-author and code-implementer, which an adopted project must keep for the skill to work as written."
|
|
19
|
+
}
|
|
@@ -7,6 +7,8 @@ description: >-
|
|
|
7
7
|
approve. Use for /reviewing-dependabot-prs, "review the dependabot PRs",
|
|
8
8
|
"triage dependency updates", or when several Dependabot PRs have
|
|
9
9
|
accumulated. GitHub stance: gh CLI.
|
|
10
|
+
allowed-tools: Bash(gh pr list *) Bash(gh pr view *) Bash(gh pr checks *)
|
|
11
|
+
disallowed-tools: Write, Edit, NotebookEdit
|
|
10
12
|
---
|
|
11
13
|
|
|
12
14
|
Triage every open Dependabot pull request in this repository: classify each
|
|
@@ -16,6 +18,8 @@ skill never merges or closes a PR the user hasn't approved, and never
|
|
|
16
18
|
guesses at a version bump's safety from the checks alone -- a major bump is
|
|
17
19
|
always held for a human look, checks or no checks.
|
|
18
20
|
|
|
21
|
+
**Write and Edit are unavailable while this skill is active** (its `disallowed-tools`): it acts only through `gh`. A code fix for a failing update belongs in a fresh request or a spoke, not in this run.
|
|
22
|
+
|
|
19
23
|
## Steps
|
|
20
24
|
|
|
21
25
|
### 1 — List every open Dependabot PR
|
|
@@ -7,6 +7,7 @@ description: >-
|
|
|
7
7
|
/triaging-scan-alerts, "review the scan alerts", "what does CodeQL flag",
|
|
8
8
|
"triage the security findings", or after a code-scanning workflow run.
|
|
9
9
|
GitHub stance: gh CLI.
|
|
10
|
+
disallowed-tools: Write, Edit, NotebookEdit
|
|
10
11
|
---
|
|
11
12
|
|
|
12
13
|
Fetch every open code-scanning alert for this repository, group it by
|
|
@@ -15,6 +16,8 @@ file and line it points at. This skill produces a report and a set of
|
|
|
15
16
|
options per alert -- it never edits code, dismisses an alert, or opens a
|
|
16
17
|
PR on its own.
|
|
17
18
|
|
|
19
|
+
**Write and Edit are unavailable while this skill is active** (its `disallowed-tools`): it only reports. Fixing an alert belongs in a fresh request or a spoke, not in this run.
|
|
20
|
+
|
|
18
21
|
## Steps
|
|
19
22
|
|
|
20
23
|
### 1 — Fetch open alerts
|
|
@@ -7,6 +7,8 @@ description: >-
|
|
|
7
7
|
check name alone. Use for /watching-pr-checks, "check this PR's status",
|
|
8
8
|
"is this PR ready to merge", "did CI pass on my PR". GitHub stance: gh
|
|
9
9
|
CLI.
|
|
10
|
+
allowed-tools: Bash(gh pr view *) Bash(gh pr checks *) Bash(gh run view *)
|
|
11
|
+
disallowed-tools: Write, Edit, NotebookEdit
|
|
10
12
|
---
|
|
11
13
|
|
|
12
14
|
Check one pull request's CI status and act on what the checks actually
|
|
@@ -14,6 +16,8 @@ say, rather than assuming green or guessing at a failure. This is a
|
|
|
14
16
|
single check, not a polling loop -- if checks are still running, report
|
|
15
17
|
that plainly and let the user decide whether to ask again later or wait.
|
|
16
18
|
|
|
19
|
+
**Write and Edit are unavailable while this skill is active** (its `disallowed-tools`): it only reads check status. A fix for a red check belongs in a fresh request or a spoke after `/triaging-ci`, not in this run.
|
|
20
|
+
|
|
17
21
|
## Steps
|
|
18
22
|
|
|
19
23
|
### 1 — Resolve the PR
|
|
@@ -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
|
}
|