@minhduydev/mdpi 0.3.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 (561) hide show
  1. package/README.md +31 -0
  2. package/dist/index.js +1187 -0
  3. package/dist/template/.pi/.env.example +28 -0
  4. package/dist/template/.pi/AGENTS.md +226 -0
  5. package/dist/template/.pi/QUALITY.md +13 -0
  6. package/dist/template/.pi/README.md +452 -0
  7. package/dist/template/.pi/VERSION +1 -0
  8. package/dist/template/.pi/agents/INDEX.md +54 -0
  9. package/dist/template/.pi/agents/build.md +194 -0
  10. package/dist/template/.pi/agents/explore.md +85 -0
  11. package/dist/template/.pi/agents/general.md +189 -0
  12. package/dist/template/.pi/agents/plan.md +407 -0
  13. package/dist/template/.pi/agents/review.md +198 -0
  14. package/dist/template/.pi/agents/scout.md +142 -0
  15. package/dist/template/.pi/agents/vision.md +157 -0
  16. package/dist/template/.pi/artifacts/example/plan.md +12 -0
  17. package/dist/template/.pi/artifacts/example/progress.md +4 -0
  18. package/dist/template/.pi/artifacts/example/research.md +4 -0
  19. package/dist/template/.pi/artifacts/example/spec.md +16 -0
  20. package/dist/template/.pi/context/architecture.md +141 -0
  21. package/dist/template/.pi/context/fallow.md +137 -0
  22. package/dist/template/.pi/extensions/templates-injector.ts +76 -0
  23. package/dist/template/.pi/extensions/workflows-runner.ts +301 -0
  24. package/dist/template/.pi/guard.example.json +75 -0
  25. package/dist/template/.pi/prompts/INDEX.md +78 -0
  26. package/dist/template/.pi/prompts/audit.md +109 -0
  27. package/dist/template/.pi/prompts/close.md +88 -0
  28. package/dist/template/.pi/prompts/create.md +197 -0
  29. package/dist/template/.pi/prompts/fix.md +117 -0
  30. package/dist/template/.pi/prompts/gc.md +112 -0
  31. package/dist/template/.pi/prompts/init.md +206 -0
  32. package/dist/template/.pi/prompts/loop-check.md +87 -0
  33. package/dist/template/.pi/prompts/loop-init.md +157 -0
  34. package/dist/template/.pi/prompts/loop-review.md +90 -0
  35. package/dist/template/.pi/prompts/plan.md +254 -0
  36. package/dist/template/.pi/prompts/research.md +136 -0
  37. package/dist/template/.pi/prompts/ship.md +219 -0
  38. package/dist/template/.pi/prompts/status.md +92 -0
  39. package/dist/template/.pi/prompts/verify.md +154 -0
  40. package/dist/template/.pi/scripts/gc-check.sh +86 -0
  41. package/dist/template/.pi/settings.json +15 -0
  42. package/dist/template/.pi/skills/INDEX.md +331 -0
  43. package/dist/template/.pi/skills/accessibility-audit/SKILL.md +205 -0
  44. package/dist/template/.pi/skills/accessibility-audit/references/accessibility-checklist.md +109 -0
  45. package/dist/template/.pi/skills/agent-code-quality-gate/SKILL.md +131 -0
  46. package/dist/template/.pi/skills/api-and-interface-design/SKILL.md +159 -0
  47. package/dist/template/.pi/skills/behavioral-kernel/SKILL.md +92 -0
  48. package/dist/template/.pi/skills/brainstorming/SKILL.md +138 -0
  49. package/dist/template/.pi/skills/browser-testing-with-devtools/SKILL.md +90 -0
  50. package/dist/template/.pi/skills/chrome-devtools/SKILL.md +129 -0
  51. package/dist/template/.pi/skills/ci-cd-and-automation/SKILL.md +199 -0
  52. package/dist/template/.pi/skills/cloudflare/SKILL.md +271 -0
  53. package/dist/template/.pi/skills/cloudflare/references/agents-sdk/README.md +35 -0
  54. package/dist/template/.pi/skills/cloudflare/references/agents-sdk/api.md +100 -0
  55. package/dist/template/.pi/skills/cloudflare/references/agents-sdk/configuration.md +99 -0
  56. package/dist/template/.pi/skills/cloudflare/references/agents-sdk/gotchas.md +59 -0
  57. package/dist/template/.pi/skills/cloudflare/references/agents-sdk/patterns.md +89 -0
  58. package/dist/template/.pi/skills/cloudflare/references/ai-gateway/README.md +695 -0
  59. package/dist/template/.pi/skills/cloudflare/references/ai-search/README.md +14 -0
  60. package/dist/template/.pi/skills/cloudflare/references/ai-search/api.md +38 -0
  61. package/dist/template/.pi/skills/cloudflare/references/ai-search/configuration.md +52 -0
  62. package/dist/template/.pi/skills/cloudflare/references/ai-search/gotchas.md +41 -0
  63. package/dist/template/.pi/skills/cloudflare/references/ai-search/patterns.md +45 -0
  64. package/dist/template/.pi/skills/cloudflare/references/analytics-engine/README.md +14 -0
  65. package/dist/template/.pi/skills/cloudflare/references/analytics-engine/api.md +27 -0
  66. package/dist/template/.pi/skills/cloudflare/references/analytics-engine/configuration.md +45 -0
  67. package/dist/template/.pi/skills/cloudflare/references/analytics-engine/gotchas.md +3 -0
  68. package/dist/template/.pi/skills/cloudflare/references/analytics-engine/patterns.md +36 -0
  69. package/dist/template/.pi/skills/cloudflare/references/api/README.md +21 -0
  70. package/dist/template/.pi/skills/cloudflare/references/api/api.md +31 -0
  71. package/dist/template/.pi/skills/cloudflare/references/api/configuration.md +20 -0
  72. package/dist/template/.pi/skills/cloudflare/references/api/gotchas.md +28 -0
  73. package/dist/template/.pi/skills/cloudflare/references/api/patterns.md +47 -0
  74. package/dist/template/.pi/skills/cloudflare/references/api-shield/README.md +20 -0
  75. package/dist/template/.pi/skills/cloudflare/references/api-shield/api.md +78 -0
  76. package/dist/template/.pi/skills/cloudflare/references/api-shield/configuration.md +128 -0
  77. package/dist/template/.pi/skills/cloudflare/references/api-shield/gotchas.md +51 -0
  78. package/dist/template/.pi/skills/cloudflare/references/api-shield/patterns.md +145 -0
  79. package/dist/template/.pi/skills/cloudflare/references/argo-smart-routing/README.md +16 -0
  80. package/dist/template/.pi/skills/cloudflare/references/argo-smart-routing/api.md +50 -0
  81. package/dist/template/.pi/skills/cloudflare/references/argo-smart-routing/configuration.md +53 -0
  82. package/dist/template/.pi/skills/cloudflare/references/argo-smart-routing/gotchas.md +16 -0
  83. package/dist/template/.pi/skills/cloudflare/references/argo-smart-routing/patterns.md +45 -0
  84. package/dist/template/.pi/skills/cloudflare/references/bindings/README.md +14 -0
  85. package/dist/template/.pi/skills/cloudflare/references/bindings/api.md +3 -0
  86. package/dist/template/.pi/skills/cloudflare/references/bindings/configuration.md +58 -0
  87. package/dist/template/.pi/skills/cloudflare/references/bindings/gotchas.md +35 -0
  88. package/dist/template/.pi/skills/cloudflare/references/bindings/patterns.md +37 -0
  89. package/dist/template/.pi/skills/cloudflare/references/bot-management/README.md +71 -0
  90. package/dist/template/.pi/skills/cloudflare/references/bot-management/api.md +168 -0
  91. package/dist/template/.pi/skills/cloudflare/references/bot-management/configuration.md +114 -0
  92. package/dist/template/.pi/skills/cloudflare/references/bot-management/gotchas.md +99 -0
  93. package/dist/template/.pi/skills/cloudflare/references/bot-management/patterns.md +125 -0
  94. package/dist/template/.pi/skills/cloudflare/references/browser-rendering/README.md +16 -0
  95. package/dist/template/.pi/skills/cloudflare/references/browser-rendering/api.md +54 -0
  96. package/dist/template/.pi/skills/cloudflare/references/browser-rendering/configuration.md +47 -0
  97. package/dist/template/.pi/skills/cloudflare/references/browser-rendering/gotchas.md +29 -0
  98. package/dist/template/.pi/skills/cloudflare/references/browser-rendering/patterns.md +29 -0
  99. package/dist/template/.pi/skills/cloudflare/references/c3/README.md +264 -0
  100. package/dist/template/.pi/skills/cloudflare/references/cache-reserve/README.md +93 -0
  101. package/dist/template/.pi/skills/cloudflare/references/cache-reserve/api.md +176 -0
  102. package/dist/template/.pi/skills/cloudflare/references/cache-reserve/configuration.md +164 -0
  103. package/dist/template/.pi/skills/cloudflare/references/cache-reserve/gotchas.md +203 -0
  104. package/dist/template/.pi/skills/cloudflare/references/cache-reserve/patterns.md +180 -0
  105. package/dist/template/.pi/skills/cloudflare/references/containers/README.md +16 -0
  106. package/dist/template/.pi/skills/cloudflare/references/containers/api.md +43 -0
  107. package/dist/template/.pi/skills/cloudflare/references/containers/configuration.md +56 -0
  108. package/dist/template/.pi/skills/cloudflare/references/containers/gotchas.md +21 -0
  109. package/dist/template/.pi/skills/cloudflare/references/containers/patterns.md +40 -0
  110. package/dist/template/.pi/skills/cloudflare/references/cron-triggers/README.md +85 -0
  111. package/dist/template/.pi/skills/cloudflare/references/cron-triggers/api.md +198 -0
  112. package/dist/template/.pi/skills/cloudflare/references/cron-triggers/configuration.md +151 -0
  113. package/dist/template/.pi/skills/cloudflare/references/cron-triggers/gotchas.md +129 -0
  114. package/dist/template/.pi/skills/cloudflare/references/cron-triggers/patterns.md +122 -0
  115. package/dist/template/.pi/skills/cloudflare/references/d1/README.md +92 -0
  116. package/dist/template/.pi/skills/cloudflare/references/d1/api.md +141 -0
  117. package/dist/template/.pi/skills/cloudflare/references/d1/configuration.md +127 -0
  118. package/dist/template/.pi/skills/cloudflare/references/d1/gotchas.md +70 -0
  119. package/dist/template/.pi/skills/cloudflare/references/d1/patterns.md +144 -0
  120. package/dist/template/.pi/skills/cloudflare/references/ddos/README.md +34 -0
  121. package/dist/template/.pi/skills/cloudflare/references/ddos/api.md +136 -0
  122. package/dist/template/.pi/skills/cloudflare/references/ddos/configuration.md +67 -0
  123. package/dist/template/.pi/skills/cloudflare/references/ddos/gotchas.md +114 -0
  124. package/dist/template/.pi/skills/cloudflare/references/ddos/patterns.md +158 -0
  125. package/dist/template/.pi/skills/cloudflare/references/do-storage/README.md +62 -0
  126. package/dist/template/.pi/skills/cloudflare/references/do-storage/api.md +89 -0
  127. package/dist/template/.pi/skills/cloudflare/references/do-storage/configuration.md +116 -0
  128. package/dist/template/.pi/skills/cloudflare/references/do-storage/gotchas.md +93 -0
  129. package/dist/template/.pi/skills/cloudflare/references/do-storage/patterns.md +112 -0
  130. package/dist/template/.pi/skills/cloudflare/references/durable-objects/README.md +125 -0
  131. package/dist/template/.pi/skills/cloudflare/references/durable-objects/api.md +152 -0
  132. package/dist/template/.pi/skills/cloudflare/references/durable-objects/configuration.md +148 -0
  133. package/dist/template/.pi/skills/cloudflare/references/durable-objects/gotchas.md +158 -0
  134. package/dist/template/.pi/skills/cloudflare/references/durable-objects/patterns.md +255 -0
  135. package/dist/template/.pi/skills/cloudflare/references/email-routing/README.md +18 -0
  136. package/dist/template/.pi/skills/cloudflare/references/email-routing/api.md +46 -0
  137. package/dist/template/.pi/skills/cloudflare/references/email-routing/configuration.md +63 -0
  138. package/dist/template/.pi/skills/cloudflare/references/email-routing/gotchas.md +16 -0
  139. package/dist/template/.pi/skills/cloudflare/references/email-routing/patterns.md +46 -0
  140. package/dist/template/.pi/skills/cloudflare/references/email-workers/README.md +598 -0
  141. package/dist/template/.pi/skills/cloudflare/references/hyperdrive/README.md +62 -0
  142. package/dist/template/.pi/skills/cloudflare/references/hyperdrive/api.md +137 -0
  143. package/dist/template/.pi/skills/cloudflare/references/hyperdrive/configuration.md +133 -0
  144. package/dist/template/.pi/skills/cloudflare/references/hyperdrive/gotchas.md +184 -0
  145. package/dist/template/.pi/skills/cloudflare/references/hyperdrive/patterns.md +176 -0
  146. package/dist/template/.pi/skills/cloudflare/references/images/README.md +14 -0
  147. package/dist/template/.pi/skills/cloudflare/references/images/api.md +3 -0
  148. package/dist/template/.pi/skills/cloudflare/references/images/configuration.md +45 -0
  149. package/dist/template/.pi/skills/cloudflare/references/images/gotchas.md +23 -0
  150. package/dist/template/.pi/skills/cloudflare/references/images/patterns.md +31 -0
  151. package/dist/template/.pi/skills/cloudflare/references/kv/README.md +60 -0
  152. package/dist/template/.pi/skills/cloudflare/references/kv/api.md +114 -0
  153. package/dist/template/.pi/skills/cloudflare/references/kv/configuration.md +92 -0
  154. package/dist/template/.pi/skills/cloudflare/references/kv/gotchas.md +117 -0
  155. package/dist/template/.pi/skills/cloudflare/references/kv/patterns.md +139 -0
  156. package/dist/template/.pi/skills/cloudflare/references/miniflare/README.md +64 -0
  157. package/dist/template/.pi/skills/cloudflare/references/miniflare/api.md +144 -0
  158. package/dist/template/.pi/skills/cloudflare/references/miniflare/configuration.md +203 -0
  159. package/dist/template/.pi/skills/cloudflare/references/miniflare/gotchas.md +187 -0
  160. package/dist/template/.pi/skills/cloudflare/references/miniflare/patterns.md +211 -0
  161. package/dist/template/.pi/skills/cloudflare/references/network-interconnect/README.md +60 -0
  162. package/dist/template/.pi/skills/cloudflare/references/network-interconnect/api.md +240 -0
  163. package/dist/template/.pi/skills/cloudflare/references/network-interconnect/configuration.md +127 -0
  164. package/dist/template/.pi/skills/cloudflare/references/network-interconnect/gotchas.md +171 -0
  165. package/dist/template/.pi/skills/cloudflare/references/network-interconnect/patterns.md +171 -0
  166. package/dist/template/.pi/skills/cloudflare/references/observability/README.md +18 -0
  167. package/dist/template/.pi/skills/cloudflare/references/observability/api.md +51 -0
  168. package/dist/template/.pi/skills/cloudflare/references/observability/configuration.md +60 -0
  169. package/dist/template/.pi/skills/cloudflare/references/observability/gotchas.md +36 -0
  170. package/dist/template/.pi/skills/cloudflare/references/observability/patterns.md +42 -0
  171. package/dist/template/.pi/skills/cloudflare/references/pages/README.md +76 -0
  172. package/dist/template/.pi/skills/cloudflare/references/pages/api.md +200 -0
  173. package/dist/template/.pi/skills/cloudflare/references/pages/configuration.md +228 -0
  174. package/dist/template/.pi/skills/cloudflare/references/pages/gotchas.md +161 -0
  175. package/dist/template/.pi/skills/cloudflare/references/pages/patterns.md +145 -0
  176. package/dist/template/.pi/skills/cloudflare/references/pages-functions/README.md +57 -0
  177. package/dist/template/.pi/skills/cloudflare/references/pages-functions/api.md +201 -0
  178. package/dist/template/.pi/skills/cloudflare/references/pages-functions/configuration.md +159 -0
  179. package/dist/template/.pi/skills/cloudflare/references/pages-functions/gotchas.md +151 -0
  180. package/dist/template/.pi/skills/cloudflare/references/pages-functions/patterns.md +190 -0
  181. package/dist/template/.pi/skills/cloudflare/references/pipelines/README.md +664 -0
  182. package/dist/template/.pi/skills/cloudflare/references/pulumi/README.md +107 -0
  183. package/dist/template/.pi/skills/cloudflare/references/pulumi/api.md +194 -0
  184. package/dist/template/.pi/skills/cloudflare/references/pulumi/configuration.md +216 -0
  185. package/dist/template/.pi/skills/cloudflare/references/pulumi/gotchas.md +223 -0
  186. package/dist/template/.pi/skills/cloudflare/references/pulumi/patterns.md +139 -0
  187. package/dist/template/.pi/skills/cloudflare/references/queues/README.md +69 -0
  188. package/dist/template/.pi/skills/cloudflare/references/queues/api.md +138 -0
  189. package/dist/template/.pi/skills/cloudflare/references/queues/configuration.md +125 -0
  190. package/dist/template/.pi/skills/cloudflare/references/queues/gotchas.md +112 -0
  191. package/dist/template/.pi/skills/cloudflare/references/queues/patterns.md +155 -0
  192. package/dist/template/.pi/skills/cloudflare/references/r2/README.md +61 -0
  193. package/dist/template/.pi/skills/cloudflare/references/r2/api.md +127 -0
  194. package/dist/template/.pi/skills/cloudflare/references/r2/configuration.md +76 -0
  195. package/dist/template/.pi/skills/cloudflare/references/r2/gotchas.md +94 -0
  196. package/dist/template/.pi/skills/cloudflare/references/r2/patterns.md +127 -0
  197. package/dist/template/.pi/skills/cloudflare/references/r2-data-catalog/README.md +18 -0
  198. package/dist/template/.pi/skills/cloudflare/references/r2-data-catalog/api.md +29 -0
  199. package/dist/template/.pi/skills/cloudflare/references/r2-data-catalog/configuration.md +39 -0
  200. package/dist/template/.pi/skills/cloudflare/references/r2-data-catalog/gotchas.md +20 -0
  201. package/dist/template/.pi/skills/cloudflare/references/r2-data-catalog/patterns.md +46 -0
  202. package/dist/template/.pi/skills/cloudflare/references/r2-sql/README.md +512 -0
  203. package/dist/template/.pi/skills/cloudflare/references/realtime-sfu/README.md +21 -0
  204. package/dist/template/.pi/skills/cloudflare/references/realtime-sfu/api.md +135 -0
  205. package/dist/template/.pi/skills/cloudflare/references/realtime-sfu/configuration.md +63 -0
  206. package/dist/template/.pi/skills/cloudflare/references/realtime-sfu/gotchas.md +75 -0
  207. package/dist/template/.pi/skills/cloudflare/references/realtime-sfu/patterns.md +102 -0
  208. package/dist/template/.pi/skills/cloudflare/references/realtimekit/README.md +81 -0
  209. package/dist/template/.pi/skills/cloudflare/references/realtimekit/api.md +164 -0
  210. package/dist/template/.pi/skills/cloudflare/references/realtimekit/configuration.md +147 -0
  211. package/dist/template/.pi/skills/cloudflare/references/realtimekit/gotchas.md +172 -0
  212. package/dist/template/.pi/skills/cloudflare/references/realtimekit/patterns.md +155 -0
  213. package/dist/template/.pi/skills/cloudflare/references/sandbox/README.md +90 -0
  214. package/dist/template/.pi/skills/cloudflare/references/sandbox/api.md +178 -0
  215. package/dist/template/.pi/skills/cloudflare/references/sandbox/configuration.md +131 -0
  216. package/dist/template/.pi/skills/cloudflare/references/sandbox/gotchas.md +156 -0
  217. package/dist/template/.pi/skills/cloudflare/references/sandbox/patterns.md +203 -0
  218. package/dist/template/.pi/skills/cloudflare/references/secrets-store/README.md +58 -0
  219. package/dist/template/.pi/skills/cloudflare/references/secrets-store/api.md +182 -0
  220. package/dist/template/.pi/skills/cloudflare/references/secrets-store/configuration.md +140 -0
  221. package/dist/template/.pi/skills/cloudflare/references/secrets-store/gotchas.md +129 -0
  222. package/dist/template/.pi/skills/cloudflare/references/secrets-store/patterns.md +218 -0
  223. package/dist/template/.pi/skills/cloudflare/references/smart-placement/README.md +91 -0
  224. package/dist/template/.pi/skills/cloudflare/references/smart-placement/api.md +139 -0
  225. package/dist/template/.pi/skills/cloudflare/references/smart-placement/configuration.md +129 -0
  226. package/dist/template/.pi/skills/cloudflare/references/smart-placement/gotchas.md +87 -0
  227. package/dist/template/.pi/skills/cloudflare/references/smart-placement/patterns.md +135 -0
  228. package/dist/template/.pi/skills/cloudflare/references/snippets/README.md +15 -0
  229. package/dist/template/.pi/skills/cloudflare/references/snippets/api.md +47 -0
  230. package/dist/template/.pi/skills/cloudflare/references/snippets/configuration.md +33 -0
  231. package/dist/template/.pi/skills/cloudflare/references/snippets/gotchas.md +21 -0
  232. package/dist/template/.pi/skills/cloudflare/references/snippets/patterns.md +34 -0
  233. package/dist/template/.pi/skills/cloudflare/references/spectrum/README.md +16 -0
  234. package/dist/template/.pi/skills/cloudflare/references/spectrum/api.md +24 -0
  235. package/dist/template/.pi/skills/cloudflare/references/spectrum/configuration.md +43 -0
  236. package/dist/template/.pi/skills/cloudflare/references/spectrum/gotchas.md +42 -0
  237. package/dist/template/.pi/skills/cloudflare/references/spectrum/patterns.md +40 -0
  238. package/dist/template/.pi/skills/cloudflare/references/static-assets/README.md +14 -0
  239. package/dist/template/.pi/skills/cloudflare/references/static-assets/api.md +3 -0
  240. package/dist/template/.pi/skills/cloudflare/references/static-assets/configuration.md +47 -0
  241. package/dist/template/.pi/skills/cloudflare/references/static-assets/gotchas.md +44 -0
  242. package/dist/template/.pi/skills/cloudflare/references/static-assets/patterns.md +42 -0
  243. package/dist/template/.pi/skills/cloudflare/references/stream/README.md +103 -0
  244. package/dist/template/.pi/skills/cloudflare/references/stream/api.md +204 -0
  245. package/dist/template/.pi/skills/cloudflare/references/stream/configuration.md +127 -0
  246. package/dist/template/.pi/skills/cloudflare/references/stream/gotchas.md +131 -0
  247. package/dist/template/.pi/skills/cloudflare/references/stream/patterns.md +152 -0
  248. package/dist/template/.pi/skills/cloudflare/references/tail-workers/README.md +640 -0
  249. package/dist/template/.pi/skills/cloudflare/references/terraform/README.md +76 -0
  250. package/dist/template/.pi/skills/cloudflare/references/terraform/api.md +159 -0
  251. package/dist/template/.pi/skills/cloudflare/references/terraform/configuration.md +156 -0
  252. package/dist/template/.pi/skills/cloudflare/references/terraform/gotchas.md +207 -0
  253. package/dist/template/.pi/skills/cloudflare/references/terraform/patterns.md +135 -0
  254. package/dist/template/.pi/skills/cloudflare/references/tunnel/README.md +82 -0
  255. package/dist/template/.pi/skills/cloudflare/references/tunnel/api.md +105 -0
  256. package/dist/template/.pi/skills/cloudflare/references/tunnel/configuration.md +113 -0
  257. package/dist/template/.pi/skills/cloudflare/references/tunnel/gotchas.md +115 -0
  258. package/dist/template/.pi/skills/cloudflare/references/tunnel/patterns.md +157 -0
  259. package/dist/template/.pi/skills/cloudflare/references/turn/README.md +699 -0
  260. package/dist/template/.pi/skills/cloudflare/references/turnstile/README.md +14 -0
  261. package/dist/template/.pi/skills/cloudflare/references/turnstile/api.md +3 -0
  262. package/dist/template/.pi/skills/cloudflare/references/turnstile/configuration.md +19 -0
  263. package/dist/template/.pi/skills/cloudflare/references/turnstile/gotchas.md +27 -0
  264. package/dist/template/.pi/skills/cloudflare/references/turnstile/patterns.md +41 -0
  265. package/dist/template/.pi/skills/cloudflare/references/vectorize/README.md +682 -0
  266. package/dist/template/.pi/skills/cloudflare/references/waf/README.md +14 -0
  267. package/dist/template/.pi/skills/cloudflare/references/waf/api.md +3 -0
  268. package/dist/template/.pi/skills/cloudflare/references/waf/configuration.md +44 -0
  269. package/dist/template/.pi/skills/cloudflare/references/waf/gotchas.md +24 -0
  270. package/dist/template/.pi/skills/cloudflare/references/waf/patterns.md +29 -0
  271. package/dist/template/.pi/skills/cloudflare/references/web-analytics/README.md +19 -0
  272. package/dist/template/.pi/skills/cloudflare/references/web-analytics/api.md +52 -0
  273. package/dist/template/.pi/skills/cloudflare/references/web-analytics/configuration.md +31 -0
  274. package/dist/template/.pi/skills/cloudflare/references/web-analytics/gotchas.md +28 -0
  275. package/dist/template/.pi/skills/cloudflare/references/web-analytics/patterns.md +52 -0
  276. package/dist/template/.pi/skills/cloudflare/references/workerd/README.md +47 -0
  277. package/dist/template/.pi/skills/cloudflare/references/workerd/api.md +199 -0
  278. package/dist/template/.pi/skills/cloudflare/references/workerd/configuration.md +185 -0
  279. package/dist/template/.pi/skills/cloudflare/references/workerd/gotchas.md +203 -0
  280. package/dist/template/.pi/skills/cloudflare/references/workerd/patterns.md +216 -0
  281. package/dist/template/.pi/skills/cloudflare/references/workers/README.md +96 -0
  282. package/dist/template/.pi/skills/cloudflare/references/workers/api.md +137 -0
  283. package/dist/template/.pi/skills/cloudflare/references/workers/configuration.md +147 -0
  284. package/dist/template/.pi/skills/cloudflare/references/workers/gotchas.md +99 -0
  285. package/dist/template/.pi/skills/cloudflare/references/workers/patterns.md +149 -0
  286. package/dist/template/.pi/skills/cloudflare/references/workers-ai/README.md +116 -0
  287. package/dist/template/.pi/skills/cloudflare/references/workers-for-platforms/README.md +48 -0
  288. package/dist/template/.pi/skills/cloudflare/references/workers-for-platforms/api.md +169 -0
  289. package/dist/template/.pi/skills/cloudflare/references/workers-for-platforms/configuration.md +136 -0
  290. package/dist/template/.pi/skills/cloudflare/references/workers-for-platforms/gotchas.md +130 -0
  291. package/dist/template/.pi/skills/cloudflare/references/workers-for-platforms/patterns.md +170 -0
  292. package/dist/template/.pi/skills/cloudflare/references/workers-playground/README.md +16 -0
  293. package/dist/template/.pi/skills/cloudflare/references/workers-playground/api.md +20 -0
  294. package/dist/template/.pi/skills/cloudflare/references/workers-playground/configuration.md +3 -0
  295. package/dist/template/.pi/skills/cloudflare/references/workers-playground/gotchas.md +35 -0
  296. package/dist/template/.pi/skills/cloudflare/references/workers-playground/patterns.md +42 -0
  297. package/dist/template/.pi/skills/cloudflare/references/workers-vpc/README.md +579 -0
  298. package/dist/template/.pi/skills/cloudflare/references/workflows/README.md +62 -0
  299. package/dist/template/.pi/skills/cloudflare/references/workflows/api.md +125 -0
  300. package/dist/template/.pi/skills/cloudflare/references/workflows/configuration.md +177 -0
  301. package/dist/template/.pi/skills/cloudflare/references/workflows/gotchas.md +136 -0
  302. package/dist/template/.pi/skills/cloudflare/references/workflows/patterns.md +132 -0
  303. package/dist/template/.pi/skills/cloudflare/references/wrangler/README.md +90 -0
  304. package/dist/template/.pi/skills/cloudflare/references/wrangler/api.md +140 -0
  305. package/dist/template/.pi/skills/cloudflare/references/wrangler/configuration.md +128 -0
  306. package/dist/template/.pi/skills/cloudflare/references/wrangler/gotchas.md +93 -0
  307. package/dist/template/.pi/skills/cloudflare/references/wrangler/patterns.md +150 -0
  308. package/dist/template/.pi/skills/cloudflare/references/zaraz/README.md +360 -0
  309. package/dist/template/.pi/skills/code-cleanup/SKILL.md +232 -0
  310. package/dist/template/.pi/skills/code-review-and-quality/SKILL.md +344 -0
  311. package/dist/template/.pi/skills/code-simplification/SKILL.md +348 -0
  312. package/dist/template/.pi/skills/context-engineering/SKILL.md +296 -0
  313. package/dist/template/.pi/skills/core-data-expert/SKILL.md +117 -0
  314. package/dist/template/.pi/skills/core-data-expert/references/batch-operations.md +543 -0
  315. package/dist/template/.pi/skills/core-data-expert/references/cloudkit-integration.md +259 -0
  316. package/dist/template/.pi/skills/core-data-expert/references/concurrency.md +522 -0
  317. package/dist/template/.pi/skills/core-data-expert/references/fetch-requests.md +643 -0
  318. package/dist/template/.pi/skills/core-data-expert/references/glossary.md +233 -0
  319. package/dist/template/.pi/skills/core-data-expert/references/migration.md +393 -0
  320. package/dist/template/.pi/skills/core-data-expert/references/model-configuration.md +597 -0
  321. package/dist/template/.pi/skills/core-data-expert/references/performance.md +300 -0
  322. package/dist/template/.pi/skills/core-data-expert/references/persistent-history.md +553 -0
  323. package/dist/template/.pi/skills/core-data-expert/references/project-audit.md +60 -0
  324. package/dist/template/.pi/skills/core-data-expert/references/saving.md +574 -0
  325. package/dist/template/.pi/skills/core-data-expert/references/stack-setup.md +625 -0
  326. package/dist/template/.pi/skills/core-data-expert/references/testing.md +300 -0
  327. package/dist/template/.pi/skills/core-data-expert/references/threading.md +589 -0
  328. package/dist/template/.pi/skills/debugging-and-error-recovery/SKILL.md +274 -0
  329. package/dist/template/.pi/skills/deep-module-design/SKILL.md +218 -0
  330. package/dist/template/.pi/skills/defense-in-depth/SKILL.md +161 -0
  331. package/dist/template/.pi/skills/deprecation-and-migration/SKILL.md +186 -0
  332. package/dist/template/.pi/skills/design-system-audit/SKILL.md +176 -0
  333. package/dist/template/.pi/skills/design-taste-frontend/SKILL.md +255 -0
  334. package/dist/template/.pi/skills/development-lifecycle/SKILL.md +285 -0
  335. package/dist/template/.pi/skills/documentation-and-adrs/SKILL.md +217 -0
  336. package/dist/template/.pi/skills/doubt-driven-development/SKILL.md +207 -0
  337. package/dist/template/.pi/skills/fallow/SKILL.md +457 -0
  338. package/dist/template/.pi/skills/fallow/references/cli-reference.md +1905 -0
  339. package/dist/template/.pi/skills/fallow/references/gotchas.md +644 -0
  340. package/dist/template/.pi/skills/fallow/references/patterns.md +791 -0
  341. package/dist/template/.pi/skills/figma/SKILL.md +241 -0
  342. package/dist/template/.pi/skills/frontend-design/SKILL.md +262 -0
  343. package/dist/template/.pi/skills/frontend-design/references/animation/motion-advanced.md +224 -0
  344. package/dist/template/.pi/skills/frontend-design/references/animation/motion-core.md +181 -0
  345. package/dist/template/.pi/skills/frontend-design/references/canvas/execution.md +90 -0
  346. package/dist/template/.pi/skills/frontend-design/references/canvas/philosophy.md +94 -0
  347. package/dist/template/.pi/skills/frontend-design/references/design/color-system.md +111 -0
  348. package/dist/template/.pi/skills/frontend-design/references/design/interaction.md +149 -0
  349. package/dist/template/.pi/skills/frontend-design/references/design/typography-rules.md +106 -0
  350. package/dist/template/.pi/skills/frontend-design/references/design/ux-writing.md +99 -0
  351. package/dist/template/.pi/skills/frontend-design/references/shadcn/accessibility.md +132 -0
  352. package/dist/template/.pi/skills/frontend-design/references/shadcn/core-components.md +153 -0
  353. package/dist/template/.pi/skills/frontend-design/references/shadcn/form-components.md +158 -0
  354. package/dist/template/.pi/skills/frontend-design/references/shadcn/setup.md +69 -0
  355. package/dist/template/.pi/skills/frontend-design/references/shadcn/theming.md +152 -0
  356. package/dist/template/.pi/skills/frontend-design/references/tailwind/responsive.md +112 -0
  357. package/dist/template/.pi/skills/frontend-design/references/tailwind/utilities-layout.md +134 -0
  358. package/dist/template/.pi/skills/frontend-design/references/tailwind/utilities-styling.md +165 -0
  359. package/dist/template/.pi/skills/frontend-design/references/tailwind/v4-config.md +147 -0
  360. package/dist/template/.pi/skills/frontend-design/references/tailwind/v4-features.md +128 -0
  361. package/dist/template/.pi/skills/frontend-ui-engineering/SKILL.md +217 -0
  362. package/dist/template/.pi/skills/gemini-large-context/SKILL.md +238 -0
  363. package/dist/template/.pi/skills/git-workflow-and-versioning/SKILL.md +217 -0
  364. package/dist/template/.pi/skills/grill-me/SKILL.md +162 -0
  365. package/dist/template/.pi/skills/high-end-visual-design/SKILL.md +128 -0
  366. package/dist/template/.pi/skills/idea-refine/SKILL.md +195 -0
  367. package/dist/template/.pi/skills/idea-refine/examples.md +62 -0
  368. package/dist/template/.pi/skills/idea-refine/frameworks.md +63 -0
  369. package/dist/template/.pi/skills/idea-refine/refinement-criteria.md +56 -0
  370. package/dist/template/.pi/skills/incremental-implementation/SKILL.md +190 -0
  371. package/dist/template/.pi/skills/industrial-brutalist-ui/SKILL.md +131 -0
  372. package/dist/template/.pi/skills/interview-me/SKILL.md +227 -0
  373. package/dist/template/.pi/skills/jira/SKILL.md +306 -0
  374. package/dist/template/.pi/skills/loop-audit/SKILL.md +141 -0
  375. package/dist/template/.pi/skills/loop-cost/SKILL.md +130 -0
  376. package/dist/template/.pi/skills/loop-engineering/SKILL.md +175 -0
  377. package/dist/template/.pi/skills/minimalist-ui/SKILL.md +124 -0
  378. package/dist/template/.pi/skills/mockup-to-code/SKILL.md +197 -0
  379. package/dist/template/.pi/skills/observability-and-instrumentation/SKILL.md +202 -0
  380. package/dist/template/.pi/skills/opensrc/SKILL.md +297 -0
  381. package/dist/template/.pi/skills/opensrc/references/architecture.md +176 -0
  382. package/dist/template/.pi/skills/opensrc/references/cli-usage.md +176 -0
  383. package/dist/template/.pi/skills/opensrc/references/registry-support.md +137 -0
  384. package/dist/template/.pi/skills/pdf-extract/SKILL.md +461 -0
  385. package/dist/template/.pi/skills/performance-optimization/SKILL.md +233 -0
  386. package/dist/template/.pi/skills/performance-optimization/references/performance-checklist.md +85 -0
  387. package/dist/template/.pi/skills/planning-and-task-breakdown/SKILL.md +204 -0
  388. package/dist/template/.pi/skills/playwright/SKILL.md +404 -0
  389. package/dist/template/.pi/skills/playwright/references/agent-browser-cli.md +405 -0
  390. package/dist/template/.pi/skills/polar/SKILL.md +125 -0
  391. package/dist/template/.pi/skills/react-best-practices/SKILL.md +156 -0
  392. package/dist/template/.pi/skills/react-best-practices/rules/_sections.md +46 -0
  393. package/dist/template/.pi/skills/react-best-practices/rules/_template.md +28 -0
  394. package/dist/template/.pi/skills/react-best-practices/rules/advanced-event-handler-refs.md +55 -0
  395. package/dist/template/.pi/skills/react-best-practices/rules/advanced-use-latest.md +49 -0
  396. package/dist/template/.pi/skills/react-best-practices/rules/async-api-routes.md +38 -0
  397. package/dist/template/.pi/skills/react-best-practices/rules/async-defer-await.md +80 -0
  398. package/dist/template/.pi/skills/react-best-practices/rules/async-dependencies.md +36 -0
  399. package/dist/template/.pi/skills/react-best-practices/rules/async-parallel.md +28 -0
  400. package/dist/template/.pi/skills/react-best-practices/rules/async-suspense-boundaries.md +99 -0
  401. package/dist/template/.pi/skills/react-best-practices/rules/bundle-barrel-imports.md +59 -0
  402. package/dist/template/.pi/skills/react-best-practices/rules/bundle-conditional.md +31 -0
  403. package/dist/template/.pi/skills/react-best-practices/rules/bundle-defer-third-party.md +49 -0
  404. package/dist/template/.pi/skills/react-best-practices/rules/bundle-dynamic-imports.md +35 -0
  405. package/dist/template/.pi/skills/react-best-practices/rules/bundle-preload.md +50 -0
  406. package/dist/template/.pi/skills/react-best-practices/rules/client-event-listeners.md +74 -0
  407. package/dist/template/.pi/skills/react-best-practices/rules/client-localstorage-schema.md +71 -0
  408. package/dist/template/.pi/skills/react-best-practices/rules/client-passive-event-listeners.md +48 -0
  409. package/dist/template/.pi/skills/react-best-practices/rules/client-swr-dedup.md +56 -0
  410. package/dist/template/.pi/skills/react-best-practices/rules/js-batch-dom-css.md +82 -0
  411. package/dist/template/.pi/skills/react-best-practices/rules/js-cache-function-results.md +80 -0
  412. package/dist/template/.pi/skills/react-best-practices/rules/js-cache-property-access.md +28 -0
  413. package/dist/template/.pi/skills/react-best-practices/rules/js-cache-storage.md +70 -0
  414. package/dist/template/.pi/skills/react-best-practices/rules/js-combine-iterations.md +32 -0
  415. package/dist/template/.pi/skills/react-best-practices/rules/js-early-exit.md +50 -0
  416. package/dist/template/.pi/skills/react-best-practices/rules/js-hoist-regexp.md +45 -0
  417. package/dist/template/.pi/skills/react-best-practices/rules/js-index-maps.md +37 -0
  418. package/dist/template/.pi/skills/react-best-practices/rules/js-length-check-first.md +49 -0
  419. package/dist/template/.pi/skills/react-best-practices/rules/js-min-max-loop.md +82 -0
  420. package/dist/template/.pi/skills/react-best-practices/rules/js-set-map-lookups.md +24 -0
  421. package/dist/template/.pi/skills/react-best-practices/rules/js-tosorted-immutable.md +57 -0
  422. package/dist/template/.pi/skills/react-best-practices/rules/rendering-activity.md +26 -0
  423. package/dist/template/.pi/skills/react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
  424. package/dist/template/.pi/skills/react-best-practices/rules/rendering-conditional-render.md +40 -0
  425. package/dist/template/.pi/skills/react-best-practices/rules/rendering-content-visibility.md +38 -0
  426. package/dist/template/.pi/skills/react-best-practices/rules/rendering-hoist-jsx.md +46 -0
  427. package/dist/template/.pi/skills/react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
  428. package/dist/template/.pi/skills/react-best-practices/rules/rendering-svg-precision.md +28 -0
  429. package/dist/template/.pi/skills/react-best-practices/rules/rerender-defer-reads.md +39 -0
  430. package/dist/template/.pi/skills/react-best-practices/rules/rerender-dependencies.md +45 -0
  431. package/dist/template/.pi/skills/react-best-practices/rules/rerender-derived-state.md +29 -0
  432. package/dist/template/.pi/skills/react-best-practices/rules/rerender-functional-setstate.md +74 -0
  433. package/dist/template/.pi/skills/react-best-practices/rules/rerender-lazy-state-init.md +58 -0
  434. package/dist/template/.pi/skills/react-best-practices/rules/rerender-memo.md +44 -0
  435. package/dist/template/.pi/skills/react-best-practices/rules/rerender-transitions.md +40 -0
  436. package/dist/template/.pi/skills/react-best-practices/rules/server-after-nonblocking.md +73 -0
  437. package/dist/template/.pi/skills/react-best-practices/rules/server-cache-lru.md +41 -0
  438. package/dist/template/.pi/skills/react-best-practices/rules/server-cache-react.md +76 -0
  439. package/dist/template/.pi/skills/react-best-practices/rules/server-parallel-fetching.md +83 -0
  440. package/dist/template/.pi/skills/react-best-practices/rules/server-serialization.md +38 -0
  441. package/dist/template/.pi/skills/redesign-existing-projects/SKILL.md +217 -0
  442. package/dist/template/.pi/skills/resend/SKILL.md +196 -0
  443. package/dist/template/.pi/skills/resend/references/react-email.md +287 -0
  444. package/dist/template/.pi/skills/resend/references/receive-email.md +248 -0
  445. package/dist/template/.pi/skills/resend/references/send-email.md +318 -0
  446. package/dist/template/.pi/skills/root-cause-tracing/SKILL.md +216 -0
  447. package/dist/template/.pi/skills/security-and-hardening/SKILL.md +293 -0
  448. package/dist/template/.pi/skills/security-and-hardening/references/security-checklist.md +105 -0
  449. package/dist/template/.pi/skills/shipping-and-launch/SKILL.md +101 -0
  450. package/dist/template/.pi/skills/source-driven-development/SKILL.md +108 -0
  451. package/dist/template/.pi/skills/spec-driven-development/SKILL.md +177 -0
  452. package/dist/template/.pi/skills/srcwalk/SKILL.md +182 -0
  453. package/dist/template/.pi/skills/subagent-driven-development/SKILL.md +253 -0
  454. package/dist/template/.pi/skills/supabase/SKILL.md +153 -0
  455. package/dist/template/.pi/skills/supabase-postgres-best-practices/SKILL.md +88 -0
  456. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/advanced-full-text-search.md +55 -0
  457. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/advanced-jsonb-indexing.md +49 -0
  458. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/conn-idle-timeout.md +46 -0
  459. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/conn-limits.md +44 -0
  460. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/conn-pooling.md +41 -0
  461. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/conn-prepared-statements.md +46 -0
  462. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/data-batch-inserts.md +54 -0
  463. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/data-n-plus-one.md +53 -0
  464. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/data-pagination.md +50 -0
  465. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/data-upsert.md +50 -0
  466. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/lock-advisory.md +56 -0
  467. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/lock-deadlock-prevention.md +68 -0
  468. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/lock-short-transactions.md +50 -0
  469. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/lock-skip-locked.md +54 -0
  470. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/monitor-explain-analyze.md +45 -0
  471. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/monitor-pg-stat-statements.md +55 -0
  472. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/monitor-vacuum-analyze.md +55 -0
  473. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/query-composite-indexes.md +44 -0
  474. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/query-covering-indexes.md +40 -0
  475. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/query-index-types.md +45 -0
  476. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/query-missing-indexes.md +43 -0
  477. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/query-partial-indexes.md +45 -0
  478. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/schema-data-types.md +46 -0
  479. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/schema-foreign-key-indexes.md +59 -0
  480. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/schema-lowercase-identifiers.md +55 -0
  481. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/schema-partitioning.md +55 -0
  482. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/schema-primary-keys.md +61 -0
  483. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/security-privileges.md +54 -0
  484. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/security-rls-basics.md +50 -0
  485. package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/security-rls-performance.md +57 -0
  486. package/dist/template/.pi/skills/swift-concurrency/SKILL.md +290 -0
  487. package/dist/template/.pi/skills/swift-concurrency/references/actors.md +640 -0
  488. package/dist/template/.pi/skills/swift-concurrency/references/async-algorithms.md +822 -0
  489. package/dist/template/.pi/skills/swift-concurrency/references/async-await-basics.md +249 -0
  490. package/dist/template/.pi/skills/swift-concurrency/references/async-sequences.md +670 -0
  491. package/dist/template/.pi/skills/swift-concurrency/references/core-data.md +533 -0
  492. package/dist/template/.pi/skills/swift-concurrency/references/glossary.md +128 -0
  493. package/dist/template/.pi/skills/swift-concurrency/references/linting.md +142 -0
  494. package/dist/template/.pi/skills/swift-concurrency/references/memory-management.md +542 -0
  495. package/dist/template/.pi/skills/swift-concurrency/references/migration.md +1076 -0
  496. package/dist/template/.pi/skills/swift-concurrency/references/performance.md +574 -0
  497. package/dist/template/.pi/skills/swift-concurrency/references/sendable.md +578 -0
  498. package/dist/template/.pi/skills/swift-concurrency/references/tasks.md +604 -0
  499. package/dist/template/.pi/skills/swift-concurrency/references/testing.md +565 -0
  500. package/dist/template/.pi/skills/swift-concurrency/references/threading.md +452 -0
  501. package/dist/template/.pi/skills/swiftui-expert-skill/SKILL.md +343 -0
  502. package/dist/template/.pi/skills/swiftui-expert-skill/references/animation-advanced.md +351 -0
  503. package/dist/template/.pi/skills/swiftui-expert-skill/references/animation-basics.md +284 -0
  504. package/dist/template/.pi/skills/swiftui-expert-skill/references/animation-transitions.md +326 -0
  505. package/dist/template/.pi/skills/swiftui-expert-skill/references/image-optimization.md +286 -0
  506. package/dist/template/.pi/skills/swiftui-expert-skill/references/layout-best-practices.md +312 -0
  507. package/dist/template/.pi/skills/swiftui-expert-skill/references/liquid-glass.md +377 -0
  508. package/dist/template/.pi/skills/swiftui-expert-skill/references/list-patterns.md +153 -0
  509. package/dist/template/.pi/skills/swiftui-expert-skill/references/modern-apis.md +400 -0
  510. package/dist/template/.pi/skills/swiftui-expert-skill/references/performance-patterns.md +377 -0
  511. package/dist/template/.pi/skills/swiftui-expert-skill/references/scroll-patterns.md +305 -0
  512. package/dist/template/.pi/skills/swiftui-expert-skill/references/sheet-navigation-patterns.md +292 -0
  513. package/dist/template/.pi/skills/swiftui-expert-skill/references/state-management.md +447 -0
  514. package/dist/template/.pi/skills/swiftui-expert-skill/references/text-formatting.md +285 -0
  515. package/dist/template/.pi/skills/swiftui-expert-skill/references/view-structure.md +276 -0
  516. package/dist/template/.pi/skills/test-driven-development/SKILL.md +400 -0
  517. package/dist/template/.pi/skills/test-driven-development/references/testing-patterns.md +155 -0
  518. package/dist/template/.pi/skills/testing-anti-patterns/SKILL.md +339 -0
  519. package/dist/template/.pi/skills/using-agent-skills/SKILL.md +371 -0
  520. package/dist/template/.pi/skills/using-git-worktrees/SKILL.md +275 -0
  521. package/dist/template/.pi/skills/vercel-deploy-claimable/SKILL.md +144 -0
  522. package/dist/template/.pi/skills/vercel-deploy-claimable/scripts/deploy.sh +249 -0
  523. package/dist/template/.pi/skills/verification-before-completion/SKILL.md +348 -0
  524. package/dist/template/.pi/skills/webclaw/SKILL.md +188 -0
  525. package/dist/template/.pi/skills/writing-skills/SKILL.md +329 -0
  526. package/dist/template/.pi/skills/writing-skills/references/anti-patterns.md +25 -0
  527. package/dist/template/.pi/skills/writing-skills/references/claude-search-optimization.md +140 -0
  528. package/dist/template/.pi/skills/writing-skills/references/discovery-workflow.md +11 -0
  529. package/dist/template/.pi/skills/writing-skills/references/file-organization.md +32 -0
  530. package/dist/template/.pi/skills/writing-skills/references/flowcharts-and-examples.md +57 -0
  531. package/dist/template/.pi/skills/writing-skills/references/rationalization-hardening.md +75 -0
  532. package/dist/template/.pi/skills/writing-skills/references/testing-methodology.md +397 -0
  533. package/dist/template/.pi/skills/writing-skills/references/testing-skill-types.md +52 -0
  534. package/dist/template/.pi/subagents.json +10 -0
  535. package/dist/template/.pi/templates/adr.md +47 -0
  536. package/dist/template/.pi/templates/design.md +61 -0
  537. package/dist/template/.pi/templates/loop-github-action.yml +162 -0
  538. package/dist/template/.pi/templates/loop-orchestrator.sh +514 -0
  539. package/dist/template/.pi/templates/loop-orchestrator.test.ts +332 -0
  540. package/dist/template/.pi/templates/loop-orchestrator.ts +936 -0
  541. package/dist/template/.pi/templates/loop-state.json +24 -0
  542. package/dist/template/.pi/templates/loop-state.md +98 -0
  543. package/dist/template/.pi/templates/loop-vision.md +110 -0
  544. package/dist/template/.pi/templates/prd.md +204 -0
  545. package/dist/template/.pi/templates/progress.md +55 -0
  546. package/dist/template/.pi/templates/project.md +58 -0
  547. package/dist/template/.pi/templates/proposal.md +40 -0
  548. package/dist/template/.pi/templates/review-state.json +20 -0
  549. package/dist/template/.pi/templates/roadmap.md +93 -0
  550. package/dist/template/.pi/templates/state.md +97 -0
  551. package/dist/template/.pi/templates/tasks.md +202 -0
  552. package/dist/template/.pi/templates/tech-stack.md +85 -0
  553. package/dist/template/.pi/templates/user.md +26 -0
  554. package/dist/template/.pi/workflows/INDEX.md +63 -0
  555. package/dist/template/.pi/workflows/audit-pattern.md +84 -0
  556. package/dist/template/.pi/workflows/batch-implement.md +121 -0
  557. package/dist/template/.pi/workflows/deep-research.md +89 -0
  558. package/dist/template/.pi/workflows/development-lifecycle-workflow.md +175 -0
  559. package/dist/template/.pi/workflows/garbage-collection.md +144 -0
  560. package/dist/template/.pi/workflows/quality-loop.md +211 -0
  561. package/package.json +57 -0
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Templates Injector Extension
3
+ *
4
+ * Auto-injects project context files into system prompt.
5
+ * Auto-injects project context files into system prompt via pi's before_agent_start hook.
6
+ *
7
+ * Resolution: prefer the LIVE file at `.pi/{name}` (filled by /init, the project's
8
+ * real state/stack/vision); fall back to the blank seed at `.pi/templates/{name}`
9
+ * when no live file exists. This keeps templates/ pristine as deliverables while
10
+ * ensuring real project state is what the agent actually sees.
11
+ *
12
+ * Auto-injected (always, whichever resolves):
13
+ * - project.md
14
+ * - tech-stack.md
15
+ * - state.md ← the "you are here" marker; live version injected once /init fills it
16
+ *
17
+ * User can opt-in to inject more via /inject-template command.
18
+ */
19
+
20
+ import * as fs from "node:fs";
21
+ import * as path from "node:path";
22
+ import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
23
+
24
+ const ALWAYS_INJECT = ["project.md", "tech-stack.md", "state.md"];
25
+
26
+ function readTemplate(cwd: string, name: string): string | null {
27
+ // Prefer live file at .pi/{name} (filled by /init — real project state);
28
+ // fall back to blank seed at .pi/templates/{name} when no live file exists.
29
+ const livePath = path.join(cwd, ".pi", name);
30
+ const seedPath = path.join(cwd, ".pi", "templates", name);
31
+ const filePath = fs.existsSync(livePath) ? livePath : seedPath;
32
+ if (!fs.existsSync(filePath)) return null;
33
+ const content = fs.readFileSync(filePath, "utf-8");
34
+ // Strip frontmatter for injection
35
+ const fmMatch = content.match(/^---\n[\s\S]*?\n---\n([\s\S]*)$/);
36
+ return (fmMatch ? fmMatch[1] : content).trim();
37
+ }
38
+
39
+ export default function templatesInjector(pi: ExtensionAPI) {
40
+ pi.on("before_agent_start", async (event, ctx) => {
41
+ const injected: string[] = [];
42
+
43
+ for (const name of ALWAYS_INJECT) {
44
+ const content = readTemplate(ctx.cwd, name);
45
+ if (content && content.length > 0) {
46
+ injected.push(`### ${name}\n\n${content}`);
47
+ }
48
+ }
49
+
50
+ if (injected.length === 0) return;
51
+
52
+ return {
53
+ systemPrompt:
54
+ event.systemPrompt +
55
+ `\n\n## Project Context (auto-injected from .pi/ — live state/stack/vision, seeded by .pi/templates/)\n\n${injected.join("\n\n---\n\n")}`,
56
+ };
57
+ });
58
+
59
+ pi.registerCommand("inject-template", {
60
+ description: "Inject a template into current context",
61
+ handler: async (args, ctx) => {
62
+ const name = args.trim() || (await ctx.ui.select("Choose template", fs.readdirSync(path.join(ctx.cwd, ".pi", "templates")).filter((f) => f.endsWith(".md"))));
63
+ if (!name) return;
64
+
65
+ const content = readTemplate(ctx.cwd, name);
66
+ if (!content) {
67
+ ctx.ui.notify(`Template not found: ${name}`, "warning");
68
+ return;
69
+ }
70
+
71
+ // Inject via sendUserMessage as a context message
72
+ pi.sendUserMessage(`[Template: ${name}]\n\n${content}`, { deliverAs: "followUp" });
73
+ ctx.ui.notify(`Injected template: ${name}`, "info");
74
+ },
75
+ });
76
+ }
@@ -0,0 +1,301 @@
1
+ /**
2
+ * Workflows Runner Extension
3
+ *
4
+ * Executes DAG workflows from `.pi/workflows/*.md` using pi's subagent tool.
5
+ * Supports sequential phases, parallel tasks, and dynamic concurrency.
6
+ *
7
+ * Architecture: The extension parses workflow DAG, validates args, and returns
8
+ * an execution plan with concrete `task()` calls the LLM must execute in order.
9
+ * Subagent dispatch is the LLM's responsibility (extensions cannot spawn subagents
10
+ * directly in pi-coding-agent).
11
+ *
12
+ * Usage:
13
+ * - Place at `.pi/extensions/workflows-runner.ts`
14
+ * - Workflows loaded from `.pi/workflows/*.md`
15
+ * - Invoke via `run_workflow` tool or `/workflow` command
16
+ */
17
+
18
+ import * as fs from "node:fs";
19
+ import * as path from "node:path";
20
+ import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
21
+ import { Type } from "@sinclair/typebox";
22
+
23
+ interface WorkflowPhase {
24
+ num: number;
25
+ name: string;
26
+ agent?: string;
27
+ workflow?: string;
28
+ concurrency: number | { rule: string };
29
+ dependsOn: number[];
30
+ prompt: string;
31
+ }
32
+
33
+ interface Workflow {
34
+ name: string;
35
+ description: string;
36
+ args: Array<{ name: string; required: boolean; description: string }>;
37
+ phases: WorkflowPhase[];
38
+ }
39
+
40
+ function parseWorkflow(content: string): Omit<Workflow, "name"> {
41
+ const phases: WorkflowPhase[] = [];
42
+ const phaseRegex = /### Phase (\d+): ([^\n]+)\n([\s\S]*?)(?=### Phase|\n## |\s*$)/g;
43
+ let match: RegExpExecArray | null;
44
+
45
+ while ((match = phaseRegex.exec(content)) !== null) {
46
+ const num = parseInt(match[1], 10);
47
+ const name = match[2].trim();
48
+ const body = match[3];
49
+
50
+ const agentMatch = body.match(/\*\*Agent:\*\*\s*@?(\w+)/);
51
+ const workflowMatch = body.match(/\*\*Workflow:\*\*\s*(\S+)/);
52
+ const concMatch = body.match(/\*\*Concurrency:\*\*\s*(\d+|Dynamic[^)]*\))/);
53
+ const dependsMatch = body.match(/\*\*Depends on:\*\*\s*Phase\s+(\d+)/);
54
+ const promptMatch = body.match(/\*\*Prompt:\*\*\s*\n+\s*([\s\S]*?)$/);
55
+
56
+ let concurrency: number | { rule: string } = 1;
57
+ if (concMatch) {
58
+ if (concMatch[1].startsWith("Dynamic")) {
59
+ concurrency = { rule: concMatch[1] };
60
+ } else {
61
+ concurrency = parseInt(concMatch[1], 10);
62
+ }
63
+ }
64
+
65
+ phases.push({
66
+ num,
67
+ name,
68
+ agent: agentMatch?.[1],
69
+ workflow: workflowMatch?.[1],
70
+ concurrency,
71
+ dependsOn: dependsMatch ? [parseInt(dependsMatch[1], 10)] : [],
72
+ prompt: promptMatch?.[1]?.trim() ?? "",
73
+ });
74
+ }
75
+
76
+ const argsMatch = content.match(/## Args\n([\s\S]*?)(?=\n## )/);
77
+ const args: Workflow["args"] = [];
78
+ if (argsMatch) {
79
+ const argRegex = /- `(\w+)` \((required|optional)\) — (.+)/g;
80
+ let am: RegExpExecArray | null;
81
+ while ((am = argRegex.exec(argsMatch[1])) !== null) {
82
+ args.push({
83
+ name: am[1],
84
+ required: am[2] === "required",
85
+ description: am[3],
86
+ });
87
+ }
88
+ }
89
+
90
+ const descMatch = content.match(/^# \w+\n\n([^#]+)/);
91
+ const description = descMatch?.[1]?.trim() ?? "";
92
+
93
+ return { description, args, phases };
94
+ }
95
+
96
+ function resolveConcurrency(
97
+ spec: number | { rule: string },
98
+ defaultCount: number,
99
+ ): number {
100
+ if (typeof spec === "number") return spec;
101
+ const rule = spec.rule;
102
+ const minMatch = rule.match(/min\s+(\d+)/);
103
+ const maxMatch = rule.match(/max\s+(\d+)/);
104
+ const min = minMatch ? parseInt(minMatch[1], 10) : 1;
105
+ const max = maxMatch ? parseInt(maxMatch[1], 10) : 10;
106
+ return Math.max(min, Math.min(max, defaultCount));
107
+ }
108
+
109
+ function loadWorkflows(workflowsDir: string): Workflow[] {
110
+ if (!fs.existsSync(workflowsDir)) return [];
111
+ const workflows: Workflow[] = [];
112
+ for (const file of fs.readdirSync(workflowsDir)) {
113
+ if (!file.endsWith(".md")) continue;
114
+ const content = fs.readFileSync(path.join(workflowsDir, file), "utf-8");
115
+ const name = path.basename(file, ".md");
116
+ const parsed = parseWorkflow(content);
117
+ workflows.push({ name, ...parsed });
118
+ }
119
+ return workflows;
120
+ }
121
+
122
+ /** Substitute placeholders in a prompt template. */
123
+ function substitute(
124
+ template: string,
125
+ args: Record<string, string>,
126
+ phaseOutputs: Record<number, string>,
127
+ ): string {
128
+ return template
129
+ .replace(/\{(\w+)\}/g, (_, key) => args[key] ?? `{${key}}`)
130
+ .replace(/\{phase_(\d+)_output\}/g, (_, n) => {
131
+ const idx = parseInt(n, 10);
132
+ return phaseOutputs[idx] ?? `[phase ${idx} output pending]`;
133
+ });
134
+ }
135
+
136
+ /** Build a concrete execution plan the LLM can execute step-by-step. */
137
+ function buildExecutionPlan(
138
+ wf: Workflow,
139
+ providedArgs: Record<string, string>,
140
+ ): string {
141
+ // Topological sort
142
+ const sorted: WorkflowPhase[] = [];
143
+ const visited = new Set<number>();
144
+ const visit = (phase: WorkflowPhase) => {
145
+ if (visited.has(phase.num)) return;
146
+ visited.add(phase.num);
147
+ for (const dep of phase.dependsOn) {
148
+ const depPhase = wf.phases.find((p) => p.num === dep);
149
+ if (depPhase) visit(depPhase);
150
+ }
151
+ sorted.push(phase);
152
+ };
153
+ for (const phase of wf.phases) visit(phase);
154
+
155
+ const lines: string[] = [];
156
+ lines.push(`# Workflow: \`${wf.name}\``);
157
+ lines.push("");
158
+ lines.push(wf.description);
159
+ lines.push("");
160
+ lines.push("## Execution Plan");
161
+ lines.push("");
162
+ lines.push("**Instructions for the assistant:** Execute each phase in order. For each phase with an `Agent` and concurrency ≥ 1, call the `task()` tool (or `subagent` tool if available) with the listed arguments. Collect outputs and substitute into subsequent phases via `{phase_N_output}`.");
163
+ lines.push("");
164
+
165
+ const phaseOutputs: Record<number, string> = {};
166
+
167
+ for (const phase of sorted) {
168
+ lines.push(`### Phase ${phase.num}: ${phase.name}`);
169
+ lines.push("");
170
+
171
+ if (phase.workflow) {
172
+ lines.push(`- **Type:** Sub-workflow composition (\`${phase.workflow}\`)`);
173
+ lines.push(`- **Action:** Invoke \`run_workflow\` tool with \`name: "${phase.workflow}\`, passing current \`{arg}\` values.`);
174
+ lines.push(`- **Output placeholder:** \`{phase_${phase.num}_output}\``);
175
+ lines.push("");
176
+ continue;
177
+ }
178
+
179
+ if (!phase.agent) {
180
+ lines.push(`- **Type:** Skip (no agent defined)`);
181
+ lines.push(`- **Action:** None.`);
182
+ lines.push("");
183
+ continue;
184
+ }
185
+
186
+ const concurrency =
187
+ typeof phase.concurrency === "number"
188
+ ? phase.concurrency
189
+ : resolveConcurrency(phase.concurrency, 1);
190
+
191
+ const substitutedPrompt = substitute(phase.prompt, providedArgs, phaseOutputs);
192
+
193
+ lines.push(`- **Agent:** \`${phase.agent}\``);
194
+ lines.push(`- **Concurrency:** ${concurrency} (${concurrency === 1 ? "sequential" : "parallel"})`);
195
+ if (phase.dependsOn.length > 0) {
196
+ lines.push(`- **Depends on:** Phase ${phase.dependsOn.join(", ")}`);
197
+ }
198
+ lines.push(`- **Output placeholder:** \`{phase_${phase.num}_output}\``);
199
+ lines.push("");
200
+ lines.push("**Prompt to send:**");
201
+ lines.push("```");
202
+ lines.push(substitutedPrompt);
203
+ lines.push("```");
204
+ lines.push("");
205
+ lines.push(`**Tool call (${concurrency}× in ${concurrency === 1 ? "sequence" : "parallel"}):**`);
206
+ if (concurrency === 1) {
207
+ lines.push("```");
208
+ lines.push(`task({`);
209
+ lines.push(` subagent_type: "${phase.agent}",`);
210
+ lines.push(` prompt: <the prompt above>`);
211
+ lines.push(`})`);
212
+ lines.push("```");
213
+ } else {
214
+ lines.push("```");
215
+ lines.push(`Promise.all([`);
216
+ for (let i = 0; i < concurrency; i++) {
217
+ const variant = phase.prompt.includes("{variant}")
218
+ ? phase.prompt.replace(/\{variant\}/g, `variant ${i + 1}`)
219
+ : phase.prompt;
220
+ const subPrompt = substitute(variant, providedArgs, phaseOutputs);
221
+ lines.push(` task({ subagent_type: "${phase.agent}", prompt: \`${subPrompt.replace(/`/g, "\\`")}\` }),`);
222
+ }
223
+ lines.push(`])`);
224
+ lines.push("```");
225
+ }
226
+ lines.push("");
227
+ lines.push("---");
228
+ lines.push("");
229
+ }
230
+
231
+ lines.push("## Final Synthesis");
232
+ lines.push("");
233
+ lines.push("After all phases complete, synthesize outputs from `{phase_N_output}` placeholders into a final report. The synthesis rules (if any) are defined in the workflow markdown under `## Final Synthesis (Main Agent)`.");
234
+
235
+ return lines.join("\n");
236
+ }
237
+
238
+ export default function workflowsRunner(pi: ExtensionAPI) {
239
+ const workflowsDir = path.join(process.cwd(), ".pi", "workflows");
240
+ const workflows = loadWorkflows(workflowsDir);
241
+
242
+ if (workflows.length === 0) return;
243
+
244
+ pi.registerTool({
245
+ name: "run_workflow",
246
+ label: "Run Workflow",
247
+ description: [
248
+ "Execute a DAG workflow from .pi/workflows/.",
249
+ `Available: ${workflows.map((w) => w.name).join(", ")}`,
250
+ "Returns an execution plan with concrete task() calls for the assistant to execute.",
251
+ ].join(" "),
252
+ parameters: Type.Object({
253
+ name: Type.String({ description: "Workflow name" }),
254
+ args: Type.Optional(Type.Record(Type.String(), Type.String())),
255
+ }),
256
+ async execute(_toolCallId, params, _signal, _onUpdate, _ctx) {
257
+ const wf = workflows.find((w) => w.name === params.name);
258
+ if (!wf) {
259
+ return {
260
+ content: [
261
+ {
262
+ type: "text",
263
+ text: `Unknown workflow: ${params.name}. Available: ${workflows.map((w) => w.name).join(", ")}`,
264
+ },
265
+ ],
266
+ isError: true,
267
+ };
268
+ }
269
+
270
+ // Validate required args
271
+ const providedArgs = (params.args ?? {}) as Record<string, string>;
272
+ const missing = wf.args.filter((a) => a.required && !(a.name in providedArgs));
273
+ if (missing.length > 0) {
274
+ const missingNames = missing.map((m) => m.name).join(", ");
275
+ return {
276
+ content: [
277
+ {
278
+ type: "text",
279
+ text: `Missing required args: ${missingNames}. Provide them as run_workflow name="${params.name}" args={${JSON.stringify(Object.fromEntries(missing.map((m) => [m.name, "<value>"])))}}.`,
280
+ },
281
+ ],
282
+ isError: true,
283
+ };
284
+ }
285
+
286
+ const plan = buildExecutionPlan(wf, providedArgs);
287
+
288
+ return {
289
+ content: [{ type: "text", text: plan }],
290
+ };
291
+ },
292
+ });
293
+
294
+ pi.registerCommand("workflows", {
295
+ description: "List available workflows",
296
+ handler: async (_args, ctx) => {
297
+ const items = workflows.map((w) => `${w.name} — ${w.description.slice(0, 80)}`);
298
+ await ctx.ui.select("Available Workflows", items);
299
+ },
300
+ });
301
+ }
@@ -0,0 +1,75 @@
1
+ # pi-guard Configuration Example for This Kit
2
+ #
3
+ # This file shows recommended guard rules for projects using the ockit-mapping kit.
4
+ # Copy the `guard` block into your project's `.pi/settings.json` or merge into
5
+ # `~/.pi/agent/settings.json` (global).
6
+ #
7
+ # Rule format: action is one of "allow", "ask", "deny"
8
+ # - "allow": silently permit
9
+ # - "ask": prompt user for confirmation
10
+ # - "deny": block with error message
11
+ #
12
+ # Match priority: most specific rule wins. Subsequence matching for bash means
13
+ # tokens must appear in order but extra args are allowed.
14
+ #
15
+ # Reference: https://github.com/jdiamond/pi-guard
16
+
17
+ {
18
+ "guard": {
19
+ "enabled": true,
20
+ "rules": {
21
+ "*": "ask",
22
+ "bash": {
23
+ "*": "ask",
24
+ "git status": "allow",
25
+ "git log": "allow",
26
+ "git diff": "allow",
27
+ "git show": "allow",
28
+ "ls": "allow",
29
+ "pwd": "allow",
30
+ "cat *": "allow",
31
+ "echo *": "allow",
32
+ "rm *": "deny",
33
+ "rm -rf *": "deny",
34
+ "sudo *": "deny",
35
+ "curl * | bash": "deny",
36
+ "wget * | bash": "deny",
37
+ "git push": "ask",
38
+ "git push --force": "deny",
39
+ "git reset --hard": "deny",
40
+ "git clean -fd": "deny",
41
+ "npm publish": "deny",
42
+ "cat *.env*": "deny",
43
+ "cat .env": "deny"
44
+ },
45
+ "read": {
46
+ "*": "allow",
47
+ "**/*.env": "deny",
48
+ "**/*.env.*": "deny",
49
+ "**/*.pem": "deny",
50
+ "**/*.key": "deny",
51
+ "**/secrets/*": "deny"
52
+ },
53
+ "write": {
54
+ "*": "ask",
55
+ ".pi/artifacts/**": "allow",
56
+ ".pi/state/**": "allow",
57
+ ".pi/memory/**": "allow"
58
+ },
59
+ "edit": {
60
+ "*": "ask",
61
+ ".pi/**": "allow"
62
+ },
63
+ "spawn": {
64
+ "build": "allow",
65
+ "explore": "allow",
66
+ "general": "allow",
67
+ "plan": "allow",
68
+ "review": "allow",
69
+ "scout": "allow",
70
+ "vision": "allow",
71
+ "*": "deny"
72
+ }
73
+ }
74
+ }
75
+ }
@@ -0,0 +1,78 @@
1
+ ---
2
+ purpose: Index of slash commands with purpose, when-to-use, and lifecycle position
3
+ ---
4
+
5
+ # Prompts Index
6
+
7
+ 14 slash commands. Lifecycle is canonical; utilities attach at any phase.
8
+
9
+ ## Canonical Lifecycle
10
+
11
+ ```
12
+ ┌──── /init ────┐
13
+ │ ▼
14
+ /init → /create → /plan? → /ship ⇄ /verify
15
+ │ │ │
16
+ │ ▼ │
17
+ │ (tasks.json) │
18
+ │ │
19
+ └──── /close ←─────────────────┘
20
+
21
+ Utilities (any phase): /research /audit /fix /gc
22
+ Status: /status
23
+ ```
24
+
25
+ **Artifact chain:** `/init` → templates · `/create` → `spec.md` · `/plan` → `plan.md` + `tasks.json` · `/ship` → implementation + `progress.md` · `/verify` → `verify.log` · `/close` → clears `.active`.
26
+
27
+ ## Commands
28
+
29
+ | Command | Purpose | When to use | Arg-hint | Lifecycle |
30
+ |---------|---------|-------------|----------|-----------|
31
+ | `/init` | Bootstrap project: AGENTS.md + planning context + user profile | Once per project (or after stack change) | `[--deep] [--context\|--user\|--all] [--dry-run]` | Setup |
32
+ | `/create` | Create spec (PRD) + workspace + task outline | Starting a feature/fix with a description | `<desc> [--lite] [--dry-run]` | Define |
33
+ | `/plan` | Detailed implementation plan + tasks.json (optional, between create and ship) | Complex tasks needing TDD-step guidance | `[--level 0-3] [--dry-run]` | Plan |
34
+ | `/ship` | Execute tasks, verify, review, close | Ready to implement the spec | `[--skip-review] [--dry-run]` | Build/Ship |
35
+ | `/verify` | Check completeness/correctness/coherence against PRD | Before shipping, or anytime mid-implementation | `[path\|all] [--quick] [--full] [--fix] [--no-cache]` | Verify |
36
+ | `/fix` | Debug + fix a bug or failing test | Bug reported, test failing | `<desc> [--attach <file>] [--dry-run]` | Verify (utility) |
37
+ | `/research` | Gather info before implementation (direct or deep-research workflow) | Need external/codebase understanding | `<topic> [--quick\|--thorough] [--dry-run]` | Define (utility) |
38
+ | `/audit` | Find all occurrences of a pattern, review, remediate | Cross-cutting concern (auth, error handling) | `<pattern> [--scope <dir>] [--dry-run]` | Review (utility) |
39
+ | `/gc` | Fallow analysis + quality grades + optional cleanup PRs | Maintenance cadence; not during active feature work | `[--dry-run] [--apply] [--scope <dir>]` | Maintenance |
40
+ | `/status` | Show active feature, progress tail, blockers | Orient at session start or when unsure | `[--full]` | Any (read-only) |
41
+ | `/close` | Finalize active feature, clear `.active` | Feature done/blocked/abandoned, or recover dangling `.active` | `[--done\|--blocked\|--abandoned] [--note <text>]` | Ship/Recovery |
42
+ | `/loop-check` | NO-GO qualification gate — refuse-list + 2-condition test + 30s checklist | Before scheduling a task as an unattended loop | `<task description> [--help]` | Define |
43
+ | `/loop-init` | Scaffold `.pi/loops/<name>/` from templates (VISION/STATE/SKILL) | Once a task passes /loop-check | `<name> [--help]` | Define |
44
+ | `/loop-review` | Maker/checker gate — verifier subagent runs the gate, emits ACCEPT/REJECT | After a maker run, before ship | `<loop-name> [--help]` | Review |
45
+
46
+ ## When to use what
47
+
48
+ | Situation | Command |
49
+ |-----------|---------|
50
+ | Fresh repo, first session | `/init --all` |
51
+ | Existing repo, want codebase map | `/init --deep` then `/research` |
52
+ | "Build X" with a clear description | `/create "X"` → `/ship` |
53
+ | "Build X" but complex/multi-step | `/create "X"` → `/plan` → `/ship` |
54
+ | "Fix this bug / failing test" | `/fix "..."` |
55
+ | "How does X work / best practice for X" | `/research "X"` |
56
+ | "Find all console.log / auth checks" | `/audit "console.log"` |
57
+ | "Where am I / what's the state" | `/status` |
58
+ | Feature done but `/ship` left `.active` dangling | `/close --done` |
59
+ | Maintenance / dead code sweep | `/gc --dry-run` |
60
+ | Qualify a task as an unattended loop (refuse-list + 2-condition test) | `/loop-check "<task>"` (Define) |
61
+ | Scaffold a loop after /loop-check returns GO | `/loop-init <name>` (Define) |
62
+ | Maker/checker gate on a loop run before shipping | `/loop-review <name>` (Review) |
63
+
64
+ ## Conventions (shared across commands)
65
+
66
+ - **Parse Arguments** — every command accepts `--help` and `--dry-run`.
67
+ - **Guard Phase** — preconditions checked before work begins (existing artifacts, uncommitted changes, missing deps).
68
+ - **Load Skills** — each command names the skills it needs; full routing in `skills/INDEX.md`.
69
+ - **Failure Handling** — 2-failure rule: if verification fails twice on the same approach, stop and escalate.
70
+ - **Stop Conditions** — explicit list per command; never silently continue past a blocker.
71
+ - **Workflow invocation** — commands that need multi-agent parallelism call `run_workflow({ name, args })`, not manual workflow-file reading.
72
+ - **`.active` convention** — `.pi/artifacts/.active` holds the current feature slug; `/close` clears it.
73
+
74
+ ## Related
75
+
76
+ - `skills/INDEX.md` — task → skill routing (70 skills)
77
+ - `workflows/INDEX.md` — 6 DAG workflows invoked by commands
78
+ - `templates/` — 19 template files (PRD, plan body, state, roadmap, loop-vision, loop-state, orchestrators, etc.)
@@ -0,0 +1,109 @@
1
+ ---
2
+ description: Audit codebase for a specific pattern
3
+ argument-hint: "<pattern> [--scope <dir>] [--dry-run] [--help]"
4
+ ---
5
+
6
+ # Audit: $ARGUMENTS
7
+
8
+ Find all occurrences of a code pattern in the codebase, review each for issues, and produce prioritized remediation recommendations.
9
+
10
+ > Use for cross-cutting concerns like auth checks, error handling, API patterns, or security vulnerabilities.
11
+
12
+ ## Parse Arguments
13
+
14
+ | Argument | Default | Description |
15
+ | ------------ | -------- | ------------------------------------ |
16
+ | `<pattern>` | required | Code pattern to search for |
17
+ | `--scope` | `.` | Limit audit to specific directory |
18
+ | `--format` | markdown | Output format: `markdown` (default), `json`, `inline` |
19
+ | `--dry-run` | false | Search and count without reviewing or reporting |
20
+ | `--help` | false | Show this usage |
21
+
22
+ **Examples:**
23
+ - `/audit console.log` — Find all console.log statements
24
+ - `/audit app.use(` — Find all middleware registrations
25
+ - `/audit fetch(` — Find all fetch calls
26
+ - `/audit try {` — Find all try-catch blocks
27
+ - `/audit "await.*catch" --scope src/api` — Limit to src/api directory
28
+
29
+ ## Guard Phase
30
+
31
+ - Check `.pi/artifacts/.active` — if active slug exists, write report to that artifact directory
32
+ - If `.active` is missing, write report inline
33
+ - If `--dry-run`, skip guard and proceed to search only
34
+
35
+ ## Load Skills
36
+
37
+ | Skill | When | Why |
38
+ |-------|------|-----|
39
+ | `security-and-hardening` | Pattern involves auth, secrets, validation, input | Identify vulnerability patterns in audited code |
40
+ | `code-review-and-quality` | Occurrences > 5 | Assess correctness and structural quality across results |
41
+ | `fallow` | Occurrences > 20 or scope is project-wide | Structural analysis for dead code, duplication, complexity |
42
+
43
+ ## Execution
44
+
45
+ This command invokes the `audit-pattern` workflow via the `run_workflow` tool for multi-agent parallel execution.
46
+
47
+ ### Direct Execution (≤5 occurrences)
48
+
49
+ For small audits, execute directly without workflow overhead:
50
+ 1. Search with `semantic_grep`
51
+ 2. Read each occurrence
52
+ 3. Report findings inline
53
+
54
+ ### Workflow Execution (>5 occurrences)
55
+
56
+ 1. **Invoke the workflow:**
57
+ ```
58
+ run_workflow({ name: "audit-pattern", args: { pattern: "<pattern from $ARGUMENTS>", scope: "<--scope value or '.'>" } })
59
+ ```
60
+ 2. The workflow runner handles phase dispatch (explore → review) and placeholder substitution (`{pattern}`, `{phase_N_output}`).
61
+ 3. **Aggregate results** between phases as returned by the runner.
62
+ 4. **Write final report** to `.pi/artifacts/$SLUG/audit.md` (or inline if no active slug)
63
+
64
+ **Announce:** "Auditing codebase for pattern: [pattern]. Invoking audit-pattern workflow."
65
+
66
+ ## Failure Handling
67
+
68
+ | Scenario | Action |
69
+ |----------|--------|
70
+ | Workflow phase fails | Retry once with adjusted prompt, then escalate |
71
+ | No occurrences found | Report: "Pattern not found in codebase." |
72
+ | Audit timeout | Report partial results with what was covered |
73
+ | Subagent returns failure | Read error, retry once, then escalate |
74
+
75
+ ## Stop Conditions
76
+
77
+ - Pattern returns 0 occurrences → report, stop (not an error)
78
+ - Workflow phase fails 2x → stop, escalate with partial results
79
+ - Audit timeout → report partial findings, note uncovered scope
80
+ - `.active` slug missing → write inline report (not an error)
81
+
82
+ ## Output
83
+
84
+ 1. **Pattern:** [pattern searched]
85
+ 2. **Occurrences found:** [count]
86
+ 3. **Files affected:** [count]
87
+ 4. **Issues by severity:**
88
+ - Critical: [N]
89
+ - Important: [N]
90
+ - Minor: [N]
91
+ 5. **Recommended fixes:** [list with file:line refs]
92
+ 6. **Correct patterns:** [list of occurrences that are already correct]
93
+
94
+ > **Post-audit routing:** Individual issue remediation → `/fix`. Systematic cross-cutting fixes → `/create`.
95
+
96
+ ## Related Commands
97
+
98
+ | Need | Command |
99
+ | -------------- | ------------ |
100
+ | Research topic | `/research` |
101
+ | Create feature | `/create` |
102
+ | Fix a bug | `/fix` |
103
+ | Verify gates | `/verify` |
104
+
105
+ ## Related Skills
106
+
107
+ - `security-and-hardening` — vulnerability detection in audited code
108
+ - `code-review-and-quality` — correctness assessment of findings
109
+ - `fallow` — structural analysis for large-scale audits