@donotdev/cli 0.1.0 → 0.1.42
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.
- package/LICENSE.md +1 -1
- package/README.md +0 -0
- package/dependencies-matrix.json +175 -72
- package/dist/bin/commands/agent-setup.js +936 -428
- package/dist/bin/commands/build.js +4363 -883
- package/dist/bin/commands/bump.js +1296 -780
- package/dist/bin/commands/cacheout.js +494 -363
- package/dist/bin/commands/coach.js +632 -431
- package/dist/bin/commands/create-app.js +1316 -799
- package/dist/bin/commands/create-project.js +1355 -827
- package/dist/bin/commands/db.js +26158 -18868
- package/dist/bin/commands/deploy.js +5983 -1971
- package/dist/bin/commands/dev.js +1223 -657
- package/dist/bin/commands/doctor.js +1100 -528
- package/dist/bin/commands/emu.js +1380 -757
- package/dist/bin/commands/format.js +494 -363
- package/dist/bin/commands/get-demo.js +1210 -715
- package/dist/bin/commands/make-admin.js +16073 -8700
- package/dist/bin/commands/preview.js +1227 -658
- package/dist/bin/commands/seed.js +26171 -18881
- package/dist/bin/commands/setup-cicd.js +1475 -880
- package/dist/bin/commands/setup.js +1574 -956
- package/dist/bin/commands/staging.js +5984 -1972
- package/dist/bin/commands/sync-secrets.js +1423 -676
- package/dist/bin/commands/type-check.js +976 -469
- package/dist/bin/commands/wai.js +499 -368
- package/dist/bin/dndev.js +43 -19
- package/dist/bin/donotdev.js +43 -19
- package/dist/index.js +6166 -2133
- package/guidelines/DEPENDENCIES.md +155 -0
- package/{templates/root-consumer/guides/dndev/advanced/VERSION_CONTROL.md.example → guidelines/VERSION_CONTROL.md} +7 -11
- package/package.json +2 -1
- package/templates/app-demo/.env.example +1 -1
- package/templates/app-demo/entities/Contact.ts.example +0 -0
- package/templates/app-demo/entities/ExampleEntity.ts.example +0 -0
- package/templates/app-demo/entities/demo.ts.example +0 -0
- package/templates/app-demo/index.html.example +0 -0
- package/templates/app-demo/public/apple-touch-icon.png.example +0 -0
- package/templates/app-demo/public/fonts/fonts.css.example +0 -0
- package/templates/app-demo/public/icon-192x192.png.example +0 -0
- package/templates/app-demo/public/icon-512x512.png.example +0 -0
- package/templates/app-demo/src/App.tsx.example +0 -0
- package/templates/app-demo/src/config/app.ts.example +0 -0
- package/templates/app-demo/src/entities/booking.ts.example +0 -0
- package/templates/app-demo/src/entities/onboarding.ts.example +0 -0
- package/templates/app-demo/src/entities/product.ts.example +0 -0
- package/templates/app-demo/src/entities/quote.ts.example +0 -0
- package/templates/app-demo/src/globals.css.example +0 -0
- package/templates/app-demo/src/main.tsx.example +0 -0
- package/templates/app-demo/src/pages/ChangelogPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/ConditionalFormPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/DashboardPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/HomePage.tsx.example +0 -0
- package/templates/app-demo/src/pages/OnboardingPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/PricingPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/ProductsPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/ProfilePage.tsx.example +0 -0
- package/templates/app-demo/src/pages/SettingsPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/ShowcaseDetailPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/ShowcasePage.tsx.example +0 -0
- package/templates/app-demo/src/pages/components/ComponentRenderer.tsx.example +0 -0
- package/templates/app-demo/src/pages/components/ComponentsData.tsx.example +0 -0
- package/templates/app-demo/src/pages/components/componentConfig.ts.example +0 -0
- package/templates/app-demo/src/pages/legal/LegalPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/legal/PrivacyPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/legal/TermsPage.tsx.example +0 -0
- package/templates/app-demo/src/themes.css.example +27 -0
- package/templates/app-demo/tsconfig.json.example +0 -0
- package/templates/app-demo/vite.config.ts.example +0 -0
- package/templates/app-dndev/index.html.example +0 -3
- package/templates/app-dndev/src/App.tsx.example +0 -0
- package/templates/app-dndev/src/components/CockpitLayout.css.example +0 -0
- package/templates/app-dndev/src/components/CockpitLayout.tsx.example +0 -0
- package/templates/app-dndev/src/components/Kanban.css.example +0 -0
- package/templates/app-dndev/src/components/ModeToggle.tsx.example +0 -0
- package/templates/app-dndev/src/components/OverlaySlot.tsx.example +0 -0
- package/templates/app-dndev/src/components/TerminalPanel.css.example +0 -0
- package/templates/app-dndev/src/components/TerminalPanel.tsx.example +0 -0
- package/templates/app-dndev/src/components/markdown-prose.css.example +0 -0
- package/templates/app-dndev/src/components/phases/CaptainLog.tsx.example +0 -0
- package/templates/app-dndev/src/components/phases/ContextTabs.tsx.example +0 -0
- package/templates/app-dndev/src/components/phases/PhaseCard.tsx.example +0 -0
- package/templates/app-dndev/src/components/phases/PhaseDetail.tsx.example +0 -0
- package/templates/app-dndev/src/components/phases/ReviewPanel.tsx.example +0 -0
- package/templates/app-dndev/src/components/phases/phaseData.ts.example +0 -0
- package/templates/app-dndev/src/config/app.ts.example +0 -0
- package/templates/app-dndev/src/config/commands.ts.example +0 -0
- package/templates/app-dndev/src/config/legal.ts.example +0 -0
- package/templates/app-dndev/src/config/providers.ts.example +1 -1
- package/templates/app-dndev/src/globals.css.example +0 -0
- package/templates/app-dndev/src/hooks/useDndevFile.ts.example +0 -0
- package/templates/app-dndev/src/main.tsx.example +0 -0
- package/templates/app-dndev/src/pages/BoardPage.tsx.example +0 -0
- package/templates/app-dndev/src/pages/GrillPage.tsx.example +0 -0
- package/templates/app-dndev/src/pages/HomePage.tsx.example +0 -0
- package/templates/app-dndev/src/pages/NotFoundPage.tsx.example +0 -0
- package/templates/app-dndev/src/pages/PhasesPage.tsx.example +0 -0
- package/templates/app-dndev/src/pages/SettingsPage.tsx.example +0 -0
- package/templates/app-dndev/src/pages/legal/LegalNoticePage.tsx.example +0 -0
- package/templates/app-dndev/src/pages/legal/PrivacyPage.tsx.example +0 -0
- package/templates/app-dndev/src/pages/legal/TermsPage.tsx.example +0 -0
- package/templates/app-dndev/src/stores/dndevStore.ts.example +0 -0
- package/templates/app-dndev/src/themes.css.example +26 -0
- package/templates/app-dndev/terminal-sidecar.cjs.example +0 -0
- package/templates/app-dndev/vite.config.ts.example +0 -0
- package/templates/app-expo/.env.example +0 -32
- package/templates/app-expo/.expo/README.md.example +0 -0
- package/templates/app-expo/.gitignore.example +0 -0
- package/templates/app-expo/README.md.example +1 -1
- package/templates/app-expo/app/.gitkeep +0 -0
- package/templates/app-expo/app/_layout.tsx.example +0 -0
- package/templates/app-expo/app/form.tsx.example +0 -0
- package/templates/app-expo/app/index.tsx.example +0 -0
- package/templates/app-expo/app/list.tsx.example +0 -0
- package/templates/app-expo/app/profile.tsx.example +0 -0
- package/templates/app-expo/app/signin.tsx.example +0 -0
- package/templates/app-expo/app.json.example +0 -0
- package/templates/app-expo/assets/adaptive-icon.png +0 -0
- package/templates/app-expo/assets/favicon.png +0 -0
- package/templates/app-expo/assets/icon.png +0 -0
- package/templates/app-expo/assets/splash.png +0 -0
- package/templates/app-expo/babel.config.js.example +0 -0
- package/templates/app-expo/eas.json.example +0 -0
- package/templates/app-expo/expo-env.d.ts.example +0 -0
- package/templates/app-expo/metro.config.js.example +0 -0
- package/templates/app-expo/service-account-key.json.example +1 -1
- package/templates/app-expo/src/config/app.ts.example +0 -0
- package/templates/app-expo/src/config/providers.ts.example +1 -1
- package/templates/app-expo/tsconfig.json.example +0 -0
- package/templates/app-next/.env.example +0 -33
- package/templates/app-next/next.config.ts.example +0 -2
- package/templates/app-next/postcss.config.js.example +0 -0
- package/templates/app-next/service-account-key.json.example +0 -0
- package/templates/app-next/src/app/ClientLayout.tsx.example +0 -0
- package/templates/app-next/src/app/layout.tsx.example +13 -4
- package/templates/app-next/src/app/not-found.tsx.example +0 -0
- package/templates/app-next/src/config/app.ts.example +0 -0
- package/templates/app-next/src/config/legal.ts.example +0 -0
- package/templates/app-next/src/config/providers.ts.example +1 -1
- package/templates/app-next/src/globals.css.example +0 -0
- package/templates/app-next/src/locales/dndev_en.json.example +0 -0
- package/templates/app-next/src/locales/home_en.json.example +6 -6
- package/templates/app-next/src/pages/HomePage.tsx.example +0 -0
- package/templates/app-next/src/pages/legal/LegalNoticePage.tsx.example +0 -0
- package/templates/app-next/src/pages/legal/PrivacyPage.tsx.example +0 -0
- package/templates/app-next/src/pages/legal/TermsPage.tsx.example +0 -0
- package/templates/app-next/src/pages/locales/example_en.json.example +0 -0
- package/templates/app-next/src/themes.css.example +28 -1
- package/templates/app-vite/.env.example +0 -33
- package/templates/app-vite/csp.example.json +44 -0
- package/templates/app-vite/index.html.example +0 -3
- package/templates/app-vite/service-account-key.json.example +0 -0
- package/templates/app-vite/src/App.tsx.example +0 -0
- package/templates/app-vite/src/config/app.ts.example +0 -0
- package/templates/app-vite/src/config/legal.ts.example +0 -0
- package/templates/app-vite/src/config/providers.ts.example +1 -1
- package/templates/app-vite/src/globals.css.example +0 -0
- package/templates/app-vite/src/locales/dndev_en.json.example +0 -0
- package/templates/app-vite/src/locales/home_en.json.example +6 -6
- package/templates/app-vite/src/main.tsx.example +0 -0
- package/templates/app-vite/src/pages/FormPageExample.tsx.example +0 -0
- package/templates/app-vite/src/pages/HomePage.tsx.example +1 -1
- package/templates/app-vite/src/pages/ListPageExample.tsx.example +0 -0
- package/templates/app-vite/src/pages/NotFoundPage.tsx.example +0 -0
- package/templates/app-vite/src/pages/legal/LegalNoticePage.tsx.example +0 -0
- package/templates/app-vite/src/pages/legal/PrivacyPage.tsx.example +0 -0
- package/templates/app-vite/src/pages/legal/TermsPage.tsx.example +0 -0
- package/templates/app-vite/src/pages/locales/example_en.json.example +0 -0
- package/templates/app-vite/src/themes.css.example +26 -0
- package/templates/deploy-config/.firebaserc.example +0 -0
- package/templates/deploy-config/firestore.indexes.json.example +0 -0
- package/templates/deploy-config/firestore.rules.example +0 -0
- package/templates/deploy-config/storage.rules.example +0 -0
- package/templates/deploy-config/tsconfig.functions.json.example +0 -0
- package/templates/deploy-config/vercel.json.example +2 -2
- package/templates/functions-firebase/.env.example +2 -2
- package/templates/functions-firebase/README.md.example +3 -3
- package/templates/functions-firebase/build.mjs.example +0 -0
- package/templates/functions-firebase/functions.config.js.example +0 -0
- package/templates/functions-firebase/functions.yaml.example +0 -0
- package/templates/functions-firebase/src/auth/getCustomClaims.ts.example +0 -0
- package/templates/functions-firebase/src/auth/getUserAuthStatus.ts.example +0 -0
- package/templates/functions-firebase/src/auth/index.ts.example +0 -0
- package/templates/functions-firebase/src/auth/removeCustomClaims.ts.example +0 -0
- package/templates/functions-firebase/src/auth/setCustomClaims.ts.example +0 -0
- package/templates/functions-firebase/src/billing/handleStripeWebhook.ts.example +0 -0
- package/templates/functions-firebase/src/billing/index.ts.example +0 -0
- package/templates/functions-firebase/src/billing/processPaymentSuccess.ts.example +0 -0
- package/templates/functions-firebase/src/billing/refreshSubscriptionStatus.ts.example +0 -0
- package/templates/functions-firebase/src/crud/createEntity.ts.example +0 -0
- package/templates/functions-firebase/src/crud/deleteEntity.ts.example +0 -0
- package/templates/functions-firebase/src/crud/getEntity.ts.example +0 -0
- package/templates/functions-firebase/src/crud/index.ts.example +0 -0
- package/templates/functions-firebase/src/crud/listEntities.ts.example +0 -0
- package/templates/functions-firebase/src/crud/updateEntity.ts.example +0 -0
- package/templates/functions-firebase/src/index.ts.example +0 -0
- package/templates/functions-firebase/src/oauth/checkGitHubAccess.ts.example +0 -0
- package/templates/functions-firebase/src/oauth/disconnect.ts.example +0 -0
- package/templates/functions-firebase/src/oauth/exchangeToken.ts.example +0 -0
- package/templates/functions-firebase/src/oauth/getConnections.ts.example +0 -0
- package/templates/functions-firebase/src/oauth/grantGitHubAccess.ts.example +0 -0
- package/templates/functions-firebase/src/oauth/index.ts.example +0 -0
- package/templates/functions-firebase/src/oauth/refreshToken.ts.example +0 -0
- package/templates/functions-firebase/src/oauth/revokeGitHubAccess.ts.example +0 -0
- package/templates/functions-firebase/tsconfig.json.example +0 -0
- package/templates/functions-supabase/supabase/config.toml.example +0 -0
- package/templates/functions-supabase/supabase/functions/.env.example +0 -0
- package/templates/functions-supabase/supabase/functions/cancel-subscription/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/change-plan/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/create-checkout-session/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/create-customer-portal/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/crud/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/delete-account/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/deno.json.example +0 -0
- package/templates/functions-supabase/supabase/functions/disconnect-oauth/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/exchange-token/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/get-connections/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/get-custom-claims/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/get-user-auth-status/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/refresh-subscription-status/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/refresh-token/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/remove-custom-claims/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/set-custom-claims/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/migrations/20250101000000_idempotency.sql +3 -0
- package/templates/functions-supabase/supabase/migrations/20250101000001_rate_limits.sql +3 -0
- package/templates/functions-supabase/supabase/migrations/20250101000002_cleanup_jobs.sql +0 -0
- package/templates/functions-supabase/supabase/migrations/20250101000003_operation_metrics.sql +3 -0
- package/templates/functions-supabase/supabase/migrations/20250101000004_crud_bulk.sql +192 -0
- package/templates/functions-vercel/.env.example +3 -3
- package/templates/functions-vercel/README.md.example +2 -2
- package/templates/functions-vercel/build.mjs.example +0 -0
- package/templates/functions-vercel/src/api/auth/getCustomClaims.ts.example +0 -0
- package/templates/functions-vercel/src/api/auth/getUserAuthStatus.ts.example +0 -0
- package/templates/functions-vercel/src/api/auth/removeCustomClaims.ts.example +0 -0
- package/templates/functions-vercel/src/api/auth/setCustomClaims.ts.example +0 -0
- package/templates/functions-vercel/src/api/billing/handleStripeWebhook.ts.example +0 -0
- package/templates/functions-vercel/src/api/billing/processPaymentSuccess.ts.example +0 -0
- package/templates/functions-vercel/src/api/billing/refreshSubscriptionStatus.ts.example +0 -0
- package/templates/functions-vercel/src/api/crud/createEntity.ts.example +0 -0
- package/templates/functions-vercel/src/api/crud/deleteEntity.ts.example +0 -0
- package/templates/functions-vercel/src/api/crud/getEntity.ts.example +0 -0
- package/templates/functions-vercel/src/api/crud/listEntities.ts.example +0 -0
- package/templates/functions-vercel/src/api/crud/updateEntity.ts.example +0 -0
- package/templates/functions-vercel/src/api/oauth/checkGitHubAccess.ts.example +0 -0
- package/templates/functions-vercel/src/api/oauth/disconnect.ts.example +0 -0
- package/templates/functions-vercel/src/api/oauth/exchangeToken.ts.example +0 -0
- package/templates/functions-vercel/src/api/oauth/getConnections.ts.example +0 -0
- package/templates/functions-vercel/src/api/oauth/grantGitHubAccess.ts.example +0 -0
- package/templates/functions-vercel/src/api/oauth/refreshToken.ts.example +0 -0
- package/templates/functions-vercel/src/api/oauth/revokeGitHubAccess.ts.example +0 -0
- package/templates/functions-vercel/tsconfig.json.example +0 -0
- package/templates/functions-vercel/vercel.json.example +0 -0
- package/templates/github-consumer/.github/workflows/ci.yml.example +0 -0
- package/templates/overlay-firebase/env.fragment.example +0 -0
- package/templates/overlay-firebase/env.fragment.expo.example +0 -0
- package/templates/overlay-firebase/env.fragment.nextjs.example +0 -0
- package/templates/overlay-firebase/src/config/providers.expo.ts.example +0 -0
- package/templates/overlay-firebase/src/config/providers.ts.example +0 -0
- package/templates/overlay-supabase/env.fragment.example +0 -0
- package/templates/overlay-supabase/env.fragment.expo.example +0 -0
- package/templates/overlay-supabase/env.fragment.nextjs.example +0 -0
- package/templates/overlay-supabase/src/config/providers.expo.ts.example +1 -1
- package/templates/overlay-supabase/src/config/providers.ts.example +1 -1
- package/templates/overlay-vercel/env.fragment.example +0 -0
- package/templates/overlay-vercel/env.fragment.nextjs.example +0 -0
- package/templates/overlay-vercel/src/config/providers.ts.example +0 -0
- package/templates/preset-admin/src/pages/DashboardPage.tsx.example +0 -0
- package/templates/preset-admin/src/pages/EntityPage.tsx.example +0 -0
- package/templates/preset-admin/src/pages/ReportsPage.tsx.example +0 -0
- package/templates/preset-admin/src/pages/SettingsPage.tsx.example +0 -0
- package/templates/preset-admin/src/pages/UsersPage.tsx.example +0 -0
- package/templates/preset-ecommerce/src/pages/CartPage.tsx.example +0 -0
- package/templates/preset-ecommerce/src/pages/CatalogPage.tsx.example +0 -0
- package/templates/preset-ecommerce/src/pages/CheckoutPage.tsx.example +0 -0
- package/templates/preset-ecommerce/src/pages/HomePage.tsx.example +0 -0
- package/templates/preset-ecommerce/src/pages/ProductPage.tsx.example +0 -0
- package/templates/preset-landing/src/pages/AboutPage.tsx.example +0 -0
- package/templates/preset-landing/src/pages/ContactPage.tsx.example +0 -0
- package/templates/preset-landing/src/pages/HomePage.tsx.example +0 -0
- package/templates/preset-saas/src/pages/DashboardPage.tsx.example +0 -0
- package/templates/preset-saas/src/pages/HomePage.tsx.example +0 -0
- package/templates/preset-saas/src/pages/PricingPage.tsx.example +0 -0
- package/templates/preset-saas/src/pages/ProfilePage.tsx.example +0 -0
- package/templates/preset-saas/src/pages/SettingsPage.tsx.example +0 -0
- package/templates/root-consumer/.claude/agents/architect.md.example +0 -0
- package/templates/root-consumer/.claude/agents/builder.md.example +0 -0
- package/templates/root-consumer/.claude/agents/coder.md.example +0 -0
- package/templates/root-consumer/.claude/agents/extractor.md.example +0 -0
- package/templates/root-consumer/.claude/agents/polisher.md.example +0 -0
- package/templates/root-consumer/.claude/agents/prompt-engineer.md.example +0 -0
- package/templates/root-consumer/.claude/hooks/guard-bash.sh.example +61 -0
- package/templates/root-consumer/.claude/hooks/guard-write.sh.example +56 -0
- package/templates/root-consumer/.claude/hooks/session-start.sh.example +50 -0
- package/templates/root-consumer/.claude/hooks/typecheck-stop.sh.example +18 -0
- package/templates/root-consumer/.claude/rules/consumer-ux.md.example +32 -0
- package/templates/root-consumer/.claude/rules/definition-of-done.md.example +32 -0
- package/templates/root-consumer/.claude/rules/framework.md.example +39 -0
- package/templates/root-consumer/.claude/rules/git.md.example +14 -0
- package/templates/root-consumer/.claude/rules/security.md.example +13 -0
- package/templates/root-consumer/.claude/settings.json.example +100 -4
- package/templates/root-consumer/.claude/skills/brainstorm/SKILL.md.example +0 -0
- package/templates/root-consumer/.claude/skills/build/SKILL.md.example +22 -27
- package/templates/root-consumer/.claude/skills/design/SKILL.md.example +0 -0
- package/templates/root-consumer/.claude/skills/design/output-template.md +0 -0
- package/templates/root-consumer/.claude/skills/grill/SKILL.md.example +26 -15
- package/templates/root-consumer/.claude/skills/polish/SKILL.md.example +50 -37
- package/templates/root-consumer/.claude/skills/techdebt/SKILL.md.example +0 -0
- package/templates/root-consumer/.cursor/mcp.json.example +0 -0
- package/templates/root-consumer/.cursor/rules/no-docs.mdc.example +5 -1
- package/templates/root-consumer/.dndev/args.json.example +0 -0
- package/templates/root-consumer/.dndev.secrets.example +0 -0
- package/templates/root-consumer/.env.example +0 -1
- package/templates/root-consumer/.gemini/settings.json.example +0 -0
- package/templates/root-consumer/.gitignore.example +1 -0
- package/templates/root-consumer/.mcp.json.example +0 -0
- package/templates/root-consumer/.prettierrc.cjs.example +0 -0
- package/templates/root-consumer/AGENTS.md.example +63 -0
- package/templates/root-consumer/CLAUDE.md.example +1 -1
- package/templates/root-consumer/README.md.example +11 -33
- package/templates/root-consumer/entities/index.ts.example +0 -0
- package/templates/root-consumer/eslint.config.js.example +0 -0
- package/templates/root-consumer/tsconfig.json.example +0 -0
- package/templates/app-demo/public/manifest.json.example +0 -10
- package/templates/app-dndev/public/manifest.json.example +0 -10
- package/templates/root-consumer/.claude/commands/brainstorm.md.example +0 -175
- package/templates/root-consumer/.claude/commands/build.md.example +0 -131
- package/templates/root-consumer/.claude/commands/design.md.example +0 -184
- package/templates/root-consumer/.claude/commands/grill.md.example +0 -135
- package/templates/root-consumer/.claude/commands/polish.md.example +0 -146
- package/templates/root-consumer/.claude/commands/techdebt.md.example +0 -28
- package/templates/root-consumer/.claude/statusline.py.example +0 -79
- package/templates/root-consumer/.clinerules.example +0 -1
- package/templates/root-consumer/.cursorrules.example +0 -1
- package/templates/root-consumer/.github/copilot-instructions.md.example +0 -1
- package/templates/root-consumer/.windsurfrules.example +0 -1
- package/templates/root-consumer/AI.md.example +0 -108
- package/templates/root-consumer/CONVENTIONS.md.example +0 -1
- package/templates/root-consumer/GEMINI.md.example +0 -1
- package/templates/root-consumer/guides/dndev/AGENT_START_HERE.md.example +0 -135
- package/templates/root-consumer/guides/dndev/COMPONENTS_ADV.md.example +0 -276
- package/templates/root-consumer/guides/dndev/COMPONENTS_ATOMIC.md.example +0 -180
- package/templates/root-consumer/guides/dndev/COMPONENTS_CRUD.md.example +0 -234
- package/templates/root-consumer/guides/dndev/COMPONENTS_UI.md.example +0 -136
- package/templates/root-consumer/guides/dndev/COMPONENT_API.md.example +0 -195
- package/templates/root-consumer/guides/dndev/ENV_SETUP.md.example +0 -219
- package/templates/root-consumer/guides/dndev/GOTCHAS.md.example +0 -197
- package/templates/root-consumer/guides/dndev/INDEX.md.example +0 -60
- package/templates/root-consumer/guides/dndev/SETUP_APP_CONFIG.md.example +0 -132
- package/templates/root-consumer/guides/dndev/SETUP_AUTH.md.example +0 -133
- package/templates/root-consumer/guides/dndev/SETUP_BILLING.md.example +0 -114
- package/templates/root-consumer/guides/dndev/SETUP_BLOG.md.example +0 -280
- package/templates/root-consumer/guides/dndev/SETUP_CICD.md.example +0 -115
- package/templates/root-consumer/guides/dndev/SETUP_CRUD.md.example +0 -334
- package/templates/root-consumer/guides/dndev/SETUP_FIREBASE.md.example +0 -231
- package/templates/root-consumer/guides/dndev/SETUP_FUNCTIONS.md.example +0 -9
- package/templates/root-consumer/guides/dndev/SETUP_I18N.md.example +0 -233
- package/templates/root-consumer/guides/dndev/SETUP_LAYOUTS.md.example +0 -158
- package/templates/root-consumer/guides/dndev/SETUP_OAUTH.md.example +0 -54
- package/templates/root-consumer/guides/dndev/SETUP_OAUTH_PROVIDERS.md.example +0 -60
- package/templates/root-consumer/guides/dndev/SETUP_PAGES.md.example +0 -205
- package/templates/root-consumer/guides/dndev/SETUP_PWA.md.example +0 -213
- package/templates/root-consumer/guides/dndev/SETUP_SOC2.md.example +0 -234
- package/templates/root-consumer/guides/dndev/SETUP_STRIPE.md.example +0 -62
- package/templates/root-consumer/guides/dndev/SETUP_SUPABASE.md.example +0 -215
- package/templates/root-consumer/guides/dndev/SETUP_TESTING.md.example +0 -184
- package/templates/root-consumer/guides/dndev/SETUP_THEMES.md.example +0 -111
- package/templates/root-consumer/guides/dndev/SETUP_VERCEL.md.example +0 -260
- package/templates/root-consumer/guides/dndev/USE_ROUTING.md.example +0 -499
- package/templates/root-consumer/guides/dndev/advanced/APP_CHECK.md.example +0 -111
- package/templates/root-consumer/guides/dndev/advanced/COOKIE_REFERENCE.md.example +0 -252
- package/templates/root-consumer/guides/dndev/advanced/EMULATORS.md.example +0 -48
- package/templates/root-consumer/guides/dndev/essences_reference.css.example +0 -288
- package/templates/root-consumer/guides/wai-way/WAI_WAY_CLI.md.example +0 -402
- package/templates/root-consumer/guides/wai-way/agents/architect.md.example +0 -78
- package/templates/root-consumer/guides/wai-way/agents/builder.md.example +0 -97
- package/templates/root-consumer/guides/wai-way/agents/extractor.md.example +0 -363
- package/templates/root-consumer/guides/wai-way/agents/polisher.md.example +0 -133
- package/templates/root-consumer/guides/wai-way/blueprints/0_brainstorm.md.example +0 -315
- package/templates/root-consumer/guides/wai-way/blueprints/1_scaffold.md.example +0 -133
- package/templates/root-consumer/guides/wai-way/blueprints/2_entities.md.example +0 -111
- package/templates/root-consumer/guides/wai-way/blueprints/3_compose.md.example +0 -150
- package/templates/root-consumer/guides/wai-way/blueprints/4_configure.md.example +0 -238
- package/templates/root-consumer/guides/wai-way/context_map.json.example +0 -127
- package/templates/root-consumer/guides/wai-way/entity_patterns.md.example +0 -839
- package/templates/root-consumer/guides/wai-way/hld_template.md.example +0 -138
- package/templates/root-consumer/guides/wai-way/lld_template.md.example +0 -103
- package/templates/root-consumer/guides/wai-way/page_patterns.md.example +0 -722
- package/templates/root-consumer/guides/wai-way/prd_template.md.example +0 -140
- package/templates/root-consumer/guides/wai-way/presets_guide.md.example +0 -217
- package/templates/root-consumer/guides/wai-way/spec_template.md.example +0 -313
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Critical staff-engineer code review — flags problems before shipping
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
**Phase gate: only use after Phase 3 (COMPOSE) is complete.**
|
|
6
|
-
|
|
7
|
-
Act as a skeptical staff engineer doing a blocking code review.
|
|
8
|
-
|
|
9
|
-
Target: the last modified files in this session, or files passed as argument.
|
|
10
|
-
|
|
11
|
-
## Execution — Two-Pass Review
|
|
12
|
-
|
|
13
|
-
Run Pass 1, then Pass 2. Pass 1 items require user decision before proceeding. Pass 2 items are informational only.
|
|
14
|
-
|
|
15
|
-
### Pass 1 — CRITICAL (stops for user decision)
|
|
16
|
-
|
|
17
|
-
Items that **must be resolved before shipping**. After listing all Pass 1 items, present each one individually and ask: **Fix / Acknowledge / Skip**.
|
|
18
|
-
|
|
19
|
-
- One item = one question. Never batch decisions.
|
|
20
|
-
- Do NOT proceed to Pass 2 until all Pass 1 items are resolved.
|
|
21
|
-
- If zero Pass 1 items, proceed directly to Pass 2.
|
|
22
|
-
|
|
23
|
-
**BLOCKER** - breaks in production or loses data:
|
|
24
|
-
- Security issues (injection, unvalidated input at system boundaries, exposed secrets)
|
|
25
|
-
- Logic bugs producing wrong results
|
|
26
|
-
- Data loss paths (silent overwrites, missing error handling on writes)
|
|
27
|
-
- Breaking API contract changes
|
|
28
|
-
- @donotdev component misuse without `lookup_symbol` verification
|
|
29
|
-
|
|
30
|
-
**WARN-CRITICAL** - real problem users WILL hit soon:
|
|
31
|
-
- Auth/authz bypass on common paths
|
|
32
|
-
- Data corruption on normal usage flows
|
|
33
|
-
|
|
34
|
-
### Pass 2 — INFORMATIONAL (listed, no action required)
|
|
35
|
-
|
|
36
|
-
Listed for awareness. No user decision needed. No fixes during review.
|
|
37
|
-
|
|
38
|
-
**WARN** - real problem, won't explode immediately:
|
|
39
|
-
- Missing edge cases (null/undefined, empty arrays, concurrent updates, auth failure paths)
|
|
40
|
-
- Architectural anti-patterns with concrete consequences
|
|
41
|
-
- Missing or incorrect TypeScript types
|
|
42
|
-
|
|
43
|
-
**NOTE** - sparingly. Only genuine maintainer gotchas.
|
|
44
|
-
|
|
45
|
-
### Rules
|
|
46
|
-
|
|
47
|
-
- NEVER suggest fixes. Report problems only.
|
|
48
|
-
- NEVER skip BLOCKER items to be polite.
|
|
49
|
-
- If there are no issues at a severity level, omit that level entirely.
|
|
50
|
-
- **Quality > quantity. 15 real issues >>> 60 padded items.**
|
|
51
|
-
|
|
52
|
-
## Output — 3-step lifecycle
|
|
53
|
-
|
|
54
|
-
The grill report is a **living queue**. Each run cleans up resolved items, archives them, then appends new findings.
|
|
55
|
-
|
|
56
|
-
### Step 1 — Clean up + archive
|
|
57
|
-
|
|
58
|
-
Read existing `.dndev/grill-report.json`. If it exists and has items:
|
|
59
|
-
|
|
60
|
-
1. Separate items into **resolved** (`status` = `fixed`, `resolved`, or `rejected`) and **surviving** (`pending`, `fixing`, or any other status).
|
|
61
|
-
2. Append a history entry to `.dndev/grill-history.json` (read existing array or start with `[]`):
|
|
62
|
-
```json
|
|
63
|
-
{
|
|
64
|
-
"date": "<now ISO>",
|
|
65
|
-
"gitSha": "<short git HEAD>",
|
|
66
|
-
"target": "<previous report target>",
|
|
67
|
-
"verdict": "<previous report verdict>",
|
|
68
|
-
"blockers": <previous blocker count>,
|
|
69
|
-
"warnings": <previous warning count>,
|
|
70
|
-
"notes": <previous note count>,
|
|
71
|
-
"total": <previous items.length>,
|
|
72
|
-
"resolved": <resolved count>,
|
|
73
|
-
"carried": <surviving count>
|
|
74
|
-
}
|
|
75
|
-
```
|
|
76
|
-
3. Keep the surviving items — they carry over into the updated report.
|
|
77
|
-
|
|
78
|
-
If no existing report or no items, skip this step.
|
|
79
|
-
|
|
80
|
-
### Step 2 — Scan
|
|
81
|
-
|
|
82
|
-
Produce new findings from the target files. **Deduplicate** against surviving items from Step 1: if a new finding matches an existing item on `file` + `line` + `issue` (fuzzy match on issue text), skip it.
|
|
83
|
-
|
|
84
|
-
### Step 3 — Write report
|
|
85
|
-
|
|
86
|
-
Merge surviving items from Step 1 + new findings from Step 2. Re-number `id` fields sequentially starting at 1. Write to `.dndev/grill-report.json`:
|
|
87
|
-
|
|
88
|
-
```json
|
|
89
|
-
{
|
|
90
|
-
"generated": "<now ISO>",
|
|
91
|
-
"gitSha": "<short git HEAD>",
|
|
92
|
-
"target": "<description of what was reviewed>",
|
|
93
|
-
"verdict": "SHIP" | "DO NOT SHIP",
|
|
94
|
-
"items": [
|
|
95
|
-
{
|
|
96
|
-
"id": 1,
|
|
97
|
-
"severity": "blocker" | "warn" | "note",
|
|
98
|
-
"file": "src/pages/Foo.tsx",
|
|
99
|
-
"line": 42,
|
|
100
|
-
"issue": "Short description of the problem",
|
|
101
|
-
"context": "Optional: why this matters, what could go wrong",
|
|
102
|
-
"category": "security" | "architecture" | "edge-case" | "types" | "dead-code" | "consistency" | "dx" | "docs" | "performance",
|
|
103
|
-
"status": "pending",
|
|
104
|
-
"verified": true
|
|
105
|
-
}
|
|
106
|
-
]
|
|
107
|
-
}
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
Verdict is based on the **merged** items (carried + new). If any blocker exists → DO NOT SHIP.
|
|
111
|
-
|
|
112
|
-
### Field rules
|
|
113
|
-
|
|
114
|
-
- `gitSha` — Run `git rev-parse --short HEAD`. Required.
|
|
115
|
-
- `verified` — Always `true` in final output.
|
|
116
|
-
- New items always get `status: "pending"`. Carried items keep their existing status.
|
|
117
|
-
|
|
118
|
-
### Fixing findings
|
|
119
|
-
|
|
120
|
-
When asked to fix grill findings (not during a scan — during a separate fix request):
|
|
121
|
-
|
|
122
|
-
1. Apply the code fix.
|
|
123
|
-
2. Update `.dndev/grill-report.json`: set `status: "fixed"` on each resolved item.
|
|
124
|
-
3. Set `lastReviewed` to current ISO timestamp.
|
|
125
|
-
|
|
126
|
-
This ensures the report reflects reality. Next grill run archives fixed items to history.
|
|
127
|
-
|
|
128
|
-
### General rules
|
|
129
|
-
|
|
130
|
-
- NEVER suggest fixes. Report problems only — during a scan.
|
|
131
|
-
- NEVER skip BLOCKER items.
|
|
132
|
-
- **Quality > quantity. 15 real issues >>> 60 padded items** (for new findings — carried items don't count toward this cap).
|
|
133
|
-
- Group by file, sort by line number.
|
|
134
|
-
- After writing, print: `Cleaned N resolved items → history. Carried M items. Added K new findings. Total: T items.`
|
|
135
|
-
- Print verdict: SHIP / DO NOT SHIP.
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Generate tests, firestore rules, CI/CD, config, fix bugs, i18n (Phase 4) - AFTER /build
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Polish Command - Production-Ready App
|
|
6
|
-
|
|
7
|
-
**⚠️ MODE CHECK:** This command is for **Consumer App Development** only.
|
|
8
|
-
|
|
9
|
-
**If you're in the framework monorepo (this repo):**
|
|
10
|
-
- ❌ **DO NOT use `/polish`** - framework dev doesn't use this workflow
|
|
11
|
-
- ✅ See [Modes Guide](https://github.com/donotdev/framework/blob/main/docs/development/MODES.md) for framework dev workflow
|
|
12
|
-
|
|
13
|
-
**If you're in a consumer repo:**
|
|
14
|
-
- ✅ Use `/polish` after `/build` is complete
|
|
15
|
-
- ✅ Use `/polish` to generate tests, firestore rules, CI/CD
|
|
16
|
-
- ✅ Use `/polish` to fix bugs, add styling, add i18n
|
|
17
|
-
- ✅ Use `/polish` to finalize configuration
|
|
18
|
-
|
|
19
|
-
**WORKFLOW ORDER:**
|
|
20
|
-
1. `/brainstorm` → Extract requirements, generate spec
|
|
21
|
-
2. `/design` → Create technical plan
|
|
22
|
-
3. `/build` → Implement code using framework defaults
|
|
23
|
-
4. `/polish` → Generate tests, config, CI/CD, fix bugs (THIS COMMAND)
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
## Usage
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
/polish [task]
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
**Examples:**
|
|
34
|
-
```
|
|
35
|
-
/polish Generate all tests and firestore rules
|
|
36
|
-
/polish Fix bug: Projects list is empty
|
|
37
|
-
/polish Add French and Spanish translations
|
|
38
|
-
/polish Complete configuration and deploy
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
---
|
|
42
|
-
|
|
43
|
-
## Process
|
|
44
|
-
|
|
45
|
-
### Step 0: Start Phase (MANDATORY — DO THIS FIRST)
|
|
46
|
-
|
|
47
|
-
**BEFORE any polish work**, call:
|
|
48
|
-
```
|
|
49
|
-
start_phase(4)
|
|
50
|
-
```
|
|
51
|
-
This activates Phase 4: CONFIGURE and loads the blueprint, persona, context, and lessons. **Do NOT proceed without this call.**
|
|
52
|
-
|
|
53
|
-
### Step 1: Activate Polisher Agent
|
|
54
|
-
|
|
55
|
-
**Deploy:** `/agents polisher` (Phase 4 Polisher persona)
|
|
56
|
-
|
|
57
|
-
**READ first:**
|
|
58
|
-
- `guides/wai-way/spec_template.md` — validated spec (your test plan)
|
|
59
|
-
- `entities/index.ts` — all entity definitions
|
|
60
|
-
- `src/pages/` — all page files
|
|
61
|
-
- `guides/dndev/SETUP_TESTING.md` — testing patterns
|
|
62
|
-
|
|
63
|
-
### Step 2: Generate Tests
|
|
64
|
-
|
|
65
|
-
Call `get_guide("TESTING")` for patterns.
|
|
66
|
-
|
|
67
|
-
1. **Entity tests** — one per entity in `tests/entities/[Entity].test.ts`
|
|
68
|
-
2. **Page tests** — one per page in `tests/pages/[Page].test.tsx`
|
|
69
|
-
3. **Access control tests** — `tests/access/access-rules.test.ts`
|
|
70
|
-
|
|
71
|
-
### Step 3: Generate Firestore Rules
|
|
72
|
-
|
|
73
|
-
Create `firestore.rules` from entity access definitions.
|
|
74
|
-
|
|
75
|
-
### Step 4: Generate CI/CD
|
|
76
|
-
|
|
77
|
-
Create `.github/workflows/ci.yml` — type-check → test → build → deploy.
|
|
78
|
-
|
|
79
|
-
### Step 5: Configure
|
|
80
|
-
|
|
81
|
-
- `src/config/app.ts` — APP_NAME, preset, footer
|
|
82
|
-
- `src/config/legal.ts` — company, contacts, jurisdiction
|
|
83
|
-
- `.env` — Firebase config, license key
|
|
84
|
-
|
|
85
|
-
### Step 6: Run Tests
|
|
86
|
-
|
|
87
|
-
```bash
|
|
88
|
-
bun test
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
All tests must pass.
|
|
92
|
-
|
|
93
|
-
### Step 7: Fix Bugs (if any)
|
|
94
|
-
|
|
95
|
-
- Understand → Diagnose → Fix (minimal) → Verify → Check regressions
|
|
96
|
-
|
|
97
|
-
### Step 8: Mobile Check
|
|
98
|
-
|
|
99
|
-
DevTools → 375px → navigation, forms, text, buttons (44px)
|
|
100
|
-
|
|
101
|
-
### Step 9: i18n (Optional)
|
|
102
|
-
|
|
103
|
-
Extract strings to `src/locales/`, replace with `useTranslation()`.
|
|
104
|
-
|
|
105
|
-
---
|
|
106
|
-
|
|
107
|
-
## What Polisher Does
|
|
108
|
-
|
|
109
|
-
| Task | Description |
|
|
110
|
-
|------|-------------|
|
|
111
|
-
| **Test Generation** | Entity tests, page tests, access tests from spec |
|
|
112
|
-
| **Firestore Rules** | Security rules from entity access definitions |
|
|
113
|
-
| **CI/CD** | GitHub Actions workflow (test → build → deploy) |
|
|
114
|
-
| **Configuration** | app.ts, legal.ts, .env, Firebase setup |
|
|
115
|
-
| **Bug Fixes** | Diagnose and fix bugs with minimal changes |
|
|
116
|
-
| **i18n** | Extract strings, create translation files (optional) |
|
|
117
|
-
|
|
118
|
-
---
|
|
119
|
-
|
|
120
|
-
## Ship Readiness
|
|
121
|
-
|
|
122
|
-
App is ready to ship when:
|
|
123
|
-
- ✅ `dndev tc` passes
|
|
124
|
-
- ✅ `bun test` passes
|
|
125
|
-
- ✅ `firestore.rules` generated
|
|
126
|
-
- ✅ `.github/workflows/ci.yml` created
|
|
127
|
-
- ✅ No critical bugs
|
|
128
|
-
- ✅ Auth is secure
|
|
129
|
-
- ✅ Mobile works at 375px
|
|
130
|
-
- ✅ Configuration complete
|
|
131
|
-
- ✅ (Optional) i18n added
|
|
132
|
-
|
|
133
|
-
## Phase Completion (MANDATORY)
|
|
134
|
-
|
|
135
|
-
When all ship readiness checks pass, call:
|
|
136
|
-
```
|
|
137
|
-
complete_phase({ files: ["...all test/config files..."], summary: "Tests passing, config complete, ready to ship" })
|
|
138
|
-
```
|
|
139
|
-
Wait for user to call `approve_phase()`.
|
|
140
|
-
|
|
141
|
-
---
|
|
142
|
-
|
|
143
|
-
## Next Step
|
|
144
|
-
|
|
145
|
-
Once app is production-ready:
|
|
146
|
-
→ `dndev deploy`
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: End-of-session tech debt sweep — surfaces cleanup items, does NOT fix
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
**Phase gate: only use after Phase 3 (COMPOSE) is complete.**
|
|
6
|
-
|
|
7
|
-
Scan files modified in this session for tech debt.
|
|
8
|
-
|
|
9
|
-
Check for:
|
|
10
|
-
- Duplicate logic (same pattern implemented 2+ places)
|
|
11
|
-
- Dead exports (exported symbols with no consumers)
|
|
12
|
-
- Missing JSDoc on public API functions/types
|
|
13
|
-
- Broken or missing imports (type-only imports used as values, etc.)
|
|
14
|
-
- Unused dependencies in package.json vs actual imports
|
|
15
|
-
- Hardcoded strings that should be in config or i18n
|
|
16
|
-
|
|
17
|
-
Output: prioritized list, grouped by area. Format:
|
|
18
|
-
```
|
|
19
|
-
## <area>
|
|
20
|
-
- [HIGH] <description> — <file>:<line>
|
|
21
|
-
- [MED] <description> — <file>:<line>
|
|
22
|
-
- [LOW] <description> — <file>:<line>
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
Rules:
|
|
26
|
-
- DO NOT fix anything. Report only.
|
|
27
|
-
- Skip node_modules, dist, .d.ts files.
|
|
28
|
-
- Skip items already in .dndev/implementation.md as known TODOs.
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
"""Claude Code status line — zero dependencies."""
|
|
3
|
-
import json, sys, os
|
|
4
|
-
|
|
5
|
-
data = json.load(sys.stdin)
|
|
6
|
-
|
|
7
|
-
# --- Parse ---
|
|
8
|
-
model = data.get("model", {}).get("display_name", "?")
|
|
9
|
-
cwd = data.get("workspace", {}).get("current_dir") or data.get("cwd", "?")
|
|
10
|
-
pct = data.get("context_window", {}).get("used_percentage")
|
|
11
|
-
usage = data.get("context_window", {}).get("current_usage", {})
|
|
12
|
-
in_tok = usage.get("input_tokens")
|
|
13
|
-
out_tok = usage.get("output_tokens")
|
|
14
|
-
cache_tok = usage.get("cache_read_input_tokens", 0)
|
|
15
|
-
|
|
16
|
-
# --- Colors ---
|
|
17
|
-
R = "\033[0m"
|
|
18
|
-
BOLD = "\033[1m"
|
|
19
|
-
DIM = "\033[2m"
|
|
20
|
-
C_MODEL = "\033[38;5;75m"
|
|
21
|
-
C_GREEN = "\033[38;5;71m"
|
|
22
|
-
C_ORANGE = "\033[38;5;214m"
|
|
23
|
-
C_RED = "\033[38;5;196m"
|
|
24
|
-
C_EMPTY = "\033[38;5;238m"
|
|
25
|
-
C_TOK = "\033[38;5;180m"
|
|
26
|
-
C_BRANCH = "\033[38;5;183m"
|
|
27
|
-
C_CWD = "\033[38;5;251m"
|
|
28
|
-
C_SEP = "\033[38;5;240m"
|
|
29
|
-
SEP = f"{C_SEP} | {R}"
|
|
30
|
-
|
|
31
|
-
def fmt(n):
|
|
32
|
-
if n is None: return "0"
|
|
33
|
-
return f"{n/1000:.1f}k" if n >= 1000 else str(n)
|
|
34
|
-
|
|
35
|
-
# --- Model ---
|
|
36
|
-
parts = [f"{C_MODEL}{BOLD}{model}{R}"]
|
|
37
|
-
|
|
38
|
-
# --- Context bar ---
|
|
39
|
-
if pct is not None:
|
|
40
|
-
W = 20
|
|
41
|
-
filled = int(pct * W / 100)
|
|
42
|
-
empty = W - filled
|
|
43
|
-
c = C_RED if pct >= 90 else C_ORANGE if pct >= 70 else C_GREEN
|
|
44
|
-
bar = f"{c}[{'█' * filled}{C_EMPTY}{'░' * empty}{c}]{R} {c}{pct:.0f}%{R}"
|
|
45
|
-
parts.append(bar)
|
|
46
|
-
|
|
47
|
-
# --- Tokens ---
|
|
48
|
-
if in_tok is not None:
|
|
49
|
-
parts.append(f"{C_TOK}in:{fmt(in_tok)} out:{fmt(out_tok)} cache:{fmt(cache_tok)}{R}")
|
|
50
|
-
else:
|
|
51
|
-
parts.append(f"{DIM}{C_TOK}no msgs{R}")
|
|
52
|
-
|
|
53
|
-
# --- Git branch ---
|
|
54
|
-
try:
|
|
55
|
-
import subprocess
|
|
56
|
-
branch = subprocess.run(
|
|
57
|
-
["git", "-C", cwd, "symbolic-ref", "--short", "HEAD"],
|
|
58
|
-
capture_output=True, text=True, timeout=2,
|
|
59
|
-
env={**os.environ, "GIT_OPTIONAL_LOCKS": "0"}
|
|
60
|
-
)
|
|
61
|
-
b = branch.stdout.strip()
|
|
62
|
-
if not b:
|
|
63
|
-
branch = subprocess.run(
|
|
64
|
-
["git", "-C", cwd, "rev-parse", "--short", "HEAD"],
|
|
65
|
-
capture_output=True, text=True, timeout=2,
|
|
66
|
-
env={**os.environ, "GIT_OPTIONAL_LOCKS": "0"}
|
|
67
|
-
)
|
|
68
|
-
b = branch.stdout.strip()
|
|
69
|
-
if b:
|
|
70
|
-
parts.append(f"{C_BRANCH} {b}{R}")
|
|
71
|
-
except Exception:
|
|
72
|
-
pass
|
|
73
|
-
|
|
74
|
-
# --- CWD ---
|
|
75
|
-
home = os.path.expanduser("~")
|
|
76
|
-
display = cwd.replace(home, "~", 1) if cwd.startswith(home) else cwd
|
|
77
|
-
parts.append(f"{C_CWD}{display}{R}")
|
|
78
|
-
|
|
79
|
-
print(SEP.join(parts))
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Enforce AI.md
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Enforce AI.md
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Enforce AI.md
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Enforce AI.md
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
# AI Agent Instructions
|
|
2
|
-
|
|
3
|
-
> **You are building a DoNotDev app.** Read this file completely before doing anything else.
|
|
4
|
-
|
|
5
|
-
## Welcome
|
|
6
|
-
|
|
7
|
-
We'll build your app together in **5 structured phases**: brainstorm requirements, scaffold pages, define data, wire everything up, and polish for production. Each phase has a clear deliverable and validation gate. This isn't freeform coding — there's a proven methodology that produces solid, production-ready apps.
|
|
8
|
-
|
|
9
|
-
## What To Do Right Now
|
|
10
|
-
|
|
11
|
-
1. **Verify MCP is working.** Call `list_features()`. If it fails, run `get_guide("AGENT_START_HERE")` for IDE-specific setup.
|
|
12
|
-
2. Call `start_phase(0)` — begin **Phase 0: BRAINSTORM**
|
|
13
|
-
3. Follow each phase in order. **Do not skip phases. Do not work outside a phase.**
|
|
14
|
-
|
|
15
|
-
## The 5 Phases — MANDATORY
|
|
16
|
-
|
|
17
|
-
**ALL work MUST happen inside an active phase.** Call `start_phase(N)` BEFORE writing any code or documents. Call `complete_phase({ files })` BEFORE moving to the next phase. Working outside a phase is a violation — no exceptions.
|
|
18
|
-
|
|
19
|
-
| Phase | Name | Slash Command | What Happens |
|
|
20
|
-
|-------|------|---------------|-------------|
|
|
21
|
-
| 0 | **BRAINSTORM** | `/brainstorm` | Ask questions, understand requirements, produce validated spec |
|
|
22
|
-
| 1 | **SCAFFOLD** | `/design` | Create all routes and page stubs from spec |
|
|
23
|
-
| 2 | **ENTITIES** | `/design` | Define all data models (fields, access, visibility) |
|
|
24
|
-
| 3 | **COMPOSE** | `/build` | Build pages with framework components (hardcode strings) |
|
|
25
|
-
| 4 | **CONFIGURE** | `/polish` | Config, test, polish, i18n. Run `/grill` and `/techdebt` before shipping |
|
|
26
|
-
|
|
27
|
-
## Workflow Per Phase — NON-NEGOTIABLE
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
start_phase(N) → get blueprint + persona + context + lessons
|
|
31
|
-
↓
|
|
32
|
-
work → follow blueprint, lookup_symbol for every component
|
|
33
|
-
↓
|
|
34
|
-
dndev tc → type-check MUST pass before completing phase
|
|
35
|
-
↓
|
|
36
|
-
complete_phase(files) → validate conventions + symbol usage → submit for review
|
|
37
|
-
↓
|
|
38
|
-
approve_phase() → user approves, move to next phase
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
**You MUST call `start_phase(N)` before ANY work in that phase.**
|
|
42
|
-
**You MUST call `complete_phase({ files })` when the phase is done.**
|
|
43
|
-
**You MUST run `dndev tc` after every code change and before every `complete_phase`.**
|
|
44
|
-
Skipping these steps means the work is untracked, unvalidated, and unacceptable.
|
|
45
|
-
|
|
46
|
-
## STOP — lookup_symbol Before ANY @donotdev Code
|
|
47
|
-
|
|
48
|
-
**STOP. Before writing ANY `@donotdev` import, call `lookup_symbol({ symbol: "Name" })`.** Do NOT guess. Do NOT proceed without it. `complete_phase` rejects un-looked-up symbols.
|
|
49
|
-
|
|
50
|
-
**Always import from `@donotdev/<package>` top-level** — never sub-paths. See `get_guide("SETUP_PAGES")` for conventions and patterns.
|
|
51
|
-
|
|
52
|
-
## CLI Commands
|
|
53
|
-
|
|
54
|
-
`dndev` is installed globally via `bun install -g` (no sudo needed) and also as a local devDependency. Run it directly — or use `bun run dev` / `bunx dndev` as fallback.
|
|
55
|
-
|
|
56
|
-
| Command | What it does |
|
|
57
|
-
|---------|-------------|
|
|
58
|
-
| `dndev dev` | Start the dev server (Vite/Next.js via Turbo) |
|
|
59
|
-
| `dndev dev:myapp` | Start dev server for a specific app |
|
|
60
|
-
| `dndev build` | Build for production |
|
|
61
|
-
| `dndev preview` | Preview production build |
|
|
62
|
-
| `dndev emu` | Start dev with Firebase emulators |
|
|
63
|
-
| `dndev tc` | **Type-check all packages — run after every code change** |
|
|
64
|
-
| `dndev tc:myapp` | Type-check a specific app |
|
|
65
|
-
| `dndev format` | Format code with Prettier |
|
|
66
|
-
| `dndev deploy` | Deploy to production |
|
|
67
|
-
| `dndev staging` | Deploy to staging/UAT |
|
|
68
|
-
| `dndev coach` | Show what to configure before running setup |
|
|
69
|
-
| `dndev setup` | Validate .env, automate provider setup, health check |
|
|
70
|
-
| `dndev doctor` | Check project health (providers, .env) |
|
|
71
|
-
| `dndev bump` | Update @donotdev packages to latest |
|
|
72
|
-
| `dndev cacheout` | Clear build caches |
|
|
73
|
-
| `dndev sync-secrets` | Sync env vars to Firebase/Vercel/GitHub |
|
|
74
|
-
| `dndev make-admin` | Set a user as admin |
|
|
75
|
-
| `dndev agent` | Configure MCP server for AI agents |
|
|
76
|
-
| `dndev wai` | Output WAI-WAY activation prompt |
|
|
77
|
-
| `dndev create-app` | Interactive wizard — creates a new app in the monorepo |
|
|
78
|
-
|
|
79
|
-
Most commands support `:<app>` syntax: `dndev dev:web`, `dndev tc:admin`, `dndev build:public`.
|
|
80
|
-
|
|
81
|
-
Run `dndev --help` for the full command list.
|
|
82
|
-
|
|
83
|
-
`dndev create-app` is **interactive** — it prompts for builder (Vite/Next.js/Expo), backend (Firebase/Supabase/none), and features. There is no `--preset` flag.
|
|
84
|
-
|
|
85
|
-
## Rules
|
|
86
|
-
|
|
87
|
-
- **ESM only** — never `require()`
|
|
88
|
-
- **RTL safe** — use `start`/`end`, never `left`/`right`
|
|
89
|
-
- **Import order** — React → vendors → @donotdev → relative
|
|
90
|
-
- **Import convention** — always `@donotdev/<pkg>` top-level, never sub-paths
|
|
91
|
-
- **NO native HTML elements** — never use `<div>`, `<span>`, `<p>`, `<h1-6>`, `<button>`, `<a>`, `<input>`, `<textarea>`, `<select>`, `<form>`, `<table>`, `<ul>`, `<ol>`, `<li>`, `<img>`, `<section>`, `<nav>`, `<header>`, `<footer>` in @donotdev files. Use framework components: Stack, Card, Text, Button, Link, TextInput, Select, Form, DataTable, List, Image, Section, Navigation, Header, Footer. See `get_guide("COMPONENTS_ATOMIC")`
|
|
92
|
-
- **NO custom CSS** — never create `.css`, `.module.css`, `.scss`, `.sass`, or `.less` files. All styling is done through framework component props, variant tokens, and theme configuration
|
|
93
|
-
- **NO custom components** — never create files in `components/`. Compose pages using framework components only. If a component is missing, say what you need and STOP
|
|
94
|
-
- **NO inventing props** — only use props returned by `lookup_symbol()`. Common hallucination traps that DO NOT exist: `size`, `tone`, `color`, `padding`, `margin`, `spacing`, `columns`, `background`, `fields`
|
|
95
|
-
- **Framework-first** — if something's missing, say what and stop
|
|
96
|
-
- **No .md file creation** — never create documentation/analysis/summary .md files unless explicitly asked. Session notes go in `.dndev/`
|
|
97
|
-
- **Follow existing patterns** — the scaffolded files ARE your documentation
|
|
98
|
-
|
|
99
|
-
## MCP Tools
|
|
100
|
-
|
|
101
|
-
Call `get_guide("AGENT_START_HERE")` for the full tool reference, IDE setup, env var guide, and fallback instructions.
|
|
102
|
-
|
|
103
|
-
Key tools: `start_phase` · `complete_phase` · `approve_phase` · `lookup_symbol` · `get_guide` · `get_guideline` · `search_framework` · `list_features` · `record_lesson` · `run_typecheck`
|
|
104
|
-
|
|
105
|
-
## Security Gate
|
|
106
|
-
|
|
107
|
-
Before production: run `dndev doctor` and `/grill`. See `get_guide("SOC2")` for details.
|
|
108
|
-
Golden path: `dndev coach` → fill .env → `dndev setup` → `dndev doctor`.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Enforce AI.md
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Enforce AI.md
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
# DoNotDev Framework - Agent Quick Start
|
|
2
|
-
|
|
3
|
-
**Persona:** Lead Developer | UX Designer | Expert Adviser.
|
|
4
|
-
**Intelligence Engine:** This project is pre-configured with the **`dndev` MCP Server** in `.mcp.json`.
|
|
5
|
-
|
|
6
|
-
**Critical Rule:**
|
|
7
|
-
> **DO NOT GUESS. DO NOT HALLUCINATE.**
|
|
8
|
-
> Use `lookup_symbol("ComponentName")` to get actual TypeScript types. Every symbol has JSDoc and Types. Every setup has a Guide. Use them.
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## Getting Started (for humans)
|
|
13
|
-
|
|
14
|
-
**Canonical flow:** The showcase app’s **Get Started** page is the single source of truth: `apps/showcase/src/pages/GetStartedPage.tsx` and `apps/showcase/src/pages/locales/getstarted_*.json`. Below is the same flow in short form.
|
|
15
|
-
|
|
16
|
-
1. **P0 — Prerequisites**
|
|
17
|
-
- **Runtime:** **Node.js 24** (nodejs.org) and **Bun 1.3+** (bun.sh). Both required.
|
|
18
|
-
- **IDE:** Any IDE (Cursor, VS Code, Windsurf, etc.). Need help? Use the collapsible “Need help setting up?” on the Get Started page.
|
|
19
|
-
2. **Create your project’s monorepo**
|
|
20
|
-
- `bunx create-donotdev my-app`
|
|
21
|
-
3. **Open the repo in your IDE**
|
|
22
|
-
- Start your IDE in that repo. Dependencies are already installed.
|
|
23
|
-
4. **Enable MCP, then read AI.md and follow the flow**
|
|
24
|
-
- Talk with your agent; ask it to load the MCP (Cursor: Ctrl+Shift+P → “MCP Server” → enable “donotdev”; other IDEs: see “How to enable MCP” collapsible on the Get Started page).
|
|
25
|
-
- Then have the agent read the root **`AI.md`** and this file (**`guides/dndev/AGENT_START_HERE.md`**). Follow the phases.
|
|
26
|
-
5. **AI helps with provider; cd there, bun install, run**
|
|
27
|
-
- AI helps you choose and set up your provider (Firebase, Supabase, or custom). Then `cd` into the app directory if needed, `bun install`, and `dndev dev` / `dndev build` / `dndev deploy`.
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
## Demo App — Canonical Reference
|
|
32
|
-
|
|
33
|
-
**Before building anything, look at the demo app:** `packages/cli/templates/app-demo/`
|
|
34
|
-
|
|
35
|
-
It demonstrates the correct way to use the framework:
|
|
36
|
-
- Per-route layout switching via `PageMeta.preset` (landing → admin → docs)
|
|
37
|
-
- SaaS pages as thin template wrappers (~5 lines each)
|
|
38
|
-
- Component showcase with filterable grid and detail pages
|
|
39
|
-
- Entity definition with `defineEntity()`
|
|
40
|
-
- Zero custom CSS in page files
|
|
41
|
-
- Auth-guarded routes alongside public routes
|
|
42
|
-
|
|
43
|
-
**Copy from the demo app, then customize.** Don't invent patterns — the demo app IS the pattern.
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## First Thing to Call: list_features()
|
|
48
|
-
|
|
49
|
-
Call **`list_features()`** before designing or coding. It lists all framework packages with a one-line summary from each README (templates, core, ui, auth, billing, etc.). Use it so you don't reinvent what the framework already provides (blog, CRUD, billing, legal pages, etc.).
|
|
50
|
-
|
|
51
|
-
---
|
|
52
|
-
|
|
53
|
-
## The WAI-WAY Workflow (5 Phases)
|
|
54
|
-
|
|
55
|
-
Call `start_phase(N)` to begin each phase. It returns the blueprint, agent persona, and files to read.
|
|
56
|
-
|
|
57
|
-
### Phase 0: BRAINSTORM (Extractor)
|
|
58
|
-
- **MCP:** `start_phase(0)`
|
|
59
|
-
- **Goal:** Validated spec. Use BMAD probing questions to turn a vague idea into a complete `spec_template.md`.
|
|
60
|
-
- **Discovery:** `search_framework('topic')` to see what's possible.
|
|
61
|
-
|
|
62
|
-
### Phase 1: SCAFFOLD (Extractor)
|
|
63
|
-
- **MCP:** `start_phase(1)`
|
|
64
|
-
- **Goal:** Running skeleton. Run `dndev create-app` (interactive wizard, run directly — never `bunx`) and create `*Page.tsx` stubs.
|
|
65
|
-
|
|
66
|
-
### Phase 2: ENTITIES (Architect)
|
|
67
|
-
- **MCP:** `start_phase(2)`
|
|
68
|
-
- **Goal:** Single Source of Truth. Define entities in `entities/` using `defineEntity()`.
|
|
69
|
-
- **Types:** `lookup_symbol('defineEntity')` for exact props and @examples.
|
|
70
|
-
|
|
71
|
-
### Phase 3: COMPOSE (Builder)
|
|
72
|
-
- **MCP:** `start_phase(3)`
|
|
73
|
-
- **Goal:** Functional pages. Hardcode all strings. No i18n yet.
|
|
74
|
-
- **Types:** `lookup_symbol('Button')`, `lookup_symbol('EntityList')`, etc.
|
|
75
|
-
|
|
76
|
-
### Phase 4: CONFIGURE (Polisher)
|
|
77
|
-
- **MCP:** `start_phase(4)`
|
|
78
|
-
- **Goal:** QA & Polish. Update `app.ts`, `.env`, verify mobile (375px).
|
|
79
|
-
- **Lessons:** `record_lesson('Project quirk found')`.
|
|
80
|
-
|
|
81
|
-
Call `complete_phase()` after each phase. It records progress and tells you what's next.
|
|
82
|
-
|
|
83
|
-
---
|
|
84
|
-
|
|
85
|
-
## Mindset & Standards
|
|
86
|
-
|
|
87
|
-
* **SSOT Pattern:** The Entity is the brain. Change fields in `entities/*.ts` first. UI and DB follow.
|
|
88
|
-
* **Composition > Customization:** Do not write custom CSS. Use `<Stack>`, `<Grid>`, and component props.
|
|
89
|
-
* **Hardcode First:** In Phase 3, never use i18n. Validate the UI with real strings first.
|
|
90
|
-
* **Zero Drift:** Your documentation is the **compiled code**. `lookup_symbol` shows the current reality.
|
|
91
|
-
|
|
92
|
-
## Before You Start Coding
|
|
93
|
-
|
|
94
|
-
Check that the user has completed environment setup:
|
|
95
|
-
1. Firebase configured? (`.env` has `VITE_FIREBASE_API_KEY` filled in)
|
|
96
|
-
2. Service account key exists? (`service-account-key.json` in app root)
|
|
97
|
-
3. Emulators work? (`dndev emu start` runs without errors)
|
|
98
|
-
|
|
99
|
-
If not, coach them: "Run `dndev coach` to see what to configure, fill in the .env values, then run `dndev setup`." See [SETUP_FIREBASE.md](./SETUP_FIREBASE.md) or [SETUP_SUPABASE.md](./SETUP_SUPABASE.md).
|
|
100
|
-
|
|
101
|
-
---
|
|
102
|
-
|
|
103
|
-
## Project Args (`.dndev/args.json`)
|
|
104
|
-
|
|
105
|
-
Generated by `dndev init`. All features ON by default — Phase 0 narrows down based on what the user actually needs.
|
|
106
|
-
|
|
107
|
-
```json
|
|
108
|
-
{
|
|
109
|
-
"platform": "firebase",
|
|
110
|
-
"strictness": "enforced",
|
|
111
|
-
"features": ["crud", "auth", "i18n", "billing", "oauth", "functions"],
|
|
112
|
-
"region": "europe-west1"
|
|
113
|
-
}
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
| Field | Values | Effect |
|
|
117
|
-
|-------|--------|--------|
|
|
118
|
-
| `platform` | `firebase`, `vercel` | Derived from builder choice |
|
|
119
|
-
| `strictness` | `enforced`, `warnings`, `permissive` | `enforced` = blocks `complete_phase` on convention violations. `warnings` = reports but allows. `permissive` = skips checks. |
|
|
120
|
-
| `features` | `crud`, `auth`, `i18n`, `billing`, `oauth`, `functions` | Filters gotchas — remove features the project doesn't use to reduce noise |
|
|
121
|
-
| `region` | any GCP region | Informational, shown in `start_phase` context |
|
|
122
|
-
|
|
123
|
-
`start_phase()` returns project args + phase-relevant gotchas automatically. `complete_phase()` respects `strictness`.
|
|
124
|
-
|
|
125
|
-
**Without MCP:** `args.json` and `GOTCHAS.md` are plain files. Any agent can read them directly.
|
|
126
|
-
|
|
127
|
-
---
|
|
128
|
-
|
|
129
|
-
## Gotchas (`guides/dndev/GOTCHAS.md`)
|
|
130
|
-
|
|
131
|
-
Common mistakes, phase-tagged. `start_phase(N)` automatically filters and returns only the gotchas relevant to phase N and your enabled features. Read the full file for reference: [GOTCHAS.md](../guides/dndev/GOTCHAS.md).
|
|
132
|
-
|
|
133
|
-
---
|
|
134
|
-
|
|
135
|
-
**Starting:** Call `list_features()` first, then `get_phase_status()` to see where you are, then `start_phase(0)` to begin.
|