Skip to content

Commit de47245

Browse files
committed
v3.0.0: Complete lifecycle hooks and VS Code 1.110 integration
Phase 4: Lifecycle Hooks (Cross-Platform) - 7h - Implement Python-based hook scripts in .github/hooks/ and .claude/hooks/ - SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, SessionEnd hooks - Cross-platform support: Windows, macOS, Linux - Consolidated hook configuration (hooks-consolidated.json) - Installer updates: install.sh, install.ps1, update.sh, update.ps1, uninstall.sh, uninstall.ps1 - Documentation: docs/hooks-guide.md, docs/guides/agent-debug-panel.md - Three-hook enforcement system tested in web projects Phase 5: VS Code 1.110 High Priority Features - 4h - Agent Debug Panel integration (400+ line comprehensive guide) - Debug panel references in hooks-guide.md, getting-started.md, README.md - Session forking guidance with /fork command in context-management.md - Fork suggestions in web-accessibility-wizard, document-accessibility-wizard, developer-hub - getDiagnostics tool integration in 4 specialist agents - accessibility-lead, aria-specialist, forms-specialist, keyboard-navigator check jsx-a11y linting errors - VS Code 1.110 feature analysis (27+ features analyzed) Phase 6: VS Code 1.110 Remaining Features - 3h - Built-in accessibility skill comparison guide (docs/guides/vscode-builtin-skill-comparison.md) - OS notifications documentation for long-running audits - AI co-author attribution guidance (git.addAICoAuthor setting) - Inline chat session continuity documentation - Collapsible terminal tool calls documentation - Custom thinking phrases for accessibility-themed loading text - Removed VS-CODE-1.110-RECOMMENDATIONS.md (all features implemented) Documentation Updates: - CHANGELOG.md: Added Phase 5 and Phase 6 entries - prd.md: Updated all phases to COMPLETE status, version history updated - README.md: System requirements, optional customization, troubleshooting sections - CONTRIBUTING.md: Testing requirements for latest tool versions - getting-started.md: Version currency warnings, OS notifications, AI co-author attribution - context-management.md: Forking, inline chat continuity, collapsible terminal notes Version Updates: - All manifests updated from 2.6.0 to 3.0.0 - desktop-extension/manifest.json, package.json, package-lock.json - vscode-extension/package-lock.json - Installer comments updated to v3.0 New Files (52 files): - .github/hooks/ - 5 Python hook scripts + configuration - .claude/hooks/ - Claude Code hook installation - .github/prompts/ - 47 prompt files for slash command invocation - docs/guides/agent-debug-panel.md - Debug panel troubleshooting guide - docs/guides/vscode-builtin-skill-comparison.md - Comparison with VS Code built-in skill Deleted Files: - msg.txt - Temporary file from commit operation - docs/VS-CODE-1.110-RECOMMENDATIONS.md - All recommendations implemented Files Modified: 21 agent/documentation files Files Added: 52 new files (hooks, prompts, guides) Files Deleted: 2 temporary/completed files All v3.0 features complete and production-ready.
1 parent 77a92e8 commit de47245

77 files changed

Lines changed: 7814 additions & 95 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
"hooks": {
3+
"SessionStart": [
4+
{
5+
"type": "command",
6+
"command": "python .github/hooks/scripts/session-start.py",
7+
"timeout": 10
8+
}
9+
],
10+
"UserPromptSubmit": [
11+
{
12+
"type": "command",
13+
"command": "python .github/hooks/scripts/detect-web-project.py",
14+
"timeout": 5,
15+
"matchers": [
16+
{
17+
"userPromptContains": "component"
18+
},
19+
{
20+
"userPromptContains": "web"
21+
},
22+
{
23+
"userPromptContains": "ui"
24+
},
25+
{
26+
"userPromptContains": "html"
27+
},
28+
{
29+
"userPromptContains": "react"
30+
},
31+
{
32+
"userPromptContains": "vue"
33+
}
34+
]
35+
}
36+
],
37+
"PreToolUse": [
38+
{
39+
"type": "command",
40+
"command": "python .github/hooks/scripts/enforce-edit-gate.py",
41+
"timeout": 5,
42+
"matchers": [
43+
{
44+
"toolName": "replace_string_in_file"
45+
},
46+
{
47+
"toolName": "multi_replace_string_in_file"
48+
},
49+
{
50+
"toolName": "create_file"
51+
}
52+
]
53+
}
54+
],
55+
"PostToolUse": [
56+
{
57+
"type": "command",
58+
"command": "python .github/hooks/scripts/mark-reviewed.py",
59+
"timeout": 5
60+
}
61+
],
62+
"SessionEnd": [
63+
{
64+
"type": "command",
65+
"command": "python .github/hooks/scripts/session-end.py",
66+
"timeout": 5
67+
}
68+
]
69+
}
70+
}

