Skip to content

Commit 7c589a8

Browse files
committed
feat: Add MCP enhancements, agent teams, docs, plugin packaging, and platform references
- Add extract_document_metadata and batch_scan_documents tools to MCP server - Add Agent Teams enterprise config (AGENTS.md) - Add cross-platform handoff guide for Claude Code and Copilot - Add advanced scanning patterns (background, worktree, large libraries) - Add plugin packaging guide for agent distribution - Add platform references with all documentation sources and feature mapping - Add SessionEnd quality gate hook script - Update copilot-instructions.md with hidden helpers, skills, hooks, teams, docs - Update README.md with new project structure entries
1 parent 874ed4b commit 7c589a8

10 files changed

Lines changed: 1283 additions & 5 deletions

File tree

.github/agents/AGENTS.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Agent Teams Configuration
2+
3+
This file defines coordinated multi-agent workflows for enterprise document accessibility scanning.
4+
5+
## Team: Document Accessibility Audit
6+
7+
**Lead:** `document-accessibility-wizard`
8+
9+
**Members:**
10+
- `document-inventory` — File discovery, inventory building, delta detection
11+
- `cross-document-analyzer` — Pattern detection, severity scoring, template analysis
12+
- `word-accessibility` — DOCX scanning and remediation (DOCX-* rules)
13+
- `excel-accessibility` — XLSX scanning and remediation (XLSX-* rules)
14+
- `powerpoint-accessibility` — PPTX scanning and remediation (PPTX-* rules)
15+
- `pdf-accessibility` — PDF scanning and remediation (PDFUA.*, PDFBP.*, PDFQ.* rules)
16+
- `office-scan-config` — Office scan configuration management
17+
- `pdf-scan-config` — PDF scan configuration management
18+
19+
**Workflow:**
20+
1. `document-accessibility-wizard` receives the user request and runs Phase 0 (discovery)
21+
2. `document-inventory` discovers and inventories all matching files
22+
3. File-type specialists (`word-accessibility`, `excel-accessibility`, `powerpoint-accessibility`, `pdf-accessibility`) scan documents in parallel by type
23+
4. `cross-document-analyzer` analyzes patterns, computes severity scores, and detects templates
24+
5. `document-accessibility-wizard` compiles the final report and presents follow-up options
25+
26+
**Handoffs:**
27+
- After audit, user can hand off to any format specialist for targeted remediation
28+
- `accessibility-wizard` handles web audit handoff when document audit is complete
29+
30+
## Team: Web Accessibility Audit
31+
32+
**Lead:** `accessibility-lead`
33+
34+
**Members:**
35+
- `aria-specialist` — ARIA roles, states, properties
36+
- `modal-specialist` — Dialogs, drawers, overlays
37+
- `contrast-master` — Color contrast, visual design
38+
- `keyboard-navigator` — Tab order, focus management
39+
- `live-region-controller` — Dynamic content, toasts, loading
40+
- `forms-specialist` — Forms, inputs, validation
41+
- `alt-text-headings` — Images, alt text, headings, landmarks
42+
- `tables-data-specialist` — Data tables, grids
43+
- `link-checker` — Link text quality
44+
- `testing-coach` — Testing guidance
45+
46+
**Workflow:**
47+
1. `accessibility-lead` coordinates specialists based on the content being reviewed
48+
2. Relevant specialists are invoked based on the code context (forms, modals, tables, etc.)
49+
3. `accessibility-lead` compiles findings and resolves any conflicting guidance
50+
4. `testing-coach` provides manual testing instructions for issues that require human verification
51+
52+
## Team: Full Audit (Web + Documents)
53+
54+
**Lead:** `accessibility-lead`
55+
56+
**Workflow:**
57+
1. `accessibility-wizard` runs the web accessibility audit
58+
2. `document-accessibility-wizard` runs the document accessibility audit
59+
3. `accessibility-lead` compiles a unified report covering both web and document findings
60+
61+
## Enterprise Scanning Patterns
62+
63+
### Large Repository Scanning
64+
65+
For repositories with 100+ documents:
66+
67+
1. Use `document-inventory` with delta scanning to identify changed files
68+
2. Scan changed files first with strict profile
69+
3. Use moderate profile for full repository baseline scans
70+
4. Schedule weekly re-scans via CI/CD (see Phase 6 in document-accessibility-wizard)
71+
72+
### Multi-Team Coordination
73+
74+
When multiple teams own different document folders:
75+
76+
1. Create per-folder `.a11y-office-config.json` with team-appropriate profiles
77+
2. Use folder-scoped scans to generate per-team reports
78+
3. Use `cross-document-analyzer` to detect organization-wide patterns
79+
4. Generate per-team scorecards and a rollup organizational scorecard
80+
81+
### Compliance Reporting
82+
83+
For Section 508, EN 301 549, or organizational compliance:
84+
85+
1. Run strict profile scan across all document types
86+
2. Generate VPAT/ACR using `generate-vpat` prompt
87+
3. Track remediation progress with `compare-audits` prompt
88+
4. Export SARIF for integration with compliance tracking systems

