@cherishxn/agent-scaffold 0.0.0-stage → 1.1.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 (685) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +99 -2
  3. package/THIRD_PARTY_NOTICES.md +18 -0
  4. package/dist/cli.d.ts +2 -0
  5. package/dist/cli.js +105 -0
  6. package/dist/diagnostics.d.ts +10 -0
  7. package/dist/diagnostics.js +27 -0
  8. package/dist/generate.d.ts +55 -0
  9. package/dist/generate.js +159 -0
  10. package/dist/model.d.ts +33 -0
  11. package/dist/model.js +24 -0
  12. package/dist/verify.d.ts +67 -0
  13. package/dist/verify.js +278 -0
  14. package/package.json +52 -4
  15. package/schemas/manifest.json +171 -0
  16. package/schemas/plan.json +164 -0
  17. package/schemas/result.json +97 -0
  18. package/schemas/spec.json +50 -0
  19. package/skills/scaffold-use/SKILL.md +24 -0
  20. package/templates/catalog.json +37 -0
  21. package/templates/next-fullstack-antd/.agents/skills/design-contract/SKILL.md +23 -0
  22. package/templates/next-fullstack-antd/.agents/skills/project-work/SKILL.md +10 -0
  23. package/templates/next-fullstack-antd/.claude/skills/design-contract/SKILL.md +23 -0
  24. package/templates/next-fullstack-antd/.claude/skills/project-work/SKILL.md +10 -0
  25. package/templates/next-fullstack-antd/.dockerignore +18 -0
  26. package/templates/next-fullstack-antd/.env.example +13 -0
  27. package/templates/next-fullstack-antd/.grok/skills/design-contract/SKILL.md +23 -0
  28. package/templates/next-fullstack-antd/.grok/skills/project-work/SKILL.md +10 -0
  29. package/templates/next-fullstack-antd/.scaffold-checks.json +7 -0
  30. package/templates/next-fullstack-antd/AGENTS.md +11 -0
  31. package/templates/next-fullstack-antd/CLAUDE.md +1 -0
  32. package/templates/next-fullstack-antd/DESIGN.md +208 -0
  33. package/templates/next-fullstack-antd/LICENSE +21 -0
  34. package/templates/next-fullstack-antd/README.md +64 -0
  35. package/templates/next-fullstack-antd/THIRD_PARTY_NOTICES.md +18 -0
  36. package/templates/next-fullstack-antd/compose.yaml +18 -0
  37. package/templates/next-fullstack-antd/design/guide.md +61 -0
  38. package/templates/next-fullstack-antd/design/layout.css +6 -0
  39. package/templates/next-fullstack-antd/design/structure.json +107 -0
  40. package/templates/next-fullstack-antd/design/tokens.json +171 -0
  41. package/templates/next-fullstack-antd/design/widgets.css +30 -0
  42. package/templates/next-fullstack-antd/design/widgets.json +233 -0
  43. package/templates/next-fullstack-antd/docs/PROJECT.md +32 -0
  44. package/templates/next-fullstack-antd/docs/api.d.ts +544 -0
  45. package/templates/next-fullstack-antd/docs/openapi.json +461 -0
  46. package/templates/next-fullstack-antd/gitignore.template +19 -0
  47. package/templates/next-fullstack-antd/licenses/fastapi.txt +21 -0
  48. package/templates/next-fullstack-antd/licenses/nest.txt +22 -0
  49. package/templates/next-fullstack-antd/licenses/next.txt +21 -0
  50. package/templates/next-fullstack-antd/licenses/shadcn.txt +21 -0
  51. package/templates/next-fullstack-antd/licenses/sources.json +27 -0
  52. package/templates/next-fullstack-antd/licenses/spring.txt +202 -0
  53. package/templates/next-fullstack-antd/package-lock.json +494 -0
  54. package/templates/next-fullstack-antd/package.json +26 -0
  55. package/templates/next-fullstack-antd/playwright.config.ts +3 -0
  56. package/templates/next-fullstack-antd/project.json +8 -0
  57. package/templates/next-fullstack-antd/scripts/api-check.mjs +18 -0
  58. package/templates/next-fullstack-antd/scripts/api-contract.mjs +46 -0
  59. package/templates/next-fullstack-antd/scripts/design-coverage.mjs +20 -0
  60. package/templates/next-fullstack-antd/scripts/design-next-cleanup.mjs +13 -0
  61. package/templates/next-fullstack-antd/scripts/design-verify.mjs +154 -0
  62. package/templates/next-fullstack-antd/scripts/design.mjs +108 -0
  63. package/templates/next-fullstack-antd/scripts/project.mjs +120 -0
  64. package/templates/next-fullstack-antd/tests/contract-client.ts +20 -0
  65. package/templates/next-fullstack-antd/tests/contract.spec.ts +49 -0
  66. package/templates/next-fullstack-antd/tests/design/harness.tsx +63 -0
  67. package/templates/next-fullstack-antd/tests/ui.spec.ts +61 -0
  68. package/templates/next-fullstack-antd/web/Dockerfile +12 -0
  69. package/templates/next-fullstack-antd/web/app/api/auth/login/route.ts +1 -0
  70. package/templates/next-fullstack-antd/web/app/api/auth/logout/route.ts +1 -0
  71. package/templates/next-fullstack-antd/web/app/api/auth/me/route.ts +1 -0
  72. package/templates/next-fullstack-antd/web/app/api/health/route.ts +1 -0
  73. package/templates/next-fullstack-antd/web/app/api/records/[id]/route.ts +5 -0
  74. package/templates/next-fullstack-antd/web/app/api/records/route.ts +3 -0
  75. package/templates/next-fullstack-antd/web/app/layout.tsx +5 -0
  76. package/templates/next-fullstack-antd/web/app/page.tsx +2 -0
  77. package/templates/next-fullstack-antd/web/eslint.config.mjs +3 -0
  78. package/templates/next-fullstack-antd/web/lib/api.ts +35 -0
  79. package/templates/next-fullstack-antd/web/lib/auth.ts +10 -0
  80. package/templates/next-fullstack-antd/web/lib/db.ts +3 -0
  81. package/templates/next-fullstack-antd/web/lib/session.test.ts +15 -0
  82. package/templates/next-fullstack-antd/web/lib/validation.test.ts +3 -0
  83. package/templates/next-fullstack-antd/web/lib/validation.ts +5 -0
  84. package/templates/next-fullstack-antd/web/next-env.d.ts +7 -0
  85. package/templates/next-fullstack-antd/web/next.config.ts +3 -0
  86. package/templates/next-fullstack-antd/web/package.json +35 -0
  87. package/templates/next-fullstack-antd/web/pnpm-lock.yaml +3756 -0
  88. package/templates/next-fullstack-antd/web/pnpm-workspace.yaml +7 -0
  89. package/templates/next-fullstack-antd/web/prisma/migrations/202610190001_initial/migration.sql +99 -0
  90. package/templates/next-fullstack-antd/web/prisma/migrations/migration_lock.toml +1 -0
  91. package/templates/next-fullstack-antd/web/prisma/schema.prisma +72 -0
  92. package/templates/next-fullstack-antd/web/scripts/seed.ts +4 -0
  93. package/templates/next-fullstack-antd/web/src/App.tsx +29 -0
  94. package/templates/next-fullstack-antd/web/src/design-layout.css +7 -0
  95. package/templates/next-fullstack-antd/web/src/design-runtime.json +511 -0
  96. package/templates/next-fullstack-antd/web/src/design-tokens.css +168 -0
  97. package/templates/next-fullstack-antd/web/src/design-widgets.css +31 -0
  98. package/templates/next-fullstack-antd/web/src/structure-view.tsx +16 -0
  99. package/templates/next-fullstack-antd/web/src/styles.css +3 -0
  100. package/templates/next-fullstack-antd/web/src/ui.tsx +30 -0
  101. package/templates/next-fullstack-antd/web/src/widget-icon.tsx +5 -0
  102. package/templates/next-fullstack-antd/web/src/widget-types.ts +13 -0
  103. package/templates/next-fullstack-antd/web/src/workspace-model.ts +85 -0
  104. package/templates/next-fullstack-antd/web/tsconfig.json +42 -0
  105. package/templates/next-fullstack-antd/web/vitest.config.ts +2 -0
  106. package/templates/next-fullstack-shadcn/.agents/skills/design-contract/SKILL.md +23 -0
  107. package/templates/next-fullstack-shadcn/.agents/skills/project-work/SKILL.md +10 -0
  108. package/templates/next-fullstack-shadcn/.claude/skills/design-contract/SKILL.md +23 -0
  109. package/templates/next-fullstack-shadcn/.claude/skills/project-work/SKILL.md +10 -0
  110. package/templates/next-fullstack-shadcn/.dockerignore +18 -0
  111. package/templates/next-fullstack-shadcn/.env.example +13 -0
  112. package/templates/next-fullstack-shadcn/.grok/skills/design-contract/SKILL.md +23 -0
  113. package/templates/next-fullstack-shadcn/.grok/skills/project-work/SKILL.md +10 -0
  114. package/templates/next-fullstack-shadcn/.scaffold-checks.json +7 -0
  115. package/templates/next-fullstack-shadcn/AGENTS.md +11 -0
  116. package/templates/next-fullstack-shadcn/CLAUDE.md +1 -0
  117. package/templates/next-fullstack-shadcn/DESIGN.md +208 -0
  118. package/templates/next-fullstack-shadcn/LICENSE +21 -0
  119. package/templates/next-fullstack-shadcn/README.md +64 -0
  120. package/templates/next-fullstack-shadcn/THIRD_PARTY_NOTICES.md +18 -0
  121. package/templates/next-fullstack-shadcn/compose.yaml +18 -0
  122. package/templates/next-fullstack-shadcn/design/guide.md +61 -0
  123. package/templates/next-fullstack-shadcn/design/layout.css +6 -0
  124. package/templates/next-fullstack-shadcn/design/structure.json +107 -0
  125. package/templates/next-fullstack-shadcn/design/tokens.json +171 -0
  126. package/templates/next-fullstack-shadcn/design/widgets.css +30 -0
  127. package/templates/next-fullstack-shadcn/design/widgets.json +233 -0
  128. package/templates/next-fullstack-shadcn/docs/PROJECT.md +32 -0
  129. package/templates/next-fullstack-shadcn/docs/api.d.ts +544 -0
  130. package/templates/next-fullstack-shadcn/docs/openapi.json +461 -0
  131. package/templates/next-fullstack-shadcn/gitignore.template +19 -0
  132. package/templates/next-fullstack-shadcn/licenses/fastapi.txt +21 -0
  133. package/templates/next-fullstack-shadcn/licenses/nest.txt +22 -0
  134. package/templates/next-fullstack-shadcn/licenses/next.txt +21 -0
  135. package/templates/next-fullstack-shadcn/licenses/shadcn.txt +21 -0
  136. package/templates/next-fullstack-shadcn/licenses/sources.json +27 -0
  137. package/templates/next-fullstack-shadcn/licenses/spring.txt +202 -0
  138. package/templates/next-fullstack-shadcn/package-lock.json +494 -0
  139. package/templates/next-fullstack-shadcn/package.json +26 -0
  140. package/templates/next-fullstack-shadcn/playwright.config.ts +3 -0
  141. package/templates/next-fullstack-shadcn/project.json +8 -0
  142. package/templates/next-fullstack-shadcn/scripts/api-check.mjs +18 -0
  143. package/templates/next-fullstack-shadcn/scripts/api-contract.mjs +46 -0
  144. package/templates/next-fullstack-shadcn/scripts/design-coverage.mjs +20 -0
  145. package/templates/next-fullstack-shadcn/scripts/design-next-cleanup.mjs +13 -0
  146. package/templates/next-fullstack-shadcn/scripts/design-verify.mjs +154 -0
  147. package/templates/next-fullstack-shadcn/scripts/design.mjs +108 -0
  148. package/templates/next-fullstack-shadcn/scripts/project.mjs +120 -0
  149. package/templates/next-fullstack-shadcn/tests/contract-client.ts +20 -0
  150. package/templates/next-fullstack-shadcn/tests/contract.spec.ts +49 -0
  151. package/templates/next-fullstack-shadcn/tests/design/harness.tsx +63 -0
  152. package/templates/next-fullstack-shadcn/tests/ui.spec.ts +61 -0
  153. package/templates/next-fullstack-shadcn/web/Dockerfile +12 -0
  154. package/templates/next-fullstack-shadcn/web/app/api/auth/login/route.ts +1 -0
  155. package/templates/next-fullstack-shadcn/web/app/api/auth/logout/route.ts +1 -0
  156. package/templates/next-fullstack-shadcn/web/app/api/auth/me/route.ts +1 -0
  157. package/templates/next-fullstack-shadcn/web/app/api/health/route.ts +1 -0
  158. package/templates/next-fullstack-shadcn/web/app/api/records/[id]/route.ts +5 -0
  159. package/templates/next-fullstack-shadcn/web/app/api/records/route.ts +3 -0
  160. package/templates/next-fullstack-shadcn/web/app/layout.tsx +4 -0
  161. package/templates/next-fullstack-shadcn/web/app/page.tsx +2 -0
  162. package/templates/next-fullstack-shadcn/web/eslint.config.mjs +3 -0
  163. package/templates/next-fullstack-shadcn/web/lib/api.ts +35 -0
  164. package/templates/next-fullstack-shadcn/web/lib/auth.ts +10 -0
  165. package/templates/next-fullstack-shadcn/web/lib/db.ts +3 -0
  166. package/templates/next-fullstack-shadcn/web/lib/session.test.ts +15 -0
  167. package/templates/next-fullstack-shadcn/web/lib/validation.test.ts +3 -0
  168. package/templates/next-fullstack-shadcn/web/lib/validation.ts +5 -0
  169. package/templates/next-fullstack-shadcn/web/next-env.d.ts +7 -0
  170. package/templates/next-fullstack-shadcn/web/next.config.ts +3 -0
  171. package/templates/next-fullstack-shadcn/web/package.json +39 -0
  172. package/templates/next-fullstack-shadcn/web/pnpm-lock.yaml +3286 -0
  173. package/templates/next-fullstack-shadcn/web/pnpm-workspace.yaml +7 -0
  174. package/templates/next-fullstack-shadcn/web/postcss.config.mjs +1 -0
  175. package/templates/next-fullstack-shadcn/web/prisma/migrations/202610190001_initial/migration.sql +99 -0
  176. package/templates/next-fullstack-shadcn/web/prisma/migrations/migration_lock.toml +1 -0
  177. package/templates/next-fullstack-shadcn/web/prisma/schema.prisma +72 -0
  178. package/templates/next-fullstack-shadcn/web/scripts/seed.ts +4 -0
  179. package/templates/next-fullstack-shadcn/web/src/App.tsx +30 -0
  180. package/templates/next-fullstack-shadcn/web/src/design-layout.css +7 -0
  181. package/templates/next-fullstack-shadcn/web/src/design-runtime.json +511 -0
  182. package/templates/next-fullstack-shadcn/web/src/design-tokens.css +168 -0
  183. package/templates/next-fullstack-shadcn/web/src/design-widgets.css +31 -0
  184. package/templates/next-fullstack-shadcn/web/src/structure-view.tsx +16 -0
  185. package/templates/next-fullstack-shadcn/web/src/styles.css +3 -0
  186. package/templates/next-fullstack-shadcn/web/src/tailwind.css +2 -0
  187. package/templates/next-fullstack-shadcn/web/src/ui.tsx +13 -0
  188. package/templates/next-fullstack-shadcn/web/src/widget-icon.tsx +5 -0
  189. package/templates/next-fullstack-shadcn/web/src/widget-types.ts +13 -0
  190. package/templates/next-fullstack-shadcn/web/src/workspace-model.ts +85 -0
  191. package/templates/next-fullstack-shadcn/web/tsconfig.json +42 -0
  192. package/templates/next-fullstack-shadcn/web/vitest.config.ts +2 -0
  193. package/templates/react-fastapi-antd/.agents/skills/design-contract/SKILL.md +23 -0
  194. package/templates/react-fastapi-antd/.agents/skills/project-work/SKILL.md +10 -0
  195. package/templates/react-fastapi-antd/.claude/skills/design-contract/SKILL.md +23 -0
  196. package/templates/react-fastapi-antd/.claude/skills/project-work/SKILL.md +10 -0
  197. package/templates/react-fastapi-antd/.dockerignore +18 -0
  198. package/templates/react-fastapi-antd/.env.example +13 -0
  199. package/templates/react-fastapi-antd/.grok/skills/design-contract/SKILL.md +23 -0
  200. package/templates/react-fastapi-antd/.grok/skills/project-work/SKILL.md +10 -0
  201. package/templates/react-fastapi-antd/.scaffold-checks.json +7 -0
  202. package/templates/react-fastapi-antd/AGENTS.md +11 -0
  203. package/templates/react-fastapi-antd/CLAUDE.md +1 -0
  204. package/templates/react-fastapi-antd/DESIGN.md +208 -0
  205. package/templates/react-fastapi-antd/LICENSE +21 -0
  206. package/templates/react-fastapi-antd/README.md +64 -0
  207. package/templates/react-fastapi-antd/THIRD_PARTY_NOTICES.md +18 -0
  208. package/templates/react-fastapi-antd/backend/.python-version +1 -0
  209. package/templates/react-fastapi-antd/backend/Dockerfile +10 -0
  210. package/templates/react-fastapi-antd/backend/alembic.ini +3 -0
  211. package/templates/react-fastapi-antd/backend/app/__init__.py +0 -0
  212. package/templates/react-fastapi-antd/backend/app/core/__init__.py +0 -0
  213. package/templates/react-fastapi-antd/backend/app/core/security.py +25 -0
  214. package/templates/react-fastapi-antd/backend/app/db.py +11 -0
  215. package/templates/react-fastapi-antd/backend/app/main.py +146 -0
  216. package/templates/react-fastapi-antd/backend/app/models.py +21 -0
  217. package/templates/react-fastapi-antd/backend/app/seed.py +21 -0
  218. package/templates/react-fastapi-antd/backend/migrations/env.py +9 -0
  219. package/templates/react-fastapi-antd/backend/migrations/versions/0001_initial.py +18 -0
  220. package/templates/react-fastapi-antd/backend/pyproject.toml +16 -0
  221. package/templates/react-fastapi-antd/backend/tests/test_api.py +27 -0
  222. package/templates/react-fastapi-antd/backend/uv.lock +1085 -0
  223. package/templates/react-fastapi-antd/compose.yaml +18 -0
  224. package/templates/react-fastapi-antd/design/guide.md +61 -0
  225. package/templates/react-fastapi-antd/design/layout.css +6 -0
  226. package/templates/react-fastapi-antd/design/structure.json +107 -0
  227. package/templates/react-fastapi-antd/design/tokens.json +171 -0
  228. package/templates/react-fastapi-antd/design/widgets.css +30 -0
  229. package/templates/react-fastapi-antd/design/widgets.json +233 -0
  230. package/templates/react-fastapi-antd/docs/PROJECT.md +32 -0
  231. package/templates/react-fastapi-antd/docs/api.d.ts +544 -0
  232. package/templates/react-fastapi-antd/docs/openapi.json +461 -0
  233. package/templates/react-fastapi-antd/gitignore.template +19 -0
  234. package/templates/react-fastapi-antd/licenses/fastapi.txt +21 -0
  235. package/templates/react-fastapi-antd/licenses/nest.txt +22 -0
  236. package/templates/react-fastapi-antd/licenses/next.txt +21 -0
  237. package/templates/react-fastapi-antd/licenses/shadcn.txt +21 -0
  238. package/templates/react-fastapi-antd/licenses/sources.json +27 -0
  239. package/templates/react-fastapi-antd/licenses/spring.txt +202 -0
  240. package/templates/react-fastapi-antd/package-lock.json +494 -0
  241. package/templates/react-fastapi-antd/package.json +26 -0
  242. package/templates/react-fastapi-antd/playwright.config.ts +3 -0
  243. package/templates/react-fastapi-antd/project.json +8 -0
  244. package/templates/react-fastapi-antd/scripts/api-check.mjs +18 -0
  245. package/templates/react-fastapi-antd/scripts/api-contract.mjs +46 -0
  246. package/templates/react-fastapi-antd/scripts/design-coverage.mjs +20 -0
  247. package/templates/react-fastapi-antd/scripts/design-next-cleanup.mjs +13 -0
  248. package/templates/react-fastapi-antd/scripts/design-verify.mjs +154 -0
  249. package/templates/react-fastapi-antd/scripts/design.mjs +108 -0
  250. package/templates/react-fastapi-antd/scripts/project.mjs +120 -0
  251. package/templates/react-fastapi-antd/tests/contract-client.ts +20 -0
  252. package/templates/react-fastapi-antd/tests/contract.spec.ts +49 -0
  253. package/templates/react-fastapi-antd/tests/design/harness.tsx +63 -0
  254. package/templates/react-fastapi-antd/tests/ui.spec.ts +61 -0
  255. package/templates/react-fastapi-antd/web/bun.lock +442 -0
  256. package/templates/react-fastapi-antd/web/eslint.config.mjs +3 -0
  257. package/templates/react-fastapi-antd/web/index.html +1 -0
  258. package/templates/react-fastapi-antd/web/package.json +28 -0
  259. package/templates/react-fastapi-antd/web/src/App.tsx +29 -0
  260. package/templates/react-fastapi-antd/web/src/design-layout.css +7 -0
  261. package/templates/react-fastapi-antd/web/src/design-runtime.json +511 -0
  262. package/templates/react-fastapi-antd/web/src/design-tokens.css +168 -0
  263. package/templates/react-fastapi-antd/web/src/design-widgets.css +31 -0
  264. package/templates/react-fastapi-antd/web/src/main.tsx +6 -0
  265. package/templates/react-fastapi-antd/web/src/structure-view.tsx +16 -0
  266. package/templates/react-fastapi-antd/web/src/styles.css +3 -0
  267. package/templates/react-fastapi-antd/web/src/ui.tsx +30 -0
  268. package/templates/react-fastapi-antd/web/src/widget-icon.tsx +5 -0
  269. package/templates/react-fastapi-antd/web/src/widget-types.ts +13 -0
  270. package/templates/react-fastapi-antd/web/src/workspace-model.ts +85 -0
  271. package/templates/react-fastapi-antd/web/tsconfig.json +22 -0
  272. package/templates/react-fastapi-antd/web/vite.config.ts +3 -0
  273. package/templates/react-fastapi-shadcn/.agents/skills/design-contract/SKILL.md +23 -0
  274. package/templates/react-fastapi-shadcn/.agents/skills/project-work/SKILL.md +10 -0
  275. package/templates/react-fastapi-shadcn/.claude/skills/design-contract/SKILL.md +23 -0
  276. package/templates/react-fastapi-shadcn/.claude/skills/project-work/SKILL.md +10 -0
  277. package/templates/react-fastapi-shadcn/.dockerignore +18 -0
  278. package/templates/react-fastapi-shadcn/.env.example +13 -0
  279. package/templates/react-fastapi-shadcn/.grok/skills/design-contract/SKILL.md +23 -0
  280. package/templates/react-fastapi-shadcn/.grok/skills/project-work/SKILL.md +10 -0
  281. package/templates/react-fastapi-shadcn/.scaffold-checks.json +7 -0
  282. package/templates/react-fastapi-shadcn/AGENTS.md +11 -0
  283. package/templates/react-fastapi-shadcn/CLAUDE.md +1 -0
  284. package/templates/react-fastapi-shadcn/DESIGN.md +208 -0
  285. package/templates/react-fastapi-shadcn/LICENSE +21 -0
  286. package/templates/react-fastapi-shadcn/README.md +64 -0
  287. package/templates/react-fastapi-shadcn/THIRD_PARTY_NOTICES.md +18 -0
  288. package/templates/react-fastapi-shadcn/backend/.python-version +1 -0
  289. package/templates/react-fastapi-shadcn/backend/Dockerfile +10 -0
  290. package/templates/react-fastapi-shadcn/backend/alembic.ini +3 -0
  291. package/templates/react-fastapi-shadcn/backend/app/__init__.py +0 -0
  292. package/templates/react-fastapi-shadcn/backend/app/core/__init__.py +0 -0
  293. package/templates/react-fastapi-shadcn/backend/app/core/security.py +25 -0
  294. package/templates/react-fastapi-shadcn/backend/app/db.py +11 -0
  295. package/templates/react-fastapi-shadcn/backend/app/main.py +146 -0
  296. package/templates/react-fastapi-shadcn/backend/app/models.py +21 -0
  297. package/templates/react-fastapi-shadcn/backend/app/seed.py +21 -0
  298. package/templates/react-fastapi-shadcn/backend/migrations/env.py +9 -0
  299. package/templates/react-fastapi-shadcn/backend/migrations/versions/0001_initial.py +18 -0
  300. package/templates/react-fastapi-shadcn/backend/pyproject.toml +16 -0
  301. package/templates/react-fastapi-shadcn/backend/tests/test_api.py +27 -0
  302. package/templates/react-fastapi-shadcn/backend/uv.lock +1085 -0
  303. package/templates/react-fastapi-shadcn/compose.yaml +18 -0
  304. package/templates/react-fastapi-shadcn/design/guide.md +61 -0
  305. package/templates/react-fastapi-shadcn/design/layout.css +6 -0
  306. package/templates/react-fastapi-shadcn/design/structure.json +107 -0
  307. package/templates/react-fastapi-shadcn/design/tokens.json +171 -0
  308. package/templates/react-fastapi-shadcn/design/widgets.css +30 -0
  309. package/templates/react-fastapi-shadcn/design/widgets.json +233 -0
  310. package/templates/react-fastapi-shadcn/docs/PROJECT.md +32 -0
  311. package/templates/react-fastapi-shadcn/docs/api.d.ts +544 -0
  312. package/templates/react-fastapi-shadcn/docs/openapi.json +461 -0
  313. package/templates/react-fastapi-shadcn/gitignore.template +19 -0
  314. package/templates/react-fastapi-shadcn/licenses/fastapi.txt +21 -0
  315. package/templates/react-fastapi-shadcn/licenses/nest.txt +22 -0
  316. package/templates/react-fastapi-shadcn/licenses/next.txt +21 -0
  317. package/templates/react-fastapi-shadcn/licenses/shadcn.txt +21 -0
  318. package/templates/react-fastapi-shadcn/licenses/sources.json +27 -0
  319. package/templates/react-fastapi-shadcn/licenses/spring.txt +202 -0
  320. package/templates/react-fastapi-shadcn/package-lock.json +494 -0
  321. package/templates/react-fastapi-shadcn/package.json +26 -0
  322. package/templates/react-fastapi-shadcn/playwright.config.ts +3 -0
  323. package/templates/react-fastapi-shadcn/project.json +8 -0
  324. package/templates/react-fastapi-shadcn/scripts/api-check.mjs +18 -0
  325. package/templates/react-fastapi-shadcn/scripts/api-contract.mjs +46 -0
  326. package/templates/react-fastapi-shadcn/scripts/design-coverage.mjs +20 -0
  327. package/templates/react-fastapi-shadcn/scripts/design-next-cleanup.mjs +13 -0
  328. package/templates/react-fastapi-shadcn/scripts/design-verify.mjs +154 -0
  329. package/templates/react-fastapi-shadcn/scripts/design.mjs +108 -0
  330. package/templates/react-fastapi-shadcn/scripts/project.mjs +120 -0
  331. package/templates/react-fastapi-shadcn/tests/contract-client.ts +20 -0
  332. package/templates/react-fastapi-shadcn/tests/contract.spec.ts +49 -0
  333. package/templates/react-fastapi-shadcn/tests/design/harness.tsx +63 -0
  334. package/templates/react-fastapi-shadcn/tests/ui.spec.ts +61 -0
  335. package/templates/react-fastapi-shadcn/web/bun.lock +413 -0
  336. package/templates/react-fastapi-shadcn/web/eslint.config.mjs +3 -0
  337. package/templates/react-fastapi-shadcn/web/index.html +1 -0
  338. package/templates/react-fastapi-shadcn/web/package.json +33 -0
  339. package/templates/react-fastapi-shadcn/web/src/App.tsx +30 -0
  340. package/templates/react-fastapi-shadcn/web/src/design-layout.css +7 -0
  341. package/templates/react-fastapi-shadcn/web/src/design-runtime.json +511 -0
  342. package/templates/react-fastapi-shadcn/web/src/design-tokens.css +168 -0
  343. package/templates/react-fastapi-shadcn/web/src/design-widgets.css +31 -0
  344. package/templates/react-fastapi-shadcn/web/src/main.tsx +6 -0
  345. package/templates/react-fastapi-shadcn/web/src/structure-view.tsx +16 -0
  346. package/templates/react-fastapi-shadcn/web/src/styles.css +3 -0
  347. package/templates/react-fastapi-shadcn/web/src/tailwind.css +2 -0
  348. package/templates/react-fastapi-shadcn/web/src/ui.tsx +13 -0
  349. package/templates/react-fastapi-shadcn/web/src/widget-icon.tsx +5 -0
  350. package/templates/react-fastapi-shadcn/web/src/widget-types.ts +13 -0
  351. package/templates/react-fastapi-shadcn/web/src/workspace-model.ts +85 -0
  352. package/templates/react-fastapi-shadcn/web/tsconfig.json +22 -0
  353. package/templates/react-fastapi-shadcn/web/vite.config.ts +4 -0
  354. package/templates/react-nest-antd/.agents/skills/design-contract/SKILL.md +23 -0
  355. package/templates/react-nest-antd/.agents/skills/project-work/SKILL.md +10 -0
  356. package/templates/react-nest-antd/.claude/skills/design-contract/SKILL.md +23 -0
  357. package/templates/react-nest-antd/.claude/skills/project-work/SKILL.md +10 -0
  358. package/templates/react-nest-antd/.dockerignore +18 -0
  359. package/templates/react-nest-antd/.env.example +13 -0
  360. package/templates/react-nest-antd/.grok/skills/design-contract/SKILL.md +23 -0
  361. package/templates/react-nest-antd/.grok/skills/project-work/SKILL.md +10 -0
  362. package/templates/react-nest-antd/.scaffold-checks.json +7 -0
  363. package/templates/react-nest-antd/AGENTS.md +11 -0
  364. package/templates/react-nest-antd/CLAUDE.md +1 -0
  365. package/templates/react-nest-antd/DESIGN.md +208 -0
  366. package/templates/react-nest-antd/LICENSE +21 -0
  367. package/templates/react-nest-antd/README.md +64 -0
  368. package/templates/react-nest-antd/THIRD_PARTY_NOTICES.md +18 -0
  369. package/templates/react-nest-antd/backend/Dockerfile +12 -0
  370. package/templates/react-nest-antd/backend/eslint.config.mjs +3 -0
  371. package/templates/react-nest-antd/backend/jest.config.cjs +1 -0
  372. package/templates/react-nest-antd/backend/package.json +40 -0
  373. package/templates/react-nest-antd/backend/pnpm-lock.yaml +5165 -0
  374. package/templates/react-nest-antd/backend/pnpm-workspace.yaml +6 -0
  375. package/templates/react-nest-antd/backend/prisma/migrations/202610190001_initial/migration.sql +3 -0
  376. package/templates/react-nest-antd/backend/prisma/migrations/migration_lock.toml +1 -0
  377. package/templates/react-nest-antd/backend/prisma/schema.prisma +25 -0
  378. package/templates/react-nest-antd/backend/scripts/seed.ts +4 -0
  379. package/templates/react-nest-antd/backend/src/app.module.ts +43 -0
  380. package/templates/react-nest-antd/backend/src/main.ts +6 -0
  381. package/templates/react-nest-antd/backend/src/password.ts +3 -0
  382. package/templates/react-nest-antd/backend/src/validation.ts +7 -0
  383. package/templates/react-nest-antd/backend/test/api.test.ts +25 -0
  384. package/templates/react-nest-antd/backend/tsconfig.build.json +15 -0
  385. package/templates/react-nest-antd/backend/tsconfig.json +17 -0
  386. package/templates/react-nest-antd/compose.yaml +18 -0
  387. package/templates/react-nest-antd/design/guide.md +61 -0
  388. package/templates/react-nest-antd/design/layout.css +6 -0
  389. package/templates/react-nest-antd/design/structure.json +107 -0
  390. package/templates/react-nest-antd/design/tokens.json +171 -0
  391. package/templates/react-nest-antd/design/widgets.css +30 -0
  392. package/templates/react-nest-antd/design/widgets.json +233 -0
  393. package/templates/react-nest-antd/docs/PROJECT.md +32 -0
  394. package/templates/react-nest-antd/docs/api.d.ts +544 -0
  395. package/templates/react-nest-antd/docs/openapi.json +461 -0
  396. package/templates/react-nest-antd/gitignore.template +19 -0
  397. package/templates/react-nest-antd/licenses/fastapi.txt +21 -0
  398. package/templates/react-nest-antd/licenses/nest.txt +22 -0
  399. package/templates/react-nest-antd/licenses/next.txt +21 -0
  400. package/templates/react-nest-antd/licenses/shadcn.txt +21 -0
  401. package/templates/react-nest-antd/licenses/sources.json +27 -0
  402. package/templates/react-nest-antd/licenses/spring.txt +202 -0
  403. package/templates/react-nest-antd/package-lock.json +494 -0
  404. package/templates/react-nest-antd/package.json +26 -0
  405. package/templates/react-nest-antd/playwright.config.ts +3 -0
  406. package/templates/react-nest-antd/project.json +8 -0
  407. package/templates/react-nest-antd/scripts/api-check.mjs +18 -0
  408. package/templates/react-nest-antd/scripts/api-contract.mjs +46 -0
  409. package/templates/react-nest-antd/scripts/design-coverage.mjs +20 -0
  410. package/templates/react-nest-antd/scripts/design-next-cleanup.mjs +13 -0
  411. package/templates/react-nest-antd/scripts/design-verify.mjs +154 -0
  412. package/templates/react-nest-antd/scripts/design.mjs +108 -0
  413. package/templates/react-nest-antd/scripts/project.mjs +120 -0
  414. package/templates/react-nest-antd/tests/contract-client.ts +20 -0
  415. package/templates/react-nest-antd/tests/contract.spec.ts +49 -0
  416. package/templates/react-nest-antd/tests/design/harness.tsx +63 -0
  417. package/templates/react-nest-antd/tests/ui.spec.ts +61 -0
  418. package/templates/react-nest-antd/web/eslint.config.mjs +3 -0
  419. package/templates/react-nest-antd/web/index.html +1 -0
  420. package/templates/react-nest-antd/web/package.json +28 -0
  421. package/templates/react-nest-antd/web/pnpm-lock.yaml +2215 -0
  422. package/templates/react-nest-antd/web/src/App.tsx +29 -0
  423. package/templates/react-nest-antd/web/src/design-layout.css +7 -0
  424. package/templates/react-nest-antd/web/src/design-runtime.json +511 -0
  425. package/templates/react-nest-antd/web/src/design-tokens.css +168 -0
  426. package/templates/react-nest-antd/web/src/design-widgets.css +31 -0
  427. package/templates/react-nest-antd/web/src/main.tsx +6 -0
  428. package/templates/react-nest-antd/web/src/structure-view.tsx +16 -0
  429. package/templates/react-nest-antd/web/src/styles.css +3 -0
  430. package/templates/react-nest-antd/web/src/ui.tsx +30 -0
  431. package/templates/react-nest-antd/web/src/widget-icon.tsx +5 -0
  432. package/templates/react-nest-antd/web/src/widget-types.ts +13 -0
  433. package/templates/react-nest-antd/web/src/workspace-model.ts +85 -0
  434. package/templates/react-nest-antd/web/tsconfig.json +22 -0
  435. package/templates/react-nest-antd/web/vite.config.ts +3 -0
  436. package/templates/react-nest-shadcn/.agents/skills/design-contract/SKILL.md +23 -0
  437. package/templates/react-nest-shadcn/.agents/skills/project-work/SKILL.md +10 -0
  438. package/templates/react-nest-shadcn/.claude/skills/design-contract/SKILL.md +23 -0
  439. package/templates/react-nest-shadcn/.claude/skills/project-work/SKILL.md +10 -0
  440. package/templates/react-nest-shadcn/.dockerignore +18 -0
  441. package/templates/react-nest-shadcn/.env.example +13 -0
  442. package/templates/react-nest-shadcn/.grok/skills/design-contract/SKILL.md +23 -0
  443. package/templates/react-nest-shadcn/.grok/skills/project-work/SKILL.md +10 -0
  444. package/templates/react-nest-shadcn/.scaffold-checks.json +7 -0
  445. package/templates/react-nest-shadcn/AGENTS.md +11 -0
  446. package/templates/react-nest-shadcn/CLAUDE.md +1 -0
  447. package/templates/react-nest-shadcn/DESIGN.md +208 -0
  448. package/templates/react-nest-shadcn/LICENSE +21 -0
  449. package/templates/react-nest-shadcn/README.md +64 -0
  450. package/templates/react-nest-shadcn/THIRD_PARTY_NOTICES.md +18 -0
  451. package/templates/react-nest-shadcn/backend/Dockerfile +12 -0
  452. package/templates/react-nest-shadcn/backend/eslint.config.mjs +3 -0
  453. package/templates/react-nest-shadcn/backend/jest.config.cjs +1 -0
  454. package/templates/react-nest-shadcn/backend/package.json +40 -0
  455. package/templates/react-nest-shadcn/backend/pnpm-lock.yaml +5165 -0
  456. package/templates/react-nest-shadcn/backend/pnpm-workspace.yaml +6 -0
  457. package/templates/react-nest-shadcn/backend/prisma/migrations/202610190001_initial/migration.sql +3 -0
  458. package/templates/react-nest-shadcn/backend/prisma/migrations/migration_lock.toml +1 -0
  459. package/templates/react-nest-shadcn/backend/prisma/schema.prisma +25 -0
  460. package/templates/react-nest-shadcn/backend/scripts/seed.ts +4 -0
  461. package/templates/react-nest-shadcn/backend/src/app.module.ts +43 -0
  462. package/templates/react-nest-shadcn/backend/src/main.ts +6 -0
  463. package/templates/react-nest-shadcn/backend/src/password.ts +3 -0
  464. package/templates/react-nest-shadcn/backend/src/validation.ts +7 -0
  465. package/templates/react-nest-shadcn/backend/test/api.test.ts +25 -0
  466. package/templates/react-nest-shadcn/backend/tsconfig.build.json +15 -0
  467. package/templates/react-nest-shadcn/backend/tsconfig.json +17 -0
  468. package/templates/react-nest-shadcn/compose.yaml +18 -0
  469. package/templates/react-nest-shadcn/design/guide.md +61 -0
  470. package/templates/react-nest-shadcn/design/layout.css +6 -0
  471. package/templates/react-nest-shadcn/design/structure.json +107 -0
  472. package/templates/react-nest-shadcn/design/tokens.json +171 -0
  473. package/templates/react-nest-shadcn/design/widgets.css +30 -0
  474. package/templates/react-nest-shadcn/design/widgets.json +233 -0
  475. package/templates/react-nest-shadcn/docs/PROJECT.md +32 -0
  476. package/templates/react-nest-shadcn/docs/api.d.ts +544 -0
  477. package/templates/react-nest-shadcn/docs/openapi.json +461 -0
  478. package/templates/react-nest-shadcn/gitignore.template +19 -0
  479. package/templates/react-nest-shadcn/licenses/fastapi.txt +21 -0
  480. package/templates/react-nest-shadcn/licenses/nest.txt +22 -0
  481. package/templates/react-nest-shadcn/licenses/next.txt +21 -0
  482. package/templates/react-nest-shadcn/licenses/shadcn.txt +21 -0
  483. package/templates/react-nest-shadcn/licenses/sources.json +27 -0
  484. package/templates/react-nest-shadcn/licenses/spring.txt +202 -0
  485. package/templates/react-nest-shadcn/package-lock.json +494 -0
  486. package/templates/react-nest-shadcn/package.json +26 -0
  487. package/templates/react-nest-shadcn/playwright.config.ts +3 -0
  488. package/templates/react-nest-shadcn/project.json +8 -0
  489. package/templates/react-nest-shadcn/scripts/api-check.mjs +18 -0
  490. package/templates/react-nest-shadcn/scripts/api-contract.mjs +46 -0
  491. package/templates/react-nest-shadcn/scripts/design-coverage.mjs +20 -0
  492. package/templates/react-nest-shadcn/scripts/design-next-cleanup.mjs +13 -0
  493. package/templates/react-nest-shadcn/scripts/design-verify.mjs +154 -0
  494. package/templates/react-nest-shadcn/scripts/design.mjs +108 -0
  495. package/templates/react-nest-shadcn/scripts/project.mjs +120 -0
  496. package/templates/react-nest-shadcn/tests/contract-client.ts +20 -0
  497. package/templates/react-nest-shadcn/tests/contract.spec.ts +49 -0
  498. package/templates/react-nest-shadcn/tests/design/harness.tsx +63 -0
  499. package/templates/react-nest-shadcn/tests/ui.spec.ts +61 -0
  500. package/templates/react-nest-shadcn/web/eslint.config.mjs +3 -0
  501. package/templates/react-nest-shadcn/web/index.html +1 -0
  502. package/templates/react-nest-shadcn/web/package.json +33 -0
  503. package/templates/react-nest-shadcn/web/pnpm-lock.yaml +1788 -0
  504. package/templates/react-nest-shadcn/web/src/App.tsx +30 -0
  505. package/templates/react-nest-shadcn/web/src/design-layout.css +7 -0
  506. package/templates/react-nest-shadcn/web/src/design-runtime.json +511 -0
  507. package/templates/react-nest-shadcn/web/src/design-tokens.css +168 -0
  508. package/templates/react-nest-shadcn/web/src/design-widgets.css +31 -0
  509. package/templates/react-nest-shadcn/web/src/main.tsx +6 -0
  510. package/templates/react-nest-shadcn/web/src/structure-view.tsx +16 -0
  511. package/templates/react-nest-shadcn/web/src/styles.css +3 -0
  512. package/templates/react-nest-shadcn/web/src/tailwind.css +2 -0
  513. package/templates/react-nest-shadcn/web/src/ui.tsx +13 -0
  514. package/templates/react-nest-shadcn/web/src/widget-icon.tsx +5 -0
  515. package/templates/react-nest-shadcn/web/src/widget-types.ts +13 -0
  516. package/templates/react-nest-shadcn/web/src/workspace-model.ts +85 -0
  517. package/templates/react-nest-shadcn/web/tsconfig.json +22 -0
  518. package/templates/react-nest-shadcn/web/vite.config.ts +4 -0
  519. package/templates/react-spring-antd/.agents/skills/design-contract/SKILL.md +23 -0
  520. package/templates/react-spring-antd/.agents/skills/project-work/SKILL.md +10 -0
  521. package/templates/react-spring-antd/.claude/skills/design-contract/SKILL.md +23 -0
  522. package/templates/react-spring-antd/.claude/skills/project-work/SKILL.md +10 -0
  523. package/templates/react-spring-antd/.dockerignore +18 -0
  524. package/templates/react-spring-antd/.env.example +13 -0
  525. package/templates/react-spring-antd/.grok/skills/design-contract/SKILL.md +23 -0
  526. package/templates/react-spring-antd/.grok/skills/project-work/SKILL.md +10 -0
  527. package/templates/react-spring-antd/.scaffold-checks.json +7 -0
  528. package/templates/react-spring-antd/AGENTS.md +11 -0
  529. package/templates/react-spring-antd/CLAUDE.md +1 -0
  530. package/templates/react-spring-antd/DESIGN.md +208 -0
  531. package/templates/react-spring-antd/LICENSE +21 -0
  532. package/templates/react-spring-antd/README.md +64 -0
  533. package/templates/react-spring-antd/THIRD_PARTY_NOTICES.md +18 -0
  534. package/templates/react-spring-antd/backend/.mvn/wrapper/maven-wrapper.properties +3 -0
  535. package/templates/react-spring-antd/backend/Dockerfile +11 -0
  536. package/templates/react-spring-antd/backend/mvnw +295 -0
  537. package/templates/react-spring-antd/backend/pom.xml +15 -0
  538. package/templates/react-spring-antd/backend/src/main/java/dev/scaffold/app/Api.java +38 -0
  539. package/templates/react-spring-antd/backend/src/main/java/dev/scaffold/app/AppUser.java +11 -0
  540. package/templates/react-spring-antd/backend/src/main/java/dev/scaffold/app/Application.java +7 -0
  541. package/templates/react-spring-antd/backend/src/main/java/dev/scaffold/app/Errors.java +13 -0
  542. package/templates/react-spring-antd/backend/src/main/java/dev/scaffold/app/PersonalRecord.java +15 -0
  543. package/templates/react-spring-antd/backend/src/main/java/dev/scaffold/app/Records.java +14 -0
  544. package/templates/react-spring-antd/backend/src/main/java/dev/scaffold/app/Security.java +28 -0
  545. package/templates/react-spring-antd/backend/src/main/java/dev/scaffold/app/Seed.java +13 -0
  546. package/templates/react-spring-antd/backend/src/main/java/dev/scaffold/app/Users.java +5 -0
  547. package/templates/react-spring-antd/backend/src/main/resources/application.properties +17 -0
  548. package/templates/react-spring-antd/backend/src/main/resources/db/migration/V1__initial.sql +3 -0
  549. package/templates/react-spring-antd/backend/src/main/resources/openapi.json +461 -0
  550. package/templates/react-spring-antd/backend/src/test/java/dev/scaffold/app/ApiTest.java +28 -0
  551. package/templates/react-spring-antd/backend/src/test/java/dev/scaffold/app/SessionExpiryTest.java +37 -0
  552. package/templates/react-spring-antd/compose.yaml +18 -0
  553. package/templates/react-spring-antd/design/guide.md +61 -0
  554. package/templates/react-spring-antd/design/layout.css +6 -0
  555. package/templates/react-spring-antd/design/structure.json +107 -0
  556. package/templates/react-spring-antd/design/tokens.json +171 -0
  557. package/templates/react-spring-antd/design/widgets.css +30 -0
  558. package/templates/react-spring-antd/design/widgets.json +233 -0
  559. package/templates/react-spring-antd/docs/PROJECT.md +32 -0
  560. package/templates/react-spring-antd/docs/api.d.ts +544 -0
  561. package/templates/react-spring-antd/docs/openapi.json +461 -0
  562. package/templates/react-spring-antd/gitignore.template +19 -0
  563. package/templates/react-spring-antd/licenses/fastapi.txt +21 -0
  564. package/templates/react-spring-antd/licenses/nest.txt +22 -0
  565. package/templates/react-spring-antd/licenses/next.txt +21 -0
  566. package/templates/react-spring-antd/licenses/shadcn.txt +21 -0
  567. package/templates/react-spring-antd/licenses/sources.json +27 -0
  568. package/templates/react-spring-antd/licenses/spring.txt +202 -0
  569. package/templates/react-spring-antd/package-lock.json +494 -0
  570. package/templates/react-spring-antd/package.json +26 -0
  571. package/templates/react-spring-antd/playwright.config.ts +3 -0
  572. package/templates/react-spring-antd/project.json +8 -0
  573. package/templates/react-spring-antd/scripts/api-check.mjs +18 -0
  574. package/templates/react-spring-antd/scripts/api-contract.mjs +46 -0
  575. package/templates/react-spring-antd/scripts/design-coverage.mjs +20 -0
  576. package/templates/react-spring-antd/scripts/design-next-cleanup.mjs +13 -0
  577. package/templates/react-spring-antd/scripts/design-verify.mjs +154 -0
  578. package/templates/react-spring-antd/scripts/design.mjs +108 -0
  579. package/templates/react-spring-antd/scripts/project.mjs +120 -0
  580. package/templates/react-spring-antd/tests/contract-client.ts +20 -0
  581. package/templates/react-spring-antd/tests/contract.spec.ts +49 -0
  582. package/templates/react-spring-antd/tests/design/harness.tsx +63 -0
  583. package/templates/react-spring-antd/tests/ui.spec.ts +61 -0
  584. package/templates/react-spring-antd/web/eslint.config.mjs +3 -0
  585. package/templates/react-spring-antd/web/index.html +1 -0
  586. package/templates/react-spring-antd/web/package.json +28 -0
  587. package/templates/react-spring-antd/web/pnpm-lock.yaml +2215 -0
  588. package/templates/react-spring-antd/web/src/App.tsx +29 -0
  589. package/templates/react-spring-antd/web/src/design-layout.css +7 -0
  590. package/templates/react-spring-antd/web/src/design-runtime.json +511 -0
  591. package/templates/react-spring-antd/web/src/design-tokens.css +168 -0
  592. package/templates/react-spring-antd/web/src/design-widgets.css +31 -0
  593. package/templates/react-spring-antd/web/src/main.tsx +6 -0
  594. package/templates/react-spring-antd/web/src/structure-view.tsx +16 -0
  595. package/templates/react-spring-antd/web/src/styles.css +3 -0
  596. package/templates/react-spring-antd/web/src/ui.tsx +30 -0
  597. package/templates/react-spring-antd/web/src/widget-icon.tsx +5 -0
  598. package/templates/react-spring-antd/web/src/widget-types.ts +13 -0
  599. package/templates/react-spring-antd/web/src/workspace-model.ts +85 -0
  600. package/templates/react-spring-antd/web/tsconfig.json +22 -0
  601. package/templates/react-spring-antd/web/vite.config.ts +3 -0
  602. package/templates/react-spring-shadcn/.agents/skills/design-contract/SKILL.md +23 -0
  603. package/templates/react-spring-shadcn/.agents/skills/project-work/SKILL.md +10 -0
  604. package/templates/react-spring-shadcn/.claude/skills/design-contract/SKILL.md +23 -0
  605. package/templates/react-spring-shadcn/.claude/skills/project-work/SKILL.md +10 -0
  606. package/templates/react-spring-shadcn/.dockerignore +18 -0
  607. package/templates/react-spring-shadcn/.env.example +13 -0
  608. package/templates/react-spring-shadcn/.grok/skills/design-contract/SKILL.md +23 -0
  609. package/templates/react-spring-shadcn/.grok/skills/project-work/SKILL.md +10 -0
  610. package/templates/react-spring-shadcn/.scaffold-checks.json +7 -0
  611. package/templates/react-spring-shadcn/AGENTS.md +11 -0
  612. package/templates/react-spring-shadcn/CLAUDE.md +1 -0
  613. package/templates/react-spring-shadcn/DESIGN.md +208 -0
  614. package/templates/react-spring-shadcn/LICENSE +21 -0
  615. package/templates/react-spring-shadcn/README.md +64 -0
  616. package/templates/react-spring-shadcn/THIRD_PARTY_NOTICES.md +18 -0
  617. package/templates/react-spring-shadcn/backend/.mvn/wrapper/maven-wrapper.properties +3 -0
  618. package/templates/react-spring-shadcn/backend/Dockerfile +11 -0
  619. package/templates/react-spring-shadcn/backend/mvnw +295 -0
  620. package/templates/react-spring-shadcn/backend/pom.xml +15 -0
  621. package/templates/react-spring-shadcn/backend/src/main/java/dev/scaffold/app/Api.java +38 -0
  622. package/templates/react-spring-shadcn/backend/src/main/java/dev/scaffold/app/AppUser.java +11 -0
  623. package/templates/react-spring-shadcn/backend/src/main/java/dev/scaffold/app/Application.java +7 -0
  624. package/templates/react-spring-shadcn/backend/src/main/java/dev/scaffold/app/Errors.java +13 -0
  625. package/templates/react-spring-shadcn/backend/src/main/java/dev/scaffold/app/PersonalRecord.java +15 -0
  626. package/templates/react-spring-shadcn/backend/src/main/java/dev/scaffold/app/Records.java +14 -0
  627. package/templates/react-spring-shadcn/backend/src/main/java/dev/scaffold/app/Security.java +28 -0
  628. package/templates/react-spring-shadcn/backend/src/main/java/dev/scaffold/app/Seed.java +13 -0
  629. package/templates/react-spring-shadcn/backend/src/main/java/dev/scaffold/app/Users.java +5 -0
  630. package/templates/react-spring-shadcn/backend/src/main/resources/application.properties +17 -0
  631. package/templates/react-spring-shadcn/backend/src/main/resources/db/migration/V1__initial.sql +3 -0
  632. package/templates/react-spring-shadcn/backend/src/main/resources/openapi.json +461 -0
  633. package/templates/react-spring-shadcn/backend/src/test/java/dev/scaffold/app/ApiTest.java +28 -0
  634. package/templates/react-spring-shadcn/backend/src/test/java/dev/scaffold/app/SessionExpiryTest.java +37 -0
  635. package/templates/react-spring-shadcn/compose.yaml +18 -0
  636. package/templates/react-spring-shadcn/design/guide.md +61 -0
  637. package/templates/react-spring-shadcn/design/layout.css +6 -0
  638. package/templates/react-spring-shadcn/design/structure.json +107 -0
  639. package/templates/react-spring-shadcn/design/tokens.json +171 -0
  640. package/templates/react-spring-shadcn/design/widgets.css +30 -0
  641. package/templates/react-spring-shadcn/design/widgets.json +233 -0
  642. package/templates/react-spring-shadcn/docs/PROJECT.md +32 -0
  643. package/templates/react-spring-shadcn/docs/api.d.ts +544 -0
  644. package/templates/react-spring-shadcn/docs/openapi.json +461 -0
  645. package/templates/react-spring-shadcn/gitignore.template +19 -0
  646. package/templates/react-spring-shadcn/licenses/fastapi.txt +21 -0
  647. package/templates/react-spring-shadcn/licenses/nest.txt +22 -0
  648. package/templates/react-spring-shadcn/licenses/next.txt +21 -0
  649. package/templates/react-spring-shadcn/licenses/shadcn.txt +21 -0
  650. package/templates/react-spring-shadcn/licenses/sources.json +27 -0
  651. package/templates/react-spring-shadcn/licenses/spring.txt +202 -0
  652. package/templates/react-spring-shadcn/package-lock.json +494 -0
  653. package/templates/react-spring-shadcn/package.json +26 -0
  654. package/templates/react-spring-shadcn/playwright.config.ts +3 -0
  655. package/templates/react-spring-shadcn/project.json +8 -0
  656. package/templates/react-spring-shadcn/scripts/api-check.mjs +18 -0
  657. package/templates/react-spring-shadcn/scripts/api-contract.mjs +46 -0
  658. package/templates/react-spring-shadcn/scripts/design-coverage.mjs +20 -0
  659. package/templates/react-spring-shadcn/scripts/design-next-cleanup.mjs +13 -0
  660. package/templates/react-spring-shadcn/scripts/design-verify.mjs +154 -0
  661. package/templates/react-spring-shadcn/scripts/design.mjs +108 -0
  662. package/templates/react-spring-shadcn/scripts/project.mjs +120 -0
  663. package/templates/react-spring-shadcn/tests/contract-client.ts +20 -0
  664. package/templates/react-spring-shadcn/tests/contract.spec.ts +49 -0
  665. package/templates/react-spring-shadcn/tests/design/harness.tsx +63 -0
  666. package/templates/react-spring-shadcn/tests/ui.spec.ts +61 -0
  667. package/templates/react-spring-shadcn/web/eslint.config.mjs +3 -0
  668. package/templates/react-spring-shadcn/web/index.html +1 -0
  669. package/templates/react-spring-shadcn/web/package.json +33 -0
  670. package/templates/react-spring-shadcn/web/pnpm-lock.yaml +1788 -0
  671. package/templates/react-spring-shadcn/web/src/App.tsx +30 -0
  672. package/templates/react-spring-shadcn/web/src/design-layout.css +7 -0
  673. package/templates/react-spring-shadcn/web/src/design-runtime.json +511 -0
  674. package/templates/react-spring-shadcn/web/src/design-tokens.css +168 -0
  675. package/templates/react-spring-shadcn/web/src/design-widgets.css +31 -0
  676. package/templates/react-spring-shadcn/web/src/main.tsx +6 -0
  677. package/templates/react-spring-shadcn/web/src/structure-view.tsx +16 -0
  678. package/templates/react-spring-shadcn/web/src/styles.css +3 -0
  679. package/templates/react-spring-shadcn/web/src/tailwind.css +2 -0
  680. package/templates/react-spring-shadcn/web/src/ui.tsx +13 -0
  681. package/templates/react-spring-shadcn/web/src/widget-icon.tsx +5 -0
  682. package/templates/react-spring-shadcn/web/src/widget-types.ts +13 -0
  683. package/templates/react-spring-shadcn/web/src/workspace-model.ts +85 -0
  684. package/templates/react-spring-shadcn/web/tsconfig.json +22 -0
  685. package/templates/react-spring-shadcn/web/vite.config.ts +4 -0
