opencastle 0.32.4 → 0.32.6
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 +13 -3
- package/bin/cli.mjs +2 -0
- package/dist/cli/bootstrap.js +1 -1
- package/dist/cli/bootstrap.js.map +1 -1
- package/dist/cli/bootstrap.test.js +16 -0
- package/dist/cli/bootstrap.test.js.map +1 -1
- package/dist/cli/init.test.js +38 -0
- package/dist/cli/init.test.js.map +1 -1
- package/dist/cli/stack-config-update.test.js +18 -0
- package/dist/cli/stack-config-update.test.js.map +1 -1
- package/dist/cli/stack-config.d.ts.map +1 -1
- package/dist/cli/stack-config.js +1 -0
- package/dist/cli/stack-config.js.map +1 -1
- package/dist/cli/types.d.ts +1 -1
- package/dist/cli/types.d.ts.map +1 -1
- package/dist/orchestrator/plugins/index.d.ts.map +1 -1
- package/dist/orchestrator/plugins/index.js +4 -0
- package/dist/orchestrator/plugins/index.js.map +1 -1
- package/dist/orchestrator/plugins/notion/config.d.ts +3 -0
- package/dist/orchestrator/plugins/notion/config.d.ts.map +1 -0
- package/dist/orchestrator/plugins/notion/config.js +46 -0
- package/dist/orchestrator/plugins/notion/config.js.map +1 -0
- package/dist/orchestrator/plugins/trello/config.d.ts +3 -0
- package/dist/orchestrator/plugins/trello/config.d.ts.map +1 -0
- package/dist/orchestrator/plugins/trello/config.js +43 -0
- package/dist/orchestrator/plugins/trello/config.js.map +1 -0
- package/dist/orchestrator/plugins/types.d.ts +1 -1
- package/dist/orchestrator/plugins/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/cli/bootstrap.test.ts +21 -0
- package/src/cli/bootstrap.ts +1 -1
- package/src/cli/init.test.ts +46 -0
- package/src/cli/stack-config-update.test.ts +20 -0
- package/src/cli/stack-config.ts +1 -0
- package/src/cli/types.ts +1 -1
- package/src/dashboard/node_modules/.vite/deps/_metadata.json +6 -6
- package/src/orchestrator/agents/api-designer.agent.md +25 -34
- package/src/orchestrator/agents/architect.agent.md +40 -84
- package/src/orchestrator/agents/content-engineer.agent.md +29 -31
- package/src/orchestrator/agents/copywriter.agent.md +35 -60
- package/src/orchestrator/agents/data-expert.agent.md +24 -30
- package/src/orchestrator/agents/database-engineer.agent.md +26 -31
- package/src/orchestrator/agents/developer.agent.md +32 -34
- package/src/orchestrator/agents/devops-expert.agent.md +31 -26
- package/src/orchestrator/agents/documentation-writer.agent.md +29 -29
- package/src/orchestrator/agents/performance-expert.agent.md +36 -33
- package/src/orchestrator/agents/release-manager.agent.md +25 -34
- package/src/orchestrator/agents/researcher.agent.md +41 -95
- package/src/orchestrator/agents/reviewer.agent.md +24 -34
- package/src/orchestrator/agents/security-expert.agent.md +35 -39
- package/src/orchestrator/agents/seo-specialist.agent.md +25 -32
- package/src/orchestrator/agents/session-guard.agent.md +20 -79
- package/src/orchestrator/agents/team-lead.agent.md +50 -254
- package/src/orchestrator/agents/testing-expert.agent.md +37 -49
- package/src/orchestrator/agents/ui-ux-expert.agent.md +33 -39
- package/src/orchestrator/customizations/KNOWN-ISSUES.md +0 -1
- package/src/orchestrator/customizations/agents/skill-matrix.json +20 -4
- package/src/orchestrator/customizations/agents/skill-matrix.md +20 -0
- package/src/orchestrator/instructions/general.instructions.md +24 -84
- package/src/orchestrator/plugins/astro/SKILL.md +23 -179
- package/src/orchestrator/plugins/convex/SKILL.md +38 -12
- package/src/orchestrator/plugins/index.ts +4 -0
- package/src/orchestrator/plugins/netlify/SKILL.md +17 -13
- package/src/orchestrator/plugins/nextjs/SKILL.md +55 -261
- package/src/orchestrator/plugins/notion/SKILL.md +205 -0
- package/src/orchestrator/plugins/notion/config.ts +47 -0
- package/src/orchestrator/plugins/nx/SKILL.md +20 -72
- package/src/orchestrator/plugins/playwright/SKILL.md +5 -17
- package/src/orchestrator/plugins/slack/SKILL.md +28 -190
- package/src/orchestrator/plugins/teams/SKILL.md +10 -140
- package/src/orchestrator/plugins/trello/SKILL.md +151 -0
- package/src/orchestrator/plugins/trello/config.ts +44 -0
- package/src/orchestrator/plugins/types.ts +1 -1
- package/src/orchestrator/plugins/vitest/SKILL.md +2 -2
- package/src/orchestrator/prompts/bug-fix.prompt.md +25 -63
- package/src/orchestrator/prompts/implement-feature.prompt.md +29 -66
- package/src/orchestrator/prompts/quick-refinement.prompt.md +31 -66
- package/src/orchestrator/skills/accessibility-standards/SKILL.md +50 -105
- package/src/orchestrator/skills/agent-hooks/SKILL.md +60 -110
- package/src/orchestrator/skills/agent-memory/SKILL.md +44 -93
- package/src/orchestrator/skills/api-patterns/SKILL.md +20 -68
- package/src/orchestrator/skills/code-commenting/SKILL.md +49 -101
- package/src/orchestrator/skills/context-map/SKILL.md +47 -88
- package/src/orchestrator/skills/data-engineering/SKILL.md +27 -74
- package/src/orchestrator/skills/decomposition/SKILL.md +50 -98
- package/src/orchestrator/skills/deployment-infrastructure/SKILL.md +44 -107
- package/src/orchestrator/skills/documentation-standards/SKILL.md +28 -89
- package/src/orchestrator/skills/fast-review/SKILL.md +51 -276
- package/src/orchestrator/skills/frontend-design/SKILL.md +53 -163
- package/src/orchestrator/skills/git-workflow/SKILL.md +18 -54
- package/src/orchestrator/skills/memory-merger/SKILL.md +51 -88
- package/src/orchestrator/skills/observability-logging/SKILL.md +29 -75
- package/src/orchestrator/skills/orchestration-protocols/SKILL.md +58 -117
- package/src/orchestrator/skills/panel-majority-vote/SKILL.md +65 -140
- package/src/orchestrator/skills/performance-optimization/SKILL.md +21 -85
- package/src/orchestrator/skills/project-consistency/SKILL.md +62 -281
- package/src/orchestrator/skills/react-development/SKILL.md +38 -86
- package/src/orchestrator/skills/security-hardening/SKILL.md +40 -84
- package/src/orchestrator/skills/self-improvement/SKILL.md +26 -60
- package/src/orchestrator/skills/seo-patterns/SKILL.md +40 -105
- package/src/orchestrator/skills/session-checkpoints/SKILL.md +26 -68
- package/src/orchestrator/skills/team-lead-reference/SKILL.md +66 -206
- package/src/orchestrator/skills/testing-workflow/SKILL.md +42 -112
- package/src/orchestrator/skills/validation-gates/SKILL.md +39 -170
- package/src/orchestrator/snippets/base-output-contract.md +14 -0
- package/src/orchestrator/snippets/discovered-issues-policy.md +15 -0
- package/src/orchestrator/snippets/logging-mandatory.md +11 -0
- package/src/orchestrator/snippets/never-expose-secrets.md +22 -0
|
@@ -15,22 +15,16 @@ You are the Team Lead. Implement the roadmap task described below following this
|
|
|
15
15
|
|
|
16
16
|
---
|
|
17
17
|
|
|
18
|
-
> **Canonical workflow:** `.github/agent-workflows/feature-implementation.md` defines the phase structure. This prompt adds tracker traceability, validation gate references, and completion criteria.
|
|
19
|
-
|
|
20
18
|
## Workflow
|
|
21
19
|
|
|
22
20
|
> **HARD GATE:** Steps 1→2 are **blocking prerequisites**. Do NOT write, edit, or delegate any code until tracker issues exist for every subtask. If you catch yourself writing code before issues are created, STOP immediately, create the issues, then resume.
|
|
23
21
|
|
|
24
22
|
### 1. Research & Context Gathering
|
|
25
23
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
3. **Read architecture docs** — Check `.opencastle/project.instructions.md` and `.opencastle/project/decisions.md` for constraints and prior decisions
|
|
31
|
-
4. **Read lessons learned** — Check `.opencastle/LESSONS-LEARNED.md` for pitfalls relevant to this feature area
|
|
32
|
-
5. **Search existing code** — Find all files, components, queries, and tests related to this feature area
|
|
33
|
-
6. **Identify reusable code** — Before creating anything new, check if similar logic, components, or utilities already exist in the codebase that can be reused or extended
|
|
24
|
+
1. **Read the roadmap** — Confirm scope, status, and acceptance criteria in `.opencastle/project/roadmap.md`
|
|
25
|
+
2. **Check blockers** — Read `.opencastle/KNOWN-ISSUES.md` and `.opencastle/LESSONS-LEARNED.md` for pitfalls and workarounds
|
|
26
|
+
3. **Read architecture docs** — Check `.opencastle/project.instructions.md` and `.opencastle/project/decisions.md` for constraints
|
|
27
|
+
4. **Search existing code** — Find related files, components, queries, and tests; check for reusable implementations before creating anything new
|
|
34
28
|
|
|
35
29
|
### 2. Task Board Setup (BLOCKING — must complete before Step 3)
|
|
36
30
|
|
|
@@ -39,52 +33,37 @@ Every subtask must be tracked. **No issue = no implementation.** This step produ
|
|
|
39
33
|
1. **Check existing issues** — Search the board for any in-progress or completed work related to this task
|
|
40
34
|
2. **Decompose into issues** — Create one tracker issue per subtask using `[Area] Short description` naming
|
|
41
35
|
3. **Set metadata** — Assign labels (agent name), priority, dependencies, and file partitions
|
|
42
|
-
4. **Write descriptions** —
|
|
43
|
-
- **Objective:** One sentence
|
|
44
|
-
- **Files (partition):** Exact paths this agent may modify
|
|
45
|
-
- **Acceptance criteria:** Verifiable checklist
|
|
46
|
-
- **Dependencies:** Links to prerequisite issues
|
|
36
|
+
4. **Write descriptions** — Objective (1 sentence), files (partition paths), acceptance criteria (checklist), dependencies (links)
|
|
47
37
|
5. **Link to roadmap** — Reference the roadmap section in the issue description so context is never lost
|
|
48
38
|
6. **Verify issues exist** — List all created issue IDs. If count is 0, do NOT proceed to Step 2.5
|
|
49
39
|
|
|
50
40
|
### 2.5 Generate Convoy Spec (BLOCKING — decides how Step 3 proceeds)
|
|
51
41
|
|
|
52
|
-
All project-related work is executed via the convoy engine — regardless of subtask count.
|
|
42
|
+
All project-related work is executed via the convoy engine — regardless of subtask count.
|
|
53
43
|
|
|
54
|
-
1. **Generate the spec** — use the `generate-convoy` prompt with the decomposed task list
|
|
44
|
+
1. **Generate the spec** — use the `generate-convoy` prompt with the decomposed task list. The spec IS the implementation plan; even single-task fixes go through convoy for observability.
|
|
55
45
|
2. **Hand the spec to the user** — tell them to run: `npx opencastle run -f .opencastle/convoys/<name>.convoy.yml`
|
|
56
46
|
3. **The convoy engine handles** isolated git worktrees, parallel execution, merge queue ordering, crash recovery, and structured logging automatically.
|
|
57
|
-
4. **After convoy completes** — proceed to Step 4 (validation) and Step 5 (delivery/PR).
|
|
58
|
-
|
|
59
|
-
> **Why always convoy?** Convoy execution is the only path that guarantees observability logging, crash recovery, gate validation, and live progress. Direct sub-agent delegation produces no structured logs and cannot be resumed if interrupted.
|
|
47
|
+
4. **After convoy completes** — proceed to Step 4 (validation) and Step 5 (delivery/PR).
|
|
60
48
|
|
|
61
49
|
### 3. Implementation Rules
|
|
62
50
|
|
|
63
|
-
> **Convoy execution:** The convoy spec
|
|
51
|
+
> **Convoy execution:** The convoy spec IS the implementation plan — skip manual delegation and jump to Step 4 after the user runs the convoy.
|
|
64
52
|
|
|
65
53
|
#### Issue Traceability
|
|
66
54
|
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
- **Update issue status** — Move issues to In Progress before starting, Done after verification passes
|
|
55
|
+
- Include the tracker issue ID and title in every delegation prompt
|
|
56
|
+
- Reference issue IDs (e.g., `TAS-42`) in commit messages; move issues In Progress → Done as work progresses
|
|
70
57
|
|
|
71
58
|
#### DRY Code
|
|
72
59
|
|
|
73
|
-
-
|
|
74
|
-
-
|
|
75
|
-
- **No copy-paste across apps** — Shared code belongs in shared libraries, not duplicated between apps
|
|
76
|
-
- **Refactor on discovery** — If you find duplicated code during implementation, create a subtask to consolidate it
|
|
77
|
-
|
|
78
|
-
#### Self-Improvement
|
|
79
|
-
|
|
80
|
-
Include the self-improvement reminder in every delegation prompt (see the **self-improvement** skill).
|
|
60
|
+
- Search before creating — check for existing components, hooks, utilities, and queries first
|
|
61
|
+
- Extract shared logic to `libs/`; no copy-paste across apps. Refactor duplicates when discovered
|
|
81
62
|
|
|
82
63
|
#### Visual Consistency
|
|
83
64
|
|
|
84
|
-
-
|
|
85
|
-
-
|
|
86
|
-
- **Cross-app consistency** — Changes must look correct in all apps that share the codebase
|
|
87
|
-
- **Browser verification required** — Every UI change must be visually confirmed in Chrome (see Testing below)
|
|
65
|
+
- Use the shared component library; never re-implement existing components
|
|
66
|
+
- Match spacing, typography, and colors from existing pages; verify in all affected apps
|
|
88
67
|
|
|
89
68
|
### 4. Validation & Testing
|
|
90
69
|
|
|
@@ -92,39 +71,26 @@ Include the self-improvement reminder in every delegation prompt (see the **self
|
|
|
92
71
|
|
|
93
72
|
Every subtask must pass ALL gates before being marked Done:
|
|
94
73
|
|
|
95
|
-
1. **
|
|
96
|
-
2. **
|
|
97
|
-
3. **
|
|
98
|
-
4. **
|
|
99
|
-
5. **
|
|
100
|
-
6. **
|
|
101
|
-
7. **
|
|
102
|
-
8. **
|
|
103
|
-
9. **
|
|
74
|
+
1. **Secret Scanning** — block if API keys/tokens/passwords found in diff
|
|
75
|
+
2. **Deterministic Checks** — lint, test, build — zero errors (see **codebase-tool** skill)
|
|
76
|
+
3. **Blast Radius** — ≤200 lines / ≤5 files normal; escalate if >500 lines or >10 files
|
|
77
|
+
4. **Dependency Audit** — when `package.json` changes
|
|
78
|
+
5. **Fast Review** (MANDATORY) — single reviewer sub-agent
|
|
79
|
+
6. **Browser Testing** (MANDATORY for UI) — clear cache, verify features + responsive + screenshots
|
|
80
|
+
7. **Regression Testing** — full suite for affected projects
|
|
81
|
+
8. **Panel Review** — for security, DB migrations, architecture (use **panel-majority-vote** skill)
|
|
82
|
+
9. **Final Smoke Test** — end-to-end verification of complete feature
|
|
104
83
|
|
|
105
84
|
### 5. Delivery
|
|
106
85
|
|
|
107
|
-
Follow the **Delivery Outcome** defined in the **git-workflow** skill — commit, push, open PR (not merged), and link to the tracker.
|
|
108
|
-
|
|
109
|
-
> The convoy engine creates commits on the configured `branch` directly. After validation passes, open the PR from that branch. No additional commits from the Team Lead are needed unless gates failed and required manual fixes.
|
|
86
|
+
Follow the **Delivery Outcome** defined in the **git-workflow** skill — commit, push, open PR (not merged), and link to the tracker. The convoy engine creates commits on the configured `branch` directly; open the PR from that branch after validation passes.
|
|
110
87
|
|
|
111
88
|
### 6. Documentation & Traceability
|
|
112
89
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
**Tracker Issues:**
|
|
118
|
-
- [PREFIX-6](<tracker-url>/PREFIX-6) — [Search] Description ✅ Done
|
|
119
|
-
- [PREFIX-7](<tracker-url>/PREFIX-7) — [UI] Description 📋 Todo
|
|
120
|
-
```
|
|
121
|
-
> Replace `PREFIX` with the project's issue prefix (see `tracker-config.md`).
|
|
122
|
-
2. **Update known issues** — If new limitations are discovered, add them to `.opencastle/KNOWN-ISSUES.md`
|
|
123
|
-
3. **Update architecture docs** — If architectural decisions were made, add an ADR to `.opencastle/project/decisions.md`
|
|
124
|
-
4. **Link tracker issues** — Every issue description should reference:
|
|
125
|
-
- Related roadmap section
|
|
126
|
-
- Files modified (the partition)
|
|
127
|
-
- Related issues (dependencies and follow-ups)
|
|
90
|
+
1. **Update roadmap** — Mark completed items with ✅ and date; include tracker issue IDs next to each scope item (e.g., `[PREFIX-6](<url>) — Description ✅ Done`)
|
|
91
|
+
2. **Update known issues** — Add new limitations to `.opencastle/KNOWN-ISSUES.md`
|
|
92
|
+
3. **Update architecture docs** — Add ADRs for architectural decisions to `.opencastle/project/decisions.md`
|
|
93
|
+
4. **Link tracker issues** — Reference roadmap section, partition files, and related issues in each description
|
|
128
94
|
5. **Close issues properly** — Move to Done only after independent verification passes all gates
|
|
129
95
|
|
|
130
96
|
### 7. Completion Criteria
|
|
@@ -132,11 +98,8 @@ Keep documentation current so future sessions have full context:
|
|
|
132
98
|
The roadmap task is complete when:
|
|
133
99
|
|
|
134
100
|
- [ ] All tracker subtask issues are Done
|
|
135
|
-
- [ ] All deterministic checks pass (lint, test, build) for affected projects
|
|
136
|
-
- [ ] **Dev server started with CLEAN cache** (clear framework + task runner caches before serving — see the **codebase-tool** skill)
|
|
137
101
|
- [ ] **All UI changes verified in Chrome browser via MCP with screenshots taken as proof**
|
|
138
102
|
- [ ] **Every feature in the acceptance criteria visually confirmed** — not just "page loads"
|
|
139
|
-
- [ ] Regression tests confirm no existing functionality is broken
|
|
140
103
|
- [ ] No duplicated code — shared logic extracted to libraries
|
|
141
104
|
- [ ] Visual consistency maintained across all affected pages and apps
|
|
142
105
|
- [ ] Documentation updated (roadmap, known issues, decisions)
|
|
@@ -31,68 +31,45 @@ You are the Team Lead. Handle the follow-up refinement described below. This is
|
|
|
31
31
|
|
|
32
32
|
### 1. Triage: Decide Tracking Level
|
|
33
33
|
|
|
34
|
-
Before doing anything, decide whether this follow-up needs issue tracking:
|
|
35
|
-
|
|
36
34
|
**Create a tracker issue if ANY of these are true:**
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
- It changes data queries, API routes, or Server Actions
|
|
41
|
-
- It could introduce regressions in other features
|
|
42
|
-
- You want a record for future reference (e.g., "why was this changed?")
|
|
35
|
+
- Affects user-visible behavior, touches >2–3 files, or modifies `libs/`, queries, API routes, or Server Actions
|
|
36
|
+
- Could introduce regressions in other features
|
|
37
|
+
- You want a record for future reference
|
|
43
38
|
|
|
44
39
|
**Skip tracking if ALL of these are true:**
|
|
45
|
-
- Pure cosmetic/spacing/copy
|
|
40
|
+
- Pure cosmetic/spacing/copy change with no behavioral impact
|
|
46
41
|
- Isolated to a single component or page
|
|
47
|
-
- No behavioral change
|
|
48
42
|
- Trivial to verify visually
|
|
49
43
|
|
|
50
|
-
If creating
|
|
51
|
-
- **Title**: `[Follow-up] Short description`
|
|
52
|
-
- **Label**: agent name + `follow-up`
|
|
53
|
-
- **Priority**: Low or Medium
|
|
54
|
-
- **Description**: What changed, why, and which files
|
|
44
|
+
If creating: title `[Follow-up] Short description`, label `follow-up`, priority Low/Medium, description: what changed, why, files
|
|
55
45
|
|
|
56
46
|
### 2. Understand the Request
|
|
57
47
|
|
|
58
|
-
Before touching any code:
|
|
59
|
-
|
|
60
48
|
1. **Clarify scope** — Identify exactly which pages, components, or behaviors need to change
|
|
61
49
|
2. **Find affected files** — Search the codebase for the relevant components, styles, queries, and tests
|
|
62
50
|
3. **Check known issues** — Scan `.opencastle/KNOWN-ISSUES.md` in case this is a documented limitation
|
|
63
51
|
4. **Read lessons learned** — Check `.opencastle/LESSONS-LEARNED.md` for relevant pitfalls before starting
|
|
64
|
-
5. **Assess complexity** — If
|
|
65
|
-
- Inform the user that this should be a tracked task
|
|
66
|
-
- Create a tracker issue (if not already created in triage) and switch to the `implement-feature` workflow
|
|
52
|
+
5. **Assess complexity** — If larger than expected (>5 files, migration, or auth/security), inform the user, create a tracker issue, and switch to the `implement-feature` workflow
|
|
67
53
|
|
|
68
54
|
### 3. Plan the Fix
|
|
69
55
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
2. **Check for shared impact** — Will the fix affect other pages or apps? Check component usage across the codebase
|
|
74
|
-
3. **Determine the minimal change** — Follow the principle of least surprise. Change only what's necessary
|
|
75
|
-
4. **Reuse existing patterns** — Use components, utilities, and styles that already exist in the codebase. Never introduce a new pattern for a one-off fix
|
|
56
|
+
1. **Identify root cause** — For bugs, find why; for UI tweaks, understand the styling/layout chain
|
|
57
|
+
2. **Assess shared impact** — Will the fix affect other pages or apps? Check component usage across the codebase
|
|
58
|
+
3. **Minimal change** — Reuse existing components, utilities, and styles. Never introduce a new pattern for a one-off fix
|
|
76
59
|
|
|
77
60
|
### 4. Implement
|
|
78
61
|
|
|
79
|
-
Delegate to the appropriate specialist agent(s). Since follow-ups are scoped and focused, prefer **sub-agents** (inline) over background agents.
|
|
80
|
-
|
|
81
62
|
#### Delegation Prompt Must Include
|
|
82
63
|
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
-
|
|
86
|
-
- **Boundaries** — "Only modify files listed above. Do not refactor unrelated code."
|
|
87
|
-
- **Self-improvement reminder** — include per the **self-improvement** skill
|
|
64
|
+
- What to fix, exact file paths, and how to verify the result
|
|
65
|
+
- Boundaries: "Only modify files listed above. Do not refactor unrelated code."
|
|
66
|
+
- Self-improvement reminder (see **self-improvement** skill)
|
|
88
67
|
|
|
89
68
|
#### Implementation Rules
|
|
90
69
|
|
|
91
|
-
- **No scope creep** — Fix what was asked
|
|
92
|
-
- **DRY
|
|
93
|
-
- **
|
|
94
|
-
- **Cross-app check** — If the change is in shared code (`libs/`), verify it works for both apps
|
|
95
|
-
- **Accessibility** — Don't regress keyboard navigation, screen reader support, or contrast ratios
|
|
70
|
+
- **No scope creep** — Fix only what was asked; note but don't fix adjacent issues
|
|
71
|
+
- **DRY + Visual consistency** — Reuse existing components, utilities, and design system patterns
|
|
72
|
+
- **Cross-app + Accessibility** — Verify `libs/` changes across apps; don't regress keyboard nav/contrast
|
|
96
73
|
|
|
97
74
|
### 5. Validate
|
|
98
75
|
|
|
@@ -100,46 +77,34 @@ Delegate to the appropriate specialist agent(s). Since follow-ups are scoped and
|
|
|
100
77
|
|
|
101
78
|
Every follow-up, no matter how small, must pass these gates:
|
|
102
79
|
|
|
103
|
-
1. **
|
|
104
|
-
2. **
|
|
105
|
-
3. **
|
|
106
|
-
4. **
|
|
107
|
-
5. **
|
|
108
|
-
6. **
|
|
109
|
-
7. **
|
|
80
|
+
1. **Secret Scanning** — block if API keys/tokens/passwords found in diff
|
|
81
|
+
2. **Deterministic Checks** — lint, test, build — zero errors (see **codebase-tool** skill)
|
|
82
|
+
3. **Blast Radius** — ≤100 lines / ≤3 files for follow-ups; if larger, escalate to `implement-feature`
|
|
83
|
+
4. **Dependency Audit** — when `package.json` or lockfiles change
|
|
84
|
+
5. **Fast Review** (MANDATORY) — single reviewer sub-agent
|
|
85
|
+
6. **Browser Testing** (MANDATORY for visual changes) — clear cache, verify + responsive + screenshots
|
|
86
|
+
7. **Regression Testing** — if shared component/library modified, test all consuming projects
|
|
110
87
|
|
|
111
88
|
### 6. Delivery
|
|
112
89
|
|
|
113
|
-
If
|
|
90
|
+
If tracked: follow the **Delivery Outcome** in the **git-workflow** skill — commit, push, open PR (not merged), tracker linked.
|
|
114
91
|
|
|
115
|
-
If
|
|
92
|
+
If untracked: commit to the current branch; Team Lead includes in the parent task's existing PR.
|
|
116
93
|
|
|
117
94
|
### 7. Escalation Triggers
|
|
118
95
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
-
|
|
122
|
-
-
|
|
123
|
-
-
|
|
124
|
-
-
|
|
125
|
-
- The fix changes **data models** (CMS schemas, database tables)
|
|
126
|
-
- You discover the "small fix" is actually a **systemic issue** requiring architectural changes
|
|
127
|
-
|
|
128
|
-
When escalating, explain to the user what you found and why it needs proper tracking.
|
|
129
|
-
|
|
130
|
-
- **Multi-task escalation** — If the refinement decomposes into 3+ subtasks, switch to `implement-feature` (which will use convoy execution for multi-task work)
|
|
96
|
+
- Requires a database migration or data model changes (CMS schemas, tables)
|
|
97
|
+
- Involves auth/authorization changes
|
|
98
|
+
- Touches >5 files across multiple libraries
|
|
99
|
+
- Introduces a new dependency or API endpoint
|
|
100
|
+
- Is a systemic issue requiring architectural changes
|
|
101
|
+
- Decomposes into 3+ subtasks → switch to `implement-feature`
|
|
131
102
|
|
|
132
103
|
### 8. Completion
|
|
133
104
|
|
|
134
|
-
The follow-up is complete when:
|
|
135
|
-
|
|
136
105
|
- [ ] The specific request is resolved
|
|
137
106
|
- [ ] Tracker issue created and moved to Done (if triage determined tracking was needed)
|
|
138
|
-
- [ ] Lint, test, and build pass for all affected projects
|
|
139
|
-
- [ ] **Dev server started with CLEAN cache** (clear framework + task runner caches before serving — see the **codebase-tool** skill)
|
|
140
107
|
- [ ] **Visual changes verified in Chrome with screenshot taken as proof**
|
|
141
|
-
- [ ] No regressions in adjacent functionality
|
|
142
108
|
- [ ] Shared component changes tested across all consuming apps
|
|
143
109
|
- [ ] Delivery Outcome completed if tracked (see the **git-workflow** skill) — branch pushed, PR opened (not merged), tracker linked
|
|
144
|
-
- [ ] Lessons learned captured
|
|
145
|
-
- [ ] Known issues updated if a new limitation was discovered
|
|
110
|
+
- [ ] Lessons learned captured and known issues updated if applicable
|
|
@@ -3,164 +3,109 @@ name: accessibility-standards
|
|
|
3
3
|
description: "WCAG 2.2 Level AA accessibility patterns for React/HTML/CSS. Use when creating or modifying UI components, forms, navigation, tables, images, or any user-facing elements. Covers keyboard navigation, screen reader semantics, low vision contrast, voice access, and inclusive language."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
<!-- ⚠️ This file is managed by OpenCastle. Edits will be overwritten on update. Customize in the .opencastle/ directory instead. -->
|
|
7
|
-
|
|
8
6
|
# Accessibility Standards
|
|
9
7
|
|
|
10
|
-
Code must conform to [WCAG 2.2 Level AA](https://www.w3.org/TR/WCAG22/).
|
|
11
|
-
|
|
12
|
-
## Workflow
|
|
8
|
+
Code must conform to [WCAG 2.2 Level AA](https://www.w3.org/TR/WCAG22/).
|
|
13
9
|
|
|
14
|
-
|
|
15
|
-
2. After generating code, review against WCAG 2.2 and these patterns. Iterate until compliant.
|
|
16
|
-
3. Inform the user the code was built with accessibility in mind but may still have issues. Suggest [Accessibility Insights](https://accessibilityinsights.io/) for testing.
|
|
10
|
+
**Workflow:** Plan accessible implementation → generate → review against WCAG 2.2 → iterate. Suggest [Accessibility Insights](https://accessibilityinsights.io/) for testing.
|
|
17
11
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
- Use people-first language ("person using a screen reader," not "blind user").
|
|
21
|
-
- Avoid stereotypes or assumptions about ability.
|
|
22
|
-
- Flag uncertain implementations — include reasoning or references to standards.
|
|
12
|
+
**Language:** People-first ("person using a screen reader," not "blind user"). No ability stereotypes. Flag uncertain implementations with reasoning.
|
|
23
13
|
|
|
24
14
|
## Cognitive
|
|
25
15
|
|
|
26
|
-
|
|
27
|
-
- Use consistent page structure (landmarks) across the application.
|
|
28
|
-
- Keep navigation items in the same order across pages.
|
|
29
|
-
- Keep the interface clean — reduce unnecessary distractions.
|
|
16
|
+
Plain language; consistent landmarks and nav order across pages; minimal distractions.
|
|
30
17
|
|
|
31
18
|
## Keyboard
|
|
32
19
|
|
|
33
|
-
- All interactive elements
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
- Static (non-interactive) elements should NOT have `tabindex`. Exception: elements receiving programmatic focus (e.g., headings) get `tabindex="-1"`.
|
|
37
|
-
- Hidden elements must not be keyboard focusable.
|
|
20
|
+
- All interactive elements keyboard-navigable with visible focus in reading order.
|
|
21
|
+
- No `tabindex` on static elements; `tabindex="-1"` only for elements receiving programmatic focus.
|
|
22
|
+
- Hidden elements must not be focusable.
|
|
38
23
|
|
|
39
|
-
|
|
24
|
+
**Composite components** (grids, listboxes, menus, tabs, toolbars): tab stop on container; arrow keys navigate children via roving tabindex or `aria-activedescendant`; on focus restore last/first child.
|
|
40
25
|
|
|
41
|
-
|
|
42
|
-
- Arrow keys navigate children (roving tabindex or `aria-activedescendant`).
|
|
43
|
-
- On focus: show selected child, or previously focused child, or first interactive child.
|
|
26
|
+
**Roving tabindex:** First child `tabindex="0"`, rest `-1`; on arrow key set prev to `-1`, new to `0`, call `.focus()`.
|
|
44
27
|
|
|
45
|
-
|
|
28
|
+
**`aria-activedescendant`:** Container `tabindex="0"` + `aria-activedescendant="IDREF"`; CSS draws outline on referenced element; arrow keys update attribute.
|
|
46
29
|
|
|
47
|
-
|
|
30
|
+
**Skip link** (first focusable element):
|
|
48
31
|
|
|
49
32
|
```html
|
|
50
|
-
<
|
|
51
|
-
<a href="#maincontent" class="sr-only">Skip to main</a>
|
|
52
|
-
</header>
|
|
33
|
+
<a href="#maincontent" class="sr-only">Skip to main</a>
|
|
53
34
|
<main id="maincontent"></main>
|
|
54
35
|
```
|
|
55
36
|
|
|
56
37
|
```css
|
|
57
|
-
.sr-only:not(:focus):not(:active) {
|
|
58
|
-
clip: rect(0 0 0 0);
|
|
59
|
-
clip-path: inset(50%);
|
|
60
|
-
height: 1px;
|
|
61
|
-
overflow: hidden;
|
|
62
|
-
position: absolute;
|
|
63
|
-
white-space: nowrap;
|
|
64
|
-
width: 1px;
|
|
65
|
-
}
|
|
38
|
+
.sr-only:not(:focus):not(:active) { clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }
|
|
66
39
|
```
|
|
67
40
|
|
|
68
|
-
### Common Keys
|
|
69
|
-
|
|
70
41
|
| Key | Action |
|
|
71
42
|
|-----|--------|
|
|
72
43
|
| `Tab` | Next interactive element |
|
|
73
44
|
| `Arrow` | Navigate within composite component |
|
|
74
45
|
| `Enter` | Activate focused control |
|
|
75
|
-
| `Escape` | Close
|
|
76
|
-
|
|
77
|
-
### Roving Tabindex Pattern
|
|
78
|
-
|
|
79
|
-
1. Initial: `tabindex="0"` on first focusable child, `tabindex="-1"` on rest.
|
|
80
|
-
2. On arrow key: set previous to `-1`, new target to `0`, call `element.focus()`.
|
|
81
|
-
|
|
82
|
-
### `aria-activedescendant` Pattern
|
|
83
|
-
|
|
84
|
-
- Container has `tabindex="0"` and `aria-activedescendant="IDREF"`.
|
|
85
|
-
- CSS draws focus outline on referenced element.
|
|
86
|
-
- Arrow keys update `aria-activedescendant`.
|
|
46
|
+
| `Escape` | Close dialogs/menus |
|
|
87
47
|
|
|
88
48
|
## Low Vision
|
|
89
49
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
50
|
+
| Rule | Requirement |
|
|
51
|
+
|------|-------------|
|
|
52
|
+
| Text contrast | ≥4.5:1 (≥3:1 for large text: 18.5px bold / 24px) |
|
|
53
|
+
| Graphics/controls | ≥3:1 with adjacent colors |
|
|
54
|
+
| State indicators (pressed, focus, checked) | ≥3:1 |
|
|
55
|
+
| Color | Never the sole conveyor of information |
|
|
95
56
|
|
|
96
57
|
## Screen Reader
|
|
97
58
|
|
|
98
|
-
-
|
|
99
|
-
-
|
|
100
|
-
-
|
|
59
|
+
- Correct semantics (name, role, value, states). Prefer native HTML; ARIA only when necessary.
|
|
60
|
+
- Landmarks: `<header>`, `<nav>`, `<main>`, `<footer>`.
|
|
61
|
+
- One `<h1>` per page; `<h1>`–`<h6>` introduce sections; no skipping levels.
|
|
101
62
|
|
|
102
63
|
## Voice Access
|
|
103
64
|
|
|
104
|
-
-
|
|
105
|
-
- `aria-label` must
|
|
65
|
+
- Interactive element accessible name must contain its visible label text.
|
|
66
|
+
- `aria-label` must include the visible label.
|
|
106
67
|
|
|
107
68
|
## Forms
|
|
108
69
|
|
|
109
|
-
- Labels
|
|
70
|
+
- Labels accurately describe control purpose.
|
|
110
71
|
- Required fields: asterisk in label + `aria-required="true"`.
|
|
111
|
-
- Errors: `aria-invalid="true"`
|
|
112
|
-
-
|
|
113
|
-
- Submit buttons should NOT be disabled — trigger error messages instead.
|
|
114
|
-
- On submit with invalid input, focus the first invalid field.
|
|
72
|
+
- Errors: `aria-invalid="true"` + `aria-describedby` pointing to error message.
|
|
73
|
+
- Don't disable submit — show errors instead; focus first invalid field on submit.
|
|
115
74
|
|
|
116
|
-
##
|
|
75
|
+
## Images
|
|
117
76
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
77
|
+
| Type | Pattern |
|
|
78
|
+
|------|---------|
|
|
79
|
+
| Informative | `alt="[meaning]"` on `<img>`; `role="img"` + `aria-label` on `<svg>` / icon fonts |
|
|
80
|
+
| Decorative | `alt=""` on `<img>`; `aria-hidden="true"` on `role="img"` |
|
|
121
81
|
|
|
122
82
|
## Input Labels
|
|
123
83
|
|
|
124
|
-
-
|
|
125
|
-
-
|
|
126
|
-
-
|
|
127
|
-
- Help text: associate via `aria-describedby`.
|
|
84
|
+
- `<label for="id">` for form inputs; all interactive elements need visible labels.
|
|
85
|
+
- Disambiguate repeated labels (e.g., "Remove") with `aria-label`.
|
|
86
|
+
- Help text via `aria-describedby`.
|
|
128
87
|
|
|
129
88
|
## Navigation
|
|
130
89
|
|
|
131
90
|
```html
|
|
132
|
-
<nav>
|
|
133
|
-
<
|
|
134
|
-
<li>
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
<li><a href="..." tabindex="-1">Link 1</a></li>
|
|
138
|
-
</ul>
|
|
139
|
-
</li>
|
|
140
|
-
<li>
|
|
141
|
-
<button aria-expanded="false" tabindex="-1">Section 2</button>
|
|
142
|
-
<ul hidden>
|
|
143
|
-
<li><a href="..." tabindex="-1">Link 1</a></li>
|
|
144
|
-
</ul>
|
|
145
|
-
</li>
|
|
146
|
-
</ul>
|
|
147
|
-
</nav>
|
|
91
|
+
<nav><ul>
|
|
92
|
+
<li><button aria-expanded="false" tabindex="0">Section 1</button>
|
|
93
|
+
<ul hidden><li><a href="..." tabindex="-1">Link 1</a></li></ul>
|
|
94
|
+
</li>
|
|
95
|
+
</ul></nav>
|
|
148
96
|
```
|
|
149
97
|
|
|
150
|
-
-
|
|
151
|
-
- Toggle `aria-expanded` on expand/collapse.
|
|
152
|
-
- Roving tabindex
|
|
153
|
-
- `Escape` closes expanded menus.
|
|
98
|
+
- Use `<nav>` + `<ul>`, NOT `menu`/`menubar` roles.
|
|
99
|
+
- Toggle `aria-expanded` on expand/collapse; `Escape` closes menus.
|
|
100
|
+
- Roving tabindex across main items; arrow down into sub-menus.
|
|
154
101
|
|
|
155
102
|
## Page Title
|
|
156
103
|
|
|
157
|
-
-
|
|
158
|
-
-
|
|
159
|
-
- Front-load unique information: `"[Page] - [Section] - [Site]"`.
|
|
104
|
+
- `<title>` describes page purpose, unique per page.
|
|
105
|
+
- Front-load unique info: `"[Page] - [Section] - [Site]"`.
|
|
160
106
|
|
|
161
|
-
## Tables
|
|
107
|
+
## Tables & Grids
|
|
162
108
|
|
|
163
|
-
- Column headers
|
|
164
|
-
- `role="gridcell"`
|
|
165
|
-
-
|
|
166
|
-
- Use `<table>` for static data, `role="grid"` for interactive data (date pickers, calendars).
|
|
109
|
+
- Column headers: `<th>` in first `<tr>`; row headers: `<th>` in each row.
|
|
110
|
+
- `role="gridcell"` nested within `role="row"`.
|
|
111
|
+
- `<table>` for static data; `role="grid"` for interactive (date pickers, calendars).
|