@codyswann/lisa 1.56.0 → 1.56.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +11 -5
- package/all/merge/.claude/settings.json +7 -0
- package/package.json +1 -1
- package/plugins/lisa/.claude-plugin/plugin.json +148 -0
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +3 -159
- package/plugins/lisa-expo/.claude-plugin/plugin.json +2 -146
- package/plugins/lisa-expo/commands/jira/add-journey.md +1 -1
- package/plugins/lisa-expo/commands/jira/create.md +1 -1
- package/plugins/lisa-expo/commands/jira/evidence.md +1 -1
- package/plugins/lisa-expo/commands/jira/journey.md +1 -1
- package/plugins/lisa-expo/commands/jira/verify.md +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +3 -159
- package/plugins/lisa-rails/.claude-plugin/plugin.json +2 -120
- package/plugins/lisa-rails/commands/jira/add-journey.md +1 -1
- package/plugins/lisa-rails/commands/jira/create.md +1 -1
- package/plugins/lisa-rails/commands/jira/evidence.md +1 -1
- package/plugins/lisa-rails/commands/jira/journey.md +1 -1
- package/plugins/lisa-rails/commands/jira/verify.md +1 -1
- package/plugins/lisa-rails/commands/plan/add-test-coverage.md +1 -1
- package/plugins/lisa-rails/commands/plan/fix-linter-error.md +1 -1
- package/plugins/lisa-rails/commands/plan/lower-code-complexity.md +1 -1
- package/plugins/lisa-rails/commands/plan/reduce-max-lines-per-function.md +1 -1
- package/plugins/lisa-rails/commands/plan/reduce-max-lines.md +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +2 -127
- package/plugins/src/base/.claude-plugin/plugin.json +78 -0
- package/plugins/src/cdk/.claude-plugin/plugin.json +2 -81
- package/plugins/src/expo/.claude-plugin/plugin.json +1 -68
- package/plugins/{lisa-typescript → src/expo}/commands/jira/add-journey.md +1 -1
- package/plugins/{lisa-nestjs → src/expo}/commands/jira/create.md +1 -1
- package/plugins/{lisa-nestjs → src/expo}/commands/jira/evidence.md +1 -1
- package/plugins/{lisa-nestjs → src/expo}/commands/jira/journey.md +1 -1
- package/plugins/{lisa-nestjs → src/expo}/commands/jira/verify.md +1 -1
- package/plugins/src/nestjs/.claude-plugin/plugin.json +2 -81
- package/plugins/src/rails/.claude-plugin/plugin.json +1 -59
- package/plugins/{lisa-nestjs → src/rails}/commands/jira/add-journey.md +1 -1
- package/plugins/{lisa-typescript → src/rails}/commands/jira/create.md +1 -1
- package/plugins/{lisa-typescript → src/rails}/commands/jira/evidence.md +1 -1
- package/plugins/{lisa-typescript → src/rails}/commands/jira/journey.md +1 -1
- package/plugins/{lisa-typescript → src/rails}/commands/jira/verify.md +1 -1
- package/plugins/{lisa-expo → src/rails}/commands/plan/add-test-coverage.md +1 -1
- package/plugins/{lisa-expo → src/rails}/commands/plan/fix-linter-error.md +1 -1
- package/plugins/{lisa-expo → src/rails}/commands/plan/lower-code-complexity.md +1 -1
- package/plugins/{lisa-expo → src/rails}/commands/plan/reduce-max-lines-per-function.md +1 -1
- package/plugins/{lisa-expo → src/rails}/commands/plan/reduce-max-lines.md +1 -1
- package/plugins/src/typescript/.claude-plugin/plugin.json +1 -58
- package/scripts/build-plugins.sh +30 -17
- package/scripts/install-claude-plugins.sh +28 -11
- package/typescript/merge/.claude/settings.json +2 -2
- package/typescript/package-lisa/package.lisa.json +2 -1
- package/plugins/lisa-expo/agents/agent-architect.md +0 -310
- package/plugins/lisa-expo/agents/architecture-specialist.md +0 -53
- package/plugins/lisa-expo/agents/debug-specialist.md +0 -204
- package/plugins/lisa-expo/agents/git-history-analyzer.md +0 -183
- package/plugins/lisa-expo/agents/hooks-expert.md +0 -74
- package/plugins/lisa-expo/agents/implementer.md +0 -54
- package/plugins/lisa-expo/agents/learner.md +0 -44
- package/plugins/lisa-expo/agents/performance-specialist.md +0 -95
- package/plugins/lisa-expo/agents/product-specialist.md +0 -72
- package/plugins/lisa-expo/agents/quality-specialist.md +0 -55
- package/plugins/lisa-expo/agents/security-specialist.md +0 -58
- package/plugins/lisa-expo/agents/skill-evaluator.md +0 -246
- package/plugins/lisa-expo/agents/slash-command-architect.md +0 -87
- package/plugins/lisa-expo/agents/test-specialist.md +0 -64
- package/plugins/lisa-expo/agents/verification-specialist.md +0 -189
- package/plugins/lisa-expo/agents/web-search-researcher.md +0 -112
- package/plugins/lisa-expo/commands/git/commit-and-submit-pr.md +0 -7
- package/plugins/lisa-expo/commands/git/commit-submit-pr-and-verify.md +0 -7
- package/plugins/lisa-expo/commands/git/commit-submit-pr-deploy-and-verify.md +0 -7
- package/plugins/lisa-expo/commands/git/commit.md +0 -7
- package/plugins/lisa-expo/commands/git/prune.md +0 -6
- package/plugins/lisa-expo/commands/git/submit-pr.md +0 -7
- package/plugins/lisa-expo/commands/jira/fix.md +0 -7
- package/plugins/lisa-expo/commands/jira/implement.md +0 -7
- package/plugins/lisa-expo/commands/jira/sync.md +0 -7
- package/plugins/lisa-expo/commands/plan/create.md +0 -6
- package/plugins/lisa-expo/commands/plan/execute.md +0 -7
- package/plugins/lisa-expo/commands/plan/local-code-review.md +0 -6
- package/plugins/lisa-expo/commands/pull-request/review.md +0 -7
- package/plugins/lisa-expo/commands/review/implementation.md +0 -7
- package/plugins/lisa-expo/commands/security/zap-scan.md +0 -6
- package/plugins/lisa-expo/commands/sonarqube/check.md +0 -6
- package/plugins/lisa-expo/commands/sonarqube/fix.md +0 -6
- package/plugins/lisa-expo/commands/tasks/load.md +0 -7
- package/plugins/lisa-expo/commands/tasks/sync.md +0 -7
- package/plugins/lisa-expo/hooks/debug-hook.sh +0 -47
- package/plugins/lisa-expo/hooks/enforce-plan-rules.sh +0 -15
- package/plugins/lisa-expo/hooks/format-on-edit.sh +0 -76
- package/plugins/lisa-expo/hooks/install-pkgs.sh +0 -64
- package/plugins/lisa-expo/hooks/lint-on-edit.sh +0 -81
- package/plugins/lisa-expo/hooks/notify-ntfy.sh +0 -183
- package/plugins/lisa-expo/hooks/setup-jira-cli.sh +0 -52
- package/plugins/lisa-expo/hooks/sg-scan-on-edit.sh +0 -68
- package/plugins/lisa-expo/hooks/sync-tasks.sh +0 -107
- package/plugins/lisa-expo/hooks/ticket-sync-reminder.sh +0 -23
- package/plugins/lisa-expo/hooks/track-plan-sessions.sh +0 -164
- package/plugins/lisa-expo/hooks/verify-completion.sh +0 -77
- package/plugins/lisa-expo/rules/README.md +0 -240
- package/plugins/lisa-expo/rules/coding-philosophy.md +0 -428
- package/plugins/lisa-expo/rules/lisa.md +0 -37
- package/plugins/lisa-expo/rules/verfication.md +0 -596
- package/plugins/lisa-expo/skills/agent-design-best-practices/SKILL.md +0 -219
- package/plugins/lisa-expo/skills/git-commit/SKILL.md +0 -48
- package/plugins/lisa-expo/skills/git-commit-and-submit-pr/SKILL.md +0 -8
- package/plugins/lisa-expo/skills/git-commit-submit-pr-and-verify/SKILL.md +0 -7
- package/plugins/lisa-expo/skills/git-commit-submit-pr-deploy-and-verify/SKILL.md +0 -7
- package/plugins/lisa-expo/skills/git-prune/SKILL.md +0 -35
- package/plugins/lisa-expo/skills/git-submit-pr/SKILL.md +0 -44
- package/plugins/lisa-expo/skills/jira-fix/SKILL.md +0 -16
- package/plugins/lisa-expo/skills/jira-implement/SKILL.md +0 -18
- package/plugins/lisa-expo/skills/jira-sync/SKILL.md +0 -63
- package/plugins/lisa-expo/skills/jsdoc-best-practices/SKILL.md +0 -432
- package/plugins/lisa-expo/skills/lisa-review-implementation/SKILL.md +0 -209
- package/plugins/lisa-expo/skills/plan-add-test-coverage/SKILL.md +0 -44
- package/plugins/lisa-expo/skills/plan-execute/SKILL.md +0 -89
- package/plugins/lisa-expo/skills/plan-fix-linter-error/SKILL.md +0 -45
- package/plugins/lisa-expo/skills/plan-local-code-review/SKILL.md +0 -88
- package/plugins/lisa-expo/skills/plan-lower-code-complexity/SKILL.md +0 -44
- package/plugins/lisa-expo/skills/plan-reduce-max-lines/SKILL.md +0 -45
- package/plugins/lisa-expo/skills/plan-reduce-max-lines-per-function/SKILL.md +0 -46
- package/plugins/lisa-expo/skills/pull-request-review/SKILL.md +0 -68
- package/plugins/lisa-expo/skills/security-zap-scan/SKILL.md +0 -33
- package/plugins/lisa-expo/skills/sonarqube-check/SKILL.md +0 -11
- package/plugins/lisa-expo/skills/sonarqube-fix/SKILL.md +0 -8
- package/plugins/lisa-expo/skills/tasks-load/SKILL.md +0 -88
- package/plugins/lisa-expo/skills/tasks-sync/SKILL.md +0 -108
- package/plugins/lisa-nestjs/agents/agent-architect.md +0 -310
- package/plugins/lisa-nestjs/agents/architecture-specialist.md +0 -53
- package/plugins/lisa-nestjs/agents/debug-specialist.md +0 -204
- package/plugins/lisa-nestjs/agents/git-history-analyzer.md +0 -183
- package/plugins/lisa-nestjs/agents/hooks-expert.md +0 -74
- package/plugins/lisa-nestjs/agents/implementer.md +0 -54
- package/plugins/lisa-nestjs/agents/learner.md +0 -44
- package/plugins/lisa-nestjs/agents/performance-specialist.md +0 -95
- package/plugins/lisa-nestjs/agents/product-specialist.md +0 -72
- package/plugins/lisa-nestjs/agents/quality-specialist.md +0 -55
- package/plugins/lisa-nestjs/agents/security-specialist.md +0 -58
- package/plugins/lisa-nestjs/agents/skill-evaluator.md +0 -246
- package/plugins/lisa-nestjs/agents/slash-command-architect.md +0 -87
- package/plugins/lisa-nestjs/agents/test-specialist.md +0 -64
- package/plugins/lisa-nestjs/agents/verification-specialist.md +0 -189
- package/plugins/lisa-nestjs/agents/web-search-researcher.md +0 -112
- package/plugins/lisa-nestjs/commands/git/commit-and-submit-pr.md +0 -7
- package/plugins/lisa-nestjs/commands/git/commit-submit-pr-and-verify.md +0 -7
- package/plugins/lisa-nestjs/commands/git/commit-submit-pr-deploy-and-verify.md +0 -7
- package/plugins/lisa-nestjs/commands/git/commit.md +0 -7
- package/plugins/lisa-nestjs/commands/git/prune.md +0 -6
- package/plugins/lisa-nestjs/commands/git/submit-pr.md +0 -7
- package/plugins/lisa-nestjs/commands/jira/fix.md +0 -7
- package/plugins/lisa-nestjs/commands/jira/implement.md +0 -7
- package/plugins/lisa-nestjs/commands/jira/sync.md +0 -7
- package/plugins/lisa-nestjs/commands/plan/add-test-coverage.md +0 -7
- package/plugins/lisa-nestjs/commands/plan/create.md +0 -6
- package/plugins/lisa-nestjs/commands/plan/execute.md +0 -7
- package/plugins/lisa-nestjs/commands/plan/fix-linter-error.md +0 -7
- package/plugins/lisa-nestjs/commands/plan/local-code-review.md +0 -6
- package/plugins/lisa-nestjs/commands/plan/lower-code-complexity.md +0 -6
- package/plugins/lisa-nestjs/commands/plan/reduce-max-lines-per-function.md +0 -7
- package/plugins/lisa-nestjs/commands/plan/reduce-max-lines.md +0 -7
- package/plugins/lisa-nestjs/commands/pull-request/review.md +0 -7
- package/plugins/lisa-nestjs/commands/review/implementation.md +0 -7
- package/plugins/lisa-nestjs/commands/security/zap-scan.md +0 -6
- package/plugins/lisa-nestjs/commands/sonarqube/check.md +0 -6
- package/plugins/lisa-nestjs/commands/sonarqube/fix.md +0 -6
- package/plugins/lisa-nestjs/commands/tasks/load.md +0 -7
- package/plugins/lisa-nestjs/commands/tasks/sync.md +0 -7
- package/plugins/lisa-nestjs/hooks/debug-hook.sh +0 -47
- package/plugins/lisa-nestjs/hooks/enforce-plan-rules.sh +0 -15
- package/plugins/lisa-nestjs/hooks/format-on-edit.sh +0 -76
- package/plugins/lisa-nestjs/hooks/install-pkgs.sh +0 -64
- package/plugins/lisa-nestjs/hooks/lint-on-edit.sh +0 -81
- package/plugins/lisa-nestjs/hooks/notify-ntfy.sh +0 -183
- package/plugins/lisa-nestjs/hooks/setup-jira-cli.sh +0 -52
- package/plugins/lisa-nestjs/hooks/sg-scan-on-edit.sh +0 -68
- package/plugins/lisa-nestjs/hooks/sync-tasks.sh +0 -107
- package/plugins/lisa-nestjs/hooks/ticket-sync-reminder.sh +0 -23
- package/plugins/lisa-nestjs/hooks/track-plan-sessions.sh +0 -164
- package/plugins/lisa-nestjs/hooks/verify-completion.sh +0 -77
- package/plugins/lisa-nestjs/rules/README.md +0 -240
- package/plugins/lisa-nestjs/rules/coding-philosophy.md +0 -428
- package/plugins/lisa-nestjs/rules/lisa.md +0 -37
- package/plugins/lisa-nestjs/rules/verfication.md +0 -596
- package/plugins/lisa-nestjs/skills/agent-design-best-practices/SKILL.md +0 -219
- package/plugins/lisa-nestjs/skills/git-commit/SKILL.md +0 -48
- package/plugins/lisa-nestjs/skills/git-commit-and-submit-pr/SKILL.md +0 -8
- package/plugins/lisa-nestjs/skills/git-commit-submit-pr-and-verify/SKILL.md +0 -7
- package/plugins/lisa-nestjs/skills/git-commit-submit-pr-deploy-and-verify/SKILL.md +0 -7
- package/plugins/lisa-nestjs/skills/git-prune/SKILL.md +0 -35
- package/plugins/lisa-nestjs/skills/git-submit-pr/SKILL.md +0 -44
- package/plugins/lisa-nestjs/skills/jira-add-journey/SKILL.md +0 -120
- package/plugins/lisa-nestjs/skills/jira-create/SKILL.md +0 -95
- package/plugins/lisa-nestjs/skills/jira-evidence/SKILL.md +0 -73
- package/plugins/lisa-nestjs/skills/jira-evidence/scripts/post-evidence.sh +0 -163
- package/plugins/lisa-nestjs/skills/jira-fix/SKILL.md +0 -16
- package/plugins/lisa-nestjs/skills/jira-implement/SKILL.md +0 -18
- package/plugins/lisa-nestjs/skills/jira-journey/SKILL.md +0 -125
- package/plugins/lisa-nestjs/skills/jira-journey/scripts/generate-templates.py +0 -233
- package/plugins/lisa-nestjs/skills/jira-journey/scripts/parse-plan.py +0 -368
- package/plugins/lisa-nestjs/skills/jira-sync/SKILL.md +0 -63
- package/plugins/lisa-nestjs/skills/jira-verify/SKILL.md +0 -48
- package/plugins/lisa-nestjs/skills/jsdoc-best-practices/SKILL.md +0 -432
- package/plugins/lisa-nestjs/skills/lisa-review-implementation/SKILL.md +0 -209
- package/plugins/lisa-nestjs/skills/plan-add-test-coverage/SKILL.md +0 -44
- package/plugins/lisa-nestjs/skills/plan-execute/SKILL.md +0 -89
- package/plugins/lisa-nestjs/skills/plan-fix-linter-error/SKILL.md +0 -45
- package/plugins/lisa-nestjs/skills/plan-local-code-review/SKILL.md +0 -88
- package/plugins/lisa-nestjs/skills/plan-lower-code-complexity/SKILL.md +0 -44
- package/plugins/lisa-nestjs/skills/plan-reduce-max-lines/SKILL.md +0 -45
- package/plugins/lisa-nestjs/skills/plan-reduce-max-lines-per-function/SKILL.md +0 -46
- package/plugins/lisa-nestjs/skills/pull-request-review/SKILL.md +0 -68
- package/plugins/lisa-nestjs/skills/security-zap-scan/SKILL.md +0 -33
- package/plugins/lisa-nestjs/skills/sonarqube-check/SKILL.md +0 -11
- package/plugins/lisa-nestjs/skills/sonarqube-fix/SKILL.md +0 -8
- package/plugins/lisa-nestjs/skills/tasks-load/SKILL.md +0 -88
- package/plugins/lisa-nestjs/skills/tasks-sync/SKILL.md +0 -108
- package/plugins/lisa-rails/agents/agent-architect.md +0 -310
- package/plugins/lisa-rails/agents/architecture-specialist.md +0 -53
- package/plugins/lisa-rails/agents/debug-specialist.md +0 -204
- package/plugins/lisa-rails/agents/git-history-analyzer.md +0 -183
- package/plugins/lisa-rails/agents/hooks-expert.md +0 -74
- package/plugins/lisa-rails/agents/implementer.md +0 -54
- package/plugins/lisa-rails/agents/learner.md +0 -44
- package/plugins/lisa-rails/agents/performance-specialist.md +0 -95
- package/plugins/lisa-rails/agents/product-specialist.md +0 -72
- package/plugins/lisa-rails/agents/quality-specialist.md +0 -55
- package/plugins/lisa-rails/agents/security-specialist.md +0 -58
- package/plugins/lisa-rails/agents/skill-evaluator.md +0 -246
- package/plugins/lisa-rails/agents/slash-command-architect.md +0 -87
- package/plugins/lisa-rails/agents/test-specialist.md +0 -64
- package/plugins/lisa-rails/agents/verification-specialist.md +0 -189
- package/plugins/lisa-rails/agents/web-search-researcher.md +0 -112
- package/plugins/lisa-rails/commands/git/commit-and-submit-pr.md +0 -7
- package/plugins/lisa-rails/commands/git/commit-submit-pr-and-verify.md +0 -7
- package/plugins/lisa-rails/commands/git/commit-submit-pr-deploy-and-verify.md +0 -7
- package/plugins/lisa-rails/commands/git/commit.md +0 -7
- package/plugins/lisa-rails/commands/git/prune.md +0 -6
- package/plugins/lisa-rails/commands/git/submit-pr.md +0 -7
- package/plugins/lisa-rails/commands/jira/fix.md +0 -7
- package/plugins/lisa-rails/commands/jira/implement.md +0 -7
- package/plugins/lisa-rails/commands/jira/sync.md +0 -7
- package/plugins/lisa-rails/commands/plan/create.md +0 -6
- package/plugins/lisa-rails/commands/plan/execute.md +0 -7
- package/plugins/lisa-rails/commands/plan/local-code-review.md +0 -6
- package/plugins/lisa-rails/commands/pull-request/review.md +0 -7
- package/plugins/lisa-rails/commands/review/implementation.md +0 -7
- package/plugins/lisa-rails/commands/security/zap-scan.md +0 -6
- package/plugins/lisa-rails/commands/sonarqube/check.md +0 -6
- package/plugins/lisa-rails/commands/sonarqube/fix.md +0 -6
- package/plugins/lisa-rails/commands/tasks/load.md +0 -7
- package/plugins/lisa-rails/commands/tasks/sync.md +0 -7
- package/plugins/lisa-rails/hooks/debug-hook.sh +0 -47
- package/plugins/lisa-rails/hooks/enforce-plan-rules.sh +0 -15
- package/plugins/lisa-rails/hooks/format-on-edit.sh +0 -76
- package/plugins/lisa-rails/hooks/install-pkgs.sh +0 -64
- package/plugins/lisa-rails/hooks/lint-on-edit.sh +0 -81
- package/plugins/lisa-rails/hooks/notify-ntfy.sh +0 -183
- package/plugins/lisa-rails/hooks/setup-jira-cli.sh +0 -52
- package/plugins/lisa-rails/hooks/sg-scan-on-edit.sh +0 -68
- package/plugins/lisa-rails/hooks/sync-tasks.sh +0 -107
- package/plugins/lisa-rails/hooks/ticket-sync-reminder.sh +0 -23
- package/plugins/lisa-rails/hooks/track-plan-sessions.sh +0 -164
- package/plugins/lisa-rails/hooks/verify-completion.sh +0 -77
- package/plugins/lisa-rails/rules/README.md +0 -240
- package/plugins/lisa-rails/rules/coding-philosophy.md +0 -428
- package/plugins/lisa-rails/rules/verfication.md +0 -596
- package/plugins/lisa-rails/skills/agent-design-best-practices/SKILL.md +0 -219
- package/plugins/lisa-rails/skills/git-commit/SKILL.md +0 -48
- package/plugins/lisa-rails/skills/git-commit-and-submit-pr/SKILL.md +0 -8
- package/plugins/lisa-rails/skills/git-commit-submit-pr-and-verify/SKILL.md +0 -7
- package/plugins/lisa-rails/skills/git-commit-submit-pr-deploy-and-verify/SKILL.md +0 -7
- package/plugins/lisa-rails/skills/git-prune/SKILL.md +0 -35
- package/plugins/lisa-rails/skills/git-submit-pr/SKILL.md +0 -44
- package/plugins/lisa-rails/skills/jira-fix/SKILL.md +0 -16
- package/plugins/lisa-rails/skills/jira-implement/SKILL.md +0 -18
- package/plugins/lisa-rails/skills/jira-journey/scripts/generate-templates.py +0 -233
- package/plugins/lisa-rails/skills/jira-journey/scripts/parse-plan.py +0 -368
- package/plugins/lisa-rails/skills/jira-sync/SKILL.md +0 -63
- package/plugins/lisa-rails/skills/jsdoc-best-practices/SKILL.md +0 -432
- package/plugins/lisa-rails/skills/lisa-review-implementation/SKILL.md +0 -209
- package/plugins/lisa-rails/skills/plan-execute/SKILL.md +0 -89
- package/plugins/lisa-rails/skills/plan-local-code-review/SKILL.md +0 -88
- package/plugins/lisa-rails/skills/pull-request-review/SKILL.md +0 -68
- package/plugins/lisa-rails/skills/security-zap-scan/SKILL.md +0 -33
- package/plugins/lisa-rails/skills/sonarqube-check/SKILL.md +0 -11
- package/plugins/lisa-rails/skills/sonarqube-fix/SKILL.md +0 -8
- package/plugins/lisa-rails/skills/tasks-load/SKILL.md +0 -88
- package/plugins/lisa-rails/skills/tasks-sync/SKILL.md +0 -108
- package/plugins/lisa-typescript/agents/agent-architect.md +0 -310
- package/plugins/lisa-typescript/agents/architecture-specialist.md +0 -53
- package/plugins/lisa-typescript/agents/debug-specialist.md +0 -204
- package/plugins/lisa-typescript/agents/git-history-analyzer.md +0 -183
- package/plugins/lisa-typescript/agents/hooks-expert.md +0 -74
- package/plugins/lisa-typescript/agents/implementer.md +0 -54
- package/plugins/lisa-typescript/agents/learner.md +0 -44
- package/plugins/lisa-typescript/agents/performance-specialist.md +0 -95
- package/plugins/lisa-typescript/agents/product-specialist.md +0 -72
- package/plugins/lisa-typescript/agents/quality-specialist.md +0 -55
- package/plugins/lisa-typescript/agents/security-specialist.md +0 -58
- package/plugins/lisa-typescript/agents/skill-evaluator.md +0 -246
- package/plugins/lisa-typescript/agents/slash-command-architect.md +0 -87
- package/plugins/lisa-typescript/agents/test-specialist.md +0 -64
- package/plugins/lisa-typescript/agents/verification-specialist.md +0 -189
- package/plugins/lisa-typescript/agents/web-search-researcher.md +0 -112
- package/plugins/lisa-typescript/commands/git/commit-and-submit-pr.md +0 -7
- package/plugins/lisa-typescript/commands/git/commit-submit-pr-and-verify.md +0 -7
- package/plugins/lisa-typescript/commands/git/commit-submit-pr-deploy-and-verify.md +0 -7
- package/plugins/lisa-typescript/commands/git/commit.md +0 -7
- package/plugins/lisa-typescript/commands/git/prune.md +0 -6
- package/plugins/lisa-typescript/commands/git/submit-pr.md +0 -7
- package/plugins/lisa-typescript/commands/jira/fix.md +0 -7
- package/plugins/lisa-typescript/commands/jira/implement.md +0 -7
- package/plugins/lisa-typescript/commands/jira/sync.md +0 -7
- package/plugins/lisa-typescript/commands/plan/add-test-coverage.md +0 -7
- package/plugins/lisa-typescript/commands/plan/create.md +0 -6
- package/plugins/lisa-typescript/commands/plan/execute.md +0 -7
- package/plugins/lisa-typescript/commands/plan/fix-linter-error.md +0 -7
- package/plugins/lisa-typescript/commands/plan/local-code-review.md +0 -6
- package/plugins/lisa-typescript/commands/plan/lower-code-complexity.md +0 -6
- package/plugins/lisa-typescript/commands/plan/reduce-max-lines-per-function.md +0 -7
- package/plugins/lisa-typescript/commands/plan/reduce-max-lines.md +0 -7
- package/plugins/lisa-typescript/commands/pull-request/review.md +0 -7
- package/plugins/lisa-typescript/commands/review/implementation.md +0 -7
- package/plugins/lisa-typescript/commands/security/zap-scan.md +0 -6
- package/plugins/lisa-typescript/commands/sonarqube/check.md +0 -6
- package/plugins/lisa-typescript/commands/sonarqube/fix.md +0 -6
- package/plugins/lisa-typescript/commands/tasks/load.md +0 -7
- package/plugins/lisa-typescript/commands/tasks/sync.md +0 -7
- package/plugins/lisa-typescript/hooks/debug-hook.sh +0 -47
- package/plugins/lisa-typescript/hooks/enforce-plan-rules.sh +0 -15
- package/plugins/lisa-typescript/hooks/install-pkgs.sh +0 -64
- package/plugins/lisa-typescript/hooks/notify-ntfy.sh +0 -183
- package/plugins/lisa-typescript/hooks/setup-jira-cli.sh +0 -52
- package/plugins/lisa-typescript/hooks/sync-tasks.sh +0 -107
- package/plugins/lisa-typescript/hooks/ticket-sync-reminder.sh +0 -23
- package/plugins/lisa-typescript/hooks/track-plan-sessions.sh +0 -164
- package/plugins/lisa-typescript/hooks/verify-completion.sh +0 -77
- package/plugins/lisa-typescript/rules/README.md +0 -240
- package/plugins/lisa-typescript/rules/coding-philosophy.md +0 -428
- package/plugins/lisa-typescript/rules/verfication.md +0 -596
- package/plugins/lisa-typescript/skills/agent-design-best-practices/SKILL.md +0 -219
- package/plugins/lisa-typescript/skills/git-commit/SKILL.md +0 -48
- package/plugins/lisa-typescript/skills/git-commit-and-submit-pr/SKILL.md +0 -8
- package/plugins/lisa-typescript/skills/git-commit-submit-pr-and-verify/SKILL.md +0 -7
- package/plugins/lisa-typescript/skills/git-commit-submit-pr-deploy-and-verify/SKILL.md +0 -7
- package/plugins/lisa-typescript/skills/git-prune/SKILL.md +0 -35
- package/plugins/lisa-typescript/skills/git-submit-pr/SKILL.md +0 -44
- package/plugins/lisa-typescript/skills/jira-add-journey/SKILL.md +0 -120
- package/plugins/lisa-typescript/skills/jira-create/SKILL.md +0 -95
- package/plugins/lisa-typescript/skills/jira-evidence/SKILL.md +0 -73
- package/plugins/lisa-typescript/skills/jira-evidence/scripts/post-evidence.sh +0 -163
- package/plugins/lisa-typescript/skills/jira-fix/SKILL.md +0 -16
- package/plugins/lisa-typescript/skills/jira-implement/SKILL.md +0 -18
- package/plugins/lisa-typescript/skills/jira-journey/SKILL.md +0 -125
- package/plugins/lisa-typescript/skills/jira-journey/scripts/generate-templates.py +0 -233
- package/plugins/lisa-typescript/skills/jira-journey/scripts/parse-plan.py +0 -368
- package/plugins/lisa-typescript/skills/jira-sync/SKILL.md +0 -63
- package/plugins/lisa-typescript/skills/jira-verify/SKILL.md +0 -48
- package/plugins/lisa-typescript/skills/jsdoc-best-practices/SKILL.md +0 -432
- package/plugins/lisa-typescript/skills/lisa-review-implementation/SKILL.md +0 -209
- package/plugins/lisa-typescript/skills/plan-add-test-coverage/SKILL.md +0 -44
- package/plugins/lisa-typescript/skills/plan-execute/SKILL.md +0 -89
- package/plugins/lisa-typescript/skills/plan-fix-linter-error/SKILL.md +0 -45
- package/plugins/lisa-typescript/skills/plan-local-code-review/SKILL.md +0 -88
- package/plugins/lisa-typescript/skills/plan-lower-code-complexity/SKILL.md +0 -44
- package/plugins/lisa-typescript/skills/plan-reduce-max-lines/SKILL.md +0 -45
- package/plugins/lisa-typescript/skills/plan-reduce-max-lines-per-function/SKILL.md +0 -46
- package/plugins/lisa-typescript/skills/pull-request-review/SKILL.md +0 -68
- package/plugins/lisa-typescript/skills/security-zap-scan/SKILL.md +0 -33
- package/plugins/lisa-typescript/skills/sonarqube-check/SKILL.md +0 -11
- package/plugins/lisa-typescript/skills/sonarqube-fix/SKILL.md +0 -8
- package/plugins/lisa-typescript/skills/tasks-load/SKILL.md +0 -88
- package/plugins/lisa-typescript/skills/tasks-sync/SKILL.md +0 -108
- package/plugins/src/base/hooks/format-on-edit.sh +0 -76
- package/plugins/src/base/hooks/lint-on-edit.sh +0 -81
- package/plugins/src/base/hooks/sg-scan-on-edit.sh +0 -68
- package/plugins/src/base/rules/lisa.md +0 -37
- /package/plugins/{lisa-cdk → lisa}/agents/agent-architect.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/agents/architecture-specialist.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/agents/debug-specialist.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/agents/git-history-analyzer.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/agents/hooks-expert.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/agents/implementer.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/agents/learner.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/agents/performance-specialist.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/agents/product-specialist.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/agents/quality-specialist.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/agents/security-specialist.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/agents/skill-evaluator.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/agents/slash-command-architect.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/agents/test-specialist.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/agents/verification-specialist.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/agents/web-search-researcher.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/commands/git/commit-and-submit-pr.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/commands/git/commit-submit-pr-and-verify.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/commands/git/commit-submit-pr-deploy-and-verify.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/commands/git/commit.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/commands/git/prune.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/commands/git/submit-pr.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/commands/jira/add-journey.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/commands/jira/create.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/commands/jira/evidence.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/commands/jira/fix.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/commands/jira/implement.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/commands/jira/journey.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/commands/jira/sync.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/commands/jira/verify.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/commands/plan/add-test-coverage.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/commands/plan/create.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/commands/plan/execute.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/commands/plan/fix-linter-error.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/commands/plan/local-code-review.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/commands/plan/lower-code-complexity.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/commands/plan/reduce-max-lines-per-function.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/commands/plan/reduce-max-lines.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/commands/pull-request/review.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/commands/review/implementation.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/commands/security/zap-scan.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/commands/sonarqube/check.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/commands/sonarqube/fix.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/commands/tasks/load.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/commands/tasks/sync.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/hooks/debug-hook.sh +0 -0
- /package/plugins/{lisa-cdk → lisa}/hooks/enforce-plan-rules.sh +0 -0
- /package/plugins/{lisa-cdk → lisa}/hooks/install-pkgs.sh +0 -0
- /package/plugins/{lisa-cdk → lisa}/hooks/notify-ntfy.sh +0 -0
- /package/plugins/{lisa-cdk → lisa}/hooks/setup-jira-cli.sh +0 -0
- /package/plugins/{lisa-cdk → lisa}/hooks/sync-tasks.sh +0 -0
- /package/plugins/{lisa-cdk → lisa}/hooks/ticket-sync-reminder.sh +0 -0
- /package/plugins/{lisa-cdk → lisa}/hooks/track-plan-sessions.sh +0 -0
- /package/plugins/{lisa-cdk → lisa}/hooks/verify-completion.sh +0 -0
- /package/plugins/{lisa-cdk → lisa}/rules/README.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/rules/coding-philosophy.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/rules/verfication.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/skills/agent-design-best-practices/SKILL.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/skills/git-commit/SKILL.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/skills/git-commit-and-submit-pr/SKILL.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/skills/git-commit-submit-pr-and-verify/SKILL.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/skills/git-commit-submit-pr-deploy-and-verify/SKILL.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/skills/git-prune/SKILL.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/skills/git-submit-pr/SKILL.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/skills/jira-add-journey/SKILL.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/skills/jira-create/SKILL.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/skills/jira-evidence/SKILL.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/skills/jira-evidence/scripts/post-evidence.sh +0 -0
- /package/plugins/{lisa-cdk → lisa}/skills/jira-fix/SKILL.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/skills/jira-implement/SKILL.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/skills/jira-journey/SKILL.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/skills/jira-journey/scripts/generate-templates.py +0 -0
- /package/plugins/{lisa-cdk → lisa}/skills/jira-journey/scripts/parse-plan.py +0 -0
- /package/plugins/{lisa-cdk → lisa}/skills/jira-sync/SKILL.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/skills/jira-verify/SKILL.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/skills/jsdoc-best-practices/SKILL.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/skills/lisa-review-implementation/SKILL.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/skills/plan-add-test-coverage/SKILL.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/skills/plan-execute/SKILL.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/skills/plan-fix-linter-error/SKILL.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/skills/plan-local-code-review/SKILL.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/skills/plan-lower-code-complexity/SKILL.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/skills/plan-reduce-max-lines/SKILL.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/skills/plan-reduce-max-lines-per-function/SKILL.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/skills/pull-request-review/SKILL.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/skills/security-zap-scan/SKILL.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/skills/sonarqube-check/SKILL.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/skills/sonarqube-fix/SKILL.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/skills/tasks-load/SKILL.md +0 -0
- /package/plugins/{lisa-cdk → lisa}/skills/tasks-sync/SKILL.md +0 -0
- /package/plugins/{lisa-cdk → src/typescript}/hooks/format-on-edit.sh +0 -0
- /package/plugins/{lisa-cdk → src/typescript}/hooks/lint-on-edit.sh +0 -0
- /package/plugins/{lisa-cdk → src/typescript}/hooks/sg-scan-on-edit.sh +0 -0
- /package/plugins/{lisa-cdk → src/typescript}/rules/lisa.md +0 -0
|
@@ -1,428 +0,0 @@
|
|
|
1
|
-
# Coding Philosophy
|
|
2
|
-
|
|
3
|
-
This rule enforces the core coding philosophy: **immutability**, **predictable structure**, **functional transformations**, **test-driven development**, **clean deletion**, and **simplicity**.
|
|
4
|
-
|
|
5
|
-
## Guiding Principles: YAGNI + SOLID + DRY + KISS
|
|
6
|
-
|
|
7
|
-
Follow these software engineering principles, **deferring to Occam's Razor/KISS whenever principles conflict**:
|
|
8
|
-
|
|
9
|
-
### KISS (Keep It Simple, Stupid) - The Tiebreaker
|
|
10
|
-
|
|
11
|
-
When principles conflict, **always choose the simpler solution**.
|
|
12
|
-
|
|
13
|
-
```typescript
|
|
14
|
-
// KISS: Simple direct approach
|
|
15
|
-
const isAdmin = user.role === "admin";
|
|
16
|
-
|
|
17
|
-
// Over-engineered: Abstraction without value
|
|
18
|
-
const isAdmin = RoleChecker.getInstance().checkRole(user, RoleTypes.ADMIN);
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
### YAGNI (You Ain't Gonna Need It)
|
|
22
|
-
|
|
23
|
-
Don't build features, abstractions, or flexibility you don't need **right now**.
|
|
24
|
-
|
|
25
|
-
```typescript
|
|
26
|
-
// Correct: Solve today's problem
|
|
27
|
-
const formatDate = (date: Date) => date.toISOString().split("T")[0];
|
|
28
|
-
|
|
29
|
-
// Wrong: Building for hypothetical future needs
|
|
30
|
-
const formatDate = (date: Date, format?: string, locale?: string, timezone?: string) => {
|
|
31
|
-
// 50 lines handling cases that may never be used
|
|
32
|
-
};
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
### DRY (Don't Repeat Yourself) - With KISS Constraint
|
|
36
|
-
|
|
37
|
-
Extract duplication only when:
|
|
38
|
-
1. The same logic appears **3+ times**
|
|
39
|
-
2. The abstraction is **simpler** than the duplication
|
|
40
|
-
3. The extracted code has a **clear single purpose**
|
|
41
|
-
|
|
42
|
-
### SOLID Principles - Applied Pragmatically
|
|
43
|
-
|
|
44
|
-
| Principle | Apply When | Skip When |
|
|
45
|
-
| ------------------------- | --------------------------------------------- | --------------------------------------- |
|
|
46
|
-
| **S**ingle Responsibility | Function does 2+ unrelated things | Splitting adds complexity |
|
|
47
|
-
| **O**pen/Closed | Extension points have clear use cases | No foreseeable extensions |
|
|
48
|
-
| **L**iskov Substitution | Using inheritance hierarchies | Using composition (preferred) |
|
|
49
|
-
| **I**nterface Segregation | Consumers need different subsets | Interface is already small |
|
|
50
|
-
| **D**ependency Inversion | Testing requires mocking external services | Direct dependency is simpler |
|
|
51
|
-
|
|
52
|
-
### Decision Framework
|
|
53
|
-
|
|
54
|
-
When unsure, ask in order:
|
|
55
|
-
1. **Do I need this now?** (YAGNI) - If no, don't build it
|
|
56
|
-
2. **Is there a simpler way?** (KISS) - Choose the simpler option
|
|
57
|
-
3. **Am I repeating myself 3+ times?** (DRY) - Extract if the abstraction is simpler
|
|
58
|
-
4. **Does this function do one thing?** (SOLID-SRP) - Split only if clearer
|
|
59
|
-
|
|
60
|
-
---
|
|
61
|
-
|
|
62
|
-
## Core Principles
|
|
63
|
-
|
|
64
|
-
### 1. Immutability First
|
|
65
|
-
|
|
66
|
-
Never mutate data. Always create new references.
|
|
67
|
-
|
|
68
|
-
```typescript
|
|
69
|
-
// Correct - spread creates new object
|
|
70
|
-
const updated = { ...user, name: "New Name" };
|
|
71
|
-
|
|
72
|
-
// Incorrect - mutation
|
|
73
|
-
user.name = "New Name";
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
### 2. Function Structure Ordering
|
|
77
|
-
|
|
78
|
-
All functions, hooks, and components follow a strict ordering:
|
|
79
|
-
|
|
80
|
-
```text
|
|
81
|
-
1. Variable definitions and derived state (const, useState, useMemo, useCallback)
|
|
82
|
-
2. Side effects (useEffect, function calls with no return value)
|
|
83
|
-
3. Return statement
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
### 3. Functional Transformations
|
|
87
|
-
|
|
88
|
-
Use `map`, `filter`, `reduce` instead of imperative loops and mutations.
|
|
89
|
-
|
|
90
|
-
```typescript
|
|
91
|
-
// Correct - functional transformation
|
|
92
|
-
const names = users.map(u => u.name);
|
|
93
|
-
|
|
94
|
-
// Incorrect - imperative mutation
|
|
95
|
-
const names = [];
|
|
96
|
-
users.forEach(u => names.push(u.name));
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
### 4. Test-Driven Development (TDD)
|
|
100
|
-
|
|
101
|
-
**Always write failing tests before implementation code.** This is mandatory, not optional.
|
|
102
|
-
|
|
103
|
-
```text
|
|
104
|
-
TDD Cycle:
|
|
105
|
-
1. RED: Write a failing test that defines expected behavior
|
|
106
|
-
2. GREEN: Write the minimum code to make the test pass
|
|
107
|
-
3. REFACTOR: Clean up while keeping tests green
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
### 5. Clean Deletion
|
|
111
|
-
|
|
112
|
-
**Delete old code completely.** No deprecation warnings, migration shims, or backward-compatibility layers unless explicitly requested.
|
|
113
|
-
|
|
114
|
-
```typescript
|
|
115
|
-
// Correct: Remove the old code entirely
|
|
116
|
-
const calculateScore = (player: Player): number => player.stats.overall;
|
|
117
|
-
|
|
118
|
-
// Wrong: Keeping deprecated versions around
|
|
119
|
-
/** @deprecated Use calculateScore instead */
|
|
120
|
-
const getPlayerScore = (player: Player): number => calculateScore(player);
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
**Clean deletion rules:**
|
|
124
|
-
- When replacing code, delete the old version completely
|
|
125
|
-
- Never create `V2`, `New`, or `Old` suffixed functions/variables
|
|
126
|
-
- Never add `@deprecated` comments - just remove the code
|
|
127
|
-
- Never write migration code unless explicitly asked
|
|
128
|
-
- Trust git history for recovery if needed
|
|
129
|
-
|
|
130
|
-
---
|
|
131
|
-
|
|
132
|
-
## Quick Reference
|
|
133
|
-
|
|
134
|
-
### Variable Declaration
|
|
135
|
-
|
|
136
|
-
| Pattern | Status | Example |
|
|
137
|
-
| ------- | --------- | ----------------------------- |
|
|
138
|
-
| `const` | Required | `const value = calculate();` |
|
|
139
|
-
| `let` | Forbidden | Use ternary or reduce instead |
|
|
140
|
-
| `var` | Forbidden | Never use |
|
|
141
|
-
|
|
142
|
-
### Array Operations
|
|
143
|
-
|
|
144
|
-
| Instead of | Use |
|
|
145
|
-
| ----------------------- | -------------------------------------------- |
|
|
146
|
-
| `arr.push(item)` | `[...arr, item]` |
|
|
147
|
-
| `arr.pop()` | `arr.slice(0, -1)` |
|
|
148
|
-
| `arr.splice(i, 1)` | `arr.filter((_, idx) => idx !== i)` |
|
|
149
|
-
| `arr.sort()` | `[...arr].sort()` |
|
|
150
|
-
| `arr[i] = value` | `arr.map((v, idx) => idx === i ? value : v)` |
|
|
151
|
-
| `forEach` with mutation | `reduce` or `map` |
|
|
152
|
-
|
|
153
|
-
### Object Operations
|
|
154
|
-
|
|
155
|
-
| Instead of | Use |
|
|
156
|
-
| ------------------------- | ----------------------------- |
|
|
157
|
-
| `obj.key = value` | `{ ...obj, key: value }` |
|
|
158
|
-
| `delete obj.key` | `({ key: _, ...rest } = obj)` |
|
|
159
|
-
| `Object.assign(obj, ...)` | `{ ...obj, ...other }` |
|
|
160
|
-
|
|
161
|
-
### Building Lookup Objects
|
|
162
|
-
|
|
163
|
-
```typescript
|
|
164
|
-
// Correct - reduce with spread
|
|
165
|
-
const lookup = items.reduce(
|
|
166
|
-
(acc, item) => ({ ...acc, [item.id]: item }),
|
|
167
|
-
{} as Record<string, Item>
|
|
168
|
-
);
|
|
169
|
-
|
|
170
|
-
// Incorrect - forEach with Map.set
|
|
171
|
-
const lookup = new Map();
|
|
172
|
-
items.forEach(item => lookup.set(item.id, item));
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
### Conditional Values
|
|
176
|
-
|
|
177
|
-
```typescript
|
|
178
|
-
// Correct - ternary expression
|
|
179
|
-
const status = isComplete ? "done" : "pending";
|
|
180
|
-
|
|
181
|
-
// Incorrect - let with reassignment
|
|
182
|
-
let status = "pending";
|
|
183
|
-
if (isComplete) {
|
|
184
|
-
status = "done";
|
|
185
|
-
}
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
---
|
|
189
|
-
|
|
190
|
-
## Hook Structure Example
|
|
191
|
-
|
|
192
|
-
```typescript
|
|
193
|
-
export const usePlayerData = (playerId: string) => {
|
|
194
|
-
// 1. VARIABLES & STATE (first)
|
|
195
|
-
const [isLoading, setIsLoading] = useState(true);
|
|
196
|
-
const { data } = useQuery(GetPlayerDocument, { variables: { playerId } });
|
|
197
|
-
|
|
198
|
-
const playerName = useMemo(() => data?.player?.name ?? "Unknown", [data]);
|
|
199
|
-
|
|
200
|
-
const handleRefresh = useCallback(() => {
|
|
201
|
-
refetch();
|
|
202
|
-
}, [refetch]);
|
|
203
|
-
|
|
204
|
-
// 2. SIDE EFFECTS (second)
|
|
205
|
-
useEffect(() => {
|
|
206
|
-
console.log("Player loaded:", playerName);
|
|
207
|
-
}, [playerName]);
|
|
208
|
-
|
|
209
|
-
// 3. RETURN (last)
|
|
210
|
-
return { playerName, isLoading, handleRefresh };
|
|
211
|
-
};
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
## Container Component Example
|
|
215
|
-
|
|
216
|
-
```typescript
|
|
217
|
-
const PlayerCardContainer: React.FC<Props> = ({ playerId }) => {
|
|
218
|
-
// 1. VARIABLES & STATE
|
|
219
|
-
const { data, loading } = useQuery(GetPlayerDocument, { variables: { playerId } });
|
|
220
|
-
const { colors } = useTheme();
|
|
221
|
-
|
|
222
|
-
const formattedStats = useMemo(
|
|
223
|
-
() => data?.stats?.map(s => ({ ...s, display: formatStat(s) })) ?? [],
|
|
224
|
-
[data?.stats]
|
|
225
|
-
);
|
|
226
|
-
|
|
227
|
-
const handlePress = useCallback(() => {
|
|
228
|
-
router.push(`/players/${playerId}`);
|
|
229
|
-
}, [playerId]);
|
|
230
|
-
|
|
231
|
-
// 2. SIDE EFFECTS (none in this example)
|
|
232
|
-
|
|
233
|
-
// 3. RETURN
|
|
234
|
-
return (
|
|
235
|
-
<PlayerCardView
|
|
236
|
-
stats={formattedStats}
|
|
237
|
-
colors={colors}
|
|
238
|
-
loading={loading}
|
|
239
|
-
onPress={handlePress}
|
|
240
|
-
/>
|
|
241
|
-
);
|
|
242
|
-
};
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
## Utility Function Example
|
|
246
|
-
|
|
247
|
-
```typescript
|
|
248
|
-
export const calculateTeamRankings = (
|
|
249
|
-
players: readonly Player[]
|
|
250
|
-
): readonly TeamRanking[] => {
|
|
251
|
-
// 1. VARIABLES & DERIVED VALUES
|
|
252
|
-
const validPlayers = players.filter(p => p.team && p.score != null);
|
|
253
|
-
|
|
254
|
-
const teamScores = validPlayers.reduce(
|
|
255
|
-
(acc, player) => ({
|
|
256
|
-
...acc,
|
|
257
|
-
[player.team.id]: {
|
|
258
|
-
teamId: player.team.id,
|
|
259
|
-
totalScore: (acc[player.team.id]?.totalScore ?? 0) + player.score,
|
|
260
|
-
count: (acc[player.team.id]?.count ?? 0) + 1,
|
|
261
|
-
},
|
|
262
|
-
}),
|
|
263
|
-
{} as Record<string, { teamId: string; totalScore: number; count: number }>
|
|
264
|
-
);
|
|
265
|
-
|
|
266
|
-
const rankings = Object.values(teamScores).map(t => ({
|
|
267
|
-
teamId: t.teamId,
|
|
268
|
-
avgScore: t.totalScore / t.count,
|
|
269
|
-
}));
|
|
270
|
-
|
|
271
|
-
const sorted = [...rankings].sort((a, b) => b.avgScore - a.avgScore);
|
|
272
|
-
|
|
273
|
-
// 2. NO SIDE EFFECTS IN PURE FUNCTIONS
|
|
274
|
-
|
|
275
|
-
// 3. RETURN
|
|
276
|
-
return sorted;
|
|
277
|
-
};
|
|
278
|
-
```
|
|
279
|
-
|
|
280
|
-
---
|
|
281
|
-
|
|
282
|
-
## Anti-Patterns to Avoid
|
|
283
|
-
|
|
284
|
-
### Never use `let` for conditional assignment
|
|
285
|
-
|
|
286
|
-
```typescript
|
|
287
|
-
// Wrong
|
|
288
|
-
let result;
|
|
289
|
-
if (condition) {
|
|
290
|
-
result = valueA;
|
|
291
|
-
} else {
|
|
292
|
-
result = valueB;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
// Correct
|
|
296
|
-
const result = condition ? valueA : valueB;
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
### Never mutate arrays
|
|
300
|
-
|
|
301
|
-
```typescript
|
|
302
|
-
// Wrong
|
|
303
|
-
const items = [];
|
|
304
|
-
data.forEach(d => items.push(transform(d)));
|
|
305
|
-
|
|
306
|
-
// Correct
|
|
307
|
-
const items = data.map(d => transform(d));
|
|
308
|
-
```
|
|
309
|
-
|
|
310
|
-
### Never use Map when Record suffices
|
|
311
|
-
|
|
312
|
-
```typescript
|
|
313
|
-
// Wrong
|
|
314
|
-
const lookup = new Map<string, User>();
|
|
315
|
-
users.forEach(u => lookup.set(u.id, u));
|
|
316
|
-
const user = lookup.get(userId);
|
|
317
|
-
|
|
318
|
-
// Correct
|
|
319
|
-
const lookup = users.reduce(
|
|
320
|
-
(acc, u) => ({ ...acc, [u.id]: u }),
|
|
321
|
-
{} as Record<string, User>
|
|
322
|
-
);
|
|
323
|
-
const user = lookup[userId];
|
|
324
|
-
```
|
|
325
|
-
|
|
326
|
-
### Never sort in place
|
|
327
|
-
|
|
328
|
-
```typescript
|
|
329
|
-
// Wrong - mutates original
|
|
330
|
-
const sorted = items.sort((a, b) => a.value - b.value);
|
|
331
|
-
|
|
332
|
-
// Correct - creates new array
|
|
333
|
-
const sorted = [...items].sort((a, b) => a.value - b.value);
|
|
334
|
-
```
|
|
335
|
-
|
|
336
|
-
### Never place useEffect before variable definitions
|
|
337
|
-
|
|
338
|
-
```typescript
|
|
339
|
-
// Wrong
|
|
340
|
-
useEffect(() => {
|
|
341
|
-
/* ... */
|
|
342
|
-
}, [value]);
|
|
343
|
-
const value = useMemo(() => calculate(), [dep]);
|
|
344
|
-
|
|
345
|
-
// Correct
|
|
346
|
-
const value = useMemo(() => calculate(), [dep]);
|
|
347
|
-
useEffect(() => {
|
|
348
|
-
/* ... */
|
|
349
|
-
}, [value]);
|
|
350
|
-
```
|
|
351
|
-
|
|
352
|
-
---
|
|
353
|
-
|
|
354
|
-
## Immutable Patterns Reference
|
|
355
|
-
|
|
356
|
-
### Building Lookup Objects with Reduce
|
|
357
|
-
|
|
358
|
-
```typescript
|
|
359
|
-
const colorMap =
|
|
360
|
-
edges?.reduce(
|
|
361
|
-
(acc, edge) => (edge.color ? { ...acc, [edge.tagId]: edge.color } : acc),
|
|
362
|
-
{} as Record<string, string>
|
|
363
|
-
) ?? {};
|
|
364
|
-
```
|
|
365
|
-
|
|
366
|
-
### Accumulating Multiple Properties
|
|
367
|
-
|
|
368
|
-
```typescript
|
|
369
|
-
const teamGprAccumulator = validPlayers.reduce(
|
|
370
|
-
(acc, player) => {
|
|
371
|
-
const teamId = player.team?.id;
|
|
372
|
-
if (!teamId) return acc;
|
|
373
|
-
|
|
374
|
-
const existing = acc[teamId];
|
|
375
|
-
return {
|
|
376
|
-
...acc,
|
|
377
|
-
[teamId]: {
|
|
378
|
-
teamId,
|
|
379
|
-
teamName: player.team.name,
|
|
380
|
-
gprSum: (existing?.gprSum ?? 0) + player.gpr,
|
|
381
|
-
playerCount: (existing?.playerCount ?? 0) + 1,
|
|
382
|
-
},
|
|
383
|
-
};
|
|
384
|
-
},
|
|
385
|
-
{} as Record<string, { teamId: string; teamName: string; gprSum: number; playerCount: number }>
|
|
386
|
-
);
|
|
387
|
-
```
|
|
388
|
-
|
|
389
|
-
### Nested Object Updates
|
|
390
|
-
|
|
391
|
-
```typescript
|
|
392
|
-
const updated = {
|
|
393
|
-
...state,
|
|
394
|
-
user: {
|
|
395
|
-
...state.user,
|
|
396
|
-
profile: {
|
|
397
|
-
...state.user.profile,
|
|
398
|
-
avatar: newAvatar,
|
|
399
|
-
},
|
|
400
|
-
},
|
|
401
|
-
};
|
|
402
|
-
```
|
|
403
|
-
|
|
404
|
-
### Conditional Property Addition
|
|
405
|
-
|
|
406
|
-
```typescript
|
|
407
|
-
const result = {
|
|
408
|
-
...baseObj,
|
|
409
|
-
...(condition && { optionalProp: value }),
|
|
410
|
-
};
|
|
411
|
-
```
|
|
412
|
-
|
|
413
|
-
### Ternary Chain for Multiple Conditions
|
|
414
|
-
|
|
415
|
-
```typescript
|
|
416
|
-
const priority = score > 90 ? "high" : score > 70 ? "medium" : "low";
|
|
417
|
-
```
|
|
418
|
-
|
|
419
|
-
### Readonly Types for Function Parameters
|
|
420
|
-
|
|
421
|
-
```typescript
|
|
422
|
-
export const calculateTeamGprRank = (
|
|
423
|
-
leaguePlayers: readonly (PlayerWithScores | null | undefined)[],
|
|
424
|
-
myTeamId: string | null | undefined
|
|
425
|
-
): number | null => {
|
|
426
|
-
// ...
|
|
427
|
-
};
|
|
428
|
-
```
|