@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,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Reduce max file lines threshold and fix violations
|
|
3
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, Task, TaskCreate, TaskUpdate, TaskList, TaskGet
|
|
4
|
+
argument-hint: <max-lines-value>
|
|
5
|
+
model: sonnet
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Reduce Max Lines
|
|
9
|
+
|
|
10
|
+
Target threshold: $ARGUMENTS lines per file
|
|
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
|
+
Read the eslint thresholds config (`eslint.thresholds.json` or similar).
|
|
29
|
+
|
|
30
|
+
### Step 2: Update Threshold
|
|
31
|
+
|
|
32
|
+
Set the `maxLines` threshold to $ARGUMENTS (e.g., `"maxLines": $ARGUMENTS`).
|
|
33
|
+
|
|
34
|
+
### Step 3: Identify Violations
|
|
35
|
+
|
|
36
|
+
Run lint to find all files exceeding the new threshold. Note file path and current line count.
|
|
37
|
+
|
|
38
|
+
If no violations, report success and exit.
|
|
39
|
+
|
|
40
|
+
### Step 4: Create Task List
|
|
41
|
+
|
|
42
|
+
Create a task for each file needing refactoring, ordered by line count (highest first).
|
|
43
|
+
|
|
44
|
+
Each task should have:
|
|
45
|
+
- **subject**: "Reduce lines in [file]" (imperative form)
|
|
46
|
+
- **description**: File path, current line count, target threshold, refactoring strategies
|
|
47
|
+
- **activeForm**: "Reducing lines in [file]" (present continuous)
|
|
48
|
+
- **metadata**: `{ "project": "<active-project>" }` if project context exists
|
|
49
|
+
|
|
50
|
+
Refactoring strategies:
|
|
51
|
+
- **Extract modules**: Break file into smaller focused modules
|
|
52
|
+
- **Remove duplication**: Consolidate repeated logic
|
|
53
|
+
- **Delete dead code**: Remove unused functions/code paths
|
|
54
|
+
- **Simplify logic**: Use early returns, reduce nesting
|
|
55
|
+
|
|
56
|
+
### Step 5: Parallel Execution
|
|
57
|
+
|
|
58
|
+
Launch **up to 5 sub-agents** using the `code-simplifier` subagent to refactor in parallel.
|
|
59
|
+
|
|
60
|
+
### Step 6: Iterate
|
|
61
|
+
|
|
62
|
+
Check for remaining pending tasks. Re-run lint to verify.
|
|
63
|
+
|
|
64
|
+
If violations remain, repeat from Step 3.
|
|
65
|
+
|
|
66
|
+
Continue until all files meet or are under $ARGUMENTS lines.
|
|
67
|
+
|
|
68
|
+
### Step 7: Report
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
Max lines reduction complete:
|
|
72
|
+
- Target threshold: $ARGUMENTS
|
|
73
|
+
- Files refactored: [count]
|
|
74
|
+
- Files reduced: [list with line counts]
|
|
75
|
+
```
|
|
@@ -1,248 +1,146 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Conducts research of your code base and the web relevant to your project and compiles it for the planning phase
|
|
3
3
|
argument-hint: <project-directory>
|
|
4
|
+
allowed-tools: Read, Write, Bash, Glob, Grep, Task, TaskCreate, TaskUpdate, TaskList, WebSearch, WebFetch
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# Research Codebase
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
Conduct comprehensive research across the codebase and web to help create an implementation plan for the brief in $ARGUMENTS.
|
|
9
10
|
|
|
10
|
-
Goals
|
|
11
|
+
## Goals
|
|
11
12
|
|
|
12
|
-
1. Determine what existing documentation in the codebase will be needed
|
|
13
|
-
2. Determine any gaps in the spec that would prevent
|
|
14
|
-
3. Determine
|
|
15
|
-
4. Determine
|
|
16
|
-
5. Determine testing patterns and locations
|
|
17
|
-
6. Determine documentation patterns
|
|
13
|
+
1. Determine what existing documentation in the codebase will be needed
|
|
14
|
+
2. Determine any gaps in the spec that would prevent fulfilling acceptance criteria
|
|
15
|
+
3. Determine potential pitfalls (performance, security concerns)
|
|
16
|
+
4. Determine reusable code, functions, and modules in the codebase
|
|
17
|
+
5. Determine testing patterns and locations (frameworks, conventions, examples)
|
|
18
|
+
6. Determine documentation patterns (JSDoc, DB comments, GraphQL descriptions)
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
## Critical Rule
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
**YOUR ONLY JOB IS TO DOCUMENT AND EXPLAIN THE CODEBASE AS IT EXISTS TODAY**
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
- Step 5: Generate document
|
|
29
|
-
- Step 6: Commit
|
|
24
|
+
- DO NOT suggest improvements or changes
|
|
25
|
+
- DO NOT perform root cause analysis
|
|
26
|
+
- DO NOT propose future enhancements
|
|
27
|
+
- DO NOT critique or identify problems
|
|
28
|
+
- ONLY describe what exists, where it exists, how it works, and how components interact
|
|
30
29
|
|
|
31
|
-
|
|
30
|
+
## Workflow Tasks
|
|
32
31
|
|
|
33
|
-
|
|
32
|
+
Create workflow tracking tasks with `metadata: { "project": "<project-name>", "phase": "research" }`:
|
|
34
33
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
- You are creating a technical map/documentation of the existing system
|
|
34
|
+
1. Read mentioned files
|
|
35
|
+
2. Analyze and decompose
|
|
36
|
+
3. Spawn research agents
|
|
37
|
+
4. Wait and synthesize
|
|
38
|
+
5. Generate document
|
|
39
|
+
6. Commit
|
|
42
40
|
|
|
43
41
|
## Step 1: Read Mentioned Files
|
|
44
|
-
Mark "Step 1: Read mentioned files" as in_progress.
|
|
45
42
|
|
|
46
|
-
|
|
47
|
-
- If the user mentions specific files (tickets, docs, JSON), read them FULLY first
|
|
48
|
-
- **IMPORTANT**: Use the Read tool WITHOUT limit/offset parameters to read entire files
|
|
49
|
-
- **CRITICAL**: Read these files yourself in the main context before spawning any sub-tasks
|
|
50
|
-
- This ensures you have full context before decomposing the research
|
|
51
|
-
|
|
52
|
-
Mark "Step 1: Read mentioned files" as completed. Proceed to Step 2.
|
|
43
|
+
Read any directly mentioned files FULLY first (no limit/offset). This ensures full context before spawning sub-tasks.
|
|
53
44
|
|
|
54
45
|
## Step 2: Analyze and Decompose
|
|
55
|
-
Mark "Step 2: Analyze and decompose" as in_progress.
|
|
56
46
|
|
|
57
|
-
**Analyze and decompose the research question:**
|
|
58
47
|
- Break down the brief into composable research areas
|
|
59
|
-
- Take time to ultrathink about the underlying patterns, connections, and architectural implications
|
|
60
48
|
- Identify specific components, patterns, or concepts to investigate
|
|
61
|
-
- Create a research plan using TodoWrite to track all subtasks
|
|
62
49
|
- Consider which directories, files, or architectural patterns are relevant
|
|
63
50
|
|
|
64
|
-
Mark "Step 2: Analyze and decompose" as completed. Proceed to Step 3.
|
|
65
|
-
|
|
66
51
|
## Step 3: Spawn Research Agents
|
|
67
|
-
Mark "Step 3: Spawn research agents" as in_progress.
|
|
68
52
|
|
|
69
|
-
|
|
70
|
-
- Create multiple Task agents to research different aspects concurrently
|
|
71
|
-
- We now have specialized agents that know how to do specific research tasks:
|
|
53
|
+
Spawn parallel sub-agent tasks for comprehensive research:
|
|
72
54
|
|
|
73
55
|
**For codebase research:**
|
|
74
|
-
-
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
56
|
+
- **codebase-locator**: Find WHERE files and components live
|
|
57
|
+
- **codebase-analyzer**: Understand HOW specific code works
|
|
58
|
+
- **codebase-pattern-finder**: Find examples of existing patterns
|
|
59
|
+
- **git-history-analyzer**: Understand file change history
|
|
78
60
|
|
|
79
61
|
**For e2e test research:**
|
|
80
|
-
-
|
|
81
|
-
-
|
|
82
|
-
- Identify tests
|
|
83
|
-
- Identify tests that may need to be removed if features are deprecated
|
|
84
|
-
- Identify gaps where new tests will be needed for new functionality
|
|
85
|
-
- Document the test file paths and what each test validates
|
|
86
|
-
|
|
87
|
-
**IMPORTANT**: All agents are documentarians, not critics. They will describe what exists without suggesting improvements or identifying issues.
|
|
62
|
+
- Find existing e2e tests in `e2e/` or `tests/` directories
|
|
63
|
+
- Document what scenarios each test covers
|
|
64
|
+
- Identify tests needing modification or gaps for new functionality
|
|
88
65
|
|
|
89
66
|
**For web research:**
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
|
|
93
|
-
The key is to use these agents intelligently:
|
|
94
|
-
- Start with locator agents to find what exists
|
|
95
|
-
- Then use analyzer agents on the most promising findings to document how they work
|
|
96
|
-
- Run multiple agents in parallel when they're searching for different things
|
|
97
|
-
- Each agent knows its job - just tell it what you're looking for
|
|
98
|
-
- Don't write detailed prompts about HOW to search - the agents already know
|
|
99
|
-
- Remind agents they are documenting, not evaluating or improving
|
|
67
|
+
- **web-search-researcher**: External documentation and resources
|
|
68
|
+
- Include LINKS with findings in the final report
|
|
100
69
|
|
|
101
|
-
|
|
70
|
+
Run multiple agents in parallel when searching for different things.
|
|
102
71
|
|
|
103
72
|
## Step 4: Wait and Synthesize
|
|
104
|
-
Mark "Step 4: Wait and synthesize" as in_progress.
|
|
105
73
|
|
|
106
|
-
**Wait for
|
|
107
|
-
|
|
108
|
-
-
|
|
109
|
-
- Compile all sub-agent results (both codebase and thoughts findings)
|
|
74
|
+
**CRITICAL**: Wait for ALL sub-agent tasks to complete before proceeding.
|
|
75
|
+
|
|
76
|
+
- Compile all sub-agent results
|
|
110
77
|
- Prioritize live codebase findings as primary source of truth
|
|
111
78
|
- Connect findings across different components
|
|
112
|
-
- Include specific file paths and line numbers
|
|
113
|
-
-
|
|
114
|
-
- Include any frameworks used such as Ruby on Rails, NestJs, Expo, React, React Native, Vue, etc
|
|
115
|
-
- If a framework is used, identify what portions of the framework are relevant to the given project (i.e. ActiveRecord, NestJs Service's, dependency injection, etc)
|
|
116
|
-
|
|
117
|
-
Mark "Step 4: Wait and synthesize" as completed. Proceed to Step 5.
|
|
79
|
+
- Include specific file paths and line numbers
|
|
80
|
+
- Note any frameworks used (Rails, NestJS, Expo, React, etc.)
|
|
118
81
|
|
|
119
82
|
## Step 5: Generate Document
|
|
120
|
-
Mark "Step 5: Generate document" as in_progress.
|
|
121
|
-
|
|
122
|
-
**Generate research document:**
|
|
123
|
-
- Structure the document with YAML frontmatter followed by content:
|
|
124
|
-
|
|
125
|
-
```markdown
|
|
126
|
-
---
|
|
127
|
-
date: [Current date and time with timezone in ISO format]
|
|
128
|
-
status: complete
|
|
129
|
-
last_updated: [Current date in YYYY-MM-DD format]
|
|
130
|
-
---
|
|
131
|
-
|
|
132
|
-
# Research
|
|
133
|
-
|
|
134
|
-
## Summary
|
|
135
|
-
|
|
136
|
-
[High-level documentation of what was found]
|
|
137
83
|
|
|
138
|
-
|
|
84
|
+
Create `$ARGUMENTS/research.md` with this structure:
|
|
139
85
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
### [Component/Area 2]
|
|
147
|
-
|
|
148
|
-
...
|
|
149
|
-
|
|
150
|
-
## Code References
|
|
151
|
-
|
|
152
|
-
- `path/to/file.py:123` - Description of what's there
|
|
153
|
-
- `another/file.ts:45-67` - Description of the code block
|
|
154
|
-
|
|
155
|
-
## Architecture Documentation
|
|
156
|
-
|
|
157
|
-
[Current patterns, conventions, and design implementations found in the codebase]
|
|
158
|
-
|
|
159
|
-
## Testing Patterns
|
|
160
|
-
|
|
161
|
-
### Unit Test Patterns
|
|
162
|
-
- **Location**: `src/**/__tests__/*.test.ts` (or actual pattern found)
|
|
163
|
-
- **Framework**: Jest/Vitest/etc.
|
|
164
|
-
- **Example to follow**: `path/to/example.test.ts:line-range`
|
|
165
|
-
- **Conventions**: [Describe naming, structure, mock patterns]
|
|
166
|
-
|
|
167
|
-
### Integration Test Patterns
|
|
168
|
-
- **Location**: `src/**/*.integration.test.ts` (or actual pattern found)
|
|
169
|
-
- **Example to follow**: `path/to/example.integration.test.ts`
|
|
170
|
-
- **Conventions**: [Describe setup, teardown, database handling]
|
|
86
|
+
```markdown
|
|
87
|
+
---
|
|
88
|
+
date: [ISO format with timezone]
|
|
89
|
+
status: complete
|
|
90
|
+
last_updated: [YYYY-MM-DD]
|
|
91
|
+
---
|
|
171
92
|
|
|
172
|
-
|
|
173
|
-
- **Location**: `e2e/*.spec.ts` (or actual pattern found)
|
|
174
|
-
- **Framework**: Playwright/Cypress/Maestro/etc.
|
|
175
|
-
- **Example to follow**: `path/to/example.spec.ts`
|
|
176
|
-
- **Conventions**: [Describe page objects, fixtures, assertions]
|
|
93
|
+
# Research
|
|
177
94
|
|
|
178
|
-
|
|
95
|
+
## Summary
|
|
96
|
+
[High-level documentation of findings]
|
|
179
97
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
98
|
+
## Detailed Findings
|
|
99
|
+
### [Component/Area]
|
|
100
|
+
- Description of what exists ([file.ext:line](link))
|
|
101
|
+
- How it connects to other components
|
|
184
102
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
- **Example**: `path/to/entity.ts` or migration file
|
|
188
|
-
- **Required for**: [New tables, new columns, complex relationships]
|
|
103
|
+
## Code References
|
|
104
|
+
- `path/to/file.py:123` - Description
|
|
189
105
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
- **Example**: `path/to/resolver.ts` or schema file
|
|
193
|
-
- **Required for**: [Public API fields, complex types]
|
|
106
|
+
## Architecture Documentation
|
|
107
|
+
[Patterns, conventions, design implementations]
|
|
194
108
|
|
|
195
|
-
|
|
109
|
+
## Testing Patterns
|
|
110
|
+
### Unit Test Patterns
|
|
111
|
+
- **Location**: pattern found
|
|
112
|
+
- **Framework**: Jest/Vitest/etc.
|
|
113
|
+
- **Example to follow**: path:line-range
|
|
114
|
+
- **Conventions**: naming, structure, mocks
|
|
196
115
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
The Answer field must be filled by a human before planning can proceed.
|
|
200
|
-
-->
|
|
116
|
+
### Integration Test Patterns
|
|
117
|
+
[Similar structure]
|
|
201
118
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
**Context**: [Why this question arose, what in the brief is unclear]
|
|
205
|
-
**Impact**: [What parts of implementation this affects]
|
|
206
|
-
**Answer**: _[Human fills this in before running /project:plan]_
|
|
119
|
+
### E2E Test Patterns
|
|
120
|
+
[Similar structure]
|
|
207
121
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
122
|
+
## Documentation Patterns
|
|
123
|
+
### JSDoc Conventions
|
|
124
|
+
### Database Comments (Backend)
|
|
125
|
+
### GraphQL Descriptions (Backend)
|
|
211
126
|
|
|
212
|
-
|
|
127
|
+
## Open Questions
|
|
213
128
|
|
|
214
|
-
|
|
129
|
+
### Q1: [Short Title]
|
|
130
|
+
**Question**: [Full question]
|
|
131
|
+
**Context**: [Why this arose]
|
|
132
|
+
**Impact**: [What it affects]
|
|
133
|
+
**Answer**: _[Human fills before /project:plan]_
|
|
134
|
+
```
|
|
215
135
|
|
|
216
136
|
## Step 6: Commit
|
|
217
|
-
Mark "Step 6: Commit" as in_progress.
|
|
218
|
-
|
|
219
|
-
Run /git:commit
|
|
220
137
|
|
|
221
|
-
|
|
138
|
+
Run `/git:commit`
|
|
222
139
|
|
|
223
|
-
## Important
|
|
140
|
+
## Important Notes
|
|
224
141
|
|
|
225
|
-
- Always use parallel Task agents to maximize efficiency
|
|
226
|
-
- Always run fresh codebase research - never rely solely on existing
|
|
227
|
-
- Focus on finding concrete file paths and line numbers
|
|
228
|
-
-
|
|
229
|
-
- Each sub-agent prompt should be specific and focused on read-only documentation operations
|
|
230
|
-
- Document cross-component connections and how systems interact
|
|
231
|
-
- Include temporal context (when the research was conducted)
|
|
232
|
-
- Keep the main agent focused on synthesis, not deep file reading
|
|
233
|
-
- Have sub-agents document examples and usage patterns as they exist
|
|
234
|
-
- **CRITICAL**: You and all sub-agents are documentarians, not evaluators
|
|
142
|
+
- Always use parallel Task agents to maximize efficiency
|
|
143
|
+
- Always run fresh codebase research - never rely solely on existing documents
|
|
144
|
+
- Focus on finding concrete file paths and line numbers
|
|
145
|
+
- Each sub-agent prompt should be specific and focused on read-only documentation
|
|
235
146
|
- **REMEMBER**: Document what IS, not what SHOULD BE
|
|
236
|
-
- **NO RECOMMENDATIONS**: Only describe the current state of the codebase
|
|
237
|
-
- **File reading**: Always read mentioned files FULLY (no limit/offset) before spawning sub-tasks
|
|
238
|
-
- **Critical ordering**: Follow the numbered steps exactly
|
|
239
|
-
- ALWAYS read mentioned files first before spawning sub-tasks (step 1)
|
|
240
|
-
- ALWAYS wait for all sub-agents to complete before synthesizing (step 4)
|
|
241
|
-
- ALWAYS gather metadata before writing the document (step 5 before step 6)
|
|
242
|
-
- NEVER write the research document with placeholder values
|
|
243
|
-
- **Frontmatter consistency**:
|
|
244
|
-
- Always include frontmatter at the beginning of research documents
|
|
245
|
-
- Keep frontmatter fields consistent across all research documents
|
|
246
|
-
- Update frontmatter when adding follow-up research
|
|
247
|
-
- Use snake_case for multi-word field names (e.g., `last_updated`)
|
|
248
|
-
- Tags should be relevant to the research topic and components studied
|
|
@@ -1,63 +1,44 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Performs extensive code review and optimization on the current project
|
|
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
|
-
The current branch is a feature branch
|
|
7
|
+
The current branch is a feature branch with full implementation of the project in $ARGUMENTS.
|
|
7
8
|
|
|
8
|
-
IMPORTANT
|
|
9
|
+
**IMPORTANT**: Perform each step and move to the next without stopping.
|
|
9
10
|
|
|
10
|
-
##
|
|
11
|
+
## Setup
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
- Step 1: Perform Claude Review
|
|
14
|
-
- Step 2: Implement Claude Review Fixes
|
|
15
|
-
- Step 3: Perform CodeRabbit Review
|
|
16
|
-
- Step 4: Implement CodeRabbit Review Fixes
|
|
17
|
-
- Step 5: Perform Claude Optimizations
|
|
13
|
+
Create workflow tracking tasks with `metadata: { "project": "<project-name>", "phase": "review" }`:
|
|
18
14
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
1. Perform Claude Review
|
|
16
|
+
2. Implement Claude Review Fixes
|
|
17
|
+
3. Perform CodeRabbit Review
|
|
18
|
+
4. Implement CodeRabbit Review Fixes
|
|
19
|
+
5. Perform Claude Optimizations
|
|
22
20
|
|
|
23
|
-
|
|
21
|
+
## Step 1: Perform Claude Review
|
|
24
22
|
|
|
25
|
-
|
|
23
|
+
If `$ARGUMENTS/claude-review.md` already exists, skip to Step 2.
|
|
26
24
|
|
|
27
|
-
|
|
25
|
+
Otherwise, run `/project:local-code-review $ARGUMENTS`
|
|
28
26
|
|
|
29
27
|
## Step 2: Implement Claude Review Fixes
|
|
30
28
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
1. Read $ARGUMENTS/claude-review.md
|
|
34
|
-
2. Fix any suggestions that score above 45 in $ARGUMENTS/claude-review.md
|
|
35
|
-
|
|
36
|
-
Mark "Step 2: Implement Claude Review Fixes" as completed. Proceed to Step 3
|
|
29
|
+
1. Read `$ARGUMENTS/claude-review.md`
|
|
30
|
+
2. Fix any suggestions that score above 45
|
|
37
31
|
|
|
38
32
|
## Step 3: Perform CodeRabbit Review
|
|
39
33
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
If $ARGUMENTS/coderabbit-review.md already exists, Mark "Step 3: Perform CodeRabbit Review" as completed. Proceed to Step 4
|
|
34
|
+
If `$ARGUMENTS/coderabbit-review.md` already exists, skip to Step 4.
|
|
43
35
|
|
|
44
|
-
Otherwise, use Task tool with prompt: "Run
|
|
45
|
-
|
|
46
|
-
Mark "Step 3: Perform CodeRabbit Review" as completed. Proceed to Step 4
|
|
36
|
+
Otherwise, use Task tool with prompt: "Run `coderabbit review --plain || true` and write results to $ARGUMENTS/coderabbit-review.md"
|
|
47
37
|
|
|
48
38
|
## Step 4: Implement CodeRabbit Review Fixes
|
|
49
39
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
Evaluate the suggestions in $ARGUMENTS/coderabbit-review.md and implement fixes/changes for any valid findings
|
|
53
|
-
|
|
54
|
-
Mark "Step 4: Implement CodeRabbit Review Fixes" as completed. Proceed to Step 5
|
|
40
|
+
Evaluate suggestions in `$ARGUMENTS/coderabbit-review.md` and implement fixes for valid findings.
|
|
55
41
|
|
|
56
42
|
## Step 5: Perform Claude Optimizations
|
|
57
43
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
Use the code simplifier agent to clean up the code that was added to the current branch.
|
|
61
|
-
|
|
62
|
-
Mark "Step 5: Perform Claude Optimizations" as completed.
|
|
63
|
-
|
|
44
|
+
Use the code simplifier agent to clean up code added to the current branch.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Initialize a comprehensive NestJS backend project with full requirements analysis, planning, and structure setup
|
|
3
3
|
argument-hint: <project-brief-file-or-jira-issue-number>
|
|
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. Decide if $ARGUMENTS is a Jira issue number or a path to a file
|
|
@@ -1,38 +1,75 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Comprehensive verification that a feature branch fully implements all project requirements with proper code quality, tests, and documentation
|
|
3
3
|
argument-hint: <project-directory>
|
|
4
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, Task, TaskCreate, TaskUpdate, TaskList
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
The current branch is a feature branch
|
|
7
|
+
The current branch is a feature branch with full implementation of the project in $ARGUMENTS.
|
|
7
8
|
|
|
8
|
-
##
|
|
9
|
+
## Setup
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
- Step 1: Review Requirements for $ARGUMENTS
|
|
12
|
-
- Step 2: Verify Implementation
|
|
13
|
-
- Step 3: Document Drift
|
|
11
|
+
Create workflow tracking tasks with `metadata: { "project": "<project-name>", "phase": "verify" }`:
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
1. Review Requirements
|
|
14
|
+
2. Verify Implementation
|
|
15
|
+
3. Run Task Verification Commands
|
|
16
|
+
4. Document Drift
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
## Step 1: Review Requirements
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
Read all requirements for $ARGUMENTS.
|
|
22
21
|
|
|
23
22
|
## Step 2: Verify Implementation
|
|
24
23
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
24
|
+
Verify the implementation completely and fully satisfies all requirements from Step 1.
|
|
25
|
+
|
|
26
|
+
## Step 3: Run Task Verification Commands
|
|
27
|
+
|
|
28
|
+
### 3a: Create Verification Tasks
|
|
29
|
+
|
|
30
|
+
First, read all task files in `$ARGUMENTS/tasks/` and create a new task for each one that has verification metadata:
|
|
31
|
+
|
|
32
|
+
For each task file:
|
|
33
|
+
1. **Read the task file** (JSON or markdown)
|
|
34
|
+
2. **Check for verification metadata**:
|
|
35
|
+
- JSON tasks: Look for `metadata.verification`
|
|
36
|
+
- Markdown tasks: Look for `## Verification` section with `### Proof Command`
|
|
37
|
+
3. **If verification exists**, create a new task:
|
|
38
|
+
```
|
|
39
|
+
subject: "Verify: <original-task-subject>"
|
|
40
|
+
description: "Run verification for task <id>: <verification.command>"
|
|
41
|
+
activeForm: "Verifying <original-task-subject>"
|
|
42
|
+
metadata: {
|
|
43
|
+
"project": "<project-name>",
|
|
44
|
+
"phase": "verify",
|
|
45
|
+
"originalTaskId": "<id>",
|
|
46
|
+
"verification": <copy the verification object>
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### 3b: Execute Verification Tasks
|
|
51
|
+
|
|
52
|
+
Work through each verification task:
|
|
53
|
+
|
|
54
|
+
1. **Run verification command** using Bash tool:
|
|
55
|
+
- JSON: Execute `metadata.verification.command`
|
|
56
|
+
- Markdown: Execute the command in `### Proof Command` code block
|
|
57
|
+
2. **Compare output to expected**:
|
|
58
|
+
- JSON: Compare to `metadata.verification.expected`
|
|
59
|
+
- Markdown: Compare to `### Expected Output` section
|
|
60
|
+
3. **Record results and mark task**:
|
|
61
|
+
- If verification passes → Mark task completed
|
|
62
|
+
- If verification fails → Keep task in_progress, document failure in drift.md
|
|
63
|
+
- If command cannot run → Keep task in_progress, document blocker in drift.md
|
|
64
|
+
|
|
65
|
+
### Verification Summary
|
|
66
|
+
|
|
67
|
+
After running all verification tasks, report:
|
|
68
|
+
- Total tasks with verification: X
|
|
69
|
+
- Passed: Y
|
|
70
|
+
- Failed: Z
|
|
71
|
+
- Blocked: W
|
|
72
|
+
|
|
73
|
+
## Step 4: Document Drift
|
|
74
|
+
|
|
75
|
+
If there is any divergence from the requirements or verification failures, document the drift to `$ARGUMENTS/drift.md`.
|
|
@@ -1,12 +1,30 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Checks for code review comments on a PR and implements them if required.
|
|
3
3
|
argument-hint: <github-pr-link>
|
|
4
|
-
allowed-tools: Read, Write, Bash(git*), Glob, Grep, Task,
|
|
4
|
+
allowed-tools: Read, Write, Edit, Bash(git*), Glob, Grep, Task, TaskCreate, TaskUpdate, TaskList, TaskGet, Bash(gh*)
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
Use the GitHub CLI to fetch all review comments on $ARGUMENTS:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
gh pr view $ARGUMENTS --json reviews,comments
|
|
11
|
+
gh api repos/{owner}/{repo}/pulls/{pr_number}/comments
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Extract each unresolved review comment as a separate item. Note the comment ID, file path, line number, and comment body.
|
|
15
|
+
|
|
16
|
+
Create a task for each unresolved comment with `metadata: { "pr": "$ARGUMENTS" }`:
|
|
17
|
+
- **subject**: Brief description of the requested change
|
|
18
|
+
- **description**: Full comment body, file path, line number, comment ID, and these instructions:
|
|
19
|
+
1. Evaluate if the requested change is valid
|
|
20
|
+
2. If not valid, reply explaining why and mark resolved, skip remaining steps
|
|
21
|
+
3. If valid, make appropriate code updates
|
|
22
|
+
4. Ensure changes follow project coding standards
|
|
23
|
+
5. Run relevant tests to verify changes work
|
|
24
|
+
6. Run `/git:commit` to commit changes
|
|
25
|
+
7. If hooks fail, fix errors and re-run `/git:commit`
|
|
26
|
+
- **activeForm**: "Implementing PR feedback for [file]"
|
|
27
|
+
|
|
28
|
+
Launch up to 6 subagents to work through the task list in parallel.
|
|
29
|
+
|
|
30
|
+
When all tasks are completed, run `/git:commit-and-submit-pr`.
|