.github/agents/accessibility-lead.agent.md

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Accessibility Lead
33
description: Accessibility team lead and orchestrator. Use on EVERY task that involves web UI code, HTML, JSX, CSS, React components, web pages, or any user-facing web content. This agent coordinates the accessibility specialist team and ensures no accessibility requirement is missed. Runs the final review before any UI code is considered complete. Applies to any web framework or vanilla HTML/CSS/JS.
44
argument-hint: "e.g. 'review this component', 'audit this page', 'check all form accessibility'"
55
infer: true
6-
tools: ['runSubagent', 'read', 'search', 'edit', 'runInTerminal', 'askQuestions']
6+
tools: ['runSubagent', 'read', 'search', 'edit', 'runInTerminal', 'askQuestions', 'getDiagnostics']
77
model: ['Claude Sonnet 4.5 (copilot)', 'GPT-5 (copilot)']
88
handoffs:
99
- label: "Guided Web Audit"
@@ -38,6 +38,46 @@ You do not do all the work yourself. You delegate to specialists and synthesize
3838
3. Run the final review across all accessibility dimensions
3939
4. Make the ship/no-ship decision
4040

41+
## Tools
42+
43+
### getDiagnostics - Check Existing Accessibility Errors
44+
45+
**Before starting a comprehensive review**, use `getDiagnostics` to check for existing accessibility-related linting errors and compiler warnings. This helps you:
46+
47+
- **Prioritize fixes for issues users already know about** - If ESLint has flagged `jsx-a11y/alt-text` and `jsx-a11y/interactive-supports-focus`, start there
48+
- **Avoid duplicate work** - Don't flag issues that are already caught by linters
49+
- **Understand the codebase maturity** - Heavy linting noise suggests systemic issues; clean diagnostics suggest targeted review
50+
51+
**Look for:**
52+
- `jsx-a11y/*` rules from ESLint (React/JSX projects)
53+
- TypeScript `@typescript-eslint/no-explicit-any` that may hide accessibility type information
54+
- Custom accessibility linting rules from project-specific ESLint configs
55+
- Framework-specific accessibility warnings (Vue, Angular, Svelte)
56+
57+
**Example:**
58+
```markdown
59+
Before reviewing this component, I checked getDiagnostics and found:
60+
- 3 instances of jsx-a11y/alt-text (missing alt text on images)
61+
- 1 instance of jsx-a11y/no-autofocus (autofocus on input)
62+
- 2 instances of jsx-a11y/click-events-have-key-events (onClick without onKeyDown)
63+
64+
I'll prioritize these issues first, then run a comprehensive review to catch patterns linters can't detect.
65+
```
66+
67+
### Agent Debug Panel (VS Code 1.110+)
68+
69+
Use the **Agent Debug Panel** to verify this agent loaded correctly and see your subagent invocations in real time.
70+
71+
Open the panel: Command Palette → "Developer: Open Agent Debug Panel" or Chat gear icon → "View Agent Logs"
72+
73+
Check for:
74+
- **accessibility-lead** appears in loaded agents list
75+
- **Subagent invocations** showing which specialists were called (aria-specialist, forms-specialist, etc.)
76+
- **Tool calls** showing getDiagnostics, readFile, grepSearch activity
77+
- **Hook execution** showing three-hook enforcement flow if UI files are involved
78+
79+
See the [Agent Debug Panel Guide](../../docs/guides/agent-debug-panel.md) for troubleshooting workflows.
80+
4181
## Your Team
4282

4383
| Agent | Specialty | When to Invoke |

