@zenrick/zenkit 0.0.0-stage → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +19 -0
- package/.cursor-plugin/marketplace.json +22 -0
- package/INSTALL.md +73 -0
- package/LICENSE +202 -0
- package/NOTICE +5 -0
- package/README.md +69 -3
- package/TERMS.md +48 -0
- package/THIRD-PARTY-NOTICES.md +109 -0
- package/kit/agents/backend-specialist.md +263 -0
- package/kit/agents/code-archaeologist.md +106 -0
- package/kit/agents/database-architect.md +226 -0
- package/kit/agents/debugger.md +226 -0
- package/kit/agents/devops-engineer.md +242 -0
- package/kit/agents/documentation-writer.md +104 -0
- package/kit/agents/explorer-agent.md +73 -0
- package/kit/agents/frontend-specialist.md +593 -0
- package/kit/agents/game-developer.md +162 -0
- package/kit/agents/mobile-developer.md +377 -0
- package/kit/agents/orchestrator.md +489 -0
- package/kit/agents/penetration-tester.md +188 -0
- package/kit/agents/performance-optimizer.md +187 -0
- package/kit/agents/product-manager.md +112 -0
- package/kit/agents/product-owner.md +95 -0
- package/kit/agents/project-planner.md +409 -0
- package/kit/agents/qa-automation-engineer.md +103 -0
- package/kit/agents/security-auditor.md +170 -0
- package/kit/agents/seo-specialist.md +111 -0
- package/kit/agents/test-engineer.md +158 -0
- package/kit/bundles/agent-building.yaml +26 -0
- package/kit/bundles/backend-data.yaml +14 -0
- package/kit/bundles/base.yaml +10 -0
- package/kit/bundles/core.yaml +21 -0
- package/kit/bundles/kit-engenharia.yaml +8 -0
- package/kit/bundles/kit-lite.yaml +9 -0
- package/kit/bundles/security.yaml +11 -0
- package/kit/bundles/ship-run.yaml +16 -0
- package/kit/bundles/web-ui.yaml +18 -0
- package/kit/commands/docs.md +33 -0
- package/kit/commands/explain.md +41 -0
- package/kit/commands/fix.md +65 -0
- package/kit/commands/implement.md +35 -0
- package/kit/commands/refactor.md +59 -0
- package/kit/commands/review.md +55 -0
- package/kit/commands/test.md +63 -0
- package/kit/modules/bridge/rules/cross-ide-bridge.mdc +73 -0
- package/kit/modules/bridge/zenkit-layer.yaml +1 -0
- package/kit/modules/nexuscore/sections/convivencia.md +12 -0
- package/kit/modules/nexuscore/sections/memoria.md +9 -0
- package/kit/modules/nexuscore/skills/quadro-agentes/SKILL.md +186 -0
- package/kit/modules/nexuscore/zenkit-layer.yaml +1 -0
- package/kit/rules/ZENKIT.mdc +294 -0
- package/kit/rules/git.mdc +51 -0
- package/kit/rules/karpathy-guidelines.mdc +70 -0
- package/kit/rules/model-routing.mdc +89 -0
- package/kit/rules/security-headers.mdc +41 -0
- package/kit/rules/social-automation.mdc +69 -0
- package/kit/rules/toc.mdc +40 -0
- package/kit/skills/api-patterns/SKILL.md +95 -0
- package/kit/skills/api-patterns/api-style.md +42 -0
- package/kit/skills/api-patterns/auth.md +24 -0
- package/kit/skills/api-patterns/documentation.md +26 -0
- package/kit/skills/api-patterns/graphql.md +41 -0
- package/kit/skills/api-patterns/rate-limiting.md +31 -0
- package/kit/skills/api-patterns/references/backend/backend-api-design.md +495 -0
- package/kit/skills/api-patterns/references/backend/backend-architecture.md +454 -0
- package/kit/skills/api-patterns/references/backend/backend-authentication.md +338 -0
- package/kit/skills/api-patterns/references/backend/backend-code-quality.md +659 -0
- package/kit/skills/api-patterns/references/backend/backend-debugging.md +904 -0
- package/kit/skills/api-patterns/references/backend/backend-devops.md +494 -0
- package/kit/skills/api-patterns/references/backend/backend-mindset.md +387 -0
- package/kit/skills/api-patterns/references/backend/backend-performance.md +397 -0
- package/kit/skills/api-patterns/references/backend/backend-security.md +290 -0
- package/kit/skills/api-patterns/references/backend/backend-technologies.md +256 -0
- package/kit/skills/api-patterns/references/backend/backend-testing.md +429 -0
- package/kit/skills/api-patterns/response.md +37 -0
- package/kit/skills/api-patterns/rest.md +40 -0
- package/kit/skills/api-patterns/scripts/api_validator.py +211 -0
- package/kit/skills/api-patterns/security-testing.md +122 -0
- package/kit/skills/api-patterns/trpc.md +41 -0
- package/kit/skills/api-patterns/versioning.md +22 -0
- package/kit/skills/app-builder/SKILL.md +76 -0
- package/kit/skills/app-builder/agent-coordination.md +71 -0
- package/kit/skills/app-builder/feature-building.md +53 -0
- package/kit/skills/app-builder/project-detection.md +34 -0
- package/kit/skills/app-builder/scaffolding.md +118 -0
- package/kit/skills/app-builder/tech-stack.md +41 -0
- package/kit/skills/app-builder/templates/SKILL.md +39 -0
- package/kit/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
- package/kit/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
- package/kit/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
- package/kit/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
- package/kit/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
- package/kit/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
- package/kit/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
- package/kit/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +122 -0
- package/kit/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +122 -0
- package/kit/skills/app-builder/templates/nextjs-static/TEMPLATE.md +169 -0
- package/kit/skills/app-builder/templates/nuxt-app/TEMPLATE.md +134 -0
- package/kit/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
- package/kit/skills/app-builder/templates/react-native-app/TEMPLATE.md +119 -0
- package/kit/skills/architecture/SKILL.md +56 -0
- package/kit/skills/architecture/context-discovery.md +43 -0
- package/kit/skills/architecture/examples.md +94 -0
- package/kit/skills/architecture/pattern-selection.md +68 -0
- package/kit/skills/architecture/patterns-reference.md +50 -0
- package/kit/skills/architecture/trade-off-analysis.md +77 -0
- package/kit/skills/bash-linux/SKILL.md +203 -0
- package/kit/skills/batch-operations/SKILL.md +112 -0
- package/kit/skills/behavioral-modes/SKILL.md +255 -0
- package/kit/skills/brainstorming/SKILL.md +189 -0
- package/kit/skills/brainstorming/dynamic-questioning.md +350 -0
- package/kit/skills/brainstorming/references/problem-solving/attribution.md +69 -0
- package/kit/skills/brainstorming/references/problem-solving/collision-zone-thinking.md +79 -0
- package/kit/skills/brainstorming/references/problem-solving/inversion-exercise.md +91 -0
- package/kit/skills/brainstorming/references/problem-solving/meta-pattern-recognition.md +87 -0
- package/kit/skills/brainstorming/references/problem-solving/scale-game.md +95 -0
- package/kit/skills/brainstorming/references/problem-solving/simplification-cascades.md +80 -0
- package/kit/skills/brainstorming/references/problem-solving/when-stuck.md +72 -0
- package/kit/skills/claude-exec/SKILL.md +185 -0
- package/kit/skills/clean-code/SKILL.md +210 -0
- package/kit/skills/code-review-checklist/SKILL.md +115 -0
- package/kit/skills/code-review-graph/SKILL.md +50 -0
- package/kit/skills/code-review-graph/references/alternatives-comparison.md +12 -0
- package/kit/skills/code-review-graph/references/best-practices.md +9 -0
- package/kit/skills/code-review-graph/references/configuration.md +43 -0
- package/kit/skills/code-review-graph/references/core-workflows.md +61 -0
- package/kit/skills/code-review-graph/references/how-it-works-4-layers.md +20 -0
- package/kit/skills/code-review-graph/references/installation.md +67 -0
- package/kit/skills/code-review-graph/references/integration-with-zenkit.md +23 -0
- package/kit/skills/code-review-graph/references/known-limitations.md +13 -0
- package/kit/skills/code-review-graph/references/when-to-use-vs-when-to-skip.md +21 -0
- package/kit/skills/codex-exec/SKILL.md +161 -0
- package/kit/skills/context-compression/SKILL.md +145 -0
- package/kit/skills/coordinator-mode/SKILL.md +215 -0
- package/kit/skills/cursor-exec/SKILL.md +152 -0
- package/kit/skills/database-design/SKILL.md +53 -0
- package/kit/skills/database-design/database-selection.md +43 -0
- package/kit/skills/database-design/indexing.md +39 -0
- package/kit/skills/database-design/migrations.md +48 -0
- package/kit/skills/database-design/optimization.md +36 -0
- package/kit/skills/database-design/orm-selection.md +30 -0
- package/kit/skills/database-design/schema-design.md +56 -0
- package/kit/skills/database-design/scripts/schema_validator.py +172 -0
- package/kit/skills/deployment-procedures/SKILL.md +242 -0
- package/kit/skills/deprecation-and-migration/SKILL.md +149 -0
- package/kit/skills/documentation-templates/SKILL.md +195 -0
- package/kit/skills/entrega-com-agentes/SKILL.md +177 -0
- package/kit/skills/frontend-design/NOTICE.md +6 -0
- package/kit/skills/frontend-design/SKILL.md +456 -0
- package/kit/skills/frontend-design/animation-guide.md +331 -0
- package/kit/skills/frontend-design/color-system.md +311 -0
- package/kit/skills/frontend-design/decision-trees.md +418 -0
- package/kit/skills/frontend-design/motion-graphics.md +306 -0
- package/kit/skills/frontend-design/references/aesthetic/design-guideline-template.md +163 -0
- package/kit/skills/frontend-design/references/aesthetic/design-principles.md +62 -0
- package/kit/skills/frontend-design/references/aesthetic/design-resources.md +75 -0
- package/kit/skills/frontend-design/references/aesthetic/design-story-template.md +135 -0
- package/kit/skills/frontend-design/references/aesthetic/micro-interactions.md +53 -0
- package/kit/skills/frontend-design/references/aesthetic/storytelling-design.md +50 -0
- package/kit/skills/frontend-design/scripts/accessibility_checker.py +183 -0
- package/kit/skills/frontend-design/scripts/ux_audit.py +722 -0
- package/kit/skills/frontend-design/typography-system.md +345 -0
- package/kit/skills/frontend-design/ux-psychology.md +1116 -0
- package/kit/skills/frontend-design/visual-effects.md +383 -0
- package/kit/skills/game-development/2d-games/SKILL.md +119 -0
- package/kit/skills/game-development/3d-games/SKILL.md +135 -0
- package/kit/skills/game-development/SKILL.md +168 -0
- package/kit/skills/game-development/game-art/SKILL.md +185 -0
- package/kit/skills/game-development/game-audio/SKILL.md +190 -0
- package/kit/skills/game-development/game-design/SKILL.md +129 -0
- package/kit/skills/game-development/mobile-games/SKILL.md +108 -0
- package/kit/skills/game-development/multiplayer/SKILL.md +132 -0
- package/kit/skills/game-development/pc-games/SKILL.md +144 -0
- package/kit/skills/game-development/vr-ar/SKILL.md +123 -0
- package/kit/skills/game-development/web-games/SKILL.md +150 -0
- package/kit/skills/gemini-exec/SKILL.md +80 -0
- package/kit/skills/geo-fundamentals/SKILL.md +157 -0
- package/kit/skills/geo-fundamentals/scripts/geo_checker.py +289 -0
- package/kit/skills/git-worktrees/SKILL.md +107 -0
- package/kit/skills/i18n-localization/SKILL.md +145 -0
- package/kit/skills/i18n-localization/scripts/i18n_checker.py +241 -0
- package/kit/skills/intelligent-routing/SKILL.md +128 -0
- package/kit/skills/intelligent-routing/references/4-response-format.md +16 -0
- package/kit/skills/intelligent-routing/references/complexity-assessment.md +29 -0
- package/kit/skills/intelligent-routing/references/debug-intelligent-routing.md +9 -0
- package/kit/skills/intelligent-routing/references/debugging-agent-selection.md +7 -0
- package/kit/skills/intelligent-routing/references/domain-detection-rules.md +29 -0
- package/kit/skills/intelligent-routing/references/edge-cases.md +29 -0
- package/kit/skills/intelligent-routing/references/implementation-rules.md +35 -0
- package/kit/skills/intelligent-routing/references/integration-with-existing-workflows.md +21 -0
- package/kit/skills/intelligent-routing/references/performance-considerations.md +14 -0
- package/kit/skills/intelligent-routing/references/summary.md +16 -0
- package/kit/skills/intelligent-routing/references/testing-the-system.md +36 -0
- package/kit/skills/intelligent-routing/references/tier-0-automatic-analysis-always-active.md +27 -0
- package/kit/skills/intelligent-routing/references/user-education.md +12 -0
- package/kit/skills/karpathy-guidelines/SKILL.md +67 -0
- package/kit/skills/karpathy-guidelines/references/EXAMPLES.md +522 -0
- package/kit/skills/lint-and-validate/SKILL.md +46 -0
- package/kit/skills/lint-and-validate/scripts/lint_runner.py +184 -0
- package/kit/skills/lint-and-validate/scripts/type_coverage.py +173 -0
- package/kit/skills/mcp-atuacao/SKILL.md +238 -0
- package/kit/skills/mcp-builder/NOTICE.md +6 -0
- package/kit/skills/mcp-builder/SKILL.md +259 -0
- package/kit/skills/memory-system/SKILL.md +181 -0
- package/kit/skills/mobile-design/SKILL.md +395 -0
- package/kit/skills/mobile-design/decision-trees.md +516 -0
- package/kit/skills/mobile-design/mobile-backend.md +491 -0
- package/kit/skills/mobile-design/mobile-color-system.md +420 -0
- package/kit/skills/mobile-design/mobile-debugging.md +122 -0
- package/kit/skills/mobile-design/mobile-design-thinking.md +357 -0
- package/kit/skills/mobile-design/mobile-navigation.md +458 -0
- package/kit/skills/mobile-design/mobile-performance.md +767 -0
- package/kit/skills/mobile-design/mobile-testing.md +356 -0
- package/kit/skills/mobile-design/mobile-typography.md +433 -0
- package/kit/skills/mobile-design/platform-android.md +666 -0
- package/kit/skills/mobile-design/platform-ios.md +561 -0
- package/kit/skills/mobile-design/scripts/mobile_audit.py +670 -0
- package/kit/skills/mobile-design/touch-psychology.md +537 -0
- package/kit/skills/negocio-agente-conversa/SKILL.md +168 -0
- package/kit/skills/negocio-atendimento/SKILL.md +134 -0
- package/kit/skills/negocio-linguagem/SKILL.md +166 -0
- package/kit/skills/negocio-preco/SKILL.md +174 -0
- package/kit/skills/negocio-preco/scripts/preco.mjs +160 -0
- package/kit/skills/negocio-qualificacao/SKILL.md +140 -0
- package/kit/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +351 -0
- package/kit/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +240 -0
- package/kit/skills/nextjs-react-expert/3-server-server-side-performance.md +490 -0
- package/kit/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +264 -0
- package/kit/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +581 -0
- package/kit/skills/nextjs-react-expert/6-rendering-rendering-performance.md +432 -0
- package/kit/skills/nextjs-react-expert/7-js-javascript-performance.md +684 -0
- package/kit/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +150 -0
- package/kit/skills/nextjs-react-expert/9-cache-components.md +103 -0
- package/kit/skills/nextjs-react-expert/SKILL.md +308 -0
- package/kit/skills/nextjs-react-expert/resources/app-patterns/common-patterns.md +331 -0
- package/kit/skills/nextjs-react-expert/resources/app-patterns/complete-examples.md +872 -0
- package/kit/skills/nextjs-react-expert/resources/app-patterns/component-patterns.md +502 -0
- package/kit/skills/nextjs-react-expert/resources/app-patterns/data-fetching.md +767 -0
- package/kit/skills/nextjs-react-expert/resources/app-patterns/file-organization.md +502 -0
- package/kit/skills/nextjs-react-expert/resources/app-patterns/loading-and-error-states.md +501 -0
- package/kit/skills/nextjs-react-expert/resources/app-patterns/performance.md +406 -0
- package/kit/skills/nextjs-react-expert/resources/app-patterns/routing-guide.md +364 -0
- package/kit/skills/nextjs-react-expert/resources/app-patterns/styling-guide.md +428 -0
- package/kit/skills/nextjs-react-expert/resources/app-patterns/typescript-standards.md +418 -0
- package/kit/skills/nextjs-react-expert/scripts/convert_rules.py +222 -0
- package/kit/skills/nextjs-react-expert/scripts/react_performance_checker.py +252 -0
- package/kit/skills/nodejs-best-practices/SKILL.md +78 -0
- package/kit/skills/nodejs-best-practices/references/10-anti-patterns-to-avoid.md +21 -0
- package/kit/skills/nodejs-best-practices/references/11-decision-checklist.md +14 -0
- package/kit/skills/nodejs-best-practices/references/2-runtime-considerations-2025.md +36 -0
- package/kit/skills/nodejs-best-practices/references/3-architecture-principles.md +35 -0
- package/kit/skills/nodejs-best-practices/references/4-error-handling-principles.md +42 -0
- package/kit/skills/nodejs-best-practices/references/5-async-patterns-principles.md +35 -0
- package/kit/skills/nodejs-best-practices/references/6-validation-principles.md +29 -0
- package/kit/skills/nodejs-best-practices/references/7-security-principles.md +29 -0
- package/kit/skills/nodejs-best-practices/references/8-testing-principles.md +28 -0
- package/kit/skills/observability-and-instrumentation/SKILL.md +150 -0
- package/kit/skills/opencode-go-exec/SKILL.md +101 -0
- package/kit/skills/parallel-agents/SKILL.md +184 -0
- package/kit/skills/performance-profiling/SKILL.md +145 -0
- package/kit/skills/performance-profiling/scripts/lighthouse_audit.py +76 -0
- package/kit/skills/plan-writing/SKILL.md +213 -0
- package/kit/skills/powershell-windows/SKILL.md +196 -0
- package/kit/skills/provider-orchestration/SKILL.md +269 -0
- package/kit/skills/python-patterns/SKILL.md +80 -0
- package/kit/skills/python-patterns/references/10-decision-checklist.md +14 -0
- package/kit/skills/python-patterns/references/11-anti-patterns-to-avoid.md +20 -0
- package/kit/skills/python-patterns/references/2-async-vs-sync-decision.md +44 -0
- package/kit/skills/python-patterns/references/3-type-hints-strategy.md +56 -0
- package/kit/skills/python-patterns/references/4-project-structure-principles.md +56 -0
- package/kit/skills/python-patterns/references/5-django-principles-2025.md +40 -0
- package/kit/skills/python-patterns/references/6-fastapi-principles.md +50 -0
- package/kit/skills/python-patterns/references/7-background-tasks.md +31 -0
- package/kit/skills/python-patterns/references/8-error-handling-principles.md +29 -0
- package/kit/skills/python-patterns/references/9-testing-principles.md +37 -0
- package/kit/skills/red-team-tactics/SKILL.md +201 -0
- package/kit/skills/research/SKILL.md +166 -0
- package/kit/skills/rust-pro/SKILL.md +177 -0
- package/kit/skills/seo-fundamentals/SKILL.md +130 -0
- package/kit/skills/seo-fundamentals/scripts/seo_checker.py +219 -0
- package/kit/skills/sequential-thinking/.env.example +8 -0
- package/kit/skills/sequential-thinking/README.md +183 -0
- package/kit/skills/sequential-thinking/SKILL.md +95 -0
- package/kit/skills/sequential-thinking/package.json +31 -0
- package/kit/skills/sequential-thinking/references/advanced-strategies.md +79 -0
- package/kit/skills/sequential-thinking/references/advanced-techniques.md +76 -0
- package/kit/skills/sequential-thinking/references/core-patterns.md +95 -0
- package/kit/skills/sequential-thinking/references/examples-api.md +88 -0
- package/kit/skills/sequential-thinking/references/examples-architecture.md +94 -0
- package/kit/skills/sequential-thinking/references/examples-debug.md +90 -0
- package/kit/skills/sequential-thinking/scripts/format-thought.js +159 -0
- package/kit/skills/sequential-thinking/scripts/process-thought.js +236 -0
- package/kit/skills/server-management/SKILL.md +162 -0
- package/kit/skills/simplify-code/SKILL.md +133 -0
- package/kit/skills/skillify/SKILL.md +116 -0
- package/kit/skills/system-design-interview/SKILL.md +268 -0
- package/kit/skills/systematic-debugging/SKILL.md +110 -0
- package/kit/skills/tailwind-patterns/SKILL.md +283 -0
- package/kit/skills/tailwind-patterns/references/shadcn-ui/canvas-design-system.md +320 -0
- package/kit/skills/tailwind-patterns/references/shadcn-ui/shadcn-accessibility.md +471 -0
- package/kit/skills/tailwind-patterns/references/shadcn-ui/shadcn-components.md +424 -0
- package/kit/skills/tailwind-patterns/references/shadcn-ui/shadcn-theming.md +373 -0
- package/kit/skills/tailwind-patterns/references/shadcn-ui/tailwind-customization.md +483 -0
- package/kit/skills/tailwind-patterns/references/shadcn-ui/tailwind-responsive.md +382 -0
- package/kit/skills/tailwind-patterns/references/shadcn-ui/tailwind-utilities.md +455 -0
- package/kit/skills/tdd-workflow/SKILL.md +150 -0
- package/kit/skills/testing-patterns/SKILL.md +196 -0
- package/kit/skills/testing-patterns/scripts/test_runner.py +219 -0
- package/kit/skills/ui-ux-pro-max/SKILL.md +135 -0
- package/kit/skills/verify-changes/SKILL.md +125 -0
- package/kit/skills/vulnerability-scanner/SKILL.md +278 -0
- package/kit/skills/vulnerability-scanner/checklists.md +121 -0
- package/kit/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
- package/kit/skills/web-design-guidelines/SKILL.md +58 -0
- package/kit/skills/webapp-testing/NOTICE.md +6 -0
- package/kit/skills/webapp-testing/SKILL.md +188 -0
- package/kit/skills/webapp-testing/scripts/playwright_runner.py +173 -0
- package/kit/workflows/brainstorm.md +113 -0
- package/kit/workflows/coordinate.md +72 -0
- package/kit/workflows/create.md +59 -0
- package/kit/workflows/debug.md +103 -0
- package/kit/workflows/deploy.md +176 -0
- package/kit/workflows/enhance.md +63 -0
- package/kit/workflows/orchestrate.md +237 -0
- package/kit/workflows/plan.md +89 -0
- package/kit/workflows/preview.md +81 -0
- package/kit/workflows/remember.md +67 -0
- package/kit/workflows/status.md +86 -0
- package/kit/workflows/test.md +144 -0
- package/kit/workflows/ui-ux-pro-max.md +296 -0
- package/kit/workflows/verify.md +72 -0
- package/licenses/Apache-2.0.txt +202 -0
- package/package.json +60 -6
- package/scripts/avaliar-vigilancia-mandato.mjs +38 -0
- package/scripts/bundle.mjs +158 -0
- package/scripts/check-deps.mjs +178 -0
- package/scripts/check-models.mjs +150 -0
- package/scripts/cli.mjs +295 -0
- package/scripts/continuidade-mandato.mjs +47 -0
- package/scripts/discriminar-turno.mjs +191 -0
- package/scripts/doctor.mjs +615 -0
- package/scripts/generate.mjs +676 -0
- package/scripts/install.mjs +11 -0
- package/scripts/layer-remote.mjs +344 -0
- package/scripts/layers.mjs +208 -0
- package/scripts/marketplace.mjs +77 -0
- package/scripts/product.mjs +32 -0
- package/scripts/ruleset-core.mjs +68 -0
- package/scripts/social-hooks.mjs +293 -0
- package/scripts/social-pacer.mjs +219 -0
- package/scripts/validate-bundles.mjs +14 -0
- package/scripts/validate-skills.mjs +174 -0
- package/scripts/zenkit-daemon-task.cmd +3 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Inversion Exercise
|
|
2
|
+
|
|
3
|
+
Flip core assumptions to reveal hidden constraints and alternative approaches. "What if the opposite were true?"
|
|
4
|
+
|
|
5
|
+
## Core Principle
|
|
6
|
+
|
|
7
|
+
**Inversion exposes hidden assumptions.** Sometimes the opposite reveals the truth.
|
|
8
|
+
|
|
9
|
+
## When to Use
|
|
10
|
+
|
|
11
|
+
| Symptom | Action |
|
|
12
|
+
|---------|--------|
|
|
13
|
+
| "There's only one way" | Flip the assumption |
|
|
14
|
+
| Solution feels forced | Invert the constraints |
|
|
15
|
+
| Can't articulate why necessary | Question the "must" |
|
|
16
|
+
| "This is just how it's done" | Try the opposite |
|
|
17
|
+
|
|
18
|
+
## Quick Reference
|
|
19
|
+
|
|
20
|
+
| Normal Assumption | Inverted | What It Reveals |
|
|
21
|
+
|-------------------|----------|-----------------|
|
|
22
|
+
| Cache to reduce latency | Add latency to enable caching | Debouncing patterns |
|
|
23
|
+
| Pull data when needed | Push data before needed | Prefetching, eager loading |
|
|
24
|
+
| Handle errors when occur | Make errors impossible | Type systems, contracts |
|
|
25
|
+
| Build features users want | Remove features users don't need | Simplicity >> addition |
|
|
26
|
+
| Optimize for common case | Optimize for worst case | Resilience patterns |
|
|
27
|
+
|
|
28
|
+
## Process
|
|
29
|
+
|
|
30
|
+
1. **List core assumptions** - What "must" be true?
|
|
31
|
+
2. **Invert each systematically** - "What if opposite were true?"
|
|
32
|
+
3. **Explore implications** - What would we do differently?
|
|
33
|
+
4. **Find valid inversions** - Which actually work somewhere?
|
|
34
|
+
5. **Document insights** - What did we learn?
|
|
35
|
+
|
|
36
|
+
## Detailed Example
|
|
37
|
+
|
|
38
|
+
**Problem:** Users complain app is slow
|
|
39
|
+
|
|
40
|
+
**Normal approach:** Make everything faster
|
|
41
|
+
- Add caching
|
|
42
|
+
- Optimize queries
|
|
43
|
+
- Use CDN
|
|
44
|
+
- Reduce bundle size
|
|
45
|
+
|
|
46
|
+
**Inverted approach:** Make things intentionally slower in some places
|
|
47
|
+
- **Debounce search** - Add latency → enable better results (wait for full query)
|
|
48
|
+
- **Rate limit requests** - Add friction → prevent abuse, improve for others
|
|
49
|
+
- **Lazy load content** - Delay loading → reduce initial load time
|
|
50
|
+
- **Progressive rendering** - Show slower → perceived performance
|
|
51
|
+
|
|
52
|
+
**Insight:** Strategic slowness can improve UX
|
|
53
|
+
|
|
54
|
+
## Valid vs Invalid Inversions
|
|
55
|
+
|
|
56
|
+
**Valid inversion example:**
|
|
57
|
+
- Normal: "Store data in database"
|
|
58
|
+
- Inverted: "Derive data on-demand instead of storing"
|
|
59
|
+
- Valid when: Computation cheaper than storage, data changes frequently
|
|
60
|
+
|
|
61
|
+
**Invalid inversion example:**
|
|
62
|
+
- Normal: "Validate user input"
|
|
63
|
+
- Inverted: "Trust all user input"
|
|
64
|
+
- Invalid because: Security vulnerability, not context-dependent
|
|
65
|
+
|
|
66
|
+
**Test validity:** Does the inversion work in ANY context? If yes, it's valid somewhere.
|
|
67
|
+
|
|
68
|
+
## Common Inversions
|
|
69
|
+
|
|
70
|
+
- **Eager → Lazy** (or vice versa)
|
|
71
|
+
- **Push → Pull** (or vice versa)
|
|
72
|
+
- **Store → Compute** (or vice versa)
|
|
73
|
+
- **Optimize → Simplify** (or vice versa)
|
|
74
|
+
- **Add features → Remove features** (or vice versa)
|
|
75
|
+
|
|
76
|
+
## Red Flags
|
|
77
|
+
|
|
78
|
+
You need inversion exercise when:
|
|
79
|
+
- "There's only one way to do this"
|
|
80
|
+
- Forcing solution that feels wrong
|
|
81
|
+
- Can't articulate why approach is necessary
|
|
82
|
+
- "This is just how it's done"
|
|
83
|
+
- Stuck on unquestioned assumptions
|
|
84
|
+
|
|
85
|
+
## Remember
|
|
86
|
+
|
|
87
|
+
- Not all inversions work (test boundaries)
|
|
88
|
+
- Valid inversions reveal context-dependence
|
|
89
|
+
- Sometimes opposite is the answer
|
|
90
|
+
- Question "must be" statements
|
|
91
|
+
- Document both successful and failed inversions
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Meta-Pattern Recognition
|
|
2
|
+
|
|
3
|
+
Spot patterns appearing in 3+ domains to find universal principles.
|
|
4
|
+
|
|
5
|
+
## Core Principle
|
|
6
|
+
|
|
7
|
+
**Find patterns in how patterns emerge.** When the same pattern appears in 3+ domains, it's likely a universal principle worth extracting.
|
|
8
|
+
|
|
9
|
+
## When to Use
|
|
10
|
+
|
|
11
|
+
| Symptom | Action |
|
|
12
|
+
|---------|--------|
|
|
13
|
+
| Same issue in different places | Extract the abstract form |
|
|
14
|
+
| Déjà vu in problem-solving | Find the universal pattern |
|
|
15
|
+
| Reinventing wheels across domains | Identify the meta-pattern |
|
|
16
|
+
| "Haven't we done this before?" | Yes, find and reuse it |
|
|
17
|
+
|
|
18
|
+
## Quick Reference
|
|
19
|
+
|
|
20
|
+
| Pattern Appears In | Abstract Form | Where Else? |
|
|
21
|
+
|-------------------|---------------|-------------|
|
|
22
|
+
| CPU/DB/HTTP/DNS caching | Store frequently-accessed data closer | LLM prompt caching, CDN |
|
|
23
|
+
| Layering (network/storage/compute) | Separate concerns into abstraction levels | Architecture, org structure |
|
|
24
|
+
| Queuing (message/task/request) | Decouple producer from consumer with buffer | Event systems, async |
|
|
25
|
+
| Pooling (connection/thread/object) | Reuse expensive resources | Memory mgmt, governance |
|
|
26
|
+
|
|
27
|
+
## Process
|
|
28
|
+
|
|
29
|
+
1. **Spot repetition** - See same shape in 3+ places
|
|
30
|
+
2. **Extract abstract form** - Describe independent of any domain
|
|
31
|
+
3. **Identify variations** - How does it adapt per domain?
|
|
32
|
+
4. **Check applicability** - Where else might this help?
|
|
33
|
+
5. **Document pattern** - Make it reusable
|
|
34
|
+
|
|
35
|
+
## Detailed Example
|
|
36
|
+
|
|
37
|
+
**Pattern spotted:** Rate limiting appears in:
|
|
38
|
+
- API throttling (requests per minute)
|
|
39
|
+
- Traffic shaping (packets per second)
|
|
40
|
+
- Circuit breakers (failures per window)
|
|
41
|
+
- Admission control (concurrent connections)
|
|
42
|
+
|
|
43
|
+
**Abstract form:** Bound resource consumption to prevent exhaustion
|
|
44
|
+
|
|
45
|
+
**Variation points:**
|
|
46
|
+
- What resource (requests, packets, failures, connections)
|
|
47
|
+
- What limit (per time window, concurrent, cumulative)
|
|
48
|
+
- What happens when exceeded (reject, queue, degrade)
|
|
49
|
+
|
|
50
|
+
**New application:** LLM token budgets
|
|
51
|
+
- Same pattern: prevent context window exhaustion
|
|
52
|
+
- Resource: tokens
|
|
53
|
+
- Limit: context window size
|
|
54
|
+
- Action: truncate or reject
|
|
55
|
+
|
|
56
|
+
## 3+ Domain Rule
|
|
57
|
+
|
|
58
|
+
**Why 3 domains?**
|
|
59
|
+
- 1 occurrence = coincidence
|
|
60
|
+
- 2 occurrences = possible pattern
|
|
61
|
+
- 3+ occurrences = likely universal
|
|
62
|
+
|
|
63
|
+
**Domain independence test:**
|
|
64
|
+
Can you describe the pattern without mentioning specific domains?
|
|
65
|
+
|
|
66
|
+
## Red Flags
|
|
67
|
+
|
|
68
|
+
Signs you're missing meta-patterns:
|
|
69
|
+
- "This problem is unique" (probably not)
|
|
70
|
+
- Multiple teams solving "different" problems identically
|
|
71
|
+
- Reinventing wheels across domains
|
|
72
|
+
- "Haven't we done something like this?" (yes, find it)
|
|
73
|
+
|
|
74
|
+
## Benefits of Meta-Patterns
|
|
75
|
+
|
|
76
|
+
- **Battle-tested** - Proven across multiple domains
|
|
77
|
+
- **Reusable** - Apply to new situations
|
|
78
|
+
- **Universal** - Domain-independent solutions
|
|
79
|
+
- **Documented** - Known variations and trade-offs
|
|
80
|
+
|
|
81
|
+
## Remember
|
|
82
|
+
|
|
83
|
+
- 3+ domains = likely universal
|
|
84
|
+
- Abstract form reveals new applications
|
|
85
|
+
- Variations show adaptation points
|
|
86
|
+
- Universal patterns save time
|
|
87
|
+
- Document for future reuse
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Scale Game
|
|
2
|
+
|
|
3
|
+
Test at extremes (1000x bigger/smaller, instant/year-long) to expose fundamental truths hidden at normal scales.
|
|
4
|
+
|
|
5
|
+
## Core Principle
|
|
6
|
+
|
|
7
|
+
**Extremes expose fundamentals.** What works at one scale fails at another.
|
|
8
|
+
|
|
9
|
+
## When to Use
|
|
10
|
+
|
|
11
|
+
| Symptom | Action |
|
|
12
|
+
|---------|--------|
|
|
13
|
+
| "Should scale fine" (without testing) | Test at extremes |
|
|
14
|
+
| Uncertain about production behavior | Scale up 1000x |
|
|
15
|
+
| Edge cases unclear | Test minimum and maximum |
|
|
16
|
+
| Architecture validation needed | Extreme testing |
|
|
17
|
+
|
|
18
|
+
## Quick Reference
|
|
19
|
+
|
|
20
|
+
| Scale Dimension | Test At Extremes | What It Reveals |
|
|
21
|
+
|-----------------|------------------|-----------------|
|
|
22
|
+
| **Volume** | 1 item vs 1B items | Algorithmic complexity limits |
|
|
23
|
+
| **Speed** | Instant vs 1 year | Async requirements, caching needs |
|
|
24
|
+
| **Users** | 1 user vs 1B users | Concurrency issues, resource limits |
|
|
25
|
+
| **Duration** | Milliseconds vs years | Memory leaks, state growth |
|
|
26
|
+
| **Failure rate** | Never fails vs always fails | Error handling adequacy |
|
|
27
|
+
|
|
28
|
+
## Process
|
|
29
|
+
|
|
30
|
+
1. **Pick dimension** - What could vary extremely?
|
|
31
|
+
2. **Test minimum** - What if 1000x smaller/faster/fewer?
|
|
32
|
+
3. **Test maximum** - What if 1000x bigger/slower/more?
|
|
33
|
+
4. **Note what breaks** - Where do limits appear?
|
|
34
|
+
5. **Note what survives** - What's fundamentally sound?
|
|
35
|
+
6. **Design for reality** - Use insights to validate architecture
|
|
36
|
+
|
|
37
|
+
## Detailed Examples
|
|
38
|
+
|
|
39
|
+
### Example 1: Error Handling
|
|
40
|
+
- **Normal scale:** "Handle errors when they occur" works fine
|
|
41
|
+
- **At 1B scale:** Error volume overwhelms logging, crashes system
|
|
42
|
+
- **Reveals:** Need to make errors impossible (type systems) or expect them (chaos engineering)
|
|
43
|
+
- **Action:** Design error handling for volume, not just occurrence
|
|
44
|
+
|
|
45
|
+
### Example 2: Synchronous APIs
|
|
46
|
+
- **Normal scale:** Direct function calls work, < 100ms latency
|
|
47
|
+
- **At global scale:** Network latency makes synchronous unusable (200-500ms)
|
|
48
|
+
- **Reveals:** Async/messaging becomes survival requirement, not optimization
|
|
49
|
+
- **Action:** Design async-first from start
|
|
50
|
+
|
|
51
|
+
### Example 3: In-Memory State
|
|
52
|
+
- **Normal duration:** Works for hours/days in development
|
|
53
|
+
- **At years:** Memory grows unbounded, eventual crash (weeks → months → years)
|
|
54
|
+
- **Reveals:** Need persistence or periodic cleanup, can't rely on memory forever
|
|
55
|
+
- **Action:** Design for stateless or externalized state
|
|
56
|
+
|
|
57
|
+
### Example 4: Single vs Million Users
|
|
58
|
+
- **Normal scale:** Session in memory works for 100 users
|
|
59
|
+
- **At 1M scale:** Memory exhausted, server crashes
|
|
60
|
+
- **Reveals:** Need distributed session store (Redis, database)
|
|
61
|
+
- **Action:** Design for horizontal scaling from start
|
|
62
|
+
|
|
63
|
+
## Both Directions Matter
|
|
64
|
+
|
|
65
|
+
**Test smaller too:**
|
|
66
|
+
- What if only 1 user? Does complexity make sense?
|
|
67
|
+
- What if only 10 items? Is optimization premature?
|
|
68
|
+
- What if instant response? What becomes unnecessary?
|
|
69
|
+
|
|
70
|
+
Often reveals over-engineering or premature optimization.
|
|
71
|
+
|
|
72
|
+
## Red Flags
|
|
73
|
+
|
|
74
|
+
You need scale game when:
|
|
75
|
+
- "It works in dev" (but will it work in production?)
|
|
76
|
+
- No idea where limits are
|
|
77
|
+
- "Should scale fine" (without evidence)
|
|
78
|
+
- Surprised by production behavior
|
|
79
|
+
- Architecture feels arbitrary
|
|
80
|
+
|
|
81
|
+
## Success Metrics
|
|
82
|
+
|
|
83
|
+
After scale game, you should know:
|
|
84
|
+
- Where system breaks (exact limits)
|
|
85
|
+
- What survives (fundamentally sound parts)
|
|
86
|
+
- What needs redesign (scale-dependent)
|
|
87
|
+
- Production readiness (validated architecture)
|
|
88
|
+
|
|
89
|
+
## Remember
|
|
90
|
+
|
|
91
|
+
- Extremes reveal fundamentals hidden at normal scales
|
|
92
|
+
- What works at one scale fails at another
|
|
93
|
+
- Test BOTH directions (bigger AND smaller)
|
|
94
|
+
- Use insights to validate architecture early
|
|
95
|
+
- Don't guess - test at extremes
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Simplification Cascades
|
|
2
|
+
|
|
3
|
+
Find one insight eliminating multiple components. "If this is true, we don't need X, Y, Z."
|
|
4
|
+
|
|
5
|
+
## Core Principle
|
|
6
|
+
|
|
7
|
+
**Everything is a special case of...** collapses complexity dramatically.
|
|
8
|
+
|
|
9
|
+
One powerful abstraction > ten clever hacks.
|
|
10
|
+
|
|
11
|
+
## When to Use
|
|
12
|
+
|
|
13
|
+
| Symptom | Action |
|
|
14
|
+
|---------|--------|
|
|
15
|
+
| Same thing implemented 5+ ways | Abstract the common pattern |
|
|
16
|
+
| Growing special case list | Find the general case |
|
|
17
|
+
| Complex rules with exceptions | Find rule with no exceptions |
|
|
18
|
+
| Excessive config options | Find defaults working for 95% |
|
|
19
|
+
|
|
20
|
+
## The Pattern
|
|
21
|
+
|
|
22
|
+
**Look for:**
|
|
23
|
+
- Multiple implementations of similar concepts
|
|
24
|
+
- Special case handling everywhere
|
|
25
|
+
- "We need to handle A, B, C, D differently..."
|
|
26
|
+
- Complex rules with many exceptions
|
|
27
|
+
|
|
28
|
+
**Ask:** "What if they're all the same thing underneath?"
|
|
29
|
+
|
|
30
|
+
## Examples
|
|
31
|
+
|
|
32
|
+
### Example 1: Stream Abstraction
|
|
33
|
+
- **Before:** Separate handlers for batch/real-time/file/network data
|
|
34
|
+
- **Insight:** "All inputs are streams - just different sources"
|
|
35
|
+
- **After:** One stream processor, multiple stream sources
|
|
36
|
+
- **Eliminated:** 4 separate implementations
|
|
37
|
+
|
|
38
|
+
### Example 2: Resource Governance
|
|
39
|
+
- **Before:** Session tracking, rate limiting, file validation, connection pooling (all separate)
|
|
40
|
+
- **Insight:** "All are per-entity resource limits"
|
|
41
|
+
- **After:** One ResourceGovernor with 4 resource types
|
|
42
|
+
- **Eliminated:** 4 custom enforcement systems
|
|
43
|
+
|
|
44
|
+
### Example 3: Immutability
|
|
45
|
+
- **Before:** Defensive copying, locking, cache invalidation, temporal coupling
|
|
46
|
+
- **Insight:** "Treat everything as immutable data + transformations"
|
|
47
|
+
- **After:** Functional programming patterns
|
|
48
|
+
- **Eliminated:** Entire classes of synchronization problems
|
|
49
|
+
|
|
50
|
+
## Process
|
|
51
|
+
|
|
52
|
+
1. **List variations** - What's implemented multiple ways?
|
|
53
|
+
2. **Find essence** - What's the same underneath?
|
|
54
|
+
3. **Extract abstraction** - What's the domain-independent pattern?
|
|
55
|
+
4. **Test fit** - Do all cases fit cleanly?
|
|
56
|
+
5. **Measure cascade** - How many things become unnecessary?
|
|
57
|
+
|
|
58
|
+
## Red Flags
|
|
59
|
+
|
|
60
|
+
Signs you're missing a cascade:
|
|
61
|
+
- "Just need to add one more case..." (repeating forever)
|
|
62
|
+
- "These are similar but different" (maybe they're the same?)
|
|
63
|
+
- Refactoring feels like whack-a-mole (fix one, break another)
|
|
64
|
+
- Growing configuration file
|
|
65
|
+
- "Don't touch that, it's complicated" (complexity hiding pattern)
|
|
66
|
+
|
|
67
|
+
## Success Metrics
|
|
68
|
+
|
|
69
|
+
- **10x wins, not 10% improvements**
|
|
70
|
+
- Measure in "how many things can we delete?"
|
|
71
|
+
- Lines of code removed > lines added
|
|
72
|
+
- Configuration options eliminated
|
|
73
|
+
- Special cases unified
|
|
74
|
+
|
|
75
|
+
## Remember
|
|
76
|
+
|
|
77
|
+
- The pattern is usually already there, just needs recognition
|
|
78
|
+
- Valid cascades feel obvious in retrospect
|
|
79
|
+
- Test with "can this handle all existing cases?"
|
|
80
|
+
- Document the insight for future reference
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# When Stuck - Problem-Solving Dispatch
|
|
2
|
+
|
|
3
|
+
Different stuck-types need different techniques. Match stuck-symptom to technique.
|
|
4
|
+
|
|
5
|
+
## Dispatch Flowchart
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
YOU'RE STUCK
|
|
9
|
+
│
|
|
10
|
+
├─ Complexity spiraling? Same thing 5+ ways? Growing special cases?
|
|
11
|
+
│ └─→ USE: Simplification Cascades
|
|
12
|
+
│
|
|
13
|
+
├─ Can't find fitting approach? Conventional solutions inadequate?
|
|
14
|
+
│ └─→ USE: Collision-Zone Thinking
|
|
15
|
+
│
|
|
16
|
+
├─ Same issue different places? Reinventing wheels? Feels familiar?
|
|
17
|
+
│ └─→ USE: Meta-Pattern Recognition
|
|
18
|
+
│
|
|
19
|
+
├─ Solution feels forced? "Must be done this way"? Stuck on assumptions?
|
|
20
|
+
│ └─→ USE: Inversion Exercise
|
|
21
|
+
│
|
|
22
|
+
├─ Will this work at production? Edge cases unclear? Unsure of limits?
|
|
23
|
+
│ └─→ USE: Scale Game
|
|
24
|
+
│
|
|
25
|
+
└─ Code broken? Wrong behavior? Test failing?
|
|
26
|
+
└─→ USE: Debugging skill (systematic-debugging)
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Stuck-Type → Technique Map
|
|
30
|
+
|
|
31
|
+
| How You're Stuck | Symptom Details | Use This |
|
|
32
|
+
|------------------|-----------------|----------|
|
|
33
|
+
| **Complexity spiraling** | Same thing 5+ ways, growing special cases, excessive if/else | simplification-cascades.md |
|
|
34
|
+
| **Need innovation** | Conventional inadequate, can't find fitting approach, need breakthrough | collision-zone-thinking.md |
|
|
35
|
+
| **Recurring patterns** | Same issue different places, reinventing wheels, déjà vu feeling | meta-pattern-recognition.md |
|
|
36
|
+
| **Forced by assumptions** | "Must be done this way", can't question premise, forced solution | inversion-exercise.md |
|
|
37
|
+
| **Scale uncertainty** | Production unclear, edge cases unknown, unsure of limits | scale-game.md |
|
|
38
|
+
| **Code broken** | Wrong behavior, test failing, unexpected output | debugging skill |
|
|
39
|
+
|
|
40
|
+
## Process
|
|
41
|
+
|
|
42
|
+
1. **Identify stuck-type** - What symptom matches above?
|
|
43
|
+
2. **Load that technique** - Read the specific reference file
|
|
44
|
+
3. **Apply technique** - Follow its process
|
|
45
|
+
4. **Document attempt** - What worked/failed?
|
|
46
|
+
5. **If still stuck** - Try different technique or combine
|
|
47
|
+
|
|
48
|
+
## Combining Techniques
|
|
49
|
+
|
|
50
|
+
Some problems need multiple techniques:
|
|
51
|
+
|
|
52
|
+
- **Simplification + Meta-pattern** - Find pattern → simplify all instances
|
|
53
|
+
- **Collision + Inversion** - Force metaphor → invert assumptions
|
|
54
|
+
- **Scale + Simplification** - Test extremes → reveal what to eliminate
|
|
55
|
+
- **Meta-pattern + Scale** - Universal pattern → test at extremes
|
|
56
|
+
|
|
57
|
+
## When Nothing Works
|
|
58
|
+
|
|
59
|
+
If no technique helps:
|
|
60
|
+
1. **Reframe problem** - Are you solving the right problem?
|
|
61
|
+
2. **Get fresh perspective** - Explain to someone else
|
|
62
|
+
3. **Take break** - Distance often reveals solution
|
|
63
|
+
4. **Simplify scope** - Solve smaller version first
|
|
64
|
+
5. **Question constraints** - Are they real or assumed?
|
|
65
|
+
|
|
66
|
+
## Remember
|
|
67
|
+
|
|
68
|
+
- Match symptom to technique
|
|
69
|
+
- One technique at a time
|
|
70
|
+
- Combine if first doesn't work
|
|
71
|
+
- Document what you tried
|
|
72
|
+
- Not stuck forever, just temporarily
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: claude-exec
|
|
3
|
+
description: Run Claude Code headless (`claude -p`) as a writer or investigator. Default haiku. JSON out, budget cap, permission-mode that cannot stall on a TTY, isolated worktree. Never merge. Never a flagship model unless the human operator named it this turn.
|
|
4
|
+
when_to_use: "When the conductor needs Claude Code to type or probe a planned diff headless; when the user asks for claude -p / Claude Code exec / print mode. NOT for the interactive session you are already in, NOT for merge, NOT for Cursor (use cursor-exec), NOT for sonnet/opus/Fable unless the human named that model this turn."
|
|
5
|
+
allowed-tools: Read, Glob, Grep, Bash
|
|
6
|
+
effort: medium
|
|
7
|
+
---
|
|
8
|
+
## Política obrigatória de executores — DEM-ZEN-SEC-35
|
|
9
|
+
|
|
10
|
+
Únicas combinações permitidas para tarefas executadas ou investigadas por CLI: Codex `gpt-6-luna` com esforço `low`; Claude `claude-haiku-5-5` com `--effort low`; Cursor `composer-2.5`; OpenCode Go `opencode-go/deepseek-v4.1-flash`. Não trocar modelo por variável, fallback, tier ou preço. Se o modelo não estiver disponível, falhar e informar; não substituir. Esta política prevalece sobre exemplos anteriores neste documento.
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# claude-exec — Claude Code as writer / investigator
|
|
14
|
+
|
|
15
|
+
> `claude -p` is the SDK/print path: one prompt, tools, exit. This process
|
|
16
|
+
> types and looks. Default **haiku**. Flagship (sonnet, opus, Fable, a full
|
|
17
|
+
> frontier id) only if the **human operator** named that model **this turn**.
|
|
18
|
+
> The conductor does not get to decide. Cap the budget. Do not stall on a TTY.
|
|
19
|
+
|
|
20
|
+
## Custo (house cap)
|
|
21
|
+
|
|
22
|
+
`haiku` (~$6/1M in+out on models.dev prices) is the cheapest *Claude* option but
|
|
23
|
+
it is **above the house cap of $2/1M** — so it is not a "cheap" model. For cheap
|
|
24
|
+
typing and probing, prefer `opencode-go-exec` (`opencode-go/deepseek-v4-flash`,
|
|
25
|
+
~$0.75/1M). Use Claude `haiku` only when the human asks for Claude, or the run is
|
|
26
|
+
on a flat-rate Claude subscription (not per-token). See `model-routing.mdc`.
|
|
27
|
+
|
|
28
|
+
Load `provider-orchestration` for the ritual. Load `git-worktrees` before a
|
|
29
|
+
write. This file is the **Claude argv and its traps**.
|
|
30
|
+
|
|
31
|
+
Flags below were checked against Claude Code **2.1.x** help (`claude --help`)
|
|
32
|
+
and the [CLI reference](https://docs.anthropic.com/en/docs/claude-code/cli-reference).
|
|
33
|
+
Re-probe `claude --help` if a flag starts being ignored — this CLI moves.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 1. Probe
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
command -v claude || { echo "Claude Code CLI not installed"; exit 1; }
|
|
41
|
+
claude --version
|
|
42
|
+
claude auth status --text # exit 0 if logged in; 1 if not
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Auth in automation: `ANTHROPIC_API_KEY`, or `claude setup-token` for a
|
|
46
|
+
long-lived subscription token. `--bare` refuses OAuth/keychain and accepts
|
|
47
|
+
only `ANTHROPIC_API_KEY` / `apiKeyHelper` — useful in CI, hostile to a
|
|
48
|
+
developer laptop that only has a login cookie.
|
|
49
|
+
|
|
50
|
+
Never log the key.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## 2. Headless write recipe
|
|
55
|
+
|
|
56
|
+
Print mode skips the workspace-trust dialog. Only run it in a tree you
|
|
57
|
+
trust — meaning the isolated worktree, not a random checkout.
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
cd "$WORKTREE"
|
|
61
|
+
claude -p "$(cat PLAN.md)" \
|
|
62
|
+
--output-format json \
|
|
63
|
+
--no-session-persistence \
|
|
64
|
+
--permission-mode dontAsk \
|
|
65
|
+
--max-budget-usd 2 \
|
|
66
|
+
--model haiku
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
| Flag | Why |
|
|
70
|
+
|---|---|
|
|
71
|
+
| `-p` / `--print` | Non-interactive; write the result and exit |
|
|
72
|
+
| `--output-format json` | One result object (`text` default, `stream-json` for pipes) |
|
|
73
|
+
| `--no-session-persistence` | Do not leave a resumable session on disk for a typist run |
|
|
74
|
+
| `--permission-mode dontAsk` | A script cannot answer a permission prompt; it will hang |
|
|
75
|
+
| `--max-budget-usd` | Hard cap. Pick a number that matches the job; `2` is a starting point, not a law |
|
|
76
|
+
| `--model` | Default **`haiku`**. Writer and investigator. `sonnet` / `opus` / Fable / a full flagship id **only if the human named it this turn**. The conductor saying "this is hard" does not count. Omit `--model` is how you inherit a flagship default — pin it |
|
|
77
|
+
|
|
78
|
+
Optional, when you must narrow hands:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
--allowedTools "Read,Edit,Write,Bash,Glob,Grep"
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
`--allowedTools` lets those tools run without a prompt; `--tools` *restricts
|
|
85
|
+
the set that exists at all*. Do not confuse them. An empty `--tools` disables
|
|
86
|
+
every built-in tool and the typist can only talk.
|
|
87
|
+
|
|
88
|
+
`--dangerously-skip-permissions` (bypass) is for sandboxes with no network
|
|
89
|
+
and no secrets. A worktree on a developer laptop is not that sandbox. Prefer
|
|
90
|
+
`dontAsk` + an allowlist.
|
|
91
|
+
|
|
92
|
+
`--bare` starts faster (skips hooks, plugins, CLAUDE.md auto-discovery). Use
|
|
93
|
+
it when the plan is the whole instruction. Do **not** use it if you injected
|
|
94
|
+
this kit into the worktree and want those skills to load.
|
|
95
|
+
|
|
96
|
+
Containment: same as Cursor — `setsid` + `timeout --kill-after`. Wall-clock
|
|
97
|
+
timeout is not `--max-budget-usd`; you want both. Budget stops API spend.
|
|
98
|
+
Timeout stops a stuck tool loop.
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## 3. Headless *read-only* recipe (verify, do not type)
|
|
103
|
+
|
|
104
|
+
When the conductor needs a second Claude to re-probe live truth (tests,
|
|
105
|
+
HTTP, git) without writing:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
claude -p "$VERIFY_PROMPT" \
|
|
109
|
+
--output-format json \
|
|
110
|
+
--no-session-persistence \
|
|
111
|
+
--permission-mode dontAsk \
|
|
112
|
+
--max-budget-usd 1 \
|
|
113
|
+
--model haiku \
|
|
114
|
+
--allowedTools "Read,Grep,Glob,Bash(curl *),Bash(git *),Bash(npm *),Bash(pytest *)"
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Tighten the Bash patterns to what the probe actually needs. A verify run
|
|
118
|
+
that received `Write` is not a verify run.
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## 4. Output
|
|
123
|
+
|
|
124
|
+
JSON shape varies by version. Tolerate at least:
|
|
125
|
+
|
|
126
|
+
- `result` / `content` / `text` for the final message
|
|
127
|
+
- `is_error`
|
|
128
|
+
- `total_cost_usd` (self-reported — useful, not gospel)
|
|
129
|
+
- `usage.input_tokens` / `output_tokens`
|
|
130
|
+
|
|
131
|
+
A parse failure is a failed run. Do not "extract the prose from stderr and
|
|
132
|
+
carry on".
|
|
133
|
+
|
|
134
|
+
Then, for writes:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
git -C "$WORKTREE" status --short
|
|
138
|
+
git -C "$WORKTREE" diff
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## 5. Traps
|
|
144
|
+
|
|
145
|
+
**You are already Claude.** If this session *is* Claude Code interactive,
|
|
146
|
+
`claude -p` is a **second** process with a **second** bill. That is the
|
|
147
|
+
point when you are the conductor and want a capped writer. It is waste when
|
|
148
|
+
the edit is small — just edit. The second process still defaults to haiku,
|
|
149
|
+
not to whatever this session is running.
|
|
150
|
+
|
|
151
|
+
**`--model sonnet` or `--model opus` because the plan was hard.** Judgement
|
|
152
|
+
stays on the conductor. Flagship on this process requires the human to type
|
|
153
|
+
the id this turn. "I'll just bump it" is the billing leak this skill exists
|
|
154
|
+
to stop.
|
|
155
|
+
|
|
156
|
+
**Omitting `--model`.** Print mode then uses the account default, which is
|
|
157
|
+
often a flagship. Pin `haiku`.
|
|
158
|
+
|
|
159
|
+
**`--permission-mode default` in a script.** It will stop for a prompt
|
|
160
|
+
nobody will see. `dontAsk` or an explicit allowlist.
|
|
161
|
+
|
|
162
|
+
**`--dangerously-skip-permissions` as a habit.** It skips more than file
|
|
163
|
+
edits. Keep it for throwaway sandboxes.
|
|
164
|
+
|
|
165
|
+
**No `--max-budget-usd`.** Print mode will happily spend until the job
|
|
166
|
+
"finishes". Caps are part of the recipe, not an optimization.
|
|
167
|
+
|
|
168
|
+
**`--continue` / `--resume` on a typist job.** Persistence is for a human
|
|
169
|
+
conversation. A typist run should be one-shot (`--no-session-persistence`)
|
|
170
|
+
so the next plan cannot silently inherit the last one.
|
|
171
|
+
|
|
172
|
+
**Worktree flag on Claude (`-w` / `--worktree`).** Claude can create its own
|
|
173
|
+
worktree. Prefer the conductor creating the worktree (`git-worktrees`) so
|
|
174
|
+
the path is deterministic and two jobs cannot nest.
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## 6. When not to use this
|
|
179
|
+
|
|
180
|
+
- The conductor is already Claude and the change is smaller than the plan.
|
|
181
|
+
- The typist should be Cursor's cheap model — `cursor-exec`.
|
|
182
|
+
- The typist should be Codex — `codex-exec`.
|
|
183
|
+
- You were about to pass `--model` a flagship id and the human did not name
|
|
184
|
+
it this turn — stop, or ask.
|
|
185
|
+
---
|