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
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: step-00-init
|
|
3
|
+
description: Initialize debug workflow - parse flags and setup state
|
|
4
|
+
next_step: steps/step-01-analyze.md
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Step 0: Initialization
|
|
8
|
+
|
|
9
|
+
## MANDATORY EXECUTION RULES (READ FIRST):
|
|
10
|
+
|
|
11
|
+
- 🛑 NEVER skip flag parsing
|
|
12
|
+
- ✅ ALWAYS parse `-a`/`--auto` flag before proceeding
|
|
13
|
+
- 📋 Parse ALL input before any other action
|
|
14
|
+
- 💬 FOCUS on initialization only - don't start debugging yet
|
|
15
|
+
- 🚫 FORBIDDEN to analyze errors in this step
|
|
16
|
+
|
|
17
|
+
## EXECUTION PROTOCOLS:
|
|
18
|
+
|
|
19
|
+
- 🎯 Parse flags first, then extract error context
|
|
20
|
+
- 💾 Set all state variables before proceeding
|
|
21
|
+
- 📖 Initialize state for subsequent steps
|
|
22
|
+
- 🚫 FORBIDDEN to load step-01 until init complete
|
|
23
|
+
|
|
24
|
+
## YOUR TASK:
|
|
25
|
+
|
|
26
|
+
Initialize the debug workflow by parsing flags and extracting the error context from user input.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## DEFAULTS CONFIGURATION:
|
|
31
|
+
|
|
32
|
+
| Setting | Default | Description |
|
|
33
|
+
|---------|---------|-------------|
|
|
34
|
+
| `auto_mode` | false | `-a`/`--auto`: Skip confirmations, use recommended solutions |
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## INITIALIZATION SEQUENCE:
|
|
39
|
+
|
|
40
|
+
### 1. Parse Flags and Input
|
|
41
|
+
|
|
42
|
+
**Load defaults from config above, then parse user input:**
|
|
43
|
+
|
|
44
|
+
| Flag | Action |
|
|
45
|
+
|------|--------|
|
|
46
|
+
| `-a` or `--auto` | Set `{auto_mode}` = true |
|
|
47
|
+
| Everything else | Set as `{error_context}` |
|
|
48
|
+
|
|
49
|
+
### 2. Validate Input
|
|
50
|
+
|
|
51
|
+
**If `{error_context}` is empty:**
|
|
52
|
+
→ Set `{error_context}` = "User will provide error details during analysis"
|
|
53
|
+
|
|
54
|
+
### 3. Set Initial State
|
|
55
|
+
|
|
56
|
+
Initialize all variables for the workflow:
|
|
57
|
+
|
|
58
|
+
| Variable | Initial Value |
|
|
59
|
+
|----------|---------------|
|
|
60
|
+
| `error_context` | Parsed from input |
|
|
61
|
+
| `auto_mode` | Parsed from flags |
|
|
62
|
+
| `error_analysis` | Empty (filled in step 1) |
|
|
63
|
+
| `solutions` | Empty list (filled in step 2) |
|
|
64
|
+
| `selected_solution` | Empty (filled in step 3) |
|
|
65
|
+
| `files_modified` | Empty list (filled in step 4) |
|
|
66
|
+
| `verification_result` | Empty (filled in step 5) |
|
|
67
|
+
|
|
68
|
+
### 4. Proceed to Analysis
|
|
69
|
+
|
|
70
|
+
→ Proceed directly to step-01 (no confirmation needed)
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## SUCCESS METRICS:
|
|
75
|
+
|
|
76
|
+
✅ Flags correctly parsed (`-a`/`--auto` detected)
|
|
77
|
+
✅ Error context extracted or placeholder set
|
|
78
|
+
✅ All state variables initialized
|
|
79
|
+
|
|
80
|
+
## FAILURE MODES:
|
|
81
|
+
|
|
82
|
+
❌ Proceeding without parsing flags
|
|
83
|
+
❌ Starting to analyze the error in this step
|
|
84
|
+
❌ Missing state variables for subsequent steps
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## NEXT STEP:
|
|
89
|
+
|
|
90
|
+
After initialization, load `./step-01-analyze.md`
|
|
91
|
+
|
|
92
|
+
<critical>
|
|
93
|
+
Remember: Init is ONLY about setup - don't start debugging here!
|
|
94
|
+
</critical>
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: step-01-analyze
|
|
3
|
+
description: Analyze the error in depth to understand root cause
|
|
4
|
+
prev_step: steps/step-00-init.md
|
|
5
|
+
next_step: steps/step-02-find-solutions.md
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Step 1: Analyze the Error
|
|
9
|
+
|
|
10
|
+
## MANDATORY EXECUTION RULES (READ FIRST):
|
|
11
|
+
|
|
12
|
+
- 🛑 NEVER propose solutions in this step
|
|
13
|
+
- ✅ ALWAYS gather complete error context before concluding
|
|
14
|
+
- 📋 YOU ARE AN INVESTIGATOR, not a fixer
|
|
15
|
+
- 💬 FOCUS on understanding the problem only
|
|
16
|
+
- 🚫 FORBIDDEN to make code changes
|
|
17
|
+
|
|
18
|
+
## EXECUTION PROTOCOLS:
|
|
19
|
+
|
|
20
|
+
- 🎯 Show your analysis reasoning before conclusions
|
|
21
|
+
- 💾 Document all findings in `{error_analysis}`
|
|
22
|
+
- 📖 Complete investigation before loading next step
|
|
23
|
+
- 🚫 FORBIDDEN to load step-02 until analysis is thorough
|
|
24
|
+
|
|
25
|
+
## CONTEXT BOUNDARIES:
|
|
26
|
+
|
|
27
|
+
- Variables from step-00: `{error_context}`, `{auto_mode}`
|
|
28
|
+
- Don't assume solutions exist yet
|
|
29
|
+
- Focus purely on understanding what's wrong
|
|
30
|
+
|
|
31
|
+
## YOUR TASK:
|
|
32
|
+
|
|
33
|
+
Investigate the error thoroughly to understand its root cause, affected files, and scope of impact.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## EXECUTION SEQUENCE:
|
|
38
|
+
|
|
39
|
+
### 1. Gather Error Information
|
|
40
|
+
|
|
41
|
+
**Read the COMPLETE error message first** - don't skim!
|
|
42
|
+
- Parse the exact error message and type
|
|
43
|
+
- Identify file paths and line numbers from stack trace
|
|
44
|
+
- Note any error codes, exit codes, or status
|
|
45
|
+
|
|
46
|
+
**If no specific error:**
|
|
47
|
+
- Ask user to describe exact symptoms
|
|
48
|
+
- Check `git status` and `git log --oneline -10` for recent changes
|
|
49
|
+
- Look for obvious issues in mentioned files
|
|
50
|
+
|
|
51
|
+
### 2. Reproduce the Error (CRITICAL)
|
|
52
|
+
|
|
53
|
+
<critical>
|
|
54
|
+
If you cannot reproduce consistently, you cannot verify a fix. This is non-negotiable.
|
|
55
|
+
</critical>
|
|
56
|
+
|
|
57
|
+
**Attempt reproduction:**
|
|
58
|
+
- Run the exact command/action that triggers the error
|
|
59
|
+
- Document the minimal steps to reproduce
|
|
60
|
+
- Note any conditions (environment, data, timing)
|
|
61
|
+
|
|
62
|
+
**If cannot reproduce:**
|
|
63
|
+
- **→ Trigger Log Technique**: Load `./step-01b-log-instrumentation.md`
|
|
64
|
+
- Check for Heisenbug indicators (timing-sensitive, race condition)
|
|
65
|
+
- Ask user for more context about when it occurs
|
|
66
|
+
|
|
67
|
+
<critical>
|
|
68
|
+
When reproduction fails, the Log Technique is your best tool!
|
|
69
|
+
Add strategic debug logs → User runs app → User shares output → Analyze
|
|
70
|
+
</critical>
|
|
71
|
+
|
|
72
|
+
### 3. Form Hypotheses (Ranked)
|
|
73
|
+
|
|
74
|
+
**List 3-5 possible causes in order of likelihood:**
|
|
75
|
+
|
|
76
|
+
| Rank | Hypothesis | Evidence | How to Test |
|
|
77
|
+
|------|------------|----------|-------------|
|
|
78
|
+
| Most Likely | *What you think is wrong* | *What supports this* | *How to verify/disprove* |
|
|
79
|
+
| Likely | ... | ... | ... |
|
|
80
|
+
| Possible | ... | ... | ... |
|
|
81
|
+
|
|
82
|
+
**Test hypotheses systematically** - don't jump to the first idea!
|
|
83
|
+
|
|
84
|
+
### 4. Investigate the Codebase
|
|
85
|
+
|
|
86
|
+
**Search for relevant code:**
|
|
87
|
+
- Use Grep to find related patterns
|
|
88
|
+
- Read files mentioned in error COMPLETELY
|
|
89
|
+
- Check imports and dependencies
|
|
90
|
+
- Look for similar patterns that work elsewhere
|
|
91
|
+
|
|
92
|
+
**Build context:**
|
|
93
|
+
- What function/component is failing?
|
|
94
|
+
- What data flows through this code?
|
|
95
|
+
- Check git blame: who changed this recently and why?
|
|
96
|
+
|
|
97
|
+
### 5. Identify Root Cause
|
|
98
|
+
|
|
99
|
+
**Validate against hypotheses:**
|
|
100
|
+
- Which hypothesis is confirmed/rejected by evidence?
|
|
101
|
+
- What is the immediate cause vs. deeper underlying issue?
|
|
102
|
+
- Are there related problems?
|
|
103
|
+
|
|
104
|
+
**Document your analysis with:**
|
|
105
|
+
|
|
106
|
+
| Field | Value |
|
|
107
|
+
|-------|-------|
|
|
108
|
+
| Error Type | *Type of error* |
|
|
109
|
+
| Error Message | *Exact error message* |
|
|
110
|
+
| Reproducible? | Yes / No |
|
|
111
|
+
| Reproduction Steps | *Minimal steps to trigger* |
|
|
112
|
+
| Root Cause | *What's actually causing this* |
|
|
113
|
+
| Affected Files | *List of files involved* |
|
|
114
|
+
| Scope | Localized / Widespread |
|
|
115
|
+
| Complexity | Simple / Moderate / Complex |
|
|
116
|
+
| Verification Method | *How to verify the fix works* |
|
|
117
|
+
|
|
118
|
+
**Hypotheses tested:**
|
|
119
|
+
|
|
120
|
+
| Hypothesis | Result |
|
|
121
|
+
|------------|--------|
|
|
122
|
+
| *What you thought* | Confirmed / Rejected |
|
|
123
|
+
| ... | ... |
|
|
124
|
+
|
|
125
|
+
### 6. Ask for Additional Context
|
|
126
|
+
|
|
127
|
+
**If `{auto_mode}` = true:**
|
|
128
|
+
→ Proceed to step-02 automatically
|
|
129
|
+
|
|
130
|
+
**If `{auto_mode}` = false:**
|
|
131
|
+
|
|
132
|
+
Present analysis summary, then use **AskUserQuestion** with:
|
|
133
|
+
- **Header:** "Context"
|
|
134
|
+
- **Question:** "Do you have additional information that could help with the analysis?"
|
|
135
|
+
- **Options:**
|
|
136
|
+
1. "No, continue (Recommended)" → Analysis is sufficient, proceed to find solutions
|
|
137
|
+
2. "Yes, I have more info" → Let me provide additional context
|
|
138
|
+
|
|
139
|
+
**Handle responses:**
|
|
140
|
+
- **"No, continue":** Load step-02
|
|
141
|
+
- **"Yes, I have more info":** Wait for user input, update `{error_analysis}`, then proceed to step-02
|
|
142
|
+
|
|
143
|
+
**If reproduction was impossible:**
|
|
144
|
+
→ Offer to use Log Technique (step-01b) before proceeding
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## SUCCESS METRICS:
|
|
149
|
+
|
|
150
|
+
✅ Error reproduced (or documented why it can't be)
|
|
151
|
+
✅ 3+ hypotheses formed and tested systematically
|
|
152
|
+
✅ Root cause clearly identified with evidence
|
|
153
|
+
✅ Affected files documented
|
|
154
|
+
✅ Verification method identified for later
|
|
155
|
+
✅ `{error_analysis}` state variable populated
|
|
156
|
+
|
|
157
|
+
## FAILURE MODES:
|
|
158
|
+
|
|
159
|
+
❌ Jumping to solutions without thorough analysis
|
|
160
|
+
❌ Skipping reproduction attempt
|
|
161
|
+
❌ Testing only one hypothesis (tunnel vision)
|
|
162
|
+
❌ Missing key files or dependencies in investigation
|
|
163
|
+
❌ **CRITICAL**: Making code changes in this step
|
|
164
|
+
|
|
165
|
+
## ANALYSIS PROTOCOLS:
|
|
166
|
+
|
|
167
|
+
- Read actual error messages, don't assume
|
|
168
|
+
- Check git history for recent changes that might have caused this
|
|
169
|
+
- Look at test files to understand expected behavior
|
|
170
|
+
- Don't skip investigating even if solution seems obvious
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## NEXT STEP:
|
|
175
|
+
|
|
176
|
+
After analysis confirmed, load `./step-02-find-solutions.md`
|
|
177
|
+
|
|
178
|
+
<critical>
|
|
179
|
+
Remember: This step is ONLY about analysis - don't fix or propose solutions yet!
|
|
180
|
+
</critical>
|
package/src/config/claude-code-config/skills/workflow-debug/steps/step-01b-log-instrumentation.md
ADDED
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: step-01b-log-instrumentation
|
|
3
|
+
description: Add strategic logs and collect user feedback for visibility
|
|
4
|
+
prev_step: steps/step-01-analyze.md
|
|
5
|
+
next_step: steps/step-02-find-solutions.md
|
|
6
|
+
reference: references/log-technique.md
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Step 1b: Log Instrumentation Technique
|
|
10
|
+
|
|
11
|
+
## MANDATORY EXECUTION RULES (READ FIRST):
|
|
12
|
+
|
|
13
|
+
- 🛑 NEVER propose solutions in this step
|
|
14
|
+
- ✅ ALWAYS add logs with proper prefixes `[DEBUG:xxx]`
|
|
15
|
+
- 📋 YOU ARE AN INSTRUMENTER, adding visibility to the code
|
|
16
|
+
- 💬 FOCUS on gathering runtime information only
|
|
17
|
+
- 🚫 FORBIDDEN to fix the bug or change logic
|
|
18
|
+
- 🔒 NEVER log sensitive data (passwords, tokens, PII)
|
|
19
|
+
|
|
20
|
+
## EXECUTION PROTOCOLS:
|
|
21
|
+
|
|
22
|
+
- 🎯 Show your log placement strategy before adding logs
|
|
23
|
+
- 💾 Track all added logs in `{debug_logs}` for later removal
|
|
24
|
+
- 📖 Wait for user to run and share logs before proceeding
|
|
25
|
+
- 🚫 FORBIDDEN to proceed without log output from user
|
|
26
|
+
|
|
27
|
+
## CONTEXT BOUNDARIES:
|
|
28
|
+
|
|
29
|
+
- Variables from step-01: `{error_context}`, `{auto_mode}`, `{error_analysis}`
|
|
30
|
+
- This step is OPTIONAL - only triggered when reproduction fails
|
|
31
|
+
- Load [references/log-technique.md](../references/log-technique.md) for patterns
|
|
32
|
+
|
|
33
|
+
## YOUR TASK:
|
|
34
|
+
|
|
35
|
+
Add strategic debug logs to the suspected code area and ask the user to run the application and share the log output for analysis.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## When This Step Is Triggered
|
|
40
|
+
|
|
41
|
+
This step is used when:
|
|
42
|
+
- ❌ Cannot reproduce the error directly
|
|
43
|
+
- 🌐 Bug only occurs in user's environment
|
|
44
|
+
- ⏱️ Intermittent/timing-sensitive issue
|
|
45
|
+
- 🔍 Need visibility into actual runtime behavior
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## EXECUTION SEQUENCE:
|
|
50
|
+
|
|
51
|
+
### 1. Identify Log Placement Areas
|
|
52
|
+
|
|
53
|
+
Based on `{error_analysis}`, identify where to add logs:
|
|
54
|
+
|
|
55
|
+
**Suspected Code Areas:**
|
|
56
|
+
|
|
57
|
+
| Area | File | Lines | Why Log Here |
|
|
58
|
+
|------|------|-------|--------------|
|
|
59
|
+
| Entry point | {file} | {lines} | *To confirm function is called* |
|
|
60
|
+
| Decision point | {file} | {lines} | *To see which branch is taken* |
|
|
61
|
+
| Data transformation | {file} | {lines} | *To see actual values* |
|
|
62
|
+
| Exit point | {file} | {lines} | *To see final result* |
|
|
63
|
+
|
|
64
|
+
### 2. Add Debug Logs
|
|
65
|
+
|
|
66
|
+
<critical>
|
|
67
|
+
Use the [Log Technique Reference](../references/log-technique.md) for proper formatting!
|
|
68
|
+
</critical>
|
|
69
|
+
|
|
70
|
+
**Log Prefix Convention:**
|
|
71
|
+
- `[DEBUG:entry]` - Function entry
|
|
72
|
+
- `[DEBUG:exit]` - Function exit
|
|
73
|
+
- `[DEBUG:decision]` - Conditional checks
|
|
74
|
+
- `[DEBUG:branch]` - Branch taken
|
|
75
|
+
- `[DEBUG:transform]` - Data changes
|
|
76
|
+
- `[DEBUG:async]` - Async operations
|
|
77
|
+
- `[DEBUG:state]` - State snapshots
|
|
78
|
+
- `[DEBUG:error]` - Caught errors
|
|
79
|
+
|
|
80
|
+
**For each log added, track it:**
|
|
81
|
+
|
|
82
|
+
| # | File | Line | Prefix | Purpose |
|
|
83
|
+
|---|------|------|--------|---------|
|
|
84
|
+
| 1 | {path} | {line} | `[DEBUG:entry]` | *What you're checking* |
|
|
85
|
+
| 2 | {path} | {line} | `[DEBUG:decision]` | *What condition* |
|
|
86
|
+
| 3 | ... | ... | ... | ... |
|
|
87
|
+
|
|
88
|
+
**Example Implementation:**
|
|
89
|
+
|
|
90
|
+
```javascript
|
|
91
|
+
// At function entry
|
|
92
|
+
console.log('[DEBUG:entry] processOrder', {
|
|
93
|
+
timestamp: new Date().toISOString(),
|
|
94
|
+
orderId: order.id,
|
|
95
|
+
itemCount: order.items.length
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
// At decision point
|
|
99
|
+
console.log('[DEBUG:decision] validateOrder', {
|
|
100
|
+
isValid: order.items.length > 0,
|
|
101
|
+
hasPayment: !!order.paymentMethod
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
// At async boundary
|
|
105
|
+
console.log('[DEBUG:async:start] fetchInventory', { time: Date.now() });
|
|
106
|
+
const inventory = await fetchInventory(order.items);
|
|
107
|
+
console.log('[DEBUG:async:end] fetchInventory', {
|
|
108
|
+
time: Date.now(),
|
|
109
|
+
found: inventory.length
|
|
110
|
+
});
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### 3. Security Check
|
|
114
|
+
|
|
115
|
+
<critical>
|
|
116
|
+
Before asking user to run, verify NO sensitive data is logged!
|
|
117
|
+
</critical>
|
|
118
|
+
|
|
119
|
+
**Checklist:**
|
|
120
|
+
- [ ] No passwords or tokens
|
|
121
|
+
- [ ] No API keys or secrets
|
|
122
|
+
- [ ] No personal identifiable information (PII)
|
|
123
|
+
- [ ] No credit card numbers
|
|
124
|
+
- [ ] No session IDs
|
|
125
|
+
|
|
126
|
+
**If sensitive data needed, sanitize:**
|
|
127
|
+
```javascript
|
|
128
|
+
// BAD
|
|
129
|
+
console.log('[DEBUG]', { password });
|
|
130
|
+
|
|
131
|
+
// GOOD
|
|
132
|
+
console.log('[DEBUG]', {
|
|
133
|
+
passwordProvided: !!password,
|
|
134
|
+
passwordLength: password?.length
|
|
135
|
+
});
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### 4. Ask User to Run and Share Logs
|
|
139
|
+
|
|
140
|
+
**If `{auto_mode}` = true:**
|
|
141
|
+
→ Skip this step entirely - cannot use log technique in auto mode
|
|
142
|
+
→ Proceed to step-02 with best available analysis
|
|
143
|
+
|
|
144
|
+
**If `{auto_mode}` = false:**
|
|
145
|
+
|
|
146
|
+
Present summary of added logs, then use **AskUserQuestion**:
|
|
147
|
+
|
|
148
|
+
```yaml
|
|
149
|
+
questions:
|
|
150
|
+
- header: "Run App"
|
|
151
|
+
question: "I've added {N} debug logs to track the issue. Please run the application, reproduce the error, and paste the console output back here. Ready?"
|
|
152
|
+
options:
|
|
153
|
+
- label: "I'll run it now (Recommended)"
|
|
154
|
+
description: "I'll execute the app and share the logs"
|
|
155
|
+
- label: "Logs aren't in right place"
|
|
156
|
+
description: "I think the problem is elsewhere"
|
|
157
|
+
- label: "Can't run it now"
|
|
158
|
+
description: "I'll do this later or skip"
|
|
159
|
+
multiSelect: false
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
**Handle responses:**
|
|
163
|
+
- **"I'll run it now":** Wait for user to paste logs, then proceed to Analysis
|
|
164
|
+
- **"Logs aren't in right place":** Ask where they think the issue is, add logs there
|
|
165
|
+
- **"Can't run it now":** Proceed to step-02 with current analysis
|
|
166
|
+
|
|
167
|
+
### 5. Analyze Returned Logs
|
|
168
|
+
|
|
169
|
+
When user shares logs:
|
|
170
|
+
|
|
171
|
+
**Parse the output:**
|
|
172
|
+
1. Look for all `[DEBUG:xxx]` lines
|
|
173
|
+
2. Check execution order (timestamps if present)
|
|
174
|
+
3. Identify unexpected values or missing logs
|
|
175
|
+
4. Note which branches were taken
|
|
176
|
+
|
|
177
|
+
**Log Analysis:**
|
|
178
|
+
|
|
179
|
+
| Log | Expected | Actual | Insight |
|
|
180
|
+
|-----|----------|--------|---------|
|
|
181
|
+
| `[DEBUG:entry] func` | Called once | Called 3x | *Unexpected multiple calls* |
|
|
182
|
+
| `[DEBUG:decision] check` | `true` | `false` | *Condition failing* |
|
|
183
|
+
| `[DEBUG:async:end]` | Present | Missing | *Promise never resolved* |
|
|
184
|
+
|
|
185
|
+
**Update `{error_analysis}` with findings:**
|
|
186
|
+
- What the logs revealed
|
|
187
|
+
- Root cause (if now clear)
|
|
188
|
+
- Any remaining unknowns
|
|
189
|
+
|
|
190
|
+
### 6. Decide Next Action
|
|
191
|
+
|
|
192
|
+
**Use AskUserQuestion:**
|
|
193
|
+
|
|
194
|
+
```yaml
|
|
195
|
+
questions:
|
|
196
|
+
- header: "Analysis"
|
|
197
|
+
question: "Based on the logs, I found: [summary]. What would you like to do?"
|
|
198
|
+
options:
|
|
199
|
+
- label: "Proceed to fix (Recommended)"
|
|
200
|
+
description: "The root cause is clear, let's find solutions"
|
|
201
|
+
- label: "Add more logs"
|
|
202
|
+
description: "Need deeper visibility in another area"
|
|
203
|
+
- label: "Different area"
|
|
204
|
+
description: "The problem seems to be elsewhere"
|
|
205
|
+
multiSelect: false
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
**Handle responses:**
|
|
209
|
+
- **"Proceed to fix":** Update `{error_analysis}`, go to step-02
|
|
210
|
+
- **"Add more logs":** Return to step 2, add more targeted logs
|
|
211
|
+
- **"Different area":** Update suspected area, return to step 2
|
|
212
|
+
|
|
213
|
+
### 7. Track Logs for Cleanup
|
|
214
|
+
|
|
215
|
+
**Store in `{debug_logs}` for later removal:**
|
|
216
|
+
|
|
217
|
+
```yaml
|
|
218
|
+
debug_logs:
|
|
219
|
+
- file: "src/api.ts"
|
|
220
|
+
line: 45
|
|
221
|
+
prefix: "[DEBUG:entry]"
|
|
222
|
+
- file: "src/api.ts"
|
|
223
|
+
line: 52
|
|
224
|
+
prefix: "[DEBUG:exit]"
|
|
225
|
+
- file: "src/utils.ts"
|
|
226
|
+
line: 23
|
|
227
|
+
prefix: "[DEBUG:transform]"
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
<critical>
|
|
231
|
+
These logs MUST be removed in step-04-fix or step-05-verify!
|
|
232
|
+
</critical>
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## SUCCESS METRICS:
|
|
237
|
+
|
|
238
|
+
✅ Strategic logs added at key checkpoints
|
|
239
|
+
✅ All added logs tracked in `{debug_logs}`
|
|
240
|
+
✅ No sensitive data in logs
|
|
241
|
+
✅ User ran app and shared log output
|
|
242
|
+
✅ Log output analyzed for insights
|
|
243
|
+
✅ `{error_analysis}` updated with findings
|
|
244
|
+
✅ Root cause clearer than before
|
|
245
|
+
|
|
246
|
+
## FAILURE MODES:
|
|
247
|
+
|
|
248
|
+
❌ Adding logs without a clear strategy
|
|
249
|
+
❌ Logging sensitive data (passwords, tokens, PII)
|
|
250
|
+
❌ Not tracking logs for later removal
|
|
251
|
+
❌ Proceeding without user log output (unless auto mode)
|
|
252
|
+
❌ **CRITICAL**: Making code fixes in this step
|
|
253
|
+
❌ **CRITICAL**: Not asking user to run and share logs
|
|
254
|
+
|
|
255
|
+
## STATE UPDATES:
|
|
256
|
+
|
|
257
|
+
After this step, ensure:
|
|
258
|
+
- `{error_analysis}` includes log findings
|
|
259
|
+
- `{debug_logs}` lists all added logs for cleanup
|
|
260
|
+
- Decision recorded on whether to iterate or proceed
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
## NEXT STEP:
|
|
265
|
+
|
|
266
|
+
After log analysis complete, load `./step-02-find-solutions.md`
|
|
267
|
+
|
|
268
|
+
<critical>
|
|
269
|
+
Remember: This step is about VISIBILITY - don't fix anything yet!
|
|
270
|
+
All debug logs MUST be removed later - track them carefully!
|
|
271
|
+
</critical>
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: step-02-find-solutions
|
|
3
|
+
description: Research and identify potential solutions to the error
|
|
4
|
+
prev_step: steps/step-01-analyze.md
|
|
5
|
+
next_step: steps/step-03-propose.md
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Step 2: Find Solutions
|
|
9
|
+
|
|
10
|
+
## MANDATORY EXECUTION RULES (READ FIRST):
|
|
11
|
+
|
|
12
|
+
- 🛑 NEVER implement solutions in this step
|
|
13
|
+
- ✅ ALWAYS find at least 2-3 potential solutions
|
|
14
|
+
- 📋 YOU ARE A RESEARCHER, not an implementer
|
|
15
|
+
- 💬 FOCUS on identifying options only
|
|
16
|
+
- 🚫 FORBIDDEN to modify any files
|
|
17
|
+
|
|
18
|
+
## EXECUTION PROTOCOLS:
|
|
19
|
+
|
|
20
|
+
- 🎯 Research thoroughly before listing solutions
|
|
21
|
+
- 💾 Document each solution with pros/cons in `{solutions}`
|
|
22
|
+
- 📖 Complete solution research before loading next step
|
|
23
|
+
- 🚫 FORBIDDEN to load step-03 until multiple solutions identified
|
|
24
|
+
|
|
25
|
+
## CONTEXT BOUNDARIES:
|
|
26
|
+
|
|
27
|
+
- Variables from previous steps: `{error_context}`, `{auto_mode}`, `{error_analysis}`
|
|
28
|
+
- Use analysis to guide solution research
|
|
29
|
+
- Don't assume one solution is best yet
|
|
30
|
+
|
|
31
|
+
## YOUR TASK:
|
|
32
|
+
|
|
33
|
+
Research and identify multiple potential solutions to the error, documenting trade-offs for each.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Available State
|
|
38
|
+
|
|
39
|
+
From previous steps:
|
|
40
|
+
|
|
41
|
+
| Variable | Description |
|
|
42
|
+
|----------|-------------|
|
|
43
|
+
| `{error_context}` | Original error description |
|
|
44
|
+
| `{auto_mode}` | Skip confirmations flag |
|
|
45
|
+
| `{error_analysis}` | Analysis from step 1 with root cause, affected files |
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## EXECUTION SEQUENCE:
|
|
50
|
+
|
|
51
|
+
### 1. Review Analysis
|
|
52
|
+
|
|
53
|
+
**Load from `{error_analysis}`:**
|
|
54
|
+
- Root cause identified
|
|
55
|
+
- Affected files list
|
|
56
|
+
- Error complexity
|
|
57
|
+
|
|
58
|
+
### 2. Research Solutions
|
|
59
|
+
|
|
60
|
+
**For each potential fix approach:**
|
|
61
|
+
|
|
62
|
+
**Search codebase for patterns:**
|
|
63
|
+
- How are similar issues handled elsewhere?
|
|
64
|
+
- Are there existing utilities or helpers to use?
|
|
65
|
+
- What patterns does the codebase follow?
|
|
66
|
+
|
|
67
|
+
**Consider solution types:**
|
|
68
|
+
1. **Quick fix** - Minimal change to resolve immediate issue
|
|
69
|
+
2. **Proper fix** - Address root cause properly
|
|
70
|
+
3. **Refactor fix** - Improve architecture while fixing
|
|
71
|
+
|
|
72
|
+
### 3. Document Solutions
|
|
73
|
+
|
|
74
|
+
**For each solution found (minimum 2, ideally 3-4), document:**
|
|
75
|
+
|
|
76
|
+
#### Solution 1: *Name*
|
|
77
|
+
|
|
78
|
+
| Field | Value |
|
|
79
|
+
|-------|-------|
|
|
80
|
+
| **Approach** | *What this solution does* |
|
|
81
|
+
| **Files to modify** | *file1, file2, ...* |
|
|
82
|
+
| **Effort** | Low / Medium / High |
|
|
83
|
+
| **Risk** | Low / Medium / High |
|
|
84
|
+
| **Recommended?** | Yes / No |
|
|
85
|
+
|
|
86
|
+
**Pros:**
|
|
87
|
+
- Advantage 1
|
|
88
|
+
- Advantage 2
|
|
89
|
+
|
|
90
|
+
**Cons:**
|
|
91
|
+
- Disadvantage 1
|
|
92
|
+
|
|
93
|
+
*(Repeat for each solution)*
|
|
94
|
+
|
|
95
|
+
### 4. Rank Solutions
|
|
96
|
+
|
|
97
|
+
**Determine recommendation based on:**
|
|
98
|
+
- Balance of effort vs. completeness
|
|
99
|
+
- Risk of introducing new bugs
|
|
100
|
+
- Alignment with codebase patterns
|
|
101
|
+
- Long-term maintainability
|
|
102
|
+
|
|
103
|
+
**Mark ONE solution as recommended**
|
|
104
|
+
|
|
105
|
+
### 5. Proceed to Proposal
|
|
106
|
+
|
|
107
|
+
→ Proceed directly to step-03 (no confirmation needed)
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## SUCCESS METRICS:
|
|
112
|
+
|
|
113
|
+
✅ At least 2 distinct solutions identified
|
|
114
|
+
✅ Each solution has pros/cons documented
|
|
115
|
+
✅ Effort and risk assessed for each
|
|
116
|
+
✅ One solution marked as recommended
|
|
117
|
+
✅ `{solutions}` state variable populated
|
|
118
|
+
|
|
119
|
+
## FAILURE MODES:
|
|
120
|
+
|
|
121
|
+
❌ Only finding one solution
|
|
122
|
+
❌ Missing pros/cons analysis
|
|
123
|
+
❌ Not identifying affected files for each solution
|
|
124
|
+
❌ **CRITICAL**: Implementing any solution in this step
|
|
125
|
+
|
|
126
|
+
## RESEARCH PROTOCOLS:
|
|
127
|
+
|
|
128
|
+
- Check how similar code handles edge cases
|
|
129
|
+
- Look for tests that might guide the solution
|
|
130
|
+
- Consider backwards compatibility
|
|
131
|
+
- Don't overlook simple solutions
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## NEXT STEP:
|
|
136
|
+
|
|
137
|
+
After solutions documented, load `./step-03-propose.md`
|
|
138
|
+
|
|
139
|
+
<critical>
|
|
140
|
+
Remember: This step is ONLY about finding options - don't implement or choose yet!
|
|
141
|
+
</critical>
|