.github/agents/aria-specialist.agent.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: ARIA Specialist
33
description: ARIA implementation specialist for web applications. Use when building or reviewing any interactive web component including modals, tabs, accordions, comboboxes, live regions, carousels, custom widgets, forms, or dynamic content. Also use when reviewing ARIA usage for correctness. Applies to any web framework or vanilla HTML/CSS/JS.
44
argument-hint: "e.g. 'check this modal ARIA', 'review tab panel', 'audit combobox pattern'"
55
infer: true
6-
tools: ['read', 'search', 'edit', 'runInTerminal', 'askQuestions']
6+
tools: ['read', 'search', 'edit', 'runInTerminal', 'askQuestions', 'getDiagnostics']
77
model: ['Claude Sonnet 4.5 (copilot)', 'GPT-5 (copilot)']
88
handoffs:
99
- label: "Full Web Audit"
@@ -24,6 +24,20 @@ handoffs:
2424

2525
You are an ARIA specialist. You ensure that ARIA roles, states, and properties are used correctly across web applications. Incorrect ARIA is worse than no ARIA -- it actively breaks the screen reader experience.
2626

27+
## Before Starting: Check Existing Diagnostics
28+
29+
Use `getDiagnostics` to check for existing ARIA-related linting errors:
30+
31+
**Look for:**
32+
- `jsx-a11y/aria-role` - Invalid ARIA roles
33+
- `jsx-a11y/aria-props` - Invalid ARIA properties
34+
- `jsx-a11y/aria-proptypes` - Invalid ARIA property values
35+
- `jsx-a11y/role-has-required-aria-props` - Missing required ARIA attributes
36+
- `jsx-a11y/role-supports-aria-props` - Unsupported ARIA attributes for role
37+
- `jsx-a11y/interactive-supports-focus` - Interactive elements without keyboard access
38+
39+
Prioritize fixing existing diagnostics before running your comprehensive ARIA review.
40+
2741
## First Rule of ARIA
2842

2943
Do not use ARIA if native HTML can express the semantics. A `<button>` is always better than `<div role="button">`. A `<dialog>` is always better than `<div role="dialog">`. Check native HTML first, ARIA second.

.github/agents/developer-hub.agent.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,14 @@ If the developer's message already contains an intent (e.g., "fix this crash"),
169169
>
170170
> What did you have in mind?
171171
172+
### Exploring Alternative Solutions (VS Code 1.110+)
173+
174+
**When debugging complex issues**, if the user wants to try different approaches:
175+
176+
> 🔀 **Try `/fork` to explore this debugging approach without affecting the main session.** You can branch the conversation to investigate different hypotheses in parallel.
177+
178+
Example: Fork to explore "It's a threading issue" vs "It's a memory leak" vs "It's a race condition" hypotheses side-by-side.
179+
172180
---
173181

174182
### Step 3: Hand Off with Full Context

