@tyroneross/build-loop 0.30.3

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 (389) hide show
  1. package/.agents/plugins/marketplace.json +10 -0
  2. package/.claude-plugin/marketplace.json +38 -0
  3. package/.claude-plugin/plugin.json +30 -0
  4. package/.codex-plugin/plugin.json +41 -0
  5. package/.cursor/rules/build-loop-surface.mdc +22 -0
  6. package/AGENTS.md +498 -0
  7. package/LICENSE +202 -0
  8. package/README.md +403 -0
  9. package/agents/alignment-checker.md +124 -0
  10. package/agents/api-assessor.md +136 -0
  11. package/agents/architecture-scout.md +185 -0
  12. package/agents/assessment-orchestrator.md +163 -0
  13. package/agents/build-orchestrator.md +198 -0
  14. package/agents/database-assessor.md +133 -0
  15. package/agents/design-contract-specialist.md +239 -0
  16. package/agents/fact-checker.md +69 -0
  17. package/agents/fix-critique.md +161 -0
  18. package/agents/frontend-assessor.md +136 -0
  19. package/agents/implementer.md +185 -0
  20. package/agents/independent-auditor.md +143 -0
  21. package/agents/mock-scanner.md +78 -0
  22. package/agents/optimize-runner.md +112 -0
  23. package/agents/overfitting-reviewer.md +96 -0
  24. package/agents/performance-assessor.md +159 -0
  25. package/agents/plan-critic.md +85 -0
  26. package/agents/promotion-reviewer.md +121 -0
  27. package/agents/recurring-pattern-detector.md +248 -0
  28. package/agents/retrospective-synthesizer.md +109 -0
  29. package/agents/root-cause-investigator.md +285 -0
  30. package/agents/scope-auditor.md +121 -0
  31. package/agents/security-reviewer.md +151 -0
  32. package/agents/self-improvement-architect.md +125 -0
  33. package/agents/synthesis-critic.md +99 -0
  34. package/agents/transcript-pattern-miner.md +165 -0
  35. package/agents/ui-validator.md +193 -0
  36. package/codex-skills/build-loop/SKILL.md +20 -0
  37. package/codex-skills/debug-loop/SKILL.md +18 -0
  38. package/codex-skills/handoff/SKILL.md +22 -0
  39. package/codex-skills/knowledge/SKILL.md +21 -0
  40. package/codex-skills/optimize/SKILL.md +18 -0
  41. package/codex-skills/research/SKILL.md +18 -0
  42. package/commands/agent-rally-point.md +301 -0
  43. package/commands/assess.md +41 -0
  44. package/commands/debug.md +20 -0
  45. package/commands/debugger-detail.md +34 -0
  46. package/commands/debugger-scan.md +15 -0
  47. package/commands/debugger-status.md +20 -0
  48. package/commands/debugger.md +32 -0
  49. package/commands/handoff.md +113 -0
  50. package/commands/knowledge-review.md +16 -0
  51. package/commands/optimize.md +31 -0
  52. package/commands/plan-verify.md +39 -0
  53. package/commands/promote-experiment.md +129 -0
  54. package/commands/research.md +22 -0
  55. package/commands/run.md +12 -0
  56. package/commands/self-review.md +51 -0
  57. package/commands/start-prd.md +57 -0
  58. package/commands/test.md +34 -0
  59. package/dist/src/assessment-orchestrator.d.ts +78 -0
  60. package/dist/src/assessment-orchestrator.d.ts.map +1 -0
  61. package/dist/src/assessment-orchestrator.js +304 -0
  62. package/dist/src/assessment-orchestrator.js.map +1 -0
  63. package/dist/src/audit-miner.d.ts +21 -0
  64. package/dist/src/audit-miner.d.ts.map +1 -0
  65. package/dist/src/audit-miner.js +421 -0
  66. package/dist/src/audit-miner.js.map +1 -0
  67. package/dist/src/batch-operations.d.ts +30 -0
  68. package/dist/src/batch-operations.d.ts.map +1 -0
  69. package/dist/src/batch-operations.js +339 -0
  70. package/dist/src/batch-operations.js.map +1 -0
  71. package/dist/src/config.d.ts +83 -0
  72. package/dist/src/config.d.ts.map +1 -0
  73. package/dist/src/config.js +176 -0
  74. package/dist/src/config.js.map +1 -0
  75. package/dist/src/context-engine.d.ts +45 -0
  76. package/dist/src/context-engine.d.ts.map +1 -0
  77. package/dist/src/context-engine.js +135 -0
  78. package/dist/src/context-engine.js.map +1 -0
  79. package/dist/src/debug-wrapper.d.ts +58 -0
  80. package/dist/src/debug-wrapper.d.ts.map +1 -0
  81. package/dist/src/debug-wrapper.js +285 -0
  82. package/dist/src/debug-wrapper.js.map +1 -0
  83. package/dist/src/index.d.ts +31 -0
  84. package/dist/src/index.d.ts.map +1 -0
  85. package/dist/src/index.js +149 -0
  86. package/dist/src/index.js.map +1 -0
  87. package/dist/src/interactive-verifier.d.ts +26 -0
  88. package/dist/src/interactive-verifier.d.ts.map +1 -0
  89. package/dist/src/interactive-verifier.js +435 -0
  90. package/dist/src/interactive-verifier.js.map +1 -0
  91. package/dist/src/lessons.d.ts +59 -0
  92. package/dist/src/lessons.d.ts.map +1 -0
  93. package/dist/src/lessons.js +172 -0
  94. package/dist/src/lessons.js.map +1 -0
  95. package/dist/src/log-reader.d.ts +39 -0
  96. package/dist/src/log-reader.d.ts.map +1 -0
  97. package/dist/src/log-reader.js +291 -0
  98. package/dist/src/log-reader.js.map +1 -0
  99. package/dist/src/logger.d.ts +59 -0
  100. package/dist/src/logger.d.ts.map +1 -0
  101. package/dist/src/logger.js +328 -0
  102. package/dist/src/logger.js.map +1 -0
  103. package/dist/src/parallel-retrieval.d.ts +52 -0
  104. package/dist/src/parallel-retrieval.d.ts.map +1 -0
  105. package/dist/src/parallel-retrieval.js +309 -0
  106. package/dist/src/parallel-retrieval.js.map +1 -0
  107. package/dist/src/pattern-extractor.d.ts +30 -0
  108. package/dist/src/pattern-extractor.d.ts.map +1 -0
  109. package/dist/src/pattern-extractor.js +386 -0
  110. package/dist/src/pattern-extractor.js.map +1 -0
  111. package/dist/src/result-aggregator.d.ts +44 -0
  112. package/dist/src/result-aggregator.d.ts.map +1 -0
  113. package/dist/src/result-aggregator.js +315 -0
  114. package/dist/src/result-aggregator.js.map +1 -0
  115. package/dist/src/retrieval.d.ts +139 -0
  116. package/dist/src/retrieval.d.ts.map +1 -0
  117. package/dist/src/retrieval.js +724 -0
  118. package/dist/src/retrieval.js.map +1 -0
  119. package/dist/src/setup/auto-setup.d.ts +15 -0
  120. package/dist/src/setup/auto-setup.d.ts.map +1 -0
  121. package/dist/src/setup/auto-setup.js +157 -0
  122. package/dist/src/setup/auto-setup.js.map +1 -0
  123. package/dist/src/setup/configure-hooks.d.ts +8 -0
  124. package/dist/src/setup/configure-hooks.d.ts.map +1 -0
  125. package/dist/src/setup/configure-hooks.js +16 -0
  126. package/dist/src/setup/configure-hooks.js.map +1 -0
  127. package/dist/src/setup/create-slash-commands.d.ts +8 -0
  128. package/dist/src/setup/create-slash-commands.d.ts.map +1 -0
  129. package/dist/src/setup/create-slash-commands.js +101 -0
  130. package/dist/src/setup/create-slash-commands.js.map +1 -0
  131. package/dist/src/setup/index.d.ts +8 -0
  132. package/dist/src/setup/index.d.ts.map +1 -0
  133. package/dist/src/setup/index.js +17 -0
  134. package/dist/src/setup/index.js.map +1 -0
  135. package/dist/src/setup/inject-claude-md.d.ts +10 -0
  136. package/dist/src/setup/inject-claude-md.d.ts.map +1 -0
  137. package/dist/src/setup/inject-claude-md.js +150 -0
  138. package/dist/src/setup/inject-claude-md.js.map +1 -0
  139. package/dist/src/setup/uninstall.d.ts +22 -0
  140. package/dist/src/setup/uninstall.d.ts.map +1 -0
  141. package/dist/src/setup/uninstall.js +235 -0
  142. package/dist/src/setup/uninstall.js.map +1 -0
  143. package/dist/src/storage.d.ts +192 -0
  144. package/dist/src/storage.d.ts.map +1 -0
  145. package/dist/src/storage.js +1037 -0
  146. package/dist/src/storage.js.map +1 -0
  147. package/dist/src/string-similarity.d.ts +8 -0
  148. package/dist/src/string-similarity.d.ts.map +1 -0
  149. package/dist/src/string-similarity.js +57 -0
  150. package/dist/src/string-similarity.js.map +1 -0
  151. package/dist/src/traces/adapters/browser.d.ts +69 -0
  152. package/dist/src/traces/adapters/browser.d.ts.map +1 -0
  153. package/dist/src/traces/adapters/browser.js +280 -0
  154. package/dist/src/traces/adapters/browser.js.map +1 -0
  155. package/dist/src/traces/adapters/index.d.ts +23 -0
  156. package/dist/src/traces/adapters/index.d.ts.map +1 -0
  157. package/dist/src/traces/adapters/index.js +67 -0
  158. package/dist/src/traces/adapters/index.js.map +1 -0
  159. package/dist/src/traces/adapters/langchain.d.ts +42 -0
  160. package/dist/src/traces/adapters/langchain.d.ts.map +1 -0
  161. package/dist/src/traces/adapters/langchain.js +151 -0
  162. package/dist/src/traces/adapters/langchain.js.map +1 -0
  163. package/dist/src/traces/adapters/opentelemetry.d.ts +46 -0
  164. package/dist/src/traces/adapters/opentelemetry.d.ts.map +1 -0
  165. package/dist/src/traces/adapters/opentelemetry.js +164 -0
  166. package/dist/src/traces/adapters/opentelemetry.js.map +1 -0
  167. package/dist/src/traces/adapters/sentry.d.ts +58 -0
  168. package/dist/src/traces/adapters/sentry.d.ts.map +1 -0
  169. package/dist/src/traces/adapters/sentry.js +212 -0
  170. package/dist/src/traces/adapters/sentry.js.map +1 -0
  171. package/dist/src/traces/index.d.ts +10 -0
  172. package/dist/src/traces/index.d.ts.map +1 -0
  173. package/dist/src/traces/index.js +45 -0
  174. package/dist/src/traces/index.js.map +1 -0
  175. package/dist/src/traces/storage.d.ts +78 -0
  176. package/dist/src/traces/storage.d.ts.map +1 -0
  177. package/dist/src/traces/storage.js +399 -0
  178. package/dist/src/traces/storage.js.map +1 -0
  179. package/dist/src/traces/summarizer.d.ts +83 -0
  180. package/dist/src/traces/summarizer.d.ts.map +1 -0
  181. package/dist/src/traces/summarizer.js +247 -0
  182. package/dist/src/traces/summarizer.js.map +1 -0
  183. package/dist/src/traces/types.d.ts +365 -0
  184. package/dist/src/traces/types.d.ts.map +1 -0
  185. package/dist/src/traces/types.js +14 -0
  186. package/dist/src/traces/types.js.map +1 -0
  187. package/dist/src/types.d.ts +495 -0
  188. package/dist/src/types.d.ts.map +1 -0
  189. package/dist/src/types.js +27 -0
  190. package/dist/src/types.js.map +1 -0
  191. package/docs/agent-surface-policy.md +45 -0
  192. package/docs/memory-setup.md +226 -0
  193. package/hooks/_arch_scan_bg.py +88 -0
  194. package/hooks/_plugin_drift_check_bg.py +85 -0
  195. package/hooks/_session_start_lib.sh +42 -0
  196. package/hooks/git/pre-push +141 -0
  197. package/hooks/hooks.json +126 -0
  198. package/hooks/post-commit +30 -0
  199. package/hooks/pre-commit +29 -0
  200. package/hooks/pre-edit-apppulse.sh +6 -0
  201. package/hooks/pre-edit-architecture.sh +106 -0
  202. package/hooks/pre-edit-rally-point.sh +92 -0
  203. package/hooks/session-start-apppulse.sh +6 -0
  204. package/hooks/session-start-architecture.sh +10 -0
  205. package/hooks/session-start-git-hooks.sh +12 -0
  206. package/hooks/session-start-plugin-drift.sh +27 -0
  207. package/hooks/session-start-rally-point.sh +44 -0
  208. package/hooks/session-start-retrieval.sh +24 -0
  209. package/hooks/session-start-worktree-gc.sh +105 -0
  210. package/hooks/test_apppulse_hooks.sh +6 -0
  211. package/hooks/test_rally_point_hooks.sh +388 -0
  212. package/hooks/test_sec008_hooks.sh +66 -0
  213. package/package.json +111 -0
  214. package/scripts/README.md +301 -0
  215. package/scripts/_db_url.py +61 -0
  216. package/scripts/_paths.py +445 -0
  217. package/scripts/blm.py +162 -0
  218. package/scripts/blm_api.py +263 -0
  219. package/scripts/check_cache_sync.py +490 -0
  220. package/scripts/embed_backend.py +475 -0
  221. package/scripts/install_memory.py +556 -0
  222. package/scripts/lessons_index/__init__.py +77 -0
  223. package/scripts/lessons_index/__main__.py +135 -0
  224. package/scripts/lessons_index/ingest.py +288 -0
  225. package/scripts/lessons_index/query.py +285 -0
  226. package/scripts/lessons_index/schema.py +114 -0
  227. package/scripts/memory_context/__init__.py +610 -0
  228. package/scripts/memory_graph/__init__.py +393 -0
  229. package/scripts/project_resolver.py +172 -0
  230. package/scripts/prune_codex_plugin_cache.py +23 -0
  231. package/scripts/prune_plugin_cache.py +359 -0
  232. package/scripts/semantic_index/__init__.py +482 -0
  233. package/scripts/semantic_index/_bench_hybrid.py +175 -0
  234. package/scripts/semantic_index/backfill.py +263 -0
  235. package/scripts/semantic_index/hybrid.py +174 -0
  236. package/scripts/semantic_index/test_backfill.py +292 -0
  237. package/scripts/semantic_index/test_hybrid.py +541 -0
  238. package/scripts/sync_navgator_lessons.py +666 -0
  239. package/scripts/sync_plugin_cache.py +388 -0
  240. package/skills/agent-rally-point/SKILL.md +165 -0
  241. package/skills/agent-rally-watcher/SKILL.md +83 -0
  242. package/skills/api-registry-bridge/SKILL.md +59 -0
  243. package/skills/architecture/dead/SKILL.md +56 -0
  244. package/skills/architecture/impact/SKILL.md +88 -0
  245. package/skills/architecture/review/SKILL.md +227 -0
  246. package/skills/architecture/rules/SKILL.md +72 -0
  247. package/skills/architecture/scan/SKILL.md +79 -0
  248. package/skills/architecture/trace/SKILL.md +65 -0
  249. package/skills/attribution-standard/SKILL.md +122 -0
  250. package/skills/authentication/SKILL.md +81 -0
  251. package/skills/authentication/references/better-auth-magic-link.md +135 -0
  252. package/skills/authentication/references/better-auth-setup.md +224 -0
  253. package/skills/authentication/references/google-calendar-sync.md +278 -0
  254. package/skills/authentication/references/google-cloud-console.md +159 -0
  255. package/skills/authentication/references/google-geocoding-directions.md +126 -0
  256. package/skills/authentication/references/google-lessons-example-web-app.md +177 -0
  257. package/skills/authentication/references/google-maps.md +162 -0
  258. package/skills/authentication/references/google-oauth-setup.md +343 -0
  259. package/skills/authentication/references/google-places.md +173 -0
  260. package/skills/authentication/references/lessons-example-web-app-better-auth.md +126 -0
  261. package/skills/authentication/references/resend-email.md +227 -0
  262. package/skills/authentication/references/resend-otp-magic-link.md +153 -0
  263. package/skills/authentication/references/supabase-auth.md +172 -0
  264. package/skills/auto-decision-capture/SKILL.md +419 -0
  265. package/skills/build-loop/SKILL.md +516 -0
  266. package/skills/build-loop/detect-plugins.mjs +82 -0
  267. package/skills/build-loop/eval-guide.md +65 -0
  268. package/skills/build-loop/fallbacks.md +549 -0
  269. package/skills/build-loop/phases/fact-check.md +42 -0
  270. package/skills/build-loop/phases/ui-validation.md +267 -0
  271. package/skills/build-loop/references/apple-native-planning.md +439 -0
  272. package/skills/build-loop/references/capability-routing.md +181 -0
  273. package/skills/build-loop/references/codex-subagents.md +98 -0
  274. package/skills/build-loop/references/coordination.md +161 -0
  275. package/skills/build-loop/references/correction-aware-capture.md +177 -0
  276. package/skills/build-loop/references/independent-auditor.md +72 -0
  277. package/skills/build-loop/references/intent-capability-pack.md +170 -0
  278. package/skills/build-loop/references/intent-exploration-prompts.md +96 -0
  279. package/skills/build-loop/references/leadership.md +72 -0
  280. package/skills/build-loop/references/memory.md +284 -0
  281. package/skills/build-loop/references/modular-systems-pack.md +96 -0
  282. package/skills/build-loop/references/output-style.md +129 -0
  283. package/skills/build-loop/references/pay-it-forward-arch.md +98 -0
  284. package/skills/build-loop/references/phase-1-assess.md +218 -0
  285. package/skills/build-loop/references/phase-2-plan.md +77 -0
  286. package/skills/build-loop/references/phase-3-execute.md +47 -0
  287. package/skills/build-loop/references/phase-4-review.md +310 -0
  288. package/skills/build-loop/references/phase-5-iterate.md +71 -0
  289. package/skills/build-loop/references/phase-6-learn.md +56 -0
  290. package/skills/build-loop/references/recent-design-structures.md +274 -0
  291. package/skills/build-loop/references/refactor-history/ASSESSMENT.md +85 -0
  292. package/skills/build-loop/references/refactor-history/STANDALONE_TEST_RUN.md +149 -0
  293. package/skills/build-loop/references/refactor-history/scenarios/01-simple-bugfix.md +32 -0
  294. package/skills/build-loop/references/refactor-history/scenarios/02-ui-build-with-iteration.md +48 -0
  295. package/skills/build-loop/references/refactor-history/scenarios/03-multi-failure-escalation.md +60 -0
  296. package/skills/build-loop/references/refactor-history/scenarios/04-ui-build-ibr-absent.md +51 -0
  297. package/skills/build-loop/references/refactor-history/scenarios/05-refactor-navgator-absent.md +71 -0
  298. package/skills/build-loop/references/refactor-history/scenarios/06-recurring-bug-debugger-absent.md +52 -0
  299. package/skills/build-loop/references/refactor-history/trace-comparison.md +202 -0
  300. package/skills/build-loop/references/self-recursive-dev.md +77 -0
  301. package/skills/build-loop/references/self-review.md +232 -0
  302. package/skills/build-loop/references/ui-io-contract.md +116 -0
  303. package/skills/build-loop/scanners/audit-design-rules.mjs +476 -0
  304. package/skills/build-loop/scanners/require-visual-evidence.mjs +239 -0
  305. package/skills/build-loop/templates/backlog-item.md +35 -0
  306. package/skills/build-loop/templates/codex-worker-prompt.md +89 -0
  307. package/skills/build-loop/templates/ui-subagent-prompt.md +179 -0
  308. package/skills/build-loop/templates/ux-fix-plan.md +40 -0
  309. package/skills/building-with-deepagents/SKILL.md +195 -0
  310. package/skills/building-with-deepagents/references/anti-patterns.md +141 -0
  311. package/skills/building-with-deepagents/references/api-quick-reference.md +184 -0
  312. package/skills/capabilities/SKILL.md +91 -0
  313. package/skills/debug-loop/SKILL.md +278 -0
  314. package/skills/debug-loop/references/convergence-rules.md +145 -0
  315. package/skills/debug-loop/references/swiftui-macos-clunky-ui-debugger.html +823 -0
  316. package/skills/debugging/assess/SKILL.md +111 -0
  317. package/skills/debugging/debug-loop/SKILL.md +231 -0
  318. package/skills/debugging/memory/SKILL.md +147 -0
  319. package/skills/debugging/store/SKILL.md +153 -0
  320. package/skills/debugging-memory/SKILL.md +440 -0
  321. package/skills/debugging-memory/examples/incident-example.json +67 -0
  322. package/skills/debugging-memory/references/incident-documentation.md +280 -0
  323. package/skills/debugging-memory/references/ios-notification-alarm-playbook.md +300 -0
  324. package/skills/debugging-memory/references/pattern-extraction.md +163 -0
  325. package/skills/debugging-memory/references/subagent-integration.md +312 -0
  326. package/skills/defenseclaw-bridge/SKILL.md +156 -0
  327. package/skills/defenseclaw-bridge/references/dc-config-mapping.md +162 -0
  328. package/skills/defenseclaw-bridge/references/output-format.md +108 -0
  329. package/skills/handoff/SKILL.md +94 -0
  330. package/skills/ibr-bridge/SKILL.md +68 -0
  331. package/skills/knowledge/SKILL.md +127 -0
  332. package/skills/knowledge/references/recall-integration.md +83 -0
  333. package/skills/knowledge/templates/madr-minimal.md +56 -0
  334. package/skills/knowledge-review/SKILL.md +112 -0
  335. package/skills/logging-tracer/SKILL.md +202 -0
  336. package/skills/logging-tracer/references/log-analysis.md +128 -0
  337. package/skills/logging-tracer/references/stack-templates.md +274 -0
  338. package/skills/logging-tracer-bridge/SKILL.md +70 -0
  339. package/skills/mcp-builder/SKILL.md +278 -0
  340. package/skills/mcp-builder/references/mcp-security.md +106 -0
  341. package/skills/model-tiering/SKILL.md +216 -0
  342. package/skills/native-ax-driver/SKILL.md +220 -0
  343. package/skills/native-ax-driver/scripts/layout_fill.py +222 -0
  344. package/skills/native-ax-driver/scripts/native_driver.py +495 -0
  345. package/skills/native-ax-driver/swift/bl-ax-driver/Package.swift +20 -0
  346. package/skills/native-ax-driver/swift/bl-ax-driver/Sources/main.swift +542 -0
  347. package/skills/optimize/SKILL.md +202 -0
  348. package/skills/optimize/profiles.md +61 -0
  349. package/skills/plan-verify/SKILL.md +115 -0
  350. package/skills/plan-verify/test-fixtures/example-app-v20-findings.json +27 -0
  351. package/skills/plan-verify/test-fixtures/example-app-v20.md +42 -0
  352. package/skills/plan-verify/test-fixtures/example-app-v22-findings.json +15 -0
  353. package/skills/plan-verify/test-fixtures/example-app-v22.md +1608 -0
  354. package/skills/plan-verify/test-fixtures/unrelated-good-plan-findings.json +15 -0
  355. package/skills/plan-verify/test-fixtures/unrelated-good-plan.md +55 -0
  356. package/skills/plugin-builder/SKILL.md +329 -0
  357. package/skills/plugin-builder/references/authoritative-sources.md +104 -0
  358. package/skills/plugin-builder/references/build-loop-phase-guidance.md +94 -0
  359. package/skills/plugin-builder/references/components-guide.md +221 -0
  360. package/skills/plugin-builder/references/distribution.md +317 -0
  361. package/skills/plugin-builder/references/dual-host-claude-codex.md +220 -0
  362. package/skills/plugin-builder/references/hooks-reference.md +210 -0
  363. package/skills/plugin-builder/references/manifest-schema.md +111 -0
  364. package/skills/plugin-builder/references/plugin-hygiene-lessons.md +307 -0
  365. package/skills/plugin-tests/SKILL.md +94 -0
  366. package/skills/prd-bridge/SKILL.md +135 -0
  367. package/skills/research/SKILL.md +80 -0
  368. package/skills/security-methodology/SKILL.md +105 -0
  369. package/skills/security-methodology/references/cross-source-matrix.md +77 -0
  370. package/skills/security-methodology/references/mitre-atlas-starter.md +83 -0
  371. package/skills/security-methodology/references/nist-600-1-mapping.md +119 -0
  372. package/skills/security-methodology/references/owasp-agentic-top-10.md +157 -0
  373. package/skills/security-methodology/references/owasp-llm-top-10.md +144 -0
  374. package/skills/security-methodology/references/owasp-web-top-10.md +65 -0
  375. package/skills/self-improve/SKILL.md +298 -0
  376. package/skills/spec-writing/SKILL.md +548 -0
  377. package/skills/spec-writing/scripts/check_checklist.py +478 -0
  378. package/skills/sync-skills/SKILL.md +132 -0
  379. package/skills/telemetry/SKILL.md +66 -0
  380. package/skills/ui-design/SKILL.md +75 -0
  381. package/skills/ui-design/references/design-patterns-multi.md +165 -0
  382. package/skills/ui-design/references/design-preferences-from-owned-apps.md +150 -0
  383. package/skills/ui-design/references/evidence-capture-policy.md +55 -0
  384. package/skills/ui-design/references/ui-guidance-sources.md +330 -0
  385. package/skills/ui-design/references/universal-design-principles.alt.md +182 -0
  386. package/skills/ui-design/references/universal-design-principles.md +419 -0
  387. package/templates/memory/MEMORY.md.template +55 -0
  388. package/templates/memory/constitution.md.template +64 -0
  389. package/templates/memory/manifest.json +47 -0