.github/copilot-instructions.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,42 @@ Select these agents from the agents dropdown in Copilot Chat, or type `/agents`
3131
| testing-coach | Screen reader testing, keyboard testing, automated testing guidance |
3232
| wcag-guide | WCAG 2.2 criteria explanations, conformance levels, what changed |
3333

34+
### Hidden Helper Sub-Agents
35+
36+
These agents are not user-invokable. They are used internally by the document-accessibility-wizard to parallelize scanning and analysis:
37+
38+
| Agent | Purpose |
39+
|-------|---------|
40+
| document-inventory | File discovery, inventory building, delta detection across folders |
41+
| cross-document-analyzer | Cross-document pattern detection, severity scoring, template analysis |
42+
43+
### Agent Skills
44+
45+
Reusable knowledge modules in `.github/skills/` that agents reference automatically:
46+
47+
| Skill | Domain |
48+
|-------|--------|
49+
| document-scanning | File discovery commands, delta detection, scan configuration profiles |
50+
| accessibility-rules | Cross-format accessibility rule reference with WCAG 2.2 mapping (DOCX, XLSX, PPTX, PDF) |
51+
| report-generation | Audit report formatting, severity scoring formulas, VPAT/ACR compliance export |
52+
53+
### Lifecycle Hooks
54+
55+
Session hooks in `.github/hooks/` that inject context automatically:
56+
57+
| Hook | When | Purpose |
58+
|------|------|---------|
59+
| SessionStart | Beginning of session | Auto-detects scan config files and previous audit reports; injects relevant context |
60+
| SessionEnd | End of session | Quality gate — validates audit report completeness and prompts for missing sections |
61+
62+
### Agent Teams
63+
64+
Team coordination is defined in `.github/agents/AGENTS.md`. Three defined teams:
65+
66+
- **Document Accessibility Audit** — led by document-accessibility-wizard with format-specific sub-agents
67+
- **Web Accessibility Audit** — led by accessibility-lead with all web specialist agents
68+
- **Full Audit** — combined web + document audit workflow
69+
3470
### Decision Matrix
3571

