@codyswann/lisa 1.56.6 → 1.56.8
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/package.json +2 -2
- package/plugins/lisa/.claude-plugin/plugin.json +1 -10
- package/plugins/lisa/rules/verfication.md +1 -11
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/src/base/.claude-plugin/plugin.json +0 -1
- package/plugins/src/base/rules/verfication.md +1 -11
- package/plugins/lisa/hooks/verify-completion.sh +0 -77
- package/plugins/src/base/hooks/verify-completion.sh +0 -77
package/package.json
CHANGED
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"axios": ">=1.13.5"
|
|
73
73
|
},
|
|
74
74
|
"name": "@codyswann/lisa",
|
|
75
|
-
"version": "1.56.
|
|
75
|
+
"version": "1.56.8",
|
|
76
76
|
"description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
|
|
77
77
|
"main": "dist/index.js",
|
|
78
78
|
"exports": {
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
"typescript-eslint": "^8.0.0"
|
|
172
172
|
},
|
|
173
173
|
"devDependencies": {
|
|
174
|
-
"@codyswann/lisa": "^1.
|
|
174
|
+
"@codyswann/lisa": "^1.56.7"
|
|
175
175
|
},
|
|
176
176
|
"type": "module"
|
|
177
177
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa",
|
|
3
|
-
"version": "1.56.
|
|
3
|
+
"version": "1.56.8",
|
|
4
4
|
"description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -76,15 +76,6 @@
|
|
|
76
76
|
}
|
|
77
77
|
],
|
|
78
78
|
"Stop": [
|
|
79
|
-
{
|
|
80
|
-
"matcher": "",
|
|
81
|
-
"hooks": [
|
|
82
|
-
{
|
|
83
|
-
"type": "command",
|
|
84
|
-
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/verify-completion.sh"
|
|
85
|
-
}
|
|
86
|
-
]
|
|
87
|
-
},
|
|
88
79
|
{
|
|
89
80
|
"matcher": "",
|
|
90
81
|
"hooks": [
|
|
@@ -152,7 +152,7 @@ Agents must follow this sequence unless explicitly instructed otherwise:
|
|
|
152
152
|
|
|
153
153
|
## Self-Correction Loop
|
|
154
154
|
|
|
155
|
-
Verification is not a one-shot activity. Agents operate within a
|
|
155
|
+
Verification is not a one-shot activity. Agents operate within a three-layer self-correction architecture that catches errors at increasing scope. Each layer is enforced automatically — agents do not need to invoke them manually.
|
|
156
156
|
|
|
157
157
|
### Layer 1 — Inline Correction (PostToolUse)
|
|
158
158
|
|
|
@@ -184,16 +184,6 @@ This layer catches errors that span multiple files or involve staged-but-not-yet
|
|
|
184
184
|
|
|
185
185
|
This layer validates the complete changeset against the project's quality gates. It is the last automated checkpoint before code reaches the remote.
|
|
186
186
|
|
|
187
|
-
### Layer 4 — Completion Enforcement (Stop hook)
|
|
188
|
-
|
|
189
|
-
**Trigger:** Agent attempts to stop or finish a task.
|
|
190
|
-
|
|
191
|
-
**Check:** If `Write` or `Edit` tools were used during the session, the agent must have declared a verification level (`FULLY VERIFIED`, `PARTIALLY VERIFIED`, or `UNVERIFIED`) in its final message.
|
|
192
|
-
|
|
193
|
-
If no verification level is declared, the Stop hook blocks once with instructions. On retry, it allows the stop to prevent infinite loops.
|
|
194
|
-
|
|
195
|
-
**Agent responsibility:** Before finishing any task that involved code changes, run verification and declare the result with evidence.
|
|
196
|
-
|
|
197
187
|
### Regeneration Over Patching
|
|
198
188
|
|
|
199
189
|
When the root cause of errors is architectural (wrong abstraction, incorrect data flow, fundamentally broken approach), delete and regenerate rather than incrementally patching. Incremental patches on a broken foundation accumulate tech debt faster than the self-correction loop can catch it.
|
|
@@ -62,7 +62,6 @@
|
|
|
62
62
|
}
|
|
63
63
|
],
|
|
64
64
|
"Stop": [
|
|
65
|
-
{ "matcher": "", "hooks": [{ "type": "command", "command": "${CLAUDE_PLUGIN_ROOT}/hooks/verify-completion.sh" }] },
|
|
66
65
|
{ "matcher": "", "hooks": [{ "type": "command", "command": "${CLAUDE_PLUGIN_ROOT}/hooks/notify-ntfy.sh" }] },
|
|
67
66
|
{ "matcher": "", "hooks": [{ "type": "command", "command": "command -v entire >/dev/null 2>&1 && entire hooks claude-code stop || true" }] }
|
|
68
67
|
],
|
|
@@ -152,7 +152,7 @@ Agents must follow this sequence unless explicitly instructed otherwise:
|
|
|
152
152
|
|
|
153
153
|
## Self-Correction Loop
|
|
154
154
|
|
|
155
|
-
Verification is not a one-shot activity. Agents operate within a
|
|
155
|
+
Verification is not a one-shot activity. Agents operate within a three-layer self-correction architecture that catches errors at increasing scope. Each layer is enforced automatically — agents do not need to invoke them manually.
|
|
156
156
|
|
|
157
157
|
### Layer 1 — Inline Correction (PostToolUse)
|
|
158
158
|
|
|
@@ -184,16 +184,6 @@ This layer catches errors that span multiple files or involve staged-but-not-yet
|
|
|
184
184
|
|
|
185
185
|
This layer validates the complete changeset against the project's quality gates. It is the last automated checkpoint before code reaches the remote.
|
|
186
186
|
|
|
187
|
-
### Layer 4 — Completion Enforcement (Stop hook)
|
|
188
|
-
|
|
189
|
-
**Trigger:** Agent attempts to stop or finish a task.
|
|
190
|
-
|
|
191
|
-
**Check:** If `Write` or `Edit` tools were used during the session, the agent must have declared a verification level (`FULLY VERIFIED`, `PARTIALLY VERIFIED`, or `UNVERIFIED`) in its final message.
|
|
192
|
-
|
|
193
|
-
If no verification level is declared, the Stop hook blocks once with instructions. On retry, it allows the stop to prevent infinite loops.
|
|
194
|
-
|
|
195
|
-
**Agent responsibility:** Before finishing any task that involved code changes, run verification and declare the result with evidence.
|
|
196
|
-
|
|
197
187
|
### Regeneration Over Patching
|
|
198
188
|
|
|
199
189
|
When the root cause of errors is architectural (wrong abstraction, incorrect data flow, fundamentally broken approach), delete and regenerate rather than incrementally patching. Incremental patches on a broken foundation accumulate tech debt faster than the self-correction loop can catch it.
|
|
@@ -1,77 +0,0 @@
|
|
|
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
|
-
# Verification Level Enforcement Hook (Stop)
|
|
6
|
-
# =============================================================================
|
|
7
|
-
# Checks whether the agent declared a verification level when the session
|
|
8
|
-
# involved code changes. Does NOT re-run lint/typecheck/tests (husky does that).
|
|
9
|
-
#
|
|
10
|
-
# Logic:
|
|
11
|
-
# 1. If no Write/Edit tools were used → exit 0 (research/conversation only)
|
|
12
|
-
# 2. If code was written → check last assistant message for verification level
|
|
13
|
-
# 3. If verification level found → exit 0
|
|
14
|
-
# 4. If missing and stop_hook_active is false → block with instructions
|
|
15
|
-
# 5. If missing and stop_hook_active is true → exit 0 (avoid infinite loops)
|
|
16
|
-
#
|
|
17
|
-
# @see .claude/rules/verfication.md "Self-Correction Loop" section
|
|
18
|
-
# =============================================================================
|
|
19
|
-
|
|
20
|
-
# Read JSON input from stdin
|
|
21
|
-
INPUT=$(cat)
|
|
22
|
-
|
|
23
|
-
# Extract transcript path
|
|
24
|
-
TRANSCRIPT_PATH=$(echo "$INPUT" | grep -o '"transcript_path"[[:space:]]*:[[:space:]]*"[^"]*"' | sed 's/.*: *"//' | sed 's/"$//')
|
|
25
|
-
|
|
26
|
-
# Exit silently if no transcript available
|
|
27
|
-
if [ -z "$TRANSCRIPT_PATH" ] || [ ! -f "$TRANSCRIPT_PATH" ]; then
|
|
28
|
-
exit 0
|
|
29
|
-
fi
|
|
30
|
-
|
|
31
|
-
# Check if Write or Edit tools were used during the session
|
|
32
|
-
# Look for tool_use entries with Write or Edit tool names
|
|
33
|
-
if ! grep -q '"tool_name"[[:space:]]*:[[:space:]]*"\(Write\|Edit\|NotebookEdit\)"' "$TRANSCRIPT_PATH" 2>/dev/null; then
|
|
34
|
-
# No code changes — this was research/conversation, allow stop
|
|
35
|
-
exit 0
|
|
36
|
-
fi
|
|
37
|
-
|
|
38
|
-
# Code was written — check if a verification level was declared
|
|
39
|
-
# Extract the last assistant message
|
|
40
|
-
LAST_ASSISTANT=$(awk '/"type"[[:space:]]*:[[:space:]]*"assistant"/{line=$0} END{if(line) print line}' "$TRANSCRIPT_PATH" 2>/dev/null)
|
|
41
|
-
|
|
42
|
-
if [ -z "$LAST_ASSISTANT" ]; then
|
|
43
|
-
exit 0
|
|
44
|
-
fi
|
|
45
|
-
|
|
46
|
-
# Extract the text content from the assistant message
|
|
47
|
-
RESPONSE_TEXT=""
|
|
48
|
-
if command -v jq >/dev/null 2>&1; then
|
|
49
|
-
RESPONSE_TEXT=$(echo "$LAST_ASSISTANT" | jq -r '.message.content[] | select(.type == "text") | .text' 2>/dev/null)
|
|
50
|
-
else
|
|
51
|
-
RESPONSE_TEXT=$(echo "$LAST_ASSISTANT" | grep -o '"text"[[:space:]]*:[[:space:]]*"[^"]*"' | sed 's/.*: *"//' | sed 's/"$//')
|
|
52
|
-
fi
|
|
53
|
-
|
|
54
|
-
if [ -z "$RESPONSE_TEXT" ]; then
|
|
55
|
-
exit 0
|
|
56
|
-
fi
|
|
57
|
-
|
|
58
|
-
# Check for verification level keywords (case-insensitive)
|
|
59
|
-
if echo "$RESPONSE_TEXT" | grep -qi "FULLY VERIFIED\|PARTIALLY VERIFIED\|UNVERIFIED"; then
|
|
60
|
-
exit 0
|
|
61
|
-
fi
|
|
62
|
-
|
|
63
|
-
# Check if this is a retry (stop_hook_active flag)
|
|
64
|
-
# The stop_hook_active field is set to true when a Stop hook has already blocked once
|
|
65
|
-
STOP_HOOK_ACTIVE=$(echo "$INPUT" | grep -o '"stop_hook_active"[[:space:]]*:[[:space:]]*true' || echo "")
|
|
66
|
-
|
|
67
|
-
if [ -n "$STOP_HOOK_ACTIVE" ]; then
|
|
68
|
-
# Already blocked once — allow stop to prevent infinite loop
|
|
69
|
-
exit 0
|
|
70
|
-
fi
|
|
71
|
-
|
|
72
|
-
# No verification level declared after code changes — block
|
|
73
|
-
cat << 'EOF'
|
|
74
|
-
{"decision":"block","reason":"You changed code but didn't declare a verification level. Run your verification, then declare FULLY VERIFIED, PARTIALLY VERIFIED, or UNVERIFIED with evidence. See .claude/rules/verfication.md for requirements."}
|
|
75
|
-
EOF
|
|
76
|
-
|
|
77
|
-
exit 0
|
|
@@ -1,77 +0,0 @@
|
|
|
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
|
-
# Verification Level Enforcement Hook (Stop)
|
|
6
|
-
# =============================================================================
|
|
7
|
-
# Checks whether the agent declared a verification level when the session
|
|
8
|
-
# involved code changes. Does NOT re-run lint/typecheck/tests (husky does that).
|
|
9
|
-
#
|
|
10
|
-
# Logic:
|
|
11
|
-
# 1. If no Write/Edit tools were used → exit 0 (research/conversation only)
|
|
12
|
-
# 2. If code was written → check last assistant message for verification level
|
|
13
|
-
# 3. If verification level found → exit 0
|
|
14
|
-
# 4. If missing and stop_hook_active is false → block with instructions
|
|
15
|
-
# 5. If missing and stop_hook_active is true → exit 0 (avoid infinite loops)
|
|
16
|
-
#
|
|
17
|
-
# @see .claude/rules/verfication.md "Self-Correction Loop" section
|
|
18
|
-
# =============================================================================
|
|
19
|
-
|
|
20
|
-
# Read JSON input from stdin
|
|
21
|
-
INPUT=$(cat)
|
|
22
|
-
|
|
23
|
-
# Extract transcript path
|
|
24
|
-
TRANSCRIPT_PATH=$(echo "$INPUT" | grep -o '"transcript_path"[[:space:]]*:[[:space:]]*"[^"]*"' | sed 's/.*: *"//' | sed 's/"$//')
|
|
25
|
-
|
|
26
|
-
# Exit silently if no transcript available
|
|
27
|
-
if [ -z "$TRANSCRIPT_PATH" ] || [ ! -f "$TRANSCRIPT_PATH" ]; then
|
|
28
|
-
exit 0
|
|
29
|
-
fi
|
|
30
|
-
|
|
31
|
-
# Check if Write or Edit tools were used during the session
|
|
32
|
-
# Look for tool_use entries with Write or Edit tool names
|
|
33
|
-
if ! grep -q '"tool_name"[[:space:]]*:[[:space:]]*"\(Write\|Edit\|NotebookEdit\)"' "$TRANSCRIPT_PATH" 2>/dev/null; then
|
|
34
|
-
# No code changes — this was research/conversation, allow stop
|
|
35
|
-
exit 0
|
|
36
|
-
fi
|
|
37
|
-
|
|
38
|
-
# Code was written — check if a verification level was declared
|
|
39
|
-
# Extract the last assistant message
|
|
40
|
-
LAST_ASSISTANT=$(awk '/"type"[[:space:]]*:[[:space:]]*"assistant"/{line=$0} END{if(line) print line}' "$TRANSCRIPT_PATH" 2>/dev/null)
|
|
41
|
-
|
|
42
|
-
if [ -z "$LAST_ASSISTANT" ]; then
|
|
43
|
-
exit 0
|
|
44
|
-
fi
|
|
45
|
-
|
|
46
|
-
# Extract the text content from the assistant message
|
|
47
|
-
RESPONSE_TEXT=""
|
|
48
|
-
if command -v jq >/dev/null 2>&1; then
|
|
49
|
-
RESPONSE_TEXT=$(echo "$LAST_ASSISTANT" | jq -r '.message.content[] | select(.type == "text") | .text' 2>/dev/null)
|
|
50
|
-
else
|
|
51
|
-
RESPONSE_TEXT=$(echo "$LAST_ASSISTANT" | grep -o '"text"[[:space:]]*:[[:space:]]*"[^"]*"' | sed 's/.*: *"//' | sed 's/"$//')
|
|
52
|
-
fi
|
|
53
|
-
|
|
54
|
-
if [ -z "$RESPONSE_TEXT" ]; then
|
|
55
|
-
exit 0
|
|
56
|
-
fi
|
|
57
|
-
|
|
58
|
-
# Check for verification level keywords (case-insensitive)
|
|
59
|
-
if echo "$RESPONSE_TEXT" | grep -qi "FULLY VERIFIED\|PARTIALLY VERIFIED\|UNVERIFIED"; then
|
|
60
|
-
exit 0
|
|
61
|
-
fi
|
|
62
|
-
|
|
63
|
-
# Check if this is a retry (stop_hook_active flag)
|
|
64
|
-
# The stop_hook_active field is set to true when a Stop hook has already blocked once
|
|
65
|
-
STOP_HOOK_ACTIVE=$(echo "$INPUT" | grep -o '"stop_hook_active"[[:space:]]*:[[:space:]]*true' || echo "")
|
|
66
|
-
|
|
67
|
-
if [ -n "$STOP_HOOK_ACTIVE" ]; then
|
|
68
|
-
# Already blocked once — allow stop to prevent infinite loop
|
|
69
|
-
exit 0
|
|
70
|
-
fi
|
|
71
|
-
|
|
72
|
-
# No verification level declared after code changes — block
|
|
73
|
-
cat << 'EOF'
|
|
74
|
-
{"decision":"block","reason":"You changed code but didn't declare a verification level. Run your verification, then declare FULLY VERIFIED, PARTIALLY VERIFIED, or UNVERIFIED with evidence. See .claude/rules/verfication.md for requirements."}
|
|
75
|
-
EOF
|
|
76
|
-
|
|
77
|
-
exit 0
|