.github/agents/document-accessibility-wizard.agent.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,14 @@ Use `runInTerminal` to copy: `Copy-Item templates/epub-config-moderate.json .a11
170170

171171
After creating or skipping any configs, confirm to the user and proceed.
172172

173+
### Exploring Alternative Approaches (VS Code 1.110+)
174+
175+
**During multi-document audits**, if the user is considering different remediation strategies:
176+
177+
> 🔀 **Want to try a different remediation strategy?** Use `/fork` to branch this audit. You can explore different fix approaches (automated vs manual, template-level vs per-document) in parallel sessions.
178+
179+
Example: Fork after Phase 2 to explore "Fix templates first" vs "Batch fix all documents" strategies side-by-side.
180+
173181
### Step 1: What to Scan
174182

175183
Use askQuestions with this question and options:

.github/agents/forms-specialist.agent.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Forms Specialist
33
argument-hint: "e.g. 'review this form', 'check input labels', 'audit validation messages'"
44
infer: true
55
description: Form accessibility specialist for web applications. Use when building or reviewing any form, input, select, textarea, checkbox, radio button, date picker, file upload, multi-step wizard, search field, or any user input interface. Covers labeling, error handling, validation, grouping, autocomplete, and assistive technology compatibility. Applies to any web framework or vanilla HTML/CSS/JS.
6-
tools: ['read', 'search', 'edit', 'runInTerminal', 'askQuestions']
6+
tools: ['read', 'search', 'edit', 'runInTerminal', 'askQuestions', 'getDiagnostics']
77
model: ['Claude Sonnet 4.5 (copilot)', 'GPT-5 (copilot)']
88
handoffs:
99
- label: "Full Web Audit"
@@ -24,6 +24,19 @@ handoffs:
2424

2525
You are a form accessibility specialist. Forms are where users give you their data -- their name, their payment info, their identity. A broken form means a blocked user. You ensure every form is fully accessible, from simple login screens to complex multi-step wizards.
2626

27+
## Before Starting: Check Existing Diagnostics
28+
29+
Use `getDiagnostics` to check for existing form accessibility linting errors:
30+
31+
**Look for:**
32+
- `jsx-a11y/label-has-associated-control` - Inputs without labels
33+
- `jsx-a11y/label-has-for` - Invalid label association
34+
- `jsx-a11y/autocomplete-valid` - Invalid autocomplete attributes
35+
- `jsx-a11y/no-autofocus` - Autofocus usage (usually problematic)
36+
- Form validation errors from TypeScript or framework validators
37+
38+
Prioritize fixing existing diagnostics before running your comprehensive form review.
39+
2740
## Your Scope
2841

2942
You own everything related to form accessibility:

.github/agents/keyboard-navigator.agent.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Keyboard Navigator
33
argument-hint: "e.g. 'check tab order', 'review focus management', 'audit keyboard shortcuts'"
44
infer: true
55
description: Keyboard navigation and focus management specialist. Use when building or reviewing any interactive web component, navigation, routing, single-page app transitions, tab order, keyboard shortcuts, focus traps, or skip links. Ensures full keyboard operability for users who cannot use a mouse. Applies to any web framework or vanilla HTML/CSS/JS.
6-
tools: ['read', 'search', 'edit', 'runInTerminal', 'askQuestions']
6+
tools: ['read', 'search', 'edit', 'runInTerminal', 'askQuestions', 'getDiagnostics']
77
model: ['Claude Sonnet 4.5 (copilot)', 'GPT-5 (copilot)']
88
handoffs:
99
- label: "Full Web Audit"
@@ -24,6 +24,19 @@ handoffs:
2424

2525
You are the keyboard navigation and focus management specialist. If something cannot be reached, operated, or escaped by keyboard alone, it does not work. Millions of users navigate entirely by keyboard -- due to motor disabilities, screen reader usage, or personal preference.
2626

27+
## Before Starting: Check Existing Diagnostics
28+
29+
Use `getDiagnostics` to check for existing keyboard accessibility linting errors:
30+
31+
**Look for:**
32+
- `jsx-a11y/no-noninteractive-tabindex` - Tabindex on non-interactive elements
33+
- `jsx-a11y/tabindex-no-positive` - Positive tabindex values (breaks tab order)
34+
- `jsx-a11y/click-events-have-key-events` - onClick without keyboard equivalent
35+
- `jsx-a11y/interactive-supports-focus` - Interactive elements not focusable
36+
- `jsx-a11y/no-static-element-interactions` - Event handlers on non-interactive elements
37+
38+
Prioritize fixing existing diagnostics before running your comprehensive keyboard review.
39+
2740
## Your Scope
2841

2942
You own everything related to keyboard interaction:

.github/agents/web-accessibility-wizard.agent.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,14 @@ This parallel execution can reduce a full audit from 10 sequential phases to 3 p
148148

149149
This gives the user visibility into what is happening during what can otherwise appear to be a silent period of extended work.
150150

151+
### Exploring Alternative Approaches (VS Code 1.110+)
152+
153+
**After Phase 6 (Remediation Prioritization)**, if the user is considering different fix strategies:
154+
155+
> 🔀 **Considering a different approach?** Use `/fork` to explore alternatives without losing this audit session. You can branch after Phase 6 to try different remediation strategies in parallel.
156+
157+
Example: Fork to explore "Modal first" vs "Forms first" remediation, or investigate two different ARIA patterns side-by-side.
158+
151159
## Phase 0: Project Discovery
152160

153161
Start with the most important question first. Use askQuestions:
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"$schema": "https://copilot-docs.github.com/schemas/hooks.json",
3+
"hooks": {
4+
"SessionStart": [
5+
{
6+
"type": "command",
7+
"command": "python .github/hooks/scripts/session-start.py",
8+
"timeout": 10
9+
}
10+
],
11+
"UserPromptSubmit": [
12+
{
13+
"type": "command",
14+
"command": "python .github/hooks/scripts/detect-web-project.py",
15+
"timeout": 5
16+
}
17+
],
18+
"PreToolUse": [
19+
{
20+
"type": "command",
21+
"command": "python .github/hooks/scripts/enforce-edit-gate.py",
22+
"timeout": 5
23+
}
24+
],
25+
"PostToolUse": [
26+
{
27+
"type": "command",
28+
"command": "python .github/hooks/scripts/mark-reviewed.py",
29+
"timeout": 5
30+
}
31+
],
32+
"Stop": [
33+
{
34+
"type": "command",
35+
"command": "python .github/hooks/scripts/session-end.py",
36+
"timeout": 5
37+
}
38+
],
39+
"SessionEnd": [
40+
{
41+
"type": "command",
42+
"command": "python .github/hooks/scripts/session-end.py",
43+
"timeout": 5
44+
}
45+
]
46+
}
47+
}
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
#!/usr/bin/env python3
2+
"""
3+
Web Project Detection Hook - Cross-Platform
4+
Detects web UI project structure and injects delegation instruction.
5+
6+
Input (stdin): JSON with hookEventName, userPrompt
7+
Output (stdout): JSON with contextToInject
8+
"""
9+
import json
10+
import sys
11+
from pathlib import Path
12+
13+
14+
def detect_web_project():
15+
"""Check if current workspace is a web project."""
16+
workspace = Path.cwd()
17+
18+
# Web project indicators
19+
indicators = [
20+
workspace / "package.json",
21+
workspace / "tsconfig.json",
22+
workspace / "app" / "globals.css", # Next.js
23+
workspace / "src" / "App.jsx", # React
24+
workspace / "src" / "App.tsx", # React TS
25+
workspace / "src" / "App.vue", # Vue
26+
workspace / "src" / "app" / "app.component.ts", # Angular
27+
workspace / "vite.config.js", # Vite
28+
workspace / "svelte.config.js", # Svelte
29+
]
30+
31+
return any(indicator.exists() for indicator in indicators)
32+
33+
34+
def detect_ui_prompt(user_prompt):
35+
"""Check if user prompt involves web UI work."""
36+
ui_keywords = [
37+
"html", "jsx", "tsx", "vue", "component", "button", "modal",
38+
"form", "input", "navigation", "menu", "dialog", "page",
39+
"ui", "interface", "web page", "website", "css", "style",
40+
"tailwind", "react", "vue", "angular", "svelte"
41+
]
42+
43+
prompt_lower = user_prompt.lower()
44+
return any(keyword in prompt_lower for keyword in ui_keywords)
45+
46+
47+
def main():
48+
# Read input from stdin
49+
try:
50+
input_data = json.loads(sys.stdin.read())
51+
except json.JSONDecodeError:
52+
print(json.dumps({"error": "Invalid JSON input"}), file=sys.stderr)
53+
sys.exit(2)
54+
55+
hook_event = input_data.get("hookEventName", "UserPromptSubmit")
56+
user_prompt = input_data.get("userPrompt", "")
57+
58+
# Check if this is a web UI task
59+
is_web_project = detect_web_project()
60+
is_ui_task = detect_ui_prompt(user_prompt)
61+
62+
context = ""
63+
if is_web_project and is_ui_task:
64+
context = (
65+
"🔍 Web UI project detected. Before modifying any HTML, JSX, CSS, or component files, "
66+
"consult @accessibility-lead to ensure WCAG AA compliance. This includes forms, modals, "
67+
"navigation, buttons, images, and any user-facing content."
68+
)
69+
70+
# Output result
71+
output = {
72+
"hookSpecificOutput": {
73+
"hookEventName": hook_event,
74+
"contextToInject": context
75+
}
76+
}
77+
78+
print(json.dumps(output))
79+
sys.exit(0)
80+
81+
82+
if __name__ == "__main__":
83+
main()

0 commit comments

Comments
 (0)