create-hq 5.0.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/dist/deps.d.ts +4 -0
- package/dist/deps.d.ts.map +1 -0
- package/dist/deps.js +65 -0
- package/dist/deps.js.map +1 -0
- package/dist/git.d.ts +3 -0
- package/dist/git.d.ts.map +1 -0
- package/dist/git.js +19 -0
- package/dist/git.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/dist/scaffold.d.ts +8 -0
- package/dist/scaffold.d.ts.map +1 -0
- package/dist/scaffold.js +130 -0
- package/dist/scaffold.js.map +1 -0
- package/dist/ui.d.ts +7 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +36 -0
- package/dist/ui.js.map +1 -0
- package/package.json +41 -0
- package/template/.claude/CLAUDE.md +202 -0
- package/template/.claude/commands/checkpoint.md +127 -0
- package/template/.claude/commands/cleanup.md +307 -0
- package/template/.claude/commands/execute-task.md +440 -0
- package/template/.claude/commands/exit-plan.md +41 -0
- package/template/.claude/commands/handoff.md +97 -0
- package/template/.claude/commands/learn.md +218 -0
- package/template/.claude/commands/metrics.md +118 -0
- package/template/.claude/commands/newworker.md +162 -0
- package/template/.claude/commands/nexttask.md +67 -0
- package/template/.claude/commands/prd.md +238 -0
- package/template/.claude/commands/reanchor.md +51 -0
- package/template/.claude/commands/remember.md +126 -0
- package/template/.claude/commands/run-project.md +348 -0
- package/template/.claude/commands/run.md +110 -0
- package/template/.claude/commands/search-reindex.md +62 -0
- package/template/.claude/commands/search.md +100 -0
- package/template/.claude/commands/setup.md +381 -0
- package/template/.claude/scripts/pure-ralph-loop.ps1 +312 -0
- package/template/.claude/scripts/pure-ralph-loop.sh +859 -0
- package/template/CHANGELOG.md +220 -0
- package/template/LICENSE +21 -0
- package/template/MIGRATION.md +259 -0
- package/template/README.md +368 -0
- package/template/data/journal/.gitkeep +0 -0
- package/template/docs/images/ascii-banner-options.md +122 -0
- package/template/docs/images/hq-banner.svg +105 -0
- package/template/knowledge/Ralph/01-overview.md +71 -0
- package/template/knowledge/Ralph/02-core-concepts.md +114 -0
- package/template/knowledge/Ralph/03-how-ralph-works.md +184 -0
- package/template/knowledge/Ralph/04-back-pressure.md +222 -0
- package/template/knowledge/Ralph/05-specifications.md +210 -0
- package/template/knowledge/Ralph/06-agents-md.md +222 -0
- package/template/knowledge/Ralph/07-implementation.md +316 -0
- package/template/knowledge/Ralph/08-economics.md +182 -0
- package/template/knowledge/Ralph/09-resources.md +145 -0
- package/template/knowledge/Ralph/10-claude-code-workflow.md +212 -0
- package/template/knowledge/Ralph/11-team-training-guide.md +383 -0
- package/template/knowledge/Ralph/README.md +40 -0
- package/template/knowledge/ai-security-framework/CONTRIBUTING.md +139 -0
- package/template/knowledge/ai-security-framework/GLOSSARY.md +176 -0
- package/template/knowledge/ai-security-framework/LICENSE +21 -0
- package/template/knowledge/ai-security-framework/QUICK-START.md +172 -0
- package/template/knowledge/ai-security-framework/README.md +232 -0
- package/template/knowledge/ai-security-framework/checklists/browser-security.md +301 -0
- package/template/knowledge/ai-security-framework/checklists/credential-isolation.md +322 -0
- package/template/knowledge/ai-security-framework/checklists/incident-response.md +288 -0
- package/template/knowledge/ai-security-framework/checklists/pre-flight.md +249 -0
- package/template/knowledge/ai-security-framework/checklists/weekly-audit.md +159 -0
- package/template/knowledge/ai-security-framework/configs/audit-logging.md +372 -0
- package/template/knowledge/ai-security-framework/configs/kill-switches.md +354 -0
- package/template/knowledge/ai-security-framework/docs/01-core-principles.md +256 -0
- package/template/knowledge/ai-security-framework/docs/02-threat-landscape.md +326 -0
- package/template/knowledge/ai-security-framework/docs/03-security-posture.md +250 -0
- package/template/knowledge/ai-security-framework/templates/agents-security.md +233 -0
- package/template/knowledge/design-styles/README.md +42 -0
- package/template/knowledge/design-styles/american-industrial.md +136 -0
- package/template/knowledge/design-styles/ethereal-abstract.md +133 -0
- package/template/knowledge/design-styles/liminal-portal.md +111 -0
- package/template/knowledge/design-styles/swipes/american-industrial/G-3m4YPW0AADdu2.jpeg +0 -0
- package/template/knowledge/design-styles/swipes/american-industrial/G-JJlt5WwAABK3K.png +0 -0
- package/template/knowledge/design-styles/swipes/american-industrial/G-JJmj5W0AEbJ-7.png +0 -0
- package/template/knowledge/design-styles/swipes/american-industrial/G59fgNuXkAAKLJQ (1).jpeg +0 -0
- package/template/knowledge/design-styles/swipes/american-industrial/G59fgNuXkAAKLJQ.jpeg +0 -0
- package/template/knowledge/design-styles/swipes/american-industrial/G7fVkn3WEAAM-ST.jpeg +0 -0
- package/template/knowledge/design-styles/swipes/american-industrial/G8ECO5JWEAIksyn.png +0 -0
- package/template/knowledge/design-styles/swipes/american-industrial/G9-3GQSWoAA8eqZ.png +0 -0
- package/template/knowledge/design-styles/swipes/american-industrial/G9xEOqrXkAEZRcs.png +0 -0
- package/template/knowledge/design-styles/swipes/american-industrial/G_MVeJrXQAA8sx4.jpeg +0 -0
- package/template/knowledge/design-styles/swipes/american-industrial/G_RSkmGXkAAgAVZ.png +0 -0
- package/template/knowledge/design-styles/swipes/american-industrial/README.md +31 -0
- package/template/knowledge/design-styles/swipes/american-industrial/qyqtg7Dq.png +0 -0
- package/template/knowledge/dev-team/README.md +35 -0
- package/template/knowledge/dev-team/patterns/README.md +34 -0
- package/template/knowledge/dev-team/patterns/frontend/react-best-practices.md +178 -0
- package/template/knowledge/dev-team/troubleshooting/README.md +31 -0
- package/template/knowledge/dev-team/workflows/README.md +49 -0
- package/template/knowledge/hq/checkpoint-schema.json +51 -0
- package/template/knowledge/hq/index-md-spec.md +74 -0
- package/template/knowledge/hq/thread-schema.md +153 -0
- package/template/knowledge/hq-core/checkpoint-schema.json +51 -0
- package/template/knowledge/hq-core/index-md-spec.md +74 -0
- package/template/knowledge/hq-core/thread-schema.md +153 -0
- package/template/knowledge/loom/README.md +51 -0
- package/template/knowledge/loom/architecture.md +125 -0
- package/template/knowledge/loom/code-style.md +169 -0
- package/template/knowledge/loom/llm-proxy.md +132 -0
- package/template/knowledge/loom/state-machine.md +131 -0
- package/template/knowledge/loom/thread-system.md +117 -0
- package/template/knowledge/loom/tools.md +94 -0
- package/template/knowledge/loom/weaver.md +96 -0
- package/template/knowledge/loom/web-frontend.md +131 -0
- package/template/knowledge/projects/README.md +72 -0
- package/template/knowledge/projects/templates/README.template.md +28 -0
- package/template/knowledge/workers/README.md +195 -0
- package/template/knowledge/workers/ralph-loop-pattern.md +157 -0
- package/template/knowledge/workers/skill-schema.md +182 -0
- package/template/knowledge/workers/state-machine.md +102 -0
- package/template/knowledge/workers/templates/base-worker.yaml +73 -0
- package/template/knowledge/workers/templates/code-worker.yaml +85 -0
- package/template/knowledge/workers/templates/skill.yaml +49 -0
- package/template/knowledge/workers/templates/social-worker.yaml +70 -0
- package/template/modules/examples/full-manifest.yaml +92 -0
- package/template/modules/examples/minimal.yaml +14 -0
- package/template/modules/modules.yaml +59 -0
- package/template/projects/.gitkeep +0 -0
- package/template/projects/incorporate-workers-into-pure-ralph/prd.json +88 -0
- package/template/projects/pure-ralph-branch-isolation/README.md +114 -0
- package/template/projects/pure-ralph-branch-isolation/prd.json +123 -0
- package/template/projects/purist-ralph-loop/README.md +148 -0
- package/template/projects/purist-ralph-loop/prd.json +135 -0
- package/template/projects/ralph-test/prd.json +50 -0
- package/template/prompts/pure-ralph-base.md +551 -0
- package/template/settings/.gitkeep +0 -0
- package/template/settings/pure-ralph.json +42 -0
- package/template/social-content/drafts/INDEX.md +21 -0
- package/template/social-content/drafts/linkedin/.gitkeep +1 -0
- package/template/social-content/drafts/x/.gitkeep +1 -0
- package/template/social-content/images/.gitkeep +1 -0
- package/template/starter-projects/code-worker/README.md +97 -0
- package/template/starter-projects/code-worker/prd.json +45 -0
- package/template/starter-projects/personal-assistant/README.md +42 -0
- package/template/starter-projects/personal-assistant/prd.json +43 -0
- package/template/starter-projects/social-media/README.md +60 -0
- package/template/starter-projects/social-media/prd.json +43 -0
- package/template/workers/content-brand/README.md +59 -0
- package/template/workers/content-brand/skills/messaging-alignment.md +91 -0
- package/template/workers/content-brand/skills/tone-check.md +76 -0
- package/template/workers/content-brand/skills/voice-analysis.md +68 -0
- package/template/workers/content-brand/worker.yaml +81 -0
- package/template/workers/content-legal/README.md +80 -0
- package/template/workers/content-legal/skills/claim-substantiation.md +150 -0
- package/template/workers/content-legal/skills/compliance-scan.md +123 -0
- package/template/workers/content-legal/skills/disclaimer-check.md +146 -0
- package/template/workers/content-legal/worker.yaml +118 -0
- package/template/workers/content-product/README.md +77 -0
- package/template/workers/content-product/skills/claim-verification.md +96 -0
- package/template/workers/content-product/skills/feature-accuracy.md +117 -0
- package/template/workers/content-product/skills/stats-check.md +128 -0
- package/template/workers/content-product/worker.yaml +97 -0
- package/template/workers/content-sales/README.md +70 -0
- package/template/workers/content-sales/skills/conversion-analysis.md +96 -0
- package/template/workers/content-sales/skills/cta-audit.md +107 -0
- package/template/workers/content-sales/skills/value-prop-check.md +114 -0
- package/template/workers/content-sales/worker.yaml +93 -0
- package/template/workers/content-shared/cli.ts +242 -0
- package/template/workers/content-shared/index.ts +234 -0
- package/template/workers/content-shared/lib/accuracy-analyzer.ts +661 -0
- package/template/workers/content-shared/lib/analyze.ts +370 -0
- package/template/workers/content-shared/lib/brand-analyzer.ts +526 -0
- package/template/workers/content-shared/lib/cms-integration.ts +446 -0
- package/template/workers/content-shared/lib/compliance-analyzer.ts +655 -0
- package/template/workers/content-shared/lib/conversion-analyzer.ts +555 -0
- package/template/workers/content-shared/lib/github-integration.ts +582 -0
- package/template/workers/content-shared/lib/output.ts +373 -0
- package/template/workers/content-shared/lib/parser.ts +771 -0
- package/template/workers/content-shared/lib/priority.ts +439 -0
- package/template/workers/content-shared/lib/recommendations.ts +512 -0
- package/template/workers/content-shared/lib/reporter.ts +749 -0
- package/template/workers/content-shared/lib/restructure.ts +664 -0
- package/template/workers/content-shared/lib/scorer.ts +140 -0
- package/template/workers/content-shared/lib/types.ts +227 -0
- package/template/workers/content-shared/lib/variants.ts +595 -0
- package/template/workers/content-shared/package.json +51 -0
- package/template/workers/content-shared/pnpm-lock.yaml +39 -0
- package/template/workers/content-shared/test/sample-page.json +115 -0
- package/template/workers/content-shared/tsconfig.json +20 -0
- package/template/workers/dev-team/README.md +166 -0
- package/template/workers/dev-team/_template.yaml +70 -0
- package/template/workers/dev-team/architect/package.json +27 -0
- package/template/workers/dev-team/architect/skills/api-design.md +89 -0
- package/template/workers/dev-team/architect/skills/refactor-plan.md +96 -0
- package/template/workers/dev-team/architect/skills/system-design.md +100 -0
- package/template/workers/dev-team/architect/src/index.ts +49 -0
- package/template/workers/dev-team/architect/src/mcp-server.ts +122 -0
- package/template/workers/dev-team/architect/src/skills/api-design.ts +316 -0
- package/template/workers/dev-team/architect/src/skills/refactor-plan.ts +264 -0
- package/template/workers/dev-team/architect/src/skills/system-design.ts +212 -0
- package/template/workers/dev-team/architect/tsconfig.json +19 -0
- package/template/workers/dev-team/architect/worker.yaml +128 -0
- package/template/workers/dev-team/backend-dev/package-lock.json +1252 -0
- package/template/workers/dev-team/backend-dev/package.json +27 -0
- package/template/workers/dev-team/backend-dev/skills/implement-endpoint.md +70 -0
- package/template/workers/dev-team/backend-dev/skills/implement-service.md +62 -0
- package/template/workers/dev-team/backend-dev/src/index.ts +51 -0
- package/template/workers/dev-team/backend-dev/src/mcp-server.ts +109 -0
- package/template/workers/dev-team/backend-dev/src/skills/implement-endpoint.ts +122 -0
- package/template/workers/dev-team/backend-dev/src/skills/implement-service.ts +126 -0
- package/template/workers/dev-team/backend-dev/tsconfig.json +19 -0
- package/template/workers/dev-team/backend-dev/worker.yaml +128 -0
- package/template/workers/dev-team/code-reviewer/package-lock.json +1080 -0
- package/template/workers/dev-team/code-reviewer/package.json +24 -0
- package/template/workers/dev-team/code-reviewer/skills/merge-to-production.md +61 -0
- package/template/workers/dev-team/code-reviewer/skills/merge-to-staging.md +54 -0
- package/template/workers/dev-team/code-reviewer/skills/request-changes.md +63 -0
- package/template/workers/dev-team/code-reviewer/skills/review-pr.md +77 -0
- package/template/workers/dev-team/code-reviewer/src/index.ts +56 -0
- package/template/workers/dev-team/code-reviewer/src/mcp-server.ts +101 -0
- package/template/workers/dev-team/code-reviewer/tsconfig.json +19 -0
- package/template/workers/dev-team/code-reviewer/worker.yaml +90 -0
- package/template/workers/dev-team/database-dev/package.json +22 -0
- package/template/workers/dev-team/database-dev/skills/create-schema.md +48 -0
- package/template/workers/dev-team/database-dev/src/index.ts +50 -0
- package/template/workers/dev-team/database-dev/src/mcp-server.ts +76 -0
- package/template/workers/dev-team/database-dev/tsconfig.json +18 -0
- package/template/workers/dev-team/database-dev/worker.yaml +90 -0
- package/template/workers/dev-team/frontend-dev/package.json +22 -0
- package/template/workers/dev-team/frontend-dev/skills/create-component.md +26 -0
- package/template/workers/dev-team/frontend-dev/src/index.ts +50 -0
- package/template/workers/dev-team/frontend-dev/src/mcp-server.ts +77 -0
- package/template/workers/dev-team/frontend-dev/tsconfig.json +18 -0
- package/template/workers/dev-team/frontend-dev/worker.yaml +132 -0
- package/template/workers/dev-team/infra-dev/package.json +24 -0
- package/template/workers/dev-team/infra-dev/skills/add-monitoring.md +73 -0
- package/template/workers/dev-team/infra-dev/skills/configure-deployment.md +80 -0
- package/template/workers/dev-team/infra-dev/skills/create-dockerfile.md +62 -0
- package/template/workers/dev-team/infra-dev/skills/setup-cicd.md +63 -0
- package/template/workers/dev-team/infra-dev/src/index.ts +55 -0
- package/template/workers/dev-team/infra-dev/src/mcp-server.ts +82 -0
- package/template/workers/dev-team/infra-dev/tsconfig.json +19 -0
- package/template/workers/dev-team/infra-dev/worker.yaml +92 -0
- package/template/workers/dev-team/knowledge-curator/package.json +24 -0
- package/template/workers/dev-team/knowledge-curator/skills/curate-troubleshooting.md +63 -0
- package/template/workers/dev-team/knowledge-curator/skills/process-learnings.md +61 -0
- package/template/workers/dev-team/knowledge-curator/skills/sync-documentation.md +76 -0
- package/template/workers/dev-team/knowledge-curator/skills/update-patterns.md +63 -0
- package/template/workers/dev-team/knowledge-curator/src/index.ts +53 -0
- package/template/workers/dev-team/knowledge-curator/src/mcp-server.ts +92 -0
- package/template/workers/dev-team/knowledge-curator/tsconfig.json +19 -0
- package/template/workers/dev-team/knowledge-curator/worker.yaml +80 -0
- package/template/workers/dev-team/motion-designer/package.json +22 -0
- package/template/workers/dev-team/motion-designer/skills/add-animation.md +25 -0
- package/template/workers/dev-team/motion-designer/skills/generate-image.md +36 -0
- package/template/workers/dev-team/motion-designer/src/index.ts +63 -0
- package/template/workers/dev-team/motion-designer/src/mcp-server.ts +79 -0
- package/template/workers/dev-team/motion-designer/tsconfig.json +18 -0
- package/template/workers/dev-team/motion-designer/worker.yaml +84 -0
- package/template/workers/dev-team/product-planner/queue.json +4 -0
- package/template/workers/dev-team/product-planner/worker.yaml +220 -0
- package/template/workers/dev-team/project-manager/package-lock.json +1252 -0
- package/template/workers/dev-team/project-manager/package.json +27 -0
- package/template/workers/dev-team/project-manager/skills/create-prd.md +66 -0
- package/template/workers/dev-team/project-manager/skills/next-issue.md +51 -0
- package/template/workers/dev-team/project-manager/skills/project-status.md +59 -0
- package/template/workers/dev-team/project-manager/skills/update-learnings.md +65 -0
- package/template/workers/dev-team/project-manager/src/index.ts +54 -0
- package/template/workers/dev-team/project-manager/src/mcp-server.ts +207 -0
- package/template/workers/dev-team/project-manager/src/skills/create-prd.ts +86 -0
- package/template/workers/dev-team/project-manager/src/skills/next-issue.ts +137 -0
- package/template/workers/dev-team/project-manager/src/skills/project-status.ts +131 -0
- package/template/workers/dev-team/project-manager/src/skills/update-learnings.ts +94 -0
- package/template/workers/dev-team/project-manager/tsconfig.json +19 -0
- package/template/workers/dev-team/project-manager/worker.yaml +96 -0
- package/template/workers/dev-team/qa-tester/package.json +24 -0
- package/template/workers/dev-team/qa-tester/skills/create-demo-account.md +36 -0
- package/template/workers/dev-team/qa-tester/skills/run-tests.md +36 -0
- package/template/workers/dev-team/qa-tester/skills/write-test.md +27 -0
- package/template/workers/dev-team/qa-tester/src/index.ts +61 -0
- package/template/workers/dev-team/qa-tester/src/mcp-server.ts +88 -0
- package/template/workers/dev-team/qa-tester/tsconfig.json +18 -0
- package/template/workers/dev-team/qa-tester/worker.yaml +116 -0
- package/template/workers/dev-team/task-executor/package-lock.json +1252 -0
- package/template/workers/dev-team/task-executor/package.json +27 -0
- package/template/workers/dev-team/task-executor/skills/analyze-issue.md +101 -0
- package/template/workers/dev-team/task-executor/skills/execute.md +133 -0
- package/template/workers/dev-team/task-executor/skills/report-learnings.md +106 -0
- package/template/workers/dev-team/task-executor/skills/validate-completion.md +121 -0
- package/template/workers/dev-team/task-executor/src/index.ts +54 -0
- package/template/workers/dev-team/task-executor/src/mcp-server.ts +139 -0
- package/template/workers/dev-team/task-executor/src/skills/analyze-issue.ts +219 -0
- package/template/workers/dev-team/task-executor/src/skills/execute.ts +132 -0
- package/template/workers/dev-team/task-executor/src/skills/report-learnings.ts +119 -0
- package/template/workers/dev-team/task-executor/src/skills/validate-completion.ts +142 -0
- package/template/workers/dev-team/task-executor/tsconfig.json +19 -0
- package/template/workers/dev-team/task-executor/worker.yaml +110 -0
- package/template/workers/registry.yaml +171 -0
- package/template/workers/security-scanner/README.md +73 -0
- package/template/workers/security-scanner/skills/pre-deploy-check.md +205 -0
- package/template/workers/security-scanner/worker.yaml +26 -0
- package/template/workspace/checkpoints/.gitkeep +0 -0
- package/template/workspace/content-ideas/inbox.jsonl +0 -0
- package/template/workspace/drafts/.gitkeep +0 -0
- package/template/workspace/learnings/.gitkeep +3 -0
- package/template/workspace/orchestrator/.gitkeep +0 -0
- package/template/workspace/ralph-test/COMPLETE.md +18 -0
- package/template/workspace/ralph-test/hello.txt +2 -0
- package/template/workspace/reports/.gitkeep +0 -0
- package/template/workspace/scratch/.gitkeep +0 -0
- package/template/workspace/threads/.gitkeep +3 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
3
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
4
|
+
import { CallToolRequestSchema, ListToolsRequestSchema } from '@modelcontextprotocol/sdk/types.js';
|
|
5
|
+
|
|
6
|
+
const server = new Server(
|
|
7
|
+
{ name: 'database-dev', version: '1.0.0' },
|
|
8
|
+
{ capabilities: { tools: {} } }
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
12
|
+
tools: [
|
|
13
|
+
{
|
|
14
|
+
name: 'create_schema',
|
|
15
|
+
description: 'Design database schema for feature',
|
|
16
|
+
inputSchema: {
|
|
17
|
+
type: 'object',
|
|
18
|
+
properties: {
|
|
19
|
+
entity: { type: 'string', description: 'Entity name' },
|
|
20
|
+
feature: { type: 'string', description: 'Feature description' },
|
|
21
|
+
repo: { type: 'string', description: 'Target repository' },
|
|
22
|
+
orm: { type: 'string', enum: ['prisma', 'drizzle'], description: 'ORM type' },
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: 'create_migration',
|
|
28
|
+
description: 'Create database migration',
|
|
29
|
+
inputSchema: {
|
|
30
|
+
type: 'object',
|
|
31
|
+
properties: {
|
|
32
|
+
name: { type: 'string', description: 'Migration name' },
|
|
33
|
+
repo: { type: 'string', description: 'Target repository' },
|
|
34
|
+
},
|
|
35
|
+
required: ['name'],
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'optimize_query',
|
|
40
|
+
description: 'Optimize slow query',
|
|
41
|
+
inputSchema: {
|
|
42
|
+
type: 'object',
|
|
43
|
+
properties: {
|
|
44
|
+
query: { type: 'string', description: 'Query to optimize' },
|
|
45
|
+
repo: { type: 'string', description: 'Target repository' },
|
|
46
|
+
},
|
|
47
|
+
required: ['query'],
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: 'add_indexes',
|
|
52
|
+
description: 'Add database indexes',
|
|
53
|
+
inputSchema: {
|
|
54
|
+
type: 'object',
|
|
55
|
+
properties: {
|
|
56
|
+
table: { type: 'string', description: 'Table name' },
|
|
57
|
+
columns: { type: 'string', description: 'Comma-separated columns' },
|
|
58
|
+
repo: { type: 'string', description: 'Target repository' },
|
|
59
|
+
},
|
|
60
|
+
required: ['table'],
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
}));
|
|
65
|
+
|
|
66
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
67
|
+
const { name, arguments: args } = request.params;
|
|
68
|
+
return { content: [{ type: 'text', text: `Tool ${name} called with: ${JSON.stringify(args)}` }] };
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
async function main() {
|
|
72
|
+
const transport = new StdioServerTransport();
|
|
73
|
+
await server.connect(transport);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
main().catch(console.error);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "commonjs",
|
|
5
|
+
"lib": ["ES2022"],
|
|
6
|
+
"outDir": "./dist",
|
|
7
|
+
"rootDir": "./src",
|
|
8
|
+
"strict": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"forceConsistentCasingInFileNames": true,
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"declaration": true,
|
|
14
|
+
"sourceMap": true
|
|
15
|
+
},
|
|
16
|
+
"include": ["src/**/*"],
|
|
17
|
+
"exclude": ["node_modules", "dist"]
|
|
18
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
worker:
|
|
2
|
+
id: database-dev
|
|
3
|
+
name: "Database Developer"
|
|
4
|
+
type: CodeWorker
|
|
5
|
+
version: "1.0"
|
|
6
|
+
|
|
7
|
+
execution:
|
|
8
|
+
mode: on_demand
|
|
9
|
+
max_runtime: 15m
|
|
10
|
+
retry_attempts: 1
|
|
11
|
+
|
|
12
|
+
context:
|
|
13
|
+
base:
|
|
14
|
+
- workers/public/dev-team/database-dev/
|
|
15
|
+
- workers/public/dev-team/database-dev/skills/
|
|
16
|
+
- knowledge/public/dev-team/patterns/database/
|
|
17
|
+
dynamic:
|
|
18
|
+
- pattern: "{target_repo}/prisma/"
|
|
19
|
+
when: "db.type == 'prisma'"
|
|
20
|
+
- pattern: "{target_repo}/drizzle/"
|
|
21
|
+
when: "db.type == 'drizzle'"
|
|
22
|
+
- pattern: "{target_repo}/migrations/"
|
|
23
|
+
when: always
|
|
24
|
+
exclude:
|
|
25
|
+
- node_modules/
|
|
26
|
+
- dist/
|
|
27
|
+
- "*.log"
|
|
28
|
+
|
|
29
|
+
verification:
|
|
30
|
+
post_execute:
|
|
31
|
+
- check: typescript
|
|
32
|
+
command: npm run typecheck
|
|
33
|
+
- check: migration
|
|
34
|
+
command: npm run db:generate
|
|
35
|
+
approval_required: true
|
|
36
|
+
|
|
37
|
+
output:
|
|
38
|
+
destination: workspace/reports/dev-team/
|
|
39
|
+
format: both
|
|
40
|
+
naming: "{date}-database-dev-{task}.{ext}"
|
|
41
|
+
|
|
42
|
+
mcp:
|
|
43
|
+
server:
|
|
44
|
+
command: node
|
|
45
|
+
args:
|
|
46
|
+
- dist/mcp-server.js
|
|
47
|
+
cwd: workers/public/dev-team/database-dev
|
|
48
|
+
tools:
|
|
49
|
+
- create_schema
|
|
50
|
+
- create_migration
|
|
51
|
+
- optimize_query
|
|
52
|
+
- add_indexes
|
|
53
|
+
|
|
54
|
+
# State Machine (Loom pattern)
|
|
55
|
+
state_machine:
|
|
56
|
+
enabled: true
|
|
57
|
+
max_retries: 1
|
|
58
|
+
hooks:
|
|
59
|
+
post_execute:
|
|
60
|
+
- auto_checkpoint
|
|
61
|
+
- log_metrics
|
|
62
|
+
on_error:
|
|
63
|
+
- log_error
|
|
64
|
+
- checkpoint_error_state
|
|
65
|
+
|
|
66
|
+
instructions: |
|
|
67
|
+
# Database Developer
|
|
68
|
+
|
|
69
|
+
Schema design, migrations, and query optimization.
|
|
70
|
+
|
|
71
|
+
## Skills
|
|
72
|
+
|
|
73
|
+
| Skill | Description |
|
|
74
|
+
|-------|-------------|
|
|
75
|
+
| create-schema | Design database schema for feature |
|
|
76
|
+
| create-migration | Create database migration |
|
|
77
|
+
| optimize-query | Optimize slow query |
|
|
78
|
+
| add-indexes | Add database indexes |
|
|
79
|
+
|
|
80
|
+
## Supported ORMs
|
|
81
|
+
|
|
82
|
+
- Prisma
|
|
83
|
+
- Drizzle
|
|
84
|
+
- Raw SQL
|
|
85
|
+
|
|
86
|
+
## Human-in-the-loop
|
|
87
|
+
|
|
88
|
+
- Approve schema changes
|
|
89
|
+
- Review migration before running
|
|
90
|
+
- Confirm destructive operations
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hq/frontend-dev",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "React/Next.js components and pages",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"bin": { "frontend-dev": "dist/index.js" },
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "tsc",
|
|
9
|
+
"typecheck": "tsc --noEmit",
|
|
10
|
+
"dev": "ts-node src/index.ts",
|
|
11
|
+
"mcp": "node dist/mcp-server.js"
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
15
|
+
"commander": "^12.1.0"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@types/node": "^22.10.0",
|
|
19
|
+
"typescript": "^5.7.2",
|
|
20
|
+
"ts-node": "^10.9.2"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# create-component
|
|
2
|
+
|
|
3
|
+
Create a new React component.
|
|
4
|
+
|
|
5
|
+
## Arguments
|
|
6
|
+
|
|
7
|
+
`$ARGUMENTS` = `--name <ComponentName>` (required)
|
|
8
|
+
|
|
9
|
+
Optional:
|
|
10
|
+
- `--repo <path>` - Target repository
|
|
11
|
+
- `--type <functional|class>` - Component type
|
|
12
|
+
- `--with-test` - Include test file
|
|
13
|
+
|
|
14
|
+
## Process
|
|
15
|
+
|
|
16
|
+
1. Analyze existing component patterns
|
|
17
|
+
2. Generate component file
|
|
18
|
+
3. Add TypeScript types
|
|
19
|
+
4. Include accessibility attributes
|
|
20
|
+
5. Add tests if requested
|
|
21
|
+
|
|
22
|
+
## Output
|
|
23
|
+
|
|
24
|
+
- `src/components/{Name}/{Name}.tsx`
|
|
25
|
+
- `src/components/{Name}/{Name}.test.tsx` (if --with-test)
|
|
26
|
+
- `src/components/{Name}/index.ts` (barrel export)
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { Command } from 'commander';
|
|
3
|
+
|
|
4
|
+
const program = new Command();
|
|
5
|
+
|
|
6
|
+
program
|
|
7
|
+
.name('frontend-dev')
|
|
8
|
+
.description('React/Next.js components and pages')
|
|
9
|
+
.version('1.0.0');
|
|
10
|
+
|
|
11
|
+
program
|
|
12
|
+
.command('create-component')
|
|
13
|
+
.description('Create new React component')
|
|
14
|
+
.requiredOption('--name <name>', 'Component name')
|
|
15
|
+
.option('--repo <path>', 'Target repository')
|
|
16
|
+
.option('--type <type>', 'Component type: functional|class')
|
|
17
|
+
.option('--with-test', 'Include test file')
|
|
18
|
+
.action(async (options) => {
|
|
19
|
+
console.log('create-component:', options);
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
program
|
|
23
|
+
.command('create-page')
|
|
24
|
+
.description('Create new page/route')
|
|
25
|
+
.requiredOption('--path <path>', 'Page path (e.g., /dashboard)')
|
|
26
|
+
.option('--repo <path>', 'Target repository')
|
|
27
|
+
.action(async (options) => {
|
|
28
|
+
console.log('create-page:', options);
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
program
|
|
32
|
+
.command('fix-ui-bug')
|
|
33
|
+
.description('Fix frontend bug')
|
|
34
|
+
.requiredOption('--issue <description>', 'Bug description')
|
|
35
|
+
.option('--repo <path>', 'Target repository')
|
|
36
|
+
.action(async (options) => {
|
|
37
|
+
console.log('fix-ui-bug:', options);
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
program
|
|
41
|
+
.command('add-form')
|
|
42
|
+
.description('Add form with validation')
|
|
43
|
+
.requiredOption('--name <name>', 'Form name')
|
|
44
|
+
.option('--fields <list>', 'Comma-separated field names')
|
|
45
|
+
.option('--repo <path>', 'Target repository')
|
|
46
|
+
.action(async (options) => {
|
|
47
|
+
console.log('add-form:', options);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
program.parse();
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
3
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
4
|
+
import { CallToolRequestSchema, ListToolsRequestSchema } from '@modelcontextprotocol/sdk/types.js';
|
|
5
|
+
|
|
6
|
+
const server = new Server(
|
|
7
|
+
{ name: 'frontend-dev', version: '1.0.0' },
|
|
8
|
+
{ capabilities: { tools: {} } }
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
12
|
+
tools: [
|
|
13
|
+
{
|
|
14
|
+
name: 'create_component',
|
|
15
|
+
description: 'Create new React component',
|
|
16
|
+
inputSchema: {
|
|
17
|
+
type: 'object',
|
|
18
|
+
properties: {
|
|
19
|
+
name: { type: 'string', description: 'Component name' },
|
|
20
|
+
repo: { type: 'string', description: 'Target repository' },
|
|
21
|
+
type: { type: 'string', enum: ['functional', 'class'], description: 'Component type' },
|
|
22
|
+
withTest: { type: 'boolean', description: 'Include test file' },
|
|
23
|
+
},
|
|
24
|
+
required: ['name'],
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'create_page',
|
|
29
|
+
description: 'Create new page/route',
|
|
30
|
+
inputSchema: {
|
|
31
|
+
type: 'object',
|
|
32
|
+
properties: {
|
|
33
|
+
path: { type: 'string', description: 'Page path' },
|
|
34
|
+
repo: { type: 'string', description: 'Target repository' },
|
|
35
|
+
},
|
|
36
|
+
required: ['path'],
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'fix_ui_bug',
|
|
41
|
+
description: 'Fix frontend bug',
|
|
42
|
+
inputSchema: {
|
|
43
|
+
type: 'object',
|
|
44
|
+
properties: {
|
|
45
|
+
issue: { type: 'string', description: 'Bug description' },
|
|
46
|
+
repo: { type: 'string', description: 'Target repository' },
|
|
47
|
+
},
|
|
48
|
+
required: ['issue'],
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: 'add_form',
|
|
53
|
+
description: 'Add form with validation',
|
|
54
|
+
inputSchema: {
|
|
55
|
+
type: 'object',
|
|
56
|
+
properties: {
|
|
57
|
+
name: { type: 'string', description: 'Form name' },
|
|
58
|
+
fields: { type: 'string', description: 'Comma-separated field names' },
|
|
59
|
+
repo: { type: 'string', description: 'Target repository' },
|
|
60
|
+
},
|
|
61
|
+
required: ['name'],
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
}));
|
|
66
|
+
|
|
67
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
68
|
+
const { name, arguments: args } = request.params;
|
|
69
|
+
return { content: [{ type: 'text', text: `Tool ${name} called with: ${JSON.stringify(args)}` }] };
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
async function main() {
|
|
73
|
+
const transport = new StdioServerTransport();
|
|
74
|
+
await server.connect(transport);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
main().catch(console.error);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "commonjs",
|
|
5
|
+
"lib": ["ES2022"],
|
|
6
|
+
"outDir": "./dist",
|
|
7
|
+
"rootDir": "./src",
|
|
8
|
+
"strict": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"forceConsistentCasingInFileNames": true,
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"declaration": true,
|
|
14
|
+
"sourceMap": true
|
|
15
|
+
},
|
|
16
|
+
"include": ["src/**/*"],
|
|
17
|
+
"exclude": ["node_modules", "dist"]
|
|
18
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
worker:
|
|
2
|
+
id: frontend-dev
|
|
3
|
+
name: "Frontend Developer"
|
|
4
|
+
type: CodeWorker
|
|
5
|
+
version: "1.0"
|
|
6
|
+
|
|
7
|
+
execution:
|
|
8
|
+
mode: on_demand
|
|
9
|
+
max_runtime: 20m
|
|
10
|
+
retry_attempts: 2
|
|
11
|
+
|
|
12
|
+
context:
|
|
13
|
+
base:
|
|
14
|
+
- workers/dev-team/frontend-dev/
|
|
15
|
+
- workers/dev-team/frontend-dev/skills/
|
|
16
|
+
- knowledge/dev-team/patterns/frontend/
|
|
17
|
+
dynamic:
|
|
18
|
+
- pattern: "{target_repo}/src/components/"
|
|
19
|
+
when: always
|
|
20
|
+
- pattern: "{target_repo}/src/app/"
|
|
21
|
+
when: always
|
|
22
|
+
exclude:
|
|
23
|
+
- node_modules/
|
|
24
|
+
- dist/
|
|
25
|
+
- api/
|
|
26
|
+
- server/
|
|
27
|
+
|
|
28
|
+
verification:
|
|
29
|
+
post_execute:
|
|
30
|
+
- check: typescript
|
|
31
|
+
command: npm run typecheck
|
|
32
|
+
- check: lint
|
|
33
|
+
command: npm run lint
|
|
34
|
+
approval_required: true
|
|
35
|
+
|
|
36
|
+
external_skills:
|
|
37
|
+
# Vercel React Best Practices (https://github.com/vercel-labs/agent-skills)
|
|
38
|
+
- vercel/react-best-practices # Full skill set
|
|
39
|
+
# Key areas:
|
|
40
|
+
# - Eliminating waterfalls (defer await, parallel fetching, Suspense)
|
|
41
|
+
# - Bundle optimization (dynamic imports, avoid barrel files)
|
|
42
|
+
# - Server-side performance (RSC serialization, React.cache)
|
|
43
|
+
# - Re-render optimization (useMemo patterns, state management)
|
|
44
|
+
# - Rendering performance (hydration, CSS content-visibility)
|
|
45
|
+
|
|
46
|
+
output:
|
|
47
|
+
destination: workspace/reports/dev-team/
|
|
48
|
+
format: both
|
|
49
|
+
naming: "{date}-frontend-dev-{task}.{ext}"
|
|
50
|
+
|
|
51
|
+
mcp:
|
|
52
|
+
server:
|
|
53
|
+
command: node
|
|
54
|
+
args:
|
|
55
|
+
- dist/mcp-server.js
|
|
56
|
+
cwd: workers/dev-team/frontend-dev
|
|
57
|
+
tools:
|
|
58
|
+
- create_component
|
|
59
|
+
- create_page
|
|
60
|
+
- fix_ui_bug
|
|
61
|
+
- add_form
|
|
62
|
+
|
|
63
|
+
# State Machine (Loom pattern)
|
|
64
|
+
state_machine:
|
|
65
|
+
enabled: true
|
|
66
|
+
max_retries: 1
|
|
67
|
+
hooks:
|
|
68
|
+
post_execute:
|
|
69
|
+
- auto_checkpoint
|
|
70
|
+
- log_metrics
|
|
71
|
+
on_error:
|
|
72
|
+
- log_error
|
|
73
|
+
- checkpoint_error_state
|
|
74
|
+
|
|
75
|
+
instructions: |
|
|
76
|
+
# Frontend Developer
|
|
77
|
+
|
|
78
|
+
React/Next.js components and pages.
|
|
79
|
+
|
|
80
|
+
## Skills
|
|
81
|
+
|
|
82
|
+
| Skill | Description |
|
|
83
|
+
|-------|-------------|
|
|
84
|
+
| create-component | Create new React component |
|
|
85
|
+
| create-page | Create new page/route |
|
|
86
|
+
| fix-ui-bug | Fix frontend bug |
|
|
87
|
+
| add-form | Add form with validation |
|
|
88
|
+
|
|
89
|
+
## Patterns
|
|
90
|
+
|
|
91
|
+
- Follow existing component structure
|
|
92
|
+
- Use TypeScript strict mode
|
|
93
|
+
- Include accessibility attributes
|
|
94
|
+
- Add responsive styles
|
|
95
|
+
|
|
96
|
+
## React Best Practices (Vercel)
|
|
97
|
+
|
|
98
|
+
CRITICAL - Eliminating Waterfalls:
|
|
99
|
+
- Defer await until needed (don't await at top of function)
|
|
100
|
+
- Use Promise.all() for independent operations
|
|
101
|
+
- Strategic Suspense boundaries
|
|
102
|
+
|
|
103
|
+
CRITICAL - Bundle Optimization:
|
|
104
|
+
- Avoid barrel file imports (import from specific files)
|
|
105
|
+
- Dynamic imports for heavy components
|
|
106
|
+
- Preload based on user intent
|
|
107
|
+
|
|
108
|
+
HIGH - Server Components:
|
|
109
|
+
- Minimize serialization at RSC boundaries
|
|
110
|
+
- Use React.cache() for per-request deduplication
|
|
111
|
+
- Parallel data fetching with component composition
|
|
112
|
+
|
|
113
|
+
MEDIUM - Re-render Optimization:
|
|
114
|
+
- Don't wrap simple expressions in useMemo
|
|
115
|
+
- Extract to memoized components for isolation
|
|
116
|
+
- Use functional setState updates
|
|
117
|
+
- Use Transitions for non-urgent updates
|
|
118
|
+
|
|
119
|
+
## E2E Requirements
|
|
120
|
+
|
|
121
|
+
When working in a project with E2E tests:
|
|
122
|
+
- Every new or modified page MUST have a corresponding E2E spec in `tests/e2e/pages/`
|
|
123
|
+
- After adding or modifying specs, run: `npm run generate-manifest`
|
|
124
|
+
- Commit the updated `tests/e2e/manifest.json` alongside your changes
|
|
125
|
+
- Run `npm run check-coverage` to verify no routes are uncovered
|
|
126
|
+
- Test categories: page-load, navigation, forms, components, accessibility, responsive, performance, visual
|
|
127
|
+
|
|
128
|
+
## Human-in-the-loop
|
|
129
|
+
|
|
130
|
+
- Approve component design
|
|
131
|
+
- Review styling approach
|
|
132
|
+
- Confirm accessibility compliance
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hq/infra-dev",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Infrastructure developer worker - CI/CD, deployment, monitoring",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"infra-dev": "dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "tsc",
|
|
12
|
+
"typecheck": "tsc --noEmit",
|
|
13
|
+
"start": "node dist/index.js",
|
|
14
|
+
"mcp": "node dist/mcp-server.js"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
18
|
+
"commander": "^12.0.0"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@types/node": "^20.0.0",
|
|
22
|
+
"typescript": "^5.0.0"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# add-monitoring
|
|
2
|
+
|
|
3
|
+
Add monitoring and observability to application.
|
|
4
|
+
|
|
5
|
+
## Arguments
|
|
6
|
+
|
|
7
|
+
`$ARGUMENTS` = `--repo <path>` (required)
|
|
8
|
+
|
|
9
|
+
Optional:
|
|
10
|
+
- `--type <metrics|logs|traces|all>` - Monitoring type
|
|
11
|
+
- `--provider <datadog|newrelic|prometheus|otel>` - Monitoring provider
|
|
12
|
+
- `--alerts` - Include alerting rules
|
|
13
|
+
|
|
14
|
+
## Process
|
|
15
|
+
|
|
16
|
+
1. Analyze application architecture
|
|
17
|
+
2. Identify key metrics:
|
|
18
|
+
- Request latency
|
|
19
|
+
- Error rates
|
|
20
|
+
- Resource usage
|
|
21
|
+
- Business metrics
|
|
22
|
+
3. Design instrumentation:
|
|
23
|
+
- HTTP middleware
|
|
24
|
+
- Database queries
|
|
25
|
+
- External API calls
|
|
26
|
+
4. Configure logging:
|
|
27
|
+
- Structured JSON logs
|
|
28
|
+
- Log levels
|
|
29
|
+
- Correlation IDs
|
|
30
|
+
5. Add health checks:
|
|
31
|
+
- Liveness probe
|
|
32
|
+
- Readiness probe
|
|
33
|
+
6. Create alerting rules (if --alerts)
|
|
34
|
+
7. Present for human approval
|
|
35
|
+
|
|
36
|
+
## Output
|
|
37
|
+
|
|
38
|
+
- Instrumentation code
|
|
39
|
+
- Health check endpoints
|
|
40
|
+
- Alert configuration
|
|
41
|
+
- Dashboard templates (if available)
|
|
42
|
+
|
|
43
|
+
## OpenTelemetry Setup
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
import { NodeSDK } from '@opentelemetry/sdk-node';
|
|
47
|
+
import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node';
|
|
48
|
+
|
|
49
|
+
const sdk = new NodeSDK({
|
|
50
|
+
serviceName: 'my-service',
|
|
51
|
+
instrumentations: [getNodeAutoInstrumentations()],
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
sdk.start();
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Health Check Pattern
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
app.get('/health/live', (req, res) => {
|
|
61
|
+
res.json({ status: 'ok' });
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
app.get('/health/ready', async (req, res) => {
|
|
65
|
+
const dbOk = await checkDatabase();
|
|
66
|
+
const cacheOk = await checkCache();
|
|
67
|
+
if (dbOk && cacheOk) {
|
|
68
|
+
res.json({ status: 'ready' });
|
|
69
|
+
} else {
|
|
70
|
+
res.status(503).json({ status: 'not ready' });
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
```
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# configure-deployment
|
|
2
|
+
|
|
3
|
+
Configure deployment for application.
|
|
4
|
+
|
|
5
|
+
## Arguments
|
|
6
|
+
|
|
7
|
+
`$ARGUMENTS` = `--repo <path>` (required)
|
|
8
|
+
|
|
9
|
+
Optional:
|
|
10
|
+
- `--platform <vercel|railway|fly|aws|gcp>` - Deployment platform
|
|
11
|
+
- `--env <staging|production>` - Target environment
|
|
12
|
+
- `--preview` - Enable preview deployments
|
|
13
|
+
|
|
14
|
+
## Process
|
|
15
|
+
|
|
16
|
+
1. Analyze project requirements:
|
|
17
|
+
- Runtime (Node, Python, Go, etc.)
|
|
18
|
+
- Environment variables needed
|
|
19
|
+
- External services (DB, cache, etc.)
|
|
20
|
+
2. Choose deployment strategy:
|
|
21
|
+
- Blue-green
|
|
22
|
+
- Rolling
|
|
23
|
+
- Canary
|
|
24
|
+
3. Configure platform:
|
|
25
|
+
- vercel.json / fly.toml / railway.json
|
|
26
|
+
- Environment variable templates
|
|
27
|
+
- Domain configuration
|
|
28
|
+
4. Set up preview deployments (if --preview)
|
|
29
|
+
5. Configure rollback strategy
|
|
30
|
+
6. Present for human approval
|
|
31
|
+
|
|
32
|
+
## Output
|
|
33
|
+
|
|
34
|
+
- Platform configuration file
|
|
35
|
+
- Environment variable template
|
|
36
|
+
- Deployment documentation
|
|
37
|
+
|
|
38
|
+
## Vercel Config
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"buildCommand": "npm run build",
|
|
43
|
+
"outputDirectory": "dist",
|
|
44
|
+
"framework": null,
|
|
45
|
+
"regions": ["iad1"],
|
|
46
|
+
"env": {
|
|
47
|
+
"DATABASE_URL": "@database-url"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Fly.io Config
|
|
53
|
+
|
|
54
|
+
```toml
|
|
55
|
+
app = "my-app"
|
|
56
|
+
primary_region = "iad"
|
|
57
|
+
|
|
58
|
+
[build]
|
|
59
|
+
dockerfile = "Dockerfile"
|
|
60
|
+
|
|
61
|
+
[http_service]
|
|
62
|
+
internal_port = 3000
|
|
63
|
+
force_https = true
|
|
64
|
+
auto_stop_machines = true
|
|
65
|
+
auto_start_machines = true
|
|
66
|
+
|
|
67
|
+
[[services.ports]]
|
|
68
|
+
handlers = ["http"]
|
|
69
|
+
port = 80
|
|
70
|
+
|
|
71
|
+
[[services.ports]]
|
|
72
|
+
handlers = ["tls", "http"]
|
|
73
|
+
port = 443
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Human Checkpoints
|
|
77
|
+
|
|
78
|
+
- Approve deployment configuration
|
|
79
|
+
- Approve environment variables
|
|
80
|
+
- Approve production deployments (always)
|