create-claude-cabinet 0.12.1 → 0.13.1
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/lib/cli.js +43 -2
- package/package.json +1 -1
- package/templates/README.md +4 -4
- package/templates/cabinet/_cabinet-member-template.md +165 -0
- package/templates/cabinet/directives-project.yaml +2 -2
- package/templates/cabinet/lifecycle.md +13 -4
- package/templates/cabinet/prompt-guide.md +12 -5
- package/templates/skills/cabinet-accessibility/SKILL.md +130 -47
- package/templates/skills/cabinet-anti-confirmation/SKILL.md +22 -0
- package/templates/skills/cabinet-architecture/SKILL.md +24 -0
- package/templates/skills/cabinet-boundary-man/SKILL.md +77 -57
- package/templates/skills/cabinet-cc-health/SKILL.md +23 -0
- package/templates/skills/cabinet-data-integrity/SKILL.md +23 -0
- package/templates/skills/cabinet-debugger/SKILL.md +24 -0
- package/templates/skills/cabinet-framework-quality/SKILL.md +112 -17
- package/templates/skills/cabinet-goal-alignment/SKILL.md +22 -0
- package/templates/skills/cabinet-historian/SKILL.md +23 -0
- package/templates/skills/cabinet-information-design/SKILL.md +22 -0
- package/templates/skills/cabinet-mantine-quality/SKILL.md +22 -0
- package/templates/skills/cabinet-organized-mind/SKILL.md +22 -0
- package/templates/skills/cabinet-process-therapist/SKILL.md +22 -0
- package/templates/skills/cabinet-qa/SKILL.md +22 -0
- package/templates/skills/cabinet-record-keeper/SKILL.md +22 -0
- package/templates/skills/cabinet-roster-check/SKILL.md +22 -0
- package/templates/skills/cabinet-security/SKILL.md +131 -59
- package/templates/skills/cabinet-small-screen/SKILL.md +22 -0
- package/templates/skills/cabinet-speed-freak/SKILL.md +130 -53
- package/templates/skills/cabinet-system-advocate/SKILL.md +22 -0
- package/templates/skills/cabinet-technical-debt/SKILL.md +129 -23
- package/templates/skills/cabinet-ui-experimentalist/SKILL.md +22 -0
- package/templates/skills/cabinet-usability/SKILL.md +22 -0
- package/templates/skills/cabinet-user-advocate/SKILL.md +22 -0
- package/templates/skills/cabinet-vision/SKILL.md +22 -0
- package/templates/skills/cabinet-workflow-cop/SKILL.md +22 -0
- package/templates/skills/{extract → cc-extract}/SKILL.md +6 -6
- package/templates/skills/cc-feedback/SKILL.md +94 -0
- package/templates/skills/{link → cc-link}/SKILL.md +5 -5
- package/templates/skills/{publish → cc-publish}/SKILL.md +5 -6
- package/templates/skills/{unlink → cc-unlink}/SKILL.md +3 -3
- package/templates/skills/cc-upgrade/SKILL.md +23 -0
- package/templates/skills/debrief/SKILL.md +34 -16
- package/templates/skills/debrief/phases/audit-pattern-capture.md +80 -0
- package/templates/skills/debrief/phases/upstream-feedback.md +53 -5
- package/templates/skills/menu/SKILL.md +15 -5
- package/templates/skills/seed/phases/build-member.md +21 -8
- package/templates/skills/validate/phases/validators.md +56 -0
package/lib/cli.js
CHANGED
|
@@ -266,6 +266,11 @@ function generateSkillIndex(projectDir) {
|
|
|
266
266
|
entry.directives = fm.directives;
|
|
267
267
|
}
|
|
268
268
|
|
|
269
|
+
// Tools (declared capabilities for audit/plan member selection)
|
|
270
|
+
if (Array.isArray(fm.tools)) {
|
|
271
|
+
entry.tools = fm.tools;
|
|
272
|
+
}
|
|
273
|
+
|
|
269
274
|
// Merge project directive overlay (if any)
|
|
270
275
|
const overlay = projectDirectives[dir.name];
|
|
271
276
|
if (overlay) {
|
|
@@ -284,6 +289,42 @@ function generateSkillIndex(projectDir) {
|
|
|
284
289
|
entries.push(entry);
|
|
285
290
|
}
|
|
286
291
|
|
|
292
|
+
// Index plugin skills if .claude-plugin/plugin.json exists
|
|
293
|
+
const pluginFile = path.join(projectDir, '.claude-plugin', 'plugin.json');
|
|
294
|
+
if (fs.existsSync(pluginFile)) {
|
|
295
|
+
try {
|
|
296
|
+
const pluginDef = JSON.parse(fs.readFileSync(pluginFile, 'utf8'));
|
|
297
|
+
const pluginSkills = pluginDef.skills || [];
|
|
298
|
+
for (const skillPath of pluginSkills) {
|
|
299
|
+
const skillFile = path.join(projectDir, skillPath, 'SKILL.md');
|
|
300
|
+
if (!fs.existsSync(skillFile)) continue;
|
|
301
|
+
|
|
302
|
+
const content = fs.readFileSync(skillFile, 'utf8');
|
|
303
|
+
const fm = parseFrontmatter(content);
|
|
304
|
+
if (!fm || !fm.name) continue;
|
|
305
|
+
|
|
306
|
+
let shortDesc = (fm.description || '').replace(/\s*Use when:.*$/is, '').trim();
|
|
307
|
+
const sentenceEnd = shortDesc.match(/\.\s/);
|
|
308
|
+
if (sentenceEnd) shortDesc = shortDesc.slice(0, sentenceEnd.index + 1);
|
|
309
|
+
|
|
310
|
+
const entry = {
|
|
311
|
+
name: fm.name,
|
|
312
|
+
path: `${skillPath}/SKILL.md`,
|
|
313
|
+
description: shortDesc,
|
|
314
|
+
type: 'plugin',
|
|
315
|
+
source: pluginDef.name || 'plugin',
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
if (fm['disable-model-invocation'] === 'true') entry.manual = true;
|
|
319
|
+
if (fm['user-invocable'] === 'false') entry.userInvocable = false;
|
|
320
|
+
|
|
321
|
+
entries.push(entry);
|
|
322
|
+
}
|
|
323
|
+
} catch (e) {
|
|
324
|
+
console.warn(` Warning: could not parse ${pluginFile}: ${e.message}`);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
287
328
|
entries.sort((a, b) => a.name.localeCompare(b.name));
|
|
288
329
|
|
|
289
330
|
const index = {
|
|
@@ -373,7 +414,7 @@ const MODULES = {
|
|
|
373
414
|
mandatory: false,
|
|
374
415
|
default: true,
|
|
375
416
|
lean: true,
|
|
376
|
-
templates: ['skills/onboard', 'skills/seed', 'skills/cc-upgrade', 'skills/link', 'skills/unlink', 'skills/extract'],
|
|
417
|
+
templates: ['skills/onboard', 'skills/seed', 'skills/cc-upgrade', 'skills/cc-link', 'skills/cc-unlink', 'skills/cc-extract', 'skills/cc-feedback'],
|
|
377
418
|
},
|
|
378
419
|
'validate': {
|
|
379
420
|
name: 'Validate',
|
|
@@ -755,7 +796,7 @@ async function run() {
|
|
|
755
796
|
// Note: publish is CC-source-repo-only, not shipped to consumers.
|
|
756
797
|
const alwaysCopyPhases = [
|
|
757
798
|
'skills/onboard', 'skills/seed',
|
|
758
|
-
'skills/cc-upgrade', 'skills/extract',
|
|
799
|
+
'skills/cc-upgrade', 'skills/cc-extract',
|
|
759
800
|
];
|
|
760
801
|
const isSkill = tmpl.startsWith('skills/') && !alwaysCopyPhases.some(p => tmpl.startsWith(p));
|
|
761
802
|
const results = await copyTemplates(srcPath, destPath, {
|
package/package.json
CHANGED
package/templates/README.md
CHANGED
|
@@ -40,20 +40,20 @@ templates, see [EXTENSIONS.md](EXTENSIONS.md).
|
|
|
40
40
|
| `skills/debrief-quick/` | Quick debrief variant — core phases only, skip presentation. |
|
|
41
41
|
| `skills/execute/` | Execute a plan with cabinet member checkpoints. 3-checkpoint protocol (pre-implementation, per-file-group, pre-commit). 5 phase files. |
|
|
42
42
|
| `skills/execute-plans/` | Batch execution of multiple plans with conflict detection. |
|
|
43
|
-
| `skills/extract/` | Analyze project artifacts and propose upstream extraction candidates for Claude Cabinet. |
|
|
43
|
+
| `skills/cc-extract/` | Analyze project artifacts and propose upstream extraction candidates for Claude Cabinet. |
|
|
44
44
|
| `skills/investigate/` | Structured codebase exploration: frame, observe, hypothesize, test, conclude. |
|
|
45
|
-
| `skills/link/` | Set up local development linking for Claude Cabinet source repo work. |
|
|
45
|
+
| `skills/cc-link/` | Set up local development linking for Claude Cabinet source repo work. |
|
|
46
46
|
| `skills/memory/` | Browse, search, and manage semantic memory via omega. |
|
|
47
47
|
| `skills/menu/` | Dynamically discover and display all available skills. Reads from `_index.json`. |
|
|
48
48
|
| `skills/onboard/` | Conversational onboarding. Interviews you, generates briefings, wires the session loop. Re-runnable. 8 phase files. |
|
|
49
49
|
| `skills/orient/` | Session start. Load context, sync data, scan work, run health checks, spawn cabinet consultations, show skills menu. 7 phase files. |
|
|
50
50
|
| `skills/orient-quick/` | Quick orient variant — core phases only, skip presentation. |
|
|
51
51
|
| `skills/plan/` | Structured planning with cabinet critique. Research, overlap check, draft, critique, completeness, present, file. 9 phase files. |
|
|
52
|
-
| `skills/publish/` | Publish workflow (CC source repo only, not shipped to consumers). |
|
|
52
|
+
| `skills/cc-publish/` | Publish workflow (CC source repo only, not shipped to consumers). |
|
|
53
53
|
| `skills/pulse/` | Self-description accuracy check. Count freshness, dead references, staleness. 3 phase files. |
|
|
54
54
|
| `skills/seed/` | Recruit new cabinet members. Detect technology signals, propose expertise, build collaboratively. 4 phase files. |
|
|
55
55
|
| `skills/triage-audit/` | Audit finding triage via local web UI or CLI. Load, present, apply verdicts. 3 phase files. |
|
|
56
|
-
| `skills/unlink/` | Remove local development linking. Returns to published npm package. |
|
|
56
|
+
| `skills/cc-unlink/` | Remove local development linking. Returns to published npm package. |
|
|
57
57
|
| `skills/validate/` | Run structural validation checks. Validators defined in phase files. |
|
|
58
58
|
| `skills/work-tracker/` | Open the work tracking UI interactively. Starts local server. |
|
|
59
59
|
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# Cabinet Member Template
|
|
2
|
+
|
|
3
|
+
Use this template when creating new cabinet members via `/seed` or
|
|
4
|
+
manually. Every section is required unless marked optional. The structure
|
|
5
|
+
ensures consistent quality across the cabinet and enables validation.
|
|
6
|
+
|
|
7
|
+
## Reference Implementation
|
|
8
|
+
|
|
9
|
+
See `cabinet-security/SKILL.md` for a fully upgraded example showing
|
|
10
|
+
all sections in practice.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Required Frontmatter
|
|
15
|
+
|
|
16
|
+
```yaml
|
|
17
|
+
---
|
|
18
|
+
name: cabinet-{name}
|
|
19
|
+
description: >
|
|
20
|
+
One sentence: what this member evaluates and why it matters.
|
|
21
|
+
Start with a role noun ("Security engineer who...", "Performance
|
|
22
|
+
analyst who...", "Data coherence analyst who...").
|
|
23
|
+
user-invocable: false
|
|
24
|
+
briefing:
|
|
25
|
+
- _briefing-identity.md
|
|
26
|
+
# Add other briefing files relevant to this member's domain
|
|
27
|
+
# Common: _briefing-architecture.md, _briefing-jurisdictions.md, _briefing-api.md
|
|
28
|
+
standing-mandate: audit
|
|
29
|
+
# Add plan, execute, orient, debrief if this member should activate
|
|
30
|
+
# in those contexts. Most members are audit-only.
|
|
31
|
+
tools:
|
|
32
|
+
# List every external tool/command this member uses.
|
|
33
|
+
# Format: "tool-name (scope -- what it does)"
|
|
34
|
+
# Examples:
|
|
35
|
+
# - npm audit (Node projects -- dependency vulnerabilities)
|
|
36
|
+
# - sqlite3 (SQLite projects -- index coverage, EXPLAIN QUERY PLAN)
|
|
37
|
+
# - grep patterns (all projects -- dead code detection)
|
|
38
|
+
# Use "tools: []" for pure-reasoning members with no tool stage.
|
|
39
|
+
directives:
|
|
40
|
+
# Only if standing-mandate includes plan, execute, orient, or debrief.
|
|
41
|
+
# Each directive is a one-sentence focused task for that context.
|
|
42
|
+
# plan: >
|
|
43
|
+
# What to evaluate when reviewing a plan.
|
|
44
|
+
# execute: >
|
|
45
|
+
# What to watch for during code execution.
|
|
46
|
+
---
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Required Sections (in order)
|
|
50
|
+
|
|
51
|
+
### 1. Identity
|
|
52
|
+
|
|
53
|
+
Who this expert is. What they care about. What threat model or quality
|
|
54
|
+
dimension they evaluate. One role, bounded scope, specific to the
|
|
55
|
+
project's actual risk profile.
|
|
56
|
+
|
|
57
|
+
Include:
|
|
58
|
+
- The expert's perspective in **bold** ("You are a **security engineer**
|
|
59
|
+
thinking about...")
|
|
60
|
+
- The bounded threat model or quality dimension
|
|
61
|
+
- What this is NOT about (calibrate expectations)
|
|
62
|
+
|
|
63
|
+
### 2. Convening Criteria
|
|
64
|
+
|
|
65
|
+
When this member activates:
|
|
66
|
+
- `standing-mandate` contexts
|
|
67
|
+
- File patterns that trigger activation
|
|
68
|
+
- Topic keywords
|
|
69
|
+
- Any mandatory-for triggers (e.g., "all plans that add API endpoints")
|
|
70
|
+
|
|
71
|
+
### 3. Investigation Protocol
|
|
72
|
+
|
|
73
|
+
**Two stages: measure first, then reason.**
|
|
74
|
+
|
|
75
|
+
#### Stage 1: Instrument
|
|
76
|
+
|
|
77
|
+
Concrete commands to run. Each tool is optional — include an explicit
|
|
78
|
+
fallback for when the tool is unavailable:
|
|
79
|
+
|
|
80
|
+
```markdown
|
|
81
|
+
**1a. [Check name]**
|
|
82
|
+
|
|
83
|
+
\`\`\`bash
|
|
84
|
+
# The command to run
|
|
85
|
+
tool-name --flags 2>/dev/null
|
|
86
|
+
\`\`\`
|
|
87
|
+
|
|
88
|
+
Parse output and flag [specific conditions]. If [tool] is unavailable:
|
|
89
|
+
[manual fallback — what to grep, read, or check instead].
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Rules:
|
|
93
|
+
- Every tool reference MUST have an "if unavailable" fallback
|
|
94
|
+
- Fallbacks should be grep patterns, file reading, or manual checklists
|
|
95
|
+
- The member must produce useful findings with zero tools available
|
|
96
|
+
- Include a "Stage 1 results" summary template
|
|
97
|
+
|
|
98
|
+
#### Stage 2: Analyze
|
|
99
|
+
|
|
100
|
+
Manual code reading and reasoning informed by Stage 1 results. This is
|
|
101
|
+
where domain expertise matters — tools find candidates, analysis
|
|
102
|
+
confirms and contextualizes them.
|
|
103
|
+
|
|
104
|
+
Group analysis areas with clear labels (2a, 2b, 2c...). Reference
|
|
105
|
+
relevant standards by number where applicable (OWASP, WCAG, etc.).
|
|
106
|
+
|
|
107
|
+
### 4. Scan Scope
|
|
108
|
+
|
|
109
|
+
What files and directories to examine. Reference `_briefing.md` for
|
|
110
|
+
project-specific paths. Use comments to tell consuming projects where
|
|
111
|
+
to customize.
|
|
112
|
+
|
|
113
|
+
### 5. Portfolio Boundaries
|
|
114
|
+
|
|
115
|
+
What this member does NOT own. Name the other cabinet member responsible
|
|
116
|
+
for each excluded area. This prevents overlap and scope creep.
|
|
117
|
+
|
|
118
|
+
Format: "X concerns (that's {other-member})"
|
|
119
|
+
|
|
120
|
+
### 6. Calibration Examples
|
|
121
|
+
|
|
122
|
+
2-4 examples at different severities showing what a finding looks like.
|
|
123
|
+
Include at least one "not a finding" and one "wrong portfolio" example
|
|
124
|
+
to anchor the boundaries.
|
|
125
|
+
|
|
126
|
+
### 7. Historically Problematic Patterns
|
|
127
|
+
|
|
128
|
+
Two-file overlay:
|
|
129
|
+
|
|
130
|
+
```markdown
|
|
131
|
+
## Historically Problematic Patterns
|
|
132
|
+
|
|
133
|
+
Two sources — read both and merge at runtime:
|
|
134
|
+
|
|
135
|
+
1. **This section** (upstream, CC-owned) — universal patterns that apply to
|
|
136
|
+
any project. Grows when consuming projects promote recurring findings
|
|
137
|
+
via field-feedback.
|
|
138
|
+
2. **`patterns-project.md`** in this skill's directory — project-specific
|
|
139
|
+
patterns discovered during audits of this particular project. Project-
|
|
140
|
+
owned, never overwritten by CC upgrades.
|
|
141
|
+
|
|
142
|
+
If `patterns-project.md` exists, read it alongside this section. Both
|
|
143
|
+
inform your analysis equally.
|
|
144
|
+
|
|
145
|
+
**How patterns get here:** A consuming project's audit finds a real issue.
|
|
146
|
+
If the same pattern recurs across projects, it gets promoted upstream via
|
|
147
|
+
field-feedback. The CC maintainer adds it to this section. Project-specific
|
|
148
|
+
patterns that don't generalize stay in `patterns-project.md`.
|
|
149
|
+
|
|
150
|
+
<!-- Universal patterns below this line -->
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
This section starts empty for new members. It accumulates from real
|
|
154
|
+
findings over time — never pre-fill with hypothetical patterns.
|
|
155
|
+
|
|
156
|
+
## Optional Sections
|
|
157
|
+
|
|
158
|
+
- **directives** (frontmatter) — only if the member activates in
|
|
159
|
+
non-audit contexts
|
|
160
|
+
- **activation** (frontmatter) — file patterns and topic keywords,
|
|
161
|
+
if different from convening criteria
|
|
162
|
+
- **Knowledge Sources** — if the member uses MCP servers, WebSearch,
|
|
163
|
+
or framework documentation
|
|
164
|
+
- **interactive-only** (frontmatter) — set to `true` if the member
|
|
165
|
+
requires preview tools or a running dev server
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
# Format:
|
|
16
16
|
#
|
|
17
17
|
# cabinet-record-keeper:
|
|
18
|
-
# standing-mandate: [publish]
|
|
18
|
+
# standing-mandate: [cc-publish]
|
|
19
19
|
# directives:
|
|
20
|
-
# publish: >
|
|
20
|
+
# cc-publish: >
|
|
21
21
|
# Check all docs for staleness and missing additions
|
|
22
22
|
# before the version is published.
|
|
23
23
|
#
|
|
@@ -76,16 +76,25 @@ audits where it doesn't belong, and miss unassigned contexts where it does.
|
|
|
76
76
|
|
|
77
77
|
## Creating a New Cabinet Member
|
|
78
78
|
|
|
79
|
-
A cabinet member is a skill with `user-invocable: false`.
|
|
80
|
-
`.claude/
|
|
79
|
+
A cabinet member is a skill with `user-invocable: false`. Use the
|
|
80
|
+
template at `.claude/cabinet/_cabinet-member-template.md` for the
|
|
81
|
+
required structure. Create in `.claude/skills/cabinet-{name}/SKILL.md`
|
|
82
|
+
with:
|
|
81
83
|
|
|
82
84
|
1. **Identity** — who is this expert? What do they care about?
|
|
83
85
|
2. **Convening Criteria** — `standing-mandate`, `files`, `topics`
|
|
84
|
-
3. **
|
|
85
|
-
|
|
86
|
+
3. **Investigation Protocol** — two-stage: Stage 1 (Instrument) runs
|
|
87
|
+
automated tools with explicit "if unavailable" fallbacks, Stage 2
|
|
88
|
+
(Analyze) does manual reasoning informed by Stage 1 results
|
|
86
89
|
4. **Boundaries** — what this cabinet member does NOT own (prevents overlap)
|
|
87
90
|
5. **Calibration Examples** — good findings, wrong-portfolio findings, severity
|
|
88
91
|
anchors
|
|
92
|
+
6. **Historically Problematic Patterns** — two-file overlay: upstream
|
|
93
|
+
section (CC-owned) + `patterns-project.md` (project-owned)
|
|
94
|
+
|
|
95
|
+
Required frontmatter: `name`, `description`, `user-invocable: false`,
|
|
96
|
+
`briefing`, `standing-mandate`, `tools` (list every tool the member
|
|
97
|
+
uses; `tools: []` for pure-reasoning members).
|
|
89
98
|
|
|
90
99
|
Add the cabinet member to your `committees-project.yaml` under the appropriate
|
|
91
100
|
committee (using `additional_members` to append to an upstream committee, or
|
|
@@ -146,8 +146,9 @@ Forcing premature classification degrades the taxonomy. The
|
|
|
146
146
|
"uncategorized" state is legitimate infrastructure, not technical debt.
|
|
147
147
|
|
|
148
148
|
### 16. Affordances in Skill Templates
|
|
149
|
-
The template structure (Identity → Convening Criteria →
|
|
150
|
-
→ Boundaries → Calibration Examples
|
|
149
|
+
The template structure (Identity → Convening Criteria → Investigation Protocol
|
|
150
|
+
→ Boundaries → Calibration Examples → Historically Problematic Patterns) is
|
|
151
|
+
itself an affordance system.
|
|
151
152
|
Each section tells the agent *how to use the skill* without needing
|
|
152
153
|
external memory. If a new skill requires reading documentation outside
|
|
153
154
|
itself to be invoked correctly, the template has failed.
|
|
@@ -244,9 +245,11 @@ Files: glob patterns that trigger this cabinet member (also in frontmatter `file
|
|
|
244
245
|
Topics: keywords that trigger this cabinet member (also in frontmatter `topics`)
|
|
245
246
|
Standing-mandate: which contexts always activate this cabinet member (frontmatter `standing-mandate`)
|
|
246
247
|
|
|
247
|
-
##
|
|
248
|
-
|
|
249
|
-
|
|
248
|
+
## Investigation Protocol
|
|
249
|
+
Two-stage investigation: Stage 1 (Instrument) runs automated tools with
|
|
250
|
+
explicit "if unavailable" fallbacks. Stage 2 (Analyze) does manual
|
|
251
|
+
reasoning informed by Stage 1 results. Every member works in every
|
|
252
|
+
project regardless of available tooling.
|
|
250
253
|
|
|
251
254
|
## Boundaries
|
|
252
255
|
What you do NOT examine. Which other cabinet members own it.
|
|
@@ -254,6 +257,10 @@ What you do NOT examine. Which other cabinet members own it.
|
|
|
254
257
|
## Calibration Examples
|
|
255
258
|
Plain-text observations (not JSON) showing the kind of things
|
|
256
259
|
this cabinet member notices.
|
|
260
|
+
|
|
261
|
+
## Historically Problematic Patterns
|
|
262
|
+
Two-file overlay: upstream section (CC-owned, universal) +
|
|
263
|
+
`patterns-project.md` (project-owned, never overwritten on upgrade).
|
|
257
264
|
```
|
|
258
265
|
|
|
259
266
|
## Common Failure Modes
|
|
@@ -9,6 +9,10 @@ user-invocable: false
|
|
|
9
9
|
briefing:
|
|
10
10
|
- _briefing-identity.md
|
|
11
11
|
- _briefing-jurisdictions.md
|
|
12
|
+
tools:
|
|
13
|
+
- axe-core (web projects -- via preview_eval CDN injection)
|
|
14
|
+
- preview_snapshot (web projects -- accessibility tree inspection)
|
|
15
|
+
- preview_inspect (web projects -- computed style contrast ratios)
|
|
12
16
|
activation:
|
|
13
17
|
standing-mandate: audit
|
|
14
18
|
files:
|
|
@@ -50,7 +54,12 @@ screen readers, or other assistive technology.
|
|
|
50
54
|
- Color contrast concerns
|
|
51
55
|
- Always active during audit runs
|
|
52
56
|
|
|
53
|
-
##
|
|
57
|
+
## Investigation Protocol
|
|
58
|
+
|
|
59
|
+
**Two stages: measure first, then reason.** Run automated tools to establish
|
|
60
|
+
a baseline before manual testing. Every tool is optional — if preview tools
|
|
61
|
+
aren't available (non-web project, no dev server), use the code-reading
|
|
62
|
+
fallback. The member produces useful findings either way.
|
|
54
63
|
|
|
55
64
|
### Knowledge Sources
|
|
56
65
|
|
|
@@ -62,79 +71,132 @@ Use WebSearch to check current WCAG 2.2 guidelines when evaluating
|
|
|
62
71
|
specific criteria. Search `site:w3.org/WAI` for authoritative guidance.
|
|
63
72
|
Don't guess about compliance levels — verify.
|
|
64
73
|
|
|
65
|
-
###
|
|
74
|
+
### Stage 1: Instrument
|
|
75
|
+
|
|
76
|
+
Run automated accessibility checks if preview tools are available.
|
|
77
|
+
|
|
78
|
+
**1a. axe-core automated scan**
|
|
66
79
|
|
|
67
|
-
|
|
80
|
+
Start the dev server with `preview_start`, then inject axe-core via
|
|
81
|
+
`preview_eval`:
|
|
68
82
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
83
|
+
```javascript
|
|
84
|
+
// Load axe-core from CDN and run full scan
|
|
85
|
+
const script = document.createElement('script');
|
|
86
|
+
script.src = 'https://cdnjs.cloudflare.com/ajax/libs/axe-core/4.10.2/axe.min.js';
|
|
87
|
+
script.onload = () => {
|
|
88
|
+
axe.run().then(results => {
|
|
89
|
+
console.log('axe-core violations:', results.violations.length);
|
|
90
|
+
results.violations.forEach(v => {
|
|
91
|
+
console.log(`[${v.impact}] ${v.id}: ${v.description} (${v.nodes.length} instances)`);
|
|
92
|
+
console.log(` WCAG: ${v.tags.filter(t => t.startsWith('wcag')).join(', ')}`);
|
|
93
|
+
});
|
|
94
|
+
console.log('axe-core passes:', results.passes.length);
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
document.head.appendChild(script);
|
|
98
|
+
```
|
|
77
99
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
100
|
+
Parse violations by impact level (critical, serious, moderate, minor).
|
|
101
|
+
axe-core catches ~57% of WCAG violations automatically — use this as
|
|
102
|
+
a baseline, not a complete assessment.
|
|
103
|
+
|
|
104
|
+
**1b. Accessibility tree inspection**
|
|
105
|
+
|
|
106
|
+
Use `preview_snapshot` to capture the accessibility tree. Check:
|
|
81
107
|
- Do all interactive elements have accessible names?
|
|
82
|
-
-
|
|
83
|
-
- Are form fields
|
|
84
|
-
-
|
|
85
|
-
|
|
108
|
+
- Is the heading hierarchy logical (h1 → h2 → h3, no skips)?
|
|
109
|
+
- Are form fields associated with labels?
|
|
110
|
+
- Are landmarks (`main`, `nav`, `aside`) present?
|
|
111
|
+
|
|
112
|
+
**1c. Contrast measurement**
|
|
113
|
+
|
|
114
|
+
Use `preview_inspect` with computed styles to check contrast ratios on
|
|
115
|
+
key elements (headings, body text, interactive controls, placeholder text).
|
|
116
|
+
|
|
117
|
+
### Stage 1 fallback (no preview tools)
|
|
118
|
+
|
|
119
|
+
If this is a non-web project or preview tools aren't available, scan
|
|
120
|
+
source code directly:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
# Find interactive elements missing aria-label
|
|
124
|
+
grep -rn --include='*.tsx' --include='*.jsx' \
|
|
125
|
+
'<button\|<Button\|<IconButton' src/ | grep -v 'aria-label'
|
|
126
|
+
|
|
127
|
+
# Find images missing alt text
|
|
128
|
+
grep -rn --include='*.tsx' --include='*.jsx' \
|
|
129
|
+
'<img\|<Image' src/ | grep -v 'alt='
|
|
130
|
+
|
|
131
|
+
# Find heading hierarchy (check for skips)
|
|
132
|
+
grep -rn --include='*.tsx' --include='*.jsx' \
|
|
133
|
+
'<h[1-6]\|<Title\|<Heading' src/
|
|
86
134
|
|
|
87
|
-
|
|
135
|
+
# Check for role="button" on non-button elements (a11y smell)
|
|
136
|
+
grep -rn --include='*.tsx' --include='*.jsx' \
|
|
137
|
+
'role="button"' src/
|
|
138
|
+
```
|
|
88
139
|
|
|
89
|
-
|
|
140
|
+
### Stage 1 results
|
|
141
|
+
|
|
142
|
+
Summarize before proceeding:
|
|
143
|
+
- N axe-core violations (N critical, N serious) — or "axe-core not available"
|
|
144
|
+
- Accessibility tree: N elements without accessible names
|
|
145
|
+
- Contrast: N elements below WCAG AA thresholds
|
|
146
|
+
- Missing alt text: N images
|
|
147
|
+
|
|
148
|
+
### Stage 2: Analyze
|
|
149
|
+
|
|
150
|
+
Interpret Stage 1 results + manual evaluation for what automation misses.
|
|
151
|
+
|
|
152
|
+
**2a. Keyboard Navigation** (SC 2.1.1, SC 2.1.2, SC 2.4.3, SC 2.4.7)
|
|
90
153
|
- **Tab order** — Is it logical? Does it follow visual layout?
|
|
91
154
|
- **Focus indicators** — Can you always see what's focused? Are custom
|
|
92
155
|
focus styles visible against the dark theme?
|
|
93
156
|
- **Keyboard shortcuts** — Are they documented? Do they conflict with
|
|
94
|
-
browser/OS shortcuts? Can they be discovered?
|
|
157
|
+
browser/OS shortcuts? Can they be discovered? (SC 2.1.4)
|
|
95
158
|
- **Focus traps** — Do modals and drawers trap focus correctly? Can you
|
|
96
|
-
escape them with Esc?
|
|
97
|
-
- **Skip links** — Can keyboard users skip repetitive navigation?
|
|
159
|
+
escape them with Esc? (SC 2.1.2)
|
|
160
|
+
- **Skip links** — Can keyboard users skip repetitive navigation? (SC 2.4.1)
|
|
98
161
|
|
|
99
|
-
**
|
|
162
|
+
**2b. Semantic Structure** (SC 1.3.1, SC 2.4.6, SC 2.4.10)
|
|
100
163
|
- **Headings** — Is there a logical heading hierarchy on each page?
|
|
101
164
|
- **Landmarks** — Are `<main>`, `<nav>`, `<aside>` used appropriately?
|
|
102
165
|
- **Lists** — Are lists of items marked up as `<ul>`/`<ol>`, not just
|
|
103
166
|
styled divs?
|
|
104
167
|
- **Tables** — Do data tables have proper headers (`<th>` with scope)?
|
|
105
|
-
- **Forms** — Are all inputs associated with labels?
|
|
168
|
+
- **Forms** — Are all inputs associated with labels? (SC 1.3.1)
|
|
106
169
|
|
|
107
|
-
**
|
|
170
|
+
**2c. Color and Contrast** (SC 1.4.3, SC 1.4.6, SC 1.4.11)
|
|
108
171
|
- **Text contrast** — Does all text meet WCAG AA minimum (4.5:1 for
|
|
109
172
|
normal text, 3:1 for large text)? Check against the dark theme AND
|
|
110
|
-
any light theme option.
|
|
173
|
+
any light theme option. (SC 1.4.3)
|
|
174
|
+
- **Non-text contrast** — Do UI components and graphical objects have at
|
|
175
|
+
least 3:1 contrast? (SC 1.4.11)
|
|
111
176
|
- **Color as sole indicator** — Is color ever the only way to convey
|
|
112
|
-
information? (
|
|
177
|
+
information? (SC 1.4.1)
|
|
113
178
|
- **Focus contrast** — Are focus indicators visible against all
|
|
114
|
-
backgrounds?
|
|
115
|
-
- Use `preview_inspect` with computed styles to check specific contrast
|
|
116
|
-
ratios.
|
|
179
|
+
backgrounds? (SC 2.4.7)
|
|
117
180
|
|
|
118
|
-
**
|
|
119
|
-
- **Button labels** — Do icon-only buttons have `aria-label`?
|
|
120
|
-
- **Link purpose** — Can link text be understood out of context?
|
|
181
|
+
**2d. Interactive Elements** (SC 4.1.2, SC 1.3.1, SC 3.3.1, SC 3.3.2)
|
|
182
|
+
- **Button labels** — Do icon-only buttons have `aria-label`? (SC 4.1.2)
|
|
183
|
+
- **Link purpose** — Can link text be understood out of context? (SC 2.4.4)
|
|
121
184
|
- **Error messages** — Are form errors associated with their fields
|
|
122
|
-
via `aria-describedby`?
|
|
185
|
+
via `aria-describedby`? (SC 3.3.1)
|
|
123
186
|
- **Loading states** — Are loading indicators announced to screen
|
|
124
|
-
readers? (`aria-live`, `aria-busy`)
|
|
187
|
+
readers? (`aria-live`, `aria-busy`) (SC 4.1.3)
|
|
125
188
|
- **Notifications** — Are toast notifications in an `aria-live` region?
|
|
126
189
|
|
|
127
|
-
**
|
|
128
|
-
- **Content updates** — When content changes
|
|
129
|
-
|
|
130
|
-
- **Drag and drop** — Is there a keyboard alternative
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
**6. Motion and Animation**
|
|
190
|
+
**2e. Dynamic Content** (SC 4.1.3, SC 2.1.1, SC 2.4.3)
|
|
191
|
+
- **Content updates** — When content changes, is the change communicated
|
|
192
|
+
to assistive technology? (SC 4.1.3)
|
|
193
|
+
- **Drag and drop** — Is there a keyboard alternative? (SC 2.1.1)
|
|
194
|
+
- **Modals and drawers** — Focus moves in on open, returns to trigger
|
|
195
|
+
on close? (SC 2.4.3)
|
|
196
|
+
- **Tabs** — Follow WAI-ARIA tab pattern? Arrow keys to switch, tab key
|
|
197
|
+
to enter panel content?
|
|
198
|
+
|
|
199
|
+
**2f. Motion and Animation** (SC 2.3.1, SC 2.3.3)
|
|
138
200
|
- **Reduced motion** — Does the app respect `prefers-reduced-motion`?
|
|
139
201
|
- **Auto-playing animation** — Is any content animated automatically
|
|
140
202
|
without user control?
|
|
@@ -178,3 +240,24 @@ Adding aria-label to each would fix it with no behavior change.
|
|
|
178
240
|
**Not a finding:** A component uses a slightly different shade of blue
|
|
179
241
|
than the theme default. This is a visual preference, not an accessibility
|
|
180
242
|
concern, unless the contrast ratio falls below WCAG AA thresholds.
|
|
243
|
+
|
|
244
|
+
## Historically Problematic Patterns
|
|
245
|
+
|
|
246
|
+
Two sources — read both and merge at runtime:
|
|
247
|
+
|
|
248
|
+
1. **This section** (upstream, CC-owned) — universal patterns that apply to
|
|
249
|
+
any project. Grows when consuming projects promote recurring findings
|
|
250
|
+
via field-feedback.
|
|
251
|
+
2. **`patterns-project.md`** in this skill's directory — project-specific
|
|
252
|
+
patterns discovered during audits of this particular project. Project-
|
|
253
|
+
owned, never overwritten by CC upgrades.
|
|
254
|
+
|
|
255
|
+
If `patterns-project.md` exists, read it alongside this section. Both
|
|
256
|
+
inform your analysis equally.
|
|
257
|
+
|
|
258
|
+
**How patterns get here:** A consuming project's audit finds a real issue.
|
|
259
|
+
If the same pattern recurs across projects, it gets promoted upstream via
|
|
260
|
+
field-feedback. The CC maintainer adds it to this section. Project-specific
|
|
261
|
+
patterns that don't generalize stay in `patterns-project.md`.
|
|
262
|
+
|
|
263
|
+
<!-- Universal patterns below this line -->
|
|
@@ -20,6 +20,7 @@ topics:
|
|
|
20
20
|
- high stakes
|
|
21
21
|
- redesign
|
|
22
22
|
- strategy
|
|
23
|
+
tools: []
|
|
23
24
|
---
|
|
24
25
|
|
|
25
26
|
# Anti-Confirmation
|
|
@@ -170,3 +171,24 @@ should be revisited if categories are added more than twice per quarter."
|
|
|
170
171
|
|
|
171
172
|
The plan still ships the same way. But the decision was *examined*, the
|
|
172
173
|
alternatives were *recorded*, and the trigger for revisiting is *explicit*.
|
|
174
|
+
|
|
175
|
+
## Historically Problematic Patterns
|
|
176
|
+
|
|
177
|
+
Two sources — read both and merge at runtime:
|
|
178
|
+
|
|
179
|
+
1. **This section** (upstream, CC-owned) — universal patterns that apply to
|
|
180
|
+
any project. Grows when consuming projects promote recurring findings
|
|
181
|
+
via field-feedback.
|
|
182
|
+
2. **`patterns-project.md`** in this skill's directory — project-specific
|
|
183
|
+
patterns discovered during audits of this particular project. Project-
|
|
184
|
+
owned, never overwritten by CC upgrades.
|
|
185
|
+
|
|
186
|
+
If `patterns-project.md` exists, read it alongside this section. Both
|
|
187
|
+
inform your analysis equally.
|
|
188
|
+
|
|
189
|
+
**How patterns get here:** A consuming project's audit finds a real issue.
|
|
190
|
+
If the same pattern recurs across projects, it gets promoted upstream via
|
|
191
|
+
field-feedback. The CC maintainer adds it to this section. Project-specific
|
|
192
|
+
patterns that don't generalize stay in `patterns-project.md`.
|
|
193
|
+
|
|
194
|
+
<!-- Universal patterns below this line -->
|
|
@@ -12,6 +12,9 @@ briefing:
|
|
|
12
12
|
- _briefing-architecture.md
|
|
13
13
|
- _briefing-jurisdictions.md
|
|
14
14
|
standing-mandate: audit, plan, investigate
|
|
15
|
+
tools:
|
|
16
|
+
- fetch_docs (all projects -- Claude Code llms.txt and capability pages)
|
|
17
|
+
- WebSearch (all projects -- ecosystem monitoring)
|
|
15
18
|
directives:
|
|
16
19
|
plan: >
|
|
17
20
|
Evaluate structural fit. Does this plan compose well with existing
|
|
@@ -285,3 +288,24 @@ This cabinet member has the broadest scope -- the whole system:
|
|
|
285
288
|
- Three npm packages provide overlapping functionality (e.g., two HTTP
|
|
286
289
|
clients, two date libraries). This is a build-vs-buy debt pattern --
|
|
287
290
|
the team adopted new tools without removing old ones.
|
|
291
|
+
|
|
292
|
+
## Historically Problematic Patterns
|
|
293
|
+
|
|
294
|
+
Two sources — read both and merge at runtime:
|
|
295
|
+
|
|
296
|
+
1. **This section** (upstream, CC-owned) — universal patterns that apply to
|
|
297
|
+
any project. Grows when consuming projects promote recurring findings
|
|
298
|
+
via field-feedback.
|
|
299
|
+
2. **`patterns-project.md`** in this skill's directory — project-specific
|
|
300
|
+
patterns discovered during audits of this particular project. Project-
|
|
301
|
+
owned, never overwritten by CC upgrades.
|
|
302
|
+
|
|
303
|
+
If `patterns-project.md` exists, read it alongside this section. Both
|
|
304
|
+
inform your analysis equally.
|
|
305
|
+
|
|
306
|
+
**How patterns get here:** A consuming project's audit finds a real issue.
|
|
307
|
+
If the same pattern recurs across projects, it gets promoted upstream via
|
|
308
|
+
field-feedback. The CC maintainer adds it to this section. Project-specific
|
|
309
|
+
patterns that don't generalize stay in `patterns-project.md`.
|
|
310
|
+
|
|
311
|
+
<!-- Universal patterns below this line -->
|