create-hq 5.3.2 → 6.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 +2 -2
- package/dist/deps.d.ts.map +1 -1
- package/dist/deps.js +29 -138
- package/dist/deps.js.map +1 -1
- package/dist/git.d.ts.map +1 -1
- package/dist/git.js +5 -0
- package/dist/git.js.map +1 -1
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/scaffold.d.ts +2 -1
- package/dist/scaffold.d.ts.map +1 -1
- package/dist/scaffold.js +238 -54
- package/dist/scaffold.js.map +1 -1
- package/dist/ui.d.ts +2 -0
- package/dist/ui.d.ts.map +1 -1
- package/dist/ui.js +31 -1
- package/dist/ui.js.map +1 -1
- package/package.json +6 -3
- 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,62 @@
|
|
|
1
|
+
# create-dockerfile
|
|
2
|
+
|
|
3
|
+
Create optimized Dockerfile for project.
|
|
4
|
+
|
|
5
|
+
## Arguments
|
|
6
|
+
|
|
7
|
+
`$ARGUMENTS` = `--repo <path>` (required)
|
|
8
|
+
|
|
9
|
+
Optional:
|
|
10
|
+
- `--type <nodejs|python|go|rust>` - Project type
|
|
11
|
+
- `--multi-stage` - Use multi-stage build
|
|
12
|
+
- `--target <dev|prod>` - Build target
|
|
13
|
+
|
|
14
|
+
## Process
|
|
15
|
+
|
|
16
|
+
1. Detect project type and dependencies
|
|
17
|
+
2. Choose base image (prefer slim/alpine)
|
|
18
|
+
3. Design build stages:
|
|
19
|
+
- Dependencies stage
|
|
20
|
+
- Build stage
|
|
21
|
+
- Production stage
|
|
22
|
+
4. Optimize layer caching
|
|
23
|
+
5. Add security best practices:
|
|
24
|
+
- Non-root user
|
|
25
|
+
- Minimal final image
|
|
26
|
+
- No secrets in image
|
|
27
|
+
6. Generate Dockerfile
|
|
28
|
+
7. Generate .dockerignore
|
|
29
|
+
8. Present for human approval
|
|
30
|
+
|
|
31
|
+
## Output
|
|
32
|
+
|
|
33
|
+
- `Dockerfile`
|
|
34
|
+
- `.dockerignore`
|
|
35
|
+
- `docker-compose.yml` (if needed)
|
|
36
|
+
|
|
37
|
+
## Node.js Template
|
|
38
|
+
|
|
39
|
+
```dockerfile
|
|
40
|
+
# Build stage
|
|
41
|
+
FROM node:20-alpine AS builder
|
|
42
|
+
WORKDIR /app
|
|
43
|
+
COPY package*.json ./
|
|
44
|
+
RUN npm ci --only=production
|
|
45
|
+
|
|
46
|
+
# Production stage
|
|
47
|
+
FROM node:20-alpine
|
|
48
|
+
WORKDIR /app
|
|
49
|
+
RUN addgroup -g 1001 -S nodejs && adduser -S nodejs -u 1001
|
|
50
|
+
COPY --from=builder /app/node_modules ./node_modules
|
|
51
|
+
COPY --chown=nodejs:nodejs . .
|
|
52
|
+
USER nodejs
|
|
53
|
+
EXPOSE 3000
|
|
54
|
+
CMD ["node", "dist/index.js"]
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Best Practices
|
|
58
|
+
|
|
59
|
+
- Use specific version tags, not latest
|
|
60
|
+
- Order commands for cache efficiency
|
|
61
|
+
- COPY specific files, not entire context
|
|
62
|
+
- Use .dockerignore for node_modules, .git, etc.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# setup-cicd
|
|
2
|
+
|
|
3
|
+
Set up CI/CD pipeline for repository.
|
|
4
|
+
|
|
5
|
+
## Arguments
|
|
6
|
+
|
|
7
|
+
`$ARGUMENTS` = `--repo <path>` (required)
|
|
8
|
+
|
|
9
|
+
Optional:
|
|
10
|
+
- `--platform <github|gitlab|bitbucket>` - CI platform (default: github)
|
|
11
|
+
- `--type <nodejs|python|go|rust>` - Project type
|
|
12
|
+
- `--include-deploy` - Include deployment stage
|
|
13
|
+
|
|
14
|
+
## Process
|
|
15
|
+
|
|
16
|
+
1. Detect project type from package.json/requirements.txt/go.mod/Cargo.toml
|
|
17
|
+
2. Analyze existing workflow files (if any)
|
|
18
|
+
3. Design pipeline stages:
|
|
19
|
+
- Build
|
|
20
|
+
- Lint
|
|
21
|
+
- Test
|
|
22
|
+
- Security scan
|
|
23
|
+
- Deploy (if --include-deploy)
|
|
24
|
+
4. Generate workflow file(s)
|
|
25
|
+
5. Add branch protection rules (suggest)
|
|
26
|
+
6. Present for human approval
|
|
27
|
+
|
|
28
|
+
## Output
|
|
29
|
+
|
|
30
|
+
- `.github/workflows/ci.yml` (or equivalent)
|
|
31
|
+
- Branch protection recommendations
|
|
32
|
+
- Required secrets list
|
|
33
|
+
|
|
34
|
+
## GitHub Actions Template
|
|
35
|
+
|
|
36
|
+
```yaml
|
|
37
|
+
name: CI
|
|
38
|
+
on:
|
|
39
|
+
push:
|
|
40
|
+
branches: [main, develop]
|
|
41
|
+
pull_request:
|
|
42
|
+
branches: [main]
|
|
43
|
+
|
|
44
|
+
jobs:
|
|
45
|
+
build:
|
|
46
|
+
runs-on: ubuntu-latest
|
|
47
|
+
steps:
|
|
48
|
+
- uses: actions/checkout@v4
|
|
49
|
+
- uses: actions/setup-node@v4
|
|
50
|
+
with:
|
|
51
|
+
node-version: '20'
|
|
52
|
+
cache: 'npm'
|
|
53
|
+
- run: npm ci
|
|
54
|
+
- run: npm run build
|
|
55
|
+
- run: npm run lint
|
|
56
|
+
- run: npm test
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Human Checkpoints
|
|
60
|
+
|
|
61
|
+
- Approve workflow before commit
|
|
62
|
+
- Approve any deployment configurations
|
|
63
|
+
- Review secrets requirements
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { Command } from 'commander';
|
|
3
|
+
|
|
4
|
+
const program = new Command();
|
|
5
|
+
|
|
6
|
+
program
|
|
7
|
+
.name('infra-dev')
|
|
8
|
+
.description('CI/CD pipelines, deployment configurations, and monitoring')
|
|
9
|
+
.version('1.0.0');
|
|
10
|
+
|
|
11
|
+
program
|
|
12
|
+
.command('setup-cicd')
|
|
13
|
+
.description('Set up CI/CD pipeline')
|
|
14
|
+
.requiredOption('--repo <path>', 'Target repository')
|
|
15
|
+
.option('--platform <platform>', 'CI platform: github|gitlab|bitbucket', 'github')
|
|
16
|
+
.option('--type <type>', 'Project type: nodejs|python|go|rust')
|
|
17
|
+
.option('--include-deploy', 'Include deployment stage')
|
|
18
|
+
.action(async (options) => {
|
|
19
|
+
console.log('setup-cicd:', options);
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
program
|
|
23
|
+
.command('create-dockerfile')
|
|
24
|
+
.description('Create optimized Dockerfile')
|
|
25
|
+
.requiredOption('--repo <path>', 'Target repository')
|
|
26
|
+
.option('--type <type>', 'Project type: nodejs|python|go|rust')
|
|
27
|
+
.option('--multi-stage', 'Use multi-stage build')
|
|
28
|
+
.option('--target <target>', 'Build target: dev|prod', 'prod')
|
|
29
|
+
.action(async (options) => {
|
|
30
|
+
console.log('create-dockerfile:', options);
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
program
|
|
34
|
+
.command('add-monitoring')
|
|
35
|
+
.description('Add monitoring and observability')
|
|
36
|
+
.requiredOption('--repo <path>', 'Target repository')
|
|
37
|
+
.option('--type <type>', 'Type: metrics|logs|traces|all', 'all')
|
|
38
|
+
.option('--provider <provider>', 'Provider: datadog|newrelic|prometheus|otel')
|
|
39
|
+
.option('--alerts', 'Include alerting rules')
|
|
40
|
+
.action(async (options) => {
|
|
41
|
+
console.log('add-monitoring:', options);
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
program
|
|
45
|
+
.command('configure-deployment')
|
|
46
|
+
.description('Configure deployment')
|
|
47
|
+
.requiredOption('--repo <path>', 'Target repository')
|
|
48
|
+
.option('--platform <platform>', 'Platform: vercel|railway|fly|aws|gcp')
|
|
49
|
+
.option('--env <env>', 'Environment: staging|production')
|
|
50
|
+
.option('--preview', 'Enable preview deployments')
|
|
51
|
+
.action(async (options) => {
|
|
52
|
+
console.log('configure-deployment:', options);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
program.parse();
|
|
@@ -0,0 +1,82 @@
|
|
|
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: 'infra-dev', version: '1.0.0' },
|
|
8
|
+
{ capabilities: { tools: {} } }
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
12
|
+
tools: [
|
|
13
|
+
{
|
|
14
|
+
name: 'setup_cicd',
|
|
15
|
+
description: 'Set up CI/CD pipeline for repository',
|
|
16
|
+
inputSchema: {
|
|
17
|
+
type: 'object',
|
|
18
|
+
properties: {
|
|
19
|
+
repo: { type: 'string', description: 'Target repository path' },
|
|
20
|
+
platform: { type: 'string', enum: ['github', 'gitlab', 'bitbucket'], description: 'CI platform' },
|
|
21
|
+
type: { type: 'string', enum: ['nodejs', 'python', 'go', 'rust'], description: 'Project type' },
|
|
22
|
+
include_deploy: { type: 'boolean', description: 'Include deployment stage' },
|
|
23
|
+
},
|
|
24
|
+
required: ['repo'],
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'create_dockerfile',
|
|
29
|
+
description: 'Create optimized Dockerfile for project',
|
|
30
|
+
inputSchema: {
|
|
31
|
+
type: 'object',
|
|
32
|
+
properties: {
|
|
33
|
+
repo: { type: 'string', description: 'Target repository path' },
|
|
34
|
+
type: { type: 'string', enum: ['nodejs', 'python', 'go', 'rust'], description: 'Project type' },
|
|
35
|
+
multi_stage: { type: 'boolean', description: 'Use multi-stage build' },
|
|
36
|
+
target: { type: 'string', enum: ['dev', 'prod'], description: 'Build target' },
|
|
37
|
+
},
|
|
38
|
+
required: ['repo'],
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: 'add_monitoring',
|
|
43
|
+
description: 'Add monitoring and observability to application',
|
|
44
|
+
inputSchema: {
|
|
45
|
+
type: 'object',
|
|
46
|
+
properties: {
|
|
47
|
+
repo: { type: 'string', description: 'Target repository path' },
|
|
48
|
+
type: { type: 'string', enum: ['metrics', 'logs', 'traces', 'all'], description: 'Monitoring type' },
|
|
49
|
+
provider: { type: 'string', enum: ['datadog', 'newrelic', 'prometheus', 'otel'], description: 'Monitoring provider' },
|
|
50
|
+
alerts: { type: 'boolean', description: 'Include alerting rules' },
|
|
51
|
+
},
|
|
52
|
+
required: ['repo'],
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: 'configure_deployment',
|
|
57
|
+
description: 'Configure deployment for application',
|
|
58
|
+
inputSchema: {
|
|
59
|
+
type: 'object',
|
|
60
|
+
properties: {
|
|
61
|
+
repo: { type: 'string', description: 'Target repository path' },
|
|
62
|
+
platform: { type: 'string', enum: ['vercel', 'railway', 'fly', 'aws', 'gcp'], description: 'Deployment platform' },
|
|
63
|
+
env: { type: 'string', enum: ['staging', 'production'], description: 'Target environment' },
|
|
64
|
+
preview: { type: 'boolean', description: 'Enable preview deployments' },
|
|
65
|
+
},
|
|
66
|
+
required: ['repo'],
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
}));
|
|
71
|
+
|
|
72
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
73
|
+
const { name, arguments: args } = request.params;
|
|
74
|
+
return { content: [{ type: 'text', text: `Tool ${name} called with: ${JSON.stringify(args)}` }] };
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
async function main() {
|
|
78
|
+
const transport = new StdioServerTransport();
|
|
79
|
+
await server.connect(transport);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
main().catch(console.error);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "NodeNext",
|
|
5
|
+
"moduleResolution": "NodeNext",
|
|
6
|
+
"lib": ["ES2022"],
|
|
7
|
+
"outDir": "./dist",
|
|
8
|
+
"rootDir": "./src",
|
|
9
|
+
"strict": true,
|
|
10
|
+
"esModuleInterop": true,
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"forceConsistentCasingInFileNames": true,
|
|
13
|
+
"resolveJsonModule": true,
|
|
14
|
+
"declaration": true,
|
|
15
|
+
"sourceMap": true
|
|
16
|
+
},
|
|
17
|
+
"include": ["src/**/*"],
|
|
18
|
+
"exclude": ["node_modules", "dist"]
|
|
19
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
worker:
|
|
2
|
+
id: infra-dev
|
|
3
|
+
name: "Infrastructure Developer"
|
|
4
|
+
description: "CI/CD pipelines, deployment configurations, and monitoring setup"
|
|
5
|
+
type: CodeWorker
|
|
6
|
+
version: "1.0"
|
|
7
|
+
team: dev-team
|
|
8
|
+
|
|
9
|
+
execution:
|
|
10
|
+
mode: on_demand
|
|
11
|
+
max_runtime: 20m
|
|
12
|
+
retry_attempts: 2
|
|
13
|
+
spawn_method: task_tool
|
|
14
|
+
|
|
15
|
+
context:
|
|
16
|
+
base:
|
|
17
|
+
- workers/public/dev-team/infra-dev/skills/
|
|
18
|
+
- knowledge/public/dev-team/patterns/infra/
|
|
19
|
+
- knowledge/public/dev-team/workflows/deployment.md
|
|
20
|
+
dynamic:
|
|
21
|
+
- pattern: "{target_repo}/.github/"
|
|
22
|
+
when: always
|
|
23
|
+
- pattern: "{target_repo}/docker*"
|
|
24
|
+
when: "task.involves_docker"
|
|
25
|
+
- pattern: "{target_repo}/terraform/"
|
|
26
|
+
when: "task.involves_terraform"
|
|
27
|
+
- pattern: "{target_repo}/k8s/"
|
|
28
|
+
when: "task.involves_kubernetes"
|
|
29
|
+
- pattern: "{target_repo}/package.json"
|
|
30
|
+
when: always
|
|
31
|
+
exclude:
|
|
32
|
+
- node_modules/
|
|
33
|
+
- dist/
|
|
34
|
+
- "*.log"
|
|
35
|
+
- src/
|
|
36
|
+
- tests/
|
|
37
|
+
|
|
38
|
+
skills:
|
|
39
|
+
- id: setup-cicd
|
|
40
|
+
file: skills/setup-cicd.md
|
|
41
|
+
- id: create-dockerfile
|
|
42
|
+
file: skills/create-dockerfile.md
|
|
43
|
+
- id: add-monitoring
|
|
44
|
+
file: skills/add-monitoring.md
|
|
45
|
+
- id: configure-deployment
|
|
46
|
+
file: skills/configure-deployment.md
|
|
47
|
+
|
|
48
|
+
verification:
|
|
49
|
+
post_execute:
|
|
50
|
+
- check: yaml_lint
|
|
51
|
+
command: npx yaml-lint .github/workflows/*.yml
|
|
52
|
+
- check: dockerfile_lint
|
|
53
|
+
command: docker run --rm -i hadolint/hadolint < Dockerfile
|
|
54
|
+
approval_required: true
|
|
55
|
+
human_checkpoints:
|
|
56
|
+
- before_deploy
|
|
57
|
+
- on_production_change
|
|
58
|
+
|
|
59
|
+
external_skills:
|
|
60
|
+
- vercel/github-actions-templates
|
|
61
|
+
- vercel/terraform-module-library
|
|
62
|
+
- vercel/monitoring
|
|
63
|
+
|
|
64
|
+
mcp:
|
|
65
|
+
server:
|
|
66
|
+
command: node
|
|
67
|
+
args: [dist/mcp-server.js]
|
|
68
|
+
tools:
|
|
69
|
+
- setup_cicd
|
|
70
|
+
- create_dockerfile
|
|
71
|
+
- add_monitoring
|
|
72
|
+
- configure_deployment
|
|
73
|
+
|
|
74
|
+
# State Machine (Loom pattern)
|
|
75
|
+
state_machine:
|
|
76
|
+
enabled: true
|
|
77
|
+
max_retries: 1
|
|
78
|
+
hooks:
|
|
79
|
+
post_execute:
|
|
80
|
+
- auto_checkpoint
|
|
81
|
+
- log_metrics
|
|
82
|
+
on_error:
|
|
83
|
+
- log_error
|
|
84
|
+
- checkpoint_error_state
|
|
85
|
+
|
|
86
|
+
reporting:
|
|
87
|
+
on_complete:
|
|
88
|
+
- log_changes
|
|
89
|
+
- extract_learnings
|
|
90
|
+
metrics:
|
|
91
|
+
- pipeline_execution_time
|
|
92
|
+
- deployment_success_rate
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hq/knowledge-curator",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Knowledge curator worker - process learnings, maintain documentation",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"knowledge-curator": "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,63 @@
|
|
|
1
|
+
# curate-troubleshooting
|
|
2
|
+
|
|
3
|
+
Add or update troubleshooting entries for common issues.
|
|
4
|
+
|
|
5
|
+
## Arguments
|
|
6
|
+
|
|
7
|
+
`$ARGUMENTS` = `--issue <description>` (required)
|
|
8
|
+
|
|
9
|
+
Optional:
|
|
10
|
+
- `--solution <description>` - Solution that worked
|
|
11
|
+
- `--category <category>` - Issue category
|
|
12
|
+
- `--tags <tags>` - Comma-separated tags
|
|
13
|
+
|
|
14
|
+
## Process
|
|
15
|
+
|
|
16
|
+
1. Search existing troubleshooting for similar issues
|
|
17
|
+
2. If exists: update with new information
|
|
18
|
+
3. If new: create entry with:
|
|
19
|
+
- Symptoms
|
|
20
|
+
- Root cause
|
|
21
|
+
- Solution
|
|
22
|
+
- Prevention
|
|
23
|
+
4. Add relevant tags for searchability
|
|
24
|
+
5. Present to human for approval
|
|
25
|
+
6. Write to `knowledge/public/dev-team/troubleshooting/`
|
|
26
|
+
|
|
27
|
+
## Entry Format
|
|
28
|
+
|
|
29
|
+
```markdown
|
|
30
|
+
## Issue: Brief Description
|
|
31
|
+
|
|
32
|
+
### Symptoms
|
|
33
|
+
- What you observe
|
|
34
|
+
|
|
35
|
+
### Root Cause
|
|
36
|
+
Why this happens
|
|
37
|
+
|
|
38
|
+
### Solution
|
|
39
|
+
\`\`\`bash
|
|
40
|
+
# Commands or code to fix
|
|
41
|
+
\`\`\`
|
|
42
|
+
|
|
43
|
+
### Prevention
|
|
44
|
+
How to avoid this in future
|
|
45
|
+
|
|
46
|
+
### Tags
|
|
47
|
+
`error`, `database`, `timeout`
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Categories
|
|
51
|
+
|
|
52
|
+
- `build` - Build/compile errors
|
|
53
|
+
- `runtime` - Runtime errors
|
|
54
|
+
- `database` - Database issues
|
|
55
|
+
- `network` - Network/API issues
|
|
56
|
+
- `auth` - Authentication/authorization
|
|
57
|
+
- `deploy` - Deployment issues
|
|
58
|
+
- `performance` - Performance problems
|
|
59
|
+
|
|
60
|
+
## Output
|
|
61
|
+
|
|
62
|
+
- Troubleshooting entry created/updated
|
|
63
|
+
- Summary of changes
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# process-learnings
|
|
2
|
+
|
|
3
|
+
Process learnings from completed tasks and route to appropriate locations.
|
|
4
|
+
|
|
5
|
+
## Arguments
|
|
6
|
+
|
|
7
|
+
`$ARGUMENTS` = `--learnings <json>` (required)
|
|
8
|
+
|
|
9
|
+
Optional:
|
|
10
|
+
- `--project <name>` - Source project
|
|
11
|
+
- `--worker <id>` - Source worker
|
|
12
|
+
- `--task <id>` - Source task ID
|
|
13
|
+
|
|
14
|
+
## Learnings Format
|
|
15
|
+
|
|
16
|
+
```json
|
|
17
|
+
{
|
|
18
|
+
"what_worked": ["Description of successful approach"],
|
|
19
|
+
"what_failed": ["Description of failed approach", "Why it failed"],
|
|
20
|
+
"patterns_discovered": ["Reusable pattern description"],
|
|
21
|
+
"context_notes": ["Important context for future reference"],
|
|
22
|
+
"worker_specific": ["Learnings specific to worker type"]
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Process
|
|
27
|
+
|
|
28
|
+
1. Parse incoming learnings
|
|
29
|
+
2. Categorize each learning:
|
|
30
|
+
- **Project-specific**: Store in `projects/{name}/learnings/`
|
|
31
|
+
- **Worker-specific**: Store in `workers/{worker}/knowledge/`
|
|
32
|
+
- **General pattern**: Store in `knowledge/public/dev-team/patterns/`
|
|
33
|
+
- **Troubleshooting**: Store in `knowledge/public/dev-team/troubleshooting/`
|
|
34
|
+
3. Check for duplicates/conflicts with existing knowledge
|
|
35
|
+
4. Format as markdown
|
|
36
|
+
5. Present to human for approval
|
|
37
|
+
6. Write to appropriate location
|
|
38
|
+
7. Update related CLAUDE.md files if needed
|
|
39
|
+
|
|
40
|
+
## Routing Rules
|
|
41
|
+
|
|
42
|
+
| Category | Destination |
|
|
43
|
+
|----------|-------------|
|
|
44
|
+
| Project conventions | `projects/{name}/learnings/conventions.md` |
|
|
45
|
+
| Bug fixes | `projects/{name}/learnings/bugs-fixed.md` |
|
|
46
|
+
| Backend patterns | `knowledge/public/dev-team/patterns/backend/` |
|
|
47
|
+
| Frontend patterns | `knowledge/public/dev-team/patterns/frontend/` |
|
|
48
|
+
| Database patterns | `knowledge/public/dev-team/patterns/database/` |
|
|
49
|
+
| Worker tips | `workers/public/dev-team/{worker}/knowledge/` |
|
|
50
|
+
| Error solutions | `knowledge/public/dev-team/troubleshooting/` |
|
|
51
|
+
|
|
52
|
+
## Output
|
|
53
|
+
|
|
54
|
+
- Files created/updated
|
|
55
|
+
- Summary of knowledge added
|
|
56
|
+
|
|
57
|
+
## Human Checkpoints
|
|
58
|
+
|
|
59
|
+
- Approve categorization
|
|
60
|
+
- Approve content before writing
|
|
61
|
+
- Confirm duplicate handling
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# sync-documentation
|
|
2
|
+
|
|
3
|
+
Sync and update documentation across the HQ system.
|
|
4
|
+
|
|
5
|
+
## Arguments
|
|
6
|
+
|
|
7
|
+
`$ARGUMENTS` = `--scope <scope>` (required)
|
|
8
|
+
|
|
9
|
+
Optional:
|
|
10
|
+
- `--target <path>` - Specific file to update
|
|
11
|
+
- `--dry-run` - Preview changes without writing
|
|
12
|
+
|
|
13
|
+
## Scopes
|
|
14
|
+
|
|
15
|
+
- `worker` - Update worker CLAUDE.md files
|
|
16
|
+
- `project` - Update project documentation
|
|
17
|
+
- `knowledge` - Sync knowledge base indices
|
|
18
|
+
- `all` - Full documentation sync
|
|
19
|
+
|
|
20
|
+
## Process
|
|
21
|
+
|
|
22
|
+
1. Scan scope for documentation files
|
|
23
|
+
2. Identify outdated or missing content:
|
|
24
|
+
- Worker capabilities not documented
|
|
25
|
+
- Skills not listed
|
|
26
|
+
- Stale references
|
|
27
|
+
3. Generate updates
|
|
28
|
+
4. Present changes to human
|
|
29
|
+
5. Apply updates
|
|
30
|
+
|
|
31
|
+
## Documentation Standards
|
|
32
|
+
|
|
33
|
+
### Worker CLAUDE.md
|
|
34
|
+
```markdown
|
|
35
|
+
# Worker Name
|
|
36
|
+
|
|
37
|
+
One-line description.
|
|
38
|
+
|
|
39
|
+
## Capabilities
|
|
40
|
+
- Capability 1
|
|
41
|
+
- Capability 2
|
|
42
|
+
|
|
43
|
+
## Skills
|
|
44
|
+
| Skill | Description |
|
|
45
|
+
|-------|-------------|
|
|
46
|
+
| skill-1 | What it does |
|
|
47
|
+
|
|
48
|
+
## Context
|
|
49
|
+
What the worker needs access to.
|
|
50
|
+
|
|
51
|
+
## Usage
|
|
52
|
+
How to invoke the worker.
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Project Documentation
|
|
56
|
+
```markdown
|
|
57
|
+
# Project Name
|
|
58
|
+
|
|
59
|
+
## Overview
|
|
60
|
+
Brief description.
|
|
61
|
+
|
|
62
|
+
## Structure
|
|
63
|
+
Key directories and files.
|
|
64
|
+
|
|
65
|
+
## Conventions
|
|
66
|
+
Project-specific patterns.
|
|
67
|
+
|
|
68
|
+
## Learnings
|
|
69
|
+
Link to learnings directory.
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Output
|
|
73
|
+
|
|
74
|
+
- List of files updated
|
|
75
|
+
- Summary of changes
|
|
76
|
+
- Warnings for missing documentation
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# update-patterns
|
|
2
|
+
|
|
3
|
+
Update or create reusable patterns in the knowledge base.
|
|
4
|
+
|
|
5
|
+
## Arguments
|
|
6
|
+
|
|
7
|
+
`$ARGUMENTS` = `--category <category>` (required)
|
|
8
|
+
|
|
9
|
+
Optional:
|
|
10
|
+
- `--pattern <name>` - Specific pattern to update
|
|
11
|
+
- `--content <markdown>` - Pattern content
|
|
12
|
+
|
|
13
|
+
## Categories
|
|
14
|
+
|
|
15
|
+
- `backend` - Backend development patterns
|
|
16
|
+
- `frontend` - Frontend development patterns
|
|
17
|
+
- `database` - Database patterns
|
|
18
|
+
- `infra` - Infrastructure patterns
|
|
19
|
+
- `testing` - Testing patterns
|
|
20
|
+
- `security` - Security patterns
|
|
21
|
+
|
|
22
|
+
## Process
|
|
23
|
+
|
|
24
|
+
1. Read existing patterns in category
|
|
25
|
+
2. Identify where new pattern fits:
|
|
26
|
+
- New file
|
|
27
|
+
- Addition to existing file
|
|
28
|
+
- Replacement of outdated pattern
|
|
29
|
+
3. Format pattern with:
|
|
30
|
+
- Title
|
|
31
|
+
- When to use
|
|
32
|
+
- Implementation example
|
|
33
|
+
- Caveats/gotchas
|
|
34
|
+
4. Present to human for approval
|
|
35
|
+
5. Write pattern
|
|
36
|
+
|
|
37
|
+
## Pattern Format
|
|
38
|
+
|
|
39
|
+
```markdown
|
|
40
|
+
## Pattern Name
|
|
41
|
+
|
|
42
|
+
### When to Use
|
|
43
|
+
- Situation A
|
|
44
|
+
- Situation B
|
|
45
|
+
|
|
46
|
+
### Implementation
|
|
47
|
+
|
|
48
|
+
\`\`\`typescript
|
|
49
|
+
// Example code
|
|
50
|
+
\`\`\`
|
|
51
|
+
|
|
52
|
+
### Caveats
|
|
53
|
+
- Important consideration 1
|
|
54
|
+
- Important consideration 2
|
|
55
|
+
|
|
56
|
+
### Related Patterns
|
|
57
|
+
- [Other Pattern](link)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Output
|
|
61
|
+
|
|
62
|
+
- Pattern file created/updated
|
|
63
|
+
- Summary of changes
|