@erclx/canon 4.102.0 → 4.104.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/.claude-plugin/plugin.json +1 -1
- package/claude/skills/canon-cli/SKILL.md +3 -74
- package/claude/skills/canon-operator/REQUIREMENT.md +2 -2
- package/claude/skills/canon-operator/SKILL.md +5 -5
- package/claude/skills/canon-rollout/SKILL.md +7 -6
- package/claude/skills/design-taste/references/craft.md +1 -1
- package/claude/skills/design-taste/references/preflight.md +2 -2
- package/claude/skills/design-taste/references/tells.md +1 -1
- package/claude/skills/draft-readme/REQUIREMENT.md +2 -0
- package/claude/skills/draft-readme/SKILL.md +9 -1
- package/claude/skills/git-followup/SKILL.md +1 -1
- package/claude/skills/git-issue/SKILL.md +2 -2
- package/{standards → claude/skills/git-issue/references}/issue.md +3 -8
- package/claude/skills/git-pr/SKILL.md +2 -2
- package/claude/skills/index-lookup/REQUIREMENT.md +2 -2
- package/claude/skills/project-commands/REQUIREMENT.md +1 -1
- package/claude/skills/seed-sync/REQUIREMENT.md +1 -1
- package/claude/skills/target-check/REQUIREMENT.md +42 -0
- package/claude/skills/target-check/SKILL.md +91 -0
- package/claude/skills/target-check/references/domains.md +88 -0
- package/claude/skills/target-setup/REQUIREMENT.md +56 -0
- package/claude/skills/target-setup/SKILL.md +163 -0
- package/claude/skills/target-setup/references/detect.md +80 -0
- package/claude/skills/{setup-indexes/SKILL.md → target-setup/references/indexes.md} +59 -23
- package/claude/skills/target-setup/references/verify.md +95 -0
- package/claude/skills/ui-checklist/SKILL.md +17 -0
- package/docs/agents/commands.md +1 -1
- package/docs/agents/sandbox.md +1 -1
- package/docs/agents/scripting.md +3 -2
- package/docs/target-projects.md +13 -11
- package/docs/workflow/ai-workflow.md +19 -23
- package/governance/rules/ci/700-ci-workflow.md +11 -0
- package/governance/rules/ui/400-ui.md +0 -5
- package/governance/rules/ui/460-design-taste.md +1 -1
- package/governance/rules/ui/465-interface-casing.md +31 -0
- package/governance/stacks/astro.toml +1 -1
- package/governance/stacks/react.toml +1 -1
- package/package.json +1 -1
- package/scripts/core/regen-hero.sh +1 -1
- package/scripts/core/regen-web-previews.ts +1 -0
- package/src/claude/cases/setup.ts +20 -11
- package/src/commands/design.ts +8 -2
- package/src/commands/sync.ts +1 -1
- package/src/design/css.ts +5 -2
- package/src/design/render.ts +46 -6
- package/src/gate/measures.ts +57 -0
- package/src/gate/stages.ts +10 -14
- package/src/gov/list.ts +1 -1
- package/src/sandbox/census.ts +3 -3
- package/src/shipped/references.ts +1 -1
- package/standards/index.md +0 -1
- package/standards/readme.md +22 -3
- package/tooling/astro/manifest.toml +1 -0
- package/tooling/nextjs/manifest.toml +1 -0
- package/tooling/web/configs/.github/workflows/readme-screenshot.yml +110 -0
- package/tooling/web/configs/e2e/screenshot.ts +69 -15
- package/tooling/web/configs/scripts/lib/preview-server.sh +31 -0
- package/tooling/web/configs/scripts/readme-screenshot.sh +26 -0
- package/tooling/web/configs/scripts/screenshot.sh +1 -24
- package/tooling/web/manifest.toml +1 -0
- package/tooling/web/reference.md +6 -1
- package/claude/skills/setup-gov/REQUIREMENT.md +0 -37
- package/claude/skills/setup-gov/SKILL.md +0 -77
- package/claude/skills/setup-indexes/REQUIREMENT.md +0 -48
- package/claude/skills/setup-init/REQUIREMENT.md +0 -46
- package/claude/skills/setup-init/SKILL.md +0 -133
- package/claude/skills/setup-plugins/REQUIREMENT.md +0 -42
- package/claude/skills/setup-plugins/SKILL.md +0 -81
- package/claude/skills/setup-plugins/references/plugin-catalog.md +0 -53
- package/claude/skills/setup-smoke/REQUIREMENT.md +0 -38
- package/claude/skills/setup-smoke/SKILL.md +0 -53
- package/claude/skills/setup-verify/REQUIREMENT.md +0 -39
- package/claude/skills/setup-verify/SKILL.md +0 -51
- package/scripts/core/regen-tooling-paths.sh +0 -61
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: setup-indexes
|
|
3
|
-
description: Why index bootstrap is all-or-nothing per folder, what the confirmation loop protects, and why the convention block is pasted rather than written
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Setup indexes requirement
|
|
7
|
-
|
|
8
|
-
## Gap
|
|
9
|
-
|
|
10
|
-
Without this skill, a session bootstrapping the index system writes `index.md` into a folder and leaves the sibling frontmatter for later, so the first regen hard-errors on the first file missing a `title`. Partial coverage is not a partial success. The folder is broken until every sibling carries both fields, and the error surfaces at regen rather than at the write that caused it.
|
|
11
|
-
|
|
12
|
-
The scan is where the other failures start. A walk that does not prune reaches `node_modules`, gitignored output, and the snippets folder, which is invoked by reference rather than browsed and needs neither an index nor per-file frontmatter. A folder that already carries an `index.md` gets a second one written over the first.
|
|
13
|
-
|
|
14
|
-
One failure predates the scan. `setup-init` declines an install that wants the Claude layer without the tooling chain and names this skill as where the index system gets bootstrapped, and a body that never states the inbound route leaves the person arriving on it unable to tell whether they landed at the destination or somewhere adjacent to it.
|
|
15
|
-
|
|
16
|
-
Drafted frontmatter is a proposal, and a session that writes it before the user sees it turns a review into a cleanup. The convention block has the mirror failure. A session that paraphrases it into `CLAUDE.md` produces a copy that reads correctly and no longer matches its source, so the two drift with nothing reporting it. And a project with no `CLAUDE.md` gets one scaffolded to hold the block, which installs a file the project declined.
|
|
17
|
-
|
|
18
|
-
A fourth failure sits after the scan rather than inside it. `## Present candidates` had no branch for a scan that finds zero folders, so an empty result walked straight into the ask with nothing to choose from. `setup-init` folds this skill into the onboarding chain, and a fresh scaffold usually carries no markdown-heavy folder yet, so the ordinary onboarding run reached the undefined case.
|
|
19
|
-
|
|
20
|
-
## Must
|
|
21
|
-
|
|
22
|
-
- Bootstrap all-or-nothing per chosen folder, since a folder carrying partial frontmatter hard-errors on regen
|
|
23
|
-
- Prune the scan to folders a reader browses, and skip any folder already carrying an `index.md`
|
|
24
|
-
- Surface every drafted `title` and `description` for the user to accept, edit, or reject before anything is written
|
|
25
|
-
- Validate with a dry run and stop on the first reported error, before writing for real
|
|
26
|
-
- Paste the convention block verbatim from its single source
|
|
27
|
-
- Emit the closeout exactly once, whatever the seed step concluded
|
|
28
|
-
- State the inbound route from `setup-init`, so an install wanting the Claude layer without the tooling chain can tell it landed at the destination the chain named
|
|
29
|
-
|
|
30
|
-
## Must not
|
|
31
|
-
|
|
32
|
-
- Write a draft the user has not confirmed
|
|
33
|
-
- Index the snippets folder, which is read by reference rather than browsed
|
|
34
|
-
- Create `CLAUDE.md` to hold the convention block. Name the skip and the command that installs the file.
|
|
35
|
-
- Overwrite content below the frontmatter block, or touch a file the user rejected
|
|
36
|
-
|
|
37
|
-
## Guards
|
|
38
|
-
|
|
39
|
-
- A folder with fewer than the sibling threshold stays out of the candidate list unless the user names it explicitly, so the scan proposes and the user overrides
|
|
40
|
-
- A `CLAUDE.md` already carrying the convention section skips the seed silently rather than appending a second copy
|
|
41
|
-
- A scan that finds no candidate reports a one-line result and returns, skipping the ask and every step between it and the seed offer, rather than opening a prompt with nothing in it
|
|
42
|
-
|
|
43
|
-
## Out of scope
|
|
44
|
-
|
|
45
|
-
- Regenerating an index in a project that already runs the system, which `canon indexes regen` does on its own
|
|
46
|
-
- Wiring the lint-staged entry or the hook, which the closeout offers and the user opts into
|
|
47
|
-
- Installing governance rules or scaffolding a project: `setup-gov` and `setup-init`
|
|
48
|
-
- Writing the frontmatter conventions themselves, which the prose standard owns
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: setup-init
|
|
3
|
-
description: Scope boundary for the one-shot onboarding chain and the setup steps it leaves to a caller
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Setup init requirement
|
|
7
|
-
|
|
8
|
-
## Gap
|
|
9
|
-
|
|
10
|
-
Without this skill, a session installs a stack whose name it recalled rather than read, hand-writes configs the tooling sync already ships as golden files, and re-runs the chain over a project that owns its configs already.
|
|
11
|
-
|
|
12
|
-
Two failures are the expensive ones because both return success. A monorepo run drops husky into every subtree, git honors one `core.hooksPath`, and the extra hook directories go quiet with nothing reporting it. A caller reads the chain as onboarding complete when plugin provisioning never runs, since no step states that it sits outside the chain.
|
|
13
|
-
|
|
14
|
-
Two more start at the resolve step. A project whose language the toolkit carries no stack for resolves to `base`, and the preview reports the resolved name without marking it as a fallback, so `base` development dependencies, scripts, and hooks land on a project that will not use them and nobody had the moment to decline.
|
|
15
|
-
|
|
16
|
-
The other is the refusal that ends rather than routes. An existing project, an install wanting the Claude layer without the tooling chain, and a language with no stack are the three states the chain does not serve, and each is declined by a declaration naming no destination, so the person who arrived with one reads a stop and goes no further.
|
|
17
|
-
|
|
18
|
-
## Must
|
|
19
|
-
|
|
20
|
-
- Resolve every domain argument against a catalog read at run time, so a stack, rule, snippet, or tooling name the catalog does not carry cannot reach the command line
|
|
21
|
-
- Preview the resolved chain before the first command runs, naming the evidence file behind each detected technology
|
|
22
|
-
- Pass `--skip base` on every subtree past the first in a monorepo, so the shared hook layer lands once
|
|
23
|
-
- State which onboarding steps the chain does not run and why, so a caller knows what is left and where the boundary sits rather than inferring completeness from a clean report
|
|
24
|
-
- Mark a stack reached by fallback as a fallback in the preview, and name what `base` carries, so the write can be declined at the one point it is still declinable
|
|
25
|
-
- Name a destination for every state the chain does not serve, in this body rather than only in a reference doc the person would have to already know to open, and say for each whether the chain stops or runs on a default
|
|
26
|
-
|
|
27
|
-
## Must not
|
|
28
|
-
|
|
29
|
-
- Generate a config that tooling sync ships as a golden file. Generating from prose duplicates the installed file and the two drift.
|
|
30
|
-
- Author a rule, stack, or snippet inside the target project when detection finds no match. Authoring happens in the toolkit and reaches a project by install or sync.
|
|
31
|
-
- Grow an existing-project branch, a mode switch, or a clobber guard. The chain runs once against a fresh scaffold and the per-domain paths cover everything after that.
|
|
32
|
-
|
|
33
|
-
## Guards
|
|
34
|
-
|
|
35
|
-
- An unmatched technology stops for a decision. Surface the gap and either defer to rule authoring or proceed on the matched layer with the gap named in the report, rather than resolving to the nearest rule.
|
|
36
|
-
|
|
37
|
-
## Out of scope
|
|
38
|
-
|
|
39
|
-
- Installing governance rules alone: `setup-gov`. This skill installs governance beside tooling and the seeds.
|
|
40
|
-
- Provisioning Claude Code plugins: `setup-plugins`. Those install once per machine rather than into a project, so no project-scoped chain can carry them.
|
|
41
|
-
- Running the verification scripts, which `setup-verify` owns and this chain invokes as step 4
|
|
42
|
-
- Publishing repository metadata: `repo-metadata`. It reaches a remote, which is past the project edge this chain stops at.
|
|
43
|
-
- Making the first commit: `git-commit`. It reaches the project's history, which is past the project edge this chain stops at.
|
|
44
|
-
- Re-installing into a project that already has the files, which the per-domain `canon <domain> install` and `canon sync` commands own
|
|
45
|
-
- Deciding which of those per-domain commands an existing project needs: `canon-operator`. That skill reads the target before naming one, which this chain never does, so it is the destination rather than a guess made here.
|
|
46
|
-
- Seeding the `.claude/` folder without the tooling chain, which `canon claude init` does on its own and `setup-indexes` finishes
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: setup-init
|
|
3
|
-
description: Detects a new project's type and runs `canon init` with a resolved stack in one shot. Use when bootstrapping a new project with the toolkit, or when asked to "init this project", "bootstrap the toolkit", "set up toolkit", or "one-shot install". Assumes the `canon` CLI is on PATH. Do NOT use when only installing governance rules. Use `setup-gov` instead.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Init project
|
|
7
|
-
|
|
8
|
-
Orchestrates the onboarding chain. Detects project type, resolves per-domain arguments, previews the chain, then runs `canon init` with flags. The CLI holds the install logic. This skill only resolves and previews.
|
|
9
|
-
|
|
10
|
-
## Scope
|
|
11
|
-
|
|
12
|
-
- This skill and `canon init` run once on a fresh scaffold, never on an existing project. They do not guard against clobbering existing configs. When tempted to add guards, mode switches, or an existing-project branch, stop. Extend the per-domain `canon <domain> install` or `canon sync` paths instead.
|
|
13
|
-
- The chain folds `setup-indexes` in as its own final step, once the project-scoped work is written. It still does not provision Claude Code plugins: `setup-plugins` owns that, installing once per machine rather than into a project, so no project-scoped chain can carry it. Name it in the report so a clean result does not read as onboarding complete.
|
|
14
|
-
|
|
15
|
-
## Declined states
|
|
16
|
-
|
|
17
|
-
Three states reach this skill that the chain does not serve. Name the destination for each, so the refusal routes rather than ends. The first two stop the chain outright and the third runs it on a default the person may not want.
|
|
18
|
-
|
|
19
|
-
- **An existing project.** Stop and hand off to `canon-operator`. It reads what the target already carries before it names a command, which this chain never does, so any per-domain install picked here is a guess against configs nobody read. The Scope bullet above names the same commands as the authoring alternative, and this is the destination a person takes.
|
|
20
|
-
- **An install wanting the `.claude/` folder alone.** Stop. Run `canon claude init` for the seed docs, then invoke `setup-indexes` to bootstrap the `index.md` system over the project's own documentation folders. Neither needs the tooling sync this chain runs.
|
|
21
|
-
- **A language the toolkit carries no stack for.** The chain still runs, on `base`, with the fallback marked in the preview. A project that wants none of what `base` carries declines there and takes `setup-gov` for the governance layer, which is language-neutral. Say so at the preview rather than resolving it here, since the fallback is a working default and only the person can say whether it fits.
|
|
22
|
-
|
|
23
|
-
Do not add a stack, a mode switch, or an existing-project branch to satisfy one of these. Each destination already exists and routing to it costs a line.
|
|
24
|
-
|
|
25
|
-
## Read catalogs
|
|
26
|
-
|
|
27
|
-
Run in parallel. Never hardcode stack, rule, snippet, or standards names.
|
|
28
|
-
|
|
29
|
-
Run from the target project's current directory. Do not cd into the toolkit source tree. The `canon` CLI is global.
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
canon gov list --json 2>/dev/null
|
|
33
|
-
canon tooling list --json 2>/dev/null
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## Detect
|
|
37
|
-
|
|
38
|
-
Read these from the project root in parallel, skipping any that do not exist:
|
|
39
|
-
|
|
40
|
-
- `package.json`: `dependencies` and `devDependencies`
|
|
41
|
-
- Root configs: `astro.config.*`, `next.config.*`, `vite.config.*`, `tailwind.config.*`, `tsconfig.json`, `pyproject.toml`, `go.mod`, `Cargo.toml`
|
|
42
|
-
- `canon/REQUIREMENTS.md` and `canon/ARCHITECTURE.md` if present
|
|
43
|
-
- Directory structure via `ls -1` of the project root and `src/` if present
|
|
44
|
-
|
|
45
|
-
## Resolve arguments
|
|
46
|
-
|
|
47
|
-
- **Stack:** pick the closest governance stack by matching detected runtime or framework against stack names in the catalog. If nothing matches, fall back to `base` and carry the fallback into the preview.
|
|
48
|
-
- **Tooling stack:** pick the closest tooling stack from `canon tooling list --json` (e.g. `vite-react`, `astro`, `nextjs`). Distinct from the governance stack. Fall back to `base` if no framework match, and carry that fallback into the preview too.
|
|
49
|
-
- **Next.js:** map `next` in `package.json` dependencies, or a root `next.config.ts`/`.js`/`.mjs` file, to the `nextjs` tooling stack. The dependency name does not match the stack name by itself.
|
|
50
|
-
- **Extras:** identify technologies not already covered by the picked stack. For each, find a rule whose `description` or `paths` points at that technology and pass it via `--add`. Do not add a rule the stack already pulls in.
|
|
51
|
-
- **Skip (`--skip`):** `wiki` installs by default. Add `--skip wiki` only when the user explicitly wants it left out.
|
|
52
|
-
|
|
53
|
-
## Gap handling
|
|
54
|
-
|
|
55
|
-
If a detected technology has no matching rule or stack, do not guess. Surface the gap and either:
|
|
56
|
-
|
|
57
|
-
1. Defer to `setup-gov`. Author a rule in the toolkit, then re-run this skill.
|
|
58
|
-
2. Proceed with the matched layer, listing the gap in the final report.
|
|
59
|
-
|
|
60
|
-
Rules and stacks are authored in the toolkit repo, never in the target project on the fly.
|
|
61
|
-
|
|
62
|
-
## Preview
|
|
63
|
-
|
|
64
|
-
Before executing, output:
|
|
65
|
-
|
|
66
|
-
- **Detected:** each technology with its evidence file
|
|
67
|
-
- **Stack:** picked governance stack + resolved rule count. Mark it `fallback` when no detected runtime or framework matched a catalog name.
|
|
68
|
-
- **Tooling stack:** picked tooling stack. Mark it `fallback` on the same test, and name what `base` lands: configs, seeds, and gitignore entries in every case, plus the JavaScript development dependencies, scripts, and hook activation wherever a `package.json` exists to carry them. A project outside that ecosystem runs none of the second group and keeps the first.
|
|
69
|
-
- **Extras:** each `--add` rule with a one-line reason
|
|
70
|
-
- **Skip:** any `--skip` entries with reason
|
|
71
|
-
- **Target:** resolved target path
|
|
72
|
-
- **Commands:** the full chain that will run
|
|
73
|
-
|
|
74
|
-
A resolved name and a fallback read alike once written, so mark the fallback here rather than in the report. The preview is the last point before the first write, and the report runs after the files have landed.
|
|
75
|
-
|
|
76
|
-
## Execute
|
|
77
|
-
|
|
78
|
-
Run the chain in order, starting immediately after the preview. Each step's permission dialog is the confirmation gate, except step 5, which hands off to a skill that confirms its own folder list with the operator. Do not pause for additional confirmation elsewhere. Run from the target project's current directory.
|
|
79
|
-
|
|
80
|
-
Step 1: `canon init` installs base tooling, claude seeds, governance rules, and wiki.
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
CANON_NON_INTERACTIVE=1 canon init \
|
|
84
|
-
--stack <stack> \
|
|
85
|
-
--add <rules> \
|
|
86
|
-
<target>
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
Omit any flag whose resolved value is empty.
|
|
90
|
-
|
|
91
|
-
Step 2: `canon tooling sync <tooling-stack> --write` installs stack deps, scripts, gitignore entries, seeds, golden configs, and drops the reference doc. The extends chain is walked, so syncing `vite-react` also pulls `web` and `base` configs. Skip if the tooling stack is `base` (already synced by `canon init`).
|
|
92
|
-
|
|
93
|
-
`--write` is required. A headless run without it reports what it would replace and exits 1, since golden configs overwrite whatever the target holds at those paths. Scaffolding into a fresh target has nothing to lose, so pass it directly rather than reading a report first.
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
CANON_NON_INTERACTIVE=1 canon tooling sync <tooling-stack> <target> --write
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
Monorepo with multiple language roots: run `canon init` once at the repo root so `base` (husky, prettier, cspell, commitlint, CI) lands single, then sync each subtree with `--skip base` so the shared layer is not re-dropped.
|
|
100
|
-
|
|
101
|
-
```bash
|
|
102
|
-
CANON_NON_INTERACTIVE=1 canon tooling sync vite-react ./frontend --skip base --write
|
|
103
|
-
CANON_NON_INTERACTIVE=1 canon tooling sync python ./backend --skip base --write
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
Without `--skip base`, each subtree re-drops husky, and git honors only one `core.hooksPath`, so the extra hook dirs silently break. Each subtree keeps its own framework configs, and its own stack reference reads through `canon tooling reference <stack>`.
|
|
107
|
-
|
|
108
|
-
Step 3: post-sync fixups. Golden configs arrive from sync, so no config generation is required. But a few items may need a one-time touch:
|
|
109
|
-
|
|
110
|
-
- **ESLint version pin.** If `bun create vite` installed `eslint@^10` and the manifest pins `eslint@^9`, sync does not override a present dep. Run `bun add -d eslint@^9` if `bun run lint:fix` fails with `Class extends value undefined`.
|
|
111
|
-
- **File naming.** `bun create vite`'s `App.tsx` violates the `KEBAB_CASE` rule. Rename to `app.tsx` and update the import in `main.tsx`.
|
|
112
|
-
- **Docs.** Run `canon tooling reference <tooling-stack>` and `canon tooling reference web` for any stack-specific follow-ups (Chrome extension overrides, setup script details).
|
|
113
|
-
|
|
114
|
-
Do not generate ESLint, Vitest, or Playwright configs. They ship as golden files. Generating from prose duplicates what sync already installed.
|
|
115
|
-
|
|
116
|
-
Step 4: invoke `setup-verify`. Runs the `package.json` scripts and reports pass/fail.
|
|
117
|
-
|
|
118
|
-
Step 5: hand off to `setup-indexes` to bootstrap the `index.md` system over the project's own documentation folders. The skill confirms candidate folders with the operator rather than running unattended, which is the one step in this chain that pauses for a conversation. A fresh scaffold usually has no markdown-heavy folder yet, so this step frequently hands off with nothing for `setup-indexes` to present, which is that skill's own outcome to define rather than a claim this chain makes for it.
|
|
119
|
-
|
|
120
|
-
## Report
|
|
121
|
-
|
|
122
|
-
After the chain, report:
|
|
123
|
-
|
|
124
|
-
- Domains installed with a check per domain
|
|
125
|
-
- Tooling stack synced (or skipped). Name the layers pulled via the extends chain.
|
|
126
|
-
- Any post-sync fixups applied (ESLint pin, filename renames)
|
|
127
|
-
- `setup-verify` outcome
|
|
128
|
-
- `setup-indexes` outcome (folders bootstrapped, or none found)
|
|
129
|
-
- Any domains or scripts that failed
|
|
130
|
-
- Any detection gaps surfaced during resolve
|
|
131
|
-
- Onboarding steps left to the caller: `setup-plugins` for Claude Code plugins
|
|
132
|
-
|
|
133
|
-
The chain stops at the project edge. `repo-metadata` and `git-commit` also ship, reaching a remote and the project's history respectively, and neither runs here.
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: setup-plugins
|
|
3
|
-
description: Why plugin installs read a curated catalog, install user-scoped, and never touch toolkit workflow skills
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Setup plugins requirement
|
|
7
|
-
|
|
8
|
-
## Gap
|
|
9
|
-
|
|
10
|
-
Without this skill, a session asked to install plugins invents marketplace sources and install strings from names it half remembers, and a plugin name that does not exist fails in a way that reads like a network problem. The catalog is the difference between an install and a guess.
|
|
11
|
-
|
|
12
|
-
Scope is the failure that shows up later. A domain plugin installed into one project is missing from the next one, so the machine looks provisioned until the user opens another repository. The mirror mistake is treating toolkit workflow skills as plugins to install, when they load live through a plugin directory and a copied version goes stale the moment it lands.
|
|
13
|
-
|
|
14
|
-
Two failures come from running the batch carelessly. A reinstall over a plugin already present costs time and can replace a working version. And a batch that aborts on the first failure leaves a partial install with no record of which rows ran, so the next attempt starts from an unknown state.
|
|
15
|
-
|
|
16
|
-
## Must
|
|
17
|
-
|
|
18
|
-
- Read the curated catalog through the skill's own directory, so the path resolves from any project
|
|
19
|
-
- Detect what is already installed and skip those rows
|
|
20
|
-
- Install user-scoped, since a domain plugin belongs to the machine rather than to one project
|
|
21
|
-
- Run each install independently so one failure does not abort the batch
|
|
22
|
-
- Preview the chosen rows, the scope, and the exact commands before executing
|
|
23
|
-
- Report the failures with their CLI errors, the reload requirement, and the settings-level remedy for an over-triggering plugin
|
|
24
|
-
|
|
25
|
-
## Must not
|
|
26
|
-
|
|
27
|
-
- Install a plugin, marketplace, or command string that is not in the catalog
|
|
28
|
-
- Install toolkit workflow skills, which load live rather than being copied
|
|
29
|
-
- Reinstall a plugin already present
|
|
30
|
-
- Pause for a confirmation beyond the tool permission dialog
|
|
31
|
-
|
|
32
|
-
## Guards
|
|
33
|
-
|
|
34
|
-
- The `claude` CLI absent from PATH stops before any install, since every step shells out to it
|
|
35
|
-
- A catalog row that installs outside the plugin CLI runs its own installer verbatim rather than being forced through the marketplace path
|
|
36
|
-
|
|
37
|
-
## Out of scope
|
|
38
|
-
|
|
39
|
-
- Curating the catalog, which is an edit to the bundled reference rather than a run of this skill
|
|
40
|
-
- Uninstalling, since an over-triggering plugin is tuned through settings rather than removed
|
|
41
|
-
- Installing anything into a project, which every setup skill but this one does
|
|
42
|
-
- First-time project scaffolding: `setup-init`
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: setup-plugins
|
|
3
|
-
description: Installs curated community and official Claude Code plugins user-scoped on the current machine via the `claude plugin` CLI. Use when asked to "install plugins", "set up plugins", "install the frontend/design/security/debugging plugins", "provision plugins on this machine", or when setting up Claude Code on a new computer. Do NOT use to install toolkit workflow skills, which load live via `--plugin-dir`. Assumes the `claude` CLI is on PATH.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Setup plugins
|
|
7
|
-
|
|
8
|
-
Automates plugin installs by reading the curated catalog, detecting what is already
|
|
9
|
-
installed, and shelling out to the `claude plugin` CLI with `--scope user` so the
|
|
10
|
-
plugins are available in every project on this machine.
|
|
11
|
-
|
|
12
|
-
Domain-knowledge plugins install once per machine. They are not copied into any
|
|
13
|
-
project. Toolkit workflow skills are a separate concern and load live through
|
|
14
|
-
`--plugin-dir`, so never install those here.
|
|
15
|
-
|
|
16
|
-
## Guards
|
|
17
|
-
|
|
18
|
-
- If the `claude` CLI is not on PATH, stop: `❌ claude CLI not found. Install Claude Code first.`
|
|
19
|
-
|
|
20
|
-
## Read the catalog
|
|
21
|
-
|
|
22
|
-
Read the curated list from the skill folder. Use `${CLAUDE_SKILL_DIR}`, which
|
|
23
|
-
expands to this skill's own directory, so the path resolves from any project. Never
|
|
24
|
-
invent plugin names or install strings that are not in it.
|
|
25
|
-
|
|
26
|
-
- `${CLAUDE_SKILL_DIR}/references/plugin-catalog.md`: verified plugins, marketplace sources, and the recommended default set
|
|
27
|
-
|
|
28
|
-
## Detect what is installed
|
|
29
|
-
|
|
30
|
-
Run this to skip plugins already present. Do not reinstall an installed plugin.
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
claude plugin list 2>/dev/null || echo "NONE"
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## Select
|
|
37
|
-
|
|
38
|
-
When plugin names are passed as arguments, install exactly those and skip the prompt.
|
|
39
|
-
|
|
40
|
-
When invoked bare, present the catalog grouped by category with the recommended
|
|
41
|
-
default marked, then ask which to install. Accept a bulk answer:
|
|
42
|
-
|
|
43
|
-
- `recommended`: the default set from the catalog
|
|
44
|
-
- `all`: every catalog row not already installed
|
|
45
|
-
- a specific list of plugin names
|
|
46
|
-
|
|
47
|
-
## Preview
|
|
48
|
-
|
|
49
|
-
Before executing, output:
|
|
50
|
-
|
|
51
|
-
- **Installed:** plugins already present, skipped
|
|
52
|
-
- **To install:** each chosen plugin with its category and marketplace source
|
|
53
|
-
- **Scope:** `user` (every project on this machine)
|
|
54
|
-
- **Commands:** the exact shell commands to run
|
|
55
|
-
|
|
56
|
-
## Execute
|
|
57
|
-
|
|
58
|
-
For each chosen plugin, add its marketplace source if it is not already added, then
|
|
59
|
-
install the plugin user-scoped. Run each install independently so one failure does
|
|
60
|
-
not abort the batch.
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
claude plugin marketplace add <source> 2>/dev/null || true
|
|
64
|
-
claude plugin install <name> --scope user
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
For a catalog entry listed under "Installs outside the claude plugin CLI", skip the
|
|
68
|
-
marketplace step and run its installer command verbatim instead.
|
|
69
|
-
|
|
70
|
-
Claude Code's tool permission dialog is the confirmation gate. Do not pause for a
|
|
71
|
-
separate confirmation.
|
|
72
|
-
|
|
73
|
-
## Response
|
|
74
|
-
|
|
75
|
-
After execution, report:
|
|
76
|
-
|
|
77
|
-
- Plugins installed, each with its marketplace
|
|
78
|
-
- Plugins skipped as already installed
|
|
79
|
-
- Any install that failed, with the CLI error
|
|
80
|
-
- A reload note: installed plugins apply on the next session or after `/reload-plugins`
|
|
81
|
-
- A tuning note: if a plugin over-triggers, set `skillOverrides` in settings to `name-only`, `user-invocable-only`, or `off` rather than uninstalling
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Plugin catalog
|
|
3
|
-
description: Curated community and official Claude Code plugins that setup-plugins installs
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Plugin catalog
|
|
7
|
-
|
|
8
|
-
Curated domain-knowledge plugins the `setup-plugins` skill installs user-scoped.
|
|
9
|
-
Each row is verified to install through the `claude plugin` CLI. This file holds
|
|
10
|
-
only the actionable install data.
|
|
11
|
-
|
|
12
|
-
## Install data
|
|
13
|
-
|
|
14
|
-
Add the marketplace source once, then install the plugin by name. The CLI resolves
|
|
15
|
-
the plugin across added marketplaces, so `<name>@<marketplace>` is only needed to
|
|
16
|
-
disambiguate a name that exists in more than one marketplace.
|
|
17
|
-
|
|
18
|
-
| Plugin | Category | Marketplace source | Why |
|
|
19
|
-
| ------------------- | --------- | ------------------------ | -------------------------------------------------------------------- |
|
|
20
|
-
| `frontend-design` | design | `anthropics/claude-code` | Steers UI generation toward intentional typography, hierarchy, color |
|
|
21
|
-
| `security-guidance` | security | `anthropics/claude-code` | Security-aware authoring guidance during code generation |
|
|
22
|
-
| `code-review` | review | `anthropics/claude-code` | Multi-agent PR review across compliance, bugs, history, and comments |
|
|
23
|
-
| `superpowers` | debugging | `obra/superpowers` | Methodology skills: systematic-debugging, root-cause-tracing |
|
|
24
|
-
|
|
25
|
-
## Recommended default
|
|
26
|
-
|
|
27
|
-
The `design` and `security` categories cover the common gaps for a new machine.
|
|
28
|
-
When the user asks for a recommended set, propose `frontend-design` and
|
|
29
|
-
`security-guidance`. Offer `code-review` and `superpowers` as additions.
|
|
30
|
-
|
|
31
|
-
`code-review` overlaps the toolkit's own `review-branch` skill. They run in
|
|
32
|
-
different places, the plugin on a PR and the toolkit skill on a local diff. Install
|
|
33
|
-
`code-review` only when the user wants the GitHub-side flow too.
|
|
34
|
-
|
|
35
|
-
## Installs outside the claude plugin CLI
|
|
36
|
-
|
|
37
|
-
Some strong plugins do not distribute through a marketplace, so the `claude plugin`
|
|
38
|
-
path does not reach them. List them here with their real installer. Surface them to
|
|
39
|
-
the user during selection, but do not run their install through the marketplace
|
|
40
|
-
step above. Run the installer command verbatim only when the user picks it.
|
|
41
|
-
|
|
42
|
-
| Plugin | Category | Installer | Why |
|
|
43
|
-
| ------------ | -------- | ------------------------------- | ----------------------------------------------------------------- |
|
|
44
|
-
| `impeccable` | design | `npx impeccable skills install` | Curated anti-slop reference files, sharper than `frontend-design` |
|
|
45
|
-
|
|
46
|
-
`npx impeccable skills install` detects the Claude Code harness and installs into
|
|
47
|
-
`.claude/`. It may prompt, so it is not fully non-interactive. After install, run
|
|
48
|
-
`/impeccable init` and reload.
|
|
49
|
-
|
|
50
|
-
Install per project, not per machine. The skill invokes its scripts through paths
|
|
51
|
-
relative to the current project (`.claude/skills/impeccable/scripts/*.mjs`), so a
|
|
52
|
-
copy under `~/.claude/` cannot locate them once the working directory is a
|
|
53
|
-
different project. Re-run the installer in each project that wants impeccable.
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: setup-smoke
|
|
3
|
-
description: Why the heavy scaffold stages need an owner and what heuristic judges a server smoke pass
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Setup smoke requirement
|
|
7
|
-
|
|
8
|
-
## Gap
|
|
9
|
-
|
|
10
|
-
Without this skill, a freshly scaffolded project's dev server, preview server, end-to-end suite, and screenshot harness never run anywhere. `setup-verify` excludes all three for the flakiness reasons that make them wrong for an unattended chain, and names no destination for any of them, so a broken dev server or a missing end-to-end dependency surfaces only once the user hits it by hand.
|
|
11
|
-
|
|
12
|
-
A dev or preview server carries no exit code to read, since it runs until stopped rather than finishing on its own, unlike the leaf scripts `setup-verify` runs. Judging it needs a heuristic rather than a pass/fail read.
|
|
13
|
-
|
|
14
|
-
## Must
|
|
15
|
-
|
|
16
|
-
- Read the scripts the project declares and run only those, skip absent ones
|
|
17
|
-
- Run `dev`, `preview`, `test:e2e`, `screenshot` in that fixed order, stopping at the first failure
|
|
18
|
-
- Judge a server script by running it in the background, waiting a fixed window, checking the process is alive and its output carries no fatal error string, then killing it regardless of the outcome
|
|
19
|
-
- Install dependencies itself when missing, so it runs standalone without `setup-verify` having run first
|
|
20
|
-
|
|
21
|
-
## Must not
|
|
22
|
-
|
|
23
|
-
- Invent a fallback command for an absent script
|
|
24
|
-
- Run a composite script
|
|
25
|
-
- Require `setup-verify` to have passed first
|
|
26
|
-
- Duplicate a leaf script `setup-verify` already runs
|
|
27
|
-
- Get invoked by anything other than a person or a chain naming it directly. Review this at each future change, since nothing can answer it before the skill has run. `canon docs target-projects` states the scaffold chain that keeps it outside the unattended path, for the same flakiness reasons that keep it out of `setup-verify`'s own leaf-script order.
|
|
28
|
-
|
|
29
|
-
## Guards
|
|
30
|
-
|
|
31
|
-
- No `package.json` at the project root stops, since there are no declared scripts to read
|
|
32
|
-
- A missing dependency folder installs first rather than letting every script fail on the same cause
|
|
33
|
-
|
|
34
|
-
## Out of scope
|
|
35
|
-
|
|
36
|
-
- The leaf scripts `setup-verify` already runs: `lint:fix`, `typecheck`, `check`, `test:run`, `build`
|
|
37
|
-
- Generating the configs these scripts drive, which the tooling stack reference owns
|
|
38
|
-
- A true port-probe readiness check, since no manifest key exposes a generic port across stacks
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: setup-smoke
|
|
3
|
-
description: Runs the heavy scaffold checks setup-verify skips - dev and preview server smoke, Playwright end-to-end tests, and the screenshot harness - on the same declared-scripts contract. Use after setup-verify passes, or when asked to "run the smoke tests", "check the dev server", "run e2e against the scaffold", or "run the heavy checks". Do NOT use in place of setup-verify, or on a project without package.json.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Smoke scaffold
|
|
7
|
-
|
|
8
|
-
Runs the local checks a scaffold's leaf scripts cannot cover: whether the dev and preview servers actually start, whether the end-to-end suite passes against a real server, and whether the screenshot harness produces output. Standalone from `setup-verify`. Neither skill requires the other to have run first.
|
|
9
|
-
|
|
10
|
-
## Guards
|
|
11
|
-
|
|
12
|
-
- If `package.json` does not exist at the project root, stop: `❌ No package.json found. Cannot smoke test.`
|
|
13
|
-
- If `node_modules/` does not exist, run `bun install` first, then proceed.
|
|
14
|
-
|
|
15
|
-
## Step 1: read scripts
|
|
16
|
-
|
|
17
|
-
Read `package.json` from the project root and extract the `scripts` block. Do not hardcode script names.
|
|
18
|
-
|
|
19
|
-
## Step 2: run the chain
|
|
20
|
-
|
|
21
|
-
Run the scripts below in order. Stop on the first failure and surface the error.
|
|
22
|
-
|
|
23
|
-
| Order | Script | Skip if | How judged |
|
|
24
|
-
| ----- | ------------ | ------- | ----------------------- |
|
|
25
|
-
| 1 | `dev` | absent | server smoke, see below |
|
|
26
|
-
| 2 | `preview` | absent | server smoke, see below |
|
|
27
|
-
| 3 | `test:e2e` | absent | leaf script: exit code |
|
|
28
|
-
| 4 | `screenshot` | absent | leaf script: exit code |
|
|
29
|
-
|
|
30
|
-
Skip any script not present in `package.json`. Do not invent a fallback command. Run each leaf script as `bun run <script>` from the project root.
|
|
31
|
-
|
|
32
|
-
### Server smoke
|
|
33
|
-
|
|
34
|
-
`dev` and `preview` run until stopped, so there is no exit code to read. Start the script backgrounded, wait 5 seconds, then check two things: the process is still running, and its captured output carries no string matching `error`, `Error`, or `fatal`. Kill the process either way once judged. Report a failure on either check failing.
|
|
35
|
-
|
|
36
|
-
This is weaker than a real readiness probe. No manifest key exposes a generic port to poll across stacks, so port-probing is out of reach here.
|
|
37
|
-
|
|
38
|
-
## Step 3: report
|
|
39
|
-
|
|
40
|
-
For each script run, report one of:
|
|
41
|
-
|
|
42
|
-
- `✅ <script>`
|
|
43
|
-
- `❌ <script>` followed by the failing output (last 40 lines) or, for a server script, the reason judged (process died, or a fatal string in its output)
|
|
44
|
-
|
|
45
|
-
End with a summary line:
|
|
46
|
-
|
|
47
|
-
- On pass: `✅ Scaffold smoke-tested (<n> scripts passed).`
|
|
48
|
-
- On fail: `❌ Scaffold failed at <script>. Fix the error and re-run setup-smoke.`
|
|
49
|
-
|
|
50
|
-
## Out of scope
|
|
51
|
-
|
|
52
|
-
- `lint:fix`, `typecheck`, `check`, `test:run`, `build`. Those are `canon:setup-verify`'s leaf-script chain.
|
|
53
|
-
- Generating the configs these scripts drive, which the tooling stack reference owns.
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: setup-verify
|
|
3
|
-
description: Why a fresh scaffold is checked with declared leaf scripts in a fixed order, and what the excluded stages would cost
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Setup verify requirement
|
|
7
|
-
|
|
8
|
-
## Gap
|
|
9
|
-
|
|
10
|
-
Without this skill, a freshly scaffolded project is handed over on the strength of the configs looking right, and the first typo surfaces when the user runs something. A scaffold is generated from a reference, so the errors it carries are wiring mistakes and missing dependencies, both of which any script run would have caught.
|
|
11
|
-
|
|
12
|
-
The naive check fails two ways. A session that assumes script names runs `test` against a stack that exposes `test:run`, or invents a fallback command when a script is absent, and either result reports on something the project never declared. A session that runs a composite script gets one failure covering several stages, so the output names the wrapper rather than the break.
|
|
13
|
-
|
|
14
|
-
The stages left out are the ones that lie, and each now has an owner in `canon:setup-smoke` rather than nowhere at all. A dev server or a preview reads as failed when it starts slowly, a browser test needs an install and a running server before it can even fail correctly, and a CI workflow cannot be judged locally at all. Including any of them turns a scaffold check into a flaky one, and a flaky check gets ignored.
|
|
15
|
-
|
|
16
|
-
## Must
|
|
17
|
-
|
|
18
|
-
- Read the scripts the project declares and run only those
|
|
19
|
-
- Run leaf scripts in a fixed order, so a failure points at the exact stage that broke
|
|
20
|
-
- Stop at the first failure and surface its output rather than continuing to collect more
|
|
21
|
-
- Report per script and close with one summary line naming the failing stage when there is one
|
|
22
|
-
|
|
23
|
-
## Must not
|
|
24
|
-
|
|
25
|
-
- Invent a fallback command for an absent script. Skip it.
|
|
26
|
-
- Run a composite script, which hides which stage broke
|
|
27
|
-
- Run a dev server, a preview, or a browser test
|
|
28
|
-
|
|
29
|
-
## Guards
|
|
30
|
-
|
|
31
|
-
- No `package.json` at the project root stops, since there are no declared scripts to read
|
|
32
|
-
- A missing dependency folder installs first rather than letting every script fail on the same cause
|
|
33
|
-
|
|
34
|
-
## Out of scope
|
|
35
|
-
|
|
36
|
-
- Dev and preview smoke tests, which `project-commands` starts on request and `canon:setup-smoke` checks automatically
|
|
37
|
-
- Browser end-to-end tests, which need a browser install and a running server, covered by `canon:setup-smoke`
|
|
38
|
-
- CI workflow validation, which runs on the pull request rather than locally. `canon:setup-smoke` runs the same stages locally as the closest proxy
|
|
39
|
-
- Generating the configs it checks, which the tooling stack reference owns
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: setup-verify
|
|
3
|
-
description: Verifies a freshly scaffolded project by running its `package.json` scripts in order and reporting pass/fail per script. Use after the agent has followed a tooling stack reference and generated configs, or when asked to "verify the scaffold", "check the setup", "run verify", or "make sure everything works". Do NOT use on a project without `package.json`, or to run E2E or dev servers.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Verify scaffold
|
|
7
|
-
|
|
8
|
-
Runs the local verification chain against a freshly scaffolded project. Catches config typos, missing deps, and wiring mistakes before the user ever sees them.
|
|
9
|
-
|
|
10
|
-
## Guards
|
|
11
|
-
|
|
12
|
-
- If `package.json` does not exist at the project root, stop: `❌ No package.json found. Cannot verify.`
|
|
13
|
-
- If `node_modules/` does not exist, run `bun install` first, then proceed.
|
|
14
|
-
|
|
15
|
-
## Step 1: read scripts
|
|
16
|
-
|
|
17
|
-
Read `package.json` from the project root and extract the `scripts` block. Do not hardcode script names. Different stacks expose different scripts.
|
|
18
|
-
|
|
19
|
-
## Step 2: run the chain
|
|
20
|
-
|
|
21
|
-
Run the scripts below in order. Stop on the first failure and surface the error. Each script is a leaf command so failures point at the exact break.
|
|
22
|
-
|
|
23
|
-
| Order | Script | Skip if |
|
|
24
|
-
| ----- | ----------- | --------------------------- |
|
|
25
|
-
| 1 | `lint:fix` | absent |
|
|
26
|
-
| 2 | `typecheck` | absent |
|
|
27
|
-
| 3 | `check` | absent |
|
|
28
|
-
| 4 | `test:run` | absent, fall back to `test` |
|
|
29
|
-
| 5 | `build` | absent |
|
|
30
|
-
|
|
31
|
-
Skip any script not present in `package.json`. Do not invent a fallback command. Do not run composite scripts like `check:full`. Do not run `dev`, `preview`, `test:e2e`, `test:ui`, `screenshot`.
|
|
32
|
-
|
|
33
|
-
Run each as `bun run <script>` from the project root.
|
|
34
|
-
|
|
35
|
-
## Step 3: report
|
|
36
|
-
|
|
37
|
-
For each script run, report one of:
|
|
38
|
-
|
|
39
|
-
- `✅ <script>`
|
|
40
|
-
- `❌ <script>` followed by the failing output (last 40 lines)
|
|
41
|
-
|
|
42
|
-
End with a summary line:
|
|
43
|
-
|
|
44
|
-
- On pass: `✅ Scaffold verified (<n> scripts passed).`
|
|
45
|
-
- On fail: `❌ Scaffold failed at <script>. Fix the error and re-run setup-verify.`
|
|
46
|
-
|
|
47
|
-
## Out of scope
|
|
48
|
-
|
|
49
|
-
- Dev server and preview server smoke tests. Too flaky for a scaffold check, where a slow start reads as a failure. Use `project-commands` to start one on request, or `canon:setup-smoke` to check both automatically.
|
|
50
|
-
- Playwright E2E tests. Require browser install and a running server. Use `canon:setup-smoke`.
|
|
51
|
-
- CI workflow validation. Runs in GitHub Actions on PR, not locally. `canon:setup-smoke` runs the same end-to-end and screenshot stages locally, as the closest proxy.
|