aiwcli 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (204) hide show
  1. package/README.md +1248 -0
  2. package/bin/dev.cmd +3 -0
  3. package/bin/dev.js +16 -0
  4. package/bin/run.cmd +3 -0
  5. package/bin/run.js +19 -0
  6. package/dist/commands/branch.d.ts +45 -0
  7. package/dist/commands/branch.js +488 -0
  8. package/dist/commands/clean.d.ts +34 -0
  9. package/dist/commands/clean.js +186 -0
  10. package/dist/commands/clear.d.ts +51 -0
  11. package/dist/commands/clear.js +835 -0
  12. package/dist/commands/init/index.d.ts +107 -0
  13. package/dist/commands/init/index.js +565 -0
  14. package/dist/commands/launch.d.ts +21 -0
  15. package/dist/commands/launch.js +108 -0
  16. package/dist/index.d.ts +1 -0
  17. package/dist/index.js +1 -0
  18. package/dist/lib/base-command.d.ts +114 -0
  19. package/dist/lib/base-command.js +153 -0
  20. package/dist/lib/bmad-installer.d.ts +38 -0
  21. package/dist/lib/bmad-installer.js +145 -0
  22. package/dist/lib/claude-settings-types.d.ts +102 -0
  23. package/dist/lib/claude-settings-types.js +5 -0
  24. package/dist/lib/config.d.ts +25 -0
  25. package/dist/lib/config.js +46 -0
  26. package/dist/lib/debug.d.ts +39 -0
  27. package/dist/lib/debug.js +74 -0
  28. package/dist/lib/env-compat.d.ts +26 -0
  29. package/dist/lib/env-compat.js +35 -0
  30. package/dist/lib/errors.d.ts +126 -0
  31. package/dist/lib/errors.js +145 -0
  32. package/dist/lib/generic-merge.d.ts +74 -0
  33. package/dist/lib/generic-merge.js +105 -0
  34. package/dist/lib/git/branch.d.ts +67 -0
  35. package/dist/lib/git/branch.js +155 -0
  36. package/dist/lib/git/index.d.ts +11 -0
  37. package/dist/lib/git/index.js +13 -0
  38. package/dist/lib/git/safety-checks.d.ts +44 -0
  39. package/dist/lib/git/safety-checks.js +102 -0
  40. package/dist/lib/git/types.d.ts +31 -0
  41. package/dist/lib/git/types.js +6 -0
  42. package/dist/lib/git/worktree.d.ts +67 -0
  43. package/dist/lib/git/worktree.js +220 -0
  44. package/dist/lib/gitignore-manager.d.ts +10 -0
  45. package/dist/lib/gitignore-manager.js +60 -0
  46. package/dist/lib/hooks-merger.d.ts +28 -0
  47. package/dist/lib/hooks-merger.js +94 -0
  48. package/dist/lib/ide-path-resolver.d.ts +102 -0
  49. package/dist/lib/ide-path-resolver.js +129 -0
  50. package/dist/lib/index.d.ts +13 -0
  51. package/dist/lib/index.js +22 -0
  52. package/dist/lib/output.d.ts +51 -0
  53. package/dist/lib/output.js +76 -0
  54. package/dist/lib/paths.d.ts +66 -0
  55. package/dist/lib/paths.js +136 -0
  56. package/dist/lib/quiet.d.ts +12 -0
  57. package/dist/lib/quiet.js +17 -0
  58. package/dist/lib/settings-hierarchy.d.ts +42 -0
  59. package/dist/lib/settings-hierarchy.js +105 -0
  60. package/dist/lib/spawn.d.ts +105 -0
  61. package/dist/lib/spawn.js +157 -0
  62. package/dist/lib/spinner.d.ts +19 -0
  63. package/dist/lib/spinner.js +34 -0
  64. package/dist/lib/stdin.d.ts +48 -0
  65. package/dist/lib/stdin.js +60 -0
  66. package/dist/lib/template-installer.d.ts +92 -0
  67. package/dist/lib/template-installer.js +375 -0
  68. package/dist/lib/template-linter.d.ts +49 -0
  69. package/dist/lib/template-linter.js +173 -0
  70. package/dist/lib/template-merger.d.ts +47 -0
  71. package/dist/lib/template-merger.js +173 -0
  72. package/dist/lib/template-resolver.d.ts +20 -0
  73. package/dist/lib/template-resolver.js +60 -0
  74. package/dist/lib/terminal.d.ts +102 -0
  75. package/dist/lib/terminal.js +245 -0
  76. package/dist/lib/tty-detection.d.ts +62 -0
  77. package/dist/lib/tty-detection.js +83 -0
  78. package/dist/lib/user-utils.d.ts +5 -0
  79. package/dist/lib/user-utils.js +23 -0
  80. package/dist/lib/version.d.ts +99 -0
  81. package/dist/lib/version.js +144 -0
  82. package/dist/lib/watch-templates.d.ts +6 -0
  83. package/dist/lib/watch-templates.js +73 -0
  84. package/dist/lib/windsurf-hooks-hierarchy.d.ts +30 -0
  85. package/dist/lib/windsurf-hooks-hierarchy.js +66 -0
  86. package/dist/lib/windsurf-hooks-merger.d.ts +26 -0
  87. package/dist/lib/windsurf-hooks-merger.js +53 -0
  88. package/dist/lib/windsurf-hooks-types.d.ts +33 -0
  89. package/dist/lib/windsurf-hooks-types.js +5 -0
  90. package/dist/templates/CLAUDE.md +174 -0
  91. package/dist/templates/_shared/.claude/commands/handoff.md +14 -0
  92. package/dist/templates/_shared/.claude/settings.json +61 -0
  93. package/dist/templates/_shared/.codex/workflows/handoff.md +14 -0
  94. package/dist/templates/_shared/.windsurf/workflows/handoff.md +14 -0
  95. package/dist/templates/_shared/hooks/__init__.py +16 -0
  96. package/dist/templates/_shared/hooks/archive_plan.py +270 -0
  97. package/dist/templates/_shared/hooks/context_enforcer.py +621 -0
  98. package/dist/templates/_shared/hooks/context_monitor.py +322 -0
  99. package/dist/templates/_shared/hooks/file-suggestion.py +188 -0
  100. package/dist/templates/_shared/hooks/task_create_capture.py +194 -0
  101. package/dist/templates/_shared/hooks/task_update_capture.py +254 -0
  102. package/dist/templates/_shared/hooks/user_prompt_submit.py +157 -0
  103. package/dist/templates/_shared/lib/__init__.py +1 -0
  104. package/dist/templates/_shared/lib/base/__init__.py +49 -0
  105. package/dist/templates/_shared/lib/base/__pycache__/constants.cpython-313.pyc +0 -0
  106. package/dist/templates/_shared/lib/base/atomic_write.py +180 -0
  107. package/dist/templates/_shared/lib/base/constants.py +299 -0
  108. package/dist/templates/_shared/lib/base/inference.py +189 -0
  109. package/dist/templates/_shared/lib/base/utils.py +216 -0
  110. package/dist/templates/_shared/lib/context/__init__.py +119 -0
  111. package/dist/templates/_shared/lib/context/__pycache__/__init__.cpython-313.pyc +0 -0
  112. package/dist/templates/_shared/lib/context/__pycache__/cache.cpython-313.pyc +0 -0
  113. package/dist/templates/_shared/lib/context/__pycache__/context_manager.cpython-313.pyc +0 -0
  114. package/dist/templates/_shared/lib/context/__pycache__/event_log.cpython-313.pyc +0 -0
  115. package/dist/templates/_shared/lib/context/cache.py +446 -0
  116. package/dist/templates/_shared/lib/context/context_manager.py +1171 -0
  117. package/dist/templates/_shared/lib/context/discovery.py +486 -0
  118. package/dist/templates/_shared/lib/context/event_log.py +308 -0
  119. package/dist/templates/_shared/lib/context/plan_archive.py +247 -0
  120. package/dist/templates/_shared/lib/context/task_sync.py +367 -0
  121. package/dist/templates/_shared/lib/handoff/__init__.py +22 -0
  122. package/dist/templates/_shared/lib/handoff/document_generator.py +307 -0
  123. package/dist/templates/_shared/lib/templates/README.md +215 -0
  124. package/dist/templates/_shared/lib/templates/__init__.py +40 -0
  125. package/dist/templates/_shared/lib/templates/formatters.py +147 -0
  126. package/dist/templates/_shared/lib/templates/plan_context.py +119 -0
  127. package/dist/templates/_shared/scripts/save_handoff.py +99 -0
  128. package/dist/templates/_shared/workflows/handoff.md +212 -0
  129. package/dist/templates/cc-native/.claude/agents/cc-native/ACCESSIBILITY-TESTER.md +80 -0
  130. package/dist/templates/cc-native/.claude/agents/cc-native/ARCHITECT-REVIEWER.md +75 -0
  131. package/dist/templates/cc-native/.claude/agents/cc-native/ASSUMPTION-CHAIN-TRACER.md +239 -0
  132. package/dist/templates/cc-native/.claude/agents/cc-native/CLARITY-AUDITOR.md +109 -0
  133. package/dist/templates/cc-native/.claude/agents/cc-native/CODE-REVIEWER.md +71 -0
  134. package/dist/templates/cc-native/.claude/agents/cc-native/COMPLETENESS-CHECKER.md +104 -0
  135. package/dist/templates/cc-native/.claude/agents/cc-native/CONTEXT-EXTRACTOR.md +93 -0
  136. package/dist/templates/cc-native/.claude/agents/cc-native/DEVILS-ADVOCATE.md +223 -0
  137. package/dist/templates/cc-native/.claude/agents/cc-native/DOCUMENTATION-REVIEWER.md +73 -0
  138. package/dist/templates/cc-native/.claude/agents/cc-native/FEASIBILITY-ANALYST.md +93 -0
  139. package/dist/templates/cc-native/.claude/agents/cc-native/FRESH-PERSPECTIVE.md +103 -0
  140. package/dist/templates/cc-native/.claude/agents/cc-native/HANDOFF-READINESS.md +145 -0
  141. package/dist/templates/cc-native/.claude/agents/cc-native/HIDDEN-COMPLEXITY-DETECTOR.md +248 -0
  142. package/dist/templates/cc-native/.claude/agents/cc-native/INCENTIVE-MAPPER.md +235 -0
  143. package/dist/templates/cc-native/.claude/agents/cc-native/PENETRATION-TESTER.md +80 -0
  144. package/dist/templates/cc-native/.claude/agents/cc-native/PERFORMANCE-ENGINEER.md +76 -0
  145. package/dist/templates/cc-native/.claude/agents/cc-native/PLAN-ORCHESTRATOR.md +141 -0
  146. package/dist/templates/cc-native/.claude/agents/cc-native/PRECEDENT-FINDER.md +240 -0
  147. package/dist/templates/cc-native/.claude/agents/cc-native/REVERSIBILITY-ANALYST.md +211 -0
  148. package/dist/templates/cc-native/.claude/agents/cc-native/RISK-ASSESSOR.md +101 -0
  149. package/dist/templates/cc-native/.claude/agents/cc-native/SECOND-ORDER-ANALYST.md +197 -0
  150. package/dist/templates/cc-native/.claude/agents/cc-native/SIMPLICITY-GUARDIAN.md +97 -0
  151. package/dist/templates/cc-native/.claude/agents/cc-native/SKEPTIC.md +349 -0
  152. package/dist/templates/cc-native/.claude/agents/cc-native/STAKEHOLDER-ADVOCATE.md +106 -0
  153. package/dist/templates/cc-native/.claude/agents/cc-native/TRADE-OFF-ILLUMINATOR.md +205 -0
  154. package/dist/templates/cc-native/.claude/commands/cc-native/fresh-perspective.md +8 -0
  155. package/dist/templates/cc-native/.claude/commands/cc-native/specdev.md +10 -0
  156. package/dist/templates/cc-native/.claude/settings.json +119 -0
  157. package/dist/templates/cc-native/.windsurf/workflows/cc-native/fix.md +8 -0
  158. package/dist/templates/cc-native/.windsurf/workflows/cc-native/fresh-perspective.md +8 -0
  159. package/dist/templates/cc-native/.windsurf/workflows/cc-native/implement.md +8 -0
  160. package/dist/templates/cc-native/.windsurf/workflows/cc-native/research.md +8 -0
  161. package/dist/templates/cc-native/CC-NATIVE-README.md +192 -0
  162. package/dist/templates/cc-native/MIGRATION.md +86 -0
  163. package/dist/templates/cc-native/TEMPLATE-SCHEMA.md +331 -0
  164. package/dist/templates/cc-native/_cc-native/docs/PERMISSION_REQUEST_VERIFICATION.md +147 -0
  165. package/dist/templates/cc-native/_cc-native/hooks/__pycache__/add_plan_context.cpython-313.pyc +0 -0
  166. package/dist/templates/cc-native/_cc-native/hooks/__pycache__/archive_plan.cpython-313.pyc +0 -0
  167. package/dist/templates/cc-native/_cc-native/hooks/__pycache__/cc-native-agent-review.cpython-313.pyc +0 -0
  168. package/dist/templates/cc-native/_cc-native/hooks/__pycache__/cc-native-plan-review.cpython-313.pyc +0 -0
  169. package/dist/templates/cc-native/_cc-native/hooks/__pycache__/test_permission_request.cpython-313.pyc +0 -0
  170. package/dist/templates/cc-native/_cc-native/hooks/add_plan_context.py +150 -0
  171. package/dist/templates/cc-native/_cc-native/hooks/cc-native-plan-review.py +746 -0
  172. package/dist/templates/cc-native/_cc-native/hooks/suggest-fresh-perspective.py +339 -0
  173. package/dist/templates/cc-native/_cc-native/lib/__init__.py +57 -0
  174. package/dist/templates/cc-native/_cc-native/lib/__pycache__/__init__.cpython-313.pyc +0 -0
  175. package/dist/templates/cc-native/_cc-native/lib/__pycache__/orchestrator.cpython-313.pyc +0 -0
  176. package/dist/templates/cc-native/_cc-native/lib/__pycache__/state.cpython-313.pyc +0 -0
  177. package/dist/templates/cc-native/_cc-native/lib/__pycache__/utils.cpython-313.pyc +0 -0
  178. package/dist/templates/cc-native/_cc-native/lib/async_archive.py +68 -0
  179. package/dist/templates/cc-native/_cc-native/lib/atomic_write.py +98 -0
  180. package/dist/templates/cc-native/_cc-native/lib/constants.py +45 -0
  181. package/dist/templates/cc-native/_cc-native/lib/orchestrator.py +273 -0
  182. package/dist/templates/cc-native/_cc-native/lib/reviewers/__init__.py +28 -0
  183. package/dist/templates/cc-native/_cc-native/lib/reviewers/__pycache__/__init__.cpython-313.pyc +0 -0
  184. package/dist/templates/cc-native/_cc-native/lib/reviewers/__pycache__/agent.cpython-313.pyc +0 -0
  185. package/dist/templates/cc-native/_cc-native/lib/reviewers/__pycache__/base.cpython-313.pyc +0 -0
  186. package/dist/templates/cc-native/_cc-native/lib/reviewers/__pycache__/codex.cpython-313.pyc +0 -0
  187. package/dist/templates/cc-native/_cc-native/lib/reviewers/__pycache__/gemini.cpython-313.pyc +0 -0
  188. package/dist/templates/cc-native/_cc-native/lib/reviewers/agent.py +164 -0
  189. package/dist/templates/cc-native/_cc-native/lib/reviewers/base.py +89 -0
  190. package/dist/templates/cc-native/_cc-native/lib/reviewers/codex.py +119 -0
  191. package/dist/templates/cc-native/_cc-native/lib/reviewers/gemini.py +103 -0
  192. package/dist/templates/cc-native/_cc-native/lib/state.py +251 -0
  193. package/dist/templates/cc-native/_cc-native/lib/utils.py +830 -0
  194. package/dist/templates/cc-native/_cc-native/plan-review.config.json +76 -0
  195. package/dist/templates/cc-native/_cc-native/scripts/__pycache__/aggregate_agents.cpython-313.pyc +0 -0
  196. package/dist/templates/cc-native/_cc-native/scripts/aggregate_agents.py +151 -0
  197. package/dist/templates/cc-native/_cc-native/workflows/fresh-perspective.md +134 -0
  198. package/dist/templates/cc-native/_cc-native/workflows/specdev.md +9 -0
  199. package/dist/types/exit-codes.d.ts +11 -0
  200. package/dist/types/exit-codes.js +10 -0
  201. package/dist/types/index.d.ts +5 -0
  202. package/dist/types/index.js +7 -0
  203. package/oclif.manifest.json +405 -0
  204. package/package.json +109 -0
