@cubis/foundry 0.3.32 → 0.3.34
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 +30 -0
- package/README.md +23 -0
- package/bin/cubis.js +461 -37
- package/mcp/README.md +17 -0
- package/mcp/catalogs/default.json +14 -0
- package/mcp/powers/atlassian-mcp/POWER.md +91 -0
- package/mcp/powers/atlassian-mcp/SKILL.md +88 -0
- package/mcp/powers/building-mcp-server-on-cloudflare/POWER.md +261 -0
- package/mcp/powers/building-mcp-server-on-cloudflare/SKILL.md +258 -0
- package/mcp/powers/datadog-automation/POWER.md +238 -0
- package/mcp/powers/datadog-automation/SKILL.md +235 -0
- package/mcp/powers/github-automation/POWER.md +230 -0
- package/mcp/powers/github-automation/SKILL.md +227 -0
- package/mcp/powers/mcp-builder/POWER.md +179 -0
- package/mcp/powers/mcp-builder/SKILL.md +176 -0
- package/mcp/powers/mcp-developer/POWER.md +88 -0
- package/mcp/powers/mcp-developer/SKILL.md +85 -0
- package/mcp/powers/postman/POWER.md +243 -0
- package/mcp/powers/postman/SKILL.md +240 -0
- package/mcp/powers/sentry-automation/POWER.md +235 -0
- package/mcp/powers/sentry-automation/SKILL.md +232 -0
- package/mcp/skills/atlassian-mcp/SKILL.md +88 -0
- package/mcp/skills/building-mcp-server-on-cloudflare/SKILL.md +258 -0
- package/mcp/skills/datadog-automation/SKILL.md +235 -0
- package/mcp/skills/github-automation/SKILL.md +227 -0
- package/mcp/skills/mcp-builder/SKILL.md +176 -0
- package/mcp/skills/mcp-developer/SKILL.md +85 -0
- package/mcp/skills/postman/SKILL.md +240 -0
- package/mcp/skills/sentry-automation/SKILL.md +232 -0
- package/package.json +2 -1
- package/workflows/powers/architecture/POWER.md +12 -46
- package/workflows/powers/architecture/SKILL.md +12 -46
- package/workflows/powers/atlassian-mcp/POWER.md +11 -81
- package/workflows/powers/atlassian-mcp/SKILL.md +11 -81
- package/workflows/powers/building-mcp-server-on-cloudflare/POWER.md +12 -252
- package/workflows/powers/building-mcp-server-on-cloudflare/SKILL.md +12 -252
- package/workflows/powers/code-review-checklist/POWER.md +11 -99
- package/workflows/powers/code-review-checklist/SKILL.md +11 -99
- package/workflows/powers/csharp-pro/POWER.md +43 -0
- package/workflows/powers/csharp-pro/SKILL.md +40 -0
- package/workflows/powers/database-design/POWER.md +47 -5
- package/workflows/powers/database-design/SKILL.md +45 -4
- package/workflows/powers/database-optimizer/POWER.md +11 -23
- package/workflows/powers/database-optimizer/SKILL.md +5 -5
- package/workflows/powers/datadog-automation/POWER.md +12 -229
- package/workflows/powers/datadog-automation/SKILL.md +12 -229
- package/workflows/powers/debugging-wizard/POWER.md +12 -78
- package/workflows/powers/debugging-wizard/SKILL.md +12 -78
- package/workflows/powers/deployment-procedures/POWER.md +11 -231
- package/workflows/powers/deployment-procedures/SKILL.md +11 -231
- package/workflows/powers/drift-flutter/POWER.md +51 -0
- package/workflows/powers/drift-flutter/SKILL.md +2 -2
- package/workflows/powers/github-automation/POWER.md +12 -221
- package/workflows/powers/github-automation/SKILL.md +12 -221
- package/workflows/powers/golang-pro/POWER.md +38 -66
- package/workflows/powers/golang-pro/SKILL.md +38 -66
- package/workflows/powers/java-pro/POWER.md +43 -0
- package/workflows/powers/java-pro/SKILL.md +40 -0
- package/workflows/powers/javascript-pro/POWER.md +37 -67
- package/workflows/powers/javascript-pro/SKILL.md +37 -67
- package/workflows/powers/kotlin-pro/POWER.md +43 -0
- package/workflows/powers/kotlin-pro/SKILL.md +40 -0
- package/workflows/powers/mcp-builder/POWER.md +12 -170
- package/workflows/powers/mcp-builder/SKILL.md +12 -170
- package/workflows/powers/mcp-developer/POWER.md +11 -78
- package/workflows/powers/mcp-developer/SKILL.md +11 -78
- package/workflows/powers/nextjs-developer/POWER.md +41 -148
- package/workflows/powers/nextjs-developer/SKILL.md +41 -148
- package/workflows/powers/nextjs-react-expert/POWER.md +10 -281
- package/workflows/powers/nextjs-react-expert/SKILL.md +10 -281
- package/workflows/powers/nodejs-best-practices/POWER.md +33 -317
- package/workflows/powers/nodejs-best-practices/SKILL.md +33 -317
- package/workflows/powers/postman/POWER.md +11 -233
- package/workflows/powers/postman/SKILL.md +11 -233
- package/workflows/powers/python-patterns/POWER.md +11 -431
- package/workflows/powers/python-patterns/SKILL.md +11 -431
- package/workflows/powers/python-pro/POWER.md +38 -66
- package/workflows/powers/python-pro/SKILL.md +38 -66
- package/workflows/powers/react-best-practices/POWER.md +35 -118
- package/workflows/powers/react-best-practices/SKILL.md +35 -118
- package/workflows/powers/react-expert/POWER.md +38 -66
- package/workflows/powers/react-expert/SKILL.md +38 -66
- package/workflows/powers/rust-engineer/POWER.md +10 -75
- package/workflows/powers/rust-engineer/SKILL.md +10 -75
- package/workflows/powers/rust-pro/POWER.md +36 -163
- package/workflows/powers/rust-pro/SKILL.md +36 -163
- package/workflows/powers/sentry-automation/POWER.md +12 -226
- package/workflows/powers/sentry-automation/SKILL.md +12 -226
- package/workflows/powers/server-management/POWER.md +11 -151
- package/workflows/powers/server-management/SKILL.md +11 -151
- package/workflows/powers/tdd-workflow/POWER.md +12 -140
- package/workflows/powers/tdd-workflow/SKILL.md +12 -140
- package/workflows/powers/testing-patterns/POWER.md +11 -168
- package/workflows/powers/testing-patterns/SKILL.md +11 -168
- package/workflows/powers/typescript-pro/POWER.md +43 -70
- package/workflows/powers/typescript-pro/SKILL.md +43 -70
- package/workflows/powers/vercel-ai/POWER.md +43 -0
- package/workflows/powers/vercel-ai/SKILL.md +40 -0
- package/workflows/powers/vercel-ai-gateway/POWER.md +11 -69
- package/workflows/powers/vercel-ai-gateway/SKILL.md +11 -69
- package/workflows/powers/vercel-ai-sdk/POWER.md +11 -49
- package/workflows/powers/vercel-ai-sdk/SKILL.md +11 -49
- package/workflows/powers/vercel-caching/POWER.md +10 -72
- package/workflows/powers/vercel-caching/SKILL.md +10 -72
- package/workflows/powers/vercel-cli/POWER.md +11 -75
- package/workflows/powers/vercel-cli/SKILL.md +11 -75
- package/workflows/powers/vercel-delivery/POWER.md +45 -0
- package/workflows/powers/vercel-delivery/SKILL.md +42 -0
- package/workflows/powers/vercel-deployments/POWER.md +10 -90
- package/workflows/powers/vercel-deployments/SKILL.md +10 -90
- package/workflows/powers/vercel-domains/POWER.md +10 -69
- package/workflows/powers/vercel-domains/SKILL.md +10 -69
- package/workflows/powers/vercel-firewall/POWER.md +10 -61
- package/workflows/powers/vercel-firewall/SKILL.md +10 -61
- package/workflows/powers/vercel-flags/POWER.md +10 -62
- package/workflows/powers/vercel-flags/SKILL.md +10 -62
- package/workflows/powers/vercel-functions/POWER.md +10 -70
- package/workflows/powers/vercel-functions/SKILL.md +10 -70
- package/workflows/powers/vercel-routing/POWER.md +10 -68
- package/workflows/powers/vercel-routing/SKILL.md +10 -68
- package/workflows/powers/vercel-runtime/POWER.md +43 -0
- package/workflows/powers/vercel-runtime/SKILL.md +40 -0
- package/workflows/powers/vercel-security/POWER.md +43 -0
- package/workflows/powers/vercel-security/SKILL.md +40 -0
- package/workflows/powers/vulnerability-scanner/POWER.md +11 -266
- package/workflows/powers/vulnerability-scanner/SKILL.md +11 -266
- package/workflows/scripts/generate-powers.mjs +95 -202
- package/workflows/skills/atlassian-mcp/SKILL.md +11 -81
- package/workflows/skills/building-mcp-server-on-cloudflare/SKILL.md +12 -252
- package/workflows/skills/catalogs/core.json +30 -0
- package/workflows/skills/catalogs/web-backend.json +70 -0
- package/workflows/skills/csharp-pro/SKILL.md +40 -0
- package/workflows/skills/datadog-automation/SKILL.md +12 -229
- package/workflows/skills/github-automation/SKILL.md +12 -221
- package/workflows/skills/golang-pro/SKILL.md +38 -66
- package/workflows/skills/java-pro/SKILL.md +40 -0
- package/workflows/skills/javascript-pro/SKILL.md +37 -67
- package/workflows/skills/kotlin-pro/SKILL.md +40 -0
- package/workflows/skills/mcp-builder/SKILL.md +12 -170
- package/workflows/skills/mcp-developer/SKILL.md +11 -78
- package/workflows/skills/nextjs-developer/SKILL.md +41 -148
- package/workflows/skills/nextjs-react-expert/SKILL.md +5 -11
- package/workflows/skills/nodejs-best-practices/SKILL.md +33 -317
- package/workflows/skills/postman/SKILL.md +11 -233
- package/workflows/skills/python-pro/SKILL.md +38 -66
- package/workflows/skills/react-best-practices/SKILL.md +35 -118
- package/workflows/skills/react-expert/SKILL.md +38 -66
- package/workflows/skills/rust-pro/SKILL.md +36 -163
- package/workflows/skills/sentry-automation/SKILL.md +12 -226
- package/workflows/skills/skills_index.json +43 -57
- package/workflows/skills/typescript-pro/SKILL.md +43 -70
- package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/backend-specialist.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/code-archaeologist.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/database-architect.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/debugger.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/devops-engineer.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/documentation-writer.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/explorer-agent.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/frontend-specialist.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/game-developer.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/mobile-developer.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/orchestrator.md +28 -400
- package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/penetration-tester.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/performance-optimizer.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/product-manager.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/product-owner.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/project-planner.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/qa-automation-engineer.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/security-auditor.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/seo-specialist.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/test-engineer.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/vercel-expert.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/antigravity/rules/GEMINI.md +7 -6
- package/workflows/workflows/agent-environment-setup/platforms/codex/agents/backend-specialist.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/codex/agents/code-archaeologist.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/codex/agents/database-architect.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/codex/agents/debugger.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/codex/agents/devops-engineer.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/codex/agents/documentation-writer.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/codex/agents/explorer-agent.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/codex/agents/frontend-specialist.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/codex/agents/game-developer.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/codex/agents/mobile-developer.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/codex/agents/orchestrator.md +28 -400
- package/workflows/workflows/agent-environment-setup/platforms/codex/agents/penetration-tester.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/codex/agents/performance-optimizer.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/codex/agents/product-manager.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/codex/agents/product-owner.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/codex/agents/project-planner.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/codex/agents/qa-automation-engineer.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/codex/agents/security-auditor.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/codex/agents/seo-specialist.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/codex/agents/test-engineer.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/codex/agents/vercel-expert.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/codex/rules/AGENTS.md +7 -6
- package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/backend-specialist.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/code-archaeologist.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/database-architect.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/debugger.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/devops-engineer.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/documentation-writer.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/explorer-agent.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/frontend-specialist.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/game-developer.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/mobile-developer.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/orchestrator.md +28 -400
- package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/penetration-tester.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/performance-optimizer.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/product-manager.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/product-owner.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/project-planner.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/qa-automation-engineer.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/security-auditor.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/seo-specialist.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/test-engineer.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/vercel-expert.md +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/copilot/rules/AGENTS.md +7 -6
- package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/csharp-pro/SKILL.md +40 -0
- package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/golang-pro/SKILL.md +38 -66
- package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/java-pro/SKILL.md +40 -0
- package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/javascript-pro/SKILL.md +37 -67
- package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/kotlin-pro/SKILL.md +40 -0
- package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/nextjs-developer/SKILL.md +41 -148
- package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/nextjs-react-expert/SKILL.md +6 -12
- package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/nodejs-best-practices/SKILL.md +33 -317
- package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/python-pro/SKILL.md +38 -66
- package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/react-best-practices/SKILL.md +35 -118
- package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/react-expert/SKILL.md +38 -66
- package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/rust-pro/SKILL.md +36 -163
- package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/skills_index.json +43 -57
- package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/typescript-pro/SKILL.md +43 -70
- package/workflows/workflows/agent-environment-setup/platforms/cursor/skills/csharp-pro/SKILL.md +40 -0
- package/workflows/workflows/agent-environment-setup/platforms/cursor/skills/golang-pro/SKILL.md +38 -66
- package/workflows/workflows/agent-environment-setup/platforms/cursor/skills/java-pro/SKILL.md +40 -0
- package/workflows/workflows/agent-environment-setup/platforms/cursor/skills/javascript-pro/SKILL.md +37 -67
- package/workflows/workflows/agent-environment-setup/platforms/cursor/skills/kotlin-pro/SKILL.md +40 -0
- package/workflows/workflows/agent-environment-setup/platforms/cursor/skills/nextjs-developer/SKILL.md +41 -148
- package/workflows/workflows/agent-environment-setup/platforms/cursor/skills/nextjs-react-expert/SKILL.md +6 -12
- package/workflows/workflows/agent-environment-setup/platforms/cursor/skills/nodejs-best-practices/SKILL.md +33 -317
- package/workflows/workflows/agent-environment-setup/platforms/cursor/skills/python-pro/SKILL.md +38 -66
- package/workflows/workflows/agent-environment-setup/platforms/cursor/skills/react-best-practices/SKILL.md +35 -118
- package/workflows/workflows/agent-environment-setup/platforms/cursor/skills/react-expert/SKILL.md +38 -66
- package/workflows/workflows/agent-environment-setup/platforms/cursor/skills/rust-pro/SKILL.md +36 -163
- package/workflows/workflows/agent-environment-setup/platforms/cursor/skills/skills_index.json +43 -57
- package/workflows/workflows/agent-environment-setup/platforms/cursor/skills/typescript-pro/SKILL.md +43 -70
- package/workflows/workflows/agent-environment-setup/platforms/windsurf/skills/csharp-pro/SKILL.md +40 -0
- package/workflows/workflows/agent-environment-setup/platforms/windsurf/skills/golang-pro/SKILL.md +38 -66
- package/workflows/workflows/agent-environment-setup/platforms/windsurf/skills/java-pro/SKILL.md +40 -0
- package/workflows/workflows/agent-environment-setup/platforms/windsurf/skills/javascript-pro/SKILL.md +37 -67
- package/workflows/workflows/agent-environment-setup/platforms/windsurf/skills/kotlin-pro/SKILL.md +40 -0
- package/workflows/workflows/agent-environment-setup/platforms/windsurf/skills/nextjs-developer/SKILL.md +41 -148
- package/workflows/workflows/agent-environment-setup/platforms/windsurf/skills/nextjs-react-expert/SKILL.md +6 -12
- package/workflows/workflows/agent-environment-setup/platforms/windsurf/skills/nodejs-best-practices/SKILL.md +33 -317
- package/workflows/workflows/agent-environment-setup/platforms/windsurf/skills/python-pro/SKILL.md +38 -66
- package/workflows/workflows/agent-environment-setup/platforms/windsurf/skills/react-best-practices/SKILL.md +35 -118
- package/workflows/workflows/agent-environment-setup/platforms/windsurf/skills/react-expert/SKILL.md +38 -66
- package/workflows/workflows/agent-environment-setup/platforms/windsurf/skills/rust-pro/SKILL.md +36 -163
- package/workflows/workflows/agent-environment-setup/platforms/windsurf/skills/skills_index.json +43 -57
- package/workflows/workflows/agent-environment-setup/platforms/windsurf/skills/typescript-pro/SKILL.md +43 -70
- package/workflows/workflows/agent-environment-setup/shared/agents/backend-specialist.md +1 -1
- package/workflows/workflows/agent-environment-setup/shared/agents/code-archaeologist.md +1 -1
- package/workflows/workflows/agent-environment-setup/shared/agents/database-architect.md +1 -1
- package/workflows/workflows/agent-environment-setup/shared/agents/debugger.md +1 -1
- package/workflows/workflows/agent-environment-setup/shared/agents/devops-engineer.md +1 -1
- package/workflows/workflows/agent-environment-setup/shared/agents/documentation-writer.md +1 -1
- package/workflows/workflows/agent-environment-setup/shared/agents/explorer-agent.md +1 -1
- package/workflows/workflows/agent-environment-setup/shared/agents/frontend-specialist.md +1 -1
- package/workflows/workflows/agent-environment-setup/shared/agents/game-developer.md +1 -1
- package/workflows/workflows/agent-environment-setup/shared/agents/mobile-developer.md +1 -1
- package/workflows/workflows/agent-environment-setup/shared/agents/orchestrator.md +28 -400
- package/workflows/workflows/agent-environment-setup/shared/agents/penetration-tester.md +1 -1
- package/workflows/workflows/agent-environment-setup/shared/agents/performance-optimizer.md +1 -1
- package/workflows/workflows/agent-environment-setup/shared/agents/product-manager.md +1 -1
- package/workflows/workflows/agent-environment-setup/shared/agents/product-owner.md +1 -1
- package/workflows/workflows/agent-environment-setup/shared/agents/project-planner.md +1 -1
- package/workflows/workflows/agent-environment-setup/shared/agents/qa-automation-engineer.md +1 -1
- package/workflows/workflows/agent-environment-setup/shared/agents/security-auditor.md +1 -1
- package/workflows/workflows/agent-environment-setup/shared/agents/seo-specialist.md +1 -1
- package/workflows/workflows/agent-environment-setup/shared/agents/test-engineer.md +1 -1
- package/workflows/workflows/agent-environment-setup/shared/agents/vercel-expert.md +1 -1
- package/workflows/powers/sub-agents/scripts/run_subagent.py.bak +0 -512
- /package/{workflows → mcp}/powers/atlassian-mcp/steering/authentication-patterns.md +0 -0
- /package/{workflows → mcp}/powers/atlassian-mcp/steering/common-workflows.md +0 -0
- /package/{workflows → mcp}/powers/atlassian-mcp/steering/confluence-operations.md +0 -0
- /package/{workflows → mcp}/powers/atlassian-mcp/steering/jira-queries.md +0 -0
- /package/{workflows → mcp}/powers/atlassian-mcp/steering/mcp-server-setup.md +0 -0
- /package/{workflows → mcp}/powers/building-mcp-server-on-cloudflare/steering/examples.md +0 -0
- /package/{workflows → mcp}/powers/building-mcp-server-on-cloudflare/steering/oauth-setup.md +0 -0
- /package/{workflows → mcp}/powers/building-mcp-server-on-cloudflare/steering/troubleshooting.md +0 -0
- /package/{workflows → mcp}/powers/mcp-builder/LICENSE.txt +0 -0
- /package/{workflows → mcp}/powers/mcp-builder/reference/evaluation.md +0 -0
- /package/{workflows → mcp}/powers/mcp-builder/reference/mcp_best_practices.md +0 -0
- /package/{workflows → mcp}/powers/mcp-builder/reference/node_mcp_server.md +0 -0
- /package/{workflows → mcp}/powers/mcp-builder/reference/python_mcp_server.md +0 -0
- /package/{workflows → mcp}/powers/mcp-builder/scripts/connections.py +0 -0
- /package/{workflows → mcp}/powers/mcp-builder/scripts/evaluation.py +0 -0
- /package/{workflows → mcp}/powers/mcp-builder/scripts/example_evaluation.xml +0 -0
- /package/{workflows → mcp}/powers/mcp-builder/scripts/requirements.txt +0 -0
- /package/{workflows → mcp}/powers/mcp-developer/steering/protocol.md +0 -0
- /package/{workflows → mcp}/powers/mcp-developer/steering/python-sdk.md +0 -0
- /package/{workflows → mcp}/powers/mcp-developer/steering/resources.md +0 -0
- /package/{workflows → mcp}/powers/mcp-developer/steering/tools.md +0 -0
- /package/{workflows → mcp}/powers/mcp-developer/steering/typescript-sdk.md +0 -0
- /package/{workflows → mcp}/powers/postman/flutter-expert/POWER.md +0 -0
- /package/{workflows → mcp}/powers/postman/flutter-expert/SKILL.md +0 -0
- /package/{workflows → mcp}/powers/postman/flutter-expert/steering/bloc-state.md +0 -0
- /package/{workflows → mcp}/powers/postman/flutter-expert/steering/engineering-principles.md +0 -0
- /package/{workflows → mcp}/powers/postman/flutter-expert/steering/gorouter-navigation.md +0 -0
- /package/{workflows → mcp}/powers/postman/flutter-expert/steering/performance.md +0 -0
- /package/{workflows → mcp}/powers/postman/flutter-expert/steering/project-structure.md +0 -0
- /package/{workflows → mcp}/powers/postman/flutter-expert/steering/riverpod-state.md +0 -0
- /package/{workflows → mcp}/powers/postman/flutter-expert/steering/widget-patterns.md +0 -0
- /package/{workflows → mcp}/powers/postman/flutter-security-reviewer/POWER.md +0 -0
- /package/{workflows → mcp}/powers/postman/flutter-security-reviewer/SKILL.md +0 -0
- /package/{workflows → mcp}/powers/postman/flutter-security-reviewer/steering/log_redaction.md +0 -0
- /package/{workflows → mcp}/powers/postman/flutter-security-reviewer/steering/network_hardening.md +0 -0
- /package/{workflows → mcp}/powers/postman/flutter-security-reviewer/steering/secret-scanning.md +0 -0
- /package/{workflows → mcp}/powers/postman/flutter-security-reviewer/steering/secure_storage_policy.md +0 -0
- /package/{workflows → mcp}/powers/postman/flutter-security-reviewer/steering/vulnerability-patterns.md +0 -0
- /package/{workflows → mcp}/powers/postman/flutter-security-reviewer/templates/security_review_response.md +0 -0
- /package/{workflows → mcp}/powers/postman/flutter-test-master/POWER.md +0 -0
- /package/{workflows → mcp}/powers/postman/flutter-test-master/SKILL.md +0 -0
- /package/{workflows → mcp}/powers/postman/flutter-test-master/steering/golden-testing.md +0 -0
- /package/{workflows → mcp}/powers/postman/flutter-test-master/steering/integration-testing.md +0 -0
- /package/{workflows → mcp}/powers/postman/flutter-test-master/steering/property-testing.md +0 -0
- /package/{workflows → mcp}/powers/postman/flutter-test-master/steering/riverpod-testing.md +0 -0
- /package/{workflows → mcp}/powers/postman/flutter-test-master/steering/test-utilities.md +0 -0
- /package/{workflows → mcp}/powers/postman/flutter-test-master/steering/unit-testing.md +0 -0
- /package/{workflows → mcp}/powers/postman/flutter-test-master/steering/widget-testing.md +0 -0
- /package/{workflows → mcp}/powers/postman/git-commit/POWER.md +0 -0
- /package/{workflows → mcp}/powers/postman/git-commit/SKILL.md +0 -0
- /package/{workflows → mcp}/powers/postman/gorouter-restoration/POWER.md +0 -0
- /package/{workflows → mcp}/powers/postman/gorouter-restoration/SKILL.md +0 -0
- /package/{workflows → mcp}/powers/postman/gorouter-restoration/steering/guard_patterns.md +0 -0
- /package/{workflows → mcp}/powers/postman/gorouter-restoration/steering/tab_preservation.md +0 -0
- /package/{workflows → mcp}/powers/postman/gorouter-restoration/templates/guard_redirect.md +0 -0
- /package/{workflows → mcp}/powers/postman/gorouter-restoration/templates/stateful_shell_skeleton.md +0 -0
- /package/{workflows → mcp}/powers/postman/mcp.json +0 -0
- /package/{workflows → mcp}/powers/postman/microservices-architect/POWER.md +0 -0
- /package/{workflows → mcp}/powers/postman/microservices-architect/SKILL.md +0 -0
- /package/{workflows → mcp}/powers/postman/microservices-architect/steering/communication.md +0 -0
- /package/{workflows → mcp}/powers/postman/microservices-architect/steering/data.md +0 -0
- /package/{workflows → mcp}/powers/postman/microservices-architect/steering/decomposition.md +0 -0
- /package/{workflows → mcp}/powers/postman/microservices-architect/steering/observability.md +0 -0
- /package/{workflows → mcp}/powers/postman/microservices-architect/steering/patterns.md +0 -0
- /package/{workflows → mcp}/powers/postman/nestjs-expert/POWER.md +0 -0
- /package/{workflows → mcp}/powers/postman/nestjs-expert/SKILL.md +0 -0
- /package/{workflows → mcp}/powers/postman/nestjs-expert/steering/authentication.md +0 -0
- /package/{workflows → mcp}/powers/postman/nestjs-expert/steering/controllers-routing.md +0 -0
- /package/{workflows → mcp}/powers/postman/nestjs-expert/steering/dtos-validation.md +0 -0
- /package/{workflows → mcp}/powers/postman/nestjs-expert/steering/migration-from-express.md +0 -0
- /package/{workflows → mcp}/powers/postman/nestjs-expert/steering/secure-sessions.md +0 -0
- /package/{workflows → mcp}/powers/postman/nestjs-expert/steering/services-di.md +0 -0
- /package/{workflows → mcp}/powers/postman/nestjs-expert/steering/strangler-fig-pattern.md +0 -0
- /package/{workflows → mcp}/powers/postman/nestjs-expert/steering/testing-patterns.md +0 -0
- /package/{workflows → mcp}/powers/postman/oneup-design/POWER.md +0 -0
- /package/{workflows → mcp}/powers/postman/oneup-design/SKILL.md +0 -0
- /package/{workflows → mcp}/powers/postman/oneup-design/steering/colors.md +0 -0
- /package/{workflows → mcp}/powers/postman/oneup-design/steering/components.md +0 -0
- /package/{workflows → mcp}/powers/postman/oneup-design/steering/spacing.md +0 -0
- /package/{workflows → mcp}/powers/postman/openapi-docs/POWER.md +0 -0
- /package/{workflows → mcp}/powers/postman/openapi-docs/SKILL.md +0 -0
- /package/{workflows → mcp}/powers/postman/openapi-docs/steering/crud-templates.md +0 -0
- /package/{workflows → mcp}/powers/postman/openapi-docs/steering/framework-express.md +0 -0
- /package/{workflows → mcp}/powers/postman/openapi-docs/steering/framework-fastapi.md +0 -0
- /package/{workflows → mcp}/powers/postman/openapi-docs/steering/framework-nestjs.md +0 -0
- /package/{workflows → mcp}/powers/postman/openapi-docs/steering/framework-raw-openapi.md +0 -0
- /package/{workflows → mcp}/powers/postman/openapi-docs/steering/openapi-checklist.md +0 -0
- /package/{workflows → mcp}/powers/postman/openapi-docs/steering/stoplight-ui.md +0 -0
- /package/{workflows → mcp}/powers/postman/steering/steering.md +0 -0
- /package/{workflows → mcp}/skills/atlassian-mcp/references/authentication-patterns.md +0 -0
- /package/{workflows → mcp}/skills/atlassian-mcp/references/common-workflows.md +0 -0
- /package/{workflows → mcp}/skills/atlassian-mcp/references/confluence-operations.md +0 -0
- /package/{workflows → mcp}/skills/atlassian-mcp/references/jira-queries.md +0 -0
- /package/{workflows → mcp}/skills/atlassian-mcp/references/mcp-server-setup.md +0 -0
- /package/{workflows → mcp}/skills/building-mcp-server-on-cloudflare/references/examples.md +0 -0
- /package/{workflows → mcp}/skills/building-mcp-server-on-cloudflare/references/oauth-setup.md +0 -0
- /package/{workflows → mcp}/skills/building-mcp-server-on-cloudflare/references/tool-patterns.md +0 -0
- /package/{workflows → mcp}/skills/building-mcp-server-on-cloudflare/references/troubleshooting.md +0 -0
- /package/{workflows → mcp}/skills/mcp-builder/LICENSE.txt +0 -0
- /package/{workflows → mcp}/skills/mcp-builder/reference/evaluation.md +0 -0
- /package/{workflows → mcp}/skills/mcp-builder/reference/mcp_best_practices.md +0 -0
- /package/{workflows → mcp}/skills/mcp-builder/reference/node_mcp_server.md +0 -0
- /package/{workflows → mcp}/skills/mcp-builder/reference/python_mcp_server.md +0 -0
- /package/{workflows → mcp}/skills/mcp-builder/scripts/connections.py +0 -0
- /package/{workflows → mcp}/skills/mcp-builder/scripts/evaluation.py +0 -0
- /package/{workflows → mcp}/skills/mcp-builder/scripts/example_evaluation.xml +0 -0
- /package/{workflows → mcp}/skills/mcp-builder/scripts/requirements.txt +0 -0
- /package/{workflows → mcp}/skills/mcp-developer/references/protocol.md +0 -0
- /package/{workflows → mcp}/skills/mcp-developer/references/python-sdk.md +0 -0
- /package/{workflows → mcp}/skills/mcp-developer/references/resources.md +0 -0
- /package/{workflows → mcp}/skills/mcp-developer/references/tools.md +0 -0
- /package/{workflows → mcp}/skills/mcp-developer/references/typescript-sdk.md +0 -0
- /package/{workflows → mcp}/skills/postman/POWER.md +0 -0
- /package/{workflows → mcp}/skills/postman/flutter-expert/POWER.md +0 -0
- /package/{workflows → mcp}/skills/postman/flutter-expert/SKILL.md +0 -0
- /package/{workflows → mcp}/skills/postman/flutter-expert/references/bloc-state.md +0 -0
- /package/{workflows → mcp}/skills/postman/flutter-expert/references/engineering-principles.md +0 -0
- /package/{workflows → mcp}/skills/postman/flutter-expert/references/gorouter-navigation.md +0 -0
- /package/{workflows → mcp}/skills/postman/flutter-expert/references/performance.md +0 -0
- /package/{workflows → mcp}/skills/postman/flutter-expert/references/project-structure.md +0 -0
- /package/{workflows → mcp}/skills/postman/flutter-expert/references/riverpod-state.md +0 -0
- /package/{workflows → mcp}/skills/postman/flutter-expert/references/widget-patterns.md +0 -0
- /package/{workflows → mcp}/skills/postman/flutter-security-reviewer/POWER.md +0 -0
- /package/{workflows → mcp}/skills/postman/flutter-security-reviewer/SKILL.md +0 -0
- /package/{workflows → mcp}/skills/postman/flutter-security-reviewer/references/log_redaction.md +0 -0
- /package/{workflows → mcp}/skills/postman/flutter-security-reviewer/references/network_hardening.md +0 -0
- /package/{workflows → mcp}/skills/postman/flutter-security-reviewer/references/secret-scanning.md +0 -0
- /package/{workflows → mcp}/skills/postman/flutter-security-reviewer/references/secure_storage_policy.md +0 -0
- /package/{workflows → mcp}/skills/postman/flutter-security-reviewer/references/vulnerability-patterns.md +0 -0
- /package/{workflows → mcp}/skills/postman/flutter-security-reviewer/templates/security_review_response.md +0 -0
- /package/{workflows → mcp}/skills/postman/flutter-test-master/POWER.md +0 -0
- /package/{workflows → mcp}/skills/postman/flutter-test-master/SKILL.md +0 -0
- /package/{workflows → mcp}/skills/postman/flutter-test-master/references/golden-testing.md +0 -0
- /package/{workflows → mcp}/skills/postman/flutter-test-master/references/integration-testing.md +0 -0
- /package/{workflows → mcp}/skills/postman/flutter-test-master/references/property-testing.md +0 -0
- /package/{workflows → mcp}/skills/postman/flutter-test-master/references/riverpod-testing.md +0 -0
- /package/{workflows → mcp}/skills/postman/flutter-test-master/references/test-utilities.md +0 -0
- /package/{workflows → mcp}/skills/postman/flutter-test-master/references/unit-testing.md +0 -0
- /package/{workflows → mcp}/skills/postman/flutter-test-master/references/widget-testing.md +0 -0
- /package/{workflows → mcp}/skills/postman/git-commit/POWER.md +0 -0
- /package/{workflows → mcp}/skills/postman/git-commit/SKILL.md +0 -0
- /package/{workflows → mcp}/skills/postman/gorouter-restoration/POWER.md +0 -0
- /package/{workflows → mcp}/skills/postman/gorouter-restoration/SKILL.md +0 -0
- /package/{workflows → mcp}/skills/postman/gorouter-restoration/references/guard_patterns.md +0 -0
- /package/{workflows → mcp}/skills/postman/gorouter-restoration/references/tab_preservation.md +0 -0
- /package/{workflows → mcp}/skills/postman/gorouter-restoration/templates/guard_redirect.md +0 -0
- /package/{workflows → mcp}/skills/postman/gorouter-restoration/templates/stateful_shell_skeleton.md +0 -0
- /package/{workflows → mcp}/skills/postman/mcp.json +0 -0
- /package/{workflows → mcp}/skills/postman/microservices-architect/POWER.md +0 -0
- /package/{workflows → mcp}/skills/postman/microservices-architect/SKILL.md +0 -0
- /package/{workflows → mcp}/skills/postman/microservices-architect/references/communication.md +0 -0
- /package/{workflows → mcp}/skills/postman/microservices-architect/references/data.md +0 -0
- /package/{workflows → mcp}/skills/postman/microservices-architect/references/decomposition.md +0 -0
- /package/{workflows → mcp}/skills/postman/microservices-architect/references/observability.md +0 -0
- /package/{workflows → mcp}/skills/postman/microservices-architect/references/patterns.md +0 -0
- /package/{workflows → mcp}/skills/postman/nestjs-expert/POWER.md +0 -0
- /package/{workflows → mcp}/skills/postman/nestjs-expert/SKILL.md +0 -0
- /package/{workflows → mcp}/skills/postman/nestjs-expert/references/authentication.md +0 -0
- /package/{workflows → mcp}/skills/postman/nestjs-expert/references/controllers-routing.md +0 -0
- /package/{workflows → mcp}/skills/postman/nestjs-expert/references/dtos-validation.md +0 -0
- /package/{workflows → mcp}/skills/postman/nestjs-expert/references/migration-from-express.md +0 -0
- /package/{workflows → mcp}/skills/postman/nestjs-expert/references/secure-sessions.md +0 -0
- /package/{workflows → mcp}/skills/postman/nestjs-expert/references/services-di.md +0 -0
- /package/{workflows → mcp}/skills/postman/nestjs-expert/references/strangler-fig-pattern.md +0 -0
- /package/{workflows → mcp}/skills/postman/nestjs-expert/references/testing-patterns.md +0 -0
- /package/{workflows → mcp}/skills/postman/oneup-design/POWER.md +0 -0
- /package/{workflows → mcp}/skills/postman/oneup-design/SKILL.md +0 -0
- /package/{workflows → mcp}/skills/postman/oneup-design/references/colors.md +0 -0
- /package/{workflows → mcp}/skills/postman/oneup-design/references/components.md +0 -0
- /package/{workflows → mcp}/skills/postman/oneup-design/references/spacing.md +0 -0
- /package/{workflows → mcp}/skills/postman/openapi-docs/POWER.md +0 -0
- /package/{workflows → mcp}/skills/postman/openapi-docs/SKILL.md +0 -0
- /package/{workflows → mcp}/skills/postman/openapi-docs/references/crud-templates.md +0 -0
- /package/{workflows → mcp}/skills/postman/openapi-docs/references/framework-express.md +0 -0
- /package/{workflows → mcp}/skills/postman/openapi-docs/references/framework-fastapi.md +0 -0
- /package/{workflows → mcp}/skills/postman/openapi-docs/references/framework-nestjs.md +0 -0
- /package/{workflows → mcp}/skills/postman/openapi-docs/references/framework-raw-openapi.md +0 -0
- /package/{workflows → mcp}/skills/postman/openapi-docs/references/openapi-checklist.md +0 -0
- /package/{workflows → mcp}/skills/postman/openapi-docs/references/stoplight-ui.md +0 -0
- /package/{workflows → mcp}/skills/postman/references/steering.md +0 -0
|
@@ -1,336 +1,52 @@
|
|
|
1
1
|
````markdown
|
|
2
2
|
---
|
|
3
3
|
inclusion: manual
|
|
4
|
-
name: nodejs-best-practices
|
|
5
|
-
description:
|
|
6
|
-
|
|
4
|
+
name: "nodejs-best-practices"
|
|
5
|
+
description: "Decision framework for modern Node.js backend architecture, operations, and security using current LTS-era practices."
|
|
6
|
+
license: MIT
|
|
7
|
+
metadata:
|
|
8
|
+
version: "2.0.0"
|
|
9
|
+
domain: "backend"
|
|
10
|
+
role: "decision-guide"
|
|
11
|
+
stack: "nodejs"
|
|
12
|
+
baseline: "Node 22/24 LTS era"
|
|
7
13
|
---
|
|
8
14
|
|
|
9
15
|
# Node.js Best Practices
|
|
10
16
|
|
|
11
|
-
|
|
12
|
-
> **Learn to THINK, not memorize code patterns.**
|
|
17
|
+
## Purpose
|
|
13
18
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
## ⚠️ How to Use This Skill
|
|
17
|
-
|
|
18
|
-
This skill teaches **decision-making principles**, not fixed code to copy.
|
|
19
|
-
|
|
20
|
-
- ASK user for preferences when unclear
|
|
21
|
-
- Choose framework/pattern based on CONTEXT
|
|
22
|
-
- Don't default to same solution every time
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## 1. Framework Selection (2025)
|
|
27
|
-
|
|
28
|
-
### Decision Tree
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
What are you building?
|
|
32
|
-
│
|
|
33
|
-
├── Edge/Serverless (Cloudflare, Vercel)
|
|
34
|
-
│ └── Hono (zero-dependency, ultra-fast cold starts)
|
|
35
|
-
│
|
|
36
|
-
├── High Performance API
|
|
37
|
-
│ └── Fastify (2-3x faster than Express)
|
|
38
|
-
│
|
|
39
|
-
├── Enterprise/Team familiarity
|
|
40
|
-
│ └── NestJS (structured, DI, decorators)
|
|
41
|
-
│
|
|
42
|
-
├── Legacy/Stable/Maximum ecosystem
|
|
43
|
-
│ └── Express (mature, most middleware)
|
|
44
|
-
│
|
|
45
|
-
└── Full-stack with frontend
|
|
46
|
-
└── Next.js API Routes or tRPC
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
### Comparison Principles
|
|
50
|
-
|
|
51
|
-
| Factor | Hono | Fastify | Express |
|
|
52
|
-
|--------|------|---------|---------|
|
|
53
|
-
| **Best for** | Edge, serverless | Performance | Legacy, learning |
|
|
54
|
-
| **Cold start** | Fastest | Fast | Moderate |
|
|
55
|
-
| **Ecosystem** | Growing | Good | Largest |
|
|
56
|
-
| **TypeScript** | Native | Excellent | Good |
|
|
57
|
-
| **Learning curve** | Low | Medium | Low |
|
|
58
|
-
|
|
59
|
-
### Selection Questions to Ask:
|
|
60
|
-
1. What's the deployment target?
|
|
61
|
-
2. Is cold start time critical?
|
|
62
|
-
3. Does team have existing experience?
|
|
63
|
-
4. Is there legacy code to maintain?
|
|
64
|
-
|
|
65
|
-
---
|
|
66
|
-
|
|
67
|
-
## 2. Runtime Considerations (2025)
|
|
68
|
-
|
|
69
|
-
### Native TypeScript
|
|
70
|
-
|
|
71
|
-
```
|
|
72
|
-
Node.js 22+: --experimental-strip-types
|
|
73
|
-
├── Run .ts files directly
|
|
74
|
-
├── No build step needed for simple projects
|
|
75
|
-
└── Consider for: scripts, simple APIs
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
### Module System Decision
|
|
79
|
-
|
|
80
|
-
```
|
|
81
|
-
ESM (import/export)
|
|
82
|
-
├── Modern standard
|
|
83
|
-
├── Better tree-shaking
|
|
84
|
-
├── Async module loading
|
|
85
|
-
└── Use for: new projects
|
|
86
|
-
|
|
87
|
-
CommonJS (require)
|
|
88
|
-
├── Legacy compatibility
|
|
89
|
-
├── More npm packages support
|
|
90
|
-
└── Use for: existing codebases, some edge cases
|
|
91
|
-
```
|
|
19
|
+
Use this skill to choose the right Node backend patterns for the actual constraints of the task, not by habit.
|
|
92
20
|
|
|
93
|
-
|
|
21
|
+
## Decision flow
|
|
94
22
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
| **Deno** | Security-first, built-in TypeScript |
|
|
100
|
-
|
|
101
|
-
---
|
|
102
|
-
|
|
103
|
-
## 3. Architecture Principles
|
|
104
|
-
|
|
105
|
-
### Layered Structure Concept
|
|
106
|
-
|
|
107
|
-
```
|
|
108
|
-
Request Flow:
|
|
109
|
-
│
|
|
110
|
-
├── Controller/Route Layer
|
|
111
|
-
│ ├── Handles HTTP specifics
|
|
112
|
-
│ ├── Input validation at boundary
|
|
113
|
-
│ └── Calls service layer
|
|
114
|
-
│
|
|
115
|
-
├── Service Layer
|
|
116
|
-
│ ├── Business logic
|
|
117
|
-
│ ├── Framework-agnostic
|
|
118
|
-
│ └── Calls repository layer
|
|
119
|
-
│
|
|
120
|
-
└── Repository Layer
|
|
121
|
-
├── Data access only
|
|
122
|
-
├── Database queries
|
|
123
|
-
└── ORM interactions
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
### Why This Matters:
|
|
127
|
-
- **Testability**: Mock layers independently
|
|
128
|
-
- **Flexibility**: Swap database without touching business logic
|
|
129
|
-
- **Clarity**: Each layer has single responsibility
|
|
130
|
-
|
|
131
|
-
### When to Simplify:
|
|
132
|
-
- Small scripts → Single file OK
|
|
133
|
-
- Prototypes → Less structure acceptable
|
|
134
|
-
- Always ask: "Will this grow?"
|
|
135
|
-
|
|
136
|
-
---
|
|
137
|
-
|
|
138
|
-
## 4. Error Handling Principles
|
|
139
|
-
|
|
140
|
-
### Centralized Error Handling
|
|
141
|
-
|
|
142
|
-
```
|
|
143
|
-
Pattern:
|
|
144
|
-
├── Create custom error classes
|
|
145
|
-
├── Throw from any layer
|
|
146
|
-
├── Catch at top level (middleware)
|
|
147
|
-
└── Format consistent response
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
### Error Response Philosophy
|
|
151
|
-
|
|
152
|
-
```
|
|
153
|
-
Client gets:
|
|
154
|
-
├── Appropriate HTTP status
|
|
155
|
-
├── Error code for programmatic handling
|
|
156
|
-
├── User-friendly message
|
|
157
|
-
└── NO internal details (security!)
|
|
158
|
-
|
|
159
|
-
Logs get:
|
|
160
|
-
├── Full stack trace
|
|
161
|
-
├── Request context
|
|
162
|
-
├── User ID (if applicable)
|
|
163
|
-
└── Timestamp
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
### Status Code Selection
|
|
167
|
-
|
|
168
|
-
| Situation | Status | When |
|
|
169
|
-
|-----------|--------|------|
|
|
170
|
-
| Bad input | 400 | Client sent invalid data |
|
|
171
|
-
| No auth | 401 | Missing or invalid credentials |
|
|
172
|
-
| No permission | 403 | Valid auth, but not allowed |
|
|
173
|
-
| Not found | 404 | Resource doesn't exist |
|
|
174
|
-
| Conflict | 409 | Duplicate or state conflict |
|
|
175
|
-
| Validation | 422 | Schema valid but business rules fail |
|
|
176
|
-
| Server error | 500 | Our fault, log everything |
|
|
177
|
-
|
|
178
|
-
---
|
|
23
|
+
1. Clarify deployment target (container, serverless, edge).
|
|
24
|
+
2. Select framework/runtime shape based on latency and team constraints.
|
|
25
|
+
3. Define API, validation, auth, and observability boundaries.
|
|
26
|
+
4. Implement smallest safe slice, then harden.
|
|
179
27
|
|
|
180
|
-
##
|
|
28
|
+
## Core guidance
|
|
181
29
|
|
|
182
|
-
|
|
30
|
+
- Prefer typed boundaries (TypeScript + schema validation).
|
|
31
|
+
- Keep transport concerns out of business logic.
|
|
32
|
+
- Standardize error envelopes and correlation IDs.
|
|
33
|
+
- Enforce timeout, retry, and circuit-breaker strategy for downstream calls.
|
|
34
|
+
- Use graceful shutdown and health/readiness probes.
|
|
183
35
|
|
|
184
|
-
|
|
185
|
-
|---------|----------|
|
|
186
|
-
| `async/await` | Sequential async operations |
|
|
187
|
-
| `Promise.all` | Parallel independent operations |
|
|
188
|
-
| `Promise.allSettled` | Parallel where some can fail |
|
|
189
|
-
| `Promise.race` | Timeout or first response wins |
|
|
36
|
+
## Security and reliability
|
|
190
37
|
|
|
191
|
-
|
|
38
|
+
- Validate all request input before business logic.
|
|
39
|
+
- Use least-privilege credentials and secret rotation.
|
|
40
|
+
- Avoid blocking the event loop in request paths.
|
|
41
|
+
- Add rate limits and abuse controls on external endpoints.
|
|
192
42
|
|
|
193
|
-
|
|
194
|
-
I/O-bound (async helps):
|
|
195
|
-
├── Database queries
|
|
196
|
-
├── HTTP requests
|
|
197
|
-
├── File system
|
|
198
|
-
└── Network operations
|
|
43
|
+
## Performance
|
|
199
44
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
├── Complex calculations
|
|
204
|
-
└── → Use worker threads or offload
|
|
205
|
-
```
|
|
45
|
+
- Measure before optimizing.
|
|
46
|
+
- Profile CPU and heap in realistic workloads.
|
|
47
|
+
- Use streaming/backpressure for large I/O paths.
|
|
206
48
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
- Never use sync methods in production (fs.readFileSync, etc.)
|
|
210
|
-
- Offload CPU-intensive work
|
|
211
|
-
- Use streaming for large data
|
|
212
|
-
|
|
213
|
-
---
|
|
214
|
-
|
|
215
|
-
## 6. Validation Principles
|
|
216
|
-
|
|
217
|
-
### Validate at Boundaries
|
|
218
|
-
|
|
219
|
-
```
|
|
220
|
-
Where to validate:
|
|
221
|
-
├── API entry point (request body/params)
|
|
222
|
-
├── Before database operations
|
|
223
|
-
├── External data (API responses, file uploads)
|
|
224
|
-
└── Environment variables (startup)
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
### Validation Library Selection
|
|
228
|
-
|
|
229
|
-
| Library | Best For |
|
|
230
|
-
|---------|----------|
|
|
231
|
-
| **Zod** | TypeScript first, inference |
|
|
232
|
-
| **Valibot** | Smaller bundle (tree-shakeable) |
|
|
233
|
-
| **ArkType** | Performance critical |
|
|
234
|
-
| **Yup** | Existing React Form usage |
|
|
235
|
-
|
|
236
|
-
### Validation Philosophy
|
|
237
|
-
|
|
238
|
-
- Fail fast: Validate early
|
|
239
|
-
- Be specific: Clear error messages
|
|
240
|
-
- Don't trust: Even "internal" data
|
|
241
|
-
|
|
242
|
-
---
|
|
243
|
-
|
|
244
|
-
## 7. Security Principles
|
|
245
|
-
|
|
246
|
-
### Security Checklist (Not Code)
|
|
247
|
-
|
|
248
|
-
- [ ] **Input validation**: All inputs validated
|
|
249
|
-
- [ ] **Parameterized queries**: No string concatenation for SQL
|
|
250
|
-
- [ ] **Password hashing**: bcrypt or argon2
|
|
251
|
-
- [ ] **JWT verification**: Always verify signature and expiry
|
|
252
|
-
- [ ] **Rate limiting**: Protect from abuse
|
|
253
|
-
- [ ] **Security headers**: Helmet.js or equivalent
|
|
254
|
-
- [ ] **HTTPS**: Everywhere in production
|
|
255
|
-
- [ ] **CORS**: Properly configured
|
|
256
|
-
- [ ] **Secrets**: Environment variables only
|
|
257
|
-
- [ ] **Dependencies**: Regularly audited
|
|
258
|
-
|
|
259
|
-
### Security Mindset
|
|
260
|
-
|
|
261
|
-
```
|
|
262
|
-
Trust nothing:
|
|
263
|
-
├── Query params → validate
|
|
264
|
-
├── Request body → validate
|
|
265
|
-
├── Headers → verify
|
|
266
|
-
├── Cookies → validate
|
|
267
|
-
├── File uploads → scan
|
|
268
|
-
└── External APIs → validate response
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
---
|
|
272
|
-
|
|
273
|
-
## 8. Testing Principles
|
|
274
|
-
|
|
275
|
-
### Test Strategy Selection
|
|
276
|
-
|
|
277
|
-
| Type | Purpose | Tools |
|
|
278
|
-
|------|---------|-------|
|
|
279
|
-
| **Unit** | Business logic | node:test, Vitest |
|
|
280
|
-
| **Integration** | API endpoints | Supertest |
|
|
281
|
-
| **E2E** | Full flows | Playwright |
|
|
282
|
-
|
|
283
|
-
### What to Test (Priorities)
|
|
284
|
-
|
|
285
|
-
1. **Critical paths**: Auth, payments, core business
|
|
286
|
-
2. **Edge cases**: Empty inputs, boundaries
|
|
287
|
-
3. **Error handling**: What happens when things fail?
|
|
288
|
-
4. **Not worth testing**: Framework code, trivial getters
|
|
289
|
-
|
|
290
|
-
### Built-in Test Runner (Node.js 22+)
|
|
291
|
-
|
|
292
|
-
```
|
|
293
|
-
node --test src/**/*.test.ts
|
|
294
|
-
├── No external dependency
|
|
295
|
-
├── Good coverage reporting
|
|
296
|
-
└── Watch mode available
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
---
|
|
300
|
-
|
|
301
|
-
## 10. Anti-Patterns to Avoid
|
|
302
|
-
|
|
303
|
-
### ❌ DON'T:
|
|
304
|
-
- Use Express for new edge projects (use Hono)
|
|
305
|
-
- Use sync methods in production code
|
|
306
|
-
- Put business logic in controllers
|
|
307
|
-
- Skip input validation
|
|
308
|
-
- Hardcode secrets
|
|
309
|
-
- Trust external data without validation
|
|
310
|
-
- Block event loop with CPU work
|
|
311
|
-
|
|
312
|
-
### ✅ DO:
|
|
313
|
-
- Choose framework based on context
|
|
314
|
-
- Ask user for preferences when unclear
|
|
315
|
-
- Use layered architecture for growing projects
|
|
316
|
-
- Validate all inputs
|
|
317
|
-
- Use environment variables for secrets
|
|
318
|
-
- Profile before optimizing
|
|
319
|
-
|
|
320
|
-
---
|
|
321
|
-
|
|
322
|
-
## 11. Decision Checklist
|
|
323
|
-
|
|
324
|
-
Before implementing:
|
|
325
|
-
|
|
326
|
-
- [ ] **Asked user about stack preference?**
|
|
327
|
-
- [ ] **Chosen framework for THIS context?** (not just default)
|
|
328
|
-
- [ ] **Considered deployment target?**
|
|
329
|
-
- [ ] **Planned error handling strategy?**
|
|
330
|
-
- [ ] **Identified validation points?**
|
|
331
|
-
- [ ] **Considered security requirements?**
|
|
332
|
-
|
|
333
|
-
---
|
|
49
|
+
## Output expectation
|
|
334
50
|
|
|
335
|
-
|
|
51
|
+
Return concrete architecture choices with tradeoffs, then implementation steps and verification criteria.
|
|
336
52
|
````
|