@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,202 @@
1
+ ---
2
+ name: optimize
3
+ description: Use when the user says "optimize this", "optimization", "make X faster", "reduce <metric>", or "speed up my app". Runs a Design of Experiments test matrix — up to 6 variables in one pass — to find which variable actually moves the number. Falls back to one-at-a-time loop for single variables.
4
+ user-invocable: true
5
+ ---
6
+
7
+ <!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
8
+
9
+ # Optimize
10
+
11
+ Improve a number you can measure. Build time. Lines of code. Response time. Token cost. Anything where you can write a one-line command that returns a number.
12
+
13
+ Two modes.
14
+
15
+ **Multi-variable mode (default).** Run multiple tests in a single experiment using Design of Experiments. You can test six variables at once instead of one. The skill plans the test matrix, runs each combination, and measures the metric on each. It tells you which variable really moved the number. It also tells you which variables only seemed to matter because they happened to vary alongside the real cause. Two to three variables needs four to eight runs. Four to seven variables needs eight runs. Eight or more uses a screening pass that handles up to eleven in twelve runs.
16
+
17
+ **One-variable mode (fallback).** When you only have one thing to try, the skill loops one change at a time. Try a tweak. Measure. Keep it if the number improves. Revert if it does not. Cheaper to set up. Cannot see interactions.
18
+
19
+ Both modes keep what works and revert what does not. The metric is the only judge. No vibes-based "this looks better."
20
+
21
+ ## When to Use
22
+
23
+ After Phase 4 (Execute) when a mechanical metric exists:
24
+ - Build time (seconds)
25
+ - Line count in changed files (simplification)
26
+ - Test coverage (%)
27
+ - Bundle size (bytes)
28
+ - Response time / latency benchmarks
29
+ - Any command that outputs a number
30
+
31
+ Skip when the metric is subjective or requires human judgment.
32
+
33
+ ## Phase 1: SETUP (Opus) — Three-Branch Routing
34
+
35
+ Highest-leverage phase. Wrong metric = Goodhart's Law. Wrong factors = wasted runs.
36
+
37
+ ### Step 1.1 — Detect trigger shape
38
+
39
+ | Branch | Trigger | Action |
40
+ |---|---|---|
41
+ | **A. Power-user explicit** | User supplied factors via CLI flag, `.build-loop/optimize/factors.json`, or inline ("optimize batch_size, retries, workers for throughput") | Skip suggestion; use the user's factors directly |
42
+ | **B. Vague optimization** *(default)* | "run optimization", "make my app faster", "improve performance", "speed up", "reduce <metric>" without naming factors | Run factor-identification scan; propose candidates; **AskUserQuestion to confirm before running** |
43
+ | **C. Single-variable explicit** | "simplify this file", "reduce build time", scoped `/build-loop:optimize <known-target>` | Skip DOE; run autoresearch (existing behavior, Phase 2 LOOP unchanged) |
44
+
45
+ ### Step 1.2 — Branch A or B: factor identification
46
+
47
+ **Branch A** (factors pre-supplied): validate shape `[{name, low, high}, ...]` or `[{name, levels: [...]}, ...]`. Skip to Step 1.3.
48
+
49
+ **Branch B** (suggest factors): run the codebase scanner, present candidates, ask for confirmation.
50
+ ```bash
51
+ python3 ${CLAUDE_PLUGIN_ROOT}/scripts/optimize_suggest_factors.py --workdir "$PWD" --top 12 --json
52
+ ```
53
+ Returns ranked candidates (UPPER_SNAKE constants near tuning keywords, env vars with numeric defaults, etc.). For each, the scanner suggests low/center/high levels.
54
+
55
+ **Then AskUserQuestion** (multi-select, all candidates pre-checked):
56
+ > "Which of these should I optimize?"
57
+ > [✓] BATCH_SIZE (currently 32) — try [16, 32, 64]
58
+ > [✓] RETRIES (currently 3) — try [1, 3, 5]
59
+ > [ ] TIMEOUT_MS (currently 5000) — try [3000, 5000, 8000]
60
+ > Free-text: "add my own factor / change levels"
61
+ > Decline path: "skip optimization"
62
+
63
+ Only proceed once the user confirms. Do NOT auto-run optimization on heuristic candidates without explicit user buy-in — false positives are common (toast delays, breakpoints, port numbers all look numeric to the scanner but aren't perf knobs).
64
+
65
+ **Optional: research-backed levels (opt-in).** If `availablePlugins.research` is true AND the user explicitly asks for "research-backed levels" (or accepts the prompt below), append `--research-levels` to the scanner invocation:
66
+
67
+ ```bash
68
+ python3 ${CLAUDE_PLUGIN_ROOT}/scripts/optimize_suggest_factors.py --workdir "$PWD" --top 12 --json --research-levels
69
+ ```
70
+
71
+ The scanner adds `needs_research: true` and a `research_topic` string to high-confidence candidates whose names match known tuning keywords (BATCH_SIZE, TIMEOUT, WORKERS, etc.). For each marked candidate, invoke `Skill("build-loop:research")` with the topic string ("best-practice levels for BATCH_SIZE (currently 32)"). Use the returned ranges to augment — not replace — the scanner's heuristic levels in the AskUserQuestion prompt. Default behavior is heuristic-only because research adds latency (a few minutes per candidate); the opt-in is for cases where the user wants level recommendations grounded in benchmarks rather than evenly-spaced guesses around the current value.
72
+
73
+ The script never calls research itself — it only flags candidates worth researching. The orchestrator decides whether to invoke the research skill based on the user's explicit opt-in.
74
+
75
+ ### Step 1.3 — Design selection (Branches A + B with k≥2)
76
+
77
+ ```bash
78
+ python3 ${CLAUDE_PLUGIN_ROOT}/scripts/optimize_doe.py detect <k>
79
+ ```
80
+ Auto-routes by factor count: `k=1` → fall back to autoresearch (Branch C), `2 ≤ k ≤ 3` → 2^k full factorial (4–8 runs), `4 ≤ k ≤ 7` → 2^(k-p) fractional R-III/IV (8 runs), `k ≥ 8` → Plackett-Burman 12-run screening (handles up to 11).
81
+
82
+ Generate the matrix:
83
+ ```bash
84
+ python3 ${CLAUDE_PLUGIN_ROOT}/scripts/optimize_doe.py generate \
85
+ --factors "$(cat .build-loop/optimize/factors.json)" \
86
+ --design auto --seed "$RANDOM" \
87
+ > .build-loop/optimize/doe.json
88
+ ```
89
+
90
+ ### Step 1.4 — Branch C: autoresearch setup
91
+
92
+ Single-factor — keep the existing setup. Define:
93
+ 1. `target` — what to optimize (name)
94
+ 2. `scope` — which files can change (glob or list)
95
+ 3. `metric_cmd` — shell command → number
96
+ 4. `guard_cmd` — shell command that must exit 0
97
+ 5. `budget` — max total iterations (default 5 for post-build, 20 for standalone)
98
+ 6. `direction` — `"lower"` or `"higher"`
99
+ 7. `metric_samples` — measured benchmark runs per iteration (default 1)
100
+ 8. `metric_warmups` — warmup runs discarded before measuring (default 0)
101
+ 9. `metric_aggregate` — how to combine samples (`last`, `mean`, `median`, `p95`, etc.)
102
+
103
+ Auto-detection: run `python3 ${CLAUDE_PLUGIN_ROOT}/scripts/optimize_loop.py --detect --workdir "$PWD"` to discover available single-variable targets.
104
+
105
+ Initialize:
106
+ ```bash
107
+ python3 ${CLAUDE_PLUGIN_ROOT}/scripts/optimize_loop.py --init --workdir "$PWD" --target "<name>" --scope "<glob>" --metric-cmd "<cmd>" --guard-cmd "<cmd>" --budget <N> --direction "<lower|higher>" --metric-samples <count> --metric-warmups <count> --metric-aggregate "<last|min|max|mean|median|p95>"
108
+ ```
109
+
110
+ For latency work such as semantic search, do not optimize on one timer reading. Use a representative query set, run multiple measured samples, discard at least one warmup when cold starts matter, and aggregate with `median` or `p95`.
111
+
112
+ ## Phase 2: LOOP (Sonnet)
113
+
114
+ ### Branch A/B (DOE) — run the matrix
115
+
116
+ For each row in `.build-loop/optimize/doe.json` (in randomized `run_order`):
117
+ 1. Apply the factor values from `runs[i]._factors` to the codebase / config / env
118
+ 2. Run `metric_cmd` (with `metric_samples` and `metric_warmups` from setup)
119
+ 3. Run `guard_cmd` (must exit 0)
120
+ 4. Append to `.build-loop/optimize/results.jsonl`: `{"run_id": i, "value": <number>, "guard_ok": true}`
121
+ 5. Revert factor changes (each run is from the same baseline; DOE doesn't accumulate)
122
+
123
+ After all runs complete, fit effects:
124
+ ```bash
125
+ python3 ${CLAUDE_PLUGIN_ROOT}/scripts/optimize_doe.py analyze \
126
+ --design .build-loop/optimize/doe.json \
127
+ --results .build-loop/optimize/results.jsonl \
128
+ --direction "<lower|higher>" \
129
+ > .build-loop/optimize/effects.json
130
+ ```
131
+
132
+ Output: ranked main effects + interactions, `r2` if non-saturated, best run id with the winning factor levels. The output also includes a `best_factors` block mapping factor names to their concrete values at the best run. Apply the winning combination as a single commit.
133
+
134
+ **Optional handoff to autoresearch.** For local search around the DOE-identified optimum, initialize an autoresearch experiment using the effects.json as the starting baseline:
135
+
136
+ ```bash
137
+ python3 ${CLAUDE_PLUGIN_ROOT}/scripts/optimize_loop.py \
138
+ --init --workdir "$PWD" \
139
+ --target "<name>" \
140
+ --metric-cmd "<cmd>" --guard-cmd "<cmd>" \
141
+ --direction "<lower|higher>" \
142
+ --baseline-config .build-loop/optimize/effects.json
143
+ ```
144
+
145
+ `--baseline-config` reads the DOE best-run factor levels and records them in `experiment.json.doe_baseline.factors`. The autoresearch agent reads that block before its first iteration, applies those values as the starting point, then iterates from there. Without `--baseline-config`, the loop starts from the current working tree as before.
146
+
147
+ ### Branch C (autoresearch) — single-variable greedy
148
+
149
+ Dispatch the `optimize-runner` agent. It executes:
150
+
151
+ ```
152
+ 1. Read .build-loop/optimize/experiment.json + results.tsv + git log
153
+ 2. Hypothesize: ONE atomic change based on what worked/failed before
154
+ 3. Edit: only files matching scope
155
+ 4. Commit: git commit -m "optimize: <description>"
156
+ 5. Measure: run metric_cmd with the configured sampling settings
157
+ 6. Guard: run guard_cmd
158
+ 7. Decide: improved over best_value AND guard passes → KEEP (update best)
159
+ worse OR guard fails → git revert HEAD
160
+ 8. Log: append to results.tsv with hypothesis text
161
+ 9. Convergence check:
162
+ - 5 consecutive discards → plateau, stop
163
+ - metric trending worse over 3 kept iterations → regressing, stop
164
+ - budget exhausted → stop
165
+ 10. If not converged → step 1
166
+ ```
167
+
168
+ ## Phase 3: REVIEW (Opus + Sonnet)
169
+
170
+ 1. Dispatch `overfitting-reviewer` (Sonnet, read-only): check for removed safety features, fragile shortcuts, test-gaming
171
+ 2. Generate summary: iterations, kept/reverted, improvement %, top changes
172
+ 3. Archive: `python3 ${CLAUDE_PLUGIN_ROOT}/scripts/optimize_loop.py --archive --workdir "$PWD"`
173
+
174
+ ## Model Tiering
175
+
176
+ | Component | Model | Why |
177
+ |-----------|-------|-----|
178
+ | Setup | Opus | Wrong metric = Goodhart |
179
+ | Hypothesis generation | Sonnet (pinned) | High volume, 5x cheaper |
180
+ | Metric/guard execution | Bash | No LLM |
181
+ | Keep/revert | Deterministic | Numeric comparison |
182
+ | Overfitting review | Sonnet (read-only) | Pattern matching |
183
+ | Final report | Opus | Judgment |
184
+
185
+ ## Integration with Build-Loop
186
+
187
+ Phase 4.7 (AUTO-OPTIMIZE): after Phase 4 Execute completes and commits, check for optimization targets. Run sequentially (not parallel with Phase 4).
188
+
189
+ Standalone: `/build-loop:optimize [target]`
190
+
191
+ ## State Files
192
+
193
+ ```text
194
+ .build-loop/optimize/
195
+ ├── experiment.json # Active config
196
+ ├── results.tsv # Iteration log with hypotheses
197
+ └── experiments/ # Archived pairs (.json + .tsv)
198
+ ```
199
+
200
+ ## Built-in Profiles
201
+
202
+ See `profiles.md`. The `simplify` profile is always available. For latency-sensitive work, start with `semantic-search-latency` or `optimize-perf` plus explicit sampling settings.
@@ -0,0 +1,61 @@
1
+ <!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
2
+
3
+ # Optimization Profiles
4
+
5
+ ## simplify (always available)
6
+
7
+ Reduce code complexity in files touched by the current build.
8
+
9
+ - **Metric**: `wc -l <scope_files> | tail -1 | awk '{print $1}'` (total lines)
10
+ - **Guard**: `npm run build` or `npm test` (must still compile/pass)
11
+ - **Direction**: lower
12
+ - **Budget**: 5
13
+ - **Scope**: Files changed in current build (`git diff --name-only HEAD~N`)
14
+ - **What it finds**: Dead imports, unused variables, redundant files, extractable constants, inlinable one-use helpers
15
+
16
+ ## optimize-build
17
+
18
+ - **Metric**: `/usr/bin/time -p npm run build 2>&1 | grep ^real | awk '{print $2}'`
19
+ - **Guard**: `npm test -- --passWithNoTests`
20
+ - **Direction**: lower
21
+ - **Budget**: 5
22
+ - **Scope**: Build configs, bundler configs, tsconfig
23
+
24
+ ## optimize-tests
25
+
26
+ - **Metric**: Coverage % from test runner
27
+ - **Guard**: All existing tests pass
28
+ - **Direction**: higher
29
+ - **Budget**: 5
30
+ - **Scope**: Test files only
31
+
32
+ ## optimize-bundle
33
+
34
+ - **Metric**: `du -sk .next/static 2>/dev/null | awk '{print $1}'` (KB)
35
+ - **Guard**: `npm run build`
36
+ - **Direction**: lower
37
+ - **Budget**: 5
38
+ - **Scope**: Source files importing large dependencies
39
+
40
+ ## optimize-perf
41
+
42
+ Use when a workload has a benchmark command but no specialized preset.
43
+
44
+ - **Metric**: Custom benchmark command that prints one numeric value
45
+ - **Guard**: Test suite passes
46
+ - **Direction**: lower
47
+ - **Budget**: 10
48
+ - **Scope**: Hot-path source files
49
+ - **Benchmark guidance**: Prefer representative workloads over microbenchmarks. For latency, run repeated samples with `--metric-samples 5-9`, discard cold-start noise with `--metric-warmups 1-2`, and aggregate with `median` or `p95`.
50
+
51
+ ## semantic-search-latency
52
+
53
+ Use when optimizing end-to-end semantic-search response time in a consumer repo.
54
+
55
+ - **Metric**: A semantic-search benchmark command over a fixed query set, for example `python3 scripts/bench_semantic_search.py --queries bench/semantic_search_queries.txt --stat p95`
56
+ - **Guard**: Relevance / regression checks for the same search flow plus the normal test suite
57
+ - **Direction**: lower
58
+ - **Budget**: 10
59
+ - **Scope**: Search hot path only — embedding prep, query rewriting, ANN/vector lookup, reranking, caching, result shaping
60
+ - **Runner settings**: Start with `--metric-samples 7 --metric-warmups 1 --metric-aggregate p95`
61
+ - **What it finds**: Cold-start penalties, redundant embeddings, unnecessary reranks, inefficient filters, cache misses, slow result formatting
@@ -0,0 +1,115 @@
1
+ ---
2
+ name: plan-verify
3
+ description: Use when build-loop Phase 2 wraps plan drafting, the user runs `/build-loop:plan-verify`, asks to "verify the plan" or "lint the plan", or any plan markdown change touches evidence, synthesis-density, risk_reason, or modifies_api fields. Runs deterministic plan-verify rules and emits findings JSON.
4
+ user-invocable: false
5
+ ---
6
+
7
+ <!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
8
+
9
+ # plan-verify
10
+
11
+ ## Purpose
12
+
13
+ Catch grep-checkable plan errors before they ship — orphan misclassifications,
14
+ internal numeric drift, route changes without evidence, package-state
15
+ contradictions, missing markers on factual claims, and missing parallel
16
+ dispatch decisions. It also warns when a non-trivial plan omits the clean-sheet
17
+ vs current-constraints approach comparison. The deterministic counterpart to `plan-critic` (LLM,
18
+ non-deterministic checks).
19
+
20
+ ## When to invoke
21
+
22
+ - During build-loop **Phase 2 (Plan)**, immediately before "Plan accepted".
23
+ - Any time you receive a plan file authored by another tool/agent.
24
+ - Standalone via `/plan-verify <plan.md>` slash command.
25
+
26
+ ## How to invoke
27
+
28
+ ```bash
29
+ python3 ${CLAUDE_PLUGIN_ROOT}/scripts/plan_verify.py <plan.md> \
30
+ --repo "$PWD" \
31
+ --json
32
+ ```
33
+
34
+ Args:
35
+
36
+ - `<plan.md>` — required path to plan markdown
37
+ - `--repo <path>` — repo root for grep checks (omit if no repo-relative claims)
38
+ - `--json` — emit findings JSON (default: human summary)
39
+ - `--quiet` — suppress human summary
40
+
41
+ ## Exit codes
42
+
43
+ | Code | Meaning |
44
+ |------|---------|
45
+ | 0 | No BLOCKERs (WARN/INFO findings allowed) |
46
+ | 1 | At least one BLOCKER — plan must be revised before acceptance |
47
+ | 2 | Verifier error (file not found, malformed input, internal exception) |
48
+
49
+ ## Rules
50
+
51
+ | # | Rule ID | What it catches | Severity |
52
+ |---|---|---|---|
53
+ | 1 | `delete-with-callers` | "delete `path`" / "`path` has 0 callers" claims grep-disprove against repo | **BLOCKER** |
54
+ | 2 | `route-change-evidence` | 308/301 redirect, "remove route", "deprecate path" without ✅/⚠️/❓ marker or rejection-context within 5 lines | **BLOCKER** |
55
+ | 3 | `package-state` | "X is unused" / "X is in package.json" claims contradicted by manifest | **BLOCKER** |
56
+ | 4 | `numeric-drift` | Aggregate orphan-count appears with different values in same doc | **BLOCKER** |
57
+ | 5 | `missing-evidence` | Factual claim with no ✅/⚠️/❓ marker AND no verification hint within 3 lines | WARN |
58
+ | 6 | `scope-split` | More than 5 Phase headings without "Milestone" structure | INFO |
59
+ | 7 | `less-invasive-shim` | Shim phrasing without nearby "considered alternatives" line | WARN |
60
+ | 8 | `tool-without-permission-tier` | Plan introduces a new tool / MCP server / plugin / skill without naming a T0–T5 permission tier or `permission_tier` keyword within 10 lines | **BLOCKER** |
61
+ | 9 | `external-call-without-budget-ceiling` | Plan introduces a new external API or LLM call without a budget / max_tokens / timeout / rate_limit keyword within 10 lines | WARN |
62
+ | 10 | `risk-surface-change-without-threat-model` | Plan surfaces any risk-surface signal (new tool / MCP / LLM call / persistent memory / auth change / external API / user-data handling) without referencing a threat-model artifact, OWASP/ASI ID, or "threat-model: not-applicable: <reason>" anywhere in the doc | **BLOCKER** |
63
+ | 11 | `parallel-decision-record` | A plan names multiple independent / parallel-safe chunks but omits `parallel_batch:` or `parallel_skipped_reason:` | **BLOCKER** |
64
+ | 12 | `approach-lenses-missing` | A non-trivial architecture/workflow/dependency/interface plan omits `## Approach Lenses` or `Approach Lenses: n/a - <reason>` | WARN |
65
+
66
+ Rules 8–10 ship with the `security-methodology` skill (build-loop 0.7.x). They lint the security boundary at Phase 2 the same way rules 1–4 lint the factual / orphan / package boundary. When rule 10 fires, the orchestrator's Phase 1 trigger-detector should also be flipping `triggers.riskSurfaceChange: true` — if rule 10 fires but the trigger isn't set, that's a Phase 1 detection gap worth investigating.
67
+
68
+ ## What this does NOT check (use `plan-critic` for these)
69
+
70
+ - Alternatives genuinely considered (only checks the *phrase* nearby)
71
+ - Scope-split MECE quality (overlapping owners, unowned responsibilities)
72
+ - Headline drift across sections
73
+ - Marker level matches the strength of the underlying evidence
74
+ - Whether the verification source actually supports the marker
75
+
76
+ ## Output: Plan Evidence Contract
77
+
78
+ Each finding conforms to:
79
+
80
+ ```json
81
+ {
82
+ "claim_text": "...",
83
+ "claim_kind": "delete|orphan|...|missing_evidence|...",
84
+ "subject": {"path": null, "symbol": null, "noun": null},
85
+ "verification_command": "rg -l ...",
86
+ "evidence": {"file": "<plan>", "line": 42, "snippet": "..."},
87
+ "result": "match|no_match|inconclusive",
88
+ "marker": null,
89
+ "severity": "BLOCKER|WARN|INFO",
90
+ "confidence": "high|medium|low",
91
+ "rule_id": "<rule-name>"
92
+ }
93
+ ```
94
+
95
+ ## Test fixtures
96
+
97
+ `skills/plan-verify/test-fixtures/`:
98
+
99
+ - `example-app-v20.md` — synthetic, 5 known errors. Expected exit 1.
100
+ - `example-app-v22.md` — synthetic full-scale plan, clean by the new standard. Expected exit 0.
101
+ - `unrelated-good-plan.md` — false-positive control. Expected exit 0.
102
+ - `*-findings.json` — per-fixture expectations.
103
+
104
+ Run the test suite:
105
+
106
+ ```bash
107
+ python3 ${CLAUDE_PLUGIN_ROOT}/scripts/test_plan_verify.py
108
+ ```
109
+
110
+ ## Integration with build-loop Phase 2
111
+
112
+ The Phase 2 plan acceptance gate calls this script. On exit 1, the orchestrator
113
+ must either revise the plan or document the override in `.build-loop/state.json.planVerifyOverride[]`
114
+ with rationale before proceeding. On exit 2, treat as a verifier outage and
115
+ fall back to plan-critic alone with a logged warning.
@@ -0,0 +1,27 @@
1
+ {
2
+ "fixture": "example-app-v20.md",
3
+ "expected_exit_code": 1,
4
+ "description": "Synthetic fixture with 5 known plan errors. Run with --repo pointing at build-loop repo so grep can disprove the delete claims.",
5
+ "expectations_by_rule_id": {
6
+ "delete-with-callers": {
7
+ "min_blocker_count": 1,
8
+ "rationale": "Claims to delete scripts/optimize_loop.py (has callers in build-loop repo) and scripts/write_run_entry.py (also has callers). At least one must be flagged BLOCKER."
9
+ },
10
+ "numeric-drift": {
11
+ "min_blocker_count": 1,
12
+ "rationale": "Phase 1 says '6 orphans', Phase 4 says '5 orphans'. Same noun, different counts in the same doc."
13
+ },
14
+ "route-change-evidence": {
15
+ "min_blocker_count": 1,
16
+ "rationale": "Claims '308 redirect' and 'deprecate path' without grep-evidence within 3 lines."
17
+ },
18
+ "missing-evidence": {
19
+ "min_warn_count": 1,
20
+ "rationale": "Factual claim 'recharts is unused' has no ✅/⚠️/❓ marker and no verification source within 3 lines."
21
+ },
22
+ "package-state": {
23
+ "min_warn_count": 0,
24
+ "rationale": "Optional. Will fire if verifier finds a package manifest to check against."
25
+ }
26
+ }
27
+ }
@@ -0,0 +1,42 @@
1
+ <!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
2
+
3
+ # Example App Knowledge-Graph Cleanup — v2.0 (synthetic)
4
+
5
+ > Synthetic fixture reconstructing the five errors caught in example-app v2.0 review cycles.
6
+ > Used to validate `plan_verify.py`. Do not treat as a real plan.
7
+
8
+ ## Goal
9
+
10
+ Drop dead knowledge-graph tables, simplify backend routes, and remove unused chart libraries.
11
+
12
+ ## Phase 1 — Database
13
+
14
+ We will **delete** `scripts/optimize_loop.py` because it has 0 callers in the codebase. The orphan scan flagged it during the last NavGator review.
15
+
16
+ We will also **delete** `scripts/write_run_entry.py` — it is an orphan with zero references.
17
+
18
+ Total orphans removed: **6 orphans**.
19
+
20
+ ## Phase 2 — Routes
21
+
22
+ Remove route `/api/optimize` and replace with a 308 redirect to `/api/optimize-loop`. This change touches the optimize-loop module.
23
+
24
+ We will deprecate the path `/v1/jobs/run` and migrate callers to `/v2/jobs`.
25
+
26
+ ## Phase 3 — Packages
27
+
28
+ The `recharts` package is unused — remove it from package.json. We never imported it.
29
+
30
+ The package `react-vega` is in package.json and we'll keep it.
31
+
32
+ ## Phase 4 — Chart migration
33
+
34
+ Numeric note: removing the **5 orphans** from Phase 1 will cut bundle size by approximately 12 KB.
35
+
36
+ (Numeric drift: Phase 1 says "6 orphans", this section says "5 orphans".)
37
+
38
+ ## Phase 5 — Cleanup
39
+
40
+ We will rename three files. Total touched: ~50 files.
41
+
42
+ The chart system is now stable. ✅ verified
@@ -0,0 +1,15 @@
1
+ {
2
+ "fixture": "example-app-v22.md",
3
+ "expected_exit_code": 0,
4
+ "description": "Copy of the current real Example App plan v2.2 (clean by the new standard). Should produce zero BLOCKERs.",
5
+ "expectations_by_rule_id": {
6
+ "delete-with-callers": { "max_blocker_count": 0 },
7
+ "numeric-drift": { "max_blocker_count": 0 },
8
+ "route-change-evidence": { "max_blocker_count": 0 },
9
+ "package-state": { "max_blocker_count": 0 },
10
+ "missing-evidence": {
11
+ "max_warn_count": 50,
12
+ "rationale": "WARN budget is generous because long real plans have stylistic claims; the BLOCKER count is the gate."
13
+ }
14
+ }
15
+ }