@uluops/setup 0.4.0 → 0.6.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 (211) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +67 -50
  3. package/assets/auto-tracker-save.mjs +142 -0
  4. package/assets/{agents → claude-code/agents}/api-contract-validator-agent.md +9 -228
  5. package/assets/{agents → claude-code/agents}/aristotle-analyst-agent.md +51 -4
  6. package/assets/{agents → claude-code/agents}/aristotle-explorer-agent.md +6 -2
  7. package/assets/{agents → claude-code/agents}/aristotle-forecaster-agent.md +15 -230
  8. package/assets/{agents → claude-code/agents}/aristotle-validator-agent.md +12 -252
  9. package/assets/{agents → claude-code/agents}/assumption-excavator-agent.md +21 -247
  10. package/assets/{agents → claude-code/agents}/code-auditor-agent.md +12 -255
  11. package/assets/{agents → claude-code/agents}/code-optimizer-agent.md +15 -236
  12. package/assets/{agents → claude-code/agents}/code-validator-agent.md +31 -300
  13. package/assets/claude-code/agents/docs-validator-agent.md +472 -0
  14. package/assets/{agents → claude-code/agents}/frontend-validator-agent.md +15 -258
  15. package/assets/{agents → claude-code/agents}/mcp-validator-agent.md +8 -252
  16. package/assets/{agents → claude-code/agents}/pre-implementation-architect-agent.md +8 -224
  17. package/assets/{agents → claude-code/agents}/prompt-engineer-agent.md +57 -290
  18. package/assets/{agents → claude-code/agents}/prompt-pattern-analyzer-agent.md +10 -225
  19. package/assets/{agents → claude-code/agents}/prompt-quality-validator-agent.md +11 -249
  20. package/assets/{agents → claude-code/agents}/public-interface-validator-agent.md +15 -268
  21. package/assets/claude-code/agents/release-readiness-agent.md +495 -0
  22. package/assets/{agents → claude-code/agents}/security-analyst-agent.md +236 -480
  23. package/assets/{agents → claude-code/agents}/test-architect-agent.md +16 -259
  24. package/assets/{agents → claude-code/agents}/type-safety-validator-agent.md +23 -266
  25. package/assets/{agents → claude-code/agents}/workflow-synthesis-agent.md +23 -226
  26. package/assets/{commands → claude-code/commands}/agents/anxiety-reader.md +12 -15
  27. package/assets/{commands → claude-code/commands}/agents/api-contract.md +156 -136
  28. package/assets/{commands → claude-code/commands}/agents/architect.md +156 -136
  29. package/assets/claude-code/commands/agents/aristotle-analyst.md +157 -0
  30. package/assets/claude-code/commands/agents/aristotle-explorer.md +157 -0
  31. package/assets/claude-code/commands/agents/aristotle-forecaster.md +157 -0
  32. package/assets/claude-code/commands/agents/aristotle-validator.md +157 -0
  33. package/assets/{commands → claude-code/commands}/agents/assumption-excavator.md +49 -7
  34. package/assets/{commands → claude-code/commands}/agents/audit.md +156 -137
  35. package/assets/{commands → claude-code/commands}/agents/docs-validate.md +156 -134
  36. package/assets/{commands → claude-code/commands}/agents/frontend.md +156 -136
  37. package/assets/{commands → claude-code/commands}/agents/mcp-validate.md +156 -137
  38. package/assets/{commands → claude-code/commands}/agents/optimize.md +156 -134
  39. package/assets/{commands → claude-code/commands}/agents/pattern-analyzer.md +150 -127
  40. package/assets/{commands → claude-code/commands}/agents/prompt-quality.md +155 -135
  41. package/assets/claude-code/commands/agents/prompt-validate.md +155 -0
  42. package/assets/{commands → claude-code/commands}/agents/public-interface.md +156 -135
  43. package/assets/{commands → claude-code/commands}/agents/release.md +156 -136
  44. package/assets/{commands → claude-code/commands}/agents/security.md +156 -138
  45. package/assets/{commands → claude-code/commands}/agents/test-review.md +156 -137
  46. package/assets/{commands → claude-code/commands}/agents/type-safety.md +156 -136
  47. package/assets/{commands/agents/code-validate.md → claude-code/commands/agents/validate.md} +156 -135
  48. package/assets/claude-code/commands/agents/workflow-synthesis.md +157 -0
  49. package/assets/{commands → claude-code/commands}/pipelines/aristotle.md +8 -8
  50. package/assets/{commands → claude-code/commands}/pipelines/ship.md +8 -8
  51. package/assets/claude-code/commands/workflows/post-implementation.md +60 -0
  52. package/assets/claude-code/commands/workflows/pre-implementation.md +46 -0
  53. package/assets/{commands → claude-code/commands}/workflows/prompt-audit.md +2 -2
  54. package/assets/codex/agents/anxiety-reader-agent.toml +462 -0
  55. package/assets/codex/agents/api-contract-validator-agent.toml +738 -0
  56. package/assets/codex/agents/aristotle-analyst-agent.toml +750 -0
  57. package/assets/codex/agents/aristotle-explorer-agent.toml +155 -0
  58. package/assets/codex/agents/aristotle-forecaster-agent.toml +449 -0
  59. package/assets/codex/agents/aristotle-validator-agent.toml +424 -0
  60. package/assets/codex/agents/assumption-excavator-agent.toml +1126 -0
  61. package/assets/codex/agents/code-auditor-agent.toml +815 -0
  62. package/assets/codex/agents/code-optimizer-agent.toml +652 -0
  63. package/assets/codex/agents/code-validator-agent.toml +573 -0
  64. package/assets/codex/agents/docs-validator-agent.toml +468 -0
  65. package/assets/codex/agents/frontend-validator-agent.toml +598 -0
  66. package/assets/codex/agents/mcp-validator-agent.toml +580 -0
  67. package/assets/codex/agents/pre-implementation-architect-agent.toml +817 -0
  68. package/assets/codex/agents/prompt-engineer-agent.toml +922 -0
  69. package/assets/codex/agents/prompt-pattern-analyzer-agent.toml +689 -0
  70. package/assets/codex/agents/prompt-quality-validator-agent.toml +777 -0
  71. package/assets/codex/agents/public-interface-validator-agent.toml +695 -0
  72. package/assets/codex/agents/release-readiness-agent.toml +491 -0
  73. package/assets/codex/agents/security-analyst-agent.toml +847 -0
  74. package/assets/codex/agents/test-architect-agent.toml +615 -0
  75. package/assets/codex/agents/type-safety-validator-agent.toml +686 -0
  76. package/assets/codex/agents/workflow-synthesis-agent.toml +631 -0
  77. package/assets/gemini-cli/agents/anxiety-reader-agent.md +470 -0
  78. package/assets/gemini-cli/agents/api-contract-validator-agent.md +747 -0
  79. package/assets/gemini-cli/agents/aristotle-analyst-agent.md +758 -0
  80. package/assets/gemini-cli/agents/aristotle-explorer-agent.md +163 -0
  81. package/assets/gemini-cli/agents/aristotle-forecaster-agent.md +457 -0
  82. package/assets/gemini-cli/agents/aristotle-validator-agent.md +432 -0
  83. package/assets/gemini-cli/agents/assumption-excavator-agent.md +1134 -0
  84. package/assets/gemini-cli/agents/code-auditor-agent.md +827 -0
  85. package/assets/gemini-cli/agents/code-optimizer-agent.md +661 -0
  86. package/assets/gemini-cli/agents/code-validator-agent.md +582 -0
  87. package/assets/gemini-cli/agents/docs-validator-agent.md +477 -0
  88. package/assets/gemini-cli/agents/frontend-validator-agent.md +610 -0
  89. package/assets/gemini-cli/agents/mcp-validator-agent.md +589 -0
  90. package/assets/gemini-cli/agents/pre-implementation-architect-agent.md +826 -0
  91. package/assets/gemini-cli/agents/prompt-engineer-agent.md +931 -0
  92. package/assets/gemini-cli/agents/prompt-pattern-analyzer-agent.md +698 -0
  93. package/assets/gemini-cli/agents/prompt-quality-validator-agent.md +786 -0
  94. package/assets/gemini-cli/agents/public-interface-validator-agent.md +707 -0
  95. package/assets/gemini-cli/agents/release-readiness-agent.md +500 -0
  96. package/assets/gemini-cli/agents/security-analyst-agent.md +859 -0
  97. package/assets/gemini-cli/agents/test-architect-agent.md +624 -0
  98. package/assets/gemini-cli/agents/type-safety-validator-agent.md +695 -0
  99. package/assets/gemini-cli/agents/workflow-synthesis-agent.md +639 -0
  100. package/assets/gemini-cli/commands/agents/anxiety-reader.toml +155 -0
  101. package/assets/gemini-cli/commands/agents/api-contract.toml +154 -0
  102. package/assets/gemini-cli/commands/agents/architect.toml +154 -0
  103. package/assets/gemini-cli/commands/agents/aristotle-analyst.toml +155 -0
  104. package/assets/gemini-cli/commands/agents/aristotle-explorer.toml +155 -0
  105. package/assets/gemini-cli/commands/agents/aristotle-forecaster.toml +155 -0
  106. package/assets/gemini-cli/commands/agents/aristotle-validator.toml +155 -0
  107. package/assets/gemini-cli/commands/agents/assumption-excavator.toml +155 -0
  108. package/assets/gemini-cli/commands/agents/audit.toml +154 -0
  109. package/assets/gemini-cli/commands/agents/docs-validate.toml +154 -0
  110. package/assets/gemini-cli/commands/agents/frontend.toml +154 -0
  111. package/assets/gemini-cli/commands/agents/mcp-validate.toml +154 -0
  112. package/assets/gemini-cli/commands/agents/optimize.toml +154 -0
  113. package/assets/gemini-cli/commands/agents/pattern-analyzer.toml +148 -0
  114. package/assets/gemini-cli/commands/agents/prompt-quality.toml +153 -0
  115. package/assets/gemini-cli/commands/agents/prompt-validate.toml +153 -0
  116. package/assets/gemini-cli/commands/agents/public-interface.toml +154 -0
  117. package/assets/gemini-cli/commands/agents/release.toml +154 -0
  118. package/assets/gemini-cli/commands/agents/security.toml +154 -0
  119. package/assets/gemini-cli/commands/agents/test-review.toml +154 -0
  120. package/assets/gemini-cli/commands/agents/type-safety.toml +154 -0
  121. package/assets/gemini-cli/commands/agents/validate.toml +154 -0
  122. package/assets/gemini-cli/commands/agents/workflow-synthesis.toml +155 -0
  123. package/assets/gemini-cli/commands/pipelines/aristotle.toml +139 -0
  124. package/assets/gemini-cli/commands/pipelines/ship.toml +184 -0
  125. package/assets/gemini-cli/commands/workflows/post-implementation.toml +56 -0
  126. package/assets/gemini-cli/commands/workflows/pre-implementation.toml +42 -0
  127. package/assets/gemini-cli/commands/workflows/prompt-audit.toml +40 -0
  128. package/assets/opencode/agents/anxiety-reader-agent.md +472 -0
  129. package/assets/opencode/agents/api-contract-validator-agent.md +749 -0
  130. package/assets/opencode/agents/aristotle-analyst-agent.md +760 -0
  131. package/assets/opencode/agents/aristotle-explorer-agent.md +164 -0
  132. package/assets/opencode/agents/aristotle-forecaster-agent.md +459 -0
  133. package/assets/opencode/agents/aristotle-validator-agent.md +434 -0
  134. package/assets/opencode/agents/assumption-excavator-agent.md +1136 -0
  135. package/assets/opencode/agents/code-auditor-agent.md +826 -0
  136. package/assets/opencode/agents/code-optimizer-agent.md +663 -0
  137. package/assets/opencode/agents/code-validator-agent.md +584 -0
  138. package/assets/opencode/agents/docs-validator-agent.md +479 -0
  139. package/assets/opencode/agents/frontend-validator-agent.md +609 -0
  140. package/assets/opencode/agents/mcp-validator-agent.md +591 -0
  141. package/assets/opencode/agents/pre-implementation-architect-agent.md +828 -0
  142. package/assets/opencode/agents/prompt-engineer-agent.md +933 -0
  143. package/assets/opencode/agents/prompt-pattern-analyzer-agent.md +700 -0
  144. package/assets/opencode/agents/prompt-quality-validator-agent.md +788 -0
  145. package/assets/opencode/agents/public-interface-validator-agent.md +706 -0
  146. package/assets/opencode/agents/release-readiness-agent.md +502 -0
  147. package/assets/opencode/agents/security-analyst-agent.md +858 -0
  148. package/assets/opencode/agents/test-architect-agent.md +626 -0
  149. package/assets/opencode/agents/type-safety-validator-agent.md +697 -0
  150. package/assets/opencode/agents/workflow-synthesis-agent.md +641 -0
  151. package/dist/cli.js +12 -414
  152. package/dist/commands/helpers.d.ts +73 -0
  153. package/dist/commands/helpers.js +274 -0
  154. package/dist/commands/setup.d.ts +13 -0
  155. package/dist/commands/setup.js +93 -0
  156. package/dist/commands/uninstall.d.ts +3 -0
  157. package/dist/commands/uninstall.js +126 -0
  158. package/dist/commands/verify.d.ts +1 -0
  159. package/dist/commands/verify.js +28 -0
  160. package/dist/harnesses/claude-code.d.ts +1 -1
  161. package/dist/harnesses/claude-code.js +3 -1
  162. package/dist/harnesses/codex.js +6 -5
  163. package/dist/harnesses/gemini-cli.d.ts +4 -8
  164. package/dist/harnesses/gemini-cli.js +47 -21
  165. package/dist/harnesses/index.d.ts +10 -1
  166. package/dist/harnesses/index.js +11 -2
  167. package/dist/harnesses/opencode.d.ts +1 -1
  168. package/dist/harnesses/opencode.js +15 -6
  169. package/dist/harnesses/types.d.ts +19 -0
  170. package/dist/harnesses/types.js +2 -0
  171. package/dist/lib/asset-catalog.js +2 -2
  172. package/dist/lib/config-merger.d.ts +2 -1
  173. package/dist/lib/config-merger.js +12 -4
  174. package/dist/lib/file-ops.d.ts +5 -0
  175. package/dist/lib/file-ops.js +18 -3
  176. package/dist/lib/hash.d.ts +1 -1
  177. package/dist/lib/hash.js +2 -2
  178. package/dist/lib/manifest.d.ts +30 -1
  179. package/dist/lib/manifest.js +5 -7
  180. package/dist/lib/paths.d.ts +16 -1
  181. package/dist/lib/paths.js +31 -3
  182. package/dist/lib/settings-merger.d.ts +24 -9
  183. package/dist/lib/settings-merger.js +57 -22
  184. package/dist/lib/version.d.ts +2 -0
  185. package/dist/lib/version.js +10 -0
  186. package/dist/steps/agents.d.ts +1 -2
  187. package/dist/steps/agents.js +7 -18
  188. package/dist/steps/cli.d.ts +53 -0
  189. package/dist/steps/cli.js +90 -0
  190. package/dist/steps/commands.d.ts +1 -1
  191. package/dist/steps/commands.js +20 -71
  192. package/dist/steps/detect.js +4 -0
  193. package/dist/steps/mcp.js +7 -15
  194. package/dist/steps/metrics.d.ts +12 -0
  195. package/dist/steps/metrics.js +52 -22
  196. package/dist/steps/shell.js +11 -1
  197. package/dist/steps/signup.d.ts +2 -2
  198. package/dist/steps/signup.js +9 -12
  199. package/dist/steps/verify.js +47 -8
  200. package/package.json +12 -11
  201. package/assets/agents/docs-validator-agent.md +0 -490
  202. package/assets/agents/release-readiness-agent.md +0 -482
  203. package/assets/commands/agents/aristotle-analyst.md +0 -116
  204. package/assets/commands/agents/aristotle-explorer.md +0 -93
  205. package/assets/commands/agents/aristotle-forecaster.md +0 -115
  206. package/assets/commands/agents/aristotle-validator.md +0 -115
  207. package/assets/commands/agents/prompt-validate.md +0 -136
  208. package/assets/commands/agents/workflow-synthesis.md +0 -102
  209. package/assets/commands/workflows/post-implementation.md +0 -577
  210. package/assets/commands/workflows/pre-implementation.md +0 -670
  211. /package/assets/{agents → claude-code/agents}/anxiety-reader-agent.md +0 -0
