@codyswann/lisa 1.9.0 → 1.9.3
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/commands/project/plan.md +13 -8
- package/all/copy-overwrite/.claude/commands/project/setup.md +1 -1
- package/all/copy-overwrite/.claude/hooks/README.md +57 -0
- package/all/copy-overwrite/.claude/hooks/pre-push.sh +41 -0
- package/all/copy-overwrite/.claude/rules/verfication.md +37 -0
- package/package.json +2 -2
- package/typescript/copy-overwrite/.github/workflows/quality.yml +45 -1
- package/typescript/merge/package.json +1 -1
- package/typescript/copy-overwrite/.github/workflows/lint-slow.yml +0 -40
|
@@ -109,24 +109,29 @@ For each task, use **TaskCreate** with:
|
|
|
109
109
|
[Or "N/A - no user-facing changes"]
|
|
110
110
|
|
|
111
111
|
## Verification
|
|
112
|
+
|
|
113
|
+
Every task MUST have empirical verification - a command that proves the work is done.
|
|
114
|
+
|
|
115
|
+
**Why?** Code that "looks correct" often isn't. The only way to know something works is to run it and observe the result. Verification isn't "I wrote the code" - it's running a command and seeing expected output.
|
|
116
|
+
|
|
112
117
|
**Type:** `test` | `ui-recording` | `test-coverage` | `api-test` | `manual-check` | `documentation`
|
|
113
118
|
|
|
114
119
|
| Type | When to Use | Example |
|
|
115
120
|
|------|-------------|---------|
|
|
116
|
-
| `test` | Run specific tests | `
|
|
117
|
-
| `ui-recording` | UI/UX changes | `
|
|
118
|
-
| `test-coverage` | Coverage threshold | `
|
|
119
|
-
| `api-test` | API endpoints |
|
|
120
|
-
| `documentation` | Docs, README | `cat path/to/doc.md` |
|
|
121
|
-
| `manual-check` | Config, setup |
|
|
121
|
+
| `test` | Run specific tests | `npm test -- src/services/user.spec.ts` |
|
|
122
|
+
| `ui-recording` | UI/UX changes | `npm run playwright:test ...` |
|
|
123
|
+
| `test-coverage` | Coverage threshold | `npm run test:cov -- --collectCoverageFrom='...'` |
|
|
124
|
+
| `api-test` | API endpoints | `curl -s http://localhost:3000/api/endpoint` |
|
|
125
|
+
| `documentation` | Docs, README | `cat path/to/doc.md \| grep "expected content"` |
|
|
126
|
+
| `manual-check` | Config, setup | `cat config.json \| jq '.setting'` |
|
|
122
127
|
|
|
123
128
|
**Proof Command:**
|
|
124
129
|
```bash
|
|
125
|
-
[Single command
|
|
130
|
+
[Single command that outputs observable proof of completion]
|
|
126
131
|
```
|
|
127
132
|
|
|
128
133
|
**Expected Output:**
|
|
129
|
-
[
|
|
134
|
+
[Exact or pattern-matched output that proves success]
|
|
130
135
|
|
|
131
136
|
## Learnings
|
|
132
137
|
During implementation, collect any discoveries valuable for future developers:
|
|
@@ -34,7 +34,7 @@ Based on input type:
|
|
|
34
34
|
|
|
35
35
|
2. Create `brief.md` in the project directory:
|
|
36
36
|
- Jira: populate with issue number, title, and description
|
|
37
|
-
- File:
|
|
37
|
+
- File: copy contents of the file to `brief.md`
|
|
38
38
|
- Text prompt: create `brief.md` with the prompt text as content
|
|
39
39
|
|
|
40
40
|
3. Create empty `findings.md` in the project directory
|
|
@@ -356,6 +356,63 @@ The hook is configured in `.claude/settings.json`:
|
|
|
356
356
|
|
|
357
357
|
ntfy.sh topics are public by default. Use a unique, hard-to-guess topic name. For private notifications, you can [self-host ntfy](https://docs.ntfy.sh/install/) or use [ntfy.sh access control](https://docs.ntfy.sh/publish/#access-control).
|
|
358
358
|
|
|
359
|
+
---
|
|
360
|
+
|
|
361
|
+
### pre-push.sh
|
|
362
|
+
|
|
363
|
+
**Type**: Pre-push git hook (blocking)
|
|
364
|
+
**Trigger**: Before `git push` executes
|
|
365
|
+
**Purpose**: Runs slow ESLint rules to catch linting issues before pushing to remote
|
|
366
|
+
|
|
367
|
+
#### How it works
|
|
368
|
+
|
|
369
|
+
1. Checks if the project has a `lint:slow` script defined in `package.json`
|
|
370
|
+
2. Detects the project's package manager from lock files (bun, pnpm, yarn, npm)
|
|
371
|
+
3. Runs the slow lint rules using the detected package manager
|
|
372
|
+
4. If lint:slow passes, allows the push to proceed
|
|
373
|
+
5. If lint:slow fails, blocks the push with an error message
|
|
374
|
+
|
|
375
|
+
#### Features
|
|
376
|
+
|
|
377
|
+
- **Blocking enforcement**: Prevents pushes with linting issues
|
|
378
|
+
- **Package manager detection**: Uses the project's configured package manager
|
|
379
|
+
- **Graceful skip**: If lint:slow script doesn't exist, skips silently without blocking
|
|
380
|
+
- **Clear feedback**: Shows which rules failed for easy fixing
|
|
381
|
+
- **Works with all package managers**: npm, yarn, pnpm, bun
|
|
382
|
+
|
|
383
|
+
#### Configuration
|
|
384
|
+
|
|
385
|
+
The hook is automatically registered via git when Lisa is applied. To manually configure or troubleshoot:
|
|
386
|
+
|
|
387
|
+
```bash
|
|
388
|
+
# Verify the hook is installed
|
|
389
|
+
ls -la .git/hooks/pre-push
|
|
390
|
+
|
|
391
|
+
# Run the hook manually to test
|
|
392
|
+
./.claude/hooks/pre-push.sh
|
|
393
|
+
|
|
394
|
+
# Bypass the hook (not recommended, only for emergencies)
|
|
395
|
+
git push --no-verify
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
#### Typical Workflow
|
|
399
|
+
|
|
400
|
+
1. Make code changes
|
|
401
|
+
2. Run `git push`
|
|
402
|
+
3. Pre-push hook runs slow lint rules
|
|
403
|
+
4. If issues found: hook blocks push, shows errors, exit with code 1
|
|
404
|
+
5. Fix the issues
|
|
405
|
+
6. Run `git push` again
|
|
406
|
+
7. If all clear: push proceeds normally
|
|
407
|
+
|
|
408
|
+
#### Notes
|
|
409
|
+
|
|
410
|
+
- This hook enforces blocking behavior (exits with code 1 on failure) to prevent pushing code with issues
|
|
411
|
+
- The hook respects the project's package manager configuration
|
|
412
|
+
- Only runs if a `lint:slow` script is defined in package.json (gracefully skips otherwise)
|
|
413
|
+
|
|
414
|
+
---
|
|
415
|
+
|
|
359
416
|
## Adding New Hooks
|
|
360
417
|
|
|
361
418
|
To add a new hook:
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# This file is managed by Lisa.
|
|
3
|
+
# Do not edit directly — changes will be overwritten on the next `lisa` run.
|
|
4
|
+
|
|
5
|
+
# Hook script to run slow lint rules before pushing
|
|
6
|
+
# Blocks push if lint:slow fails, preventing pushes with linting issues
|
|
7
|
+
# Reference: https://docs.claude.com/en/docs/claude-code/hooks
|
|
8
|
+
|
|
9
|
+
# Check if package.json has lint:slow script
|
|
10
|
+
if ! grep -q '"lint:slow"' package.json 2>/dev/null; then
|
|
11
|
+
echo "ℹ Skipping lint:slow: lint:slow script not found in package.json"
|
|
12
|
+
exit 0
|
|
13
|
+
fi
|
|
14
|
+
|
|
15
|
+
# Detect package manager based on lock file presence
|
|
16
|
+
detect_package_manager() {
|
|
17
|
+
if [ -f "bun.lockb" ] || [ -f "bun.lock" ]; then
|
|
18
|
+
echo "bun"
|
|
19
|
+
elif [ -f "pnpm-lock.yaml" ]; then
|
|
20
|
+
echo "pnpm"
|
|
21
|
+
elif [ -f "yarn.lock" ]; then
|
|
22
|
+
echo "yarn"
|
|
23
|
+
elif [ -f "package-lock.json" ]; then
|
|
24
|
+
echo "npm"
|
|
25
|
+
else
|
|
26
|
+
echo "npm" # Default fallback
|
|
27
|
+
fi
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
PKG_MANAGER=$(detect_package_manager)
|
|
31
|
+
|
|
32
|
+
echo "🐢 Running slow lint rules before push..."
|
|
33
|
+
|
|
34
|
+
# Run lint:slow - exit code matters here, we want to block the push if it fails
|
|
35
|
+
if $PKG_MANAGER run lint:slow; then
|
|
36
|
+
echo "✓ Slow lint rules passed"
|
|
37
|
+
exit 0
|
|
38
|
+
else
|
|
39
|
+
echo "✗ Slow lint rules failed. Fix issues and try again." >&2
|
|
40
|
+
exit 1 # Block the push
|
|
41
|
+
fi
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Empirical Verification
|
|
2
|
+
|
|
3
|
+
Every task requires a **proof command** - a single command that empirically demonstrates the work is done.
|
|
4
|
+
|
|
5
|
+
## Core Principle
|
|
6
|
+
|
|
7
|
+
Never assume something works because the code "looks correct." Run a command, observe the output, compare to expected result.
|
|
8
|
+
|
|
9
|
+
## Verification Types
|
|
10
|
+
|
|
11
|
+
| Type | Use Case | Example |
|
|
12
|
+
|------|----------|---------|
|
|
13
|
+
| `test` | Unit/integration tests | `npm test -- path/to/file.spec.ts` |
|
|
14
|
+
| `api-test` | API endpoints | `curl -s localhost:3000/api/endpoint` |
|
|
15
|
+
| `test-coverage` | Coverage thresholds | `npm run test:cov -- --collectCoverageFrom=...` |
|
|
16
|
+
| `ui-recording` | UI changes | Playwright/Cypress test |
|
|
17
|
+
| `documentation` | Doc changes | `grep "expected" path/to/doc.md` |
|
|
18
|
+
| `manual-check` | Config/setup | `cat config.json \| jq '.setting'` |
|
|
19
|
+
|
|
20
|
+
## Task Completion Rules
|
|
21
|
+
|
|
22
|
+
1. **Run the proof command** before marking any task complete
|
|
23
|
+
2. **Compare output** to expected result
|
|
24
|
+
3. **If verification fails**: Fix and re-run, don't mark complete
|
|
25
|
+
4. **If verification blocked** (missing Docker, services, etc.): Mark as blocked, not complete
|
|
26
|
+
|
|
27
|
+
## Example
|
|
28
|
+
|
|
29
|
+
**Task**: Add health check endpoint
|
|
30
|
+
|
|
31
|
+
**Wrong verification**: "I added the route handler"
|
|
32
|
+
|
|
33
|
+
**Correct verification**:
|
|
34
|
+
```bash
|
|
35
|
+
curl -s http://localhost:3000/health | jq '.status'
|
|
36
|
+
```
|
|
37
|
+
**Expected**: `"ok"`
|
package/package.json
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"knip": "knip",
|
|
27
27
|
"knip:fix": "knip --fix",
|
|
28
28
|
"sg:scan": "ast-grep scan",
|
|
29
|
-
"lisa:update": "npx @codyswann/lisa ."
|
|
29
|
+
"lisa:update": "npx @codyswann/lisa@latest ."
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@ast-grep/cli": "^0.40.4",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"@ast-grep/cli"
|
|
81
81
|
],
|
|
82
82
|
"name": "@codyswann/lisa",
|
|
83
|
-
"version": "1.9.
|
|
83
|
+
"version": "1.9.3",
|
|
84
84
|
"description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
|
|
85
85
|
"main": "dist/index.js",
|
|
86
86
|
"bin": {
|
|
@@ -93,8 +93,13 @@ on:
|
|
|
93
93
|
required: false
|
|
94
94
|
default: false
|
|
95
95
|
type: boolean
|
|
96
|
+
skip_lint_slow:
|
|
97
|
+
description: 'Skip the slow lint rules job'
|
|
98
|
+
required: false
|
|
99
|
+
default: false
|
|
100
|
+
type: boolean
|
|
96
101
|
skip_jobs:
|
|
97
|
-
description: 'Jobs to skip (comma-separated: lint,typecheck,test,test:unit,test:integration,test:e2e,maestro_e2e,playwright_e2e,format,build,dead_code,sg_scan,npm_security_scan,github_issue)'
|
|
102
|
+
description: 'Jobs to skip (comma-separated: lint,lint_slow,typecheck,test,test:unit,test:integration,test:e2e,maestro_e2e,playwright_e2e,format,build,dead_code,sg_scan,npm_security_scan,github_issue)'
|
|
98
103
|
required: false
|
|
99
104
|
default: ''
|
|
100
105
|
type: string
|
|
@@ -290,6 +295,45 @@ jobs:
|
|
|
290
295
|
NODE_OPTIONS: --max-old-space-size=6144
|
|
291
296
|
working-directory: ${{ inputs.working_directory || '.' }}
|
|
292
297
|
|
|
298
|
+
lint_slow:
|
|
299
|
+
name: 🐢 Slow Lint Rules
|
|
300
|
+
runs-on: ubuntu-latest
|
|
301
|
+
timeout-minutes: 20
|
|
302
|
+
if: ${{ !inputs.skip_lint_slow && !contains(inputs.skip_jobs, 'lint_slow') }}
|
|
303
|
+
|
|
304
|
+
steps:
|
|
305
|
+
- name: 📥 Checkout repository
|
|
306
|
+
uses: actions/checkout@v4
|
|
307
|
+
|
|
308
|
+
- name: 🔧 Setup Node.js
|
|
309
|
+
uses: actions/setup-node@v4
|
|
310
|
+
with:
|
|
311
|
+
node-version: ${{ inputs.node_version }}
|
|
312
|
+
cache: ${{ inputs.package_manager != 'bun' && inputs.package_manager || '' }}
|
|
313
|
+
|
|
314
|
+
- name: 🍞 Setup Bun
|
|
315
|
+
if: inputs.package_manager == 'bun'
|
|
316
|
+
uses: oven-sh/setup-bun@v2
|
|
317
|
+
with:
|
|
318
|
+
bun-version: latest
|
|
319
|
+
|
|
320
|
+
- name: 📥 Install dependencies
|
|
321
|
+
run: |
|
|
322
|
+
if [ "${{ inputs.package_manager }}" = "npm" ]; then
|
|
323
|
+
npm ci
|
|
324
|
+
elif [ "${{ inputs.package_manager }}" = "yarn" ]; then
|
|
325
|
+
yarn install --frozen-lockfile
|
|
326
|
+
elif [ "${{ inputs.package_manager }}" = "bun" ]; then
|
|
327
|
+
bun install --frozen-lockfile
|
|
328
|
+
fi
|
|
329
|
+
working-directory: ${{ inputs.working_directory || '.' }}
|
|
330
|
+
|
|
331
|
+
- name: 🐢 Run slow lint rules
|
|
332
|
+
run: ${{ inputs.package_manager }} run lint:slow
|
|
333
|
+
env:
|
|
334
|
+
NODE_OPTIONS: --max-old-space-size=6144
|
|
335
|
+
working-directory: ${{ inputs.working_directory || '.' }}
|
|
336
|
+
|
|
293
337
|
typecheck:
|
|
294
338
|
name: 🔍 Type Check
|
|
295
339
|
runs-on: ubuntu-latest
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# This file is managed by Lisa.
|
|
2
|
-
# Do not edit directly — changes will be overwritten on the next `lisa` run.
|
|
3
|
-
|
|
4
|
-
name: 🐢 Slow Lint Rules
|
|
5
|
-
|
|
6
|
-
on:
|
|
7
|
-
schedule:
|
|
8
|
-
# Run nightly at 2 AM UTC
|
|
9
|
-
- cron: '0 2 * * *'
|
|
10
|
-
workflow_dispatch:
|
|
11
|
-
# Allow manual triggering
|
|
12
|
-
|
|
13
|
-
jobs:
|
|
14
|
-
lint-slow:
|
|
15
|
-
name: 🐢 Slow Lint Rules
|
|
16
|
-
runs-on: ubuntu-latest
|
|
17
|
-
steps:
|
|
18
|
-
- name: 📥 Checkout
|
|
19
|
-
uses: actions/checkout@v4
|
|
20
|
-
|
|
21
|
-
- name: 📦 Setup Bun
|
|
22
|
-
uses: oven-sh/setup-bun@v2
|
|
23
|
-
with:
|
|
24
|
-
bun-version: latest
|
|
25
|
-
|
|
26
|
-
- name: 📦 Install dependencies
|
|
27
|
-
run: bun install --frozen-lockfile
|
|
28
|
-
|
|
29
|
-
- name: 🐢 Run slow lint rules
|
|
30
|
-
run: bun run lint:slow
|
|
31
|
-
|
|
32
|
-
create_issue_on_failure:
|
|
33
|
-
name: 📌 Create Issue on Failure
|
|
34
|
-
needs: [lint-slow]
|
|
35
|
-
if: ${{ failure() }}
|
|
36
|
-
uses: ./.github/workflows/create-issue-on-failure.yml
|
|
37
|
-
with:
|
|
38
|
-
workflow_name: 'Slow Lint Rules'
|
|
39
|
-
failed_job: 'lint-slow'
|
|
40
|
-
secrets: inherit
|