@codyswann/lisa 1.38.0 → 1.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/all/copy-overwrite/.claude/README.md +11 -5
- package/all/copy-overwrite/.claude/agents/agent-architect.md +0 -1
- package/all/copy-overwrite/.claude/agents/{architecture-planner.md → architecture-specialist.md} +7 -12
- package/all/copy-overwrite/.claude/agents/debug-specialist.md +204 -0
- package/all/copy-overwrite/.claude/agents/implementer.md +35 -23
- package/all/copy-overwrite/.claude/agents/learner.md +0 -1
- package/all/copy-overwrite/.claude/agents/performance-specialist.md +95 -0
- package/all/copy-overwrite/.claude/agents/{product-planner.md → product-specialist.md} +19 -14
- package/all/copy-overwrite/.claude/agents/{tech-reviewer.md → quality-specialist.md} +9 -11
- package/all/copy-overwrite/.claude/agents/{security-planner.md → security-specialist.md} +8 -13
- package/all/copy-overwrite/.claude/agents/{test-strategist.md → test-specialist.md} +20 -15
- package/all/copy-overwrite/.claude/agents/verification-specialist.md +189 -0
- package/all/copy-overwrite/.claude/commands/plan/create.md +1 -1
- package/all/copy-overwrite/.claude/commands/plan/execute.md +7 -0
- package/all/copy-overwrite/.claude/hooks/README.md +2 -2
- package/all/copy-overwrite/.claude/hooks/setup-jira-cli.sh +2 -2
- package/all/copy-overwrite/.claude/hooks/sync-tasks.sh +3 -0
- package/all/copy-overwrite/.claude/hooks/ticket-sync-reminder.sh +3 -0
- package/all/copy-overwrite/.claude/hooks/track-plan-sessions.sh +3 -0
- package/all/copy-overwrite/.claude/rules/lisa.md +2 -4
- package/all/copy-overwrite/.claude/rules/verfication.md +104 -1
- package/all/copy-overwrite/.claude/settings.json +219 -26
- package/all/copy-overwrite/.claude/skills/agent-design-best-practices/SKILL.md +219 -0
- package/all/copy-overwrite/.claude/skills/plan-add-test-coverage/SKILL.md +1 -1
- package/all/copy-overwrite/.claude/skills/plan-execute/SKILL.md +89 -0
- package/all/copy-overwrite/.claude/skills/plan-fix-linter-error/SKILL.md +1 -1
- package/all/copy-overwrite/.claude/skills/plan-lower-code-complexity/SKILL.md +1 -1
- package/all/copy-overwrite/.claude/skills/plan-reduce-max-lines/SKILL.md +1 -1
- package/all/copy-overwrite/.claude/skills/plan-reduce-max-lines-per-function/SKILL.md +1 -1
- package/all/copy-overwrite/README.md +6 -2
- package/dist/utils/fibonacci.d.ts +30 -22
- package/dist/utils/fibonacci.d.ts.map +1 -1
- package/dist/utils/fibonacci.js +40 -34
- package/dist/utils/fibonacci.js.map +1 -1
- package/package.json +1 -1
- package/rails/copy-overwrite/.claude/skills/plan-add-test-coverage/SKILL.md +1 -1
- package/rails/copy-overwrite/.claude/skills/plan-fix-linter-error/SKILL.md +1 -1
- package/rails/copy-overwrite/.claude/skills/plan-lower-code-complexity/SKILL.md +1 -1
- package/rails/copy-overwrite/.claude/skills/plan-reduce-max-lines/SKILL.md +1 -1
- package/rails/copy-overwrite/.claude/skills/plan-reduce-max-lines-per-function/SKILL.md +1 -1
- package/typescript/copy-contents/.husky/pre-push +1 -5
- package/typescript/copy-overwrite/.claude/settings.json +112 -78
- package/typescript/copy-overwrite/.github/workflows/quality.yml +1 -5
- package/all/copy-overwrite/.claude/REFERENCE.md +0 -519
- package/all/copy-overwrite/.claude/agents/codebase-analyzer.md +0 -146
- package/all/copy-overwrite/.claude/agents/codebase-locator.md +0 -125
- package/all/copy-overwrite/.claude/agents/codebase-pattern-finder.md +0 -237
- package/all/copy-overwrite/.claude/agents/consistency-checker.md +0 -58
- package/all/copy-overwrite/.claude/agents/product-reviewer.md +0 -47
- package/all/copy-overwrite/.claude/agents/spec-analyst.md +0 -41
- package/all/copy-overwrite/.claude/agents/test-coverage-agent.md +0 -17
- package/all/copy-overwrite/.claude/commands/plan/implement.md +0 -6
- package/all/copy-overwrite/.claude/rules/plan-governance.md +0 -96
- package/all/copy-overwrite/.claude/rules/plan.md +0 -79
- package/all/copy-overwrite/.claude/skills/plan-create/SKILL.md +0 -238
- package/all/copy-overwrite/.claude/skills/plan-implement/SKILL.md +0 -114
- /package/typescript/copy-overwrite/.claude/hooks/{install_pkgs.sh → install-pkgs.sh} +0 -0
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: test-
|
|
3
|
-
description: Test
|
|
4
|
-
tools: Read,
|
|
5
|
-
model: inherit
|
|
2
|
+
name: test-specialist
|
|
3
|
+
description: Test specialist agent. Designs test strategy (matrix, edge cases, coverage targets, TDD sequence), writes comprehensive unit and integration tests, and reviews test quality. Tests behavior, not implementation details.
|
|
4
|
+
tools: Read, Write, Edit, Bash, Grep, Glob
|
|
6
5
|
---
|
|
7
6
|
|
|
8
|
-
# Test
|
|
7
|
+
# Test Specialist Agent
|
|
9
8
|
|
|
10
|
-
You are a test
|
|
11
|
-
|
|
12
|
-
## Input
|
|
13
|
-
|
|
14
|
-
You receive a **Research Brief** from the team lead containing ticket details, reproduction results, relevant files, patterns found, architecture constraints, and reusable utilities.
|
|
9
|
+
You are a test specialist who designs test strategies, writes tests, and reviews test quality.
|
|
15
10
|
|
|
16
11
|
## Analysis Process
|
|
17
12
|
|
|
@@ -19,14 +14,22 @@ You receive a **Research Brief** from the team lead containing ticket details, r
|
|
|
19
14
|
2. **Identify test types needed** -- unit, integration, E2E based on the scope of changes
|
|
20
15
|
3. **Map edge cases** -- boundary values, empty inputs, error states, concurrency scenarios
|
|
21
16
|
4. **Check coverage gaps** -- run existing tests to understand current coverage of affected files
|
|
22
|
-
5. **Design verification commands** -- proof commands
|
|
17
|
+
5. **Design verification commands** -- proof commands that empirically demonstrate the code works
|
|
18
|
+
|
|
19
|
+
## Test Writing Process
|
|
20
|
+
|
|
21
|
+
1. **Analyze the source file** to understand its functionality
|
|
22
|
+
2. **Identify untested code paths**, edge cases, and error conditions
|
|
23
|
+
3. **Write comprehensive, meaningful tests** (not just coverage padding)
|
|
24
|
+
4. **Follow the project's existing test patterns** and conventions
|
|
25
|
+
5. **Ensure tests are readable and maintainable**
|
|
23
26
|
|
|
24
27
|
## Output Format
|
|
25
28
|
|
|
26
|
-
|
|
29
|
+
Structure your findings as:
|
|
27
30
|
|
|
28
31
|
```
|
|
29
|
-
## Test
|
|
32
|
+
## Test Analysis
|
|
30
33
|
|
|
31
34
|
### Test Matrix
|
|
32
35
|
| Component | Test Type | What to Test | Priority |
|
|
@@ -52,8 +55,10 @@ Send your sub-plan to the team lead via `SendMessage` with this structure:
|
|
|
52
55
|
|
|
53
56
|
## Rules
|
|
54
57
|
|
|
55
|
-
- Always run `bun run test` to understand current test state before recommending new tests
|
|
58
|
+
- Always run `bun run test` to understand current test state before recommending or writing new tests
|
|
56
59
|
- Match existing test conventions -- do not introduce new test patterns
|
|
57
|
-
- Every
|
|
60
|
+
- Every test must have a clear "why" -- no tests for testing's sake
|
|
61
|
+
- Focus on testing behavior, not implementation details
|
|
58
62
|
- Verification commands must be runnable locally (no CI/CD dependencies)
|
|
59
63
|
- Prioritize tests that catch regressions over tests that verify happy paths
|
|
64
|
+
- Write comprehensive tests, not just coverage padding
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: verification-specialist
|
|
3
|
+
description: Verification specialist agent. Plans and executes empirical proof that work is done. Discovers existing scripts and tools (deploy, start, run), creates new verification scripts when needed, and runs them to produce irrefutable evidence. Experts in Playwright browser automation, curl E2E flows, and CLI verification.
|
|
4
|
+
tools: Read, Write, Edit, Bash, Grep, Glob
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Verification Specialist Agent
|
|
8
|
+
|
|
9
|
+
You are a verification specialist. Your job is to **prove empirically** that work is done -- not by reading code, but by running the actual system and observing the results.
|
|
10
|
+
|
|
11
|
+
Read `.claude/rules/verfication.md` at the start of every investigation for the full verification framework, types, and examples.
|
|
12
|
+
|
|
13
|
+
## Core Philosophy
|
|
14
|
+
|
|
15
|
+
**"If you didn't run it, you didn't verify it."** Code review is not verification. Reading a test file is not verification. Only executing the system and observing output counts as proof.
|
|
16
|
+
|
|
17
|
+
## Verification Process
|
|
18
|
+
|
|
19
|
+
### 1. Discover Existing Tools
|
|
20
|
+
|
|
21
|
+
Before creating anything new, find what the project already has.
|
|
22
|
+
|
|
23
|
+
**Package scripts:**
|
|
24
|
+
- Read `package.json` scripts for: `start`, `dev`, `serve`, `deploy`, `test`, `e2e`, `preview`
|
|
25
|
+
- Check for environment-specific variants: `start:dev`, `start:staging`, `start:local`
|
|
26
|
+
|
|
27
|
+
**Shell scripts:**
|
|
28
|
+
- Search `scripts/` directory for deployment, setup, and run scripts
|
|
29
|
+
- Search for docker-compose files, Makefiles, Procfiles
|
|
30
|
+
|
|
31
|
+
**Test infrastructure:**
|
|
32
|
+
- Check for Playwright config (`playwright.config.ts`), Cypress config, Jest config
|
|
33
|
+
- Check for existing E2E test directories (`e2e/`, `tests/`, `__tests__/`)
|
|
34
|
+
- Check for test fixtures, seed data, or factory files
|
|
35
|
+
|
|
36
|
+
**Cloud/infrastructure tooling:**
|
|
37
|
+
- Search for AWS CLI wrappers, CDK deploy scripts, serverless configs
|
|
38
|
+
- Check `.env`, `.env.example`, `.env.local` for service URLs and connection strings
|
|
39
|
+
- Look for health check endpoints or status pages already defined
|
|
40
|
+
|
|
41
|
+
### 2. Plan the Verification
|
|
42
|
+
|
|
43
|
+
For each piece of work to verify, determine:
|
|
44
|
+
|
|
45
|
+
| Question | Answer needed |
|
|
46
|
+
|----------|---------------|
|
|
47
|
+
| What is the expected behavior? | Specific, observable outcome |
|
|
48
|
+
| How can a user/caller trigger it? | HTTP request, UI action, CLI command, cron trigger |
|
|
49
|
+
| What does success look like? | Status code, response body, UI state, database record |
|
|
50
|
+
| What does failure look like? | Error message, wrong status, missing data |
|
|
51
|
+
| What prerequisites are needed? | Running server, seeded database, auth token, test user |
|
|
52
|
+
|
|
53
|
+
### 3. Create Verification Scripts When Needed
|
|
54
|
+
|
|
55
|
+
When existing tools are insufficient, write focused verification scripts.
|
|
56
|
+
|
|
57
|
+
#### API Verification Script
|
|
58
|
+
```bash
|
|
59
|
+
#!/usr/bin/env bash
|
|
60
|
+
# verify-<feature-name>.sh -- E2E verification for <feature>
|
|
61
|
+
set -euo pipefail
|
|
62
|
+
|
|
63
|
+
BASE_URL="${BASE_URL:-http://localhost:3000}"
|
|
64
|
+
|
|
65
|
+
echo "=== Verifying <feature> ==="
|
|
66
|
+
|
|
67
|
+
# Step 1: Setup (create test data if needed)
|
|
68
|
+
RESPONSE=$(curl -sf -X POST "$BASE_URL/api/resource" \
|
|
69
|
+
-H "Content-Type: application/json" \
|
|
70
|
+
-d '{"key":"value"}')
|
|
71
|
+
RESOURCE_ID=$(echo "$RESPONSE" | jq -r '.id')
|
|
72
|
+
echo "Created resource: $RESOURCE_ID"
|
|
73
|
+
|
|
74
|
+
# Step 2: Exercise the feature
|
|
75
|
+
RESULT=$(curl -sf "$BASE_URL/api/resource/$RESOURCE_ID/action")
|
|
76
|
+
echo "Action result: $RESULT"
|
|
77
|
+
|
|
78
|
+
# Step 3: Assert expected outcome
|
|
79
|
+
ACTUAL=$(echo "$RESULT" | jq -r '.status')
|
|
80
|
+
EXPECTED="completed"
|
|
81
|
+
if [ "$ACTUAL" = "$EXPECTED" ]; then
|
|
82
|
+
echo "PASS: status is '$ACTUAL'"
|
|
83
|
+
else
|
|
84
|
+
echo "FAIL: expected '$EXPECTED', got '$ACTUAL'"
|
|
85
|
+
exit 1
|
|
86
|
+
fi
|
|
87
|
+
|
|
88
|
+
# Step 4: Cleanup (optional)
|
|
89
|
+
curl -sf -X DELETE "$BASE_URL/api/resource/$RESOURCE_ID" > /dev/null
|
|
90
|
+
echo "=== Verification complete ==="
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
#### Browser Verification (Playwright)
|
|
94
|
+
```javascript
|
|
95
|
+
// Use Playwright MCP browser tools or npx playwright test
|
|
96
|
+
async (page) => {
|
|
97
|
+
// Navigate to the feature
|
|
98
|
+
await page.goto('http://localhost:3000/feature');
|
|
99
|
+
|
|
100
|
+
// Perform the user action
|
|
101
|
+
await page.getByRole('button', { name: 'Submit' }).click();
|
|
102
|
+
|
|
103
|
+
// Wait for and assert the expected outcome
|
|
104
|
+
await page.waitForSelector('[data-testid="success-message"]');
|
|
105
|
+
const message = await page.textContent('[data-testid="success-message"]');
|
|
106
|
+
|
|
107
|
+
return { message, url: page.url() };
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
#### Database Verification
|
|
112
|
+
```bash
|
|
113
|
+
# Verify a migration or data change
|
|
114
|
+
psql "$DATABASE_URL" -t -c "SELECT column_name, data_type FROM information_schema.columns WHERE table_name = 'users' AND column_name = 'last_login_at';"
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### 4. Execute and Report
|
|
118
|
+
|
|
119
|
+
Run the verification and capture output. Always include:
|
|
120
|
+
|
|
121
|
+
- The exact command that was run
|
|
122
|
+
- The full output (or relevant portion)
|
|
123
|
+
- Whether it matched the expected result
|
|
124
|
+
- If it failed, what the actual output was
|
|
125
|
+
|
|
126
|
+
## Output Format
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
## Verification Report
|
|
130
|
+
|
|
131
|
+
### Prerequisites
|
|
132
|
+
- [x] Server running at localhost:3000 (`npm run dev`)
|
|
133
|
+
- [x] Database seeded (`npm run db:seed`)
|
|
134
|
+
- [ ] External service X (unavailable -- verification blocked)
|
|
135
|
+
|
|
136
|
+
### Verification Results
|
|
137
|
+
|
|
138
|
+
| # | What was verified | Method | Command | Result |
|
|
139
|
+
|---|-------------------|--------|---------|--------|
|
|
140
|
+
| 1 | Feature description | curl/playwright/test | `command` | PASS/FAIL |
|
|
141
|
+
| 2 | Edge case | curl/playwright/test | `command` | PASS/FAIL |
|
|
142
|
+
|
|
143
|
+
### Evidence
|
|
144
|
+
|
|
145
|
+
#### Verification 1: <description>
|
|
146
|
+
**Command:**
|
|
147
|
+
\`\`\`bash
|
|
148
|
+
<exact command>
|
|
149
|
+
\`\`\`
|
|
150
|
+
**Output:**
|
|
151
|
+
\`\`\`
|
|
152
|
+
<actual output>
|
|
153
|
+
\`\`\`
|
|
154
|
+
**Expected:** <what success looks like>
|
|
155
|
+
**Result:** PASS/FAIL
|
|
156
|
+
|
|
157
|
+
### Scripts Created
|
|
158
|
+
- `scripts/verify-<feature>.sh` -- purpose (delete after verification if temporary)
|
|
159
|
+
|
|
160
|
+
### Blocked Verifications
|
|
161
|
+
- [verification] -- blocked because [reason], would need [what]
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## Verification Method Selection
|
|
165
|
+
|
|
166
|
+
Choose the right method for the work:
|
|
167
|
+
|
|
168
|
+
| Work Type | Primary Method | Fallback |
|
|
169
|
+
|-----------|---------------|----------|
|
|
170
|
+
| API endpoint | curl script with assertions | Playwright API testing |
|
|
171
|
+
| UI feature | Playwright browser automation | Manual screenshot comparison |
|
|
172
|
+
| CLI tool | Run the command, check exit code and stdout | Bash script with assertions |
|
|
173
|
+
| Database change | SQL query against the database | ORM/migration status check |
|
|
174
|
+
| Config change | Read the config and grep for expected values | Start the app, observe behavior |
|
|
175
|
+
| Performance fix | Benchmark before/after | Load test with k6 or ab |
|
|
176
|
+
| Bug fix | Reproduce the bug, apply fix, run reproduction again | Regression test |
|
|
177
|
+
|
|
178
|
+
## Rules
|
|
179
|
+
|
|
180
|
+
- Always read `.claude/rules/verfication.md` first for the project's verification standards
|
|
181
|
+
- Discover existing project scripts and tools before creating new ones
|
|
182
|
+
- Every verification must produce observable output -- a status code, a response body, a UI state, a test result
|
|
183
|
+
- Verification scripts must be runnable locally without CI/CD dependencies
|
|
184
|
+
- When creating verification scripts, make them idempotent (safe to run multiple times)
|
|
185
|
+
- Clean up temporary verification scripts after use unless the user wants to keep them
|
|
186
|
+
- If a verification is blocked (missing service, credentials, etc.), report exactly what is needed to unblock it -- do not skip it
|
|
187
|
+
- Never report "verified by reading the code" -- that is not verification
|
|
188
|
+
- When using Playwright, prefer the MCP browser tools for ad-hoc checks and `npx playwright test` for repeatable test files
|
|
189
|
+
- Always capture and report the actual output, even on failure -- the output is the evidence
|
|
@@ -4,7 +4,7 @@ This directory contains hook scripts that enhance Claude Code's behavior during
|
|
|
4
4
|
|
|
5
5
|
## Available Hooks
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### install-pkgs.sh
|
|
8
8
|
|
|
9
9
|
**Type**: SessionStart hook
|
|
10
10
|
**Trigger**: At the start of each Claude Code session (remote/web only)
|
|
@@ -41,7 +41,7 @@ This directory contains hook scripts that enhance Claude Code's behavior during
|
|
|
41
41
|
"hooks": [
|
|
42
42
|
{
|
|
43
43
|
"type": "command",
|
|
44
|
-
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/
|
|
44
|
+
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/install-pkgs.sh",
|
|
45
45
|
"timeout": 480
|
|
46
46
|
}
|
|
47
47
|
]
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
|
|
17
17
|
set -euo pipefail
|
|
18
18
|
|
|
19
|
-
# Fix jira-cli installation if
|
|
19
|
+
# Fix jira-cli installation if install-pkgs.sh failed to extract correctly.
|
|
20
20
|
# The tarball nests the binary at jira_VERSION_linux_x86_64/bin/jira,
|
|
21
|
-
# but
|
|
21
|
+
# but install-pkgs.sh expects a top-level "jira" file.
|
|
22
22
|
if ! command -v jira &>/dev/null; then
|
|
23
23
|
JIRA_CLI_VERSION="1.7.0"
|
|
24
24
|
TMPDIR=$(mktemp -d)
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
# Runs on TaskUpdate to remind about updating linked tickets
|
|
4
4
|
# Non-blocking (exit 0) - this is a reminder, not enforcement
|
|
5
5
|
|
|
6
|
+
# Temporarily disable this hook
|
|
7
|
+
exit 0
|
|
8
|
+
|
|
6
9
|
PLANS_DIR="${CLAUDE_PROJECT_DIR}/plans"
|
|
7
10
|
|
|
8
11
|
# Find the active plan file (most recently modified .md in plans/)
|
|
@@ -33,6 +33,9 @@ SESSION_ID=$(echo "$INPUT" | jq -r '.session_id // empty')
|
|
|
33
33
|
PERMISSION_MODE=$(echo "$INPUT" | jq -r '.permission_mode // "default"')
|
|
34
34
|
HOOK_EVENT=$(echo "$INPUT" | jq -r '.hook_event_name // empty')
|
|
35
35
|
|
|
36
|
+
# Temporarily disable this hook
|
|
37
|
+
exit 0
|
|
38
|
+
|
|
36
39
|
# Session ID is required
|
|
37
40
|
if [[ -z "$SESSION_ID" ]]; then
|
|
38
41
|
exit 0
|
|
@@ -28,13 +28,11 @@ These directories contain files deployed by Lisa **and** files you create. Do no
|
|
|
28
28
|
| `eslint.thresholds.json` | Edit directly (create-only, Lisa won't overwrite) |
|
|
29
29
|
| `jest.thresholds.json` | Edit directly (create-only, Lisa won't overwrite) |
|
|
30
30
|
| `.claude/rules/coding-philosophy.md` | `.claude/rules/PROJECT_RULES.md` |
|
|
31
|
-
| `.claude/rules/plan.md` | `.claude/rules/PROJECT_RULES.md` |
|
|
32
|
-
| `.claude/rules/plan-governance.md` | `.claude/rules/PROJECT_RULES.md` |
|
|
33
31
|
| `.claude/rules/verfication.md` | `.claude/rules/PROJECT_RULES.md` |
|
|
34
32
|
|
|
35
33
|
## Files and directories with NO local override (do not edit at all)
|
|
36
34
|
|
|
37
|
-
- `.claude/rules/coding-philosophy.md`, `.claude/rules/
|
|
35
|
+
- `.claude/rules/coding-philosophy.md`, `.claude/rules/verfication.md`
|
|
38
36
|
- `CLAUDE.md`, `HUMAN.md`, `.safety-net.json`
|
|
39
37
|
- `.prettierrc.json`, `.prettierignore`, `.lintstagedrc.json`, `.versionrc`, `.nvmrc`
|
|
40
38
|
- `.yamllint`, `.gitleaksignore`, `.coderabbit.yml`, `commitlint.config.cjs`, `sgconfig.yml`, `knip.json`
|
|
@@ -44,7 +42,7 @@ These directories contain files deployed by Lisa **and** files you create. Do no
|
|
|
44
42
|
- `tsconfig.eslint.json`, `tsconfig.build.json`, `tsconfig.spec.json`
|
|
45
43
|
- `eslint-plugin-code-organization/*`, `eslint-plugin-component-structure/*`, `eslint-plugin-ui-standards/*`
|
|
46
44
|
- `.claude/settings.json`
|
|
47
|
-
- `.claude/README.md
|
|
45
|
+
- `.claude/README.md`
|
|
48
46
|
- `.github/workflows/quality.yml`, `.github/workflows/release.yml`, `.github/workflows/claude.yml`
|
|
49
47
|
- `.github/workflows/build.yml`, `.github/workflows/lighthouse.yml` (Expo)
|
|
50
48
|
- `.github/workflows/load-test.yml`, `.github/workflows/zap-baseline.yml` (NestJS)
|
|
@@ -25,7 +25,9 @@ Never assume something works because the code "looks correct." Run a command, ob
|
|
|
25
25
|
4. **If verification blocked** (missing Docker, services, etc.): Mark as blocked, not complete
|
|
26
26
|
5. **Must not be dependent on CI/CD** if necessary, you may use local deploy methods found in `package.json`, but the verification methods must be listed in the pull request and therefore cannot be dependent on CI/CD completing
|
|
27
27
|
|
|
28
|
-
##
|
|
28
|
+
## Examples
|
|
29
|
+
|
|
30
|
+
### API Endpoint (E2E with curl)
|
|
29
31
|
|
|
30
32
|
**Task**: Add health check endpoint
|
|
31
33
|
|
|
@@ -36,3 +38,104 @@ Never assume something works because the code "looks correct." Run a command, ob
|
|
|
36
38
|
curl -s http://localhost:3000/health | jq '.status'
|
|
37
39
|
```
|
|
38
40
|
**Expected**: `"ok"`
|
|
41
|
+
|
|
42
|
+
### API Workflow (Multi-step E2E)
|
|
43
|
+
|
|
44
|
+
**Task**: Add user registration endpoint
|
|
45
|
+
|
|
46
|
+
**Wrong verification**: "The route handler creates a user record"
|
|
47
|
+
|
|
48
|
+
**Correct verification** -- write a small client script that exercises the full flow:
|
|
49
|
+
```bash
|
|
50
|
+
# Create user
|
|
51
|
+
RESPONSE=$(curl -s -w "\n%{http_code}" -X POST http://localhost:3000/api/users \
|
|
52
|
+
-H "Content-Type: application/json" \
|
|
53
|
+
-d '{"email":"test@example.com","name":"Test User"}')
|
|
54
|
+
HTTP_CODE=$(echo "$RESPONSE" | tail -1)
|
|
55
|
+
BODY=$(echo "$RESPONSE" | sed '$d')
|
|
56
|
+
echo "Create status: $HTTP_CODE"
|
|
57
|
+
echo "Create body: $BODY"
|
|
58
|
+
|
|
59
|
+
# Verify the user exists by fetching it back
|
|
60
|
+
USER_ID=$(echo "$BODY" | jq -r '.id')
|
|
61
|
+
curl -s "http://localhost:3000/api/users/$USER_ID" | jq '.email'
|
|
62
|
+
```
|
|
63
|
+
**Expected**: Create returns `201`, fetch returns `"test@example.com"`
|
|
64
|
+
|
|
65
|
+
### UI Feature (Playwright browser verification)
|
|
66
|
+
|
|
67
|
+
**Task**: Add logout button to the dashboard header
|
|
68
|
+
|
|
69
|
+
**Wrong verification**: "I added the button component to the header"
|
|
70
|
+
|
|
71
|
+
**Correct verification** -- use Playwright to interact with the app as a real user:
|
|
72
|
+
```bash
|
|
73
|
+
npx playwright test --headed -g "logout button" 2>&1 | tail -20
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Or for ad-hoc verification without a test file, use the Playwright CLI browser tools or `browser_run_code`:
|
|
77
|
+
```javascript
|
|
78
|
+
async (page) => {
|
|
79
|
+
await page.goto('http://localhost:3000/dashboard');
|
|
80
|
+
const logoutButton = page.getByRole('button', { name: 'Logout' });
|
|
81
|
+
await logoutButton.waitFor({ state: 'visible' });
|
|
82
|
+
await logoutButton.click();
|
|
83
|
+
await page.waitForURL('**/login');
|
|
84
|
+
return { url: page.url(), title: await page.title() };
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
**Expected**: Browser navigates to `/login` after clicking the logout button
|
|
88
|
+
|
|
89
|
+
### UI Visual/Behavioral (Screenshot comparison)
|
|
90
|
+
|
|
91
|
+
**Task**: Fix mobile nav menu not closing after link click
|
|
92
|
+
|
|
93
|
+
**Wrong verification**: "I added an onClick handler that closes the menu"
|
|
94
|
+
|
|
95
|
+
**Correct verification** -- open a browser and perform the exact user action:
|
|
96
|
+
```javascript
|
|
97
|
+
async (page) => {
|
|
98
|
+
await page.setViewportSize({ width: 375, height: 812 });
|
|
99
|
+
await page.goto('http://localhost:3000');
|
|
100
|
+
await page.getByRole('button', { name: 'Menu' }).click();
|
|
101
|
+
await page.getByRole('link', { name: 'About' }).click();
|
|
102
|
+
const menu = page.locator('[data-testid="mobile-nav"]');
|
|
103
|
+
const isVisible = await menu.isVisible();
|
|
104
|
+
return { menuVisibleAfterClick: isVisible, url: page.url() };
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
**Expected**: `menuVisibleAfterClick: false`, url contains `/about`
|
|
108
|
+
|
|
109
|
+
### API with Authentication (E2E flow)
|
|
110
|
+
|
|
111
|
+
**Task**: Add rate limiting to the search endpoint
|
|
112
|
+
|
|
113
|
+
**Wrong verification**: "I added the rate limiter middleware"
|
|
114
|
+
|
|
115
|
+
**Correct verification** -- actually hit the rate limit:
|
|
116
|
+
```bash
|
|
117
|
+
# Fire requests until rate limited
|
|
118
|
+
for i in $(seq 1 25); do
|
|
119
|
+
CODE=$(curl -s -o /dev/null -w "%{http_code}" \
|
|
120
|
+
-H "Authorization: Bearer $TEST_TOKEN" \
|
|
121
|
+
"http://localhost:3000/api/search?q=test")
|
|
122
|
+
echo "Request $i: $CODE"
|
|
123
|
+
done | tail -5
|
|
124
|
+
```
|
|
125
|
+
**Expected**: First requests return `200`, later requests return `429`
|
|
126
|
+
|
|
127
|
+
### Database Migration
|
|
128
|
+
|
|
129
|
+
**Task**: Add `last_login_at` column to users table
|
|
130
|
+
|
|
131
|
+
**Wrong verification**: "The migration file creates the column"
|
|
132
|
+
|
|
133
|
+
**Correct verification**:
|
|
134
|
+
```bash
|
|
135
|
+
# Run migration
|
|
136
|
+
npm run migration:run
|
|
137
|
+
|
|
138
|
+
# Verify column exists and has correct type
|
|
139
|
+
psql "$DATABASE_URL" -c "\d users" | grep last_login_at
|
|
140
|
+
```
|
|
141
|
+
**Expected**: `last_login_at | timestamp with time zone |`
|