@codyswann/lisa 1.81.1 → 1.81.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/package.json +2 -2
- package/plugins/lisa/.claude-plugin/plugin.json +1 -14
- package/plugins/lisa/rules/intent-routing.md +5 -5
- 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 -10
- package/plugins/src/base/rules/intent-routing.md +5 -5
- package/scripts/test-intent-routing.sh +4 -4
package/package.json
CHANGED
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"lodash": ">=4.18.1"
|
|
77
77
|
},
|
|
78
78
|
"name": "@codyswann/lisa",
|
|
79
|
-
"version": "1.81.
|
|
79
|
+
"version": "1.81.3",
|
|
80
80
|
"description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
|
|
81
81
|
"main": "dist/index.js",
|
|
82
82
|
"exports": {
|
|
@@ -182,7 +182,7 @@
|
|
|
182
182
|
"vitest": "^4.1.0"
|
|
183
183
|
},
|
|
184
184
|
"devDependencies": {
|
|
185
|
-
"@codyswann/lisa": "^1.
|
|
185
|
+
"@codyswann/lisa": "^1.81.0",
|
|
186
186
|
"vite": "^8.0.5"
|
|
187
187
|
},
|
|
188
188
|
"type": "module"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa",
|
|
3
|
-
"version": "1.81.
|
|
3
|
+
"version": "1.81.3",
|
|
4
4
|
"description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -13,24 +13,11 @@
|
|
|
13
13
|
{
|
|
14
14
|
"type": "command",
|
|
15
15
|
"command": "command -v entire >/dev/null 2>&1 && entire hooks claude-code user-prompt-submit || true"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"type": "prompt",
|
|
19
|
-
"prompt": "Classify this user request into exactly one flow. Output ONLY valid JSON.\n\nFlows:\n- Research: User needs requirements defined, wants a PRD, exploring a problem space, open-ended feature idea\n- Plan: User has requirements and wants them broken into tickets/work items\n- Implement/Build: User has a specific feature/story/task to code\n- Implement/Fix: User has a bug to fix, something is broken\n- Implement/Improve: User wants to refactor, optimize, or improve existing code\n- Implement/Investigate: User wants to understand why something works a certain way (spike)\n- Verify: User has code ready to ship (PR, deploy, merge)\n- None: Simple question, config change, one-off task, or not enough context to classify\n\nOutput format: {\"hookSpecificOutput\":{\"hookEventName\":\"UserPromptSubmit\",\"additionalContext\":\"Flow classification: [FLOW]. Reason: [one sentence].\"}}\n\nUser request: $ARGUMENTS"
|
|
20
16
|
}
|
|
21
17
|
]
|
|
22
18
|
}
|
|
23
19
|
],
|
|
24
20
|
"PostToolUse": [
|
|
25
|
-
{
|
|
26
|
-
"matcher": "TaskCreate|TaskUpdate",
|
|
27
|
-
"hooks": [
|
|
28
|
-
{
|
|
29
|
-
"type": "command",
|
|
30
|
-
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/sync-tasks.sh"
|
|
31
|
-
}
|
|
32
|
-
]
|
|
33
|
-
},
|
|
34
21
|
{
|
|
35
22
|
"matcher": "Task",
|
|
36
23
|
"hooks": [
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
# Intent Routing
|
|
2
2
|
|
|
3
|
-
MANDATORY:
|
|
3
|
+
MANDATORY: On the **first user message of a session**, classify the request using the Flow Classification Protocol below and state the chosen flow before doing any other work. Do not respond to the substance of the request, do not start work, do not ask questions until you have stated which flow applies. Once a flow is established, treat it as fixed for the remainder of the session — **do not re-classify on subsequent messages**, even if a follow-up looks vague or conversational ("wait, what did you just do?", "now run the tests", "thanks"). Subsequent messages operate within the established flow unless the user explicitly changes scope. Skipping classification leads to unstructured responses that bypass readiness gates.
|
|
4
4
|
|
|
5
5
|
Each flow has a readiness gate that MUST pass before work begins. If the gate fails, stop and ask for what is missing.
|
|
6
6
|
|
|
7
7
|
## Flow Classification Protocol
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
This protocol runs **once per session**, on the first user message. After that, every later message inherits the established flow — do not re-run classification.
|
|
10
10
|
|
|
11
11
|
1. If the user invoked a slash command (`/fix`, `/build`, `/plan`, etc.), the flow is already determined -- skip classification.
|
|
12
|
-
2.
|
|
13
|
-
3. If
|
|
12
|
+
2. Read the user's request and match it against the flow definitions below.
|
|
13
|
+
3. If you cannot confidently classify the request:
|
|
14
14
|
- **Interactive session** (user is present): present a multiple choice using AskUserQuestion with options: Research, Plan, Implement, Verify, No flow.
|
|
15
15
|
- **Headless/non-interactive session** (running with `-p` flag, in a CI pipeline, or as a scheduled agent): do NOT ask the user. Classify to the best of your ability from available context (ticket content, prompt text, current branch state). If you truly cannot classify, default to "No flow" and proceed with the request as-is.
|
|
16
|
-
4. Once a flow is selected, check its readiness gate before proceeding.
|
|
16
|
+
4. Once a flow is selected, state it explicitly (e.g., *"Flow: Implement/Fix"*) and check its readiness gate before proceeding.
|
|
17
17
|
5. If you are a subagent: your parent agent has already determined the flow -- do NOT ask the user to choose a flow. Execute your assigned work within the established flow context.
|
|
18
18
|
|
|
19
19
|
## Readiness Gate Protocol
|
|
@@ -11,21 +11,11 @@
|
|
|
11
11
|
{
|
|
12
12
|
"type": "command",
|
|
13
13
|
"command": "command -v entire >/dev/null 2>&1 && entire hooks claude-code user-prompt-submit || true"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"type": "prompt",
|
|
17
|
-
"prompt": "Classify this user request into exactly one flow. Output ONLY valid JSON.\n\nFlows:\n- Research: User needs requirements defined, wants a PRD, exploring a problem space, open-ended feature idea\n- Plan: User has requirements and wants them broken into tickets/work items\n- Implement/Build: User has a specific feature/story/task to code\n- Implement/Fix: User has a bug to fix, something is broken\n- Implement/Improve: User wants to refactor, optimize, or improve existing code\n- Implement/Investigate: User wants to understand why something works a certain way (spike)\n- Verify: User has code ready to ship (PR, deploy, merge)\n- None: Simple question, config change, one-off task, or not enough context to classify\n\nOutput format: {\"hookSpecificOutput\":{\"hookEventName\":\"UserPromptSubmit\",\"additionalContext\":\"Flow classification: [FLOW]. Reason: [one sentence].\"}}\n\nUser request: $ARGUMENTS"
|
|
18
14
|
}
|
|
19
15
|
]
|
|
20
16
|
}
|
|
21
17
|
],
|
|
22
18
|
"PostToolUse": [
|
|
23
|
-
{
|
|
24
|
-
"matcher": "TaskCreate|TaskUpdate",
|
|
25
|
-
"hooks": [
|
|
26
|
-
{ "type": "command", "command": "${CLAUDE_PLUGIN_ROOT}/hooks/sync-tasks.sh" }
|
|
27
|
-
]
|
|
28
|
-
},
|
|
29
19
|
{
|
|
30
20
|
"matcher": "Task",
|
|
31
21
|
"hooks": [
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
# Intent Routing
|
|
2
2
|
|
|
3
|
-
MANDATORY:
|
|
3
|
+
MANDATORY: On the **first user message of a session**, classify the request using the Flow Classification Protocol below and state the chosen flow before doing any other work. Do not respond to the substance of the request, do not start work, do not ask questions until you have stated which flow applies. Once a flow is established, treat it as fixed for the remainder of the session — **do not re-classify on subsequent messages**, even if a follow-up looks vague or conversational ("wait, what did you just do?", "now run the tests", "thanks"). Subsequent messages operate within the established flow unless the user explicitly changes scope. Skipping classification leads to unstructured responses that bypass readiness gates.
|
|
4
4
|
|
|
5
5
|
Each flow has a readiness gate that MUST pass before work begins. If the gate fails, stop and ask for what is missing.
|
|
6
6
|
|
|
7
7
|
## Flow Classification Protocol
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
This protocol runs **once per session**, on the first user message. After that, every later message inherits the established flow — do not re-run classification.
|
|
10
10
|
|
|
11
11
|
1. If the user invoked a slash command (`/fix`, `/build`, `/plan`, etc.), the flow is already determined -- skip classification.
|
|
12
|
-
2.
|
|
13
|
-
3. If
|
|
12
|
+
2. Read the user's request and match it against the flow definitions below.
|
|
13
|
+
3. If you cannot confidently classify the request:
|
|
14
14
|
- **Interactive session** (user is present): present a multiple choice using AskUserQuestion with options: Research, Plan, Implement, Verify, No flow.
|
|
15
15
|
- **Headless/non-interactive session** (running with `-p` flag, in a CI pipeline, or as a scheduled agent): do NOT ask the user. Classify to the best of your ability from available context (ticket content, prompt text, current branch state). If you truly cannot classify, default to "No flow" and proceed with the request as-is.
|
|
16
|
-
4. Once a flow is selected, check its readiness gate before proceeding.
|
|
16
|
+
4. Once a flow is selected, state it explicitly (e.g., *"Flow: Implement/Fix"*) and check its readiness gate before proceeding.
|
|
17
17
|
5. If you are a subagent: your parent agent has already determined the flow -- do NOT ask the user to choose a flow. Execute your assigned work within the established flow context.
|
|
18
18
|
|
|
19
19
|
## Readiness Gate Protocol
|
|
@@ -146,11 +146,11 @@ else
|
|
|
146
146
|
fail "plugin.json is not valid JSON"
|
|
147
147
|
fi
|
|
148
148
|
|
|
149
|
-
# Check
|
|
150
|
-
if jq -e '.hooks.UserPromptSubmit[].hooks[] | select(.type == "prompt")' "$PLUGIN_JSON" >/dev/null 2>&1; then
|
|
151
|
-
pass "
|
|
149
|
+
# Check user-prompt-submit command hook is registered in UserPromptSubmit
|
|
150
|
+
if jq -e '.hooks.UserPromptSubmit[].hooks[] | select(.type == "command" and (.command | test("user-prompt-submit")))' "$PLUGIN_JSON" >/dev/null 2>&1; then
|
|
151
|
+
pass "user-prompt-submit command hook registered in UserPromptSubmit"
|
|
152
152
|
else
|
|
153
|
-
fail "
|
|
153
|
+
fail "user-prompt-submit command hook not found in UserPromptSubmit"
|
|
154
154
|
fi
|
|
155
155
|
|
|
156
156
|
# Check inject-flow-context is registered in SubagentStart
|