@@ -0,0 +1,212 @@
1
+ # Handoff Workflow
2
+
3
+ Generate a handoff document summarizing the current session's work, decisions, and pending items. Optionally update a plan document to track completed vs remaining tasks.
4
+
5
+ ## Triggers
6
+
7
+ - `/handoff` command
8
+ - `/handoff path/to/PLAN.md` - with plan document integration
9
+ - Phrases like "write a handoff", "create a session summary", "document what we did", "end session with notes"
10
+
11
+ ## Arguments
12
+
13
+ - `$ARGUMENTS` - Optional path to a plan document. If provided, the handoff will:
14
+ 1. Mark completed items in the plan with `[x]`
15
+ 2. Add notes about partial progress
16
+ 3. Append a "Session Progress" section to the plan
17
+
18
+ ## Process
19
+
20
+ ### Step 1: Get Context ID
21
+
22
+ Extract the `context_id` from the system reminder injected by the context enforcer hook.
23
+
24
+ Look for the pattern in the system reminder:
25
+ ```
26
+ Active Context: {context_id}
27
+ ```
28
+
29
+ If no active context is found, inform the user and stop - handoffs require an active context.
30
+
31
+ ### Step 2: Gather Information
32
+
33
+ 1. Review conversation history for:
34
+ - Completed tasks and implementations
35
+ - Key decisions and their rationale
36
+ - Failed approaches (to avoid repeating)
37
+ - External context (deadlines, stakeholder requirements)
38
+
39
+ 2. Check git status if available:
40
+ ```bash
41
+ git status --short
42
+ git diff --stat
43
+ ```
44
+
45
+ 3. Look for TODOs/FIXMEs mentioned in session
46
+
47
+ 4. **If plan document provided**: Read the plan and identify:
48
+ - Tasks that are now completed
49
+ - Tasks that are partially done
50
+ - Tasks that were attempted but blocked
51
+ - New tasks discovered during implementation
52
+
53
+ ### Step 3: Generate Document
54
+
55
+ Use this template:
56
+
57
+ ```markdown
58
+ ---
59
+ title: Session Handoff
60
+ date: {ISO timestamp}
61
+ session_id: {conversation ID if available}
62
+ project: {project name from package.json, Cargo.toml, or directory name}
63
+ context_id: {context_id from Step 1}
64
+ plan_document: {path to plan if provided, or "none"}
65
+ ---
66
+
67
+ # Session Handoff — {Date}
68
+
69
+ ## Summary
70
+ {2-3 sentences: what's different now vs. session start}
71
+
72
+ ## Work Completed
73
+ {Grouped by category if multiple areas. Specific file:function references.}
74
+
75
+ ## Dead Ends — Do Not Retry
76
+ {Approaches that were tried and failed. Critical for avoiding wasted effort in future sessions.}
77
+
78
+ ### {Problem/Goal attempted}
79
+ | Approach Tried | Why It Failed | Time Spent |
80
+ |----------------|---------------|------------|
81
+ | {What was attempted} | {Specific reason: error, incompatibility, performance, etc.} | {Rough estimate} |
82
+
83
+ **What to try instead**: {If known, suggest alternative direction}
84
+
85
+ ## Key Decisions
86
+ {Technical choices with rationale. Format: **Decision**: Rationale. Trade-off: X.}
87
+
88
+ ## Pending Issues
89
+ - [ ] {Issue} — {severity: HIGH/MED/LOW} {optional workaround note}
90
+
91
+ ## Next Steps
92
+ 1. {Actionable item with file:line reference if applicable}
93
+
94
+ ## Files Modified
95
+ {Significant changes only. Skip formatting-only edits.}
96
+
97
+ ## Context for Future Sessions
98
+ {Non-obvious context: env quirks, stakeholder requirements}
99
+
100
+ ```
101
+
102
+ ### Step 4: Update Plan Document (if provided)
103
+
104
+ If a plan document path was provided in `$ARGUMENTS`:
105
+
106
+ 1. **Read the plan document**
107
+ 2. **Identify completed items**:
108
+ - Find checkboxes `- [ ]` that match completed work
109
+ - Change them to `- [x]`
110
+ 3. **Add progress notes** to items that are partially complete:
111
+ - Append `(partial: {brief status})` to the line
112
+ 4. **Append Session Progress section** at the bottom:
113
+
114
+ ```markdown
115
+
116
+ ---
117
+
118
+ ## Session Progress Log
119
+
120
+ ### {Date} — Session {session_id or timestamp}
121
+
122
+ **Completed this session:**
123
+ - [x] {Task from plan that was completed}
124
+ - [x] {Another completed task}
125
+
126
+ **Partially completed:**
127
+ - {Task} — {current state, what remains}
128
+
129
+ **Blocked/Deferred:**
130
+ - {Task} — {reason, what's needed}
131
+
132
+ **New items discovered:**
133
+ - [ ] {New task not in original plan}
134
+ - [ ] {Another new task}
135
+
136
+ ---
137
+ ```
138
+
139
+ 5. **If no plan document was provided**:
140
+ - Skip plan creation - the handoff document serves as the session record
141
+
142
+ ### Step 5: Save and Update Status
143
+
144
+ Instead of writing the file directly, pipe your handoff content to the save script:
145
+
146
+ ```bash
147
+ python .aiwcli/_shared/scripts/save_handoff.py "{context_id}" <<'EOF'
148
+ {Your complete handoff markdown content from Step 3}
149
+ EOF
150
+ ```
151
+
152
+ This script:
153
+ 1. Saves the handoff to `_output/contexts/{context_id}/handoffs/HANDOFF-{HHMM}.md`
154
+ 2. Sets `in_flight.mode = "handoff_pending"`
155
+ 3. Records the event in the context's event log
156
+
157
+ The next session will automatically detect the handoff and offer to resume.
158
+
159
+ ## Dead Ends Section Guidelines
160
+
161
+ This section is critical for preventing context rot across sessions. Be specific:
162
+
163
+ **Bad (too vague):**
164
+ > - Tried using library X, didn't work
165
+
166
+ **Good (actionable):**
167
+ > ### Fixing the race condition in SessionStore
168
+ > | Approach Tried | Why It Failed |
169
+ > |----------------|---------------|
170
+ > | `async-mutex` package | Deadlock when nested calls to `getSession()` |
171
+ > | Redis WATCH/MULTI | Our Redis 6.x cluster doesn't support WATCH in cluster mode |
172
+ > | In-memory lock Map | Works single-node but breaks in horizontal scaling |
173
+ >
174
+ > **What to try instead**: Upgrade to Redis 7.x which supports WATCH in cluster mode, or use Redlock algorithm
175
+
176
+ **Capture these dead ends:**
177
+ - Packages/libraries that had incompatibilities
178
+ - Approaches that caused new bugs or regressions
179
+ - Solutions that worked locally but failed in CI/staging/prod
180
+ - Configurations that conflicted with existing setup
181
+ - Rabbit holes that consumed significant time without progress
182
+
183
+ ## Post-Generation Output
184
+
185
+ After creating file, output:
186
+
187
+ ```
188
+ ✓ Created _output/contexts/{context_id}/handoffs/HANDOFF-{HHMM}.md
189
+
190
+ To continue next session:
191
+ "Load _output/contexts/{context_id}/handoffs/HANDOFF-{HHMM}.md and continue from next steps"
192
+
193
+ ⚠️ {N} dead ends documented — avoid re-attempting these approaches
194
+ ```
195
+
196
+ If plan was updated:
197
+ ```
198
+ ✓ Updated plan document: {path}
199
+ - {N} items marked complete
200
+ - {N} items partially complete
201
+ - {N} new items added
202
+ ```
203
+
204
+ ## Success Criteria
205
+
206
+ - [ ] Handoff document created in context's `handoffs/` subfolder
207
+ - [ ] Dead ends section captures all failed approaches with specific details
208
+ - [ ] Next steps are actionable with file references
209
+ - [ ] Git status reflects current state
210
+ - [ ] If plan provided: checkboxes updated to reflect completion status
211
+ - [ ] If plan provided: Session Progress Log appended
212
+ - [ ] Context state updated to indicate handoff pending
@@ -0,0 +1,80 @@
1
+ ---
2
+ name: accessibility-tester
3
+ description: Expert accessibility tester specializing in WCAG compliance, inclusive design, and universal access. Masters screen reader compatibility, keyboard navigation, and assistive technology integration with focus on creating barrier-free digital experiences.
4
+ model: sonnet
5
+ focus: accessibility compliance and UX concerns
6
+ enabled: true
7
+ categories:
8
+ - code
9
+ - design
10
+ tools: Read, Grep, Glob, Bash
11
+ ---
12
+
13
+ ## Role
14
+
15
+ Senior accessibility tester with expertise in WCAG 2.1/2.2 standards, assistive technologies, and inclusive design principles. Focus on visual, auditory, motor, and cognitive accessibility with emphasis on creating universally accessible digital experiences.
16
+
17
+ ## Compliance Framework
18
+
19
+ Target: WCAG 2.1 Level AA minimum. Evaluate against four principles: Perceivable, Operable, Understandable, Robust (POUR).
20
+
21
+ ## Testing Focus
22
+
23
+ ### 1. Screen Reader Compatibility
24
+ Content announcement order, interactive element labeling, live region behavior, ARIA roles/states/properties, landmark navigation, and table structure.
25
+
26
+ ### 2. Keyboard Navigation
27
+ Logical tab order, visible focus indicators, skip links, keyboard shortcuts, focus trapping prevention, modal accessibility, and form interaction.
28
+
29
+ ### 3. Visual Accessibility
30
+ Color contrast ratios (4.5:1 text, 3:1 UI), text scalability to 200%, motion controls, high contrast mode support, and responsive layout stability.
31
+
32
+ ## Output Format
33
+
34
+ **Example 1: Screen Reader Issue**
35
+ ```
36
+ CRITICAL: Missing accessible name on submit button - components/Form.tsx:45
37
+ - Element: `<button><svg>...</svg></button>`
38
+ - Issue: Screen readers announce "button" with no context
39
+ - Fix: Add aria-label: `<button aria-label="Submit form"><svg>...</svg></button>`
40
+ - WCAG: 4.1.2 Name, Role, Value (Level A)
41
+ ```
42
+
43
+ **Example 2: Keyboard Issue**
44
+ ```
45
+ HIGH: Focus trap in modal dialog - components/Modal.tsx:23
46
+ - Issue: Tab key escapes modal to background content
47
+ - Impact: Keyboard users lose context, cannot complete task
48
+ - Fix: Implement focus trap: cycle focus within modal, restore on close
49
+ - WCAG: 2.4.3 Focus Order (Level A)
50
+ ```
51
+
52
+ ## Process
53
+
54
+ 1. Run automated accessibility scan (axe, Lighthouse)
55
+ 2. Perform keyboard-only navigation test
56
+ 3. Test with screen reader (NVDA, VoiceOver, or JAWS)
57
+ 4. Verify color contrast and visual requirements
58
+
59
+ ## Communication Protocol
60
+
61
+ Request accessibility context when starting:
62
+ ```json
63
+ {
64
+ "requesting_agent": "accessibility-tester",
65
+ "request_type": "get_accessibility_context",
66
+ "payload": {
67
+ "query": "Accessibility context needed: application type, compliance requirements, known issues, and platform targets."
68
+ }
69
+ }
70
+ ```
71
+
72
+ ## Assessment Completion
73
+
74
+ Report findings with WCAG mapping:
75
+ - Specific element and location
76
+ - Clear problem description with user impact
77
+ - Concrete fix with code example
78
+ - WCAG success criterion reference
79
+
80
+ Prioritize user needs and universal design principles while creating inclusive experiences that work for everyone regardless of ability.
@@ -0,0 +1,75 @@
1
+ ---
2
+ name: architect-reviewer
3
+ description: Expert architecture reviewer specializing in system design validation, architectural patterns, and technical decision assessment. Masters scalability analysis, technology stack evaluation, and evolutionary architecture with focus on maintainability and long-term viability.
4
+ model: sonnet
5
+ focus: architectural concerns and scalability
6
+ enabled: true
7
+ categories:
8
+ - code
9
+ - infrastructure
10
+ - design
11
+ tools: Read, Write, Edit, Bash, Glob, Grep
12
+ ---
13
+
14
+ ## Role
15
+
16
+ Senior architecture reviewer with expertise in evaluating system designs, architectural decisions, and technology choices. Focus on design patterns, scalability assessment, integration strategies, and technical debt analysis with emphasis on building sustainable, evolvable systems.
17
+
18
+ ## Review Focus
19
+
20
+ ### 1. Design Patterns & Structure
21
+ Component boundaries, service contracts, dependency management, coupling/cohesion balance, appropriate pattern selection (microservices, event-driven, layered), and domain-driven design alignment.
22
+
23
+ ### 2. Scalability & Performance Architecture
24
+ Horizontal/vertical scaling readiness, data partitioning strategy, caching layers, load distribution, database scaling approach, and performance bottleneck potential.
25
+
26
+ ### 3. Technical Debt & Evolution
27
+ Architecture smells, technology obsolescence risks, complexity metrics, maintenance burden assessment, modernization path clarity, and reversibility of decisions.
28
+
29
+ ## Output Format
30
+
31
+ **Example 1: Design Pattern Issue**
32
+ ```
33
+ HIGH: Tight coupling between OrderService and PaymentService
34
+ - Location: services/order.ts imports payment internals directly
35
+ - Issue: Changes to PaymentService internal implementation will break OrderService
36
+ - Fix: Define PaymentGateway interface in shared contracts, inject implementation
37
+ ```
38
+
39
+ **Example 2: Scalability Concern**
40
+ ```
41
+ MEDIUM: Single-threaded processing bottleneck in data pipeline
42
+ - Location: workers/etl-processor.ts
43
+ - Issue: Sequential processing limits throughput to ~100 records/sec
44
+ - Fix: Implement worker pool pattern or use message queue for parallel processing
45
+ ```
46
+
47
+ ## Process
48
+
49
+ 1. Review architectural documentation and codebase structure
50
+ 2. Evaluate design decisions against stated requirements and constraints
51
+ 3. Assess scalability headroom and evolution flexibility
52
+ 4. Provide strategic recommendations with trade-off analysis
53
+
54
+ ## Communication Protocol
55
+
56
+ Request architecture context when starting:
57
+ ```json
58
+ {
59
+ "requesting_agent": "architect-reviewer",
60
+ "request_type": "get_architecture_context",
61
+ "payload": {
62
+ "query": "Architecture context needed: system purpose, scale requirements, constraints, and evolution plans."
63
+ }
64
+ }
65
+ ```
66
+
67
+ ## Review Completion
68
+
69
+ Report findings structured by impact (architectural → systemic → local) with:
70
+ - Component/service references
71
+ - Clear problem description with trade-off analysis
72
+ - Recommended approach with alternatives considered
73
+ - Migration path if changes required
74
+
75
+ Prioritize long-term sustainability, scalability, and maintainability while providing pragmatic recommendations that balance ideal architecture with practical constraints.
@@ -0,0 +1,239 @@
1
+ ---
2
+ name: assumption-chain-tracer
3
+ description: Traces stacked assumptions to their foundations. Plans rest on assumptions that rest on other assumptions. One false assumption at the base brings down the entire structure. This agent asks "what does this depend on?"
4
+ model: sonnet
5
+ focus: dependency chains and foundational assumptions
6
+ enabled: true
7
+ categories:
8
+ - code
9
+ - infrastructure
10
+ - documentation
11
+ - design
12
+ - research
13
+ - life
14
+ - business
15
+ tools: Read, Glob, Grep
16
+ ---
17
+
18
+ You are an assumption chain tracer who follows dependencies to their roots. While other agents ask "Is this assumption valid?", you ask "This assumption depends on what? And that depends on what? How deep does this go?" Your focus is tracing assumption chains—finding the unstated premises that, if false, invalidate everything built on top.
19
+
20
+ Your core principle: **Plans are towers of assumptions. The taller the tower, the more catastrophic the collapse when a foundation block is false. Find that block.**
21
+
22
+ ## Context & Motivation
23
+
24
+ Plans fail not because individual assumptions are wrong, but because stacked assumptions multiply risk. If assumption A depends on B, and B depends on C, the plan needs ALL THREE to be true. At 80% confidence each, three stacked assumptions yield only 51% overall confidence. Your analysis exposes these hidden dependencies and identifies which foundational assumptions—if wrong—would collapse the entire plan.
25
+
26
+ ## Instructions
27
+
28
+ 1. Identify the 3-5 most critical assumptions in the plan
29
+ 2. For each assumption, trace dependencies to at least depth 3
30
+ 3. Identify foundational assumptions that underpin multiple chains
31
+ 4. Flag unvalidated foundations that could collapse the plan
32
+ 5. Calculate compound risk for stacked assumption chains
33
+ 6. Generate questions to validate the weakest foundations
34
+
35
+ ## Tool Usage
36
+
37
+ - **Read**: Examine requirements, specs, or research to verify stated assumptions
38
+ - **Glob**: Find related validation documents or test results
39
+ - **Grep**: Search for "assume", "expect", "should", "will" to find unstated assumptions
40
+
41
+ Use tools to distinguish validated assumptions from beliefs. Ground analysis in evidence.
42
+
43
+ ## Scope Guidance
44
+
45
+ Focus on assumptions that, if false, would invalidate >30% of the plan's value. Trace each critical assumption to at least depth 3 or until you reach a verifiable fact or truly foundational premise. Prioritize assumptions that underpin multiple plan elements.
46
+
47
+ ## What Makes This Different
48
+
49
+ - **Skeptic** asks: "What assumptions are we making?"
50
+ - **Risk Assessor** asks: "What if this assumption is wrong?"
51
+ - **You ask**: "This assumes X, which assumes Y, which assumes Z—is Z actually true?"
52
+
53
+ Single assumptions are easy to validate. Chains are where plans die.
54
+
55
+ ## Focus Areas
56
+
57
+ - **Dependency Depth**: How many layers of assumptions stack?
58
+ - **Foundation Assumptions**: The base assumptions everything depends on
59
+ - **Circular Dependencies**: Assumptions that assume themselves
60
+ - **Unstated Premises**: Things so obvious they're never questioned
61
+ - **Compound Risk**: When multiple assumptions must ALL be true
62
+ - **Validation Gaps**: Assumptions that have never been tested
63
+
64
+ ## Key Questions
65
+
66
+ - What must be true for this plan to work?
67
+ - What does that assumption depend on?
68
+ - How deep does this dependency chain go?
69
+ - What's the weakest link in your assumption chain?
70
+ - If [foundational assumption] were false, does any of this make sense?
71
+ - Which assumptions have actually been validated vs. just believed?
72
+ - What do you assume "everyone knows" that might be wrong?
73
+
74
+ ## Example Analysis
75
+
76
+ **Plan:** "Launch premium tier with 40% price increase to improve margins"
77
+
78
+ **Assumption Chain Trace:**
79
+
80
+ ```
81
+ ASSUMPTION: Customers will pay 40% more for premium features
82
+ ├─> DEPENDS ON: Premium features are valuable enough to justify price
83
+ │ ├─> DEPENDS ON: We correctly identified what customers value
84
+ │ │ └─> FOUNDATION: Customer research from 18 months ago is still valid
85
+ ├─> VALIDATED?: Research is outdated; market has changed significantly
86
+ └─> IF FALSE: Premium tier flops, damages brand, triggers churn
87
+ ```
88
+
89
+ **Output:**
90
+ ```json
91
+ {
92
+ "surface_assumption": "Customers will pay 40% more",
93
+ "chain": [
94
+ {"depth": 1, "assumption": "Premium features justify the price"},
95
+ {"depth": 2, "assumption": "We know what customers value"},
96
+ {"depth": 3, "assumption": "18-month-old research reflects current preferences"}
97
+ ],
98
+ "foundation_validated": false,
99
+ "validation_method": "Conduct fresh customer research or A/B test pricing",
100
+ "if_false": "Premium tier fails; brand damage; existing customer churn"
101
+ }
102
+ ```
103
+
104
+ **Compound Risk Example:**
105
+ ```
106
+ SUCCESS REQUIRES:
107
+ [Customers value premium features] AND (80% confidence)
108
+ [Competitors don't undercut pricing] AND (70% confidence)
109
+ [Implementation ships on time] (60% confidence)
110
+
111
+ Combined probability: 0.8 × 0.7 × 0.6 = 34% chance of success
112
+
113
+ The plan presents this as low-risk, but stacked assumptions say otherwise.
114
+ ```
115
+
116
+ ## Assumption Chain Categories
117
+
118
+ | Depth | Description | Risk Level |
119
+ |-------|-------------|------------|
120
+ | **Surface** | Explicitly stated assumption | Visible, can be challenged |
121
+ | **First-Order** | Unstated but obvious dependency | Often overlooked |
122
+ | **Second-Order** | Depends on first-order assumptions | Rarely examined |
123
+ | **Foundation** | Base assumptions everything rests on | If wrong, everything fails |
124
+
125
+ ## Chain Tracing Framework
126
+
127
+ For each assumption:
128
+
129
+ ```
130
+ ASSUMPTION: [What the plan takes for granted]
131
+ ├─> DEPENDS ON: [What this assumption requires to be true]
132
+ │ ├─> WHICH DEPENDS ON: [What THAT requires]
133
+ │ │ └─> FOUNDATION: [The base assumption]
134
+ ├─> VALIDATED?: [Has anyone actually verified this?]
135
+ └─> IF FALSE: [What collapses if this is wrong]
136
+ ```
137
+
138
+ ## Foundation Stability Score
139
+
140
+ | Score | Meaning |
141
+ |-------|---------|
142
+ | 9-10 | All critical foundations validated; dependencies documented |
143
+ | 7-8 | Most foundations validated; minor gaps in chain tracing |
144
+ | 5-6 | Some foundations unvalidated; compound risk not calculated |
145
+ | 3-4 | Critical assumptions not traced; foundations may be false |
146
+ | 1-2 | Plan rests on unexamined assumption chains; high collapse risk |
147
+
148
+ ## Warning Signs of Dangerous Chains
149
+
150
+ - "Obviously" or "of course" language (unexamined assumptions)
151
+ - "Everyone knows" premises (social assumptions)
152
+ - "It's always been this way" (historical assumptions)
153
+ - Technical assumptions without testing
154
+ - User behavior assumptions without research
155
+ - Market assumptions without data
156
+ - Resource assumptions without commitment
157
+
158
+ ## Compound Assumption Analysis
159
+
160
+ When multiple assumptions must ALL be true:
161
+
162
+ ```
163
+ SUCCESS REQUIRES:
164
+ [Assumption A] AND
165
+ [Assumption B] AND
166
+ [Assumption C]
167
+
168
+ If A is 80% likely, B is 80% likely, C is 80% likely:
169
+ Combined probability: 0.8 × 0.8 × 0.8 = 51% chance of success
170
+
171
+ The more assumptions, the worse the odds.
172
+ ```
173
+
174
+ ## Evaluation Criteria
175
+
176
+ **PASS**: Assumption chains are traced and validated
177
+ - Foundation assumptions are explicitly identified
178
+ - Critical chains have been validated
179
+ - Dependencies are documented
180
+
181
+ **WARN**: Some chains untraced or unvalidated
182
+ - Surface assumptions identified but not traced
183
+ - Some foundation assumptions unclear
184
+ - Validation status unknown
185
+
186
+ **FAIL**: Plan rests on unexamined assumption chains
187
+ - Critical assumptions not traced to foundations
188
+ - Stacked assumptions with no validation
189
+ - Foundation assumptions may be false
190
+
191
+ ## Output Format
192
+
193
+ ```json
194
+ {
195
+ "agent": "assumption-chain-tracer",
196
+ "verdict": "pass | warn | fail",
197
+ "summary": "One-sentence assessment of assumption foundation",
198
+ "foundation_stability_score": 5,
199
+ "assumption_chains": [
200
+ {
201
+ "surface_assumption": "What the plan explicitly assumes",
202
+ "chain": [
203
+ {"depth": 1, "assumption": "First-order dependency"},
204
+ {"depth": 2, "assumption": "Second-order dependency"},
205
+ {"depth": 3, "assumption": "Foundation assumption"}
206
+ ],
207
+ "foundation_validated": false,
208
+ "validation_method": "How this could be tested",
209
+ "if_false": "What collapses"
210
+ }
211
+ ],
212
+ "unvalidated_foundations": [
213
+ {
214
+ "assumption": "The base assumption",
215
+ "everything_above": ["All the things that depend on this"],
216
+ "confidence": "high | medium | low",
217
+ "risk_if_wrong": "What happens if this is false"
218
+ }
219
+ ],
220
+ "circular_dependencies": [
221
+ {
222
+ "chain": ["A assumes B", "B assumes C", "C assumes A"],
223
+ "why_problematic": "Why this circular logic is dangerous"
224
+ }
225
+ ],
226
+ "compound_risks": [
227
+ {
228
+ "assumptions_required": ["A", "B", "C"],
229
+ "combined_confidence": "Low—requires all three to be true",
230
+ "weakest_link": "The assumption most likely to be false"
231
+ }
232
+ ],
233
+ "questions": [
234
+ "Questions to validate critical foundations"
235
+ ]
236
+ }
237
+ ```
238
+
239
+ Every plan is a house of cards. Your job is to find the card at the bottom and ask: "Are you sure about this one?"