package/dist/verify.js ADDED
@@ -0,0 +1,278 @@
1
+ import { diagnose } from './diagnostics.js';
2
+ import { spawn } from 'node:child_process';
3
+ import { mkdir, readFile, writeFile, readdir, lstat } from 'node:fs/promises';
4
+ import { resolve, join, relative } from 'node:path';
5
+ import { randomBytes, randomUUID } from 'node:crypto';
6
+ import { createServer } from 'node:net';
7
+ import { platform, arch } from 'node:os';
8
+ import { jsonFile, specFrom } from './generate.js';
9
+ import { CLI_VERSION, digest, canonical, ScaffoldError } from './model.js';
10
+ const envKeys = ['PATH', 'HOME', 'TMPDIR', 'TMP', 'TEMP', 'JAVA_HOME', 'PNPM_HOME', 'UV_CACHE_DIR', 'COREPACK_HOME', 'DOCKER_HOST', 'DOCKER_CONTEXT', 'XDG_CACHE_HOME'];
11
+ function cleanEnv() { return Object.fromEntries(envKeys.flatMap(k => process.env[k] === undefined ? [] : [[k, process.env[k]]])); }
12
+ async function project(dir) { const m = await jsonFile(join(dir, '.scaffold-manifest.json')); if (m.status !== 'complete')
13
+ throw new ScaffoldError('NOT_INITIALIZED', 'A complete scaffold manifest is required.'); return specFrom(m.normalizedSpec); }
14
+ async function execute(program, args, cwd, env, timeout = 30000, abort) {
15
+ return new Promise(resolveResult => {
16
+ let text = '', timedOut = false, settled = false;
17
+ const c = spawn(program, args, { cwd, env, stdio: ['ignore', 'pipe', 'pipe'], detached: process.platform !== 'win32' });
18
+ const append = (chunk) => { if (text.length < 8_000_000)
19
+ text += chunk.toString('utf8'); };
20
+ c.stdout.on('data', append);
21
+ c.stderr.on('data', append);
22
+ function kill() { if (c.pid)
23
+ try {
24
+ process.kill(process.platform === 'win32' ? c.pid : -c.pid, 'SIGTERM');
25
+ }
26
+ catch { /* Process already exited. */ } }
27
+ const timer = setTimeout(() => { timedOut = true; kill(); }, timeout);
28
+ const hardKill = () => { if (c.pid)
29
+ try {
30
+ process.kill(process.platform === 'win32' ? c.pid : -c.pid, 'SIGKILL');
31
+ }
32
+ catch { /* Already gone. */ } };
33
+ const hardTimer = setTimeout(hardKill, timeout + 5000);
34
+ let abortTimer;
35
+ const onAbort = () => { kill(); abortTimer = setTimeout(hardKill, 5000); };
36
+ abort?.addEventListener('abort', onAbort, { once: true });
37
+ if (abort?.aborted)
38
+ onAbort();
39
+ function finish(code, signal) { if (settled)
40
+ return; settled = true; clearTimeout(timer); clearTimeout(hardTimer); clearTimeout(abortTimer); abort?.removeEventListener('abort', onAbort); resolveResult({ code, signal, output: text + (text.length >= 8_000_000 ? '\n[output truncated]' : ''), timedOut }); }
41
+ c.on('error', error => { append(Buffer.from(`\n${error.code ?? 'SPAWN_ERROR'}: ${error.message}`)); finish(127, null); });
42
+ c.on('close', (code, signal) => finish(code, signal));
43
+ });
44
+ }
45
+ export async function doctor(directory, options = {}) {
46
+ const dir = resolve(directory), spec = await project(dir), env = cleanEnv();
47
+ const needs = [
48
+ { program: 'node', args: ['--version'], label: 'node', remedy: 'Use Node.js 24, then rerun doctor.', accept: output => /^v24\./.test(output.trim()) },
49
+ { program: 'docker', args: ['info', '--format', '{{.ServerVersion}}'], label: 'docker', remedy: 'Start Docker and check that docker info succeeds for the selected context.' },
50
+ { program: 'docker', args: ['compose', 'version', '--short'], label: 'docker compose', remedy: 'Install the Docker Compose v2 plugin, then rerun doctor.' }
51
+ ];
52
+ if (spec.template === 'react-fastapi')
53
+ needs.push({ program: 'uv', args: ['--version'], label: 'uv', remedy: 'Install uv and add it to PATH; setup uses the locked Python 3.12 project.' }, { program: 'bun', args: ['--version'], label: 'bun', remedy: 'Install Bun and add it to PATH for the frontend lockfile.' });
54
+ else
55
+ needs.push({ program: 'pnpm', args: ['--version'], label: 'pnpm', remedy: 'Use pnpm 10 and add it to PATH.', accept: output => /^10\./.test(output.trim()) });
56
+ if (spec.template === 'react-spring')
57
+ needs.push({ program: 'java', args: ['-version'], label: 'java', remedy: 'Use JDK 17 or newer and check JAVA_HOME/PATH.', accept: output => { const major = output.match(/version "(\d+)/)?.[1]; return Number(major) >= 17; } }, { program: 'javac', args: ['-version'], label: 'javac', remedy: 'Install a full JDK 17 or newer (not just a JRE), and put its bin directory on PATH.', accept: output => Number(output.match(/javac (\d+)/)?.[1]) >= 17 });
58
+ const checks = await Promise.all(needs.map(async (need) => {
59
+ const r = await execute(need.program, need.args, dir, env, 15000);
60
+ const ok = r.code === 0 && !r.timedOut && (!need.accept || need.accept(r.output));
61
+ return { program: need.label, ok, version: r.code === 0 ? r.output.trim().split('\n')[0] : 'unavailable', remedy: ok ? null : need.remedy };
62
+ }));
63
+ if (!options.toolsOnly)
64
+ for (const path of ['node_modules/@playwright/test/package.json', 'web/node_modules/react/package.json', ...(spec.template === 'react-nest' ? ['backend/node_modules/@nestjs/core/package.json'] : [])]) {
65
+ try {
66
+ await lstat(join(dir, path));
67
+ checks.push({ program: path, ok: true, version: 'installed', remedy: null });
68
+ }
69
+ catch {
70
+ checks.push({ program: path, ok: false, version: 'not installed', remedy: 'Run npm run setup for local development, or npm run installProject to install dependencies only.' });
71
+ }
72
+ }
73
+ return { ok: checks.every(c => c.ok), scope: options.toolsOnly ? 'tools' : 'tools-and-dependencies', checks, platform: `${platform()}-${arch()}`, template: spec.template };
74
+ }
75
+ const excluded = new Set(['.git', 'node_modules', '.venv', '__pycache__', '.pytest_cache', '.ruff_cache', '.mypy_cache', '.next', 'target', 'dist', 'reports', 'playwright-report', 'test-results', '.scaffold-runs', '.scaffold-local-credentials']);
76
+ export async function contentDigest(dir) {
77
+ const files = [];
78
+ async function visit(at) { for (const e of await readdir(at, { withFileTypes: true })) {
79
+ if (excluded.has(e.name) || e.name === '.env' || e.name.startsWith('.env.') && e.name !== '.env.example' || e.name.endsWith('.tsbuildinfo'))
80
+ continue;
81
+ const full = join(at, e.name);
82
+ if (e.isSymbolicLink())
83
+ throw new ScaffoldError('SYMLINK', 'Evidence cannot follow workspace symbolic links.', 2, relative(dir, full));
84
+ if (e.isDirectory())
85
+ await visit(full);
86
+ else if (e.isFile())
87
+ files.push({ path: relative(dir, full), digest: digest(await readFile(full)) });
88
+ } }
89
+ await visit(dir);
90
+ files.sort((a, b) => a.path.localeCompare(b.path, 'en'));
91
+ return digest(canonical(files));
92
+ }
93
+ async function freePort() { return new Promise((yes, no) => { const s = createServer(); s.on('error', no); s.listen(0, '127.0.0.1', () => { const address = s.address(); if (!address || typeof address === 'string')
94
+ return no(new Error('No port')); const port = address.port; s.close(() => yes(port)); }); }); }
95
+ function redact(text, values) { for (const v of values.filter(v => v.length > 3).sort((a, b) => b.length - a.length))
96
+ text = text.split(v).join('[REDACTED]'); return text.replace(/postgres(?:ql)?:\/\/[^\s"']+/g, '[REDACTED_DATABASE_URL]'); }
97
+ async function nativeReport(reportDir, spec) {
98
+ if (spec.template !== 'react-spring')
99
+ return [join(reportDir, 'native.xml')];
100
+ const folder = join(reportDir, 'spring');
101
+ try {
102
+ return (await readdir(folder)).filter(n => n.startsWith('TEST-') && n.endsWith('.xml')).map(n => join(folder, n));
103
+ }
104
+ catch {
105
+ return [];
106
+ }
107
+ }
108
+ async function executedReports(paths) {
109
+ if (!paths.length)
110
+ return false;
111
+ let executed = 0;
112
+ for (const path of paths) {
113
+ let xml;
114
+ try {
115
+ xml = await readFile(path, 'utf8');
116
+ }
117
+ catch {
118
+ return false;
119
+ }
120
+ const cases = [...xml.matchAll(/<testcase\b[^>]*?(?:\/>|>([\s\S]*?)<\/testcase>)/g)];
121
+ for (const match of cases) {
122
+ const body = match[1] ?? '';
123
+ if (/<(?:failure|error)\b/.test(body))
124
+ return false;
125
+ if (!/<skipped\b/.test(body))
126
+ executed++;
127
+ }
128
+ }
129
+ return executed > 0;
130
+ }
131
+ async function sanitizeArtifacts(folder, secrets) {
132
+ const files = [];
133
+ async function visit(at) {
134
+ for (const entry of await readdir(at, { withFileTypes: true })) {
135
+ const path = join(at, entry.name);
136
+ if (entry.isSymbolicLink())
137
+ throw new Error('Report symbolic link is not allowed');
138
+ if (entry.isDirectory())
139
+ await visit(path);
140
+ else if (entry.isFile()) {
141
+ await writeFile(path, redact(await readFile(path, 'utf8'), secrets), { mode: 0o600 });
142
+ files.push(path);
143
+ }
144
+ }
145
+ }
146
+ await visit(folder);
147
+ return files;
148
+ }
149
+ export async function verify(directory) {
150
+ const dir = resolve(directory), spec = await project(dir), start = new Date().toISOString(), runId = randomUUID();
151
+ const reportDir = join(dir, '.scaffold-runs', runId), artifacts = join(reportDir, 'artifacts');
152
+ await mkdir(artifacts, { recursive: true, mode: 0o700 });
153
+ const beforeDigest = await contentDigest(dir), checks = [], warnings = [];
154
+ const baseEnv = cleanEnv(), secrets = [];
155
+ let containerId = '', interrupted = false, failed = false, incomplete = false, internal = false;
156
+ const abort = new AbortController();
157
+ const interrupt = () => { interrupted = true; abort.abort(); };
158
+ process.once('SIGINT', interrupt);
159
+ process.once('SIGTERM', interrupt);
160
+ const now = () => new Date().toISOString();
161
+ async function check(id, fn) {
162
+ const begin = now();
163
+ process.stderr.write(`[${id}] checking\n`);
164
+ try {
165
+ const { result, evidence = [] } = await fn();
166
+ const log = join(reportDir, `${id}.log`);
167
+ await writeFile(log, redact(result.output, secrets), { mode: 0o600 });
168
+ const ok = result.code === 0 && !result.timedOut && !interrupted;
169
+ checks.push({ id, status: interrupted ? 'NOT RUN' : ok ? 'PASS' : 'FAIL', reason: interrupted ? 'Interrupted' : result.timedOut ? 'Timed out' : ok ? 'Completed' : 'Command failed or required report missing', startedAt: begin, finishedAt: now(), exitCode: result.code, signal: result.signal, evidence: [relative(dir, log), ...evidence], diagnostic: ok ? null : diagnose(id, result.output, { timedOut: result.timedOut, interrupted }) });
170
+ if (!ok && !interrupted)
171
+ failed = true;
172
+ }
173
+ catch (error) {
174
+ const output = redact(error instanceof Error ? error.message : 'Unknown execution error', secrets), log = join(reportDir, `${id}.log`);
175
+ await writeFile(log, output, { mode: 0o600 });
176
+ checks.push({ id, status: interrupted ? 'NOT RUN' : 'FAIL', reason: 'Check could not complete', startedAt: begin, finishedAt: now(), exitCode: null, signal: null, evidence: [relative(dir, log)], diagnostic: diagnose(id, output, { interrupted }) });
177
+ if (!interrupted)
178
+ failed = true;
179
+ }
180
+ }
181
+ function skip(id, reason) { checks.push({ id, status: 'NOT RUN', reason, startedAt: now(), finishedAt: now(), exitCode: null, signal: null, evidence: [] }); incomplete = true; }
182
+ try {
183
+ const prerequisites = await doctor(dir);
184
+ checks.push({ id: 'environment', status: prerequisites.ok ? 'PASS' : 'NOT RUN', reason: prerequisites.ok ? 'Required tools and dependencies available' : prerequisites.checks.filter(c => !c.ok).map(c => c.program).join(', '), startedAt: start, finishedAt: now(), exitCode: prerequisites.ok ? 0 : 3, signal: null, evidence: [] });
185
+ if (!prerequisites.ok)
186
+ incomplete = true;
187
+ const password = randomBytes(24).toString('hex'), secret = randomBytes(32).toString('hex'), seedPassword = randomBytes(18).toString('hex'), bodyMarker = `record-body-${randomUUID()}`;
188
+ secrets.push(password, secret, seedPassword, bodyMarker);
189
+ let env = { ...baseEnv, SCAFFOLD_TEST: '1', SCAFFOLD_REPORT_DIR: artifacts, NODE_ENV: 'test', AUTH_SECRET: secret, SEED_A_EMAIL: `a-${runId}@example.test`, SEED_B_EMAIL: `b-${runId}@example.test`, SEED_PASSWORD: seedPassword, TEST_BODY_MARKER: bodyMarker, NEXT_TELEMETRY_DISABLED: '1', CI: '1' };
190
+ if (!incomplete && !interrupted) {
191
+ await check('database', async () => {
192
+ const creation = await execute('docker', ['run', '--detach', '--name', `agent-scaffold-${runId}`, '--label', `agent-scaffold.run=${runId}`, '-e', 'POSTGRES_PASSWORD', '-e', 'POSTGRES_USER=app', '-e', 'POSTGRES_DB=app', '-p', '127.0.0.1::5432', 'postgres:17.9-alpine@sha256:c7526c0f6c3f30260a563d7bcf8ad778effac59a44f8ffa86678c35418338609'], dir, { ...baseEnv, POSTGRES_PASSWORD: password }, 180000, abort.signal);
193
+ if (creation.code !== 0)
194
+ return { result: creation };
195
+ containerId = creation.output.trim().split('\n').at(-1) ?? '';
196
+ if (!/^[a-f0-9]{64}$/.test(containerId))
197
+ throw new Error('Invalid container id');
198
+ const inspect = await execute('docker', ['inspect', '--format', '{{json .NetworkSettings.Ports}}', containerId], dir, baseEnv);
199
+ const mappings = JSON.parse(inspect.output);
200
+ const mapping = mappings['5432/tcp']?.[0];
201
+ if (inspect.code !== 0 || !mapping || mapping.HostIp !== '127.0.0.1')
202
+ throw new Error('Invalid endpoint');
203
+ const databaseUrl = `postgresql://app:${password}@127.0.0.1:${mapping.HostPort}/app`;
204
+ secrets.push(databaseUrl);
205
+ const contextPath = join(reportDir, 'database.json');
206
+ await writeFile(contextPath, JSON.stringify({ runId, containerId, databaseUrl }), { mode: 0o600 });
207
+ env = { ...env, DATABASE_URL: databaseUrl, SCAFFOLD_TEST_CONTEXT: contextPath, WEB_PORT: String(await freePort()), PORT: String(await freePort()) };
208
+ env.APP_ORIGIN = `http://127.0.0.1:${env.WEB_PORT}`;
209
+ let ready = { code: 1, signal: null, output: 'Database did not become ready', timedOut: false };
210
+ for (let n = 0; n < 30 && !interrupted; n++) {
211
+ ready = await execute('docker', ['exec', containerId, 'pg_isready', '-h', '127.0.0.1', '-U', 'app', '-d', 'app'], dir, baseEnv, 5000, abort.signal);
212
+ if (ready.code === 0)
213
+ break;
214
+ await new Promise(r => setTimeout(r, 1000));
215
+ }
216
+ return { result: ready };
217
+ });
218
+ }
219
+ else
220
+ skip('database', 'Environment unavailable or interrupted');
221
+ for (const id of ['api:check', 'typecheck', 'lint', 'build', 'migrate', 'seed', 'test:native', 'test:api', 'test:e2e']) {
222
+ if (failed || incomplete || interrupted) {
223
+ skip(id, 'A required prerequisite failed or was not run');
224
+ continue;
225
+ }
226
+ await check(id.replace(':', '-'), async () => {
227
+ const reportFile = join(artifacts, id === 'test:api' ? 'api.xml' : 'e2e.xml');
228
+ const result = await execute('node', ['scripts/project.mjs', id], dir, { ...env, PLAYWRIGHT_JUNIT_OUTPUT_FILE: reportFile }, 600000, abort.signal);
229
+ let evidence = [];
230
+ if (id.startsWith('test:')) {
231
+ const required = id === 'test:native' ? await nativeReport(artifacts, spec) : [reportFile];
232
+ const valid = await executedReports(required);
233
+ // Sanitize every produced artifact even on failure or interruption, before publishing evidence.
234
+ const produced = await sanitizeArtifacts(artifacts, secrets);
235
+ evidence = produced.map(path => relative(dir, path));
236
+ if (result.code === 0 && !valid) {
237
+ result.code = 1;
238
+ result.output += '\nRequired report missing, contains failures, or has no executed test cases.';
239
+ }
240
+ }
241
+ return { result, evidence };
242
+ });
243
+ }
244
+ }
245
+ catch (error) {
246
+ internal = true;
247
+ const log = join(reportDir, 'internal.log');
248
+ await writeFile(log, redact(error instanceof Error ? error.message : 'Unknown internal error', secrets), { mode: 0o600 });
249
+ warnings.push('Verification stopped due to an internal error. See ' + relative(dir, log));
250
+ }
251
+ finally {
252
+ // Only delete a container whose immutable ID and run label match this invocation.
253
+ if (containerId) {
254
+ await check('cleanup', async () => { const owner = await execute('docker', ['inspect', '--format', '{{index .Config.Labels "agent-scaffold.run"}}', containerId], dir, baseEnv); if (owner.code !== 0 || owner.output.trim() !== runId)
255
+ throw new Error('Uncertain ownership'); return { result: await execute('docker', ['rm', '-f', containerId], dir, baseEnv, 30000) }; });
256
+ }
257
+ process.removeListener('SIGINT', interrupt);
258
+ process.removeListener('SIGTERM', interrupt);
259
+ }
260
+ const afterDigest = await contentDigest(dir);
261
+ const validity = beforeDigest === afterDigest ? 'CURRENT' : 'STALE';
262
+ if (validity === 'STALE') {
263
+ warnings.push('Workspace content changed during verification; results are not for the current candidate.');
264
+ incomplete = true;
265
+ }
266
+ const exitCode = interrupted ? 130 : internal ? 5 : failed ? 4 : incomplete ? 3 : 0;
267
+ const run = { schemaVersion: 1, runId, template: spec.template, cliVersion: CLI_VERSION, platform: `${platform()}-${arch()}`, runtime: process.version, startedAt: start, finishedAt: now(), beforeDigest, afterDigest, overallStatus: failed || internal ? 'FAIL' : exitCode !== 0 ? 'NOT RUN' : 'PASS', validity, checks, exitCode, warnings };
268
+ await writeFile(join(reportDir, 'result.json'), JSON.stringify(run, null, 2) + '\n', { mode: 0o600 });
269
+ await writeFile(join(dir, '.scaffold-runs/latest.json'), JSON.stringify({ runId }) + '\n', { mode: 0o600 });
270
+ return run;
271
+ }
272
+ export async function report(directory) { const dir = resolve(directory); await project(dir); let latest; try {
273
+ latest = await jsonFile(join(dir, '.scaffold-runs/latest.json'));
274
+ }
275
+ catch {
276
+ return { overallStatus: 'NOT RUN', reason: 'No verification result exists.' };
277
+ } if (!/^[a-f0-9-]{36}$/.test(latest.runId))
278
+ throw new ScaffoldError('INVALID_REPORT', 'Invalid report identifier.'); const result = await jsonFile(join(dir, '.scaffold-runs', latest.runId, 'result.json')); const current = await contentDigest(dir); return { ...result, validity: result.validity === 'CURRENT' && result.afterDigest === current ? 'CURRENT' : 'STALE' }; }
package/package.json CHANGED
@@ -1,6 +1,54 @@
1
1
  {
2
2
  "name": "@cherishxn/agent-scaffold",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.1.0",
4
+ "type": "module",
5
+ "description": "Deterministic project scaffolding for coding agents",
6
+ "bin": {
7
+ "scaffold": "dist/cli.js"
8
+ },
9
+ "engines": {
10
+ "node": ">=24 <25"
11
+ },
12
+ "files": [
13
+ "dist",
14
+ "templates",
15
+ "schemas",
16
+ "skills",
17
+ "README.md",
18
+ "LICENSE",
19
+ "THIRD_PARTY_NOTICES.md"
20
+ ],
21
+ "scripts": {
22
+ "build": "node scripts/materialize.mjs && tsc && node scripts/catalog.mjs",
23
+ "typecheck": "tsc --noEmit",
24
+ "lint": "eslint src tests",
25
+ "test": "npm run build && vitest run",
26
+ "check": "npm run typecheck && npm run lint && npm test",
27
+ "prepack": "npm run build",
28
+ "matrix": "node scripts/matrix.mjs",
29
+ "test:interactive": "python3 scripts/test-interactive.py",
30
+ "test:package": "node scripts/test-package.mjs",
31
+ "design:verify": "npm run build && node scripts/design-matrix.mjs",
32
+ "test:onboarding": "node scripts/test-onboarding.mjs",
33
+ "eval:codex": "node scripts/eval-codex.mjs"
34
+ },
35
+ "dependencies": {
36
+ "ajv": "8.20.0",
37
+ "commander": "15.0.0"
38
+ },
39
+ "devDependencies": {
40
+ "@eslint/js": "10.0.1",
41
+ "@google/design.md": "0.4.0",
42
+ "@types/node": "24.19.2",
43
+ "ajv-formats": "3.0.1",
44
+ "eslint": "10.13.0",
45
+ "openapi-typescript": "7.13.0",
46
+ "typescript": "5.9.3",
47
+ "typescript-eslint": "8.71.2",
48
+ "vitest": "5.0.5"
49
+ },
50
+ "publishConfig": {
51
+ "access": "public",
52
+ "registry": "https://registry.npmjs.org/"
53
+ }
54
+ }
@@ -0,0 +1,171 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "additionalProperties": false,
5
+ "required": [
6
+ "schemaVersion",
7
+ "cliVersion",
8
+ "templateId",
9
+ "templateVersion",
10
+ "templateDigest",
11
+ "normalizedSpec",
12
+ "files",
13
+ "nextActions",
14
+ "planDigest",
15
+ "status"
16
+ ],
17
+ "properties": {
18
+ "schemaVersion": {
19
+ "const": 1
20
+ },
21
+ "cliVersion": {
22
+ "type": "string"
23
+ },
24
+ "templateId": {
25
+ "enum": [
26
+ "react-fastapi",
27
+ "react-spring",
28
+ "react-nest",
29
+ "next-fullstack"
30
+ ]
31
+ },
32
+ "templateVersion": {
33
+ "type": "string"
34
+ },
35
+ "templateDigest": {
36
+ "type": "string",
37
+ "pattern": "^[a-f0-9]{64}$"
38
+ },
39
+ "normalizedSpec": {
40
+ "$schema": "http://json-schema.org/draft-07/schema#",
41
+ "type": "object",
42
+ "additionalProperties": false,
43
+ "required": [
44
+ "schemaVersion",
45
+ "nameZh",
46
+ "nameEn",
47
+ "description",
48
+ "template",
49
+ "ui"
50
+ ],
51
+ "properties": {
52
+ "schemaVersion": {
53
+ "const": 1
54
+ },
55
+ "nameZh": {
56
+ "type": "string",
57
+ "minLength": 1,
58
+ "maxLength": 120,
59
+ "pattern": "^[^\\r\\n\\x00-\\x1f]+$"
60
+ },
61
+ "nameEn": {
62
+ "type": "string",
63
+ "minLength": 1,
64
+ "maxLength": 50,
65
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$"
66
+ },
67
+ "description": {
68
+ "type": "string",
69
+ "minLength": 1,
70
+ "maxLength": 1000,
71
+ "pattern": "^[^\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f]+$"
72
+ },
73
+ "template": {
74
+ "enum": [
75
+ "react-fastapi",
76
+ "react-spring",
77
+ "react-nest",
78
+ "next-fullstack"
79
+ ]
80
+ },
81
+ "ui": {
82
+ "enum": [
83
+ "shadcn",
84
+ "antd"
85
+ ]
86
+ }
87
+ }
88
+ },
89
+ "files": {
90
+ "type": "array",
91
+ "items": {
92
+ "type": "object",
93
+ "additionalProperties": false,
94
+ "required": [
95
+ "path",
96
+ "source",
97
+ "digest",
98
+ "mode"
99
+ ],
100
+ "properties": {
101
+ "path": {
102
+ "type": "string"
103
+ },
104
+ "source": {
105
+ "type": "string"
106
+ },
107
+ "digest": {
108
+ "type": "string",
109
+ "pattern": "^[a-f0-9]{64}$"
110
+ },
111
+ "mode": {
112
+ "enum": [
113
+ 420,
114
+ 493
115
+ ]
116
+ }
117
+ }
118
+ }
119
+ },
120
+ "nextActions": {
121
+ "type": "array",
122
+ "items": {
123
+ "type": "object",
124
+ "additionalProperties": false,
125
+ "required": [
126
+ "program",
127
+ "args",
128
+ "cwd",
129
+ "prerequisites",
130
+ "sideEffects"
131
+ ],
132
+ "properties": {
133
+ "program": {
134
+ "type": "string"
135
+ },
136
+ "args": {
137
+ "type": "array",
138
+ "items": {
139
+ "type": "string"
140
+ }
141
+ },
142
+ "cwd": {
143
+ "type": "string"
144
+ },
145
+ "prerequisites": {
146
+ "type": "array",
147
+ "items": {
148
+ "type": "string"
149
+ }
150
+ },
151
+ "sideEffects": {
152
+ "type": "array",
153
+ "items": {
154
+ "type": "string"
155
+ }
156
+ }
157
+ }
158
+ }
159
+ },
160
+ "planDigest": {
161
+ "type": "string",
162
+ "pattern": "^[a-f0-9]{64}$"
163
+ },
164
+ "status": {
165
+ "enum": [
166
+ "generating",
167
+ "complete"
168
+ ]
169
+ }
170
+ }
171
+ }
@@ -0,0 +1,164 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "additionalProperties": false,
5
+ "required": [
6
+ "schemaVersion",
7
+ "cliVersion",
8
+ "templateId",
9
+ "templateVersion",
10
+ "templateDigest",
11
+ "normalizedSpec",
12
+ "files",
13
+ "nextActions",
14
+ "planDigest"
15
+ ],
16
+ "properties": {
17
+ "schemaVersion": {
18
+ "const": 1
19
+ },
20
+ "cliVersion": {
21
+ "type": "string"
22
+ },
23
+ "templateId": {
24
+ "enum": [
25
+ "react-fastapi",
26
+ "react-spring",
27
+ "react-nest",
28
+ "next-fullstack"
29
+ ]
30
+ },
31
+ "templateVersion": {
32
+ "type": "string"
33
+ },
34
+ "templateDigest": {
35
+ "type": "string",
36
+ "pattern": "^[a-f0-9]{64}$"
37
+ },
38
+ "normalizedSpec": {
39
+ "$schema": "http://json-schema.org/draft-07/schema#",
40
+ "type": "object",
41
+ "additionalProperties": false,
42
+ "required": [
43
+ "schemaVersion",
44
+ "nameZh",
45
+ "nameEn",
46
+ "description",
47
+ "template",
48
+ "ui"
49
+ ],
50
+ "properties": {
51
+ "schemaVersion": {
52
+ "const": 1
53
+ },
54
+ "nameZh": {
55
+ "type": "string",
56
+ "minLength": 1,
57
+ "maxLength": 120,
58
+ "pattern": "^[^\\r\\n\\x00-\\x1f]+$"
59
+ },
60
+ "nameEn": {
61
+ "type": "string",
62
+ "minLength": 1,
63
+ "maxLength": 50,
64
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$"
65
+ },
66
+ "description": {
67
+ "type": "string",
68
+ "minLength": 1,
69
+ "maxLength": 1000,
70
+ "pattern": "^[^\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f]+$"
71
+ },
72
+ "template": {
73
+ "enum": [
74
+ "react-fastapi",
75
+ "react-spring",
76
+ "react-nest",
77
+ "next-fullstack"
78
+ ]
79
+ },
80
+ "ui": {
81
+ "enum": [
82
+ "shadcn",
83
+ "antd"
84
+ ]
85
+ }
86
+ }
87
+ },
88
+ "files": {
89
+ "type": "array",
90
+ "items": {
91
+ "type": "object",
92
+ "additionalProperties": false,
93
+ "required": [
94
+ "path",
95
+ "source",
96
+ "digest",
97
+ "mode"
98
+ ],
99
+ "properties": {
100
+ "path": {
101
+ "type": "string"
102
+ },
103
+ "source": {
104
+ "type": "string"
105
+ },
106
+ "digest": {
107
+ "type": "string",
108
+ "pattern": "^[a-f0-9]{64}$"
109
+ },
110
+ "mode": {
111
+ "enum": [
112
+ 420,
113
+ 493
114
+ ]
115
+ }
116
+ }
117
+ }
118
+ },
119
+ "nextActions": {
120
+ "type": "array",
121
+ "items": {
122
+ "type": "object",
123
+ "additionalProperties": false,
124
+ "required": [
125
+ "program",
126
+ "args",
127
+ "cwd",
128
+ "prerequisites",
129
+ "sideEffects"
130
+ ],
131
+ "properties": {
132
+ "program": {
133
+ "type": "string"
134
+ },
135
+ "args": {
136
+ "type": "array",
137
+ "items": {
138
+ "type": "string"
139
+ }
140
+ },
141
+ "cwd": {
142
+ "type": "string"
143
+ },
144
+ "prerequisites": {
145
+ "type": "array",
146
+ "items": {
147
+ "type": "string"
148
+ }
149
+ },
150
+ "sideEffects": {
151
+ "type": "array",
152
+ "items": {
153
+ "type": "string"
154
+ }
155
+ }
156
+ }
157
+ }
158
+ },
159
+ "planDigest": {
160
+ "type": "string",
161
+ "pattern": "^[a-f0-9]{64}$"
162
+ }
163
+ }
164
+ }