3672
- **New component or page:** Always apply aria-specialist + keyboard-navigator + alt-text-headings guidance. Add forms-specialist for any inputs, contrast-master for styling, modal-specialist for overlays, live-region-controller for dynamic updates, tables-data-specialist for any data tables.
@@ -80,4 +116,13 @@ Use the VS Code tasks `A11y: Init Office Scan Config` and `A11y: Init PDF Scan C
80116
- Modals trap focus and return focus on close
81117
- Live regions for all dynamic content updates
82118

119+
### Advanced Documentation
120+
121+
Additional guides in `.github/docs/`:
122+
123+
- **cross-platform-handoff.md** — Seamless handoff between Claude Code and Copilot agent environments
124+
- **advanced-scanning-patterns.md** — Background scanning, worktree isolation, and large library strategies
125+
- **plugin-packaging.md** — Packaging and distributing agents for different environments
126+
- **platform-references.md** — All external documentation sources used to build this project, with feature-to-source mapping
127+
83128
For tasks that do not involve any user-facing web content (backend logic, scripts, database work), these requirements do not apply.
Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
# Advanced Scanning Patterns
2+
3+
Patterns for background execution and isolated scanning contexts when working with large document libraries.
4+
5+
## Background Scanning
6+
7+
### When to Use Background Scanning
8+
9+
- Document libraries with 50+ files where scanning takes several minutes
10+
- Scheduled nightly or weekly audit runs
11+
- CI/CD pipeline integration where scanning runs asynchronously
12+
13+
### Claude Code: Background Task Pattern
14+
15+
Claude Code supports the `Task` tool for spawning parallel sub-agents. For background-style scanning:
16+
17+
```
18+
Scan these 4 document types in parallel:
19+
1. Task 1: Scan all .docx files in /docs/ → return findings summary
20+
2. Task 2: Scan all .xlsx files in /docs/ → return findings summary
21+
3. Task 3: Scan all .pptx files in /docs/ → return findings summary
22+
4. Task 4: Scan all .pdf files in /docs/ → return findings summary
23+
24+
Wait for all tasks to complete, then merge results.
25+
```
26+
27+
Each task runs in its own context window, scanning independently. The orchestrator collects results and merges them.
28+
29+
**Limitations:**
30+
- Tasks share the same filesystem — no isolation between tasks
31+
- Each task has its own context window but sees the same working directory
32+
- Progress reporting happens only when tasks complete
33+
34+
### GitHub Copilot: Sub-Agent Pattern
35+
36+
Copilot agents use the `agents` frontmatter to reference sub-agents:
37+
38+
```yaml
39+
agents: ['word-accessibility', 'excel-accessibility', 'powerpoint-accessibility', 'pdf-accessibility', 'document-inventory', 'cross-document-analyzer']
40+
```
41+
42+
The orchestrator (document-accessibility-wizard) delegates to sub-agents sequentially or by type group. True background execution is not yet supported — sub-agents run within the main conversation context.
43+
44+
**Practical pattern for large scans:**
45+
1. Use `document-inventory` to build the file list
46+
2. Group files by type
47+
3. Process each type group as a batch
48+
4. Report progress after each group completes
49+
50+
### CI/CD Background Pattern
51+
52+
For true background execution, use CI/CD pipelines:
53+
54+
```yaml
55+
# GitHub Actions — runs asynchronously on push
56+
name: Document Accessibility Audit
57+
on:
58+
push:
59+
paths: ['**/*.docx', '**/*.xlsx', '**/*.pptx', '**/*.pdf']
60+
jobs:
61+
audit:
62+
runs-on: ubuntu-latest
63+
steps:
64+
- uses: actions/checkout@v4
65+
- run: node .github/scripts/office-a11y-scan.mjs
66+
- run: node .github/scripts/pdf-a11y-scan.mjs
67+
- uses: actions/upload-artifact@v4
68+
with:
69+
name: audit-report
70+
path: DOCUMENT-ACCESSIBILITY-AUDIT.md
71+
```
72+
73+
This runs the scan in the background. Results are available as build artifacts.
74+
75+
## Worktree Isolation
76+
77+
### When to Use Isolated Scanning
78+
79+
- Scanning documents in a branch without switching your working directory
80+
- Running audits against a specific git tag or release
81+
- Comparing documents across branches
82+
83+
### Git Worktree Pattern
84+
85+
Use `git worktree` to create isolated copies for scanning without affecting your main working directory:
86+
87+
```bash
88+
# Create a worktree for the target branch
89+
git worktree add ../audit-workspace release/v2.0
90+
91+
# Run scan against the worktree
92+
cd ../audit-workspace
93+
# (run scanning tools here)
94+
95+
# Clean up after scanning
96+
cd ..
97+
git worktree remove audit-workspace
98+
```
99+
100+
### Temp Directory Pattern
101+
102+
For non-git scenarios or when you need a clean scanning environment:
103+
104+
```powershell
105+
# PowerShell: Copy documents to temp for isolated scanning
106+
$ScanDir = Join-Path $env:TEMP "a11y-scan-$(Get-Date -Format 'yyyyMMdd-HHmmss')"
107+
New-Item -ItemType Directory -Path $ScanDir
108+
Copy-Item -Path "docs\*.docx","docs\*.xlsx","docs\*.pptx","docs\*.pdf" -Destination $ScanDir
109+
110+
# Run scan in isolated directory
111+
# (scan commands targeting $ScanDir)
112+
113+
# Clean up
114+
Remove-Item -Recurse -Force $ScanDir
115+
```
116+
117+
```bash
118+
# Bash: Copy documents to temp for isolated scanning
119+
SCAN_DIR=$(mktemp -d)
120+
cp docs/*.docx docs/*.xlsx docs/*.pptx docs/*.pdf "$SCAN_DIR/"
121+
122+
# Run scan in isolated directory
123+
# (scan commands targeting $SCAN_DIR)
124+
125+
# Clean up
126+
rm -rf "$SCAN_DIR"
127+
```
128+
129+
### Branch Comparison Pattern
130+
131+
Compare document accessibility across branches:
132+
133+
```bash
134+
# Scan current branch
135+
node .github/scripts/office-a11y-scan.mjs --output AUDIT-current.md
136+
137+
# Create worktree for comparison branch
138+
git worktree add ../compare-branch main
139+
140+
# Scan comparison branch
141+
cd ../compare-branch
142+
node .github/scripts/office-a11y-scan.mjs --output ../AUDIT-main.md
143+
144+
# Compare results
145+
cd ..
146+
# Use compare-audits prompt or diff the reports
147+
git worktree remove compare-branch
148+
```
149+
150+
## Large Library Strategies
151+
152+
### Tiered Scanning
153+
154+
For very large document libraries (500+ documents):
155+
156+
**Tier 1 — Triage (minimal profile):**
157+
Scan all documents with `errors only` to identify the worst offenders.
158+
159+
**Tier 2 — Priority (moderate profile):**
160+
Re-scan the worst 20% with errors and warnings.
161+
162+
**Tier 3 — Comprehensive (strict profile):**
163+
Full scan of high-priority or public-facing documents.
164+
165+
### Incremental Scanning
166+
167+
Rather than scanning the entire library each time:
168+
169+
1. Run a full baseline scan once
170+
2. On subsequent runs, use delta scanning (changed files only)
171+
3. Compare each delta scan against the baseline
172+
4. Run a full re-scan quarterly to catch configuration drift
173+
174+
### Sampling Strategy
175+
176+
For initial assessment of a large library:
177+
178+
1. Select a proportional sample across document types and folders
179+
2. Scan 10-20 representative files
180+
3. Extrapolate issue rates to estimate total remediation effort
181+
4. Use the sample results to prioritize which folders to scan first

0 commit comments

Comments
 (0)