@pikku/cli 0.12.82 → 0.12.85

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 (346) hide show
  1. package/cli.schema.json +1 -1
  2. package/console-app/assets/{index-ChcXIEhS.js → index-CEv-kj3J.js} +154 -147
  3. package/console-app/assets/index-CSzCJzBb.css +1 -0
  4. package/console-app/index.html +2 -2
  5. package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +4 -2
  6. package/dist/.pikku/auth/auth.types.d.ts +4 -0
  7. package/dist/.pikku/auth/auth.types.js +5 -0
  8. package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +1 -1
  9. package/dist/.pikku/channel/pikku-channel-types.gen.js +1 -1
  10. package/dist/.pikku/cli/pikku-cli-channel.d.ts +4 -4
  11. package/dist/.pikku/cli/pikku-cli-channel.js +21 -1
  12. package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +1 -1
  13. package/dist/.pikku/cli/pikku-cli-client.gen.js +1 -1
  14. package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.d.ts +1 -1
  15. package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.js +1 -1
  16. package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +1 -1
  17. package/dist/.pikku/cli/pikku-cli-types.gen.js +1 -1
  18. package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.js +1 -1
  19. package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.json +60 -3
  20. package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +1 -1
  21. package/dist/.pikku/cli/pikku-cli-wirings.gen.js +1 -1
  22. package/dist/.pikku/cli/pikku-cli.gen.d.ts +1 -1
  23. package/dist/.pikku/cli/pikku-cli.gen.js +1 -1
  24. package/dist/.pikku/console/pikku-node-types.gen.d.ts +1 -1
  25. package/dist/.pikku/function/pikku-function-types.gen.d.ts +29 -25
  26. package/dist/.pikku/function/pikku-function-types.gen.js +3 -12
  27. package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
  28. package/dist/.pikku/function/pikku-functions-meta.gen.json +195 -32
  29. package/dist/.pikku/function/pikku-functions.gen.js +15 -3
  30. package/dist/.pikku/http/pikku-http-types.gen.d.ts +2 -24
  31. package/dist/.pikku/http/pikku-http-types.gen.js +2 -24
  32. package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +1 -1
  33. package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
  34. package/dist/.pikku/pikku-bootstrap.gen.d.ts +1 -5
  35. package/dist/.pikku/pikku-bootstrap.gen.js +1 -5
  36. package/dist/.pikku/pikku-meta-service.gen.d.ts +1 -1
  37. package/dist/.pikku/pikku-meta-service.gen.js +1 -1
  38. package/dist/.pikku/pikku-services.gen.d.ts +4 -1
  39. package/dist/.pikku/pikku-services.gen.js +3 -0
  40. package/dist/.pikku/pikku-types.gen.d.ts +2 -1
  41. package/dist/.pikku/pikku-types.gen.js +3 -1
  42. package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +1 -1
  43. package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -1
  44. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +1 -1
  45. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +10 -2
  46. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +1 -1
  47. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
  48. package/dist/.pikku/schemas/register.gen.js +13 -7
  49. package/dist/.pikku/schemas/schemas/PikkuCLIConfig.schema.json +1 -1
  50. package/dist/.pikku/schemas/schemas/PikkuGraphWiringsOutput.schema.json +1 -0
  51. package/dist/.pikku/schemas/schemas/PikkuImportN8nInput.schema.json +1 -0
  52. package/dist/.pikku/schemas/schemas/PikkuScopesInput.schema.json +1 -0
  53. package/dist/.pikku/schemas/schemas/PikkuWebhookOutput.schema.json +1 -0
  54. package/dist/.pikku/schemas/schemas/ScopesAuditInput.schema.json +1 -0
  55. package/dist/.pikku/schemas/schemas/ScopesPruneInput.schema.json +1 -0
  56. package/dist/.pikku/scopes/pikku-scope-types.gen.d.ts +5 -0
  57. package/dist/.pikku/scopes/pikku-scope-types.gen.js +4 -0
  58. package/dist/.pikku/scopes/pikku-scopes-meta.gen.json +1 -0
  59. package/dist/.pikku/scopes/pikku-scopes.gen.d.ts +35 -0
  60. package/dist/.pikku/scopes/pikku-scopes.gen.js +27 -0
  61. package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +1 -1
  62. package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
  63. package/dist/.pikku/secrets/pikku-secrets-meta.gen.json +1 -0
  64. package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +11 -1
  65. package/dist/.pikku/secrets/pikku-secrets.gen.js +11 -1
  66. package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +1 -1
  67. package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
  68. package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +1 -1
  69. package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
  70. package/dist/.pikku/variables/pikku-variables-meta.gen.json +1 -0
  71. package/dist/.pikku/variables/pikku-variables.gen.d.ts +11 -1
  72. package/dist/.pikku/variables/pikku-variables.gen.js +13 -3
  73. package/dist/.pikku/workflow/meta/allWorkflow.gen.json +49 -7
  74. package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +11 -2
  75. package/dist/.pikku/workflow/pikku-workflow-types.gen.js +1 -1
  76. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
  77. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
  78. package/dist/bin/pikku-bin.mjs +2 -2
  79. package/dist/src/cli.wiring.js +47 -4
  80. package/dist/src/deploy/analyzer/analyzer.js +6 -0
  81. package/dist/src/fabric/fabric-commands.d.ts +53 -53
  82. package/dist/src/fabric/functions/add.function.d.ts +2 -2
  83. package/dist/src/fabric/functions/addon-verify.function.d.ts +2 -2
  84. package/dist/src/fabric/functions/db-schema.function.d.ts +2 -2
  85. package/dist/src/fabric/functions/deploy-list.function.d.ts +2 -2
  86. package/dist/src/fabric/functions/deploy-units.function.d.ts +2 -2
  87. package/dist/src/fabric/functions/deploy.function.d.ts +4 -4
  88. package/dist/src/fabric/functions/domains-add.function.d.ts +2 -2
  89. package/dist/src/fabric/functions/domains-list.function.d.ts +2 -2
  90. package/dist/src/fabric/functions/domains-remove.function.d.ts +2 -2
  91. package/dist/src/fabric/functions/errors.function.d.ts +2 -2
  92. package/dist/src/fabric/functions/init.function.d.ts +2 -2
  93. package/dist/src/fabric/functions/link.function.d.ts +2 -2
  94. package/dist/src/fabric/functions/llm-key.function.d.ts +6 -6
  95. package/dist/src/fabric/functions/login.function.d.ts +2 -2
  96. package/dist/src/fabric/functions/logs.function.d.ts +2 -2
  97. package/dist/src/fabric/functions/metrics.function.d.ts +2 -2
  98. package/dist/src/fabric/functions/publish.function.d.ts +2 -2
  99. package/dist/src/fabric/functions/rollback.function.d.ts +2 -2
  100. package/dist/src/fabric/functions/secrets-list.function.d.ts +2 -2
  101. package/dist/src/fabric/functions/secrets-set.function.d.ts +2 -2
  102. package/dist/src/fabric/functions/smoke.function.d.ts +2 -2
  103. package/dist/src/fabric/functions/status.function.d.ts +2 -2
  104. package/dist/src/fabric/functions/trace.function.d.ts +2 -2
  105. package/dist/src/fabric/functions/validate.function.d.ts +2 -2
  106. package/dist/src/functions/commands/all.d.ts +1 -1
  107. package/dist/src/functions/commands/audit.d.ts +1 -1
  108. package/dist/src/functions/commands/binary.d.ts +2 -2
  109. package/dist/src/functions/commands/bootstrap.d.ts +1 -1
  110. package/dist/src/functions/commands/bootstrap.js +3 -0
  111. package/dist/src/functions/commands/db-audit.d.ts +1 -1
  112. package/dist/src/functions/commands/db-generate.d.ts +1 -1
  113. package/dist/src/functions/commands/db-migrate.d.ts +1 -1
  114. package/dist/src/functions/commands/db-reset.d.ts +1 -1
  115. package/dist/src/functions/commands/db-seed.d.ts +1 -1
  116. package/dist/src/functions/commands/deploy-apply.d.ts +2 -2
  117. package/dist/src/functions/commands/deploy-info.d.ts +1 -1
  118. package/dist/src/functions/commands/deploy-plan.d.ts +2 -2
  119. package/dist/src/functions/commands/dev.d.ts +2 -2
  120. package/dist/src/functions/commands/dev.js +14 -3
  121. package/dist/src/functions/commands/emails-init.d.ts +1 -1
  122. package/dist/src/functions/commands/enable.d.ts +8 -7
  123. package/dist/src/functions/commands/enable.js +10 -5
  124. package/dist/src/functions/commands/import-n8n.d.ts +10 -0
  125. package/dist/src/functions/commands/import-n8n.js +130 -0
  126. package/dist/src/functions/commands/info.d.ts +4 -4
  127. package/dist/src/functions/commands/info.js +0 -13
  128. package/dist/src/functions/commands/login.d.ts +5 -5
  129. package/dist/src/functions/commands/meta.d.ts +25 -25
  130. package/dist/src/functions/commands/new-addon.d.ts +13 -2
  131. package/dist/src/functions/commands/new-addon.js +71 -39
  132. package/dist/src/functions/commands/new-function.d.ts +2 -2
  133. package/dist/src/functions/commands/new-middleware.d.ts +2 -2
  134. package/dist/src/functions/commands/new-permission.d.ts +2 -2
  135. package/dist/src/functions/commands/new-wiring.d.ts +2 -2
  136. package/dist/src/functions/commands/pikku-command-bootstrap.d.ts +1 -1
  137. package/dist/src/functions/commands/pikku-command-bootstrap.js +6 -0
  138. package/dist/src/functions/commands/pikku-command-summary.d.ts +1 -1
  139. package/dist/src/functions/commands/scenario.d.ts +3 -3
  140. package/dist/src/functions/commands/scopes-audit.d.ts +1 -0
  141. package/dist/src/functions/commands/scopes-audit.js +37 -0
  142. package/dist/src/functions/commands/scopes-prune.d.ts +14 -0
  143. package/dist/src/functions/commands/scopes-prune.js +50 -0
  144. package/dist/src/functions/commands/scopes-shared.d.ts +39 -0
  145. package/dist/src/functions/commands/scopes-shared.js +83 -0
  146. package/dist/src/functions/commands/serve.d.ts +2 -2
  147. package/dist/src/functions/commands/serve.js +4 -2
  148. package/dist/src/functions/commands/skills.d.ts +4 -4
  149. package/dist/src/functions/commands/skills.js +18 -10
  150. package/dist/src/functions/commands/versions-check.d.ts +1 -1
  151. package/dist/src/functions/commands/versions-init.d.ts +2 -2
  152. package/dist/src/functions/commands/versions-update.d.ts +1 -1
  153. package/dist/src/functions/commands/watch.d.ts +2 -2
  154. package/dist/src/functions/commands/workspace-validate.d.ts +2 -2
  155. package/dist/src/functions/runtimes/fetch/index.d.ts +1 -1
  156. package/dist/src/functions/runtimes/nextjs/pikku-command-nextjs.d.ts +1 -1
  157. package/dist/src/functions/runtimes/tanstack-start/pikku-command-tanstack-start.d.ts +1 -1
  158. package/dist/src/functions/runtimes/websocket/pikku-command-websocket-typed.d.ts +1 -1
  159. package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent-types.d.ts +1 -1
  160. package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent-types.js +3 -2
  161. package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent.d.ts +1 -1
  162. package/dist/src/functions/wirings/ai-agent/pikku-command-public-agent.d.ts +1 -1
  163. package/dist/src/functions/wirings/ai-agent/serialize-ai-agent-types.d.ts +1 -1
  164. package/dist/src/functions/wirings/ai-agent/serialize-ai-agent-types.js +4 -2
  165. package/dist/src/functions/wirings/ai-agent/serialize-public-agent.js +55 -16
  166. package/dist/src/functions/wirings/auth/pikku-command-auth.d.ts +2 -2
  167. package/dist/src/functions/wirings/channels/pikku-channels.d.ts +1 -1
  168. package/dist/src/functions/wirings/channels/pikku-command-channel-types.d.ts +1 -1
  169. package/dist/src/functions/wirings/channels/pikku-command-channels-map.d.ts +1 -1
  170. package/dist/src/functions/wirings/channels/pikku-command-channels.d.ts +1 -1
  171. package/dist/src/functions/wirings/cli/pikku-command-cli-entry.d.ts +1 -1
  172. package/dist/src/functions/wirings/cli/pikku-command-cli-types.d.ts +1 -1
  173. package/dist/src/functions/wirings/cli/pikku-command-cli.d.ts +1 -1
  174. package/dist/src/functions/wirings/console/pikku-command-console-functions.d.ts +1 -1
  175. package/dist/src/functions/wirings/console/pikku-command-node-types.d.ts +1 -1
  176. package/dist/src/functions/wirings/console/pikku-command-nodes-meta.d.ts +1 -1
  177. package/dist/src/functions/wirings/console/serialize-console-functions.js +6 -0
  178. package/dist/src/functions/wirings/credentials/pikku-command-credentials.d.ts +1 -1
  179. package/dist/src/functions/wirings/credentials/serialize-credentials-types.js +22 -0
  180. package/dist/src/functions/wirings/emails/pikku-command-emails.d.ts +1 -1
  181. package/dist/src/functions/wirings/functions/pikku-command-addon-types.d.ts +1 -1
  182. package/dist/src/functions/wirings/functions/pikku-command-function-types-split.d.ts +2 -2
  183. package/dist/src/functions/wirings/functions/pikku-command-function-types-split.js +1 -1
  184. package/dist/src/functions/wirings/functions/pikku-command-function-types.d.ts +2 -2
  185. package/dist/src/functions/wirings/functions/pikku-command-function-types.js +2 -2
  186. package/dist/src/functions/wirings/functions/pikku-command-functions.d.ts +1 -1
  187. package/dist/src/functions/wirings/functions/pikku-command-services.d.ts +2 -2
  188. package/dist/src/functions/wirings/functions/pikku-command-services.js +9 -2
  189. package/dist/src/functions/wirings/functions/schemas.d.ts +1 -1
  190. package/dist/src/functions/wirings/functions/serialize-function-types.d.ts +1 -1
  191. package/dist/src/functions/wirings/functions/serialize-function-types.js +37 -28
  192. package/dist/src/functions/wirings/functions/serialize-pikku-types-hub.d.ts +1 -1
  193. package/dist/src/functions/wirings/functions/serialize-pikku-types-hub.js +6 -2
  194. package/dist/src/functions/wirings/gateway/pikku-command-gateway.d.ts +1 -1
  195. package/dist/src/functions/wirings/graph/pikku-command-graph-wirings.d.ts +1 -0
  196. package/dist/src/functions/wirings/graph/pikku-command-graph-wirings.js +21 -0
  197. package/dist/src/functions/wirings/graph/serialize-graph-wirings.d.ts +5 -0
  198. package/dist/src/functions/wirings/graph/serialize-graph-wirings.js +14 -0
  199. package/dist/src/functions/wirings/http/pikku-command-http-map.d.ts +1 -1
  200. package/dist/src/functions/wirings/http/pikku-command-http-routes.d.ts +1 -1
  201. package/dist/src/functions/wirings/http/pikku-command-http-types.d.ts +1 -1
  202. package/dist/src/functions/wirings/http/pikku-command-openapi.d.ts +1 -1
  203. package/dist/src/functions/wirings/http/pikku-http-routes.d.ts +1 -1
  204. package/dist/src/functions/wirings/http/serialize-http-types.js +2 -30
  205. package/dist/src/functions/wirings/mcp/pikku-command-mcp-json.d.ts +1 -1
  206. package/dist/src/functions/wirings/mcp/pikku-command-mcp-types.d.ts +1 -1
  207. package/dist/src/functions/wirings/mcp/pikku-command-mcp.d.ts +1 -1
  208. package/dist/src/functions/wirings/middleware/pikku-command-middleware.d.ts +1 -1
  209. package/dist/src/functions/wirings/package/pikku-command-package-types.d.ts +3 -2
  210. package/dist/src/functions/wirings/package/pikku-command-package-types.js +14 -1
  211. package/dist/src/functions/wirings/package/pikku-command-package.d.ts +1 -1
  212. package/dist/src/functions/wirings/package/serialize-package-types.d.ts +1 -0
  213. package/dist/src/functions/wirings/package/serialize-package-types.js +5 -0
  214. package/dist/src/functions/wirings/permissions/pikku-command-permissions.d.ts +1 -1
  215. package/dist/src/functions/wirings/permissions/pikku-command-permissions.js +1 -3
  216. package/dist/src/functions/wirings/permissions/serialize-permissions-imports.d.ts +6 -1
  217. package/dist/src/functions/wirings/permissions/serialize-permissions-imports.js +7 -64
  218. package/dist/src/functions/wirings/queue/pikku-command-queue-map.d.ts +1 -1
  219. package/dist/src/functions/wirings/queue/pikku-command-queue-service.d.ts +1 -1
  220. package/dist/src/functions/wirings/queue/pikku-command-queue-types.d.ts +1 -1
  221. package/dist/src/functions/wirings/queue/pikku-command-queue.d.ts +1 -1
  222. package/dist/src/functions/wirings/queue/pikku-queue-map.d.ts +1 -1
  223. package/dist/src/functions/wirings/queue/pikku-queue.d.ts +1 -1
  224. package/dist/src/functions/wirings/realtime/pikku-command-events-scaffold.d.ts +1 -1
  225. package/dist/src/functions/wirings/realtime/pikku-command-realtime.d.ts +1 -1
  226. package/dist/src/functions/wirings/rpc/pikku-command-public-rpc.d.ts +1 -1
  227. package/dist/src/functions/wirings/rpc/pikku-command-react-query.d.ts +1 -1
  228. package/dist/src/functions/wirings/rpc/pikku-command-remote-rpc.d.ts +1 -1
  229. package/dist/src/functions/wirings/rpc/pikku-command-rpc-client.d.ts +1 -1
  230. package/dist/src/functions/wirings/rpc/pikku-command-rpc-map.d.ts +7 -2
  231. package/dist/src/functions/wirings/rpc/pikku-command-rpc-map.js +20 -0
  232. package/dist/src/functions/wirings/rpc/pikku-command-rpc.d.ts +1 -1
  233. package/dist/src/functions/wirings/rpc/serialize-typed-rpc-map.d.ts +1 -0
  234. package/dist/src/functions/wirings/rpc/serialize-typed-rpc-map.js +8 -3
  235. package/dist/src/functions/wirings/scenarios/pikku-command-scenario-functions.d.ts +1 -1
  236. package/dist/src/functions/wirings/scheduler/pikku-command-scheduler-types.d.ts +1 -1
  237. package/dist/src/functions/wirings/scheduler/pikku-command-scheduler.d.ts +1 -1
  238. package/dist/src/functions/wirings/scopes/pikku-command-scopes.d.ts +7 -0
  239. package/dist/src/functions/wirings/scopes/pikku-command-scopes.js +34 -0
  240. package/dist/src/functions/wirings/scopes/serialize-scopes-types.d.ts +15 -0
  241. package/dist/src/functions/wirings/scopes/serialize-scopes-types.js +86 -0
  242. package/dist/src/functions/wirings/secrets/pikku-command-secrets.d.ts +1 -1
  243. package/dist/src/functions/wirings/secrets/serialize-secrets-types.js +13 -0
  244. package/dist/src/functions/wirings/triggers/pikku-command-trigger-types.d.ts +2 -2
  245. package/dist/src/functions/wirings/triggers/pikku-command-trigger.d.ts +1 -1
  246. package/dist/src/functions/wirings/variables/pikku-command-variables.d.ts +1 -1
  247. package/dist/src/functions/wirings/variables/serialize-variables-types.js +15 -2
  248. package/dist/src/functions/wirings/webhook/pikku-command-webhook.d.ts +1 -0
  249. package/dist/src/functions/wirings/webhook/pikku-command-webhook.js +25 -0
  250. package/dist/src/functions/wirings/webhook/serialize-webhook.d.ts +14 -0
  251. package/dist/src/functions/wirings/webhook/serialize-webhook.js +34 -0
  252. package/dist/src/functions/wirings/workflow/pikku-command-workflow-routes.d.ts +1 -1
  253. package/dist/src/functions/wirings/workflow/pikku-command-workflow.d.ts +1 -1
  254. package/dist/src/functions/wirings/workflow/pikku-command-workflow.js +2 -1
  255. package/dist/src/functions/wirings/workflow/serialize-workflow-routes.js +29 -0
  256. package/dist/src/functions/wirings/workflow/serialize-workflow-types.d.ts +1 -1
  257. package/dist/src/functions/wirings/workflow/serialize-workflow-types.js +11 -2
  258. package/dist/src/functions/workflows/all.workflow.js +23 -3
  259. package/dist/src/services.d.ts +1 -0
  260. package/dist/src/services.js +1 -0
  261. package/dist/src/utils/pikku-cli-config.js +20 -0
  262. package/dist/tsconfig.tsbuildinfo +1 -1
  263. package/package.json +9 -8
  264. package/skills/pikku-addon/SKILL.md +7 -3
  265. package/skills/pikku-ai-agent/SKILL.md +9 -6
  266. package/skills/pikku-ai-vercel/SKILL.md +6 -3
  267. package/skills/pikku-ai-voice/SKILL.md +6 -3
  268. package/skills/pikku-audit/SKILL.md +10 -3
  269. package/skills/pikku-aws/SKILL.md +9 -5
  270. package/skills/pikku-backblaze/SKILL.md +4 -3
  271. package/skills/pikku-better-auth/SKILL.md +10 -5
  272. package/skills/pikku-cli/SKILL.md +6 -3
  273. package/skills/pikku-concepts/SKILL.md +9 -4
  274. package/skills/pikku-concepts/references/concept-mapping.md +12 -10
  275. package/skills/pikku-config/SKILL.md +9 -5
  276. package/skills/pikku-cron/SKILL.md +6 -3
  277. package/skills/pikku-deploy-azure/SKILL.md +5 -3
  278. package/skills/pikku-deploy-cloudflare/SKILL.md +5 -3
  279. package/skills/pikku-deploy-express/SKILL.md +6 -3
  280. package/skills/pikku-deploy-fastify/SKILL.md +6 -3
  281. package/skills/pikku-deploy-lambda/SKILL.md +6 -3
  282. package/skills/pikku-deploy-nextjs/SKILL.md +5 -3
  283. package/skills/pikku-deploy-uws/SKILL.md +7 -4
  284. package/skills/pikku-deps/SKILL.md +13 -6
  285. package/skills/pikku-emails/SKILL.md +10 -5
  286. package/skills/pikku-feature/SKILL.md +1 -1
  287. package/skills/pikku-gateway-slack/SKILL.md +6 -3
  288. package/skills/pikku-http/SKILL.md +15 -21
  289. package/skills/pikku-http/references/http-options.md +0 -2
  290. package/skills/pikku-info/SKILL.md +9 -4
  291. package/skills/pikku-jose/SKILL.md +6 -3
  292. package/skills/pikku-kysely/SKILL.md +13 -5
  293. package/skills/pikku-machine-auth/SKILL.md +9 -3
  294. package/skills/pikku-mcp/SKILL.md +7 -3
  295. package/skills/pikku-middleware/SKILL.md +11 -6
  296. package/skills/pikku-mongodb/SKILL.md +8 -5
  297. package/skills/pikku-n8n-import/SKILL.md +109 -0
  298. package/skills/pikku-n8n-import/SPEC.md +84 -0
  299. package/skills/pikku-n8n-import/references/addon-mapping.md +121 -0
  300. package/skills/pikku-n8n-import/references/code-translation.md +121 -0
  301. package/skills/pikku-n8n-import/references/loops-and-control.md +87 -0
  302. package/skills/pikku-permissions/SKILL.md +26 -15
  303. package/skills/pikku-pino/SKILL.md +5 -3
  304. package/skills/pikku-product-second-opinion/README.md +43 -0
  305. package/skills/pikku-product-second-opinion/SKILL.md +158 -0
  306. package/skills/pikku-product-second-opinion/example/sample-report.md +90 -0
  307. package/skills/pikku-product-second-opinion/references/report-template.md +73 -0
  308. package/skills/pikku-queue/SKILL.md +7 -4
  309. package/skills/pikku-redis/SKILL.md +9 -6
  310. package/skills/pikku-rpc/SKILL.md +7 -4
  311. package/skills/pikku-rtl/SKILL.md +1 -1
  312. package/skills/pikku-scenario/SKILL.md +215 -0
  313. package/skills/pikku-schedule/SKILL.md +6 -3
  314. package/skills/pikku-schema-ajv/SKILL.md +5 -3
  315. package/skills/pikku-schema-cfworker/SKILL.md +6 -3
  316. package/skills/pikku-security/SKILL.md +8 -4
  317. package/skills/pikku-services/SKILL.md +42 -4
  318. package/skills/pikku-software-archaeology/README.md +70 -0
  319. package/skills/pikku-software-archaeology/SKILL.md +186 -0
  320. package/skills/pikku-software-archaeology/references/blueprint.schema.json +625 -0
  321. package/skills/pikku-software-archaeology/references/pikku-mapping.md +49 -0
  322. package/skills/pikku-software-archaeology/scripts/validate.mjs +173 -0
  323. package/skills/pikku-template-clone/SKILL.md +1 -1
  324. package/skills/pikku-trigger/SKILL.md +7 -3
  325. package/skills/pikku-versioning/SKILL.md +7 -3
  326. package/skills/pikku-websocket/SKILL.md +8 -4
  327. package/skills/pikku-workflow/SKILL.md +7 -3
  328. package/skills/pikku-ws/SKILL.md +5 -3
  329. package/console-app/assets/index-DwyRdRuZ.css +0 -1
  330. package/dist/.pikku/http/pikku-http-wirings-meta.gen.d.ts +0 -1
  331. package/dist/.pikku/http/pikku-http-wirings-meta.gen.js +0 -6
  332. package/dist/.pikku/http/pikku-http-wirings-meta.gen.json +0 -26
  333. package/dist/.pikku/http/pikku-http-wirings.gen.d.ts +0 -4
  334. package/dist/.pikku/http/pikku-http-wirings.gen.js +0 -5
  335. package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.d.ts +0 -1
  336. package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.js +0 -6
  337. package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.json +0 -10
  338. package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.d.ts +0 -4
  339. package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.js +0 -5
  340. package/dist/.pikku/schemas/schemas/RemoteRPCHandlerInput.schema.json +0 -1
  341. package/dist/src/scaffold/rpc-remote.gen.d.ts +0 -10
  342. package/dist/src/scaffold/rpc-remote.gen.js +0 -27
  343. package/skills/pikku-n8n-addon-map/SKILL.md +0 -178
  344. package/skills/pikku-n8n-code-translate/SKILL.md +0 -166
  345. package/skills/pikku-testing/SKILL.md +0 -328
  346. package/skills/pikku-testing/references/cucumber-bdd-testing.md +0 -176
