@invictus-group-ai/orchestra 0.5.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.
- package/LICENSE +21 -0
- package/LICENSING.md +49 -0
- package/README.md +507 -0
- package/assets/settings-template.json +99 -0
- package/bin/invi.js +6 -0
- package/content-dist/LICENSE +95 -0
- package/content-dist/PIPELINE.md +823 -0
- package/content-dist/README.md +128 -0
- package/content-dist/agents/README.md +135 -0
- package/content-dist/agents/mapping.json +476 -0
- package/content-dist/agents/stacks/backend-django.md +66 -0
- package/content-dist/agents/stacks/backend-dotnet.md +72 -0
- package/content-dist/agents/stacks/backend-fastapi.md +66 -0
- package/content-dist/agents/stacks/backend-laravel.md +66 -0
- package/content-dist/agents/stacks/backend-node.md +66 -0
- package/content-dist/agents/stacks/backend-spring.md +66 -0
- package/content-dist/agents/stacks/desktop-delphi.md +73 -0
- package/content-dist/agents/stacks/frontend-angular.md +65 -0
- package/content-dist/agents/stacks/frontend-react.md +67 -0
- package/content-dist/agents/stacks/frontend-svelte.md +67 -0
- package/content-dist/agents/stacks/frontend-vue.md +66 -0
- package/content-dist/agents/stacks/mobile-flutter.md +68 -0
- package/content-dist/agents/stacks/wordpress.md +66 -0
- package/content-dist/agents/universal/invi-qa.md +57 -0
- package/content-dist/agents/universal/invi-reviewer.md +61 -0
- package/content-dist/agents/universal/invi-security.md +55 -0
- package/content-dist/agents/universal/invi-tester.md +55 -0
- package/content-dist/agents/universal/invi-ui.md +85 -0
- package/content-dist/fragments/base.md +37 -0
- package/content-dist/fragments/domain/api-publica-rate-limiting.md +83 -0
- package/content-dist/fragments/domain/autenticacao-enterprise.md +86 -0
- package/content-dist/fragments/domain/busca-elasticsearch.md +86 -0
- package/content-dist/fragments/domain/dashboard-admin-rbac.md +80 -0
- package/content-dist/fragments/domain/design-system.md +71 -0
- package/content-dist/fragments/domain/ecommerce-completo.md +86 -0
- package/content-dist/fragments/domain/filas-jobs.md +80 -0
- package/content-dist/fragments/domain/integracao-crm-erp.md +82 -0
- package/content-dist/fragments/domain/lgpd.md +84 -0
- package/content-dist/fragments/domain/multi-tenancy.md +79 -0
- package/content-dist/fragments/domain/notificacoes-multicanal.md +81 -0
- package/content-dist/fragments/domain/pagamentos-brasil.md +85 -0
- package/content-dist/fragments/domain/plataforma-conteudo.md +77 -0
- package/content-dist/fragments/domain/realtime-websockets.md +92 -0
- package/content-dist/fragments/domain/relatorios-analytics.md +80 -0
- package/content-dist/fragments/domain/saas-stripe-billing.md +79 -0
- package/content-dist/fragments/domain/sistema-pagamentos.md +81 -0
- package/content-dist/fragments/domain/upload-midia.md +81 -0
- package/content-dist/fragments/domain/whatsapp-business.md +82 -0
- package/content-dist/fragments/index.json +1670 -0
- package/content-dist/fragments/references/angular-ngrx/app-config-and-testing.md +81 -0
- package/content-dist/fragments/references/angular-ngrx/store-pattern.md +155 -0
- package/content-dist/fragments/references/ansible-server-setup/layout-and-config.md +143 -0
- package/content-dist/fragments/references/ansible-server-setup/roles.md +238 -0
- package/content-dist/fragments/references/api-publica-rate-limiting/patterns.md +68 -0
- package/content-dist/fragments/references/astro-static/content-and-islands.md +117 -0
- package/content-dist/fragments/references/autenticacao-enterprise/pitfalls.md +70 -0
- package/content-dist/fragments/references/busca-elasticsearch/patterns.md +100 -0
- package/content-dist/fragments/references/chrome-extension-mv3/messaging-and-storage.md +109 -0
- package/content-dist/fragments/references/cli-typescript-commander/commands-and-config.md +136 -0
- package/content-dist/fragments/references/cloud-run-gcp/build-and-deploy.md +127 -0
- package/content-dist/fragments/references/cloud-run-gcp/iam-secrets-networking.md +65 -0
- package/content-dist/fragments/references/computer-vision-yolo/serving-and-export.md +182 -0
- package/content-dist/fragments/references/computer-vision-yolo/training-and-validation.md +131 -0
- package/content-dist/fragments/references/convex-react/functions.md +117 -0
- package/content-dist/fragments/references/convex-react/react-and-storage.md +109 -0
- package/content-dist/fragments/references/dashboard-admin-rbac/patterns.md +73 -0
- package/content-dist/fragments/references/data-pipeline-airflow/dag-patterns.md +149 -0
- package/content-dist/fragments/references/data-pipeline-airflow/operations.md +74 -0
- package/content-dist/fragments/references/delphi-object-pascal/legacy-extraction.md +175 -0
- package/content-dist/fragments/references/django-drf-celery/celery-tasks.md +47 -0
- package/content-dist/fragments/references/django-drf-celery/viewsets-and-serializers.md +92 -0
- package/content-dist/fragments/references/docker-compose-dev/compose-files.md +146 -0
- package/content-dist/fragments/references/docker-compose-dev/dockerfile-and-proxy.md +108 -0
- package/content-dist/fragments/references/dotnet-aspnet/data-and-di.md +90 -0
- package/content-dist/fragments/references/dotnet-aspnet/web-layer.md +88 -0
- package/content-dist/fragments/references/ecommerce-completo/patterns.md +76 -0
- package/content-dist/fragments/references/electron-app/ipc-bridge.md +123 -0
- package/content-dist/fragments/references/electron-app/security-and-packaging.md +134 -0
- package/content-dist/fragments/references/elixir-phoenix/context-and-web.md +112 -0
- package/content-dist/fragments/references/elixir-phoenix/processes.md +65 -0
- package/content-dist/fragments/references/filas-jobs/patterns.md +116 -0
- package/content-dist/fragments/references/fine-tuning-huggingface/data-and-export.md +114 -0
- package/content-dist/fragments/references/fine-tuning-huggingface/training-and-lora.md +123 -0
- package/content-dist/fragments/references/flutter/platform-channels-and-goldens.md +68 -0
- package/content-dist/fragments/references/flutter/state-and-widgets.md +95 -0
- package/content-dist/fragments/references/github-actions-cicd/workflows.md +235 -0
- package/content-dist/fragments/references/go-chi-gorm/http-layer.md +87 -0
- package/content-dist/fragments/references/go-chi-gorm/service-layer.md +58 -0
- package/content-dist/fragments/references/graphql-apollo/resolvers-and-loaders.md +128 -0
- package/content-dist/fragments/references/hono-bun/patterns.md +144 -0
- package/content-dist/fragments/references/integracao-crm-erp/patterns.md +100 -0
- package/content-dist/fragments/references/kubernetes-helm/chart-templates.md +162 -0
- package/content-dist/fragments/references/kubernetes-helm/secrets-storage-deploy.md +78 -0
- package/content-dist/fragments/references/langchain-python-agent/agent-and-cost.md +120 -0
- package/content-dist/fragments/references/langchain-python-agent/memory-and-resilience.md +76 -0
- package/content-dist/fragments/references/laravel/eloquent-and-queues.md +126 -0
- package/content-dist/fragments/references/laravel/http-layer.md +110 -0
- package/content-dist/fragments/references/lgpd/patterns.md +110 -0
- package/content-dist/fragments/references/llm-ops-production/routing-and-budget.md +118 -0
- package/content-dist/fragments/references/llm-ops-production/tracing-eval-ab.md +102 -0
- package/content-dist/fragments/references/microservices-docker/compose-and-gateway.md +93 -0
- package/content-dist/fragments/references/microservices-docker/events-and-correlation.md +88 -0
- package/content-dist/fragments/references/ml-fastapi-serving/metrics-drift-docker.md +97 -0
- package/content-dist/fragments/references/ml-fastapi-serving/serving-core.md +155 -0
- package/content-dist/fragments/references/ml-training-pipeline/dvc-pipeline.md +102 -0
- package/content-dist/fragments/references/ml-training-pipeline/mlflow-registry-ci.md +139 -0
- package/content-dist/fragments/references/monitoring-observability/alerts-and-config.md +169 -0
- package/content-dist/fragments/references/monitoring-observability/instrumentation-node.md +139 -0
- package/content-dist/fragments/references/multi-tenancy/patterns.md +85 -0
- package/content-dist/fragments/references/nestjs-typescript/guards-and-decorators.md +103 -0
- package/content-dist/fragments/references/nestjs-typescript/modules-dtos-setup.md +106 -0
- package/content-dist/fragments/references/nextjs-app-router/patterns.md +177 -0
- package/content-dist/fragments/references/nextjs-prisma-postgres/billing.md +167 -0
- package/content-dist/fragments/references/nextjs-trpc-drizzle/data-and-auth.md +121 -0
- package/content-dist/fragments/references/nextjs-trpc-drizzle/trpc-setup.md +62 -0
- package/content-dist/fragments/references/nodejs-express-typescript/config-and-tokens.md +48 -0
- package/content-dist/fragments/references/nodejs-express-typescript/middleware.md +108 -0
- package/content-dist/fragments/references/notificacoes-multicanal/patterns.md +78 -0
- package/content-dist/fragments/references/nuxt3-tailwind/server-routes.md +79 -0
- package/content-dist/fragments/references/nuxt3-tailwind/state-and-fetching.md +129 -0
- package/content-dist/fragments/references/openai-api-integration/calls.md +210 -0
- package/content-dist/fragments/references/openai-api-integration/client-and-cost.md +71 -0
- package/content-dist/fragments/references/pagamentos-brasil/gateways-reconciliation.md +92 -0
- package/content-dist/fragments/references/pagamentos-brasil/pix-boleto.md +115 -0
- package/content-dist/fragments/references/plataforma-conteudo/patterns.md +74 -0
- package/content-dist/fragments/references/python-fastapi/dependency-injection.md +99 -0
- package/content-dist/fragments/references/python-fastapi/settings-and-tasks.md +47 -0
- package/content-dist/fragments/references/rag-pipeline/ingestion.md +92 -0
- package/content-dist/fragments/references/rag-pipeline/retrieval-and-eval.md +148 -0
- package/content-dist/fragments/references/react-express-monolith/auth-and-client.md +110 -0
- package/content-dist/fragments/references/react-express-monolith/monorepo.md +71 -0
- package/content-dist/fragments/references/react-native-expo/native-patterns.md +103 -0
- package/content-dist/fragments/references/react-native-expo/navigation-and-auth.md +55 -0
- package/content-dist/fragments/references/react-ts-zustand-query/store-and-query.md +152 -0
- package/content-dist/fragments/references/react-typescript/feature-module.md +64 -0
- package/content-dist/fragments/references/react-typescript/forms-and-state.md +69 -0
- package/content-dist/fragments/references/react-typescript/recipes.md +37 -0
- package/content-dist/fragments/references/react-typescript/testing.md +40 -0
- package/content-dist/fragments/references/realtime-websockets/patterns.md +92 -0
- package/content-dist/fragments/references/relatorios-analytics/patterns.md +81 -0
- package/content-dist/fragments/references/remix-express-full/auth-and-uploads.md +88 -0
- package/content-dist/fragments/references/remix-express-full/express-server.md +54 -0
- package/content-dist/fragments/references/remix-typescript/auth-and-db.md +68 -0
- package/content-dist/fragments/references/remix-typescript/loaders-and-actions.md +98 -0
- package/content-dist/fragments/references/rust-axum/error-and-state.md +99 -0
- package/content-dist/fragments/references/rust-axum/handlers.md +87 -0
- package/content-dist/fragments/references/saas-stripe-billing/patterns.md +86 -0
- package/content-dist/fragments/references/serverless-lambda/handler-patterns.md +107 -0
- package/content-dist/fragments/references/sistema-pagamentos/pitfalls.md +54 -0
- package/content-dist/fragments/references/spring-boot/service-and-data.md +96 -0
- package/content-dist/fragments/references/spring-boot/web-layer.md +100 -0
- package/content-dist/fragments/references/supabase-nextjs/clients-and-middleware.md +102 -0
- package/content-dist/fragments/references/supabase-nextjs/rls-and-storage.md +86 -0
- package/content-dist/fragments/references/svelte-sveltekit/hooks-and-state.md +67 -0
- package/content-dist/fragments/references/svelte-sveltekit/load-and-actions.md +80 -0
- package/content-dist/fragments/references/t3-stack/routers-and-callers.md +75 -0
- package/content-dist/fragments/references/t3-stack/trpc-setup.md +60 -0
- package/content-dist/fragments/references/terraform-aws/modules-and-ci.md +114 -0
- package/content-dist/fragments/references/terraform-aws/state-and-workspaces.md +66 -0
- package/content-dist/fragments/references/turborepo-monorepo/pipeline-and-packages.md +84 -0
- package/content-dist/fragments/references/upload-midia/patterns.md +80 -0
- package/content-dist/fragments/references/vector-search-pinecone/client-and-upsert.md +98 -0
- package/content-dist/fragments/references/vector-search-pinecone/query-and-hybrid.md +81 -0
- package/content-dist/fragments/references/vps-deploy-producao/compose-prod.md +97 -0
- package/content-dist/fragments/references/vps-deploy-producao/proxy-and-operations.md +118 -0
- package/content-dist/fragments/references/vscode-extension/activation-and-tree.md +98 -0
- package/content-dist/fragments/references/vscode-extension/webview-csp.md +57 -0
- package/content-dist/fragments/references/vue3-pinia-vite/components-and-stores.md +73 -0
- package/content-dist/fragments/references/vue3-pinia-vite/queries-forms-testing.md +100 -0
- package/content-dist/fragments/references/whatsapp-business/patterns.md +107 -0
- package/content-dist/fragments/references/wordpress/hooks-and-security.md +92 -0
- package/content-dist/fragments/references/wordpress/wp-cli-gates.md +64 -0
- package/content-dist/fragments/stack/angular-ngrx.md +75 -0
- package/content-dist/fragments/stack/ansible-server-setup.md +69 -0
- package/content-dist/fragments/stack/astro-static.md +72 -0
- package/content-dist/fragments/stack/chrome-extension-mv3.md +66 -0
- package/content-dist/fragments/stack/cli-typescript-commander.md +66 -0
- package/content-dist/fragments/stack/cloud-run-gcp.md +63 -0
- package/content-dist/fragments/stack/computer-vision-yolo.md +62 -0
- package/content-dist/fragments/stack/convex-react.md +65 -0
- package/content-dist/fragments/stack/data-pipeline-airflow.md +64 -0
- package/content-dist/fragments/stack/delphi-object-pascal.md +63 -0
- package/content-dist/fragments/stack/django-drf-celery.md +63 -0
- package/content-dist/fragments/stack/docker-compose-dev.md +69 -0
- package/content-dist/fragments/stack/dotnet-aspnet.md +62 -0
- package/content-dist/fragments/stack/electron-app.md +70 -0
- package/content-dist/fragments/stack/elixir-phoenix.md +65 -0
- package/content-dist/fragments/stack/fine-tuning-huggingface.md +69 -0
- package/content-dist/fragments/stack/flutter.md +61 -0
- package/content-dist/fragments/stack/github-actions-cicd.md +73 -0
- package/content-dist/fragments/stack/go-chi-gorm.md +73 -0
- package/content-dist/fragments/stack/graphql-apollo.md +70 -0
- package/content-dist/fragments/stack/hono-bun.md +62 -0
- package/content-dist/fragments/stack/kubernetes-helm.md +67 -0
- package/content-dist/fragments/stack/langchain-python-agent.md +64 -0
- package/content-dist/fragments/stack/laravel.md +64 -0
- package/content-dist/fragments/stack/llm-ops-production.md +63 -0
- package/content-dist/fragments/stack/microservices-docker.md +70 -0
- package/content-dist/fragments/stack/ml-fastapi-serving.md +64 -0
- package/content-dist/fragments/stack/ml-training-pipeline.md +67 -0
- package/content-dist/fragments/stack/monitoring-observability.md +68 -0
- package/content-dist/fragments/stack/nestjs-typescript.md +68 -0
- package/content-dist/fragments/stack/nextjs-app-router.md +65 -0
- package/content-dist/fragments/stack/nextjs-prisma-postgres.md +61 -0
- package/content-dist/fragments/stack/nextjs-trpc-drizzle.md +63 -0
- package/content-dist/fragments/stack/nodejs-express-typescript.md +60 -0
- package/content-dist/fragments/stack/nuxt3-tailwind.md +62 -0
- package/content-dist/fragments/stack/openai-api-integration.md +58 -0
- package/content-dist/fragments/stack/python-fastapi.md +64 -0
- package/content-dist/fragments/stack/rag-pipeline.md +62 -0
- package/content-dist/fragments/stack/react-express-monolith.md +61 -0
- package/content-dist/fragments/stack/react-native-expo.md +68 -0
- package/content-dist/fragments/stack/react-ts-zustand-query.md +64 -0
- package/content-dist/fragments/stack/react-typescript.md +73 -0
- package/content-dist/fragments/stack/remix-express-full.md +63 -0
- package/content-dist/fragments/stack/remix-typescript.md +66 -0
- package/content-dist/fragments/stack/rust-axum.md +63 -0
- package/content-dist/fragments/stack/serverless-lambda.md +65 -0
- package/content-dist/fragments/stack/spring-boot.md +63 -0
- package/content-dist/fragments/stack/supabase-nextjs.md +64 -0
- package/content-dist/fragments/stack/svelte-sveltekit.md +67 -0
- package/content-dist/fragments/stack/t3-stack.md +63 -0
- package/content-dist/fragments/stack/terraform-aws.md +65 -0
- package/content-dist/fragments/stack/turborepo-monorepo.md +61 -0
- package/content-dist/fragments/stack/vector-search-pinecone.md +63 -0
- package/content-dist/fragments/stack/vps-deploy-producao.md +64 -0
- package/content-dist/fragments/stack/vscode-extension.md +64 -0
- package/content-dist/fragments/stack/vue3-pinia-vite.md +65 -0
- package/content-dist/fragments/stack/wordpress.md +63 -0
- package/content-dist/skills/invi-commit/SKILL.md +85 -0
- package/content-dist/skills/invi-journal/SKILL.md +67 -0
- package/content-dist/skills/invi-map/SKILL.md +118 -0
- package/content-dist/skills/invi-mode/SKILL.md +176 -0
- package/content-dist/skills/invi-pr/SKILL.md +142 -0
- package/content-dist/skills/invi-qa/SKILL.md +75 -0
- package/content-dist/skills/invi-refactor-legacy/SKILL.md +90 -0
- package/content-dist/skills/invi-review/SKILL.md +83 -0
- package/content-dist/skills/invi-security/SKILL.md +89 -0
- package/content-dist/skills/invi-status/SKILL.md +72 -0
- package/content-dist/skills/invi-task/SKILL.md +143 -0
- package/content-dist/skills/invi-test/SKILL.md +97 -0
- package/content-dist/skills/po-handoff/SKILL.md +130 -0
- package/content-dist/skills/po-intake/SKILL.md +115 -0
- package/content-dist/skills/po-lint/SKILL.md +82 -0
- package/content-dist/skills/po-spec/SKILL.md +138 -0
- package/content-dist/skills/po-status/SKILL.md +130 -0
- package/content-dist/skills/po-verify/SKILL.md +124 -0
- package/content-dist/templates/requirements/REQ-TEMPLATE.md +110 -0
- package/content-dist/templates/requirements/constitution-TEMPLATE.md +77 -0
- package/dist/baseline.d.ts +21 -0
- package/dist/baseline.d.ts.map +1 -0
- package/dist/baseline.js +43 -0
- package/dist/baseline.js.map +1 -0
- package/dist/cli.d.ts +15 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +345 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/doctor.d.ts +31 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +173 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/export.d.ts +49 -0
- package/dist/commands/export.d.ts.map +1 -0
- package/dist/commands/export.js +95 -0
- package/dist/commands/export.js.map +1 -0
- package/dist/commands/gate.d.ts +42 -0
- package/dist/commands/gate.d.ts.map +1 -0
- package/dist/commands/gate.js +97 -0
- package/dist/commands/gate.js.map +1 -0
- package/dist/commands/init.d.ts +88 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +540 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/journalCmd.d.ts +47 -0
- package/dist/commands/journalCmd.d.ts.map +1 -0
- package/dist/commands/journalCmd.js +89 -0
- package/dist/commands/journalCmd.js.map +1 -0
- package/dist/commands/keys.d.ts +68 -0
- package/dist/commands/keys.d.ts.map +1 -0
- package/dist/commands/keys.js +240 -0
- package/dist/commands/keys.js.map +1 -0
- package/dist/commands/map.d.ts +123 -0
- package/dist/commands/map.d.ts.map +1 -0
- package/dist/commands/map.js +383 -0
- package/dist/commands/map.js.map +1 -0
- package/dist/commands/plan.d.ts +28 -0
- package/dist/commands/plan.d.ts.map +1 -0
- package/dist/commands/plan.js +64 -0
- package/dist/commands/plan.js.map +1 -0
- package/dist/commands/req.d.ts +92 -0
- package/dist/commands/req.d.ts.map +1 -0
- package/dist/commands/req.js +270 -0
- package/dist/commands/req.js.map +1 -0
- package/dist/commands/review.d.ts +40 -0
- package/dist/commands/review.d.ts.map +1 -0
- package/dist/commands/review.js +101 -0
- package/dist/commands/review.js.map +1 -0
- package/dist/commands/run.d.ts +33 -0
- package/dist/commands/run.d.ts.map +1 -0
- package/dist/commands/run.js +151 -0
- package/dist/commands/run.js.map +1 -0
- package/dist/commands/ship.d.ts +45 -0
- package/dist/commands/ship.d.ts.map +1 -0
- package/dist/commands/ship.js +252 -0
- package/dist/commands/ship.js.map +1 -0
- package/dist/commands/status.d.ts +36 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +152 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/sync.d.ts +91 -0
- package/dist/commands/sync.d.ts.map +1 -0
- package/dist/commands/sync.js +331 -0
- package/dist/commands/sync.js.map +1 -0
- package/dist/commands/syncCommits.d.ts +56 -0
- package/dist/commands/syncCommits.d.ts.map +1 -0
- package/dist/commands/syncCommits.js +97 -0
- package/dist/commands/syncCommits.js.map +1 -0
- package/dist/commands/task.d.ts +108 -0
- package/dist/commands/task.d.ts.map +1 -0
- package/dist/commands/task.js +217 -0
- package/dist/commands/task.js.map +1 -0
- package/dist/commands/update.d.ts +92 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +541 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/commands/verifyTask.d.ts +50 -0
- package/dist/commands/verifyTask.d.ts.map +1 -0
- package/dist/commands/verifyTask.js +172 -0
- package/dist/commands/verifyTask.js.map +1 -0
- package/dist/content.d.ts +128 -0
- package/dist/content.d.ts.map +1 -0
- package/dist/content.js +177 -0
- package/dist/content.js.map +1 -0
- package/dist/detect.d.ts +122 -0
- package/dist/detect.d.ts.map +1 -0
- package/dist/detect.js +594 -0
- package/dist/detect.js.map +1 -0
- package/dist/events.d.ts +36 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +76 -0
- package/dist/events.js.map +1 -0
- package/dist/frontmatter.d.ts +15 -0
- package/dist/frontmatter.d.ts.map +1 -0
- package/dist/frontmatter.js +74 -0
- package/dist/frontmatter.js.map +1 -0
- package/dist/i18n/en.d.ts +421 -0
- package/dist/i18n/en.d.ts.map +1 -0
- package/dist/i18n/en.js +443 -0
- package/dist/i18n/en.js.map +1 -0
- package/dist/i18n/index.d.ts +40 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +66 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/i18n/pt-BR.d.ts +11 -0
- package/dist/i18n/pt-BR.d.ts.map +1 -0
- package/dist/i18n/pt-BR.js +435 -0
- package/dist/i18n/pt-BR.js.map +1 -0
- package/dist/identity.d.ts +78 -0
- package/dist/identity.d.ts.map +1 -0
- package/dist/identity.js +152 -0
- package/dist/identity.js.map +1 -0
- package/dist/index.d.ts +79 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +48 -0
- package/dist/index.js.map +1 -0
- package/dist/insights.d.ts +86 -0
- package/dist/insights.d.ts.map +1 -0
- package/dist/insights.js +199 -0
- package/dist/insights.js.map +1 -0
- package/dist/interview.d.ts +81 -0
- package/dist/interview.d.ts.map +1 -0
- package/dist/interview.js +283 -0
- package/dist/interview.js.map +1 -0
- package/dist/inventory.d.ts +79 -0
- package/dist/inventory.d.ts.map +1 -0
- package/dist/inventory.js +86 -0
- package/dist/inventory.js.map +1 -0
- package/dist/journal.d.ts +22 -0
- package/dist/journal.d.ts.map +1 -0
- package/dist/journal.js +88 -0
- package/dist/journal.js.map +1 -0
- package/dist/migrations/legacyNames.d.ts +45 -0
- package/dist/migrations/legacyNames.d.ts.map +1 -0
- package/dist/migrations/legacyNames.js +118 -0
- package/dist/migrations/legacyNames.js.map +1 -0
- package/dist/plan.d.ts +42 -0
- package/dist/plan.d.ts.map +1 -0
- package/dist/plan.js +126 -0
- package/dist/plan.js.map +1 -0
- package/dist/render/agents.d.ts +327 -0
- package/dist/render/agents.d.ts.map +1 -0
- package/dist/render/agents.js +356 -0
- package/dist/render/agents.js.map +1 -0
- package/dist/render/claudeMd.d.ts +29 -0
- package/dist/render/claudeMd.d.ts.map +1 -0
- package/dist/render/claudeMd.js +110 -0
- package/dist/render/claudeMd.js.map +1 -0
- package/dist/render/githooks.d.ts +41 -0
- package/dist/render/githooks.d.ts.map +1 -0
- package/dist/render/githooks.js +168 -0
- package/dist/render/githooks.js.map +1 -0
- package/dist/render/markers.d.ts +13 -0
- package/dist/render/markers.d.ts.map +1 -0
- package/dist/render/markers.js +35 -0
- package/dist/render/markers.js.map +1 -0
- package/dist/render/requirements.d.ts +56 -0
- package/dist/render/requirements.d.ts.map +1 -0
- package/dist/render/requirements.js +86 -0
- package/dist/render/requirements.js.map +1 -0
- package/dist/render/settings.d.ts +43 -0
- package/dist/render/settings.d.ts.map +1 -0
- package/dist/render/settings.js +94 -0
- package/dist/render/settings.js.map +1 -0
- package/dist/render/transparency.d.ts +7 -0
- package/dist/render/transparency.d.ts.map +1 -0
- package/dist/render/transparency.js +164 -0
- package/dist/render/transparency.js.map +1 -0
- package/dist/requirements.d.ts +84 -0
- package/dist/requirements.d.ts.map +1 -0
- package/dist/requirements.js +229 -0
- package/dist/requirements.js.map +1 -0
- package/dist/sizing.d.ts +63 -0
- package/dist/sizing.d.ts.map +1 -0
- package/dist/sizing.js +104 -0
- package/dist/sizing.js.map +1 -0
- package/dist/tasks.d.ts +199 -0
- package/dist/tasks.d.ts.map +1 -0
- package/dist/tasks.js +320 -0
- package/dist/tasks.js.map +1 -0
- package/dist/util/diff3.d.ts +26 -0
- package/dist/util/diff3.d.ts.map +1 -0
- package/dist/util/diff3.js +112 -0
- package/dist/util/diff3.js.map +1 -0
- package/dist/util/fsx.d.ts +33 -0
- package/dist/util/fsx.d.ts.map +1 -0
- package/dist/util/fsx.js +153 -0
- package/dist/util/fsx.js.map +1 -0
- package/dist/util/git.d.ts +58 -0
- package/dist/util/git.d.ts.map +1 -0
- package/dist/util/git.js +171 -0
- package/dist/util/git.js.map +1 -0
- package/dist/util/merge.d.ts +27 -0
- package/dist/util/merge.d.ts.map +1 -0
- package/dist/util/merge.js +78 -0
- package/dist/util/merge.js.map +1 -0
- package/dist/util/out.d.ts +18 -0
- package/dist/util/out.d.ts.map +1 -0
- package/dist/util/out.js +23 -0
- package/dist/util/out.js.map +1 -0
- package/dist/util/proc.d.ts +12 -0
- package/dist/util/proc.d.ts.map +1 -0
- package/dist/util/proc.js +45 -0
- package/dist/util/proc.js.map +1 -0
- package/dist/util/registry.d.ts +58 -0
- package/dist/util/registry.d.ts.map +1 -0
- package/dist/util/registry.js +240 -0
- package/dist/util/registry.js.map +1 -0
- package/dist/verify.d.ts +52 -0
- package/dist/verify.d.ts.map +1 -0
- package/dist/verify.js +205 -0
- package/dist/verify.js.map +1 -0
- package/dist/version.d.ts +5 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +18 -0
- package/dist/version.js.map +1 -0
- package/package.json +63 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Reference: WP-CLI quality gates (read on demand)
|
|
2
|
+
|
|
3
|
+
Exemplar for `stack/wordpress` — the command sequences that gate changes, updates, and deploys. Run on staging first, always.
|
|
4
|
+
|
|
5
|
+
## Integrity + state snapshot (before touching anything)
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
wp core verify-checksums # core files untouched — must be clean
|
|
9
|
+
wp core version
|
|
10
|
+
wp plugin list --format=table # record the current state
|
|
11
|
+
wp theme list --format=table
|
|
12
|
+
wp config get table_prefix
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Update flow (staging → verify → production)
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# Staging
|
|
19
|
+
wp db export backup-$(date +%Y%m%d-%H%M).sql # rollback point FIRST
|
|
20
|
+
wp plugin update --all --dry-run # see what would change
|
|
21
|
+
wp plugin update <slug> # update deliberately, not blindly --all
|
|
22
|
+
wp theme update <slug>
|
|
23
|
+
wp core update && wp core update-db
|
|
24
|
+
|
|
25
|
+
# Verify
|
|
26
|
+
wp core verify-checksums
|
|
27
|
+
wp plugin list --update=available # nothing unexpectedly pending
|
|
28
|
+
wp eval 'echo (int) is_ssl();' # sanity: environment answers
|
|
29
|
+
curl -fsS https://staging.example.com/ >/dev/null # smoke-test critical pages
|
|
30
|
+
|
|
31
|
+
# Only after staging passes: repeat on production, backup first.
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Code checks (every PR)
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
php -l $(git diff --name-only --diff-filter=ACM | grep '\.php$') # lint changed files
|
|
38
|
+
composer exec phpcs # or the repo's code-style command
|
|
39
|
+
wp i18n make-pot . languages/acme.pot # strings extracted → translatable
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Diff guard: no core/parent edits
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# The diff must be empty outside the child theme / site plugins:
|
|
46
|
+
git diff --name-only | grep -vE '^wp-content/(themes/acme-child|plugins/acme-)' && {
|
|
47
|
+
echo "BLOCKER: change outside the child theme / site plugins"; exit 1; } || true
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Rollback
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
wp db import backup-<stamp>.sql
|
|
54
|
+
wp plugin install <slug> --version=<previous> --force
|
|
55
|
+
wp cache flush && wp rewrite flush
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Useful diagnostics
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
wp cron event list # scheduled work actually scheduled?
|
|
62
|
+
tail -n 50 wp-content/debug.log # WP_DEBUG_LOG on staging — no new notices
|
|
63
|
+
wp user list --role=administrator # unexpected admins = incident
|
|
64
|
+
```
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: stack/angular-ngrx
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
lang: en
|
|
5
|
+
summary: "Angular + NgRx SPA discipline: standalone OnPush components, smart/dumb split, store-owned server interaction via effects, inject()-based DI, managed subscriptions."
|
|
6
|
+
source: "frontend/10-angular-ngrx.md"
|
|
7
|
+
detect:
|
|
8
|
+
deps: { "@angular/core": "*", "@ngrx/store": "*" }
|
|
9
|
+
files: ["angular.json"]
|
|
10
|
+
score: 10
|
|
11
|
+
requires: []
|
|
12
|
+
conflicts: []
|
|
13
|
+
tokens: 897
|
|
14
|
+
migrated: true
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Angular + NgRx
|
|
18
|
+
|
|
19
|
+
Rules-only fragment; exemplar code is evicted to `references/angular-ngrx/` and read on demand.
|
|
20
|
+
|
|
21
|
+
## Architecture rules
|
|
22
|
+
|
|
23
|
+
- Standalone components everywhere — no NgModules. Every component, pipe and directive is standalone and uses `ChangeDetectionStrategy.OnPush`.
|
|
24
|
+
- Feature folders under `src/app/features/<name>/`: `data-access/` (store `+state/` files plus the HTTP service) and `ui/` (dumb components), with lazy routes and an `index.ts` public API. Core singletons (auth, guards, interceptors) live in `app/core/`; shared standalone components/pipes/directives in `app/shared/`.
|
|
25
|
+
- Smart vs dumb is binary: smart components inject the Store and dispatch; dumb components communicate only via `input()`/`output()`. Business logic never lives in components — services and effects own it.
|
|
26
|
+
- Global state goes through NgRx: actions via `createActionGroup`, pure reducers, memoized selectors, and effects that own every HTTP call and map errors to failure actions with `catchError`.
|
|
27
|
+
- DI via `inject()`, not constructor injection; `providedIn: 'root'` only for true singletons; feature services provided on the lazy route; functional guards, and interceptors registered in the app config via `withInterceptors`.
|
|
28
|
+
- Every subscription is lifecycle-managed: `async` pipe first, `takeUntilDestroyed` otherwise.
|
|
29
|
+
|
|
30
|
+
## Signals vs observables
|
|
31
|
+
|
|
32
|
+
| Situation | Use |
|
|
33
|
+
|-----------|-----|
|
|
34
|
+
| Local component state | `signal()` |
|
|
35
|
+
| Derived value | `computed()` |
|
|
36
|
+
| Global app state | NgRx Store via selectors |
|
|
37
|
+
| HTTP, event streams, stream combination | RxJS observables + operators |
|
|
38
|
+
| Store data in a template | `select()` + `async` pipe (auto-unsubscribe) |
|
|
39
|
+
| Side effect on signal change | `effect()` |
|
|
40
|
+
|
|
41
|
+
## Trigger → action
|
|
42
|
+
|
|
43
|
+
| Trigger | Action |
|
|
44
|
+
|---------|--------|
|
|
45
|
+
| New feature | feature folder → lazy route with feature providers → `data-access` store + `ui` components |
|
|
46
|
+
| New server interaction | action group → effect calls the service → success/failure actions → reducer + selectors |
|
|
47
|
+
| Derived view state | compose selectors from the feature selector — never duplicate derived state |
|
|
48
|
+
| Protected route | functional guard + interceptor from `app/core/` |
|
|
49
|
+
|
|
50
|
+
## Naming
|
|
51
|
+
|
|
52
|
+
Store files `<feature>.actions|reducer|selectors|effects|state.ts` under `data-access/+state/` · components `<name>.component.ts` · routes `<feature>.routes.ts` · selectors prefixed `select` · action groups one per feature via `createActionGroup`.
|
|
53
|
+
|
|
54
|
+
## Quality gates (before any PR)
|
|
55
|
+
|
|
56
|
+
- Build, typecheck, lint and tests pass with zero errors and zero warnings (exact commands come from PROJECT FACTS).
|
|
57
|
+
- Every component is OnPush; every subscription managed (`async` pipe or `takeUntilDestroyed`).
|
|
58
|
+
- Every effect maps errors with `catchError` to a failure action.
|
|
59
|
+
- No component calls HTTP directly; no business logic in components.
|
|
60
|
+
|
|
61
|
+
## Forbidden
|
|
62
|
+
|
|
63
|
+
- NEVER use NgModules — the project is 100% standalone.
|
|
64
|
+
- NEVER use default change detection — always OnPush.
|
|
65
|
+
- NEVER call HTTP from a component — effects/services own it.
|
|
66
|
+
- NEVER manipulate the DOM directly — use Renderer2 or template refs.
|
|
67
|
+
- NEVER mutate state in reducers — return new objects.
|
|
68
|
+
- NEVER access the Store from inside a service — only components and effects.
|
|
69
|
+
- NEVER use `effect()` to mutate other signals (loop hazard).
|
|
70
|
+
- NEVER use `any` — type explicitly.
|
|
71
|
+
|
|
72
|
+
## References (read on demand)
|
|
73
|
+
|
|
74
|
+
- `references/angular-ngrx/store-pattern.md` — one feature's state, actions, reducer, selectors, effects; standalone OnPush component.
|
|
75
|
+
- `references/angular-ngrx/app-config-and-testing.md` — app config providers, mock-store component test, reducer test.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: stack/ansible-server-setup
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
lang: en
|
|
5
|
+
summary: "Ansible provisioning discipline: idempotent roles, vault-only secrets, handler-driven restarts, validated templates, check-mode-safe playbooks, hardened SSH/firewall baseline."
|
|
6
|
+
source: "devops/05-ansible-server-setup.md"
|
|
7
|
+
detect:
|
|
8
|
+
deps: {}
|
|
9
|
+
files: ["ansible.cfg", "playbooks/**"]
|
|
10
|
+
score: 8
|
|
11
|
+
requires: []
|
|
12
|
+
conflicts: []
|
|
13
|
+
tokens: 898
|
|
14
|
+
migrated: true
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Ansible server provisioning
|
|
18
|
+
|
|
19
|
+
Rules-only fragment; exemplar playbooks, roles and config are evicted to `references/ansible-server-setup/` and read on demand.
|
|
20
|
+
|
|
21
|
+
## Architecture rules
|
|
22
|
+
|
|
23
|
+
- Everything is idempotent: running a playbook N times converges to the same state. Declare state (`state: present/absent`) with real modules; any unavoidable `command`/`shell` task guards itself with `creates:` or `changed_when:`.
|
|
24
|
+
- Roles are the reuse unit — `tasks/`, `handlers/`, `templates/`, `vars/` per role; no playbook-specific logic inside roles, parameterize via variables.
|
|
25
|
+
- Inventory split by environment (`inventory/production.yml`, `inventory/staging.yml`); shared vars in `group_vars/`, host overrides in `host_vars/`; one master playbook composes roles per host group.
|
|
26
|
+
- All secrets live in Ansible Vault (encrypted vault files or `encrypt_string`) — never in plaintext YAML, never in inventory.
|
|
27
|
+
- Service restarts go through handlers (`notify:`), never inline tasks — handlers run once per play, at the end.
|
|
28
|
+
- Config templates are validated before overwriting live config (`validate:`, e.g. `nginx -t -c %s`).
|
|
29
|
+
- Every task is tagged so partial runs (`--tags`) work.
|
|
30
|
+
- Privilege escalation is task-level `become: true` where needed, not blanket play-level.
|
|
31
|
+
- Every playbook survives `--check --diff` without side effects.
|
|
32
|
+
- Hardened baseline in the common role: SSH root login and password auth disabled, key-only deploy user, firewall default-deny incoming with explicit allows, intrusion-ban service (fail2ban or equivalent) on every host.
|
|
33
|
+
|
|
34
|
+
## Trigger → action
|
|
35
|
+
|
|
36
|
+
| Trigger | Action |
|
|
37
|
+
|---------|--------|
|
|
38
|
+
| New server class | role(s) → inventory group → play in the master playbook |
|
|
39
|
+
| New secret | `ansible-vault encrypt_string` → vault file — never plaintext |
|
|
40
|
+
| Config change | template + `validate:` + handler notify — never hand-edit live files |
|
|
41
|
+
| Service install | package module `state: present` + systemd enable/start |
|
|
42
|
+
| One-off command need | rewrite as a declarative module; if impossible, guard with `creates:`/`changed_when:` |
|
|
43
|
+
| TLS certificate | certbot role with `creates:` guard + renewal timer enabled |
|
|
44
|
+
|
|
45
|
+
## Naming
|
|
46
|
+
|
|
47
|
+
Roles `roles/<service>/` · playbooks `playbooks/<purpose>.yml` with `site.yml` as the master · vault variables prefixed `vault_` · tags mirror role names · fully qualified collection names for modules (`ansible.builtin.apt`, not `apt`).
|
|
48
|
+
|
|
49
|
+
## Quality gates (before any PR)
|
|
50
|
+
|
|
51
|
+
- `--syntax-check` and `--check --diff` pass clean on every playbook.
|
|
52
|
+
- ansible-lint passes (exact command comes from PROJECT FACTS).
|
|
53
|
+
- A second consecutive run reports zero changes — idempotence proven.
|
|
54
|
+
- No plaintext secret in any YAML; vault files actually encrypted.
|
|
55
|
+
- Every templated service config has a matching handler and a `validate:` where the service supports it.
|
|
56
|
+
|
|
57
|
+
## Forbidden
|
|
58
|
+
|
|
59
|
+
- NEVER put passwords, keys or tokens in plaintext YAML or inventory.
|
|
60
|
+
- NEVER use bare `shell`/`command` where a module exists, nor without `creates:`/`changed_when:`.
|
|
61
|
+
- NEVER restart services from tasks — use handlers.
|
|
62
|
+
- NEVER disable SSH host-key checking outside local development.
|
|
63
|
+
- NEVER apply to production without a prior `--check --diff` run.
|
|
64
|
+
- NEVER install runtimes via unverified `curl | bash` one-liners — use a packaged repository or a checksummed script guarded by `creates:`.
|
|
65
|
+
|
|
66
|
+
## References (read on demand)
|
|
67
|
+
|
|
68
|
+
- `references/ansible-server-setup/layout-and-config.md` — directory layout, ansible.cfg, inventory, master playbook, vault workflows.
|
|
69
|
+
- `references/ansible-server-setup/roles.md` — common hardening, nginx with `validate:`, ufw, certbot, Node.js/pm2 roles and handlers.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: stack/astro-static
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
lang: en
|
|
5
|
+
summary: "Astro static-site discipline: zero-JS by default, islands hydrated by need, Zod-validated content collections, image/SEO gates."
|
|
6
|
+
source: "frontend/08-astro-static.md"
|
|
7
|
+
detect:
|
|
8
|
+
deps: { "astro": "*" }
|
|
9
|
+
files: ["astro.config.*"]
|
|
10
|
+
score: 10
|
|
11
|
+
requires: []
|
|
12
|
+
conflicts: []
|
|
13
|
+
tokens: 845
|
|
14
|
+
migrated: true
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Astro (static site)
|
|
18
|
+
|
|
19
|
+
Rules-only fragment; exemplar code is evicted to `references/astro-static/` and read on demand.
|
|
20
|
+
|
|
21
|
+
## Mental model
|
|
22
|
+
|
|
23
|
+
Everything renders to static HTML with zero JavaScript by default. Interactivity is opt-in per component via a `client:*` directive — every directive ships JS to the browser. Start with zero directives and add only when a component truly needs to be interactive.
|
|
24
|
+
|
|
25
|
+
## Architecture rules
|
|
26
|
+
|
|
27
|
+
- Pages are `.astro` files under `src/pages/`; interactive islands are framework components (e.g. `.tsx`) kept in their own folder — never make a page itself a framework component.
|
|
28
|
+
- Pure zero-JS components and layouts stay in Astro; a component only becomes an island when it needs client-side state or events.
|
|
29
|
+
- Directive ladder: prefer `client:visible`, then `client:idle`; `client:load` only for UI that must respond immediately; `client:media`/`client:only` for special cases.
|
|
30
|
+
- Every content type is a content collection with a Zod schema — front-matter is validated at build, and drafts are filtered out of production listings.
|
|
31
|
+
- Dynamic routes in static mode always implement `getStaticPaths()` over the collection.
|
|
32
|
+
- Form handlers and other server behavior live in API routes (`src/pages/api/`), not in page front-matter.
|
|
33
|
+
- Site URL and public config come from env (`SITE`, `PUBLIC_*`) — never hardcoded.
|
|
34
|
+
|
|
35
|
+
## Trigger → action
|
|
36
|
+
|
|
37
|
+
| Trigger | Action |
|
|
38
|
+
|---------|--------|
|
|
39
|
+
| New page | `.astro` page file (folder + `index.astro` for sections) |
|
|
40
|
+
| New content type | collection + Zod schema first, then pages that consume it |
|
|
41
|
+
| Dynamic route | `[param].astro` + `getStaticPaths()` from the collection |
|
|
42
|
+
| Interactive widget | island component + the least-eager `client:*` directive that works |
|
|
43
|
+
| Blog/list page | query the collection, filter drafts, render pure Astro markup |
|
|
44
|
+
| SEO | base layout owns title/description/canonical/OG tags; sitemap + RSS via official integrations |
|
|
45
|
+
|
|
46
|
+
## Performance rules
|
|
47
|
+
|
|
48
|
+
- Images always go through Astro's built-in image component (`astro:assets`) — never raw `<img>` for local assets.
|
|
49
|
+
- Fonts are self-hosted (bundled font packages) — no font CDN requests.
|
|
50
|
+
- Use prefetch attributes on internal links where navigation speed matters.
|
|
51
|
+
- Check build output sizes after adding any island — hydration payloads are the main regression vector.
|
|
52
|
+
|
|
53
|
+
## Quality gates (before any PR)
|
|
54
|
+
|
|
55
|
+
- Build and diagnostics pass with zero errors (exact commands come from PROJECT FACTS).
|
|
56
|
+
- Lighthouse budget: performance and SEO at/near 100, accessibility ≥95 on key pages.
|
|
57
|
+
- No unused `client:*` directives; each remaining one is justified by real interactivity.
|
|
58
|
+
- All collections validate against their Zod schema; drafts excluded from production output.
|
|
59
|
+
- Sitemap and robots.txt present; RSS generated for blog-like content.
|
|
60
|
+
|
|
61
|
+
## Forbidden
|
|
62
|
+
|
|
63
|
+
- NEVER use `client:load` where `client:visible` or `client:idle` suffices.
|
|
64
|
+
- NEVER use raw `<img>` for local images — use the built-in image component.
|
|
65
|
+
- NEVER load fonts from a CDN — self-host them.
|
|
66
|
+
- NEVER create framework-component pages — pages are `.astro`, islands are components.
|
|
67
|
+
- NEVER import heavy JS libraries into Astro components that render static output.
|
|
68
|
+
- NEVER skip `getStaticPaths()` for dynamic routes in static mode.
|
|
69
|
+
|
|
70
|
+
## References (read on demand)
|
|
71
|
+
|
|
72
|
+
- `references/astro-static/content-and-islands.md` — collection schema, dynamic route rendering, island usage, SEO base layout.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: stack/chrome-extension-mv3
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
lang: en
|
|
5
|
+
summary: "Chrome extension (Manifest V3) discipline: stateless service worker, typed message passing, isolated content scripts, minimal permissions."
|
|
6
|
+
source: "backend/12-chrome-extension-mv3.md"
|
|
7
|
+
detect:
|
|
8
|
+
deps: {}
|
|
9
|
+
files: ["manifest.json"]
|
|
10
|
+
score: 4
|
|
11
|
+
requires: []
|
|
12
|
+
conflicts: []
|
|
13
|
+
tokens: 784
|
|
14
|
+
migrated: true
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Chrome Extension (Manifest V3)
|
|
18
|
+
|
|
19
|
+
Rules-only fragment; exemplar code is evicted to `references/chrome-extension-mv3/` and read on demand.
|
|
20
|
+
|
|
21
|
+
## Architecture rules
|
|
22
|
+
|
|
23
|
+
- The background service worker is stateless — Chrome terminates it at any time. Never rely on in-memory state; persist through `chrome.storage`.
|
|
24
|
+
- Content scripts run in an isolated world: they can read the DOM but cannot touch page JS variables. Bridging to the page uses `window.postMessage` or a MAIN-world injected script; MAIN-world code has no `chrome.*` APIs.
|
|
25
|
+
- All message passing is typed: one discriminated-union message type shared by every context; `chrome.runtime.sendMessage` only carries those messages.
|
|
26
|
+
- Async message handlers must `return true` from the listener to keep the response channel open.
|
|
27
|
+
- Permissions are minimal: request only what is used; scope `host_permissions` to specific match patterns.
|
|
28
|
+
- `storage.sync` for small user preferences; `storage.local` for large or sensitive data (including tokens).
|
|
29
|
+
- The build tool owns bundling and dev reload — never hand-roll manual extension reloads in development.
|
|
30
|
+
|
|
31
|
+
## Trigger → action
|
|
32
|
+
|
|
33
|
+
| Trigger | Action |
|
|
34
|
+
|---------|--------|
|
|
35
|
+
| New cross-context feature | add a variant to the shared message union first, then handlers |
|
|
36
|
+
| Read data from the page | content script (isolated world) → message to the service worker |
|
|
37
|
+
| Access page JS state | MAIN-world injected script → `postMessage` bridge to the content script |
|
|
38
|
+
| Persist a setting | typed `chrome.storage` wrapper — never bare string keys scattered around |
|
|
39
|
+
| Run script in the active tab | `chrome.scripting.executeScript` (MV3 API) |
|
|
40
|
+
| Long-running work | alarms/events + persisted state — the worker will not stay alive for it |
|
|
41
|
+
|
|
42
|
+
## Naming
|
|
43
|
+
|
|
44
|
+
Contexts in their own folders: `src/background/`, `src/content/`, `src/popup/`, `src/options/`, shared types and storage wrappers in `src/shared/`.
|
|
45
|
+
|
|
46
|
+
## Quality gates (before any PR)
|
|
47
|
+
|
|
48
|
+
- Typecheck, tests, and build pass; the built extension loads with zero errors on the extensions page.
|
|
49
|
+
- Every permission in `manifest.json` is actually used; nothing broader than needed.
|
|
50
|
+
- No `eval`, `new Function()`, or `innerHTML` fed with untrusted input.
|
|
51
|
+
- Async message handlers `return true`; every message is a member of the typed union.
|
|
52
|
+
- Production bundle contains no TS sources or sourcemaps.
|
|
53
|
+
|
|
54
|
+
## Forbidden
|
|
55
|
+
|
|
56
|
+
- NEVER use `eval()`/`document.write()` or load remote scripts at runtime — MV3 CSP blocks dynamic code; bundle everything.
|
|
57
|
+
- NEVER use MV2 APIs (`chrome.tabs.executeScript`, DOM-dependent background pages) — the service worker has no DOM.
|
|
58
|
+
- NEVER store tokens in `localStorage` — use `chrome.storage.local`.
|
|
59
|
+
- NEVER request `<all_urls>` without a documented justification.
|
|
60
|
+
- NEVER hardcode API keys in the source — keep them in storage or a backend.
|
|
61
|
+
- NEVER call `chrome.storage` from MAIN-world scripts — bridge through the content script.
|
|
62
|
+
- NEVER run long tasks in the service worker without a keepalive/alarm strategy.
|
|
63
|
+
|
|
64
|
+
## References (read on demand)
|
|
65
|
+
|
|
66
|
+
- `references/chrome-extension-mv3/messaging-and-storage.md` — typed message union, storage wrapper, MAIN-world bridge, minimal manifest shape.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: stack/cli-typescript-commander
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
lang: en
|
|
5
|
+
summary: "TypeScript CLI discipline: thin bootstrap, one module per command, stdout for data / stderr for logs, CI-safe prompts, XDG-style config."
|
|
6
|
+
source: "backend/11-cli-typescript-commander.md"
|
|
7
|
+
detect:
|
|
8
|
+
deps: { "commander": "*" }
|
|
9
|
+
files: []
|
|
10
|
+
score: 6
|
|
11
|
+
requires: []
|
|
12
|
+
conflicts: []
|
|
13
|
+
tokens: 758
|
|
14
|
+
migrated: true
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# CLI Tool (TypeScript + Commander)
|
|
18
|
+
|
|
19
|
+
Rules-only fragment; exemplar code is evicted to `references/cli-typescript-commander/` and read on demand.
|
|
20
|
+
|
|
21
|
+
## Architecture rules
|
|
22
|
+
|
|
23
|
+
- The bin entry only bootstraps: it registers commands and calls `parseAsync`; zero logic lives there.
|
|
24
|
+
- One module per command under `src/commands/`, exporting a `register<Name>(program)` function; shared helpers (config, logger, spinner, file ops) live in `src/lib/`.
|
|
25
|
+
- Stream discipline: stdout carries machine-readable output only (JSON, values); logs, spinners, and errors go to stderr. Piping the CLI into another tool must always work.
|
|
26
|
+
- Errors: command handlers throw typed errors; only the bootstrap maps them to exit codes. `process.exit()` never appears inside a handler.
|
|
27
|
+
- Every interactive prompt is skippable with `--yes` (defaults or flags take over) so the CLI runs unattended in CI.
|
|
28
|
+
- Config layering: user config in a dot-directory under the home dir; project config discovered by walking up the tree (cosmiconfig-style). Files holding secrets are written with mode `0600`.
|
|
29
|
+
- Distribution: dual ESM + CJS build via the bundler; the published package contains only the built output.
|
|
30
|
+
|
|
31
|
+
## Trigger → action
|
|
32
|
+
|
|
33
|
+
| Trigger | Action |
|
|
34
|
+
|---------|--------|
|
|
35
|
+
| New command | `src/commands/<name>.ts` with `register<Name>` → wire in the bin entry |
|
|
36
|
+
| Needs user input | prompt gated by `--yes`; every answer also settable via a flag |
|
|
37
|
+
| Long operation | spinner on stderr; final result on stdout |
|
|
38
|
+
| New persisted setting | typed field in the config manager — never ad-hoc file writes |
|
|
39
|
+
| Machine output mode | `--json` flag → single JSON document on stdout, nothing else |
|
|
40
|
+
| Auth/token handling | store in the user config dir (0600) — never in the project |
|
|
41
|
+
|
|
42
|
+
## Naming
|
|
43
|
+
|
|
44
|
+
Commands `src/commands/<verb>.ts` · helpers `src/lib/<topic>.ts` · prompt definitions `src/prompts/` · shared types in `src/types.ts` · tests mirror the source tree.
|
|
45
|
+
|
|
46
|
+
## Quality gates (before any PR)
|
|
47
|
+
|
|
48
|
+
- Typecheck and tests pass (filesystem mocked/virtualized in unit tests); exact commands come from PROJECT FACTS.
|
|
49
|
+
- `--yes` verifiably skips every prompt (a CI-mode test exists).
|
|
50
|
+
- `--help` renders correctly for the root and every subcommand.
|
|
51
|
+
- Packaging dry-run ships only the intended files.
|
|
52
|
+
- Output contract holds: nothing but data on stdout in machine-readable modes.
|
|
53
|
+
|
|
54
|
+
## Forbidden
|
|
55
|
+
|
|
56
|
+
- NEVER use `console.log` — route through the logger (stderr) or the data-output helper (stdout).
|
|
57
|
+
- NEVER call `process.exit()` inside a command handler — throw and let the bootstrap exit.
|
|
58
|
+
- NEVER use sync filesystem calls inside async command flows.
|
|
59
|
+
- NEVER add a prompt without a `--yes`/flag bypass — it breaks CI.
|
|
60
|
+
- NEVER hardcode paths — build them from the OS home dir and `path` helpers.
|
|
61
|
+
- NEVER store API tokens in project-level `.env` files — user config dir with restrictive permissions.
|
|
62
|
+
- NEVER mutate `process.argv`.
|
|
63
|
+
|
|
64
|
+
## References (read on demand)
|
|
65
|
+
|
|
66
|
+
- `references/cli-typescript-commander/commands-and-config.md` — bootstrap, command registration, config manager, logger/spinner split.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: stack/cloud-run-gcp
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
lang: en
|
|
5
|
+
summary: "Cloud Run deployment discipline: stateless containers, immutable git-sha images, Secret Manager, least-privilege SAs, private Cloud SQL."
|
|
6
|
+
source: "devops/07-cloud-run-gcp.md"
|
|
7
|
+
detect:
|
|
8
|
+
deps: {}
|
|
9
|
+
files: ["cloudbuild.yaml"]
|
|
10
|
+
score: 6
|
|
11
|
+
requires: []
|
|
12
|
+
conflicts: []
|
|
13
|
+
tokens: 812
|
|
14
|
+
migrated: true
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Google Cloud Run (+ Cloud Build, Artifact Registry, Cloud SQL)
|
|
18
|
+
|
|
19
|
+
Rules-only fragment; exemplar pipeline/IaC snippets are evicted to `references/cloud-run-gcp/` and read on demand.
|
|
20
|
+
|
|
21
|
+
## Architecture rules
|
|
22
|
+
|
|
23
|
+
- Containers are stateless: instances appear and disappear at any time; no local file state, and the app handles SIGTERM gracefully.
|
|
24
|
+
- The container listens on `$PORT` (default 8080) and answers a cheap liveness endpoint that does NOT hit the database; readiness gets its own deeper endpoint.
|
|
25
|
+
- Images are immutable and tagged with the git SHA — `latest` is never deployed. Multi-stage builds keep dev dependencies out of the production image; the process runs as a non-root user.
|
|
26
|
+
- Secrets live in Secret Manager and are wired with `--set-secrets` at deploy time — never pasted as plain env vars in the console, CLI, or YAML.
|
|
27
|
+
- Each service gets its own least-privilege service account: Cloud SQL client + per-secret accessor + bucket-scoped roles only. Never owner/editor/IAM-admin.
|
|
28
|
+
- Cloud SQL is private-IP only, reached through a Serverless VPC Access connector with `--vpc-egress=private-ranges-only`; no public database IP.
|
|
29
|
+
- Cloud Build triggers per branch: main deploys prod, develop deploys staging, PRs build and test only.
|
|
30
|
+
- Cold-start budget is explicit: keep images small, defer heavy init; latency-sensitive services set `min-instances >= 1` (and 2+ for zero-downtime rollouts).
|
|
31
|
+
|
|
32
|
+
## Trigger → action
|
|
33
|
+
|
|
34
|
+
| Trigger | Action |
|
|
35
|
+
|---------|--------|
|
|
36
|
+
| New service | dedicated SA → secrets in Secret Manager → pipeline trigger → deploy flags in the repo |
|
|
37
|
+
| New secret | create in Secret Manager → grant accessor to that SA only → reference via `--set-secrets` |
|
|
38
|
+
| Config change | new revision via deploy — never mutate a running revision by hand in the console |
|
|
39
|
+
| Latency SLO | set `min-instances`, consider CPU boost for cold starts, tune concurrency from load tests |
|
|
40
|
+
| CPU-bound workload | lower concurrency (e.g. 10–20) instead of raising memory blindly |
|
|
41
|
+
| DB connectivity | private IP + VPC connector — never expose Cloud SQL publicly |
|
|
42
|
+
|
|
43
|
+
## Quality gates (before any deploy)
|
|
44
|
+
|
|
45
|
+
- Pipeline runs build → tests inside the built image → deploy; a failing test blocks the deploy.
|
|
46
|
+
- Image tagged with the commit SHA; `.dockerignore` excludes VCS metadata, tests, env files.
|
|
47
|
+
- Service account roles reviewed: no project-wide grants where resource-scoped ones exist.
|
|
48
|
+
- `--no-allow-unauthenticated` unless the service is deliberately public.
|
|
49
|
+
- Health endpoints deployed and verified; SIGTERM handling tested (graceful shutdown).
|
|
50
|
+
|
|
51
|
+
## Forbidden
|
|
52
|
+
|
|
53
|
+
- NEVER deploy `latest` or any mutable tag.
|
|
54
|
+
- NEVER put secret values in env vars, YAML, or shell history — Secret Manager references only.
|
|
55
|
+
- NEVER grant owner/editor roles to a service account.
|
|
56
|
+
- NEVER give Cloud SQL a public IP in production.
|
|
57
|
+
- NEVER write state to the container filesystem beyond scratch/tmp use.
|
|
58
|
+
- NEVER skip the test step between build and deploy in the pipeline.
|
|
59
|
+
|
|
60
|
+
## References (read on demand)
|
|
61
|
+
|
|
62
|
+
- `references/cloud-run-gcp/build-and-deploy.md` — Dockerfile shape, Cloud Build pipeline, deploy flags, min-instances strategy, health checks.
|
|
63
|
+
- `references/cloud-run-gcp/iam-secrets-networking.md` — least-privilege SA, secret lifecycle, VPC connector + private Cloud SQL.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: stack/computer-vision-yolo
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
lang: en
|
|
5
|
+
summary: "YOLO computer-vision discipline: singleton model with warmup, GPU-first inference, strict dataset format, mAP quality gates before deploy."
|
|
6
|
+
source: "ai-ml/10-computer-vision-yolo.md"
|
|
7
|
+
detect:
|
|
8
|
+
deps: { "ultralytics": "*" }
|
|
9
|
+
files: []
|
|
10
|
+
score: 10
|
|
11
|
+
requires: []
|
|
12
|
+
conflicts: []
|
|
13
|
+
tokens: 812
|
|
14
|
+
migrated: true
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Computer Vision (YOLO detection/tracking + FastAPI)
|
|
18
|
+
|
|
19
|
+
Rules-only fragment; exemplar training/serving code is evicted to `references/computer-vision-yolo/` and read on demand.
|
|
20
|
+
|
|
21
|
+
## Architecture rules
|
|
22
|
+
|
|
23
|
+
- The model loads once at startup as a singleton and is warmed up with a dummy inference — never load per request (cold load costs seconds).
|
|
24
|
+
- Production inference runs on GPU; CPU is for dev/testing only. Run ONE server worker per GPU and scale horizontally with more containers — multiple workers fight over GPU memory.
|
|
25
|
+
- Confidence threshold is tuned per class and set explicitly for production (≥0.4 as the starting point) — never ship the permissive library default. NMS IoU stays at the library default unless data proves otherwise.
|
|
26
|
+
- Batch size 1 for the REST/streaming API; small batches (4–8) only for offline video processing.
|
|
27
|
+
- Datasets follow the YOLO layout strictly (images/labels split into train/val/test, one label file per image, normalized coordinates); the dataset yaml is committed together with the data it describes and the format never changes mid-experiment.
|
|
28
|
+
- Every training run logs params, metrics, and the best checkpoint to the experiment tracker.
|
|
29
|
+
- Optimized engines (TensorRT/ONNX/CoreML) are exports of the validated checkpoint; benchmark AND verify outputs match before switching production to an exported engine.
|
|
30
|
+
- Long videos are processed in streaming mode with tracker state persisted between frames — never load a whole video into memory.
|
|
31
|
+
|
|
32
|
+
## Trigger → action
|
|
33
|
+
|
|
34
|
+
| Trigger | Action |
|
|
35
|
+
|---------|--------|
|
|
36
|
+
| New dataset | YOLO layout + yaml → sanity-check labels → commit together |
|
|
37
|
+
| Train | pretrained weights → tuned augmentation for the data regime → tracked run |
|
|
38
|
+
| Evaluate | validation script with hard metric gates — failing gates block deploy |
|
|
39
|
+
| Serve | singleton detector → decode-defensive endpoint (reject non-images, undecodable bytes) |
|
|
40
|
+
| Speed up inference | FP16 → exported engine → benchmark vs native before switching |
|
|
41
|
+
| Track objects | built-in tracker config, `persist` + `stream` for long videos |
|
|
42
|
+
|
|
43
|
+
## Quality gates (before any deploy)
|
|
44
|
+
|
|
45
|
+
- Metric gates hold on the validation set: mAP50 ≥ 0.70 and mAP50-95 ≥ 0.50 minimum (tighten per project); per-class AP reviewed for weak classes.
|
|
46
|
+
- Inference endpoint validates content type and decodability; latency measured at production image size.
|
|
47
|
+
- Exported engine outputs verified against the native checkpoint on a sample set.
|
|
48
|
+
- GPU image runs a single worker; container has the needed OpenCV runtime libs.
|
|
49
|
+
|
|
50
|
+
## Forbidden
|
|
51
|
+
|
|
52
|
+
- NEVER reload the model per request or per worker fork.
|
|
53
|
+
- NEVER ship the default confidence threshold to production untuned.
|
|
54
|
+
- NEVER change dataset format or split mid-experiment.
|
|
55
|
+
- NEVER deploy a model that has not passed the metric gates.
|
|
56
|
+
- NEVER run multiple server workers against one GPU.
|
|
57
|
+
- NEVER process video by accumulating frames in memory — stream them.
|
|
58
|
+
|
|
59
|
+
## References (read on demand)
|
|
60
|
+
|
|
61
|
+
- `references/computer-vision-yolo/training-and-validation.md` — training script with tracking, augmentation tuning by data regime, dataset layout, metric-gated validation.
|
|
62
|
+
- `references/computer-vision-yolo/serving-and-export.md` — detector singleton, FastAPI endpoint, tracking, engine export + benchmark, GPU Dockerfile.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: stack/convex-react
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
lang: en
|
|
5
|
+
summary: "Convex + React discipline: schema-first tables with indexes, transactional mutations, actions for external calls, auth checks before any DB access."
|
|
6
|
+
source: "fullstack/08-convex-react.md"
|
|
7
|
+
detect:
|
|
8
|
+
deps: { "convex": "*", "react": "*" }
|
|
9
|
+
files: ["convex/schema.ts"]
|
|
10
|
+
score: 12
|
|
11
|
+
requires: []
|
|
12
|
+
conflicts: []
|
|
13
|
+
tokens: 753
|
|
14
|
+
migrated: true
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Convex + React
|
|
18
|
+
|
|
19
|
+
Rules-only fragment; exemplar code is evicted to `references/convex-react/` and read on demand.
|
|
20
|
+
|
|
21
|
+
## Architecture rules
|
|
22
|
+
|
|
23
|
+
- Convex functions are the only backend: every data operation is a `query`, `mutation`, or `action` — no parallel REST layer.
|
|
24
|
+
- `query` is reactive: subscribed components auto-update on server-side change. `mutation` is transactional: writes that must be consistent stay in ONE mutation, never split across two.
|
|
25
|
+
- `action` is for external calls (`fetch`, third-party APIs) and is NOT transactional; it touches the DB only through `ctx.runQuery`/`ctx.runMutation`.
|
|
26
|
+
- Auth first: every protected function calls `ctx.auth.getUserIdentity()` and rejects before ANY `ctx.db` access; ownership checks precede update/delete.
|
|
27
|
+
- Schema-first: update `convex/schema.ts` (with validators) before writing a function that touches a new field; every query pattern gets an index — no full-table scans in handlers.
|
|
28
|
+
- Cleanup rides the transaction: deleting a document also deletes its linked storage in the same mutation.
|
|
29
|
+
- One Convex client instance, created at the app root and provided through the auth-aware provider.
|
|
30
|
+
- Secrets live in Convex environment config (set via the CLI) — never committed in `convex/` code.
|
|
31
|
+
|
|
32
|
+
## Trigger → action
|
|
33
|
+
|
|
34
|
+
| Trigger | Action |
|
|
35
|
+
|---------|--------|
|
|
36
|
+
| New table/field | schema + validators + indexes first → then functions |
|
|
37
|
+
| Read data in UI | `useQuery` — treat `undefined` as the loading state |
|
|
38
|
+
| Write data | one mutation, auth + ownership checked before writes |
|
|
39
|
+
| External API call | `action` → persist results via `runMutation` |
|
|
40
|
+
| Instant UI feedback | `withOptimisticUpdate` as a pure local-store transform (auto-reverts on error) |
|
|
41
|
+
| File upload | mutation issues upload URL → client uploads → mutation links the storage id |
|
|
42
|
+
|
|
43
|
+
## Quality gates (before any PR)
|
|
44
|
+
|
|
45
|
+
- Convex dev/typecheck runs clean for `convex/` and the app (exact commands come from PROJECT FACTS).
|
|
46
|
+
- Every mutation/protected query verifies identity before DB access; ownership enforced on update/delete.
|
|
47
|
+
- Every `withIndex` used in handlers has a matching index in the schema; no unindexed scans.
|
|
48
|
+
- All `useQuery` call sites handle the `undefined` loading state.
|
|
49
|
+
- Optimistic updates verified to revert on mutation failure.
|
|
50
|
+
- Deploy completes without warnings.
|
|
51
|
+
|
|
52
|
+
## Forbidden
|
|
53
|
+
|
|
54
|
+
- NEVER write to the DB directly inside an `action` — use `ctx.runMutation`.
|
|
55
|
+
- NEVER call `fetch()` inside a mutation — that is what actions are for.
|
|
56
|
+
- NEVER use a `useQuery` result without a loading check.
|
|
57
|
+
- NEVER edit `_generated/` files.
|
|
58
|
+
- NEVER create more than one Convex client instance.
|
|
59
|
+
- NEVER touch `ctx.db` before the identity check in a protected function.
|
|
60
|
+
- NEVER commit API keys in `convex/` code — environment config only.
|
|
61
|
+
|
|
62
|
+
## References (read on demand)
|
|
63
|
+
|
|
64
|
+
- `references/convex-react/functions.md` — schema with indexes, query/mutation/action patterns with auth and ownership.
|
|
65
|
+
- `references/convex-react/react-and-storage.md` — provider wiring, optimistic updates, three-step file upload.
|