@cubis/foundry 0.3.71 → 0.3.73
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/CHANGELOG.md +23 -2
- package/dist/cli/core.js +9 -22
- package/dist/cli/core.js.map +1 -1
- package/package.json +1 -1
- package/src/cli/core.ts +13 -22
- package/workflows/powers/accessibility/POWER.md +83 -94
- package/workflows/powers/accessibility/SKILL.md +82 -94
- package/workflows/powers/agent-design/POWER.md +201 -0
- package/workflows/powers/agent-design/SKILL.md +198 -0
- package/workflows/powers/agent-design/references/clarification-patterns.md +153 -0
- package/workflows/powers/agent-design/references/skill-testing.md +164 -0
- package/workflows/powers/agent-design/references/workflow-patterns.md +226 -0
- package/workflows/powers/agentic-eval/POWER.md +62 -0
- package/workflows/powers/agentic-eval/SKILL.md +59 -0
- package/workflows/powers/agentic-eval/references/rubric-and-regression-checklist.md +11 -0
- package/workflows/powers/api-designer/POWER.md +43 -71
- package/workflows/powers/api-designer/SKILL.md +43 -71
- package/workflows/powers/api-patterns/POWER.md +42 -56
- package/workflows/powers/api-patterns/SKILL.md +42 -57
- package/workflows/powers/architecture-designer/POWER.md +43 -60
- package/workflows/powers/architecture-designer/SKILL.md +43 -60
- package/workflows/powers/ask-questions-if-underspecified/POWER.md +51 -3
- package/workflows/powers/auth-architect/POWER.md +69 -0
- package/workflows/powers/auth-architect/SKILL.md +66 -0
- package/workflows/powers/auth-architect/references/session-token-policy-checklist.md +45 -0
- package/workflows/powers/behavioral-modes/POWER.md +100 -9
- package/workflows/powers/c-pro/POWER.md +105 -0
- package/workflows/powers/c-pro/SKILL.md +102 -0
- package/workflows/powers/c-pro/references/build-systems-and-toolchains.md +148 -0
- package/workflows/powers/c-pro/references/common-ub-and-portability.md +166 -0
- package/workflows/powers/c-pro/references/debugging-with-sanitizers.md +205 -0
- package/workflows/powers/c-pro/references/memory-safety-and-build-checklist.md +60 -0
- package/workflows/powers/c-pro/references/posix-and-platform-apis.md +244 -0
- package/workflows/powers/changelog-generator/POWER.md +127 -63
- package/workflows/powers/changelog-generator/SKILL.md +126 -63
- package/workflows/powers/ci-cd-pipelines/POWER.md +156 -0
- package/workflows/powers/ci-cd-pipelines/SKILL.md +153 -0
- package/workflows/powers/ci-cd-pipelines/references/github-actions-patterns.md +160 -0
- package/workflows/powers/ci-cd-pipelines/references/pipeline-security-checklist.md +57 -0
- package/workflows/powers/cli-developer/POWER.md +152 -95
- package/workflows/powers/cli-developer/SKILL.md +152 -95
- package/workflows/powers/cpp-pro/POWER.md +111 -0
- package/workflows/powers/cpp-pro/SKILL.md +108 -0
- package/workflows/powers/cpp-pro/references/concurrency-primitives.md +266 -0
- package/workflows/powers/cpp-pro/references/move-semantics-and-value-types.md +149 -0
- package/workflows/powers/cpp-pro/references/performance-and-profiling.md +191 -0
- package/workflows/powers/cpp-pro/references/raii-and-modern-cpp-checklist.md +87 -0
- package/workflows/powers/cpp-pro/references/template-and-concepts-patterns.md +205 -0
- package/workflows/powers/csharp-pro/POWER.md +47 -22
- package/workflows/powers/csharp-pro/SKILL.md +47 -22
- package/workflows/powers/dart-pro/POWER.md +68 -0
- package/workflows/powers/dart-pro/SKILL.md +65 -0
- package/workflows/powers/dart-pro/references/isolate-and-concurrency.md +180 -0
- package/workflows/powers/dart-pro/references/null-safety-and-async-patterns.md +133 -0
- package/workflows/powers/dart-pro/references/package-structure-and-linting.md +193 -0
- package/workflows/powers/dart-pro/references/sealed-records-patterns.md +173 -0
- package/workflows/powers/dart-pro/references/testing-and-mocking.md +235 -0
- package/workflows/powers/database-design/POWER.md +47 -33
- package/workflows/powers/database-design/SKILL.md +47 -33
- package/workflows/powers/database-optimizer/POWER.md +43 -64
- package/workflows/powers/database-optimizer/SKILL.md +43 -64
- package/workflows/powers/database-skills/POWER.md +59 -93
- package/workflows/powers/database-skills/SKILL.md +59 -93
- package/workflows/powers/debugging-strategies/POWER.md +69 -0
- package/workflows/powers/debugging-strategies/SKILL.md +66 -0
- package/workflows/powers/debugging-strategies/references/reproduce-isolate-verify-checklist.md +42 -0
- package/workflows/powers/deep-research/POWER.md +67 -0
- package/workflows/powers/deep-research/SKILL.md +64 -0
- package/workflows/powers/deep-research/references/multi-round-research-loop.md +80 -0
- package/workflows/powers/design-system-builder/POWER.md +130 -116
- package/workflows/powers/design-system-builder/SKILL.md +130 -116
- package/workflows/powers/devops-engineer/POWER.md +120 -57
- package/workflows/powers/devops-engineer/SKILL.md +120 -57
- package/workflows/powers/docker-kubernetes/POWER.md +94 -0
- package/workflows/powers/docker-kubernetes/SKILL.md +91 -0
- package/workflows/powers/docker-kubernetes/references/dockerfile-optimization-checklist.md +35 -0
- package/workflows/powers/docker-kubernetes/references/kubernetes-deployment-patterns.md +59 -0
- package/workflows/powers/documentation-templates/POWER.md +158 -127
- package/workflows/powers/documentation-templates/SKILL.md +158 -127
- package/workflows/powers/drizzle-expert/POWER.md +66 -0
- package/workflows/powers/drizzle-expert/SKILL.md +63 -0
- package/workflows/powers/drizzle-expert/references/runtime-pairing-matrix.md +16 -0
- package/workflows/powers/drizzle-expert/references/schema-and-migration-playbook.md +18 -0
- package/workflows/powers/error-ux-observability/POWER.md +144 -131
- package/workflows/powers/error-ux-observability/SKILL.md +143 -131
- package/workflows/powers/fastapi-expert/POWER.md +46 -60
- package/workflows/powers/fastapi-expert/SKILL.md +46 -60
- package/workflows/powers/firebase/POWER.md +65 -0
- package/workflows/powers/firebase/SKILL.md +62 -0
- package/workflows/powers/firebase/references/platform-routing.md +16 -0
- package/workflows/powers/firebase/references/rules-and-indexes-checklist.md +11 -0
- package/workflows/powers/flutter-design-system/POWER.md +63 -0
- package/workflows/powers/flutter-design-system/SKILL.md +60 -0
- package/workflows/powers/flutter-design-system/references/shared-widgets.md +29 -0
- package/workflows/powers/flutter-design-system/references/tokens-and-theme.md +34 -0
- package/workflows/powers/flutter-drift/POWER.md +65 -0
- package/workflows/powers/flutter-drift/SKILL.md +62 -0
- package/workflows/powers/flutter-drift/references/migrations.md +22 -0
- package/workflows/powers/flutter-drift/references/query-patterns.md +26 -0
- package/workflows/powers/flutter-feature/POWER.md +65 -0
- package/workflows/powers/flutter-feature/SKILL.md +62 -0
- package/workflows/powers/flutter-feature/references/architecture-rules.md +85 -0
- package/workflows/powers/flutter-feature/references/composite-provider.md +58 -0
- package/workflows/powers/flutter-feature/references/outbox-pattern.md +87 -0
- package/workflows/powers/flutter-feature/references/testing-patterns.md +218 -0
- package/workflows/powers/flutter-go-router/POWER.md +64 -0
- package/workflows/powers/flutter-go-router/SKILL.md +61 -0
- package/workflows/powers/flutter-go-router/references/guards-and-deeplinks.md +20 -0
- package/workflows/powers/flutter-go-router/references/typed-routes.md +27 -0
- package/workflows/powers/flutter-offline-sync/POWER.md +62 -0
- package/workflows/powers/flutter-offline-sync/SKILL.md +59 -0
- package/workflows/powers/flutter-offline-sync/references/outbox-full.md +44 -0
- package/workflows/powers/flutter-repository/POWER.md +64 -0
- package/workflows/powers/flutter-repository/SKILL.md +61 -0
- package/workflows/powers/flutter-repository/references/drift-patterns.md +21 -0
- package/workflows/powers/flutter-repository/references/retrofit-patterns.md +20 -0
- package/workflows/powers/flutter-riverpod/POWER.md +70 -0
- package/workflows/powers/flutter-riverpod/SKILL.md +67 -0
- package/workflows/powers/flutter-riverpod/references/async-and-mutations.md +19 -0
- package/workflows/powers/flutter-riverpod/references/async-lifecycle.md +19 -0
- package/workflows/powers/flutter-riverpod/references/provider-selection.md +20 -0
- package/workflows/powers/flutter-riverpod/references/testing.md +21 -0
- package/workflows/powers/flutter-riverpod/references/version-matrix.md +24 -0
- package/workflows/powers/flutter-state-machine/POWER.md +62 -0
- package/workflows/powers/flutter-state-machine/SKILL.md +59 -0
- package/workflows/powers/flutter-state-machine/references/app-state-contract.md +23 -0
- package/workflows/powers/flutter-state-machine/references/ui-rendering.md +14 -0
- package/workflows/powers/flutter-testing/POWER.md +64 -0
- package/workflows/powers/flutter-testing/SKILL.md +61 -0
- package/workflows/powers/flutter-testing/references/offline-sync-tests.md +16 -0
- package/workflows/powers/flutter-testing/references/test-layers.md +33 -0
- package/workflows/powers/frontend-code-review/POWER.md +137 -0
- package/workflows/powers/frontend-code-review/SKILL.md +134 -0
- package/workflows/powers/frontend-code-review/references/common-antipatterns.md +86 -0
- package/workflows/powers/frontend-code-review/references/performance-budgets.md +56 -0
- package/workflows/powers/frontend-code-review/references/review-checklists.md +47 -0
- package/workflows/powers/frontend-design/POWER.md +163 -362
- package/workflows/powers/frontend-design/SKILL.md +163 -362
- package/workflows/powers/game-development/POWER.md +57 -140
- package/workflows/powers/game-development/SKILL.md +57 -140
- package/workflows/powers/geo-fundamentals/POWER.md +64 -126
- package/workflows/powers/geo-fundamentals/SKILL.md +64 -127
- package/workflows/powers/git-workflow/POWER.md +135 -0
- package/workflows/powers/git-workflow/SKILL.md +132 -0
- package/workflows/powers/git-workflow/references/pr-review-checklist.md +63 -0
- package/workflows/powers/golang-pro/POWER.md +46 -35
- package/workflows/powers/golang-pro/SKILL.md +46 -35
- package/workflows/powers/graphql-architect/POWER.md +44 -62
- package/workflows/powers/graphql-architect/SKILL.md +44 -62
- package/workflows/powers/i18n-localization/POWER.md +118 -103
- package/workflows/powers/i18n-localization/SKILL.md +118 -103
- package/workflows/powers/java-pro/POWER.md +47 -22
- package/workflows/powers/java-pro/SKILL.md +47 -22
- package/workflows/powers/javascript-pro/POWER.md +47 -34
- package/workflows/powers/javascript-pro/SKILL.md +47 -34
- package/workflows/powers/kotlin-pro/POWER.md +46 -23
- package/workflows/powers/kotlin-pro/SKILL.md +46 -23
- package/workflows/powers/legacy-modernizer/POWER.md +43 -60
- package/workflows/powers/legacy-modernizer/SKILL.md +43 -60
- package/workflows/powers/mcp-builder/POWER.md +65 -0
- package/workflows/powers/mcp-builder/SKILL.md +62 -0
- package/workflows/powers/mcp-builder/references/testing-and-evals.md +17 -0
- package/workflows/powers/mcp-builder/references/transport-and-tool-design.md +17 -0
- package/workflows/powers/microservices-architect/POWER.md +43 -70
- package/workflows/powers/microservices-architect/SKILL.md +43 -70
- package/workflows/powers/mobile-design/POWER.md +110 -345
- package/workflows/powers/mobile-design/SKILL.md +110 -345
- package/workflows/powers/mongodb/POWER.md +67 -0
- package/workflows/powers/mongodb/SKILL.md +64 -0
- package/workflows/powers/mongodb/references/mongodb-checklist.md +20 -0
- package/workflows/powers/mysql/POWER.md +67 -0
- package/workflows/powers/mysql/SKILL.md +64 -0
- package/workflows/powers/mysql/references/mysql-checklist.md +20 -0
- package/workflows/powers/neki/POWER.md +67 -0
- package/workflows/powers/neki/SKILL.md +64 -0
- package/workflows/powers/neki/references/neki-checklist.md +18 -0
- package/workflows/powers/nestjs-expert/POWER.md +45 -91
- package/workflows/powers/nestjs-expert/SKILL.md +45 -91
- package/workflows/powers/nextjs-developer/POWER.md +51 -44
- package/workflows/powers/nextjs-developer/SKILL.md +51 -44
- package/workflows/powers/nodejs-best-practices/POWER.md +48 -29
- package/workflows/powers/nodejs-best-practices/SKILL.md +48 -29
- package/workflows/powers/observability/POWER.md +109 -0
- package/workflows/powers/observability/SKILL.md +106 -0
- package/workflows/powers/observability/references/alerting-and-slo-checklist.md +87 -0
- package/workflows/powers/observability/references/opentelemetry-setup-guide.md +121 -0
- package/workflows/powers/openai-docs/POWER.md +61 -0
- package/workflows/powers/openai-docs/SKILL.md +58 -0
- package/workflows/powers/openai-docs/references/official-source-playbook.md +10 -0
- package/workflows/powers/performance-profiling/POWER.md +61 -114
- package/workflows/powers/performance-profiling/SKILL.md +61 -114
- package/workflows/powers/php-pro/POWER.md +116 -0
- package/workflows/powers/php-pro/SKILL.md +113 -0
- package/workflows/powers/php-pro/references/architecture-and-di.md +239 -0
- package/workflows/powers/php-pro/references/modern-php-features.md +189 -0
- package/workflows/powers/php-pro/references/performance-and-deployment.md +197 -0
- package/workflows/powers/php-pro/references/php84-strict-typing-checklist.md +161 -0
- package/workflows/powers/php-pro/references/testing-and-static-analysis.md +235 -0
- package/workflows/powers/playwright-e2e/POWER.md +85 -0
- package/workflows/powers/playwright-e2e/SKILL.md +82 -0
- package/workflows/powers/playwright-e2e/references/locator-trace-flake-checklist.md +80 -0
- package/workflows/powers/postgres/POWER.md +67 -0
- package/workflows/powers/postgres/SKILL.md +64 -0
- package/workflows/powers/postgres/references/postgres-checklist.md +20 -0
- package/workflows/powers/prompt-engineer/POWER.md +47 -30
- package/workflows/powers/prompt-engineer/SKILL.md +47 -30
- package/workflows/powers/python-pro/POWER.md +47 -36
- package/workflows/powers/python-pro/SKILL.md +47 -36
- package/workflows/powers/react-best-practices/POWER.md +56 -33
- package/workflows/powers/react-best-practices/SKILL.md +56 -33
- package/workflows/powers/react-expert/POWER.md +47 -37
- package/workflows/powers/react-expert/SKILL.md +47 -37
- package/workflows/powers/redis/POWER.md +67 -0
- package/workflows/powers/redis/SKILL.md +64 -0
- package/workflows/powers/redis/references/redis-checklist.md +19 -0
- package/workflows/powers/ruby-pro/POWER.md +118 -0
- package/workflows/powers/ruby-pro/SKILL.md +115 -0
- package/workflows/powers/ruby-pro/references/modern-ruby-features.md +189 -0
- package/workflows/powers/ruby-pro/references/object-design-patterns.md +220 -0
- package/workflows/powers/ruby-pro/references/performance-and-profiling.md +224 -0
- package/workflows/powers/ruby-pro/references/ruby-concurrency-and-testing.md +190 -0
- package/workflows/powers/ruby-pro/references/testing-and-rspec.md +236 -0
- package/workflows/powers/rust-pro/POWER.md +45 -31
- package/workflows/powers/rust-pro/SKILL.md +45 -31
- package/workflows/powers/security-engineer/POWER.md +129 -0
- package/workflows/powers/security-engineer/SKILL.md +126 -0
- package/workflows/powers/seo-fundamentals/POWER.md +59 -102
- package/workflows/powers/seo-fundamentals/SKILL.md +59 -102
- package/workflows/powers/serverless-patterns/POWER.md +171 -0
- package/workflows/powers/serverless-patterns/SKILL.md +168 -0
- package/workflows/powers/skill-creator/POWER.md +90 -0
- package/workflows/powers/skill-creator/SKILL.md +87 -0
- package/workflows/powers/skill-creator/references/platform-formats.md +181 -0
- package/workflows/powers/skill-creator/references/schemas.md +430 -0
- package/workflows/powers/spec-miner/POWER.md +49 -57
- package/workflows/powers/spec-miner/SKILL.md +49 -57
- package/workflows/powers/sqlite/POWER.md +67 -0
- package/workflows/powers/sqlite/SKILL.md +64 -0
- package/workflows/powers/sqlite/references/sqlite-checklist.md +19 -0
- package/workflows/powers/sre-engineer/POWER.md +123 -64
- package/workflows/powers/sre-engineer/SKILL.md +123 -64
- package/workflows/powers/static-analysis/POWER.md +121 -77
- package/workflows/powers/static-analysis/SKILL.md +121 -77
- package/workflows/powers/stripe-best-practices/POWER.md +140 -17
- package/workflows/powers/stripe-best-practices/SKILL.md +139 -17
- package/workflows/powers/supabase/POWER.md +67 -0
- package/workflows/powers/supabase/SKILL.md +64 -0
- package/workflows/powers/supabase/references/supabase-checklist.md +19 -0
- package/workflows/powers/swift-pro/POWER.md +118 -0
- package/workflows/powers/swift-pro/SKILL.md +115 -0
- package/workflows/powers/swift-pro/references/concurrency-patterns.md +165 -0
- package/workflows/powers/swift-pro/references/protocol-and-generics.md +172 -0
- package/workflows/powers/swift-pro/references/sendable-and-isolation.md +116 -0
- package/workflows/powers/swift-pro/references/swift-concurrency-and-protocols.md +260 -0
- package/workflows/powers/swift-pro/references/testing-and-packages.md +192 -0
- package/workflows/powers/tailwind-patterns/POWER.md +71 -240
- package/workflows/powers/tailwind-patterns/SKILL.md +71 -240
- package/workflows/powers/testing-patterns/POWER.md +155 -10
- package/workflows/powers/testing-patterns/SKILL.md +155 -10
- package/workflows/powers/typescript-pro/POWER.md +47 -38
- package/workflows/powers/typescript-pro/SKILL.md +47 -38
- package/workflows/powers/vitess/POWER.md +67 -0
- package/workflows/powers/vitess/SKILL.md +64 -0
- package/workflows/powers/vitess/references/vitess-checklist.md +19 -0
- package/workflows/powers/vulnerability-scanner/POWER.md +146 -10
- package/workflows/powers/vulnerability-scanner/SKILL.md +146 -10
- package/workflows/powers/web-perf/POWER.md +43 -170
- package/workflows/powers/web-perf/SKILL.md +43 -170
- package/workflows/powers/webapp-testing/POWER.md +43 -164
- package/workflows/powers/webapp-testing/SKILL.md +43 -164
- package/workflows/workflows/agent-environment-setup/platforms/antigravity/rules/GEMINI.md +65 -42
- package/workflows/workflows/agent-environment-setup/platforms/claude/rules/CLAUDE.md +8 -6
- package/workflows/workflows/agent-environment-setup/platforms/codex/rules/AGENTS.md +65 -41
- package/workflows/workflows/agent-environment-setup/platforms/copilot/rules/copilot-instructions.md +8 -6
- package/workflows/workflows/agent-environment-setup/shared/rules/STEERING.md +9 -8
- package/workflows/workflows/agent-environment-setup/shared/rules/overrides/codex.md +1 -1
|
@@ -1,194 +1,225 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: documentation-templates
|
|
3
|
-
description:
|
|
4
|
-
|
|
3
|
+
description: Create API documentation, architecture decision records, runbooks, onboarding guides, and technical writing using proven templates and standards.
|
|
4
|
+
license: Apache-2.0
|
|
5
|
+
metadata:
|
|
6
|
+
author: cubis-foundry
|
|
7
|
+
version: "3.0"
|
|
8
|
+
compatibility: Claude Code, Codex, GitHub Copilot, Gemini CLI
|
|
5
9
|
---
|
|
6
10
|
|
|
7
11
|
# Documentation Templates
|
|
8
12
|
|
|
9
|
-
|
|
13
|
+
## Purpose
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
Provide templates and guidance for technical documentation: API docs, architecture decision records (ADRs), runbooks, README files, onboarding guides, and inline code documentation.
|
|
16
|
+
|
|
17
|
+
## When to Use
|
|
18
|
+
|
|
19
|
+
- Writing or improving a project README
|
|
20
|
+
- Creating API documentation
|
|
21
|
+
- Recording architecture decisions (ADRs)
|
|
22
|
+
- Building operational runbooks
|
|
23
|
+
- Writing onboarding guides for new team members
|
|
24
|
+
- Documenting complex systems or workflows
|
|
12
25
|
|
|
13
|
-
##
|
|
26
|
+
## Instructions
|
|
14
27
|
|
|
15
|
-
###
|
|
28
|
+
### Step 1 — Choose the Right Template
|
|
16
29
|
|
|
17
|
-
|
|
|
18
|
-
|
|
19
|
-
|
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
25
|
-
| **License** | Legal |
|
|
30
|
+
| Document Type | Audience | When |
|
|
31
|
+
| ---------------- | --------------------------------- | -------------------------- |
|
|
32
|
+
| README | New contributors, users | Every project |
|
|
33
|
+
| API docs | API consumers (internal/external) | Every API |
|
|
34
|
+
| ADR | Future developers | Every significant decision |
|
|
35
|
+
| Runbook | On-call engineers | Every production system |
|
|
36
|
+
| Onboarding guide | New team members | Every team |
|
|
37
|
+
| RFC / Design doc | Reviewers before implementation | Complex features |
|
|
26
38
|
|
|
27
|
-
### README Template
|
|
39
|
+
### Step 2 — README Template
|
|
28
40
|
|
|
29
41
|
```markdown
|
|
30
42
|
# Project Name
|
|
31
43
|
|
|
32
|
-
|
|
44
|
+
One-line description of what this project does.
|
|
33
45
|
|
|
34
46
|
## Quick Start
|
|
35
47
|
|
|
36
|
-
|
|
48
|
+
\`\`\`bash
|
|
49
|
+
npm install
|
|
50
|
+
npm run dev
|
|
51
|
+
\`\`\`
|
|
37
52
|
|
|
38
53
|
## Features
|
|
39
54
|
|
|
40
|
-
- Feature 1
|
|
41
|
-
- Feature 2
|
|
55
|
+
- Feature 1: brief description
|
|
56
|
+
- Feature 2: brief description
|
|
42
57
|
|
|
43
|
-
##
|
|
58
|
+
## Architecture
|
|
44
59
|
|
|
45
|
-
|
|
46
|
-
|----------|-------------|---------|
|
|
47
|
-
| PORT | Server port | 3000 |
|
|
60
|
+
Brief overview or link to architecture docs.
|
|
48
61
|
|
|
49
|
-
##
|
|
62
|
+
## Development
|
|
50
63
|
|
|
51
|
-
|
|
52
|
-
- [Architecture](./docs/architecture.md)
|
|
64
|
+
### Prerequisites
|
|
53
65
|
|
|
54
|
-
|
|
66
|
+
- Node.js >= 20
|
|
67
|
+
- PostgreSQL >= 15
|
|
55
68
|
|
|
56
|
-
|
|
57
|
-
```
|
|
69
|
+
### Setup
|
|
58
70
|
|
|
59
|
-
|
|
71
|
+
Step-by-step local development setup.
|
|
60
72
|
|
|
61
|
-
|
|
73
|
+
### Testing
|
|
62
74
|
|
|
63
|
-
|
|
75
|
+
How to run tests.
|
|
64
76
|
|
|
65
|
-
|
|
66
|
-
|
|
77
|
+
### Deployment
|
|
78
|
+
|
|
79
|
+
How to deploy (or link to deployment docs).
|
|
67
80
|
|
|
68
|
-
|
|
81
|
+
## Contributing
|
|
69
82
|
|
|
70
|
-
|
|
71
|
-
| Name | Type | Required | Description |
|
|
72
|
-
|------|------|----------|-------------|
|
|
73
|
-
| id | string | Yes | User ID |
|
|
83
|
+
Link to CONTRIBUTING.md or brief guidelines.
|
|
74
84
|
|
|
75
|
-
|
|
76
|
-
- 200: User object
|
|
77
|
-
- 404: User not found
|
|
85
|
+
## License
|
|
78
86
|
|
|
79
|
-
|
|
80
|
-
[Request and response example]
|
|
87
|
+
MIT (or appropriate license)
|
|
81
88
|
```
|
|
82
89
|
|
|
83
|
-
|
|
90
|
+
### Step 3 — Architecture Decision Record (ADR)
|
|
84
91
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
### JSDoc/TSDoc Template
|
|
88
|
-
|
|
89
|
-
```typescript
|
|
90
|
-
/**
|
|
91
|
-
* Brief description of what the function does.
|
|
92
|
-
*
|
|
93
|
-
* @param paramName - Description of parameter
|
|
94
|
-
* @returns Description of return value
|
|
95
|
-
* @throws ErrorType - When this error occurs
|
|
96
|
-
*
|
|
97
|
-
* @example
|
|
98
|
-
* const result = functionName(input);
|
|
99
|
-
*/
|
|
100
|
-
```
|
|
92
|
+
```markdown
|
|
93
|
+
# ADR-001: Use PostgreSQL for primary datastore
|
|
101
94
|
|
|
102
|
-
|
|
95
|
+
## Status
|
|
103
96
|
|
|
104
|
-
|
|
|
105
|
-
|-----------|-----------------|
|
|
106
|
-
| Why (business logic) | What (obvious) |
|
|
107
|
-
| Complex algorithms | Every line |
|
|
108
|
-
| Non-obvious behavior | Self-explanatory code |
|
|
109
|
-
| API contracts | Implementation details |
|
|
97
|
+
Accepted | Proposed | Deprecated | Superseded by ADR-xxx
|
|
110
98
|
|
|
111
|
-
|
|
99
|
+
## Context
|
|
112
100
|
|
|
113
|
-
|
|
101
|
+
What is the problem? What constraints exist?
|
|
114
102
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
- Updated dependency
|
|
127
|
-
### Fixed
|
|
128
|
-
- Bug fix
|
|
103
|
+
## Decision
|
|
104
|
+
|
|
105
|
+
What did we decide and why?
|
|
106
|
+
|
|
107
|
+
## Consequences
|
|
108
|
+
|
|
109
|
+
What are the trade-offs? What becomes easier/harder?
|
|
110
|
+
|
|
111
|
+
## Alternatives Considered
|
|
112
|
+
|
|
113
|
+
What else did we evaluate and why did we reject it?
|
|
129
114
|
```
|
|
130
115
|
|
|
131
|
-
|
|
116
|
+
**Rules**:
|
|
132
117
|
|
|
133
|
-
|
|
118
|
+
- ADRs are immutable — supersede, don't edit
|
|
119
|
+
- Number sequentially (ADR-001, ADR-002)
|
|
120
|
+
- Title should be a decision, not a question
|
|
121
|
+
- Keep it short (1-2 pages max)
|
|
122
|
+
|
|
123
|
+
### Step 4 — Runbook Template
|
|
134
124
|
|
|
135
125
|
```markdown
|
|
136
|
-
#
|
|
126
|
+
# Runbook: [System/Alert Name]
|
|
137
127
|
|
|
138
|
-
##
|
|
139
|
-
Accepted / Deprecated / Superseded
|
|
128
|
+
## Overview
|
|
140
129
|
|
|
141
|
-
|
|
142
|
-
Why are we making this decision?
|
|
130
|
+
What this system does and why it matters.
|
|
143
131
|
|
|
144
|
-
##
|
|
145
|
-
What did we decide?
|
|
132
|
+
## Alerts
|
|
146
133
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
134
|
+
| Alert | Severity | Meaning |
|
|
135
|
+
| --------------- | -------- | ------------------------- |
|
|
136
|
+
| high_error_rate | Critical | Error rate > 5% for 5 min |
|
|
137
|
+
| high_latency | Warning | p95 > 2s for 10 min |
|
|
150
138
|
|
|
151
|
-
|
|
139
|
+
## Diagnosis Steps
|
|
152
140
|
|
|
153
|
-
|
|
141
|
+
1. Check dashboards: [link]
|
|
142
|
+
2. Check logs: `kubectl logs -l app=service-name --tail=100`
|
|
143
|
+
3. Check dependencies: [list of upstream services]
|
|
154
144
|
|
|
155
|
-
|
|
145
|
+
## Common Fixes
|
|
156
146
|
|
|
157
|
-
|
|
147
|
+
### High error rate
|
|
158
148
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
149
|
+
1. Check recent deployments: `git log --since="2 hours ago"`
|
|
150
|
+
2. If recent deploy caused it: rollback with `./deploy rollback`
|
|
151
|
+
3. If not deployment-related: check database connections
|
|
152
|
+
|
|
153
|
+
### High latency
|
|
154
|
+
|
|
155
|
+
1. Check database slow query log
|
|
156
|
+
2. Check connection pool saturation
|
|
157
|
+
3. Scale up if under heavy load: `kubectl scale --replicas=5`
|
|
162
158
|
|
|
163
|
-
##
|
|
164
|
-
- [src/index.ts]: Main entry
|
|
165
|
-
- [src/api/]: API routes
|
|
166
|
-
- [docs/]: Documentation
|
|
159
|
+
## Escalation
|
|
167
160
|
|
|
168
|
-
|
|
169
|
-
-
|
|
170
|
-
-
|
|
161
|
+
- L1: On-call engineer (PagerDuty)
|
|
162
|
+
- L2: Service owner (@team-backend)
|
|
163
|
+
- L3: Infrastructure team (@team-infra)
|
|
171
164
|
```
|
|
172
165
|
|
|
173
|
-
###
|
|
166
|
+
### Step 5 — API Documentation
|
|
174
167
|
|
|
175
|
-
|
|
176
|
-
- Clear H1-H3 hierarchy
|
|
177
|
-
- JSON/YAML examples for data structures
|
|
178
|
-
- Mermaid diagrams for flows
|
|
179
|
-
- Self-contained sections
|
|
168
|
+
**Document every endpoint with**:
|
|
180
169
|
|
|
181
|
-
|
|
170
|
+
```markdown
|
|
171
|
+
## POST /api/users
|
|
172
|
+
|
|
173
|
+
Create a new user account.
|
|
174
|
+
|
|
175
|
+
### Request
|
|
176
|
+
|
|
177
|
+
**Headers**:
|
|
178
|
+
| Header | Required | Description |
|
|
179
|
+
|--------|----------|-------------|
|
|
180
|
+
| Authorization | Yes | Bearer token |
|
|
181
|
+
| Content-Type | Yes | application/json |
|
|
182
|
+
|
|
183
|
+
**Body**:
|
|
184
|
+
| Field | Type | Required | Description |
|
|
185
|
+
|-------|------|----------|-------------|
|
|
186
|
+
| email | string | Yes | Valid email address |
|
|
187
|
+
| name | string | Yes | Full name (2-100 chars) |
|
|
188
|
+
| role | string | No | "user" (default) or "admin" |
|
|
189
|
+
|
|
190
|
+
**Example**:
|
|
191
|
+
\`\`\`json
|
|
192
|
+
{ "email": "alice@example.com", "name": "Alice Smith" }
|
|
193
|
+
\`\`\`
|
|
194
|
+
|
|
195
|
+
### Response
|
|
196
|
+
|
|
197
|
+
**201 Created**:
|
|
198
|
+
\`\`\`json
|
|
199
|
+
{ "id": "usr_abc123", "email": "alice@example.com", "name": "Alice Smith", "role": "user" }
|
|
200
|
+
\`\`\`
|
|
201
|
+
|
|
202
|
+
**400 Bad Request**:
|
|
203
|
+
\`\`\`json
|
|
204
|
+
{ "error": { "code": "VALIDATION_ERROR", "message": "Email already registered" } }
|
|
205
|
+
\`\`\`
|
|
206
|
+
|
|
207
|
+
**401 Unauthorized**:
|
|
208
|
+
\`\`\`json
|
|
209
|
+
{ "error": { "code": "UNAUTHORIZED", "message": "Invalid or expired token" } }
|
|
210
|
+
\`\`\`
|
|
211
|
+
```
|
|
182
212
|
|
|
183
|
-
##
|
|
213
|
+
## Output Format
|
|
184
214
|
|
|
185
|
-
|
|
186
|
-
|-----------|-----|
|
|
187
|
-
| **Scannable** | Headers, lists, tables |
|
|
188
|
-
| **Examples first** | Show, don't just tell |
|
|
189
|
-
| **Progressive detail** | Simple → Complex |
|
|
190
|
-
| **Up to date** | Outdated = misleading |
|
|
215
|
+
Use the appropriate template from above, filled in with project-specific details. Always include examples with realistic (not lorem ipsum) content.
|
|
191
216
|
|
|
192
|
-
|
|
217
|
+
## Examples
|
|
218
|
+
|
|
219
|
+
**User**: "Write a README for our API project"
|
|
220
|
+
|
|
221
|
+
**Response approach**: Use the README template. Fill in actual project details. Include quick start with real commands. Link to API docs. Add architecture overview if the system has multiple components.
|
|
222
|
+
|
|
223
|
+
**User**: "We need to document why we chose MongoDB over PostgreSQL"
|
|
193
224
|
|
|
194
|
-
|
|
225
|
+
**Response approach**: Use the ADR template. Document the context (data model flexibility needs), decision (MongoDB for document storage), consequences (eventual consistency trade-off), and alternatives considered (PostgreSQL with JSONB).
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
````markdown
|
|
2
|
+
---
|
|
3
|
+
inclusion: manual
|
|
4
|
+
name: drizzle-expert
|
|
5
|
+
description: "Use when the task is specifically Drizzle ORM or drizzle-kit: schema-as-code, typed SQL, relations, migrations, config, runtime pairing, or TypeScript database access-layer decisions across Postgres, SQLite/libSQL, Neon, or Supabase."
|
|
6
|
+
license: MIT
|
|
7
|
+
metadata:
|
|
8
|
+
author: cubis-foundry
|
|
9
|
+
version: "1.0"
|
|
10
|
+
compatibility: Claude Code, Codex, GitHub Copilot
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Drizzle Expert
|
|
14
|
+
|
|
15
|
+
## Purpose
|
|
16
|
+
|
|
17
|
+
You are the narrow specialist for Drizzle ORM and drizzle-kit in TypeScript database stacks.
|
|
18
|
+
|
|
19
|
+
Your job is to keep schema-as-code, typed query ergonomics, migration safety, and runtime pairing decisions explicit without replacing the underlying engine specialist.
|
|
20
|
+
|
|
21
|
+
## When to Use
|
|
22
|
+
|
|
23
|
+
- Drizzle schema files, relations, migrations, or drizzle-kit config are primary.
|
|
24
|
+
- The real decision is Drizzle vs raw SQL or another ORM/query-builder posture.
|
|
25
|
+
- The task depends on TypeScript-first database access patterns, typed queries, or edge or serverless runtime pairing.
|
|
26
|
+
- The engine is Postgres, SQLite/libSQL, Neon, or Supabase and the access layer matters as much as the engine.
|
|
27
|
+
|
|
28
|
+
## Instructions
|
|
29
|
+
|
|
30
|
+
### STANDARD OPERATING PROCEDURE (SOP)
|
|
31
|
+
|
|
32
|
+
1. Confirm the engine, runtime, migration path, and current Drizzle version or config shape.
|
|
33
|
+
2. Separate access-layer concerns from engine concerns and load the engine or platform skill when needed.
|
|
34
|
+
3. Check schema layout, relations, naming, and generated SQL implications before changing query code.
|
|
35
|
+
4. Keep migration order, rollback posture, and deployment safety explicit.
|
|
36
|
+
5. Verify how Drizzle pairs with the target runtime, pooling strategy, and serverless or edge constraints.
|
|
37
|
+
|
|
38
|
+
### Constraints
|
|
39
|
+
|
|
40
|
+
- Do not answer plain engine questions without also loading the matching engine or platform skill.
|
|
41
|
+
- Do not blur Drizzle concerns into generic TypeScript or generic Postgres advice.
|
|
42
|
+
- Do not recommend generated migrations, relation helpers, or runtime adapters without checking the deployment model.
|
|
43
|
+
- Do not hide migration risk behind ORM abstraction.
|
|
44
|
+
|
|
45
|
+
## Output Format
|
|
46
|
+
|
|
47
|
+
Provide implementation guidance, code examples, and configuration as appropriate to the task.
|
|
48
|
+
|
|
49
|
+
## References
|
|
50
|
+
|
|
51
|
+
Load on demand. Do not preload all reference files.
|
|
52
|
+
|
|
53
|
+
| File | Load when |
|
|
54
|
+
| --------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
|
|
55
|
+
| `references/schema-and-migration-playbook.md` | You need the Drizzle-specific checklist for schema layout, relations, migrations, and rollout safety. |
|
|
56
|
+
| `references/runtime-pairing-matrix.md` | You need the runtime and engine pairing rules for Postgres, Supabase, SQLite/libSQL, Neon, or serverless deployment. |
|
|
57
|
+
|
|
58
|
+
## Scripts
|
|
59
|
+
|
|
60
|
+
No helper scripts are required for this skill right now. Keep execution in `SKILL.md` and `references/` unless repeated automation becomes necessary.
|
|
61
|
+
|
|
62
|
+
## Examples
|
|
63
|
+
|
|
64
|
+
- "Help me with drizzle expert best practices in this project"
|
|
65
|
+
- "Review my drizzle expert implementation for issues"
|
|
66
|
+
````
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: drizzle-expert
|
|
3
|
+
description: "Use when the task is specifically Drizzle ORM or drizzle-kit: schema-as-code, typed SQL, relations, migrations, config, runtime pairing, or TypeScript database access-layer decisions across Postgres, SQLite/libSQL, Neon, or Supabase."
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
author: cubis-foundry
|
|
7
|
+
version: "1.0"
|
|
8
|
+
compatibility: Claude Code, Codex, GitHub Copilot
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Drizzle Expert
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
You are the narrow specialist for Drizzle ORM and drizzle-kit in TypeScript database stacks.
|
|
16
|
+
|
|
17
|
+
Your job is to keep schema-as-code, typed query ergonomics, migration safety, and runtime pairing decisions explicit without replacing the underlying engine specialist.
|
|
18
|
+
|
|
19
|
+
## When to Use
|
|
20
|
+
|
|
21
|
+
- Drizzle schema files, relations, migrations, or drizzle-kit config are primary.
|
|
22
|
+
- The real decision is Drizzle vs raw SQL or another ORM/query-builder posture.
|
|
23
|
+
- The task depends on TypeScript-first database access patterns, typed queries, or edge or serverless runtime pairing.
|
|
24
|
+
- The engine is Postgres, SQLite/libSQL, Neon, or Supabase and the access layer matters as much as the engine.
|
|
25
|
+
|
|
26
|
+
## Instructions
|
|
27
|
+
|
|
28
|
+
### STANDARD OPERATING PROCEDURE (SOP)
|
|
29
|
+
|
|
30
|
+
1. Confirm the engine, runtime, migration path, and current Drizzle version or config shape.
|
|
31
|
+
2. Separate access-layer concerns from engine concerns and load the engine or platform skill when needed.
|
|
32
|
+
3. Check schema layout, relations, naming, and generated SQL implications before changing query code.
|
|
33
|
+
4. Keep migration order, rollback posture, and deployment safety explicit.
|
|
34
|
+
5. Verify how Drizzle pairs with the target runtime, pooling strategy, and serverless or edge constraints.
|
|
35
|
+
|
|
36
|
+
### Constraints
|
|
37
|
+
|
|
38
|
+
- Do not answer plain engine questions without also loading the matching engine or platform skill.
|
|
39
|
+
- Do not blur Drizzle concerns into generic TypeScript or generic Postgres advice.
|
|
40
|
+
- Do not recommend generated migrations, relation helpers, or runtime adapters without checking the deployment model.
|
|
41
|
+
- Do not hide migration risk behind ORM abstraction.
|
|
42
|
+
|
|
43
|
+
## Output Format
|
|
44
|
+
|
|
45
|
+
Provide implementation guidance, code examples, and configuration as appropriate to the task.
|
|
46
|
+
|
|
47
|
+
## References
|
|
48
|
+
|
|
49
|
+
Load on demand. Do not preload all reference files.
|
|
50
|
+
|
|
51
|
+
| File | Load when |
|
|
52
|
+
| --------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
|
|
53
|
+
| `references/schema-and-migration-playbook.md` | You need the Drizzle-specific checklist for schema layout, relations, migrations, and rollout safety. |
|
|
54
|
+
| `references/runtime-pairing-matrix.md` | You need the runtime and engine pairing rules for Postgres, Supabase, SQLite/libSQL, Neon, or serverless deployment. |
|
|
55
|
+
|
|
56
|
+
## Scripts
|
|
57
|
+
|
|
58
|
+
No helper scripts are required for this skill right now. Keep execution in `SKILL.md` and `references/` unless repeated automation becomes necessary.
|
|
59
|
+
|
|
60
|
+
## Examples
|
|
61
|
+
|
|
62
|
+
- "Help me with drizzle expert best practices in this project"
|
|
63
|
+
- "Review my drizzle expert implementation for issues"
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Drizzle Runtime Pairing Matrix
|
|
2
|
+
|
|
3
|
+
Load this when runtime choice or deployment model changes the Drizzle answer.
|
|
4
|
+
|
|
5
|
+
## Pairing Rules
|
|
6
|
+
|
|
7
|
+
- `postgres` or `neon-postgres` style stacks: verify connection strategy, pooling, and migration path before recommending long-lived clients.
|
|
8
|
+
- `supabase`: keep auth, RLS, storage, and platform policy concerns in the Supabase skill; use Drizzle only for the data-access layer.
|
|
9
|
+
- `sqlite` or `libsql` style stacks: keep write-concurrency and local-first limits visible.
|
|
10
|
+
- Serverless or edge runtimes: prefer the smallest safe adapter surface and avoid assumptions about persistent connections.
|
|
11
|
+
|
|
12
|
+
## Do Not Blur
|
|
13
|
+
|
|
14
|
+
- Engine features belong to the engine skill.
|
|
15
|
+
- Drizzle config, schema, and query ergonomics belong here.
|
|
16
|
+
- Framework-specific wiring belongs to the matching backend or frontend framework skill.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Drizzle Schema And Migration Playbook
|
|
2
|
+
|
|
3
|
+
Load this when Drizzle schema files, relations, or drizzle-kit migrations are the active risk.
|
|
4
|
+
|
|
5
|
+
## Focus Areas
|
|
6
|
+
|
|
7
|
+
- Keep schema ownership obvious. Prefer feature-aware file boundaries over giant schema dumps.
|
|
8
|
+
- Review relation helpers against the actual query patterns instead of assuming relations improve every call site.
|
|
9
|
+
- Check generated migration SQL before trusting it in production.
|
|
10
|
+
- Treat rename, backfill, and irreversible column changes as rollout events, not local refactors.
|
|
11
|
+
|
|
12
|
+
## Minimum Review Loop
|
|
13
|
+
|
|
14
|
+
1. Confirm engine and target runtime.
|
|
15
|
+
2. Read current schema files and drizzle config before editing.
|
|
16
|
+
3. Validate whether the migration is additive, destructive, or backfill-heavy.
|
|
17
|
+
4. Pair with the engine skill for index, lock, or feature-specific tradeoffs.
|
|
18
|
+
5. Keep rollback or fallback steps visible when the migration is not trivial.
|