@@ -0,0 +1,267 @@
1
+ <!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
2
+
3
+ # Phase Guidance: UI Validation
4
+
5
+ How build-loop turns design rules into gates. Triggered when Phase 1 ASSESS detects a UI target (`uiTarget != null`).
6
+
7
+ ## Why this exists
8
+
9
+ A retrospective on a real shipped build (example app build 50) found that mockup-parity validation was insufficient. Subagents reproduced mockups faithfully, including anti-patterns the project's own design rules forbade — colored status pills, ungated `repeatForever` animations, theme-token bypass, hardcoded font sizes in body copy.
10
+
11
+ Root cause: design rules in `CLAUDE.md` were loaded as session context but didn't enter individual subagent prompts. Knowledge that doesn't enter the prompt doesn't reach the code.
12
+
13
+ This phase guidance treats design rules and UI input/output contracts as gates, not advisories.
14
+
15
+ ## When triggered
16
+
17
+ Phase 1 ASSESS sets `uiTarget` to one of `web`, `mobile`, or `null` based on project signals (see SKILL.md §Sub-routers — `ios/`, `*.swift`, `*.xcodeproj` → mobile/apple; `app.json` (Expo) → mobile/react-native; else web).
18
+
19
+ When `uiTarget != null`, the UI gates wire in automatically:
20
+
21
+ 1. **Phase 1 (Assess)** — mockup pre-flight scan + required UI scoring criteria
22
+ 2. **Phase 2 (Plan)** — UI input/output contract section from `references/ui-io-contract.md`, then mockup-gallery hook for major UI work (new page or ≥40% redesign): draft B&W mockups via `mockup-gallery:mockup-session-new` before any UI is written. The exception to build-loop's "actions/functions only, no plugin UI" policy — mockup drafting is itself the action.
23
+ 3. **Phase 3 (Execute)** — verbatim subagent-prompt template injection on every UI dispatch, including the plan's UI input/output contract
24
+ 4. **Phase 4 sub-step B (Validate)** — build-loop-owned `ui-validator` first, then design-rule scanner on changed files, contract coverage, code graders, and visual evidence capture
25
+ 5. **Phase 4 sub-step D (Fact-Check)** — Gate 5 design-rule scanner across full project; Gate 5a UI input/output contract scan; Gate 7 UX triage scanner (interactability, performance, data-accuracy, usability) writing queue entries to `.build-loop/ux-queue/`
26
+ 6. **Phase 5 (Iterate)** — drains the UX queue alongside Validate failures; parallel fan-out (≤4) for independent fixes; runs the build-loop UI re-validate hook before returning to Review-B
27
+
28
+ ## UX scan dimensions (Gate 7)
29
+
30
+ Static portion runs via `ux_triage.py`. Agent-driven portion runs alongside via `performance-assessor` and `fact-checker` for the dimensions the static scanner can't fully cover.
31
+
32
+ | Dimension | Static checks | Agent augmentation |
33
+ |---|---|---|
34
+ | Interactability | Buttons without handlers, anchors without href/onClick, icon buttons missing aria-label, empty SwiftUI Button closures | `ui-validator` + runtime smoke when a route can be rendered; static grep remains the fallback |
35
+ | Performance | N+1 fetch in forEach/map, unbounded useEffect, full-lib lodash imports | `performance-assessor` agent: profile or simulate the full app, return findings outside static scope |
36
+ | Data accuracy beyond current scope | Hardcoded percent/dollar/year literals in JSX, "as of <date>" strings | `fact-checker` agent: walk full rendered surface, not just changed files |
37
+ | Usability heuristics | Status badges using background color, lists without empty/error branch | LLM judge sub-prompt for hierarchy/empty-state/status-clarity (confidence ≥ medium only) |
38
+
39
+ Each `blocker` or `major` finding becomes a queue entry from `templates/ux-fix-plan.md`. Minor findings → Review-F report only. `architecture_impact: true` entries pause for user confirmation in Review-F before Iterate dequeues.
40
+
41
+ ## Build-loop designer and validator ordering
42
+
43
+ When `uiTarget != null`, build-loop owns the design route:
44
+
45
+ 1. Phase 2 loads `build-loop:ui-design`, then dispatches `design-contract-specialist` with `trigger_point: phase2-design-direction` for non-trivial UI work. It reads the UI input/output contract, `references/recent-design-structures.md`, `skills/ui-design/references/ui-guidance-sources.md`, product/workflow needs, project tokens, mockups, screenshots, and local design artifacts, then chooses a fit-for-purpose direction and writes `.build-loop/app-contract/ui.md`. Recent and existing design patterns are inputs, not mandates.
46
+ 2. Phase 3 implementers receive the UI contract plus `templates/ui-subagent-prompt.md`.
47
+ 3. Visual verification routes per `state.json.availablePlugins.ibr`:
48
+ - **IBR installed → IBR primary**: dispatch IBR `scan` (web) / `scan_macos` (macOS) via `build-loop:ibr-bridge`; `ui-validator` runs in parallel as the build-loop-owned check.
49
+ - **IBR absent → native fallback**: Phase 4-B dispatches `ui-validator` first (web), or routes to `native-ax-driver` (macOS), or the iOS-simulator screenshot path (`uiTarget: "mobile"`). Either path satisfies the BL-1 visual-evidence gate.
50
+ 4. Phase 4-B always runs scanners and code graders after the visual verifier. The BL-1 gate (`scanners/require-visual-evidence.mjs`) is a separate exit-code check; it does not care which route ran, only that the evidence is visual/AX rather than symbol/string.
51
+
52
+ The verification route reverses the previous "explicit-only" IBR policy (2026-06-04). The build-loop-owned native verifiers remain the always-available floor. `nm` / `strings` / `git grep` over compiled symbols is never an acceptable substitute regardless of which route was chosen.
53
+
54
+ ## Skills to load by platform
55
+
56
+ The orchestrator must load these skills before dispatching subagents:
57
+
58
+ | Platform | Always | + Platform skills |
59
+ |---|---|---|
60
+ | SwiftUI / iOS / macOS / watchOS | `build-loop:ui-design` + `calm-precision` + `design-contract-specialist` | `apple-dev` when Apple-platform implementation/deploy details matter |
61
+ | React / Next.js / web | `build-loop:ui-design` + `calm-precision` + `design-contract-specialist` | `frontend-design` only when explicitly requested |
62
+ | Vue / Svelte | `build-loop:ui-design` + `calm-precision` + `design-contract-specialist` | `frontend-design` only when explicitly requested |
63
+ | Native iOS guidance | `build-loop:ui-design` + `calm-precision` + `design-contract-specialist` | `apple-dev` for native platform conventions |
64
+
65
+ Subagents themselves are also instructed to load these skills via the `templates/ui-subagent-prompt.md` preamble.
66
+
67
+ ## Phase 1 (Assess) — Mockup pre-flight
68
+
69
+ If the project has `mockups/` or `.mockup-gallery/` and the goal references selected mockups:
70
+
71
+ ```
72
+ node "${CLAUDE_PLUGIN_ROOT}/skills/build-loop/scanners/audit-design-rules.mjs" \
73
+ --root="<mockups_dir>" \
74
+ --platform=html \
75
+ --json
76
+ ```
77
+
78
+ Log output to `.build-loop/issues/mockup-rule-conflicts.md`. Don't block.
79
+
80
+ Why: mockups can be drawn with anti-patterns. If a mockup has a colored status pill and a rule forbids it, the rule wins. Surfacing the conflict upfront means subagents know to deviate from the mockup at those exact points, with documented justification.
81
+
82
+ ## Phase 1 (Assess) — Required UI criteria
83
+
84
+ When `uiTarget != null`, append these to the standard scoring criteria (do not ask the user to opt in):
85
+
86
+ | # | Criterion | Grader | Pass condition |
87
+ |---|---|---|---|
88
+ | UI-1 | Design-rule compliance | code: `audit-design-rules.mjs` on changed files | exit 0 (must-fix=0) |
89
+ | UI-2 | Reduce Motion compliance | code: scanner `animation-without-reducemotion` rule | zero must-fix |
90
+ | UI-3 | Theme token usage | code: scanner rules `uicolor-rgb-outside-theme`, `literal-corner-radius`, `hex-color-outside-theme` | zero must-fix |
91
+ | UI-4 | Accessibility labels on icon-only graphics | code: scanner `sf-symbol-without-label` rule (or web equivalent) | zero must-fix on changed files |
92
+ | UI-5 | Input/output contract coverage | document/read check: `## UI Input/Output Contract` + Review-B trace | every changed UI surface has inputs, outputs, data taxonomy, operation/domain verb, component mapping, states, modality fallback, validation/security, and traceability |
93
+
94
+ These scope to changed files only — pre-existing violations elsewhere are logged to `.build-loop/issues/` and tracked separately, not blocking the current build.
95
+
96
+ ## Phase 2 (Plan) — UI input/output contract
97
+
98
+ Before mockups or implementation, the plan must include `## UI Input/Output Contract` using `references/ui-io-contract.md`. The contract is the binding source for component choice. A good row names the surface, every user-provided value, every system-returned value, data taxonomy, operation/domain verb, exact component mapping, all states, modalities and fallbacks, validation/security layers, and schema/API/design-system traceability.
99
+
100
+ Common failures:
101
+ - A chart is planned without naming chart type, data schema, axis labels, and table fallback.
102
+ - An AI response is planned without declaring markdown vs JSON vs generated UI, streaming vs complete rendering, abort/retry behavior, and sanitization.
103
+ - A rich text or Markdown field is planned as a plain textarea without storage/rendering/sanitization rules.
104
+ - A domain operation such as approve, publish, refund, or reorder is collapsed into generic "update" language.
105
+ - Delete/update actions lack permission behavior for hidden, disabled, or 403 states.
106
+
107
+ ## Phase 3 (Execute) — Subagent prompt template
108
+
109
+ Every UI subagent prompt (those touching `Views/`, `*.swift`, `*.tsx`, etc.) MUST be prepended with the verbatim contents of `templates/ui-subagent-prompt.md`.
110
+
111
+ Pseudocode:
112
+ ```js
113
+ const uiPreamble = readFile('templates/ui-subagent-prompt.md')
114
+ const fullPrompt = uiPreamble + '\n\n---\n\n' + taskSpecificContract
115
+ dispatchSubagent({ prompt: fullPrompt, ... })
116
+ ```
117
+
118
+ The template covers: skill loading mandate, UI input/output contract application, mockup-vs-rule conflict policy (rule wins), anti-pattern checklist, required env hooks, self-verification requirement.
119
+
120
+ ## Phase 4 sub-step B (Validate)
121
+
122
+ Two graders, both required when `uiTarget != null`.
123
+
124
+ ### Static scanner
125
+
126
+ ```bash
127
+ node "${CLAUDE_PLUGIN_ROOT}/skills/build-loop/scanners/audit-design-rules.mjs" \
128
+ --root="<project>" \
129
+ --platform="<auto-detected>" \
130
+ --json
131
+ ```
132
+
133
+ Exit code routing:
134
+ - 0 → pass (clean)
135
+ - 1 → pass with warnings (log, continue)
136
+ - 2 → fail (route to Phase 5 Iterate; fix must-fix items before continuing)
137
+
138
+ ### UI input/output contract
139
+
140
+ Read the plan's `## UI Input/Output Contract` section and compare it to the changed UI files. Pass only when every changed surface maps:
141
+
142
+ - User inputs and system outputs.
143
+ - Structural type, content format, and persistence intent.
144
+ - CRUD operation and domain verb.
145
+ - Exact input and output component choice.
146
+ - Default, populated, focused, disabled, loading, success, error, empty, and streaming states as applicable.
147
+ - Text/voice/file/vision/chart/map/AI modality and fallback.
148
+ - Presentation, application, and domain validation plus sanitization.
149
+ - Auth/authz display behavior for gated actions.
150
+ - Data schema/API/design-system traceability.
151
+
152
+ Missing coverage is a Validate failure unless the diff is copy-only and the contract explicitly says no data surface changed.
153
+
154
+ ### Visual validation (lesson from build 53–55 + session-findings 2026-06-04)
155
+
156
+ The static scanner caught zero issues with a semicircle gauge that rendered upside-down with an invisible track stroke and stray floating tick marks. The bug was only visible by rendering the screen and looking at it. **Static rules cannot catch rendering bugs.** Visual validation is a separate, non-negotiable gate.
157
+
158
+ **The BL-1 enforced gate** (`scanners/require-visual-evidence.mjs`) replaces the previous prose requirement with an exit-code check at chunk-close (Phase 3, step 7b) and at Phase 4-B Validate. Symbol/string evidence (`nm`, `strings`, `git grep`, "identifier present", "compiles cleanly") is rejected automatically when `uiTarget != null` and a UI file changed. The required artifacts are a screenshot path (anchored to the running app's pid), an AX-tree dump, or a scan/SSIM result. See `references/phase-3-execute.md` §7b for the wiring.
159
+
160
+ Per `uiTarget` (preferred verifier when IBR plugin is present, then native fallback):
161
+
162
+ | `uiTarget` | IBR present (primary) | Native fallback |
163
+ |---|---|---|
164
+ | `macos` (desktop `.app`) | IBR `scan_macos` against the running `.app` (pid) | `native-ax-driver` (`skills/native-ax-driver/`) pid-anchored AX-tree + screenshot. NEVER `xcrun simctl` (macOS has no simulator). |
165
+ | `mobile` (iOS/watchOS sim) | IBR `scan` against the booted sim (when supported) | Build → install on booted simulator → `xcrun simctl io booted screenshot <path>`, `idb ui` for interaction |
166
+ | `web` (Next/Vite/Vue) | IBR `scan` against the dev-server route | Start dev server → `ui-validator` agent + browser/screenshot artifact via available host tooling |
167
+ | Fallback when ALL routes unavailable | n/a | Return `status: blocked` naming the unreachable verifier — BL-1 gate will warn or reject. Do NOT fall back to `nm`/`strings`. |
168
+
169
+ Failure modes the visual gate is checking for:
170
+ - Geometry rendering correctly (arcs, charts, gauges, custom paths)
171
+ - Stroke / track visibility against the actual background palette
172
+ - Last row of any scrollable surface clears floating tab bars / safe areas
173
+ - No text wrapping unexpectedly (long dim names, timestamps, labels)
174
+ - No overlapping elements
175
+ - Mockup parity in element placement
176
+
177
+ If returning-user states need data to render meaningfully (Home dashboards, Profile stats, History rows), use the **DebugSeeder pattern** below to seed test data before scanning.
178
+
179
+ ### DebugSeeder pattern (testability for stateful screens)
180
+
181
+ UI states reachable only after onboarding / N user actions are unverifiable in a fresh sim install. Add a debug-only seeder gated by `#if DEBUG` and a launch arg, so any subagent can render any state in seconds.
182
+
183
+ SwiftUI/SwiftData example (from real shipped app):
184
+
185
+ ```swift
186
+ // Services/DebugSeeder.swift
187
+ #if DEBUG
188
+ import Foundation
189
+ import SwiftData
190
+
191
+ enum DebugSeeder {
192
+ static func seedIfEmpty(context: ModelContext) {
193
+ let existing = (try? context.fetch(FetchDescriptor<Session>())) ?? []
194
+ guard existing.isEmpty else { return }
195
+ // Insert representative test data spanning a meaningful range:
196
+ // multiple drill types, dim scores, dates across 7+ days so
197
+ // weekly aggregations and trend deltas have something to compute.
198
+ try? context.save()
199
+ }
200
+ }
201
+ #endif
202
+ ```
203
+
204
+ ```swift
205
+ // AppEntryPoint.swift init()
206
+ #if DEBUG
207
+ if CommandLine.arguments.contains("-SeedDebugSessions") {
208
+ DebugSeeder.seedIfEmpty(context: container.mainContext)
209
+ }
210
+ #endif
211
+ ```
212
+
213
+ Launch with seed:
214
+ ```
215
+ xcrun simctl launch booted <bundle-id> -SeedDebugSessions YES -SelectedTab 1
216
+ ```
217
+
218
+ For multi-tab apps, also add a `-SelectedTab N` launch arg so any tab opens directly. Both compile out of release builds.
219
+
220
+ The seeder pays for itself the first time it catches a visual bug.
221
+
222
+ ## Phase 4 sub-step D (Fact-Check) — Gate 5
223
+
224
+ Runs alongside Gate 1 (Fact Checker), Gate 2 (Mock Data Scanner), Gate 3 (NavGator violations), Gate 4 (Plugin Cache Sync). Same scanner as Validate sub-step B, broader scope (full project, not just changed files). Surfaces any pre-existing must-fix violations newly observable due to scanner rule additions.
225
+
226
+ Pre-existing must-fix findings on first run for a project: log to `.build-loop/issues/` with break-what-if analysis (user decides scope, not auto-remediated). New-content findings are blocking.
227
+
228
+ ## Acceptance for "production-ready UI on first pass"
229
+
230
+ A UI build is considered production-ready when ALL of these pass on the first build attempt:
231
+
232
+ - ✅ Build succeeds
233
+ - ✅ Tests pass (or pre-existing failures are documented)
234
+ - ✅ Design-rule scanner exits 0 on changed files
235
+ - ✅ UI input/output contract covers every changed surface
236
+ - ✅ Mockup-vs-rule conflicts documented in subagent output
237
+ - ✅ **Visual validation: every changed screen rendered and inspected against mockup**
238
+ - Geometry correct (arcs, charts, custom paths)
239
+ - No clipping behind floating bars / safe areas
240
+ - No unexpected text wrapping or element overlaps
241
+ - Track strokes visible against actual background palette
242
+ - ✅ Reduce Motion smoke test passes (manual or via simulator)
243
+
244
+ If all six pass on the first build attempt, the gates worked as designed. If any fail, the gates need tightening — file a feedback note in `.build-loop/feedback.md`.
245
+
246
+ Real bugs that bypassed the gates and were only caught visually (build-loop hardening came from these):
247
+ - **Build 53–55 (example app)**: Semicircle gauge rendered upside-down because `Path.addArc clockwise:true` traces the bottom half in SwiftUI's flipped y-axis. Track stroke used `Theme.surfacePrimary` (#1A1F26), invisible against `Theme.background` (#0F1419). Tick marks correctly placed but appeared "stray" because no arc was visible. Static scanner couldn't see this.
248
+ - **Build 53–56 (example app)**: Detailed mode's 7th dim row, Profile's version row, Practice's bottom drill all clipped behind iOS 26 floating tab bar because `safeAreaPadding` didn't push scroll content. Required explicit `Color.clear.frame(height: 100)` spacer.
249
+ - **Build 56 (example app)**: "Engagement" dim name wrapped to 2 lines in History session chips because no `lineLimit` + `minimumScaleFactor` constraint, AND right column timestamps wrapped because no `fixedSize` width policy.
250
+
251
+ These shipped to TestFlight before being caught — gates are now tightened to prevent recurrence.
252
+
253
+ ## Tuning the rule packs
254
+
255
+ The scanner's regex patterns are hand-maintained in `scanners/audit-design-rules.mjs`. Add new patterns when:
256
+ - A real shipped violation slips through and is surfaced in audit
257
+ - A new platform/framework needs a pack
258
+ - A rule pack has false positives degrading agent productivity (relax pattern, add `pathExclude`)
259
+
260
+ Each pattern entry: `{ id, severity, description, pattern, contextRequired?, contextWindow?, fileMustContain?, invertFileCheck?, pathExclude? }`. See the scanner source for full schema.
261
+
262
+ ## Out of scope for this phase guidance
263
+
264
+ - Cross-build visual regression testing
265
+ - Runtime accessibility audits beyond the build-loop validator's route scan
266
+ - Performance gates (sub-step B standard graders cover those)
267
+ - Cross-browser pixel diff (separate concern)