@@ -0,0 +1,625 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "Product Blueprint (.knowledge/) contract",
4
+ "description": "One schema per output file, keyed by filename under the `files` map. Every extracted concept carries evidence[] and confidence. Facts (observed in code) and inferences (reconstructed intent) must never be merged silently: confidence expresses how directly the evidence supports the claim.",
5
+ "$defs": {
6
+ "evidence": {
7
+ "type": "array",
8
+ "minItems": 1,
9
+ "items": {
10
+ "type": "object",
11
+ "required": ["file", "lines"],
12
+ "properties": {
13
+ "file": { "type": "string", "description": "repo-relative path" },
14
+ "lines": { "type": "string", "description": "e.g. '42' or '42-58'" },
15
+ "note": { "type": "string", "description": "what this location shows" }
16
+ }
17
+ }
18
+ },
19
+ "confidence": {
20
+ "type": "string",
21
+ "enum": ["high", "medium", "low"],
22
+ "description": "high = behavior directly observed in code/schema; medium = strong inference from multiple signals; low = plausible guess, needs human confirmation"
23
+ },
24
+ "conceptName": {
25
+ "type": "string",
26
+ "pattern": "^[A-Z][A-Za-z0-9]*$",
27
+ "description": "PascalCase domain-language name (SendInvoice, InvoicePaid), never a route or filename"
28
+ }
29
+ },
30
+ "files": {
31
+ "product.json": {
32
+ "type": "object",
33
+ "required": ["name", "purpose", "actors", "capabilities", "terminology", "evidence", "confidence"],
34
+ "properties": {
35
+ "name": { "type": "string" },
36
+ "purpose": { "type": "string", "description": "1-3 sentences: what problem, for whom" },
37
+ "targetUsers": { "type": "array", "items": { "type": "string" } },
38
+ "actors": {
39
+ "type": "array",
40
+ "minItems": 1,
41
+ "items": {
42
+ "type": "object",
43
+ "required": ["name", "kind", "description"],
44
+ "properties": {
45
+ "name": { "type": "string" },
46
+ "kind": { "type": "string", "enum": ["human", "system", "external"] },
47
+ "description": { "type": "string" }
48
+ }
49
+ }
50
+ },
51
+ "capabilities": { "type": "array", "minItems": 1, "items": { "type": "string" } },
52
+ "terminology": {
53
+ "type": "array",
54
+ "items": {
55
+ "type": "object",
56
+ "required": ["term", "meaning"],
57
+ "properties": { "term": { "type": "string" }, "meaning": { "type": "string" } }
58
+ }
59
+ },
60
+ "evidence": { "$ref": "#/$defs/evidence" },
61
+ "confidence": { "$ref": "#/$defs/confidence" }
62
+ }
63
+ },
64
+ "domains.json": {
65
+ "type": "object",
66
+ "required": ["domains"],
67
+ "properties": {
68
+ "domains": {
69
+ "type": "array",
70
+ "minItems": 1,
71
+ "items": {
72
+ "type": "object",
73
+ "required": ["name", "description", "entities", "commands", "queries", "events", "evidence", "confidence"],
74
+ "properties": {
75
+ "name": { "$ref": "#/$defs/conceptName" },
76
+ "description": { "type": "string" },
77
+ "entities": { "type": "array", "items": { "$ref": "#/$defs/conceptName" } },
78
+ "commands": { "type": "array", "items": { "$ref": "#/$defs/conceptName" } },
79
+ "queries": { "type": "array", "items": { "$ref": "#/$defs/conceptName" } },
80
+ "events": { "type": "array", "items": { "$ref": "#/$defs/conceptName" } },
81
+ "policies": { "type": "array", "items": { "$ref": "#/$defs/conceptName" }, "description": "policy names from policies.json owned by this domain" },
82
+ "sourcePaths": { "type": "array", "items": { "type": "string" }, "description": "where this domain currently lives (usually scattered)" },
83
+ "evidence": { "$ref": "#/$defs/evidence" },
84
+ "confidence": { "$ref": "#/$defs/confidence" }
85
+ }
86
+ }
87
+ }
88
+ }
89
+ },
90
+ "entities.json": {
91
+ "type": "object",
92
+ "required": ["entities"],
93
+ "properties": {
94
+ "entities": {
95
+ "type": "array",
96
+ "items": {
97
+ "type": "object",
98
+ "required": ["name", "domain", "description", "attributes", "evidence", "confidence"],
99
+ "properties": {
100
+ "name": { "$ref": "#/$defs/conceptName" },
101
+ "domain": { "$ref": "#/$defs/conceptName" },
102
+ "description": { "type": "string" },
103
+ "attributes": {
104
+ "type": "array",
105
+ "items": {
106
+ "type": "object",
107
+ "required": ["name", "type"],
108
+ "properties": {
109
+ "name": { "type": "string" },
110
+ "type": { "type": "string" },
111
+ "required": { "type": "boolean" },
112
+ "notes": { "type": "string" }
113
+ }
114
+ }
115
+ },
116
+ "relationships": {
117
+ "type": "array",
118
+ "items": {
119
+ "type": "object",
120
+ "required": ["kind", "target"],
121
+ "properties": {
122
+ "kind": { "type": "string", "enum": ["belongs-to", "has-many", "has-one", "references", "many-to-many"] },
123
+ "target": { "$ref": "#/$defs/conceptName" },
124
+ "description": { "type": "string" }
125
+ }
126
+ }
127
+ },
128
+ "states": { "type": "array", "items": { "type": "string" } },
129
+ "transitions": {
130
+ "type": "array",
131
+ "items": {
132
+ "type": "object",
133
+ "required": ["from", "to", "trigger"],
134
+ "properties": {
135
+ "from": { "type": "string" },
136
+ "to": { "type": "string" },
137
+ "trigger": { "type": "string", "description": "command or event name that causes it" }
138
+ }
139
+ }
140
+ },
141
+ "ownership": { "type": "string", "description": "which actor/tenant owns rows of this entity" },
142
+ "constraints": { "type": "array", "items": { "type": "string" } },
143
+ "evidence": { "$ref": "#/$defs/evidence" },
144
+ "confidence": { "$ref": "#/$defs/confidence" }
145
+ }
146
+ }
147
+ }
148
+ }
149
+ },
150
+ "commands.json": {
151
+ "type": "object",
152
+ "required": ["commands"],
153
+ "properties": {
154
+ "commands": {
155
+ "type": "array",
156
+ "items": {
157
+ "type": "object",
158
+ "required": ["name", "domain", "actor", "input", "preconditions", "effects", "eventsProduced", "evidence", "confidence"],
159
+ "properties": {
160
+ "name": { "$ref": "#/$defs/conceptName", "description": "imperative VerbNoun: ApproveInvoice" },
161
+ "domain": { "$ref": "#/$defs/conceptName" },
162
+ "actor": { "type": "string" },
163
+ "trigger": { "type": "string", "description": "how it is invoked today (route, job, webhook, cron)" },
164
+ "input": {
165
+ "type": "array",
166
+ "items": {
167
+ "type": "object",
168
+ "required": ["name", "type"],
169
+ "properties": {
170
+ "name": { "type": "string" },
171
+ "type": { "type": "string" },
172
+ "required": { "type": "boolean" }
173
+ }
174
+ }
175
+ },
176
+ "preconditions": { "type": "array", "items": { "type": "string" } },
177
+ "effects": { "type": "array", "minItems": 1, "items": { "type": "string" } },
178
+ "eventsProduced": { "type": "array", "items": { "$ref": "#/$defs/conceptName" } },
179
+ "policies": { "type": "array", "items": { "type": "string" }, "description": "policy names from policies.json enforced here" },
180
+ "currentImplementation": { "type": "array", "items": { "type": "string" }, "description": "file paths implementing it today" },
181
+ "evidence": { "$ref": "#/$defs/evidence" },
182
+ "confidence": { "$ref": "#/$defs/confidence" }
183
+ }
184
+ }
185
+ }
186
+ }
187
+ },
188
+ "queries.json": {
189
+ "type": "object",
190
+ "required": ["queries"],
191
+ "properties": {
192
+ "queries": {
193
+ "type": "array",
194
+ "items": {
195
+ "type": "object",
196
+ "required": ["name", "domain", "actor", "description", "returns", "evidence", "confidence"],
197
+ "properties": {
198
+ "name": { "$ref": "#/$defs/conceptName", "description": "GetX / ListX / SearchX" },
199
+ "domain": { "$ref": "#/$defs/conceptName" },
200
+ "actor": { "type": "string" },
201
+ "description": { "type": "string" },
202
+ "input": {
203
+ "type": "array",
204
+ "items": {
205
+ "type": "object",
206
+ "required": ["name", "type"],
207
+ "properties": { "name": { "type": "string" }, "type": { "type": "string" }, "required": { "type": "boolean" } }
208
+ }
209
+ },
210
+ "returns": { "type": "string" },
211
+ "scoping": { "type": "string", "description": "tenancy/visibility rule applied (e.g. 'rows owned by caller only')" },
212
+ "evidence": { "$ref": "#/$defs/evidence" },
213
+ "confidence": { "$ref": "#/$defs/confidence" }
214
+ }
215
+ }
216
+ }
217
+ }
218
+ },
219
+ "events.json": {
220
+ "type": "object",
221
+ "required": ["events"],
222
+ "properties": {
223
+ "events": {
224
+ "type": "array",
225
+ "items": {
226
+ "type": "object",
227
+ "required": ["name", "domain", "description", "producedBy", "evidence", "confidence"],
228
+ "properties": {
229
+ "name": { "$ref": "#/$defs/conceptName", "description": "past-tense business fact: InvoicePaid. No technical events (ButtonClicked)." },
230
+ "domain": { "$ref": "#/$defs/conceptName" },
231
+ "description": { "type": "string" },
232
+ "producedBy": { "type": "array", "minItems": 1, "items": { "type": "string" }, "description": "command/workflow names" },
233
+ "consumedBy": { "type": "array", "items": { "type": "string" }, "description": "what reacts today (email send, status flip, webhook out)" },
234
+ "payloadHints": { "type": "array", "items": { "type": "string" } },
235
+ "explicit": { "type": "boolean", "description": "true if the code emits a real event; false if reconstructed from inline side-effects" },
236
+ "evidence": { "$ref": "#/$defs/evidence" },
237
+ "confidence": { "$ref": "#/$defs/confidence" }
238
+ }
239
+ }
240
+ }
241
+ }
242
+ },
243
+ "policies.json": {
244
+ "type": "object",
245
+ "required": ["policies"],
246
+ "properties": {
247
+ "policies": {
248
+ "type": "array",
249
+ "items": {
250
+ "type": "object",
251
+ "required": ["name", "rule", "type", "domain", "evidence", "confidence"],
252
+ "properties": {
253
+ "name": { "$ref": "#/$defs/conceptName" },
254
+ "rule": { "type": "string", "description": "plain-language statement: 'Only the invoice owner can send it'" },
255
+ "type": { "type": "string", "enum": ["authorization", "validation", "state", "business-constraint", "rate-limit"] },
256
+ "domain": { "$ref": "#/$defs/conceptName" },
257
+ "enforcedAt": { "type": "array", "items": { "type": "string" }, "description": "every code location enforcing it — multiple locations = divergence risk, note in gaps.json" },
258
+ "evidence": { "$ref": "#/$defs/evidence" },
259
+ "confidence": { "$ref": "#/$defs/confidence" }
260
+ }
261
+ }
262
+ }
263
+ }
264
+ },
265
+ "workflows.json": {
266
+ "type": "object",
267
+ "required": ["workflows"],
268
+ "properties": {
269
+ "workflows": {
270
+ "type": "array",
271
+ "items": {
272
+ "type": "object",
273
+ "required": ["name", "kind", "actor", "trigger", "steps", "result", "evidence", "confidence"],
274
+ "properties": {
275
+ "name": { "type": "string" },
276
+ "kind": { "type": "string", "enum": ["user", "admin", "system"] },
277
+ "actor": { "type": "string" },
278
+ "trigger": { "type": "string" },
279
+ "steps": { "type": "array", "minItems": 1, "items": { "type": "string" } },
280
+ "result": { "type": "string" },
281
+ "commandsInvolved": { "type": "array", "items": { "$ref": "#/$defs/conceptName" } },
282
+ "eventsInvolved": { "type": "array", "items": { "$ref": "#/$defs/conceptName" } },
283
+ "schedule": { "type": "string", "description": "cron expression for system workflows, if any" },
284
+ "scenarios": {
285
+ "type": "array",
286
+ "description": "concrete use cases, primarily excavated from the test suite (describe/it names, fixtures, assertions). A scenario sourced from a test is high-confidence by definition.",
287
+ "items": {
288
+ "type": "object",
289
+ "required": ["name", "outcome"],
290
+ "properties": {
291
+ "name": { "type": "string" },
292
+ "given": { "type": "string" },
293
+ "when": { "type": "string" },
294
+ "outcome": { "type": "string" },
295
+ "fromTest": { "type": "string", "description": "test file path + test name, when sourced from a test" }
296
+ }
297
+ }
298
+ },
299
+ "evidence": { "$ref": "#/$defs/evidence" },
300
+ "confidence": { "$ref": "#/$defs/confidence" }
301
+ }
302
+ }
303
+ }
304
+ }
305
+ },
306
+ "api.json": {
307
+ "type": "object",
308
+ "required": ["surfaces"],
309
+ "properties": {
310
+ "surfaces": {
311
+ "type": "array",
312
+ "items": {
313
+ "type": "object",
314
+ "required": ["kind", "path", "auth", "mapsTo", "evidence"],
315
+ "properties": {
316
+ "kind": { "type": "string", "enum": ["rest", "graphql", "rpc", "webhook-in", "webhook-out", "page", "cli", "websocket", "sse"] },
317
+ "method": { "type": "string" },
318
+ "path": { "type": "string" },
319
+ "auth": { "type": "string", "description": "none | session | jwt | api-key | signature | capability-url | ..." },
320
+ "mapsTo": {
321
+ "type": "object",
322
+ "required": ["type", "name"],
323
+ "properties": {
324
+ "type": { "type": "string", "enum": ["command", "query", "event-ingress"], "description": "command/query for normal surfaces. event-ingress ONLY for surfaces that relay an external event without a domain command of their own; its name must be an events.json event. A webhook whose handler changes state maps to a command (usual case)." },
325
+ "name": { "$ref": "#/$defs/conceptName" }
326
+ }
327
+ },
328
+ "notes": { "type": "string" },
329
+ "confidence": { "$ref": "#/$defs/confidence" },
330
+ "evidence": { "$ref": "#/$defs/evidence" }
331
+ }
332
+ }
333
+ }
334
+ }
335
+ },
336
+ "integrations.json": {
337
+ "type": "object",
338
+ "required": ["integrations"],
339
+ "properties": {
340
+ "integrations": {
341
+ "type": "array",
342
+ "items": {
343
+ "type": "object",
344
+ "required": ["name", "category", "purpose", "direction", "importance", "replacementDifficulty", "evidence", "confidence"],
345
+ "properties": {
346
+ "name": { "type": "string" },
347
+ "category": { "type": "string", "description": "payments | email | auth | storage | analytics | llm | sms | ..." },
348
+ "purpose": { "type": "string" },
349
+ "dataExchanged": { "type": "array", "items": { "type": "string" } },
350
+ "direction": { "type": "string", "enum": ["outbound", "inbound", "both"] },
351
+ "importance": { "type": "string", "enum": ["critical", "important", "peripheral"] },
352
+ "replacementDifficulty": { "type": "string", "enum": ["trivial", "moderate", "hard"] },
353
+ "configVia": { "type": "array", "items": { "type": "string" }, "description": "env vars / secrets used" },
354
+ "evidence": { "$ref": "#/$defs/evidence" },
355
+ "confidence": { "$ref": "#/$defs/confidence" }
356
+ }
357
+ }
358
+ }
359
+ }
360
+ },
361
+ "architecture.json": {
362
+ "type": "object",
363
+ "required": ["components", "datastores"],
364
+ "properties": {
365
+ "components": {
366
+ "type": "array",
367
+ "minItems": 1,
368
+ "items": {
369
+ "type": "object",
370
+ "required": ["name", "kind", "responsibility", "evidence"],
371
+ "properties": {
372
+ "name": { "type": "string" },
373
+ "kind": { "type": "string", "enum": ["frontend", "api", "worker", "job", "webhook-handler", "cli", "service", "proxy", "other"] },
374
+ "responsibility": { "type": "string" },
375
+ "dependsOn": { "type": "array", "items": { "type": "string" } },
376
+ "runtime": { "type": "string", "description": "how it runs today (process, cron, lambda, ...)" },
377
+ "confidence": { "$ref": "#/$defs/confidence" },
378
+ "evidence": { "$ref": "#/$defs/evidence" }
379
+ }
380
+ }
381
+ },
382
+ "datastores": {
383
+ "type": "array",
384
+ "items": {
385
+ "type": "object",
386
+ "required": ["name", "kind", "evidence"],
387
+ "properties": {
388
+ "name": { "type": "string" },
389
+ "kind": { "type": "string" },
390
+ "usedBy": { "type": "array", "items": { "type": "string" } },
391
+ "notes": { "type": "string" },
392
+ "confidence": { "$ref": "#/$defs/confidence" },
393
+ "evidence": { "$ref": "#/$defs/evidence" }
394
+ }
395
+ }
396
+ },
397
+ "notes": { "type": "array", "items": { "type": "string" }, "description": "deployment constraints worth preserving (ports, raw-body routes, ordering)" }
398
+ }
399
+ },
400
+ "invariants.json": {
401
+ "type": "object",
402
+ "required": ["invariants"],
403
+ "properties": {
404
+ "invariants": {
405
+ "type": "array",
406
+ "items": {
407
+ "type": "object",
408
+ "required": ["statement", "domain", "enforcedBy", "evidence", "confidence"],
409
+ "properties": {
410
+ "statement": { "type": "string", "description": "must ALWAYS hold: 'Invoice numbers are sequential per user with no gaps'" },
411
+ "domain": { "$ref": "#/$defs/conceptName" },
412
+ "enforcedBy": { "type": "string", "description": "db-constraint | code-guard | convention | nothing (!)" },
413
+ "atRiskBecause": { "type": "string", "description": "why current enforcement is fragile, if it is" },
414
+ "evidence": { "$ref": "#/$defs/evidence" },
415
+ "confidence": { "$ref": "#/$defs/confidence" }
416
+ }
417
+ }
418
+ }
419
+ }
420
+ },
421
+ "gaps.json": {
422
+ "type": "object",
423
+ "required": ["gaps"],
424
+ "properties": {
425
+ "gaps": {
426
+ "type": "array",
427
+ "items": {
428
+ "type": "object",
429
+ "required": ["problem", "kind", "impact", "recommendation", "evidence"],
430
+ "properties": {
431
+ "problem": { "type": "string" },
432
+ "kind": { "type": "string", "enum": ["incomplete-feature", "todo", "duplication", "bug", "hack", "dead-code", "unclear-ownership", "architecture", "security", "open-product-decision"] },
433
+ "impact": { "type": "string" },
434
+ "recommendation": { "type": "string" },
435
+ "evidence": { "$ref": "#/$defs/evidence" }
436
+ }
437
+ }
438
+ }
439
+ }
440
+ },
441
+ "migration.json": {
442
+ "type": "object",
443
+ "required": ["mappings", "decisionsNeeded"],
444
+ "properties": {
445
+ "mappings": {
446
+ "type": "array",
447
+ "minItems": 1,
448
+ "items": {
449
+ "type": "object",
450
+ "required": ["current", "future", "recommendation"],
451
+ "properties": {
452
+ "current": { "type": "array", "minItems": 1, "items": { "type": "string" }, "description": "file paths in the existing repo" },
453
+ "future": {
454
+ "type": "object",
455
+ "required": ["domain"],
456
+ "properties": {
457
+ "domain": { "$ref": "#/$defs/conceptName" },
458
+ "concepts": { "type": "array", "items": { "type": "string" }, "description": "commands/queries/events/entities this code becomes" }
459
+ }
460
+ },
461
+ "recommendation": { "type": "string" }
462
+ }
463
+ }
464
+ },
465
+ "dropped": {
466
+ "type": "array",
467
+ "items": {
468
+ "type": "object",
469
+ "required": ["path", "reason"],
470
+ "properties": { "path": { "type": "string", "description": "file path; for sub-file drops use 'path (symbolName)' when part of a file survives" }, "reason": { "type": "string" } }
471
+ }
472
+ },
473
+ "decisionsNeeded": {
474
+ "type": "array",
475
+ "items": {
476
+ "type": "object",
477
+ "required": ["question"],
478
+ "properties": {
479
+ "question": { "type": "string" },
480
+ "options": { "type": "array", "items": { "type": "string" } },
481
+ "blockedConcepts": { "type": "array", "items": { "type": "string" } }
482
+ }
483
+ }
484
+ }
485
+ }
486
+ },
487
+ "interfaces.json": {
488
+ "x-optional": true,
489
+ "type": "object",
490
+ "description": "Every way the product is CONSUMED, one entry per channel. The web UI is one channel (detailed further in frontend*.json); CLI, MCP server (for AI agents), OpenAPI/REST, generated SDK, realtime, and webhooks are others. Answers 'who can drive this product and how'.",
491
+ "required": ["interfaces"],
492
+ "properties": {
493
+ "interfaces": {
494
+ "type": "array",
495
+ "items": {
496
+ "type": "object",
497
+ "required": ["name", "kind", "audience", "purpose", "evidence", "confidence"],
498
+ "properties": {
499
+ "name": { "type": "string" },
500
+ "kind": { "type": "string", "enum": ["web-ui", "cli", "mcp", "openapi-rest", "graphql", "sdk", "websocket-realtime", "webhook-in", "webhook-out", "email", "other"] },
501
+ "audience": { "type": "string", "enum": ["human", "developer", "ai-agent", "external-system", "internal"] },
502
+ "purpose": { "type": "string" },
503
+ "surfaceCount": { "type": "number", "description": "how many ops/tools/commands/routes this channel exposes" },
504
+ "generated": { "type": "boolean", "description": "true if generated from another source (OpenAPI from routes, typed SDK, MCP tools from funcs) rather than hand-written" },
505
+ "domainsServed": { "type": "array", "items": { "$ref": "#/$defs/conceptName" } },
506
+ "status": { "type": "string", "enum": ["complete", "partial", "stub", "deprecated"] },
507
+ "notes": { "type": "string" },
508
+ "evidence": { "$ref": "#/$defs/evidence" },
509
+ "confidence": { "$ref": "#/$defs/confidence" }
510
+ }
511
+ }
512
+ }
513
+ }
514
+ },
515
+ "frontend.json": {
516
+ "x-optional": true,
517
+ "type": "object",
518
+ "description": "Web-UI app-level shape. Names the framework/router/styling/data/auth so the rebuild can weigh their tradeoffs (e.g. TanStack Start + better-auth + Mantine).",
519
+ "required": ["framework", "styling", "dataLayer", "auth", "evidence", "confidence"],
520
+ "properties": {
521
+ "framework": { "type": "string", "description": "e.g. TanStack Start, Next.js, Remix, Vite SPA" },
522
+ "rendering": { "type": "string", "enum": ["spa", "ssr", "ssg", "streaming-ssr", "mixed"] },
523
+ "router": { "type": "string", "description": "e.g. TanStack Router (file-based), React Router" },
524
+ "styling": { "type": "string", "description": "the design system, e.g. Mantine, Tailwind, MUI, CSS modules" },
525
+ "designSystemConsistency": { "type": "string", "enum": ["single-system", "mostly-consistent", "mixed", "ad-hoc"], "description": "how uniformly ONE component/theme system is used — the rebuild target is 'everything Mantine', so divergence is porting work" },
526
+ "designFindings": {
527
+ "type": "array",
528
+ "description": "Concrete broken/inconsistent design patterns observed across the UI. Each is a specific, cited observation of a consistency defect — not a taste opinion. These become the design recommendations in the second-opinion report.",
529
+ "items": {
530
+ "type": "object",
531
+ "required": ["pattern", "observation", "recommendation", "evidence"],
532
+ "properties": {
533
+ "pattern": {
534
+ "type": "string",
535
+ "enum": [
536
+ "interaction-inconsistency",
537
+ "theming-not-tokenized",
538
+ "cross-page-inconsistency",
539
+ "component-duplication",
540
+ "spacing-typography-scale",
541
+ "design-system-bypass",
542
+ "accessibility",
543
+ "responsive",
544
+ "other"
545
+ ],
546
+ "description": "interaction-inconsistency = same job done different ways (modal here, drawer there; inconsistent confirm dialogs). theming-not-tokenized = hardcoded colors/spacing/fonts instead of theme tokens/variables. cross-page-inconsistency = the same element (button/header/card) styled differently across pages. component-duplication = several near-identical components for one purpose. spacing-typography-scale = ad-hoc magic numbers off any scale. design-system-bypass = raw HTML/CSS where a design-system component exists. accessibility / responsive = a11y or breakpoint defects."
547
+ },
548
+ "observation": { "type": "string", "description": "what is inconsistent, with concrete examples (e.g. 'Add-site uses a Drawer, Edit-site uses a Modal for the same task')" },
549
+ "impact": { "type": "string", "description": "what it does to the user (feels unpolished/confusing) or to maintenance (a color change means hunting every file)" },
550
+ "recommendation": { "type": "string", "description": "the fix — usually standardize on one pattern, move values to theme tokens, or extract one shared component" },
551
+ "severity": { "type": "string", "enum": ["minor", "worth-fixing", "serious"] },
552
+ "evidence": { "$ref": "#/$defs/evidence" },
553
+ "confidence": { "$ref": "#/$defs/confidence" }
554
+ }
555
+ }
556
+ },
557
+ "stateManagement": { "type": "string" },
558
+ "dataLayer": { "type": "string", "description": "how the UI talks to the backend: e.g. pikku-react-query, REST fetch helpers, tRPC, GraphQL client" },
559
+ "auth": { "type": "string", "description": "client auth mechanism: e.g. better-auth, next-auth, custom JWT" },
560
+ "buildTool": { "type": "string" },
561
+ "i18n": { "type": "string", "description": "internationalization approach, or 'none'" },
562
+ "notes": { "type": "array", "items": { "type": "string" } },
563
+ "evidence": { "$ref": "#/$defs/evidence" },
564
+ "confidence": { "$ref": "#/$defs/confidence" }
565
+ }
566
+ },
567
+ "frontend-routes.json": {
568
+ "x-optional": true,
569
+ "type": "object",
570
+ "description": "The page/route tree — what a user can navigate to and do, mapped back to the data (queries/commands) each route uses and the components it renders.",
571
+ "required": ["routes"],
572
+ "properties": {
573
+ "routes": {
574
+ "type": "array",
575
+ "items": {
576
+ "type": "object",
577
+ "required": ["path", "purpose", "evidence"],
578
+ "properties": {
579
+ "path": { "type": "string", "description": "URL path, e.g. /app/sites/:id" },
580
+ "kind": { "type": "string", "enum": ["page", "layout", "index", "modal-or-drawer", "redirect"] },
581
+ "purpose": { "type": "string", "description": "what the user does/sees here, in product terms" },
582
+ "auth": { "type": "string", "description": "none | authenticated | admin | role:xyz" },
583
+ "dataFrom": { "type": "array", "items": { "type": "string" }, "description": "query/command names (from queries.json/commands.json) this route reads/calls" },
584
+ "usesComponents": { "type": "array", "items": { "type": "string" }, "description": "component names from frontend-components.json" },
585
+ "userFlows": { "type": "array", "items": { "type": "string" }, "description": "workflows.json (kind=user) names this route participates in" },
586
+ "evidence": { "$ref": "#/$defs/evidence" },
587
+ "confidence": { "$ref": "#/$defs/confidence" }
588
+ }
589
+ }
590
+ }
591
+ }
592
+ },
593
+ "frontend-components.json": {
594
+ "x-optional": true,
595
+ "type": "object",
596
+ "description": "Component inventory. The load-bearing field is `rebuild`: it separates components that are trivially rebuildable in the target design system (Mantine) from those carrying bespoke logic that must be carefully PORTED (custom charts, complex tables, canvas, drag/drop). That split is the frontend's real migration cost.",
597
+ "required": ["components"],
598
+ "properties": {
599
+ "components": {
600
+ "type": "array",
601
+ "items": {
602
+ "type": "object",
603
+ "required": ["name", "role", "rebuild", "evidence", "confidence"],
604
+ "properties": {
605
+ "name": { "type": "string" },
606
+ "role": { "type": "string", "enum": ["layout", "navigation", "presentational", "feature", "form", "data-display", "chart", "table", "overlay", "provider", "other"] },
607
+ "purpose": { "type": "string" },
608
+ "reuse": { "type": "string", "enum": ["shared", "one-off"], "description": "used across features vs single-use" },
609
+ "rebuild": {
610
+ "type": "string",
611
+ "enum": ["mantine-standard", "mantine-composition", "custom-style", "custom-logic"],
612
+ "description": "mantine-standard = maps 1:1 to a Mantine component (trivial); mantine-composition = built from Mantine primitives (straightforward); custom-style = diverges visually from the design system (normalize to Mantine); custom-logic = bespoke behavior (chart/table/canvas/drag/editor) that must be PORTED, not re-skinned"
613
+ },
614
+ "customLogic": { "type": "string", "description": "REQUIRED when rebuild=custom-logic: what the bespoke behavior is and why a stock component can't replace it" },
615
+ "dependencies": { "type": "array", "items": { "type": "string" }, "description": "notable libs it pulls in (charting/table/editor) — replacement considerations for the port" },
616
+ "usedBy": { "type": "array", "items": { "type": "string" }, "description": "routes/components that use it" },
617
+ "evidence": { "$ref": "#/$defs/evidence" },
618
+ "confidence": { "$ref": "#/$defs/confidence" }
619
+ }
620
+ }
621
+ }
622
+ }
623
+ }
624
+ }
625
+ }