nemonix-cli 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +186 -0
- package/dist/cli.js +6870 -0
- package/package.json +48 -0
- package/src/config/claude-code-config/.claude/commands/setup-tmux.md +0 -0
- package/src/config/claude-code-config/CHANGELOG.md +261 -0
- package/src/config/claude-code-config/README.md +1 -0
- package/src/config/claude-code-config/agents/action.md +36 -0
- package/src/config/claude-code-config/agents/clean-code-runner.md +61 -0
- package/src/config/claude-code-config/agents/code-reviewer.md +172 -0
- package/src/config/claude-code-config/agents/code-simplifier.md +49 -0
- package/src/config/claude-code-config/agents/explore-codebase.md +65 -0
- package/src/config/claude-code-config/agents/explore-docs.md +65 -0
- package/src/config/claude-code-config/agents/explore-fast.md +22 -0
- package/src/config/claude-code-config/agents/implementer.md +181 -0
- package/src/config/claude-code-config/agents/snipper.md +36 -0
- package/src/config/claude-code-config/agents/websearch.md +42 -0
- package/src/config/claude-code-config/commands/prompts/create-vitejs-app.md +272 -0
- package/src/config/claude-code-config/commands/prompts/nextjs-add-prisma-db.md +136 -0
- package/src/config/claude-code-config/commands/prompts/nextjs-setup-better-auth.md +173 -0
- package/src/config/claude-code-config/commands/prompts/nextjs-setup-project.md +200 -0
- package/src/config/claude-code-config/commands/prompts/prompt.md +55 -0
- package/src/config/claude-code-config/commands/prompts/saas-challenge-idea.md +135 -0
- package/src/config/claude-code-config/commands/prompts/saas-create-architecture.md +242 -0
- package/src/config/claude-code-config/commands/prompts/saas-create-headline.md +132 -0
- package/src/config/claude-code-config/commands/prompts/saas-create-landing-copywritting.md +267 -0
- package/src/config/claude-code-config/commands/prompts/saas-create-legals-docs.md +176 -0
- package/src/config/claude-code-config/commands/prompts/saas-create-logos.md +240 -0
- package/src/config/claude-code-config/commands/prompts/saas-create-prd.md +195 -0
- package/src/config/claude-code-config/commands/prompts/saas-create-tasks.md +240 -0
- package/src/config/claude-code-config/commands/prompts/saas-define-pricing.md +293 -0
- package/src/config/claude-code-config/commands/prompts/saas-find-domain-name.md +190 -0
- package/src/config/claude-code-config/commands/prompts/saas-implement-landing-page.md +257 -0
- package/src/config/claude-code-config/commands/prompts/setup-tmux.md +160 -0
- package/src/config/claude-code-config/commands/prompts/tools.md +148 -0
- package/src/config/claude-code-config/hooks/hook-post-file.ts +162 -0
- package/src/config/claude-code-config/scripts/.claude/skills/fix-on-my-computer/SKILL.md +81 -0
- package/src/config/claude-code-config/scripts/CLAUDE.md +50 -0
- package/src/config/claude-code-config/scripts/auto-rename-session/CLAUDE.md +59 -0
- package/src/config/claude-code-config/scripts/auto-rename-session/__tests__/shared.test.ts +185 -0
- package/src/config/claude-code-config/scripts/auto-rename-session/__tests__/title-generation.test.ts +44 -0
- package/src/config/claude-code-config/scripts/auto-rename-session/fixtures/sample-transcript.jsonl +3 -0
- package/src/config/claude-code-config/scripts/auto-rename-session/fixtures/transcript-short-message.jsonl +2 -0
- package/src/config/claude-code-config/scripts/auto-rename-session/fixtures/transcript-with-title.jsonl +3 -0
- package/src/config/claude-code-config/scripts/auto-rename-session/src/index.ts +113 -0
- package/src/config/claude-code-config/scripts/auto-rename-session/src/rename-all.ts +148 -0
- package/src/config/claude-code-config/scripts/auto-rename-session/src/shared.ts +157 -0
- package/src/config/claude-code-config/scripts/auto-rename-session/src/worker.ts +58 -0
- package/src/config/claude-code-config/scripts/biome.json +37 -0
- package/src/config/claude-code-config/scripts/claude-code-ai/CLAUDE.md +84 -0
- package/src/config/claude-code-config/scripts/claude-code-ai/__tests__/claude.test.ts +19 -0
- package/src/config/claude-code-config/scripts/claude-code-ai/__tests__/paths.test.ts +68 -0
- package/src/config/claude-code-config/scripts/claude-code-ai/claude.ts +56 -0
- package/src/config/claude-code-config/scripts/claude-code-ai/cli.ts +46 -0
- package/src/config/claude-code-config/scripts/claude-code-ai/helper/credentials.ts +76 -0
- package/src/config/claude-code-config/scripts/claude-code-ai/helper/index.ts +9 -0
- package/src/config/claude-code-config/scripts/claude-code-ai/helper/paths.ts +51 -0
- package/src/config/claude-code-config/scripts/command-validator/CLAUDE.md +112 -0
- package/src/config/claude-code-config/scripts/command-validator/README.md +147 -0
- package/src/config/claude-code-config/scripts/command-validator/src/__tests__/validator.test.ts +99 -0
- package/src/config/claude-code-config/scripts/command-validator/src/cli.ts +121 -0
- package/src/config/claude-code-config/scripts/command-validator/src/lib/security-rules.ts +174 -0
- package/src/config/claude-code-config/scripts/command-validator/src/lib/types.ts +34 -0
- package/src/config/claude-code-config/scripts/command-validator/src/lib/validator.ts +90 -0
- package/src/config/claude-code-config/scripts/package.json +43 -0
- package/src/config/claude-code-config/scripts/statusline/CLAUDE.md +205 -0
- package/src/config/claude-code-config/scripts/statusline/README.md +193 -0
- package/src/config/claude-code-config/scripts/statusline/__tests__/context.test.ts +229 -0
- package/src/config/claude-code-config/scripts/statusline/__tests__/formatters.test.ts +108 -0
- package/src/config/claude-code-config/scripts/statusline/__tests__/statusline.test.ts +309 -0
- package/src/config/claude-code-config/scripts/statusline/data/.gitkeep +0 -0
- package/src/config/claude-code-config/scripts/statusline/defaults.json +82 -0
- package/src/config/claude-code-config/scripts/statusline/docs/ARCHITECTURE.md +166 -0
- package/src/config/claude-code-config/scripts/statusline/fixtures/mock-transcript.jsonl +4 -0
- package/src/config/claude-code-config/scripts/statusline/fixtures/test-input.json +35 -0
- package/src/config/claude-code-config/scripts/statusline/src/analyze-daily-usage.ts +151 -0
- package/src/config/claude-code-config/scripts/statusline/src/commands/interactive-config.ts +515 -0
- package/src/config/claude-code-config/scripts/statusline/src/debug-payloads.ts +195 -0
- package/src/config/claude-code-config/scripts/statusline/src/index.ts +224 -0
- package/src/config/claude-code-config/scripts/statusline/src/lib/config-types.ts +110 -0
- package/src/config/claude-code-config/scripts/statusline/src/lib/config.ts +21 -0
- package/src/config/claude-code-config/scripts/statusline/src/lib/context.ts +103 -0
- package/src/config/claude-code-config/scripts/statusline/src/lib/features/limits/commands/weekly-analysis.ts +108 -0
- package/src/config/claude-code-config/scripts/statusline/src/lib/features/limits/index.ts +111 -0
- package/src/config/claude-code-config/scripts/statusline/src/lib/features/limits/types.ts +15 -0
- package/src/config/claude-code-config/scripts/statusline/src/lib/features/spend/commands/migrate-to-sqlite.ts +136 -0
- package/src/config/claude-code-config/scripts/statusline/src/lib/features/spend/commands/spend-day.ts +79 -0
- package/src/config/claude-code-config/scripts/statusline/src/lib/features/spend/commands/spend-month.ts +66 -0
- package/src/config/claude-code-config/scripts/statusline/src/lib/features/spend/commands/spend-project.ts +85 -0
- package/src/config/claude-code-config/scripts/statusline/src/lib/features/spend/database.ts +395 -0
- package/src/config/claude-code-config/scripts/statusline/src/lib/features/spend/index.ts +178 -0
- package/src/config/claude-code-config/scripts/statusline/src/lib/features/spend/payload-logger.ts +161 -0
- package/src/config/claude-code-config/scripts/statusline/src/lib/features/spend/types.ts +37 -0
- package/src/config/claude-code-config/scripts/statusline/src/lib/formatters.ts +426 -0
- package/src/config/claude-code-config/scripts/statusline/src/lib/git.ts +100 -0
- package/src/config/claude-code-config/scripts/statusline/src/lib/menu-factories.ts +224 -0
- package/src/config/claude-code-config/scripts/statusline/src/lib/presets.ts +177 -0
- package/src/config/claude-code-config/scripts/statusline/src/lib/render-pure.ts +516 -0
- package/src/config/claude-code-config/scripts/statusline/src/lib/types.ts +36 -0
- package/src/config/claude-code-config/scripts/statusline/src/lib/utils.ts +15 -0
- package/src/config/claude-code-config/scripts/statusline/src/stats.ts +119 -0
- package/src/config/claude-code-config/scripts/statusline/src/tests/spend-v2.test.ts +377 -0
- package/src/config/claude-code-config/scripts/statusline/src/tools/fixed-cost-calc.ts +317 -0
- package/src/config/claude-code-config/scripts/statusline/statusline.config.free.json +79 -0
- package/src/config/claude-code-config/scripts/statusline/statusline.config.json +100 -0
- package/src/config/claude-code-config/scripts/statusline/test-with-fixtures.ts +37 -0
- package/src/config/claude-code-config/scripts/statusline/test.ts +20 -0
- package/src/config/claude-code-config/scripts/statusline/tsconfig.json +27 -0
- package/src/config/claude-code-config/scripts/tsconfig.json +27 -0
- package/src/config/claude-code-config/settings.json +92 -0
- package/src/config/claude-code-config/skills/aibuilder-create-saas/SKILL.md +176 -0
- package/src/config/claude-code-config/skills/aibuilder-create-saas/references/architecture-template.md +436 -0
- package/src/config/claude-code-config/skills/aibuilder-create-saas/references/challenge-framework.md +289 -0
- package/src/config/claude-code-config/skills/aibuilder-create-saas/references/discovery-framework.md +338 -0
- package/src/config/claude-code-config/skills/aibuilder-create-saas/references/prd-template.md +452 -0
- package/src/config/claude-code-config/skills/aibuilder-create-saas/references/task-template.md +263 -0
- package/src/config/claude-code-config/skills/aibuilder-create-saas/references/tools.md +132 -0
- package/src/config/claude-code-config/skills/aibuilder-create-saas/scripts/rename-project.sh +42 -0
- package/src/config/claude-code-config/skills/aibuilder-create-saas/scripts/setup.sh +104 -0
- package/src/config/claude-code-config/skills/aibuilder-create-saas/steps/step-00-init.md +174 -0
- package/src/config/claude-code-config/skills/aibuilder-create-saas/steps/step-01-discovery.md +342 -0
- package/src/config/claude-code-config/skills/aibuilder-create-saas/steps/step-02-brainstorm.md +230 -0
- package/src/config/claude-code-config/skills/aibuilder-create-saas/steps/step-03-validate.md +372 -0
- package/src/config/claude-code-config/skills/aibuilder-create-saas/steps/step-04-prd.md +364 -0
- package/src/config/claude-code-config/skills/aibuilder-create-saas/steps/step-05-architecture.md +904 -0
- package/src/config/claude-code-config/skills/aibuilder-create-saas/steps/step-06-tasks.md +446 -0
- package/src/config/claude-code-config/skills/explore/SKILL.md +119 -0
- package/src/config/claude-code-config/skills/frontend-design/LICENSE.txt +177 -0
- package/src/config/claude-code-config/skills/frontend-design/SKILL.md +42 -0
- package/src/config/claude-code-config/skills/git-commit/SKILL.md +42 -0
- package/src/config/claude-code-config/skills/git-create-pr/SKILL.md +53 -0
- package/src/config/claude-code-config/skills/git-fix-pr-comments/SKILL.md +51 -0
- package/src/config/claude-code-config/skills/git-merge/SKILL.md +68 -0
- package/src/config/claude-code-config/skills/marketing-copywriting/SKILL.md +72 -0
- package/src/config/claude-code-config/skills/meta-claude-memory/SKILL.md +694 -0
- package/src/config/claude-code-config/skills/meta-claude-memory/references/comprehensive-example.md +175 -0
- package/src/config/claude-code-config/skills/meta-claude-memory/references/project-patterns.md +334 -0
- package/src/config/claude-code-config/skills/meta-claude-memory/references/prompting-techniques.md +411 -0
- package/src/config/claude-code-config/skills/meta-claude-memory/references/rules-directory-guide.md +298 -0
- package/src/config/claude-code-config/skills/meta-claude-memory/references/section-templates.md +347 -0
- package/src/config/claude-code-config/skills/meta-hooks-creator/SKILL.md +357 -0
- package/src/config/claude-code-config/skills/meta-hooks-creator/references/command-vs-prompt.md +287 -0
- package/src/config/claude-code-config/skills/meta-hooks-creator/references/examples.md +689 -0
- package/src/config/claude-code-config/skills/meta-hooks-creator/references/hook-types.md +495 -0
- package/src/config/claude-code-config/skills/meta-hooks-creator/references/input-output-schemas.md +503 -0
- package/src/config/claude-code-config/skills/meta-hooks-creator/references/matchers.md +517 -0
- package/src/config/claude-code-config/skills/meta-hooks-creator/references/troubleshooting.md +653 -0
- package/src/config/claude-code-config/skills/meta-prompt-creator/SKILL.md +285 -0
- package/src/config/claude-code-config/skills/meta-prompt-creator/references/anthropic-best-practices.md +126 -0
- package/src/config/claude-code-config/skills/meta-prompt-creator/references/anti-patterns.md +57 -0
- package/src/config/claude-code-config/skills/meta-prompt-creator/references/clarity-principles.md +54 -0
- package/src/config/claude-code-config/skills/meta-prompt-creator/references/context-management.md +389 -0
- package/src/config/claude-code-config/skills/meta-prompt-creator/references/few-shot-patterns.md +47 -0
- package/src/config/claude-code-config/skills/meta-prompt-creator/references/openai-best-practices.md +50 -0
- package/src/config/claude-code-config/skills/meta-prompt-creator/references/prompt-templates.md +110 -0
- package/src/config/claude-code-config/skills/meta-prompt-creator/references/reasoning-techniques.md +52 -0
- package/src/config/claude-code-config/skills/meta-prompt-creator/references/system-prompt-patterns.md +48 -0
- package/src/config/claude-code-config/skills/meta-prompt-creator/references/xml-structure.md +36 -0
- package/src/config/claude-code-config/skills/meta-skill-creator/LICENSE.txt +202 -0
- package/src/config/claude-code-config/skills/meta-skill-creator/SKILL.md +421 -0
- package/src/config/claude-code-config/skills/meta-skill-creator/package.json +5 -0
- package/src/config/claude-code-config/skills/meta-skill-creator/references/output-patterns.md +82 -0
- package/src/config/claude-code-config/skills/meta-skill-creator/references/progressive-disclosure-patterns.md +374 -0
- package/src/config/claude-code-config/skills/meta-skill-creator/references/prompting-integration.md +363 -0
- package/src/config/claude-code-config/skills/meta-skill-creator/references/real-world-examples.md +513 -0
- package/src/config/claude-code-config/skills/meta-skill-creator/references/script-patterns.md +385 -0
- package/src/config/claude-code-config/skills/meta-skill-creator/references/workflows.md +28 -0
- package/src/config/claude-code-config/skills/meta-skill-creator/references/xml-tag-guide.md +606 -0
- package/src/config/claude-code-config/skills/meta-skill-creator/scripts/init-skill.ts +214 -0
- package/src/config/claude-code-config/skills/meta-skill-creator/scripts/package-skill.ts +146 -0
- package/src/config/claude-code-config/skills/meta-skill-creator/scripts/validate.ts +138 -0
- package/src/config/claude-code-config/skills/meta-skill-workflow-creator/SKILL.md +390 -0
- package/src/config/claude-code-config/skills/meta-skill-workflow-creator/references/ask-patterns.md +225 -0
- package/src/config/claude-code-config/skills/meta-skill-workflow-creator/references/prompt-engineering.md +377 -0
- package/src/config/claude-code-config/skills/meta-skill-workflow-creator/references/state-management.md +275 -0
- package/src/config/claude-code-config/skills/meta-skill-workflow-creator/references/step-template.md +334 -0
- package/src/config/claude-code-config/skills/meta-skill-workflow-creator/references/workflow-patterns.md +300 -0
- package/src/config/claude-code-config/skills/meta-subagent-creator/SKILL.md +451 -0
- package/src/config/claude-code-config/skills/meta-subagent-creator/references/context-management.md +567 -0
- package/src/config/claude-code-config/skills/meta-subagent-creator/references/debugging-agents.md +714 -0
- package/src/config/claude-code-config/skills/meta-subagent-creator/references/error-handling-and-recovery.md +502 -0
- package/src/config/claude-code-config/skills/meta-subagent-creator/references/evaluation-and-testing.md +374 -0
- package/src/config/claude-code-config/skills/meta-subagent-creator/references/orchestration-patterns.md +591 -0
- package/src/config/claude-code-config/skills/meta-subagent-creator/references/subagents.md +599 -0
- package/src/config/claude-code-config/skills/meta-subagent-creator/references/writing-subagent-prompts.md +513 -0
- package/src/config/claude-code-config/skills/ralph-loop/SKILL.md +117 -0
- package/src/config/claude-code-config/skills/ralph-loop/scripts/setup.sh +278 -0
- package/src/config/claude-code-config/skills/ralph-loop/steps/step-00-init.md +215 -0
- package/src/config/claude-code-config/skills/ralph-loop/steps/step-01-interactive-prd.md +366 -0
- package/src/config/claude-code-config/skills/ralph-loop/steps/step-02-create-stories.md +273 -0
- package/src/config/claude-code-config/skills/ralph-loop/steps/step-03-finish.md +245 -0
- package/src/config/claude-code-config/skills/ralph-tasks/SKILL.md +88 -0
- package/src/config/claude-code-config/skills/ralph-tasks/scripts/add-task.sh +36 -0
- package/src/config/claude-code-config/skills/ralph-tasks/scripts/list-tasks.sh +66 -0
- package/src/config/claude-code-config/skills/ralph-tasks/scripts/remove-task.sh +47 -0
- package/src/config/claude-code-config/skills/ralph-tasks/scripts/setup.sh +201 -0
- package/src/config/claude-code-config/skills/ralph-tasks/steps/action-add-search.md +131 -0
- package/src/config/claude-code-config/skills/ralph-tasks/steps/action-add.md +46 -0
- package/src/config/claude-code-config/skills/ralph-tasks/steps/action-init.md +123 -0
- package/src/config/claude-code-config/skills/ralph-tasks/steps/action-list.md +58 -0
- package/src/config/claude-code-config/skills/ralph-tasks/steps/action-remove.md +48 -0
- package/src/config/claude-code-config/skills/ralph-tasks/steps/action-setup.md +46 -0
- package/src/config/claude-code-config/skills/ralph-tasks/steps/action-wake-up.md +62 -0
- package/src/config/claude-code-config/skills/utils-fix-errors/SKILL.md +61 -0
- package/src/config/claude-code-config/skills/utils-fix-grammar/SKILL.md +59 -0
- package/src/config/claude-code-config/skills/utils-oneshot/SKILL.md +56 -0
- package/src/config/claude-code-config/skills/utils-refactor/SKILL.md +89 -0
- package/src/config/claude-code-config/skills/utils-save-docs/SKILL.md +74 -0
- package/src/config/claude-code-config/skills/utils-ultrathink/SKILL.md +42 -0
- package/src/config/claude-code-config/skills/workflow-apex/SKILL.md +116 -0
- package/src/config/claude-code-config/skills/workflow-apex/scripts/setup-templates.sh +144 -0
- package/src/config/claude-code-config/skills/workflow-apex/scripts/update-progress.sh +80 -0
- package/src/config/claude-code-config/skills/workflow-apex/steps/step-00-init.md +273 -0
- package/src/config/claude-code-config/skills/workflow-apex/steps/step-00b-branch.md +126 -0
- package/src/config/claude-code-config/skills/workflow-apex/steps/step-00b-economy.md +244 -0
- package/src/config/claude-code-config/skills/workflow-apex/steps/step-00b-interactive.md +165 -0
- package/src/config/claude-code-config/skills/workflow-apex/steps/step-00b-save.md +123 -0
- package/src/config/claude-code-config/skills/workflow-apex/steps/step-01-analyze.md +361 -0
- package/src/config/claude-code-config/skills/workflow-apex/steps/step-02-plan.md +422 -0
- package/src/config/claude-code-config/skills/workflow-apex/steps/step-02b-tasks.md +301 -0
- package/src/config/claude-code-config/skills/workflow-apex/steps/step-03-execute-teams.md +297 -0
- package/src/config/claude-code-config/skills/workflow-apex/steps/step-03-execute.md +239 -0
- package/src/config/claude-code-config/skills/workflow-apex/steps/step-04-validate.md +264 -0
- package/src/config/claude-code-config/skills/workflow-apex/steps/step-05-examine.md +294 -0
- package/src/config/claude-code-config/skills/workflow-apex/steps/step-06-resolve.md +237 -0
- package/src/config/claude-code-config/skills/workflow-apex/steps/step-07-tests.md +250 -0
- package/src/config/claude-code-config/skills/workflow-apex/steps/step-08-run-tests.md +308 -0
- package/src/config/claude-code-config/skills/workflow-apex/steps/step-09-finish.md +193 -0
- package/src/config/claude-code-config/skills/workflow-apex/templates/00-context.md +53 -0
- package/src/config/claude-code-config/skills/workflow-apex/templates/01-analyze.md +10 -0
- package/src/config/claude-code-config/skills/workflow-apex/templates/02-plan.md +10 -0
- package/src/config/claude-code-config/skills/workflow-apex/templates/03-execute.md +10 -0
- package/src/config/claude-code-config/skills/workflow-apex/templates/04-validate.md +10 -0
- package/src/config/claude-code-config/skills/workflow-apex/templates/05-examine.md +10 -0
- package/src/config/claude-code-config/skills/workflow-apex/templates/06-resolve.md +10 -0
- package/src/config/claude-code-config/skills/workflow-apex/templates/07-tests.md +10 -0
- package/src/config/claude-code-config/skills/workflow-apex/templates/08-run-tests.md +10 -0
- package/src/config/claude-code-config/skills/workflow-apex/templates/09-finish.md +10 -0
- package/src/config/claude-code-config/skills/workflow-apex/templates/README.md +195 -0
- package/src/config/claude-code-config/skills/workflow-apex/templates/step-complete.md +7 -0
- package/src/config/claude-code-config/skills/workflow-brainstorm/SKILL.md +127 -0
- package/src/config/claude-code-config/skills/workflow-brainstorm/steps/step-01-explore.md +230 -0
- package/src/config/claude-code-config/skills/workflow-brainstorm/steps/step-02-challenge.md +238 -0
- package/src/config/claude-code-config/skills/workflow-brainstorm/steps/step-03-synthesize.md +337 -0
- package/src/config/claude-code-config/skills/workflow-brainstorm/steps/step-04-action.md +285 -0
- package/src/config/claude-code-config/skills/workflow-ci-fixer/SKILL.md +150 -0
- package/src/config/claude-code-config/skills/workflow-ci-fixer/references/cli-commands.md +122 -0
- package/src/config/claude-code-config/skills/workflow-ci-fixer/references/github-cli.md +243 -0
- package/src/config/claude-code-config/skills/workflow-ci-fixer/references/troubleshooting.md +362 -0
- package/src/config/claude-code-config/skills/workflow-ci-fixer/references/vercel-cli.md +192 -0
- package/src/config/claude-code-config/skills/workflow-ci-fixer/steps/step-00-init.md +157 -0
- package/src/config/claude-code-config/skills/workflow-ci-fixer/steps/step-01-watch-ci.md +192 -0
- package/src/config/claude-code-config/skills/workflow-ci-fixer/steps/step-02-analyze-errors.md +263 -0
- package/src/config/claude-code-config/skills/workflow-ci-fixer/steps/step-03-fix-locally.md +312 -0
- package/src/config/claude-code-config/skills/workflow-ci-fixer/steps/step-04-commit-push.md +206 -0
- package/src/config/claude-code-config/skills/workflow-ci-fixer/steps/step-05-cleanup.md +196 -0
- package/src/config/claude-code-config/skills/workflow-clean-code/SKILL.md +129 -0
- package/src/config/claude-code-config/skills/workflow-clean-code/references/general-clean-code.md +347 -0
- package/src/config/claude-code-config/skills/workflow-clean-code/references/nextjs-clean-code.md +458 -0
- package/src/config/claude-code-config/skills/workflow-clean-code/references/react-clean-code.md +406 -0
- package/src/config/claude-code-config/skills/workflow-clean-code/references/tanstack-query-best-practices.md +516 -0
- package/src/config/claude-code-config/skills/workflow-clean-code/references/zustand-best-practices.md +491 -0
- package/src/config/claude-code-config/skills/workflow-clean-code/steps/step-01-scan.md +137 -0
- package/src/config/claude-code-config/skills/workflow-clean-code/steps/step-02-apply.md +152 -0
- package/src/config/claude-code-config/skills/workflow-clean-code/steps/step-03-verify.md +143 -0
- package/src/config/claude-code-config/skills/workflow-debug/SKILL.md +126 -0
- package/src/config/claude-code-config/skills/workflow-debug/references/log-technique.md +285 -0
- package/src/config/claude-code-config/skills/workflow-debug/steps/step-00-init.md +94 -0
- package/src/config/claude-code-config/skills/workflow-debug/steps/step-01-analyze.md +180 -0
- package/src/config/claude-code-config/skills/workflow-debug/steps/step-01b-log-instrumentation.md +271 -0
- package/src/config/claude-code-config/skills/workflow-debug/steps/step-02-find-solutions.md +141 -0
- package/src/config/claude-code-config/skills/workflow-debug/steps/step-03-propose.md +142 -0
- package/src/config/claude-code-config/skills/workflow-debug/steps/step-04-fix.md +176 -0
- package/src/config/claude-code-config/skills/workflow-debug/steps/step-05-verify.md +279 -0
- package/src/config/claude-code-config/skills/workflow-review-code/SKILL.md +219 -0
- package/src/config/claude-code-config/skills/workflow-review-code/references/clean-code-principles.md +140 -0
- package/src/config/claude-code-config/skills/workflow-review-code/references/code-quality-metrics.md +174 -0
- package/src/config/claude-code-config/skills/workflow-review-code/references/feedback-patterns.md +149 -0
- package/src/config/claude-code-config/skills/workflow-review-code/references/security-checklist.md +127 -0
- package/src/config/claude-code-config/song/finish.mp3 +0 -0
- package/src/config/claude-code-config/song/need-human.mp3 +0 -0
package/src/config/claude-code-config/skills/workflow-ci-fixer/steps/step-02-analyze-errors.md
ADDED
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: step-02-analyze-errors
|
|
3
|
+
description: Fetch and analyze error logs from all CI/CD sources
|
|
4
|
+
prev_step: steps/step-01-watch-ci.md
|
|
5
|
+
next_step: steps/step-03-fix-locally.md
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Step 2: Analyze Errors
|
|
9
|
+
|
|
10
|
+
## MANDATORY EXECUTION RULES (READ FIRST):
|
|
11
|
+
|
|
12
|
+
- 🛑 NEVER guess at errors - always fetch actual logs
|
|
13
|
+
- ✅ ALWAYS save artifacts to `.claude/data/ci-{run_id}/`
|
|
14
|
+
- ✅ ALWAYS check multiple sources (GitHub Actions, Vercel, Netlify)
|
|
15
|
+
- 📋 YOU ARE AN ANALYST, not a fixer (that comes next)
|
|
16
|
+
- 💬 FOCUS on understanding what failed
|
|
17
|
+
- 🚫 FORBIDDEN to start fixing before full analysis
|
|
18
|
+
|
|
19
|
+
## EXECUTION PROTOCOLS:
|
|
20
|
+
|
|
21
|
+
- 🎯 Setup artifacts dir → Fetch logs → Parse errors → Use agents if needed → Report
|
|
22
|
+
- 💾 Store error details in `{error_logs}` and `{error_source}`
|
|
23
|
+
- 💾 Save all logs to `{artifacts_dir}`
|
|
24
|
+
- 📖 Complete analysis before loading next step
|
|
25
|
+
- 🚫 FORBIDDEN to load step-03 until errors are understood
|
|
26
|
+
|
|
27
|
+
## CONTEXT BOUNDARIES:
|
|
28
|
+
|
|
29
|
+
From previous steps:
|
|
30
|
+
|
|
31
|
+
| Variable | Description |
|
|
32
|
+
|----------|-------------|
|
|
33
|
+
| `{auto_mode}` | Skip confirmations |
|
|
34
|
+
| `{run_id}` | GitHub Actions run ID |
|
|
35
|
+
| `{branch}` | Current git branch |
|
|
36
|
+
| `{current_attempt}` | Current attempt number |
|
|
37
|
+
|
|
38
|
+
## YOUR TASK:
|
|
39
|
+
|
|
40
|
+
Create artifacts directory, fetch error logs from all CI/CD sources, use agents for complex analysis if needed, and categorize errors for fixing.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## EXECUTION SEQUENCE:
|
|
45
|
+
|
|
46
|
+
### 1. Setup Artifacts Directory
|
|
47
|
+
|
|
48
|
+
**Create the artifacts directory structure:**
|
|
49
|
+
```bash
|
|
50
|
+
mkdir -p .claude/data/ci-{run_id}/github/artifacts
|
|
51
|
+
mkdir -p .claude/data/ci-{run_id}/vercel
|
|
52
|
+
mkdir -p .claude/data/ci-{run_id}/netlify
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**Set state variable:**
|
|
56
|
+
```
|
|
57
|
+
{artifacts_dir} = ".claude/data/ci-{run_id}/"
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### 2. Fetch GitHub Actions Logs
|
|
61
|
+
|
|
62
|
+
**Get failed job logs and save:**
|
|
63
|
+
```bash
|
|
64
|
+
gh run view {run_id} --log-failed > {artifacts_dir}/github/failed-logs.txt
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Download artifacts if available:**
|
|
68
|
+
```bash
|
|
69
|
+
gh run download {run_id} --dir {artifacts_dir}/github/artifacts 2>/dev/null || echo "No artifacts to download"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**Parse for common error patterns:**
|
|
73
|
+
- Test failures: `FAIL`, `Error:`, `AssertionError`
|
|
74
|
+
- Lint errors: `error`, `warning`, ESLint/Prettier messages
|
|
75
|
+
- Build errors: `Cannot find module`, `TypeScript error`
|
|
76
|
+
- Dependency errors: `npm ERR!`, `ERESOLVE`
|
|
77
|
+
|
|
78
|
+
### 3. Check Vercel Deployment (if applicable)
|
|
79
|
+
|
|
80
|
+
**Detect if project uses Vercel:**
|
|
81
|
+
```bash
|
|
82
|
+
ls -la vercel.json .vercel 2>/dev/null
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**If Vercel detected, get deployment status:**
|
|
86
|
+
```bash
|
|
87
|
+
vercel ls --output json 2>/dev/null | head -10 > {artifacts_dir}/vercel/deployment.json
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**If deployment failed, get logs:**
|
|
91
|
+
```bash
|
|
92
|
+
# Get latest deployment URL
|
|
93
|
+
DEPLOY_URL=$(vercel ls --output json 2>/dev/null | jq -r '.[0].url' 2>/dev/null)
|
|
94
|
+
|
|
95
|
+
if [ -n "$DEPLOY_URL" ]; then
|
|
96
|
+
vercel inspect "$DEPLOY_URL" > {artifacts_dir}/vercel/logs.txt 2>&1
|
|
97
|
+
fi
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### 4. Check Netlify (if applicable)
|
|
101
|
+
|
|
102
|
+
**Detect if project uses Netlify:**
|
|
103
|
+
```bash
|
|
104
|
+
ls -la netlify.toml 2>/dev/null
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**If Netlify detected:**
|
|
108
|
+
```bash
|
|
109
|
+
netlify status > {artifacts_dir}/netlify/build-logs.txt 2>&1
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### 5. Use Agents for Complex Analysis (If Needed)
|
|
113
|
+
|
|
114
|
+
**If errors are unclear or complex, use agents:**
|
|
115
|
+
|
|
116
|
+
**For codebase exploration (find related files):**
|
|
117
|
+
```
|
|
118
|
+
Use Task tool with subagent_type="Explore":
|
|
119
|
+
- "Find all files related to the failing test in {test_file}"
|
|
120
|
+
- "Search for usages of {failing_function}"
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
**For documentation lookup (if dependency/config issue):**
|
|
124
|
+
```
|
|
125
|
+
Use Task tool with subagent_type="explore-docs":
|
|
126
|
+
- "How to configure {library} for {use_case}"
|
|
127
|
+
- "What causes {error_message} in {framework}"
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**For web search (if error is unfamiliar):**
|
|
131
|
+
```
|
|
132
|
+
Use Task tool with subagent_type="websearch":
|
|
133
|
+
- "How to fix {specific_error_message}"
|
|
134
|
+
- "{framework} {error_type} solution"
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### 6. Categorize Errors
|
|
138
|
+
|
|
139
|
+
Based on log analysis, categorize into:
|
|
140
|
+
|
|
141
|
+
| Error Type | Source | Priority |
|
|
142
|
+
|------------|--------|----------|
|
|
143
|
+
| `test-failure` | Test output | High |
|
|
144
|
+
| `lint-error` | ESLint/Prettier | Medium |
|
|
145
|
+
| `type-error` | TypeScript | High |
|
|
146
|
+
| `build-error` | Webpack/Next.js | High |
|
|
147
|
+
| `dependency-error` | npm/yarn | High |
|
|
148
|
+
| `deployment-error` | Vercel/Netlify | Medium |
|
|
149
|
+
| `env-error` | Missing env vars | High |
|
|
150
|
+
|
|
151
|
+
**Set `{error_source}`** to the primary source:
|
|
152
|
+
- `github-actions` for test/lint/build failures
|
|
153
|
+
- `vercel` for Vercel deployment issues
|
|
154
|
+
- `netlify` for Netlify deployment issues
|
|
155
|
+
|
|
156
|
+
**Set `{error_logs}`** with parsed error summary.
|
|
157
|
+
|
|
158
|
+
### 7. Save Error Summary
|
|
159
|
+
|
|
160
|
+
**Write summary to artifacts:**
|
|
161
|
+
```bash
|
|
162
|
+
cat > {artifacts_dir}/summary.md << 'EOF'
|
|
163
|
+
# CI Failure Analysis
|
|
164
|
+
|
|
165
|
+
**Run ID:** {run_id}
|
|
166
|
+
**Branch:** {branch}
|
|
167
|
+
**Attempt:** {current_attempt}/{max_attempts}
|
|
168
|
+
**Error Source:** {error_source}
|
|
169
|
+
|
|
170
|
+
## Errors Found
|
|
171
|
+
{list of errors with file:line references}
|
|
172
|
+
|
|
173
|
+
## Root Cause Analysis
|
|
174
|
+
{brief analysis}
|
|
175
|
+
|
|
176
|
+
## Suggested Fixes
|
|
177
|
+
{list of suggested fixes}
|
|
178
|
+
EOF
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### 8. Display Error Summary
|
|
182
|
+
|
|
183
|
+
Present a clear summary to the user:
|
|
184
|
+
|
|
185
|
+
```
|
|
186
|
+
## CI Failure Analysis (Attempt {current_attempt}/{max_attempts})
|
|
187
|
+
|
|
188
|
+
**Error Source:** {error_source}
|
|
189
|
+
**Error Type:** {categorized type}
|
|
190
|
+
**Artifacts saved to:** {artifacts_dir}
|
|
191
|
+
|
|
192
|
+
### Errors Found:
|
|
193
|
+
- Error 1: description (file:line)
|
|
194
|
+
- Error 2: description (file:line)
|
|
195
|
+
|
|
196
|
+
### Files Affected:
|
|
197
|
+
- file1.ts:123
|
|
198
|
+
- file2.ts:456
|
|
199
|
+
|
|
200
|
+
### Root Cause Analysis:
|
|
201
|
+
{brief analysis of what caused the failure}
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### 9. Confirm Analysis
|
|
205
|
+
|
|
206
|
+
**If `{auto_mode}` = true:**
|
|
207
|
+
→ Proceed to fixing
|
|
208
|
+
|
|
209
|
+
**If `{auto_mode}` = false:**
|
|
210
|
+
Use AskUserQuestion:
|
|
211
|
+
```yaml
|
|
212
|
+
questions:
|
|
213
|
+
- header: "Analysis"
|
|
214
|
+
question: "I found {N} errors. Proceed to fix them locally?"
|
|
215
|
+
options:
|
|
216
|
+
- label: "Fix all (Recommended)"
|
|
217
|
+
description: "Attempt to fix all identified errors"
|
|
218
|
+
- label: "Show details"
|
|
219
|
+
description: "Show more details before proceeding"
|
|
220
|
+
- label: "Manual investigation"
|
|
221
|
+
description: "Stop here, I'll investigate myself"
|
|
222
|
+
multiSelect: false
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## SUCCESS METRICS:
|
|
228
|
+
|
|
229
|
+
✅ Artifacts directory created at `.claude/data/ci-{run_id}/`
|
|
230
|
+
✅ GitHub Actions logs fetched and saved
|
|
231
|
+
✅ Deployment platform detected and checked
|
|
232
|
+
✅ Agents used for complex analysis when needed
|
|
233
|
+
✅ Errors parsed and categorized
|
|
234
|
+
✅ Summary saved to artifacts
|
|
235
|
+
✅ Clear summary presented
|
|
236
|
+
|
|
237
|
+
## FAILURE MODES:
|
|
238
|
+
|
|
239
|
+
❌ Not creating artifacts directory
|
|
240
|
+
❌ Not saving logs to artifacts
|
|
241
|
+
❌ Not fetching actual logs
|
|
242
|
+
❌ Missing deployment platform checks
|
|
243
|
+
❌ Vague error descriptions
|
|
244
|
+
❌ Not using agents when errors are unclear
|
|
245
|
+
|
|
246
|
+
## ANALYSIS PROTOCOLS:
|
|
247
|
+
|
|
248
|
+
- Save ALL logs to `{artifacts_dir}` for reference
|
|
249
|
+
- Extract exact error messages and line numbers
|
|
250
|
+
- Identify affected files specifically
|
|
251
|
+
- Don't guess at causes - use log evidence
|
|
252
|
+
- Use agents for complex analysis or unknown errors
|
|
253
|
+
- Check ALL potential sources, not just GitHub
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
## NEXT STEP:
|
|
258
|
+
|
|
259
|
+
After analysis complete, load `./step-03-fix-locally.md`
|
|
260
|
+
|
|
261
|
+
<critical>
|
|
262
|
+
Remember: This step is ONLY about analysis - understand the errors completely before trying to fix! Use agents if the error is unclear.
|
|
263
|
+
</critical>
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: step-03-fix-locally
|
|
3
|
+
description: Fix errors and verify locally - tests and lint MUST pass
|
|
4
|
+
prev_step: steps/step-02-analyze-errors.md
|
|
5
|
+
next_step: steps/step-04-commit-push.md
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Step 3: Fix Locally
|
|
9
|
+
|
|
10
|
+
## MANDATORY EXECUTION RULES (READ FIRST):
|
|
11
|
+
|
|
12
|
+
- 🛑 **ABSOLUTELY NO HACKS OR BYPASSES** - Fix the real problem
|
|
13
|
+
- 🛑 NEVER skip tests or linting - EVERYTHING must pass
|
|
14
|
+
- 🛑 NEVER use --no-verify, --skip, or any bypass flags
|
|
15
|
+
- 🛑 NEVER hack around issues (disabling rules, skipping files)
|
|
16
|
+
- ✅ ALWAYS run full test suite locally before committing
|
|
17
|
+
- ✅ ALWAYS run lint/format check before committing
|
|
18
|
+
- ✅ ALWAYS fix the root cause, not the symptom
|
|
19
|
+
- 📋 YOU ARE A FIXER, doing proper fixes only
|
|
20
|
+
- 💬 FOCUS on minimal, targeted fixes
|
|
21
|
+
- 🚫 FORBIDDEN to commit without local verification passing
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 🚫 FORBIDDEN HACKS - NEVER DO THESE
|
|
26
|
+
|
|
27
|
+
**These are STRICTLY FORBIDDEN. If you catch yourself doing any of these, STOP and fix properly:**
|
|
28
|
+
|
|
29
|
+
### Code Hacks (NEVER USE):
|
|
30
|
+
- `// @ts-ignore` or `// @ts-expect-error` - Fix the type instead
|
|
31
|
+
- `// eslint-disable` or `// eslint-disable-next-line` - Fix the lint error
|
|
32
|
+
- `// prettier-ignore` - Fix the formatting
|
|
33
|
+
- `as any` or `: any` - Use proper types
|
|
34
|
+
- `!` non-null assertion to silence errors - Handle null properly
|
|
35
|
+
- Empty catch blocks `catch {}` - Handle errors properly
|
|
36
|
+
- `console.log` left in code - Remove debugging code
|
|
37
|
+
|
|
38
|
+
### Test Hacks (NEVER USE):
|
|
39
|
+
- `.skip` or `it.skip` or `describe.skip` - Run all tests
|
|
40
|
+
- `.only` or `it.only` - Run all tests
|
|
41
|
+
- `--testPathIgnorePatterns` to skip tests - Run all tests
|
|
42
|
+
- `--passWithNoTests` - Ensure tests exist
|
|
43
|
+
- Commenting out failing tests - Fix them
|
|
44
|
+
- Changing assertions to match wrong output - Fix the code
|
|
45
|
+
|
|
46
|
+
### Git Hacks (NEVER USE):
|
|
47
|
+
- `--no-verify` on commit - Let hooks run
|
|
48
|
+
- `--force` push without reason - Push normally
|
|
49
|
+
- Amending commits to bypass checks - Create proper commits
|
|
50
|
+
|
|
51
|
+
### Config Hacks (NEVER USE):
|
|
52
|
+
- Adding files to `.eslintignore` to hide errors - Fix the errors
|
|
53
|
+
- Disabling rules in eslint config - Fix the code
|
|
54
|
+
- Lowering TypeScript strictness - Fix the types
|
|
55
|
+
- Skipping files in tsconfig - Include all files
|
|
56
|
+
|
|
57
|
+
### Dependency Hacks (NEVER USE):
|
|
58
|
+
- `--legacy-peer-deps` without understanding why - Fix dependencies
|
|
59
|
+
- `--force` install - Resolve conflicts properly
|
|
60
|
+
- Pinning to old broken versions - Update properly
|
|
61
|
+
|
|
62
|
+
**If a proper fix seems impossible, ASK THE USER for help instead of hacking.**
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## EXECUTION PROTOCOLS:
|
|
67
|
+
|
|
68
|
+
- 🎯 Fix → Verify locally → Iterate until green
|
|
69
|
+
- 💾 Track fixes in `{fixes_applied}`
|
|
70
|
+
- 📖 Complete ALL local verification before loading next step
|
|
71
|
+
- 🚫 FORBIDDEN to load step-04 until local tests/lint pass
|
|
72
|
+
|
|
73
|
+
## CONTEXT BOUNDARIES:
|
|
74
|
+
|
|
75
|
+
From previous steps:
|
|
76
|
+
|
|
77
|
+
| Variable | Description |
|
|
78
|
+
|----------|-------------|
|
|
79
|
+
| `{auto_mode}` | Skip confirmations |
|
|
80
|
+
| `{error_source}` | Source of error (github-actions, vercel, netlify) |
|
|
81
|
+
| `{error_logs}` | Captured error logs with details |
|
|
82
|
+
| `{fixes_applied}` | List to track applied fixes |
|
|
83
|
+
|
|
84
|
+
## YOUR TASK:
|
|
85
|
+
|
|
86
|
+
Fix the identified errors with minimal changes, then verify locally that ALL tests and linting pass before proceeding. **NO SHORTCUTS.**
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## EXECUTION SEQUENCE:
|
|
91
|
+
|
|
92
|
+
### 1. Prepare Local Environment
|
|
93
|
+
|
|
94
|
+
**Ensure dependencies are installed:**
|
|
95
|
+
```bash
|
|
96
|
+
npm install 2>/dev/null || yarn install 2>/dev/null || pnpm install 2>/dev/null
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**Check for running dev servers (if needed for tests):**
|
|
100
|
+
```bash
|
|
101
|
+
lsof -i :3000 2>/dev/null || lsof -i :8080 2>/dev/null
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**If tests need a server and none is running:**
|
|
105
|
+
Start the server in background:
|
|
106
|
+
```bash
|
|
107
|
+
npm run dev &
|
|
108
|
+
sleep 5 # Wait for server to start
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### 2. Apply PROPER Fixes Based on Error Type
|
|
112
|
+
|
|
113
|
+
**For test failures:**
|
|
114
|
+
- Read the failing test file
|
|
115
|
+
- Read the source file being tested
|
|
116
|
+
- **Fix the actual bug in the source code** (not the test, unless test is genuinely wrong)
|
|
117
|
+
- If test expectation is wrong, understand WHY before changing it
|
|
118
|
+
- Track fix in `{fixes_applied}`
|
|
119
|
+
|
|
120
|
+
**For lint errors:**
|
|
121
|
+
- Run auto-fix first:
|
|
122
|
+
```bash
|
|
123
|
+
npm run lint -- --fix 2>/dev/null || npx eslint --fix . 2>/dev/null
|
|
124
|
+
```
|
|
125
|
+
- For remaining errors, **fix the code properly** - don't disable rules
|
|
126
|
+
- Track fixes in `{fixes_applied}`
|
|
127
|
+
|
|
128
|
+
**For type errors:**
|
|
129
|
+
- Read the affected files
|
|
130
|
+
- **Fix type definitions or implementations properly**
|
|
131
|
+
- Add proper type annotations
|
|
132
|
+
- Never use `any` or `@ts-ignore`
|
|
133
|
+
- Track fixes in `{fixes_applied}`
|
|
134
|
+
|
|
135
|
+
**For build errors:**
|
|
136
|
+
- Check import paths
|
|
137
|
+
- Verify dependencies exist
|
|
138
|
+
- Fix configuration if needed
|
|
139
|
+
- Track fixes in `{fixes_applied}`
|
|
140
|
+
|
|
141
|
+
**For dependency errors:**
|
|
142
|
+
- Understand WHY there's a conflict
|
|
143
|
+
- Update package.json with compatible versions
|
|
144
|
+
- Regenerate lock file:
|
|
145
|
+
```bash
|
|
146
|
+
rm -f package-lock.json yarn.lock pnpm-lock.yaml
|
|
147
|
+
npm install # or yarn/pnpm
|
|
148
|
+
```
|
|
149
|
+
- Track in `{fixes_applied}`
|
|
150
|
+
|
|
151
|
+
### 3. Local Verification Loop
|
|
152
|
+
|
|
153
|
+
**This is CRITICAL - loop until ALL checks pass genuinely:**
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
local_verification_passed = false
|
|
157
|
+
local_attempts = 0
|
|
158
|
+
max_local_attempts = 5
|
|
159
|
+
|
|
160
|
+
WHILE NOT local_verification_passed AND local_attempts < max_local_attempts:
|
|
161
|
+
local_attempts += 1
|
|
162
|
+
|
|
163
|
+
# Step 3a: Run linting (NO --quiet, NO ignoring errors)
|
|
164
|
+
lint_result = RUN: npm run lint
|
|
165
|
+
|
|
166
|
+
IF lint_result FAILED:
|
|
167
|
+
→ Parse lint errors
|
|
168
|
+
→ Fix lint errors PROPERLY (no eslint-disable)
|
|
169
|
+
→ CONTINUE LOOP
|
|
170
|
+
|
|
171
|
+
# Step 3b: Run type checking (if TypeScript)
|
|
172
|
+
IF project uses TypeScript:
|
|
173
|
+
type_result = RUN: npx tsc --noEmit
|
|
174
|
+
|
|
175
|
+
IF type_result FAILED:
|
|
176
|
+
→ Parse type errors
|
|
177
|
+
→ Fix type errors PROPERLY (no @ts-ignore, no any)
|
|
178
|
+
→ CONTINUE LOOP
|
|
179
|
+
|
|
180
|
+
# Step 3c: Run ALL tests (no .skip, no --testPathIgnorePatterns)
|
|
181
|
+
test_result = RUN: npm test
|
|
182
|
+
|
|
183
|
+
IF test_result FAILED:
|
|
184
|
+
→ Parse test failures
|
|
185
|
+
→ Fix the SOURCE CODE (not the test assertions, unless test is wrong)
|
|
186
|
+
→ CONTINUE LOOP
|
|
187
|
+
|
|
188
|
+
# Step 3d: Run build (if applicable)
|
|
189
|
+
IF project has build command:
|
|
190
|
+
build_result = RUN: npm run build
|
|
191
|
+
|
|
192
|
+
IF build_result FAILED:
|
|
193
|
+
→ Parse build errors
|
|
194
|
+
→ Fix build issues PROPERLY
|
|
195
|
+
→ CONTINUE LOOP
|
|
196
|
+
|
|
197
|
+
# All checks passed GENUINELY!
|
|
198
|
+
local_verification_passed = true
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### 4. Verification Commands Reference
|
|
202
|
+
|
|
203
|
+
**Common verification commands (run ALL without skip flags):**
|
|
204
|
+
```bash
|
|
205
|
+
# Lint - no --quiet, no --max-warnings
|
|
206
|
+
npm run lint
|
|
207
|
+
npx eslint .
|
|
208
|
+
npx prettier --check .
|
|
209
|
+
|
|
210
|
+
# Type check - strict mode
|
|
211
|
+
npx tsc --noEmit
|
|
212
|
+
npm run typecheck
|
|
213
|
+
|
|
214
|
+
# Tests - no .skip, no .only, run everything
|
|
215
|
+
npm test
|
|
216
|
+
npm run test:ci
|
|
217
|
+
npx jest
|
|
218
|
+
npx vitest run
|
|
219
|
+
|
|
220
|
+
# Build - full build
|
|
221
|
+
npm run build
|
|
222
|
+
npx next build
|
|
223
|
+
npx vite build
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
**Run ALL that apply to the project. No shortcuts.**
|
|
227
|
+
|
|
228
|
+
### 5. Confirm All Checks Pass
|
|
229
|
+
|
|
230
|
+
**Display verification results:**
|
|
231
|
+
```
|
|
232
|
+
## Local Verification Results
|
|
233
|
+
|
|
234
|
+
✅ Lint: Passed (0 errors, 0 warnings)
|
|
235
|
+
✅ Type check: Passed (strict mode)
|
|
236
|
+
✅ Tests: 42/42 passed (none skipped)
|
|
237
|
+
✅ Build: Successful
|
|
238
|
+
|
|
239
|
+
Fixes applied:
|
|
240
|
+
1. Fixed type error in src/utils.ts:45
|
|
241
|
+
2. Fixed failing test in tests/api.test.ts
|
|
242
|
+
3. Auto-fixed lint issues in 3 files
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
**Set `{local_verified}` = true**
|
|
246
|
+
|
|
247
|
+
### 6. Handle Verification Failures
|
|
248
|
+
|
|
249
|
+
**If max local attempts reached:**
|
|
250
|
+
|
|
251
|
+
Use AskUserQuestion:
|
|
252
|
+
```yaml
|
|
253
|
+
questions:
|
|
254
|
+
- header: "Stuck"
|
|
255
|
+
question: "Can't fix these errors properly after 5 attempts. Need your help."
|
|
256
|
+
options:
|
|
257
|
+
- label: "Keep trying"
|
|
258
|
+
description: "Continue attempting proper fixes"
|
|
259
|
+
- label: "Show current errors"
|
|
260
|
+
description: "Display what's still failing"
|
|
261
|
+
- label: "Stop for manual fix"
|
|
262
|
+
description: "I'll investigate and fix manually"
|
|
263
|
+
multiSelect: false
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
**NEVER suggest using hacks to make it pass. If you can't fix it properly, ask for help.**
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
## SUCCESS METRICS:
|
|
271
|
+
|
|
272
|
+
✅ All identified errors fixed PROPERLY
|
|
273
|
+
✅ Lint passes locally (0 errors, 0 disabled rules)
|
|
274
|
+
✅ Type check passes (no @ts-ignore used)
|
|
275
|
+
✅ ALL tests pass locally (none skipped)
|
|
276
|
+
✅ Build succeeds
|
|
277
|
+
✅ `{local_verified}` = true
|
|
278
|
+
✅ `{fixes_applied}` contains all changes
|
|
279
|
+
✅ **NO HACKS WERE USED**
|
|
280
|
+
|
|
281
|
+
## FAILURE MODES:
|
|
282
|
+
|
|
283
|
+
❌ **CRITICAL**: Using ANY hack from the forbidden list
|
|
284
|
+
❌ **CRITICAL**: Skipping tests or lint checks
|
|
285
|
+
❌ **CRITICAL**: Using --no-verify or skip flags
|
|
286
|
+
❌ **CRITICAL**: Disabling lint rules instead of fixing
|
|
287
|
+
❌ **CRITICAL**: Using @ts-ignore or any
|
|
288
|
+
❌ Committing without local verification
|
|
289
|
+
❌ Not tracking fixes applied
|
|
290
|
+
|
|
291
|
+
## FIX PROTOCOLS:
|
|
292
|
+
|
|
293
|
+
- Make minimal, targeted changes only
|
|
294
|
+
- Don't refactor unrelated code
|
|
295
|
+
- Don't add new features while fixing
|
|
296
|
+
- Always prefer fixing source over modifying tests (unless test is wrong)
|
|
297
|
+
- **NEVER disable checks to make things pass**
|
|
298
|
+
- **If you can't fix it properly, ASK FOR HELP**
|
|
299
|
+
|
|
300
|
+
---
|
|
301
|
+
|
|
302
|
+
## NEXT STEP:
|
|
303
|
+
|
|
304
|
+
**Only if `{local_verified}` = true AND no hacks were used:**
|
|
305
|
+
Load `./step-04-commit-push.md`
|
|
306
|
+
|
|
307
|
+
**If verification keeps failing:**
|
|
308
|
+
Ask user for help - NEVER use hacks
|
|
309
|
+
|
|
310
|
+
<critical>
|
|
311
|
+
ZERO TOLERANCE FOR HACKS. Everything must genuinely pass with proper fixes. If you can't fix it properly, ask the user for help. Never bypass, skip, or disable anything.
|
|
312
|
+
</critical>
|