@codyswann/lisa 1.0.0 → 1.0.5
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/README.md +244 -36
- package/all/copy-overwrite/.claude/README.md +1 -3
- package/all/copy-overwrite/.claude/REFERENCE.md +519 -0
- package/all/copy-overwrite/.claude/agents/skill-evaluator.md +7 -7
- package/all/copy-overwrite/.claude/agents/test-coverage-agent.md +17 -0
- package/all/copy-overwrite/.claude/commands/git/commit.md +9 -5
- package/all/copy-overwrite/.claude/commands/git/submit-pr.md +1 -1
- package/all/copy-overwrite/.claude/commands/lisa/review-implementation.md +209 -0
- package/all/copy-overwrite/.claude/commands/project/add-test-coverage.md +58 -0
- package/all/copy-overwrite/.claude/commands/project/archive.md +1 -1
- package/all/copy-overwrite/.claude/commands/project/complete-task.md +53 -1
- package/all/copy-overwrite/.claude/commands/project/debrief.md +12 -23
- package/all/copy-overwrite/.claude/commands/project/execute.md +33 -77
- package/all/copy-overwrite/.claude/commands/project/fix-linter-error.md +87 -0
- package/all/copy-overwrite/.claude/commands/project/implement.md +24 -28
- package/all/copy-overwrite/.claude/commands/project/lower-code-complexity.md +30 -55
- package/all/copy-overwrite/.claude/commands/project/plan.md +87 -242
- package/all/copy-overwrite/.claude/commands/project/reduce-max-lines-per-function.md +76 -0
- package/all/copy-overwrite/.claude/commands/project/reduce-max-lines.md +75 -0
- package/all/copy-overwrite/.claude/commands/project/research.md +86 -188
- package/all/copy-overwrite/.claude/commands/project/review.md +19 -38
- package/all/copy-overwrite/.claude/commands/project/setup.md +1 -1
- package/all/copy-overwrite/.claude/commands/project/verify.md +62 -25
- package/all/copy-overwrite/.claude/commands/pull-request/review.md +25 -7
- package/all/copy-overwrite/.claude/commands/tasks/load.md +63 -0
- package/all/copy-overwrite/.claude/commands/tasks/sync.md +84 -0
- package/all/copy-overwrite/.claude/hooks/README.md +75 -0
- package/all/copy-overwrite/.claude/hooks/check-tired-boss.sh +61 -0
- package/all/copy-overwrite/.claude/hooks/debug-hook.sh +47 -0
- package/all/copy-overwrite/.claude/hooks/notify-ntfy.sh +2 -0
- package/all/copy-overwrite/.claude/hooks/sync-tasks.sh +95 -0
- package/all/copy-overwrite/.claude/{skills/coding-philosophy/SKILL.md → rules/coding-philosophy.md} +93 -70
- package/all/copy-overwrite/.claude/settings.json +35 -14
- package/all/copy-overwrite/.claude/skills/prompt-complexity-scorer/SKILL.md +41 -9
- package/all/copy-overwrite/.claude/skills/skill-creator/scripts/init_skill.py +2 -0
- package/all/copy-overwrite/.claude/skills/skill-creator/scripts/package_skill.py +2 -0
- package/all/copy-overwrite/.claude/skills/skill-creator/scripts/quick_validate.py +2 -0
- package/all/copy-overwrite/.safety-net.json +25 -0
- package/all/copy-overwrite/CLAUDE.md +8 -30
- package/all/copy-overwrite/HUMAN.md +517 -17
- package/all/create-only/.claude/rules/PROJECT_RULES.md +9 -0
- package/all/create-only/scripts/setup-deploy-key.sh +190 -0
- package/all/deletions.json +5 -0
- package/cdk/copy-overwrite/.github/workflows/ci.yml +142 -0
- package/cdk/copy-overwrite/.github/workflows/deploy.yml +59 -0
- package/cdk/copy-overwrite/eslint.cdk.ts +175 -0
- package/cdk/copy-overwrite/eslint.config.ts +51 -0
- package/cdk/copy-overwrite/eslint.slow.config.ts +80 -0
- package/cdk/copy-overwrite/knip.json +53 -0
- package/cdk/copy-overwrite/tsconfig.eslint.json +11 -0
- package/cdk/merge/package.json +17 -1
- package/dist/cli/index.d.ts +3 -2
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +83 -64
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/prompts.d.ts +17 -3
- package/dist/cli/prompts.d.ts.map +1 -1
- package/dist/cli/prompts.js +52 -16
- package/dist/cli/prompts.js.map +1 -1
- package/dist/core/config.d.ts +13 -4
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +17 -9
- package/dist/core/config.js.map +1 -1
- package/dist/core/git-service.d.ts +40 -0
- package/dist/core/git-service.d.ts.map +1 -0
- package/dist/core/git-service.js +52 -0
- package/dist/core/git-service.js.map +1 -0
- package/dist/core/index.d.ts +3 -3
- package/dist/core/index.js +3 -3
- package/dist/core/lisa.d.ts +124 -7
- package/dist/core/lisa.d.ts.map +1 -1
- package/dist/core/lisa.js +423 -221
- package/dist/core/lisa.js.map +1 -1
- package/dist/core/manifest.d.ts +5 -1
- package/dist/core/manifest.d.ts.map +1 -1
- package/dist/core/manifest.js +22 -16
- package/dist/core/manifest.js.map +1 -1
- package/dist/detection/detector.interface.d.ts +1 -1
- package/dist/detection/detectors/cdk.d.ts +6 -1
- package/dist/detection/detectors/cdk.d.ts.map +1 -1
- package/dist/detection/detectors/cdk.js +16 -8
- package/dist/detection/detectors/cdk.js.map +1 -1
- package/dist/detection/detectors/expo.d.ts +6 -1
- package/dist/detection/detectors/expo.d.ts.map +1 -1
- package/dist/detection/detectors/expo.js +13 -8
- package/dist/detection/detectors/expo.js.map +1 -1
- package/dist/detection/detectors/nestjs.d.ts +7 -2
- package/dist/detection/detectors/nestjs.d.ts.map +1 -1
- package/dist/detection/detectors/nestjs.js +17 -9
- package/dist/detection/detectors/nestjs.js.map +1 -1
- package/dist/detection/detectors/npm-package.d.ts +6 -1
- package/dist/detection/detectors/npm-package.d.ts.map +1 -1
- package/dist/detection/detectors/npm-package.js +9 -4
- package/dist/detection/detectors/npm-package.js.map +1 -1
- package/dist/detection/detectors/typescript.d.ts +6 -1
- package/dist/detection/detectors/typescript.d.ts.map +1 -1
- package/dist/detection/detectors/typescript.js +12 -7
- package/dist/detection/detectors/typescript.js.map +1 -1
- package/dist/detection/index.d.ts +13 -3
- package/dist/detection/index.d.ts.map +1 -1
- package/dist/detection/index.js +17 -7
- package/dist/detection/index.js.map +1 -1
- package/dist/errors/index.d.ts +66 -2
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/index.js +89 -17
- package/dist/errors/index.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/logging/console-logger.d.ts +21 -1
- package/dist/logging/console-logger.d.ts.map +1 -1
- package/dist/logging/console-logger.js +26 -6
- package/dist/logging/console-logger.js.map +1 -1
- package/dist/logging/index.d.ts +3 -3
- package/dist/logging/index.js +2 -2
- package/dist/logging/logger.interface.d.ts +1 -1
- package/dist/logging/silent-logger.d.ts +21 -1
- package/dist/logging/silent-logger.d.ts.map +1 -1
- package/dist/logging/silent-logger.js +20 -0
- package/dist/logging/silent-logger.js.map +1 -1
- package/dist/strategies/copy-contents.d.ts +47 -6
- package/dist/strategies/copy-contents.d.ts.map +1 -1
- package/dist/strategies/copy-contents.js +99 -49
- package/dist/strategies/copy-contents.js.map +1 -1
- package/dist/strategies/copy-overwrite.d.ts +10 -2
- package/dist/strategies/copy-overwrite.d.ts.map +1 -1
- package/dist/strategies/copy-overwrite.js +17 -9
- package/dist/strategies/copy-overwrite.js.map +1 -1
- package/dist/strategies/create-only.d.ts +10 -2
- package/dist/strategies/create-only.d.ts.map +1 -1
- package/dist/strategies/create-only.js +14 -6
- package/dist/strategies/create-only.js.map +1 -1
- package/dist/strategies/index.d.ts +17 -7
- package/dist/strategies/index.d.ts.map +1 -1
- package/dist/strategies/index.js +19 -9
- package/dist/strategies/index.js.map +1 -1
- package/dist/strategies/merge.d.ts +10 -2
- package/dist/strategies/merge.d.ts.map +1 -1
- package/dist/strategies/merge.js +21 -21
- package/dist/strategies/merge.js.map +1 -1
- package/dist/strategies/strategy.interface.d.ts +1 -1
- package/dist/strategies/strategy.interface.d.ts.map +1 -1
- package/dist/transaction/backup.d.ts +15 -1
- package/dist/transaction/backup.d.ts.map +1 -1
- package/dist/transaction/backup.js +47 -12
- package/dist/transaction/backup.js.map +1 -1
- package/dist/transaction/index.d.ts +3 -3
- package/dist/transaction/index.js +2 -2
- package/dist/transaction/transaction.d.ts +25 -2
- package/dist/transaction/transaction.d.ts.map +1 -1
- package/dist/transaction/transaction.js +25 -2
- package/dist/transaction/transaction.js.map +1 -1
- package/dist/utils/file-operations.d.ts +21 -0
- package/dist/utils/file-operations.d.ts.map +1 -1
- package/dist/utils/file-operations.js +48 -12
- package/dist/utils/file-operations.js.map +1 -1
- package/dist/utils/index.d.ts +3 -3
- package/dist/utils/index.js +3 -3
- package/dist/utils/json-utils.d.ts +12 -0
- package/dist/utils/json-utils.d.ts.map +1 -1
- package/dist/utils/json-utils.js +17 -5
- package/dist/utils/json-utils.js.map +1 -1
- package/dist/utils/path-utils.d.ts +11 -0
- package/dist/utils/path-utils.d.ts.map +1 -1
- package/dist/utils/path-utils.js +12 -1
- package/dist/utils/path-utils.js.map +1 -1
- package/eslint-plugin-code-organization/__tests__/enforce-statement-order.test.js +5 -0
- package/eslint-plugin-code-organization/index.js +5 -0
- package/eslint-plugin-code-organization/rules/enforce-statement-order.js +5 -0
- package/expo/copy-overwrite/.claude/skills/atomic-design-gluestack/scripts/validate_atomic_structure.py +2 -0
- package/expo/copy-overwrite/.claude/skills/container-view-pattern/scripts/create_component.py +2 -0
- package/expo/copy-overwrite/.claude/skills/container-view-pattern/scripts/validate_component.py +2 -0
- package/expo/copy-overwrite/.claude/skills/cross-platform-compatibility/scripts/validate_cross_platform.py +2 -0
- package/expo/copy-overwrite/.claude/skills/directory-structure/scripts/validate_structure.py +2 -0
- package/expo/copy-overwrite/.claude/skills/expo-router-best-practices/scripts/generate-route.py +2 -0
- package/expo/copy-overwrite/.claude/skills/gluestack-nativewind/scripts/validate_styling.py +2 -41
- package/{typescript → expo}/copy-overwrite/.github/workflows/build.yml +3 -0
- package/expo/copy-overwrite/.github/workflows/ci.yml +36 -0
- package/{typescript → expo}/copy-overwrite/.github/workflows/deploy.yml +22 -26
- package/{typescript → expo}/copy-overwrite/.github/workflows/lighthouse.yml +4 -1
- package/expo/copy-overwrite/eslint-plugin-component-structure/__tests__/plugin-index.test.js +5 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/__tests__/require-memo-in-view.test.js +5 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/__tests__/single-component-per-file.test.js +5 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/index.js +5 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/rules/enforce-component-structure.js +5 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/rules/no-return-in-view.js +6 -1
- package/expo/copy-overwrite/eslint-plugin-component-structure/rules/require-memo-in-view.js +5 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/rules/single-component-per-file.js +5 -0
- package/expo/copy-overwrite/eslint-plugin-ui-standards/README.md +0 -68
- package/expo/copy-overwrite/eslint-plugin-ui-standards/index.js +5 -3
- package/expo/copy-overwrite/eslint-plugin-ui-standards/rules/no-classname-outside-ui.js +5 -0
- package/expo/copy-overwrite/eslint-plugin-ui-standards/rules/no-direct-rn-imports.js +5 -0
- package/expo/copy-overwrite/eslint.config.ts +53 -0
- package/expo/copy-overwrite/eslint.expo.ts +330 -0
- package/expo/copy-overwrite/eslint.slow.config.ts +86 -0
- package/expo/copy-overwrite/knip.json +132 -0
- package/expo/copy-overwrite/lighthouserc.js +27 -0
- package/expo/copy-overwrite/tsconfig.eslint.json +25 -0
- package/expo/create-only/lighthouserc-config.json +6 -1
- package/expo/merge/package.json +16 -3
- package/nestjs/copy-overwrite/.claude/skills/nestjs-rules/SKILL.md +1 -1
- package/{typescript → nestjs}/copy-overwrite/.github/k6/README.md +2 -2
- package/{typescript → nestjs}/copy-overwrite/.github/k6/examples/customer-deploy-integration.yml +3 -0
- package/{typescript → nestjs}/copy-overwrite/.github/k6/examples/data-driven-test.js +5 -0
- package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/load.js +6 -2
- package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/smoke.js +5 -0
- package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/soak.js +5 -0
- package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/spike.js +5 -0
- package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/stress.js +5 -0
- package/{typescript → nestjs}/copy-overwrite/.github/k6/scripts/api-test.js +5 -0
- package/{typescript → nestjs}/copy-overwrite/.github/k6/scripts/default-test.js +5 -0
- package/nestjs/copy-overwrite/.github/workflows/ci.yml +29 -0
- package/nestjs/copy-overwrite/.github/workflows/deploy.yml +291 -0
- package/{typescript → nestjs}/copy-overwrite/.github/workflows/load-test.yml +3 -0
- package/nestjs/copy-overwrite/eslint.config.ts +53 -0
- package/nestjs/copy-overwrite/eslint.nestjs.ts +178 -0
- package/nestjs/merge/package.json +11 -3
- package/package.json +34 -40
- package/typescript/copy-contents/.husky/pre-commit +1 -1
- package/typescript/copy-contents/.husky/pre-push +99 -118
- package/typescript/copy-overwrite/.claude/hooks/format-on-edit.sh +2 -0
- package/typescript/copy-overwrite/.claude/hooks/install_pkgs.sh +3 -11
- package/typescript/copy-overwrite/.claude/hooks/lint-on-edit.sh +2 -0
- package/typescript/copy-overwrite/.claude/hooks/sg-scan-on-edit.sh +68 -0
- package/typescript/copy-overwrite/.claude/settings.json +79 -0
- package/typescript/copy-overwrite/.claude/skills/jsdoc-best-practices/SKILL.md +44 -0
- package/typescript/copy-overwrite/.github/README.md +49 -1
- package/typescript/copy-overwrite/.github/dependabot.yml +3 -0
- package/typescript/copy-overwrite/.github/workflows/ci.yml +7 -29
- package/typescript/copy-overwrite/.github/workflows/claude.yml +3 -0
- package/typescript/copy-overwrite/.github/workflows/create-github-issue-on-failure.yml +6 -4
- package/typescript/copy-overwrite/.github/workflows/create-issue-on-failure.yml +176 -0
- package/typescript/copy-overwrite/.github/workflows/create-jira-issue-on-failure.yml +3 -1
- package/typescript/copy-overwrite/.github/workflows/create-sentry-issue-on-failure.yml +3 -1
- package/typescript/copy-overwrite/.github/workflows/lint-slow.yml +40 -0
- package/typescript/copy-overwrite/.github/workflows/quality.yml +151 -38
- package/typescript/copy-overwrite/.github/workflows/release.yml +3 -0
- package/typescript/copy-overwrite/.gitleaksignore +3 -0
- package/typescript/copy-overwrite/.lintstagedrc.json +6 -0
- package/typescript/copy-overwrite/.prettierignore +2 -1
- package/typescript/copy-overwrite/.yamllint +2 -0
- package/typescript/copy-overwrite/ast-grep/rule-tests/.gitkeep +3 -0
- package/typescript/copy-overwrite/ast-grep/rules/.gitkeep +3 -0
- package/typescript/copy-overwrite/ast-grep/utils/.gitkeep +3 -0
- package/typescript/copy-overwrite/{commitlint.config.js → commitlint.config.cjs} +5 -0
- package/typescript/copy-overwrite/eslint-plugin-code-organization/__tests__/enforce-statement-order.test.js +5 -0
- package/typescript/copy-overwrite/eslint-plugin-code-organization/index.js +5 -0
- package/typescript/copy-overwrite/eslint-plugin-code-organization/rules/enforce-statement-order.js +5 -0
- package/typescript/copy-overwrite/eslint.base.ts +430 -0
- package/typescript/copy-overwrite/eslint.config.ts +52 -0
- package/typescript/copy-overwrite/eslint.ignore.config.json +19 -2
- package/typescript/copy-overwrite/eslint.slow.config.ts +69 -0
- package/typescript/copy-overwrite/eslint.typescript.ts +142 -0
- package/typescript/copy-overwrite/knip.json +64 -0
- package/typescript/copy-overwrite/sgconfig.yml +11 -0
- package/typescript/copy-overwrite/tsconfig.eslint.json +9 -0
- package/typescript/create-only/eslint.config.local.ts +24 -0
- package/typescript/{copy-overwrite/eslint.thresholds.config.json → create-only/eslint.thresholds.json} +1 -1
- package/typescript/github-rulesets/base.json +2 -75
- package/typescript/merge/.claude/settings.json +160 -0
- package/typescript/merge/package.json +35 -34
- package/all/copy-overwrite/.claude/commands/rules/format-md.md +0 -72
- package/all/copy-overwrite/.claude/skills/coding-philosophy/references/function-structure.md +0 -416
- package/all/copy-overwrite/.claude/skills/coding-philosophy/references/immutable-patterns.md +0 -316
- package/expo/copy-overwrite/eslint-plugin-ui-standards/rules/no-inline-styles.js +0 -73
- package/expo/copy-overwrite/eslint.config.mjs +0 -560
- package/lisa.sh +0 -35
- package/typescript/copy-overwrite/eslint.config.mjs +0 -390
- /package/{all/create-only/PROJECT_RULES.md → cdk/copy-overwrite/.github/workflows/.keep} +0 -0
- /package/{typescript → nestjs}/copy-overwrite/.github/k6/BROWSER_TESTING_NOTE.md +0 -0
- /package/{typescript → nestjs}/copy-overwrite/.github/k6/INTEGRATION_GUIDE.md +0 -0
- /package/{typescript → nestjs}/copy-overwrite/.github/k6/SCENARIO_SELECTION_GUIDE.md +0 -0
- /package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/load.json +0 -0
- /package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/smoke.json +0 -0
- /package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/soak.json +0 -0
- /package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/spike.json +0 -0
- /package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/stress.json +0 -0
- /package/{typescript → nestjs}/copy-overwrite/.github/k6/thresholds/normal.json +0 -0
- /package/{typescript → nestjs}/copy-overwrite/.github/k6/thresholds/relaxed.json +0 -0
- /package/{typescript → nestjs}/copy-overwrite/.github/k6/thresholds/strict.json +0 -0
- /package/{typescript → nestjs}/copy-overwrite/.github/workflows/k6-load-test-README.md +0 -0
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Compare project's Lisa-managed files against Lisa source templates and offer to upstream changes
|
|
3
|
+
argument-hint: [lisa-dir]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Lisa Implementation Review
|
|
7
|
+
|
|
8
|
+
This command compares the current project's Lisa-managed files against Lisa's source templates to identify drift and offer to upstream improvements back to Lisa.
|
|
9
|
+
|
|
10
|
+
## Prerequisites
|
|
11
|
+
|
|
12
|
+
This command requires access to the Lisa installation directory. Either:
|
|
13
|
+
1. Start Claude Code with `--add-dir ~/lisa` (or your Lisa path)
|
|
14
|
+
2. Pass the Lisa directory as an argument: `/lisa:review-implementation ~/lisa`
|
|
15
|
+
|
|
16
|
+
## Instructions
|
|
17
|
+
|
|
18
|
+
### Step 1: Locate Lisa Directory
|
|
19
|
+
|
|
20
|
+
First, determine the Lisa installation directory:
|
|
21
|
+
|
|
22
|
+
1. If an argument was provided, use that path
|
|
23
|
+
2. Otherwise, check if any `--add-dir` paths contain a `src/core/lisa.ts` file (Lisa's signature file)
|
|
24
|
+
3. Common locations to check: `~/lisa`, `~/workspace/lisa`, `../lisa`
|
|
25
|
+
|
|
26
|
+
If Lisa directory cannot be found, inform the user:
|
|
27
|
+
```
|
|
28
|
+
Unable to locate Lisa installation directory.
|
|
29
|
+
|
|
30
|
+
Please either:
|
|
31
|
+
1. Start Claude Code with: claude --add-dir /path/to/lisa
|
|
32
|
+
2. Run this command with the path: /lisa:review-implementation /path/to/lisa
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Step 2: Read the Manifest
|
|
36
|
+
|
|
37
|
+
Read the project's `.lisa-manifest` file to get the list of managed files.
|
|
38
|
+
|
|
39
|
+
Parse each line to extract:
|
|
40
|
+
- `strategy`: The copy strategy used (copy-overwrite, copy-contents, merge, create-only)
|
|
41
|
+
- `relativePath`: The file path relative to project root
|
|
42
|
+
|
|
43
|
+
Skip:
|
|
44
|
+
- Lines starting with `#` (comments)
|
|
45
|
+
- Empty lines
|
|
46
|
+
- Files with `create-only` strategy (these are meant to be customized)
|
|
47
|
+
- Files with `merge` strategy (these are intentionally combined)
|
|
48
|
+
|
|
49
|
+
### Step 3: Find Source Templates
|
|
50
|
+
|
|
51
|
+
For each managed file, locate its source in Lisa by checking these directories in order:
|
|
52
|
+
1. `npm-package/copy-overwrite/` and `npm-package/copy-contents/`
|
|
53
|
+
2. `cdk/copy-overwrite/` and `cdk/copy-contents/`
|
|
54
|
+
3. `nestjs/copy-overwrite/` and `nestjs/copy-contents/`
|
|
55
|
+
4. `expo/copy-overwrite/` and `expo/copy-contents/`
|
|
56
|
+
5. `typescript/copy-overwrite/` and `typescript/copy-contents/`
|
|
57
|
+
6. `all/copy-overwrite/` and `all/copy-contents/`
|
|
58
|
+
|
|
59
|
+
The FIRST match wins (most specific type takes precedence).
|
|
60
|
+
|
|
61
|
+
Detect which project types apply by checking the project for:
|
|
62
|
+
- `npm-package`: package.json without `"private": true` AND has `main`, `bin`, `exports`, or `files`
|
|
63
|
+
- `cdk`: presence of `cdk.json` or `aws-cdk` in dependencies
|
|
64
|
+
- `nestjs`: presence of `nest-cli.json` or `@nestjs` in dependencies
|
|
65
|
+
- `expo`: presence of `app.json`, `eas.json`, or `expo` in dependencies
|
|
66
|
+
- `typescript`: presence of `tsconfig.json` or `typescript` in dependencies
|
|
67
|
+
|
|
68
|
+
Only check type directories that match the project.
|
|
69
|
+
|
|
70
|
+
### Step 4: Compare Files
|
|
71
|
+
|
|
72
|
+
For each file, compare the project version against the Lisa source:
|
|
73
|
+
|
|
74
|
+
1. Read both files
|
|
75
|
+
2. If identical, mark as "in sync"
|
|
76
|
+
3. If different, generate a diff summary
|
|
77
|
+
|
|
78
|
+
Use the Bash tool with `diff` to generate readable diffs:
|
|
79
|
+
```bash
|
|
80
|
+
diff -u "/path/to/lisa/source" "/path/to/project/file" || true
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Step 5: Generate Report
|
|
84
|
+
|
|
85
|
+
Create a markdown report with these sections:
|
|
86
|
+
|
|
87
|
+
```markdown
|
|
88
|
+
# Lisa Implementation Review
|
|
89
|
+
|
|
90
|
+
**Project:** [project name from package.json]
|
|
91
|
+
**Lisa Source:** [lisa directory path]
|
|
92
|
+
**Generated:** [current date/time]
|
|
93
|
+
|
|
94
|
+
## Summary
|
|
95
|
+
|
|
96
|
+
- **Total managed files:** X
|
|
97
|
+
- **In sync:** X
|
|
98
|
+
- **Drifted:** X
|
|
99
|
+
- **Source not found:** X
|
|
100
|
+
|
|
101
|
+
## Drifted Files
|
|
102
|
+
|
|
103
|
+
### [relative/path/to/file]
|
|
104
|
+
|
|
105
|
+
**Source:** [lisa-type]/copy-overwrite/[path]
|
|
106
|
+
**Strategy:** copy-overwrite
|
|
107
|
+
|
|
108
|
+
<details>
|
|
109
|
+
<summary>View diff</summary>
|
|
110
|
+
|
|
111
|
+
```diff
|
|
112
|
+
[diff output]
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
</details>
|
|
116
|
+
|
|
117
|
+
**Recommendation:** [Brief analysis of whether this change should be upstreamed]
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
[Repeat for each drifted file]
|
|
122
|
+
|
|
123
|
+
## Files Not Found in Lisa
|
|
124
|
+
|
|
125
|
+
These files are in the manifest but their source templates couldn't be located:
|
|
126
|
+
|
|
127
|
+
- [list of files]
|
|
128
|
+
|
|
129
|
+
## In Sync Files
|
|
130
|
+
|
|
131
|
+
<details>
|
|
132
|
+
<summary>X files are in sync with Lisa</summary>
|
|
133
|
+
|
|
134
|
+
- [list of files]
|
|
135
|
+
|
|
136
|
+
</details>
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Step 6: Offer to Upstream Changes
|
|
140
|
+
|
|
141
|
+
After presenting the report, ask the user which drifted files they want to copy back to Lisa.
|
|
142
|
+
|
|
143
|
+
For each file the user wants to upstream:
|
|
144
|
+
|
|
145
|
+
1. Confirm the target path in Lisa (e.g., `typescript/copy-overwrite/.github/workflows/ci.yml`)
|
|
146
|
+
2. Use the Write tool to copy the project's version to Lisa
|
|
147
|
+
3. Report success
|
|
148
|
+
|
|
149
|
+
Example prompt:
|
|
150
|
+
```
|
|
151
|
+
I found X files that have drifted from Lisa's templates.
|
|
152
|
+
|
|
153
|
+
Which files would you like to copy back to Lisa?
|
|
154
|
+
1. .github/workflows/ci.yml - [brief description of changes]
|
|
155
|
+
2. .claude/settings.json - [brief description of changes]
|
|
156
|
+
3. All of the above
|
|
157
|
+
4. None - just show me the report
|
|
158
|
+
|
|
159
|
+
Select an option (or list specific numbers):
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Important Notes
|
|
163
|
+
|
|
164
|
+
- **Never auto-upstream without confirmation** - always ask the user first
|
|
165
|
+
- **Preserve the most specific type directory** - if a file exists in both `typescript/` and `all/`, upstream to where it currently exists
|
|
166
|
+
- **Handle binary files gracefully** - skip comparison for non-text files
|
|
167
|
+
- **Respect .gitignore patterns** - some generated files shouldn't be compared
|
|
168
|
+
- For `copy-contents` files like `.gitignore`, the comparison is trickier since the project may have additional lines - highlight only if Lisa's required lines are missing
|
|
169
|
+
|
|
170
|
+
## Example Usage
|
|
171
|
+
|
|
172
|
+
```
|
|
173
|
+
User: /lisa:review-implementation
|
|
174
|
+
|
|
175
|
+
Claude: I'll review your project's Lisa-managed files against the Lisa source templates.
|
|
176
|
+
|
|
177
|
+
[Locates Lisa directory]
|
|
178
|
+
[Reads manifest]
|
|
179
|
+
[Compares files]
|
|
180
|
+
[Generates report]
|
|
181
|
+
|
|
182
|
+
# Lisa Implementation Review
|
|
183
|
+
|
|
184
|
+
**Project:** my-awesome-app
|
|
185
|
+
**Lisa Source:** /Users/dev/lisa
|
|
186
|
+
**Generated:** 2026-01-18 10:30:00
|
|
187
|
+
|
|
188
|
+
## Summary
|
|
189
|
+
|
|
190
|
+
- **Total managed files:** 45
|
|
191
|
+
- **In sync:** 42
|
|
192
|
+
- **Drifted:** 3
|
|
193
|
+
- **Source not found:** 0
|
|
194
|
+
|
|
195
|
+
## Drifted Files
|
|
196
|
+
|
|
197
|
+
### .github/workflows/ci.yml
|
|
198
|
+
|
|
199
|
+
**Source:** typescript/copy-overwrite/.github/workflows/ci.yml
|
|
200
|
+
**Strategy:** copy-overwrite
|
|
201
|
+
|
|
202
|
+
[diff details]
|
|
203
|
+
|
|
204
|
+
**Recommendation:** This adds a new caching step that improves CI performance. Good candidate for upstreaming.
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
I found 3 files that have drifted. Would you like to upstream any of these changes back to Lisa?
|
|
209
|
+
```
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Increase test coverage to a specified threshold percentage
|
|
3
|
+
allowed-tools: Read, Write, Edit, Bash, Task, TaskCreate, TaskUpdate, TaskList, TaskGet
|
|
4
|
+
argument-hint: <threshold-percentage>
|
|
5
|
+
model: sonnet
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Increase Test Coverage
|
|
9
|
+
|
|
10
|
+
Target threshold: $ARGUMENTS%
|
|
11
|
+
|
|
12
|
+
If no argument provided, prompt the user for a target.
|
|
13
|
+
|
|
14
|
+
## Process
|
|
15
|
+
|
|
16
|
+
### Step 0: Check Project Context
|
|
17
|
+
|
|
18
|
+
Check if there's an active project for task syncing:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
cat .claude-active-project 2>/dev/null
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
If a project is active, include `metadata: { "project": "<project-name>" }` in all TaskCreate calls.
|
|
25
|
+
|
|
26
|
+
### Step 1: Locate Configuration
|
|
27
|
+
|
|
28
|
+
Find the test coverage config (jest.config.js, vitest.config.ts, .nycrc, etc.).
|
|
29
|
+
|
|
30
|
+
### Step 2: Update Thresholds
|
|
31
|
+
|
|
32
|
+
Set any threshold below $ARGUMENTS% to $ARGUMENTS% (line, branch, function, statement).
|
|
33
|
+
|
|
34
|
+
### Step 3: Identify Gaps
|
|
35
|
+
|
|
36
|
+
Run coverage and identify the **20 files** with the lowest coverage.
|
|
37
|
+
|
|
38
|
+
### Step 4: Create Task List
|
|
39
|
+
|
|
40
|
+
Create a task for each file needing test coverage, ordered by coverage gap (lowest first).
|
|
41
|
+
|
|
42
|
+
Each task should have:
|
|
43
|
+
- **subject**: "Add test coverage for [file]" (imperative form)
|
|
44
|
+
- **description**: File path, current coverage %, target threshold, notes about uncovered lines/branches
|
|
45
|
+
- **activeForm**: "Adding tests for [file]" (present continuous)
|
|
46
|
+
- **metadata**: `{ "project": "<active-project>" }` if project context exists
|
|
47
|
+
|
|
48
|
+
### Step 5: Parallel Execution
|
|
49
|
+
|
|
50
|
+
Launch **up to 5 sub-agents** using the `test-coverage-agent` subagent to add tests in parallel.
|
|
51
|
+
|
|
52
|
+
### Step 6: Iterate
|
|
53
|
+
|
|
54
|
+
Check for remaining pending tasks. Re-run coverage to verify.
|
|
55
|
+
|
|
56
|
+
If thresholds aren't met, repeat from Step 3.
|
|
57
|
+
|
|
58
|
+
Continue until all thresholds meet or exceed $ARGUMENTS%.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Moves a project to the projects/archive directory after it's completed
|
|
3
3
|
argument-hint: <project-directory>
|
|
4
|
-
allowed-tools: Read, Write, Bash(git*), Glob, Grep, Task,
|
|
4
|
+
allowed-tools: Read, Write, Bash(git*), Glob, Grep, Task, TaskCreate, TaskUpdate, TaskList
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
1. Move $ARGUMENTS to `projects/archive`
|
|
@@ -4,4 +4,56 @@ argument-hint: <task-file>
|
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
1. Read $ARGUMENTS without offset or limit
|
|
7
|
-
2. Follow the instructions literally and specifically
|
|
7
|
+
2. Follow the instructions literally and specifically
|
|
8
|
+
|
|
9
|
+
## Verification Requirements
|
|
10
|
+
|
|
11
|
+
**CRITICAL**: Before marking ANY task as complete:
|
|
12
|
+
|
|
13
|
+
### For JSON Tasks (`.json` files)
|
|
14
|
+
|
|
15
|
+
If the task file is JSON and contains `metadata.verification`:
|
|
16
|
+
|
|
17
|
+
1. **Extract verification data**:
|
|
18
|
+
```json
|
|
19
|
+
{
|
|
20
|
+
"metadata": {
|
|
21
|
+
"verification": {
|
|
22
|
+
"type": "manual-check",
|
|
23
|
+
"command": "the command to run",
|
|
24
|
+
"expected": "description of expected output"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
2. **Run the verification command** using Bash tool
|
|
31
|
+
3. **Compare output to expected** - Verify the output matches the `expected` description
|
|
32
|
+
4. **Only mark complete if verification passes**
|
|
33
|
+
|
|
34
|
+
### For Markdown Tasks (`.md` files)
|
|
35
|
+
|
|
36
|
+
If the task has a "## Verification" section with "### Proof Command":
|
|
37
|
+
|
|
38
|
+
1. **Extract the Proof Command** from the markdown
|
|
39
|
+
2. **Run the command** using Bash tool
|
|
40
|
+
3. **Compare output to Expected Output** section
|
|
41
|
+
4. **Only mark complete if verification passes**
|
|
42
|
+
|
|
43
|
+
### Verification Rules
|
|
44
|
+
|
|
45
|
+
1. **`manual-check` verification type** - These require actual execution, not just configuration review:
|
|
46
|
+
- If the check requires Docker and Docker is unavailable → Task is **BLOCKED**, not complete
|
|
47
|
+
- If the check requires external services → Actually test against them
|
|
48
|
+
- If the check requires running a command → Run the command and verify output
|
|
49
|
+
2. **Never assume configuration is correct** - Always empirically verify by running the actual tool/service
|
|
50
|
+
3. **If verification cannot be performed**:
|
|
51
|
+
- Do NOT mark the task as complete
|
|
52
|
+
- Document the blocker in findings.md
|
|
53
|
+
- Mark the task status as "blocked: <reason>"
|
|
54
|
+
4. **If verification fails**:
|
|
55
|
+
- Do NOT mark the task as complete
|
|
56
|
+
- Fix the issue and re-run verification
|
|
57
|
+
- Only mark complete when verification passes
|
|
58
|
+
|
|
59
|
+
The rule "Never make assumptions about whether something worked. Test it empirically to confirm" applies especially to verification tasks.
|
|
@@ -1,32 +1,26 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Evaluates findings.md and uses skill-evaluator to decide where each learning belongs (new skill, PROJECT_RULES.md, or omit)
|
|
2
|
+
description: Evaluates findings.md and uses skill-evaluator to decide where each learning belongs (new skill, .claude/rules/PROJECT_RULES.md, or omit)
|
|
3
3
|
argument-hint: <project-directory>
|
|
4
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, Task, TaskCreate, TaskUpdate, TaskList, Skill
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
##
|
|
7
|
+
## Setup
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
- Step 1: Read project findings
|
|
10
|
-
- Step 2: Evaluate each finding
|
|
11
|
-
- Step 3: Apply decisions
|
|
9
|
+
Create workflow tracking tasks with `metadata: { "project": "<project-name>", "phase": "debrief" }`:
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
1. Read project findings
|
|
12
|
+
2. Evaluate each finding
|
|
13
|
+
3. Apply decisions
|
|
14
14
|
|
|
15
15
|
## Step 1: Read Project Findings
|
|
16
|
-
Mark "Step 1: Read project findings" as in_progress.
|
|
17
16
|
|
|
18
|
-
Read
|
|
17
|
+
Read `$ARGUMENTS/findings.md` FULLY (no limit/offset).
|
|
19
18
|
|
|
20
19
|
Extract each distinct finding/learning as a separate item.
|
|
21
20
|
|
|
22
|
-
Mark "Step 1: Read project findings" as completed. Proceed to Step 2.
|
|
23
|
-
|
|
24
21
|
## Step 2: Evaluate Each Finding
|
|
25
|
-
Mark "Step 2: Evaluate each finding" as in_progress.
|
|
26
|
-
|
|
27
|
-
For each finding extracted from findings.md:
|
|
28
22
|
|
|
29
|
-
|
|
23
|
+
For each finding, use the Task tool with `subagent_type: "skill-evaluator"`:
|
|
30
24
|
|
|
31
25
|
```
|
|
32
26
|
Evaluate this finding from a project debrief:
|
|
@@ -35,30 +29,25 @@ Evaluate this finding from a project debrief:
|
|
|
35
29
|
|
|
36
30
|
Determine if this should be:
|
|
37
31
|
1. CREATE SKILL - if it's a complex, reusable pattern
|
|
38
|
-
2. ADD TO RULES - if it's a simple never/always rule for PROJECT_RULES.md
|
|
32
|
+
2. ADD TO RULES - if it's a simple never/always rule for .claude/rules/PROJECT_RULES.md
|
|
39
33
|
3. OMIT ENTIRELY - if it's already covered or too project-specific
|
|
40
34
|
```
|
|
41
35
|
|
|
42
36
|
Collect all decisions from the skill-evaluator.
|
|
43
37
|
|
|
44
|
-
Mark "Step 2: Evaluate each finding" as completed. Proceed to Step 3.
|
|
45
|
-
|
|
46
38
|
## Step 3: Apply Decisions
|
|
47
|
-
Mark "Step 3: Apply decisions" as in_progress.
|
|
48
39
|
|
|
49
40
|
For each finding based on skill-evaluator's decision:
|
|
50
41
|
|
|
51
42
|
| Decision | Action |
|
|
52
43
|
|----------|--------|
|
|
53
44
|
| CREATE SKILL | Use Task tool: "run /skill-creator with [finding details]" |
|
|
54
|
-
| ADD TO RULES | Add the rule succinctly to
|
|
45
|
+
| ADD TO RULES | Add the rule succinctly to @.claude/rules/PROJECT_RULES.md |
|
|
55
46
|
| OMIT ENTIRELY | No action needed |
|
|
56
47
|
|
|
57
|
-
Mark "Step 3: Apply decisions" as completed.
|
|
58
|
-
|
|
59
48
|
Report summary:
|
|
60
49
|
```
|
|
61
|
-
|
|
50
|
+
Debrief complete:
|
|
62
51
|
- Skills created: [X]
|
|
63
52
|
- Rules added: [Y]
|
|
64
53
|
- Omitted (redundant/narrow): [Z]
|
|
@@ -1,94 +1,50 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Automated project execution from planning through debrief (requires gap-free research)
|
|
3
3
|
argument-hint: <project-directory>
|
|
4
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, Task, TaskCreate, TaskUpdate, TaskList, TaskGet, Skill
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
Execute complete implementation workflow for $ARGUMENTS
|
|
7
|
+
Execute complete implementation workflow for $ARGUMENTS.
|
|
7
8
|
|
|
8
|
-
##
|
|
9
|
+
## Execution Rules
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
1. **Continuous execution**: After each step completes, immediately invoke the next
|
|
12
|
+
2. **No summaries**: Do not summarize progress between steps
|
|
13
|
+
3. **No waiting**: Do not wait for user confirmation between steps
|
|
14
|
+
4. **Only stop when done**: Only stop when all steps are completed
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
Check if planning has already been done:
|
|
17
|
-
1. Check if `$ARGUMENTS/progress.md` exists
|
|
18
|
-
2. Check if `$ARGUMENTS/tasks/` directory exists with task files (task-*.md)
|
|
16
|
+
## Setup
|
|
19
17
|
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
1. Set active project marker: `echo "$ARGUMENTS" | sed 's|.*/||' > .claude-active-project`
|
|
19
|
+
2. Read `$ARGUMENTS/research.md` and check "## Open Questions" section
|
|
20
|
+
- If gaps exist: STOP with "Cannot proceed - research.md has unresolved open questions"
|
|
21
|
+
3. Check if planning is already complete: `ls $ARGUMENTS/tasks/*.md 2>/dev/null | head -3`
|
|
22
|
+
- If task files exist: Skip planning, start at implementation
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
Use TodoWrite to create these workflow todos:
|
|
25
|
-
- Step 1: Planning
|
|
26
|
-
- Step 2: Implementation
|
|
27
|
-
- Step 3: Verification
|
|
28
|
-
- Step 4: Debrief
|
|
29
|
-
- Step 5: Archive
|
|
24
|
+
## Workflow Tasks
|
|
30
25
|
|
|
31
|
-
|
|
26
|
+
Create workflow tracking tasks with `metadata: { "project": "<project-name>", "phase": "execution" }`:
|
|
32
27
|
|
|
33
|
-
|
|
28
|
+
1. Step 1: Planning
|
|
29
|
+
2. Step 2: Implementation
|
|
30
|
+
3. Step 3: Review
|
|
31
|
+
4. Step 4: Verification
|
|
32
|
+
5. Step 5: Debrief
|
|
33
|
+
6. Step 6: Archive
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
Use TodoWrite to create these workflow todos (marking Step 1 as already completed):
|
|
37
|
-
- Step 1: Planning ✓ (mark as completed immediately)
|
|
38
|
-
- Step 2: Implementation
|
|
39
|
-
- Step 3: Review
|
|
40
|
-
- Step 4: Verification
|
|
41
|
-
- Step 5: Debrief
|
|
42
|
-
- Step 6: Archive
|
|
35
|
+
## Execution
|
|
43
36
|
|
|
44
|
-
|
|
37
|
+
Work through each workflow task:
|
|
45
38
|
|
|
46
|
-
|
|
39
|
+
| Step | Command |
|
|
40
|
+
|------|---------|
|
|
41
|
+
| Planning | `run /project:plan $ARGUMENTS` |
|
|
42
|
+
| Implementation | `run /project:implement $ARGUMENTS` |
|
|
43
|
+
| Review | `run /project:review $ARGUMENTS` |
|
|
44
|
+
| Verification | `run /project:verify $ARGUMENTS` |
|
|
45
|
+
| Debrief | `run /project:debrief $ARGUMENTS` |
|
|
46
|
+
| Archive | `run /project:archive $ARGUMENTS` |
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
**CRITICAL**: Use Task tool with subagent for Planning, Implementation, Verification, Debrief, and Archive steps.
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
⚠️ **CRITICAL**: DO NOT STOP use the Plan tool to do this. Use Task tool with prompt: "run /project:plan $ARGUMENTS" as directed below
|
|
52
|
-
|
|
53
|
-
Mark "Step 1: Planning" as in_progress.
|
|
54
|
-
|
|
55
|
-
Use Task tool with prompt: "run /project:plan $ARGUMENTS"
|
|
56
|
-
|
|
57
|
-
Mark "Step 1: Planning" as completed. Proceed to Step 2.
|
|
58
|
-
|
|
59
|
-
## Step 2: Implementation Loop
|
|
60
|
-
Mark "Step 2: Implementation" as in_progress.
|
|
61
|
-
|
|
62
|
-
Use Task tool with prompt: "run /project:implement $ARGUMENTS"
|
|
63
|
-
|
|
64
|
-
Mark "Step 2: Implementation" as completed. Proceed to Step 3.
|
|
65
|
-
|
|
66
|
-
## Step 3: Review
|
|
67
|
-
Mark "Step 3: Review" as in_progress.
|
|
68
|
-
|
|
69
|
-
run /project:review $ARGUMENTS
|
|
70
|
-
|
|
71
|
-
Mark "Step 3: Review" as completed. Proceed to Step 4.
|
|
72
|
-
|
|
73
|
-
## Step 4: Verification
|
|
74
|
-
Mark "Step 4: Verification" as in_progress.
|
|
75
|
-
|
|
76
|
-
Use Task tool with prompt: "run /project:verify $ARGUMENTS"
|
|
77
|
-
|
|
78
|
-
Mark "Step 4: Verification" as completed. Proceed to Step 5.
|
|
79
|
-
|
|
80
|
-
## Step 5: Debrief
|
|
81
|
-
Mark "Step 5: Debrief" as in_progress.
|
|
82
|
-
|
|
83
|
-
Use Task tool with prompt: "run /project:debrief $ARGUMENTS"
|
|
84
|
-
|
|
85
|
-
Mark "Step 5: Debrief" as completed. Proceed to Step 6.
|
|
86
|
-
|
|
87
|
-
## Step 6: Archive
|
|
88
|
-
Mark "Step 6: Archive" as in_progress.
|
|
89
|
-
|
|
90
|
-
Use Task tool with prompt: "run /project:archive $ARGUMENTS"
|
|
91
|
-
|
|
92
|
-
Mark "Step 6: Archive" as completed.
|
|
93
|
-
|
|
94
|
-
Report: "🎉 Project complete and archived"
|
|
50
|
+
Report "Project complete and archived" when done.
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Fix all violations of one or more ESLint rules across the codebase
|
|
3
|
+
allowed-tools: Read, Write, Edit, Bash, Task, TaskCreate, TaskUpdate, TaskList, TaskGet
|
|
4
|
+
argument-hint: <rule-1> [rule-2] [rule-3] ...
|
|
5
|
+
model: sonnet
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Fix Linter Errors
|
|
9
|
+
|
|
10
|
+
Target rules: $ARGUMENTS
|
|
11
|
+
|
|
12
|
+
Parse the arguments as space-separated ESLint rule names. If no arguments provided, prompt the user for at least one lint rule name.
|
|
13
|
+
|
|
14
|
+
## Setup
|
|
15
|
+
|
|
16
|
+
Check for active project: `cat .claude-active-project 2>/dev/null`
|
|
17
|
+
|
|
18
|
+
If active, include `metadata: { "project": "<project-name>" }` in TaskCreate calls.
|
|
19
|
+
|
|
20
|
+
## Step 1: Parse Rules
|
|
21
|
+
|
|
22
|
+
Split `$ARGUMENTS` into individual rule names (space-separated).
|
|
23
|
+
|
|
24
|
+
Example inputs:
|
|
25
|
+
- `sonarjs/cognitive-complexity` → 1 rule
|
|
26
|
+
- `sonarjs/cognitive-complexity @typescript-eslint/no-explicit-any` → 2 rules
|
|
27
|
+
- `react-hooks/exhaustive-deps import/order prefer-const` → 3 rules
|
|
28
|
+
|
|
29
|
+
## Step 2: Enable Rules
|
|
30
|
+
|
|
31
|
+
For each rule, find the ESLint config and set it to `"error"` severity if not already enabled. NOTE: Make sure to scan for overrides that need to be changed too. For example eslint.config.local.ts.
|
|
32
|
+
|
|
33
|
+
## Step 3: Identify Violations
|
|
34
|
+
|
|
35
|
+
Run linting and collect violations for all target rules:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
bun run lint 2>&1 | grep -E "(rule-1|rule-2|...)"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Group violations by:
|
|
42
|
+
1. **Rule name** (primary grouping)
|
|
43
|
+
2. **File path** (secondary grouping)
|
|
44
|
+
|
|
45
|
+
Count violations per file per rule.
|
|
46
|
+
|
|
47
|
+
## Step 4: Create Tasks
|
|
48
|
+
|
|
49
|
+
Create tasks organized by rule, then by file:
|
|
50
|
+
|
|
51
|
+
For each rule:
|
|
52
|
+
- Create a parent task: "Fix all [rule-name] violations ([N] files, [M] total)"
|
|
53
|
+
- Create child tasks for each file with violations, ordered by count (highest first)
|
|
54
|
+
|
|
55
|
+
Each file task should include:
|
|
56
|
+
- File path and violation count for that specific rule
|
|
57
|
+
- Sample error messages
|
|
58
|
+
- Fix approach based on rule type:
|
|
59
|
+
- **Complexity rules** (`sonarjs/*`): Extract functions, use early returns, simplify conditions
|
|
60
|
+
- **Style rules** (`prettier/*`, `import/order`): Apply formatting fixes
|
|
61
|
+
- **Best practice rules** (`react-hooks/*`, `prefer-const`): Refactor to follow recommended pattern
|
|
62
|
+
- **Type rules** (`@typescript-eslint/*`): Add proper types, remove `any`
|
|
63
|
+
|
|
64
|
+
## Step 5: Execute
|
|
65
|
+
|
|
66
|
+
Process rules sequentially (to avoid conflicts), but parallelize file fixes within each rule:
|
|
67
|
+
|
|
68
|
+
For each rule:
|
|
69
|
+
1. Launch up to 5 sub-agents to fix files for that rule in parallel
|
|
70
|
+
2. Wait for all files to be fixed
|
|
71
|
+
3. Run `bun run lint` to verify rule is now clean
|
|
72
|
+
4. Commit all fixes for that rule with message: `fix(lint): resolve [rule-name] violations`
|
|
73
|
+
5. Move to next rule
|
|
74
|
+
|
|
75
|
+
## Step 6: Report
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
Lint rule fix complete:
|
|
79
|
+
|
|
80
|
+
| Rule | Files Fixed | Violations Resolved |
|
|
81
|
+
|------|-------------|---------------------|
|
|
82
|
+
| rule-1 | N1 | M1 |
|
|
83
|
+
| rule-2 | N2 | M2 |
|
|
84
|
+
| ... | ... | ... |
|
|
85
|
+
|
|
86
|
+
Total: [N] files fixed, [M] violations resolved
|
|
87
|
+
```
|