@@ -1,577 +0,0 @@
1
- ---
2
- name: post-implementation
3
- description: Iterative validation workflow. Run after each implementation phase until all agents pass. Includes code optimization. Use --frontend flag for React/Tailwind projects.
4
- tools: Read, Grep, Glob, Bash
5
- model: sonnet
6
- ---
7
-
8
- # Post-Implementation
9
-
10
- Iterative validation workflow. Run after each implementation phase until all agents pass. Includes code optimization. Use --frontend flag for React/Tailwind projects.
11
-
12
-
13
- **Philosophy**: Validate early, validate often. Each implementation phase should pass all gates before proceeding. Catch issues when they're cheap to fix.
14
-
15
- ---
16
-
17
- ## Workflow Overview
18
-
19
- ```
20
- ┌─────────────┐
21
- │ validate │ ◄── Gate (must pass)
22
- └──────┬──────┘
23
-
24
- ┌──────┴──────┬──────────────┬──────────────┐
25
- ▼ ▼ ▼ │
26
- ┌───────────┐ ┌────────────┐ ┌────────────┐ │
27
- │type-safety│ │mcp-validate│ │test-review │ │
28
- │(if TS) │ │(if MCP) │ │ │ │
29
- └─────┬─────┘ └─────┬──────┘ └─────┬──────┘ │
30
- └─────────────┴──────────────┘ │
31
- │ │
32
- ┌──────▼──────┐ │
33
- │ optimizer │ │
34
- └──────┬──────┘ │
35
- │ │
36
- ┌────────────┴────────────┐ │
37
- ▼ ▼ │
38
- ┌────────────────┐ ┌──────────────┐ │
39
- │public-interface│ │ frontend │ │
40
- │ │ │ (if enabled) │ │
41
- └────────────────┘ └──────────────┘ │
42
-
43
- ══════════════════════════════════════════ │
44
- PERSIST TO TRACKER (Required) │
45
- ══════════════════════════════════════════ ▼
46
-
47
- ```
48
-
49
- [TS] = Runs if tsconfig.json detected (TypeScript project)
50
- [MCP] = Runs if MCP server detected (mcp imports, FastMCP, @modelcontextprotocol/sdk)
51
-
52
- Duration: 6-15 minutes (varies with optional validators)
53
- **Note:** Conditional validators only run in their groups if detected in pre-flight.
54
- **Important:** Even in parallel mode, if ANY agent in a group fails with a blocking result, stop the pipeline and report all results collected so far.
55
-
56
- ---
57
-
58
- ## Agent Handoff Formats
59
-
60
- Each agent passes structured data to the next in the pipeline:
61
-
62
- | From | To | Passes | Expects |
63
- |------|-----|--------|---------|
64
- | Code Validator | TypeScript Validator | File list, error baseline, complexity metrics | Type-specific issues beyond basic linting |
65
- | Code Validator | Test Architect | Test file locations, coverage baseline | Test quality assessment beyond coverage % |
66
- | TypeScript Validator | MCP Validator | Type-checked file list, public API map | Protocol compliance on type-safe codebase |
67
- | MCP Validator | Test Architect | Tools/resources list, security flags | Tests for MCP-specific functionality |
68
- | Test Architect | Optimizer | Test confidence level, coverage gaps | Optimizations that won't break tested behavior |
69
- | Optimizer | Public Interface | Refactoring summary, API changes | README updates for any interface changes |
70
- | Public Interface | Frontend Validator | Export list, documentation status | Component quality for documented features |
71
-
72
- **Handoff Contract:**
73
- - Each agent accepts predecessor's score and blockers
74
- - Agents don't re-check validated areas
75
- - Critical failures propagate as pipeline blockers
76
- - All findings feed into tracker persistence
77
-
78
- ---
79
-
80
- ## Pre-Flight: Target Detection and Configuration
81
-
82
- Before running agents, determine the target path and which optional validators should run.
83
-
84
- ### Context Detection
85
-
86
- **Detection criteria**: A detector returns TRUE if its command exits with code 0.
87
-
88
- | Detector ID | Description |
89
- |-------------|-------------|
90
- | `typescript_detected` | Check if file exists: {{ target }}/tsconfig.json |
91
- | `mcp_python_detected` | Run command: grep -rqE --include="*.py" --exclude-dir="node_modules" --exclude-dir="dist" --exclude-dir="__pycache__" --exclude-dir=".venv" "from mcp|import mcp|FastMCP|@mcp\." . 2>/dev/null |
92
- | `mcp_typescript_detected` | Run command: grep -rqE --include="*.ts" --include="*.js" --exclude-dir="node_modules" --exclude-dir="dist" "@modelcontextprotocol/sdk|McpServer" . 2>/dev/null |
93
- | `mcp_dependency_detected` | Run command: grep -rqE --include="package.json" --include="pyproject.toml" --include="requirements.txt" --exclude-dir="node_modules" --exclude-dir="dist" "@modelcontextprotocol|\"mcp\":" . 2>/dev/null |
94
- | `frontend_detected` | Run command: test -n "$(find . \( -name "*.tsx" -o -name "*.jsx" \) ! -path "*/node_modules/*" ! -path "*/dist/*" ! -path "*/build/*" ! -path "*/.next/*" ! -path "*/coverage/*" -print -quit 2>/dev/null)" |
95
-
96
- **typescript_detected**:
97
- ```bash
98
- test -f "{{ target }}/tsconfig.json" && echo "DETECTED" || echo "NOT DETECTED"
99
- ```
100
-
101
- **mcp_python_detected**:
102
- ```bash
103
- grep -rqE --include="*.py" --exclude-dir="node_modules" --exclude-dir="dist" --exclude-dir="__pycache__" --exclude-dir=".venv" "from mcp|import mcp|FastMCP|@mcp\." . 2>/dev/null && echo "DETECTED" || echo "NOT DETECTED"
104
- ```
105
-
106
- **mcp_typescript_detected**:
107
- ```bash
108
- grep -rqE --include="*.ts" --include="*.js" --exclude-dir="node_modules" --exclude-dir="dist" "@modelcontextprotocol/sdk|McpServer" . 2>/dev/null && echo "DETECTED" || echo "NOT DETECTED"
109
- ```
110
-
111
- **mcp_dependency_detected**:
112
- ```bash
113
- grep -rqE --include="package.json" --include="pyproject.toml" --include="requirements.txt" --exclude-dir="node_modules" --exclude-dir="dist" "@modelcontextprotocol|\"mcp\":" . 2>/dev/null && echo "DETECTED" || echo "NOT DETECTED"
114
- ```
115
-
116
- **frontend_detected**:
117
- ```bash
118
- test -n "$(find . \( -name "*.tsx" -o -name "*.jsx" \) ! -path "*/node_modules/*" ! -path "*/dist/*" ! -path "*/build/*" ! -path "*/.next/*" ! -path "*/coverage/*" -print -quit 2>/dev/null)" && echo "DETECTED" || echo "NOT DETECTED"
119
- ```
120
-
121
-
122
- ---
123
-
124
- ## Arguments
125
-
126
- ### Positional Arguments
127
-
128
- | Argument | Required | Description |
129
- |----------|----------|-------------|
130
- | target | No | Target directory to validate |
131
-
132
- ### Flags
133
-
134
- | Flag | Short | Description |
135
- |------|-------|-------------|
136
- | --frontend | f | Force frontend validation regardless of auto-detection |
137
-
138
- ### Usage Examples
139
-
140
- | Command | Behavior |
141
- |---------|----------|
142
- | `/workflows:post-implementation ./packages/api` | Auto-detects TS, MCP, and frontend |
143
- | `/workflows:post-implementation ./packages/app --frontend` | Forces frontend validation |
144
- | `/workflows:post-implementation ./mcp-server` | Auto-detects MCP server, runs MCP Validator |
145
- | `/workflows:post-implementation ./src` | Skips optional validators if not detected |
146
-
147
- ---
148
-
149
- ## Execution Mode Selection
150
-
151
- **After completing project detection, ask the user to choose execution mode using AskUserQuestion:**
152
-
153
- | Mode | Description | Best For |
154
- |------|-------------|----------|
155
- | Sequential | Run agents one at a time, stop on first failure | Debugging, first runs, when you want early feedback |
156
- | Parallel | Run independent agents concurrently | Speed, CI/CD, when project is stable |
157
-
158
- **Parallel execution groups (when parallel mode selected):**
159
-
160
- ```
161
- Group 1 (gate): validate
162
-
163
-
164
- Group 2 (parallel): type-safety + mcp-validator + test-architect
165
-
166
-
167
- Group 3 (sequential): optimizer
168
-
169
-
170
- Group 4 (parallel): public-interface + frontend
171
-
172
-
173
- Group 5 (always): persist-to-tracker
174
- ```
175
-
176
- **Note:** Conditional validators only run in their groups if detected in pre-flight.
177
-
178
- **Note:** Conditional validators only run in their groups if detected in pre-flight.
179
- **Important:** Even in parallel mode, if ANY agent in a group fails with a blocking result, stop the pipeline and report all results collected so far.
180
-
181
- ---
182
-
183
- ## Execution
184
-
185
- Run each agent in sequence (or parallel groups if selected). Stop and fix if any agent fails. **Collect all recommendations for tracker persistence.**
186
-
187
- ### Phase 1: Code Validation
188
- **Commands**: validate@1.0.0
189
-
190
- **Invoke via Task tool:**
191
- ```
192
- Task(
193
- subagent_type: "validate",
194
- prompt: "[validator:validate] Validate {TARGET_DIRECTORY}. Return structured JSON OUTPUT.",
195
- description: "Code Validator"
196
- )
197
- ```
198
-
199
- **Gate**: threshold >= 70, on fail: stop
200
-
201
- **Focus**:
202
- - Correctness and type safety
203
- - Complexity and best practices
204
- - Error handling patterns
205
-
206
- **Capture for tracker**: All findings for tracker, regardless of pass/fail status.
207
-
208
- **If failing**: Fix code quality issues before proceeding. Do not optimize broken code.
209
-
210
- ---
211
-
212
- ### Phase 2: TypeScript Validation (Conditional)
213
- **Runs when**: `context.typescript_detected`
214
-
215
- **Commands**: type-safety@1.0.0
216
-
217
- **Invoke via Task tool:**
218
- ```
219
- Task(
220
- subagent_type: "type-safety",
221
- prompt: "[validator:type-safety] Validate {TARGET_DIRECTORY}. Return structured JSON OUTPUT.",
222
- description: "Type Safety Validator"
223
- )
224
- ```
225
-
226
- **Gate**: threshold >= 75, on fail: stop
227
-
228
- **Focus**:
229
- - Explicit any usage and type holes
230
- - Type assertions without runtime guards
231
- - Strict mode compliance
232
- - Public API type quality
233
-
234
- **Capture for tracker**: All type safety issues for tracker, especially those affecting public API.
235
-
236
- **If failing**: Fix type holes before proceeding. Type safety issues compound—one any infects all downstream code.
237
-
238
- **Skip conditions**:
239
- - No tsconfig.json found
240
- - Pure JavaScript project
241
-
242
- **Decision criteria**:
243
- - SAFE (🔒): Score ≥80 AND no any in public API AND no critical assertions
244
- - REVIEW (🔍): Score 75-79 OR minor any usage with justification
245
- - UNSAFE (⚠️): Score <75 OR any in public API OR critical type holes
246
-
247
- **Auto-fail conditions**:
248
- - any in exported function signatures
249
- - Double assertions (as unknown as SomeType pattern)
250
- - strict: false in tsconfig for library code
251
-
252
- **Depends on**: validate
253
-
254
- ---
255
-
256
- ### Phase 3: MCP Protocol Validation (Conditional)
257
- **Runs when**: `context.mcp_detected`
258
-
259
- **Commands**: mcp-validate@1.0.0
260
-
261
- **Invoke via Task tool:**
262
- ```
263
- Task(
264
- subagent_type: "mcp-validate",
265
- prompt: "[validator:mcp-validate] Validate {TARGET_DIRECTORY}. Return structured JSON OUTPUT.",
266
- description: "MCP Validator"
267
- )
268
- ```
269
-
270
- **Gate**: threshold >= 80, warn if < 65, on fail: stop
271
-
272
- **Why this threshold?** MCP protocol violations cause silent failures in AI integrations. Unlike code bugs that throw visible errors, broken MCP servers manifest as 'the AI doesn't respond' from end users.
273
-
274
- **Focus**:
275
- - Tools implementation (inputSchema, descriptions, error handling)
276
- - Resources implementation (valid URIs, MIME types, descriptions)
277
- - Prompts implementation (arguments documented, proper message structure)
278
- - Transport and protocol compliance
279
- - Security best practices (input validation, no command injection)
280
-
281
- **Capture for tracker**: All MCP compliance issues for tracker, especially auto-fail conditions.
282
-
283
- **If failing**: Fix protocol compliance issues before proceeding. Broken MCP servers cause silent failures in AI integrations.
284
-
285
- **Skip conditions**:
286
- - No MCP imports or SDK usage detected
287
- - No mcp-related dependencies in package files
288
- - Pure client-side application
289
-
290
- **Decision criteria**:
291
- - COMPLIANT (✅): Score ≥80 AND no auto-fail conditions → Pipeline CONTINUES
292
- - CONDITIONAL (⚠️): Score 65-79 → Pipeline CONTINUES with warnings
293
- - NON-COMPLIANT (❌): Score <65 OR auto-fail triggered → Pipeline FAILS
294
-
295
- **Auto-fail conditions**:
296
- - Missing JSON-RPC message handling
297
- - No capability declaration in server initialization
298
- - Tools without inputSchema definitions
299
- - Hardcoded secrets in tool implementations
300
- - No error handling for tool execution failures
301
- - Direct eval() or exec() of user-provided input
302
-
303
- **Depends on**: validate
304
-
305
- ---
306
-
307
- ### Phase 4: Test Architecture Review
308
- **Commands**: test-review@1.0.0
309
-
310
- **Invoke via Task tool:**
311
- ```
312
- Task(
313
- subagent_type: "test-review",
314
- prompt: "[validator:test-review] Validate {TARGET_DIRECTORY}. Return structured JSON OUTPUT.",
315
- description: "Test Architect"
316
- )
317
- ```
318
-
319
- **Gate**: threshold >= 70, on fail: warn
320
-
321
- **Focus**:
322
- - Test quality, not just coverage
323
- - False confidence patterns (mocks at wrong level)
324
- - Critical path coverage
325
- - Mutation testing readiness
326
-
327
- **Capture for tracker**: All recommendations for tracker.
328
-
329
- **If failing**: Improve tests before optimizing. Tests validate that optimizations do not break behavior.
330
-
331
- **Depends on**: validate
332
-
333
- ---
334
-
335
- ### Phase 5: Code Optimization Analysis
336
- **Commands**: optimize@1.0.0
337
-
338
- **Invoke via Task tool:**
339
- ```
340
- Task(
341
- subagent_type: "optimize",
342
- prompt: "[validator:optimize] Validate {TARGET_DIRECTORY}. Return structured JSON OUTPUT.",
343
- description: "Code Optimizer"
344
- )
345
- ```
346
-
347
- **Gate**: threshold >= 75, on fail: warn
348
-
349
- **Focus**:
350
- - Duplication and structure
351
- - Hot path performance
352
- - Maintainability
353
-
354
- **Capture for tracker**: All optimization opportunities for tracker, including deferred items.
355
-
356
- **If failing**: Address high-impact findings. This agent reports only—apply fixes manually.
357
-
358
- **Depends on**: test-architect
359
-
360
- ---
361
-
362
- ### Phase 6: Public Interface Validation
363
- **Commands**: public-interface@1.0.0
364
-
365
- **Invoke via Task tool:**
366
- ```
367
- Task(
368
- subagent_type: "public-interface",
369
- prompt: "[validator:public-interface] Validate {TARGET_DIRECTORY}. Return structured JSON OUTPUT.",
370
- description: "Public Interface Validator"
371
- )
372
- ```
373
-
374
- **Gate**: threshold >= 75, on fail: warn
375
-
376
- **Focus**:
377
- - Feature completeness in README
378
- - Documentation accuracy
379
- - Code hygiene (unused imports, dead code)
380
- - Export quality
381
-
382
- **Capture for tracker**: All documentation gaps and hygiene issues for tracker.
383
-
384
- **If failing**: Update README, remove dead code, add JSDoc. Consumer-facing polish.
385
-
386
- **Depends on**: optimizer
387
-
388
- ---
389
-
390
- ### Phase 7: Frontend Validation (Conditional)
391
- **Runs when**: `context.frontend_enabled`
392
-
393
- **Commands**: frontend-validate@1.0.0
394
-
395
- **Invoke via Task tool:**
396
- ```
397
- Task(
398
- subagent_type: "frontend-validate",
399
- prompt: "[validator:frontend-validate] Validate {TARGET_DIRECTORY}. Return structured JSON OUTPUT.",
400
- description: "frontend-validate"
401
- )
402
- ```
403
-
404
- **Gate**: threshold >= 75, on fail: warn
405
-
406
- **Focus**:
407
- - Component quality (single responsibility, typed props, hooks patterns)
408
- - Accessibility (semantic HTML, ARIA, keyboard navigation)
409
- - Theme consistency (no dark: prefixes, conditional className with useTheme())
410
- - Performance patterns (memoization, keys, lazy loading)
411
-
412
- **Capture for tracker**: All accessibility issues, theme violations, and component quality findings for tracker.
413
-
414
- **If failing**: Fix critical accessibility issues first, then theme violations, then component quality.
415
-
416
- **Skip conditions**:
417
- - No --frontend flag AND no .tsx/.jsx files detected
418
- - Backend-only changes
419
- - Configuration or documentation only changes
420
-
421
- **Decision criteria**:
422
- - POLISHED (✅): Score 80+ AND no critical accessibility issues AND theme system used correctly
423
- - ACCEPTABLE (🟡): Score 70+ AND no critical issues
424
- - NEEDS WORK (❌): Score below 70 OR critical accessibility OR theme violations
425
-
426
- **Depends on**: optimizer
427
-
428
- ---
429
-
430
-
431
- ---
432
-
433
- ## Summary Report
434
-
435
- After all phases complete, summarize:
436
-
437
- ```
438
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
439
- SUMMARY
440
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
441
-
442
- Target: [path]
443
- Run: [N]
444
-
445
- ┌─────────────────────┬────────┬────────────┐
446
- │ Agent │ Score │ Status │
447
- ├─────────────────────┼────────┼────────────┤
448
- │ ... │ [X]/100│ ✅/❌/⏭️ │
449
- └─────────────────────┴────────┴────────────┘
450
-
451
- ```
452
-
453
-
454
- ### Scoring
455
-
456
- **Method**: weighted_average
457
-
458
- | Phase | Weight |
459
- |-------|--------|
460
- | validate | 25% |
461
- | type-safety | 15% |
462
- | mcp-validator | 10% |
463
- | test-architect | 15% |
464
- | optimizer | 10% |
465
- | public-interface | 15% |
466
- | frontend | 10% |
467
-
468
-
469
- ---
470
-
471
-
472
-
473
-
474
-
475
- ---
476
-
477
- ## Iteration Pattern
478
-
479
- ```
480
- Implementation
481
-
482
-
483
- /workflows:post-implementation
484
-
485
- ├── Run all agents
486
-
487
- ├── Persist to tracker (ALWAYS)
488
-
489
- ├── All pass? ──▶ /workflows:ship ──▶ 🚀
490
-
491
- └── Failures? ──▶ Fix issues (use features list as checklist)
492
-
493
- └──▶ /workflows:post-implementation (repeat)
494
-
495
- └── Updates features list with new run number
496
-
497
- ```
498
-
499
- **Typical iterations**:
500
- - Clean implementation: 1-2 runs
501
- - Complex feature: 2-4 runs
502
- - Major refactor: 3-5 runs
503
-
504
- **Report behavior across iterations**:
505
- - Each run creates a new timestamped file (e.g., api-features-list-2026-01-13T14-30-52.md)
506
- - Previous runs are preserved for audit trail
507
- - Resolved items from previous runs will not appear in new runs if agents no longer flag them
508
- - Consider adding *-features-list-*.md to .gitignore to avoid committing validation artifacts
509
-
510
- ---
511
-
512
- ## Quick Reference
513
-
514
- | Agent | Threshold | Group |
515
- |-------|-----------|-------|
516
- | Code Validation | threshold >= 70, on fail: stop | 1 |
517
- | TypeScript Validation | threshold >= 75, on fail: stop | 2 |
518
- | MCP Protocol Validation | threshold >= 80, warn if < 65, on fail: stop | 2 |
519
- | Test Architecture Review | threshold >= 70, on fail: warn | 2 |
520
- | Code Optimization Analysis | threshold >= 75, on fail: warn | 3 |
521
- | Public Interface Validation | threshold >= 75, on fail: warn | 4 |
522
- | Frontend Validation | threshold >= 75, on fail: warn | 4 |
523
-
524
- **Conditional Validator Activation**:
525
- - **TypeScript Validation**: `context.typescript_detected`
526
- - **MCP Protocol Validation**: `context.mcp_detected`
527
- - **Frontend Validation**: `context.frontend_enabled`
528
-
529
- ---
530
-
531
- ## Troubleshooting
532
-
533
- ### Optimizer keeps finding issues after I fix them
534
-
535
- The optimizer may surface new issues as you refactor. This is expected—each fix can reveal deeper patterns. Set a practical limit:
536
- - 3 iterations max for optimizer
537
- - After that, remaining issues become tech debt (document in features list under Deferred)
538
-
539
-
540
- ### Public Interface says feature undocumented but it is intentionally internal
541
-
542
- If a feature is intentionally undocumented (internal API, experimental), note it in the features list but categorize as Deferred or add a note explaining it is intentional.
543
-
544
-
545
- ### Tests pass but Test Architect scores low
546
-
547
- Test Architect evaluates *quality*, not pass/fail. Passing tests with mocks at the wrong level provide false confidence. Trust the agent—improve the tests. The features list will track what needs improvement.
548
-
549
-
550
- ### TypeScript Validator keeps flagging my any usage
551
-
552
- The validator is intentionally strict about any because type holes propagate. One any in your code becomes any in consumer code. If any is genuinely necessary:
553
- 1. Add a SAFETY comment explaining why
554
- 2. Isolate it to a boundary layer (e.g., third-party API adapters)
555
- 3. Consider using unknown with type guards instead
556
-
557
-
558
- ### MCP Validator runs but my server is not using standard patterns
559
-
560
- The MCP Validator looks for common patterns from FastMCP (Python) and @modelcontextprotocol/sdk (TypeScript). If you are using a custom MCP implementation:
561
- - The validator may miss tool/resource/prompt definitions
562
- - You may need to manually verify protocol compliance
563
- - Consider adding standard decorators/handlers for auto-detection
564
-
565
-
566
- ### Frontend Validator keeps flagging dark:prefixes
567
-
568
- This is intentional. The project uses a custom theme system via useTheme() hook. Replace:
569
-
570
- className="bg-white dark:bg-gray-900"
571
-
572
- With:
573
-
574
- const { resolvedTheme } = useTheme();
575
- className={resolvedTheme === 'light' ? 'bg-white' : 'bg-gray-900'}
576
-
577
-