@codyswann/lisa 2.160.0 → 2.161.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.
Files changed (66) hide show
  1. package/dist/configs/eslint/harper-fabric.js +2 -2
  2. package/dist/configs/eslint/harper-fabric.js.map +1 -1
  3. package/harper-fabric/copy-contents/.prettierignore +4 -1
  4. package/harper-fabric/copy-overwrite/knip.json +2 -1
  5. package/harper-fabric/copy-overwrite/tsconfig.eslint.json +2 -1
  6. package/harper-fabric/merge/.oxlintrc.json +2 -1
  7. package/oxlint/harper-fabric.json +2 -1
  8. package/package.json +1 -1
  9. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  10. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  11. package/plugins/lisa-agy/plugin.json +1 -1
  12. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  13. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  14. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  15. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  16. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  17. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  18. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  19. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  20. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  21. package/plugins/lisa-expo-agy/plugin.json +1 -1
  22. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  23. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  24. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +12 -1
  25. package/plugins/lisa-harper-fabric/.codex-plugin/hooks.json +11 -0
  26. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  27. package/plugins/lisa-harper-fabric/generated-artifact-globs.txt +4 -0
  28. package/plugins/lisa-harper-fabric/hooks/block-generated-artifact-edits.sh +72 -0
  29. package/plugins/lisa-harper-fabric-agy/generated-artifact-globs.txt +4 -0
  30. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  31. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +12 -1
  32. package/plugins/lisa-harper-fabric-copilot/generated-artifact-globs.txt +4 -0
  33. package/plugins/lisa-harper-fabric-copilot/hooks/block-generated-artifact-edits.sh +72 -0
  34. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  35. package/plugins/lisa-harper-fabric-cursor/generated-artifact-globs.txt +4 -0
  36. package/plugins/lisa-harper-fabric-cursor/hooks/block-generated-artifact-edits.sh +72 -0
  37. package/plugins/lisa-harper-fabric-cursor/hooks/hooks.json +11 -0
  38. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  39. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  40. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  41. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  42. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  43. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  44. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  45. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  46. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  47. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  48. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  49. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  50. package/plugins/lisa-rails-agy/plugin.json +1 -1
  51. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  52. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  53. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  54. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  55. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  56. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  57. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  58. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  59. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  60. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  61. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  62. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  63. package/plugins/src/harper-fabric/.claude-plugin/plugin.json +8 -0
  64. package/plugins/src/harper-fabric/generated-artifact-globs.txt +4 -0
  65. package/plugins/src/harper-fabric/hooks/block-generated-artifact-edits.sh +72 -0
  66. package/tsconfig/harper-fabric.json +3 -1
@@ -11,8 +11,8 @@ export const defaultHarperFabricIgnores = [
11
11
  "*.config.local.ts",
12
12
  "harper-app/resources.js",
13
13
  "harper-app/resource-*.js",
14
- "harper-app/web/**/*.js",
15
- "harper-app/web/**/*.js.map",
14
+ "harper-app/web/**",
15
+ "harper-app/lib/**",
16
16
  ];
17
17
  /**
18
18
  * Creates the Harper/Fabric ESLint configuration.
@@ -1 +1 @@
1
- {"version":3,"file":"harper-fabric.js","sourceRoot":"","sources":["../../../src/configs/eslint/harper-fabric.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,CAAC;AAE7C;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,GAAG,cAAc;IACjB,WAAW;IACX,UAAU;IACV,WAAW;IACX,mBAAmB;IACnB,yBAAyB;IACzB,0BAA0B;IAC1B,wBAAwB;IACxB,4BAA4B;CAC7B,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,UAAU,qBAAqB,CAAC,EACpC,eAAe,EACf,cAAc,GAAG,0BAA0B,EAC3C,UAAU,GAAG,iBAAiB,GAK/B;IACC,OAAO;QACL,GAAG,mBAAmB,CAAC;YACrB,eAAe;YACf,cAAc;YACd,UAAU;SACX,CAAC;QACF;YACE,KAAK,EAAE,CAAC,aAAa,CAAC;YACtB,KAAK,EAAE;gBACL,2BAA2B,EAAE,OAAO;gBACpC,mBAAmB,EAAE,OAAO;gBAC5B,iCAAiC,EAAE,OAAO;gBAC1C,0BAA0B,EAAE,OAAO;gBACnC,0CAA0C,EAAE,OAAO;aACpD;SACF;QACD;YACE,KAAK,EAAE,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;YACnD,KAAK,EAAE;gBACL,2BAA2B,EAAE,KAAK;gBAClC,mBAAmB,EAAE,KAAK;gBAC1B,iCAAiC,EAAE,KAAK;gBACxC,0BAA0B,EAAE,KAAK;gBACjC,0CAA0C,EAAE,KAAK;aAClD;SACF;QACD;YACE,KAAK,EAAE,CAAC,qBAAqB,EAAE,eAAe,CAAC;YAC/C,KAAK,EAAE;gBACL,sBAAsB,EAAE,KAAK;aAC9B;SACF;KACiB,CAAC;AACvB,CAAC"}
1
+ {"version":3,"file":"harper-fabric.js","sourceRoot":"","sources":["../../../src/configs/eslint/harper-fabric.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,CAAC;AAE7C;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,GAAG,cAAc;IACjB,WAAW;IACX,UAAU;IACV,WAAW;IACX,mBAAmB;IACnB,yBAAyB;IACzB,0BAA0B;IAC1B,mBAAmB;IACnB,mBAAmB;CACpB,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,UAAU,qBAAqB,CAAC,EACpC,eAAe,EACf,cAAc,GAAG,0BAA0B,EAC3C,UAAU,GAAG,iBAAiB,GAK/B;IACC,OAAO;QACL,GAAG,mBAAmB,CAAC;YACrB,eAAe;YACf,cAAc;YACd,UAAU;SACX,CAAC;QACF;YACE,KAAK,EAAE,CAAC,aAAa,CAAC;YACtB,KAAK,EAAE;gBACL,2BAA2B,EAAE,OAAO;gBACpC,mBAAmB,EAAE,OAAO;gBAC5B,iCAAiC,EAAE,OAAO;gBAC1C,0BAA0B,EAAE,OAAO;gBACnC,0CAA0C,EAAE,OAAO;aACpD;SACF;QACD;YACE,KAAK,EAAE,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;YACnD,KAAK,EAAE;gBACL,2BAA2B,EAAE,KAAK;gBAClC,mBAAmB,EAAE,KAAK;gBAC1B,iCAAiC,EAAE,KAAK;gBACxC,0BAA0B,EAAE,KAAK;gBACjC,0CAA0C,EAAE,KAAK;aAClD;SACF;QACD;YACE,KAAK,EAAE,CAAC,qBAAqB,EAAE,eAAe,CAAC;YAC/C,KAAK,EAAE;gBACL,sBAAsB,EAAE,KAAK;aAC9B;SACF;KACiB,CAAC;AACvB,CAAC"}
@@ -2,7 +2,10 @@
2
2
 
3
3
  # Harper/Fabric generated web output and scraped research captures are not
4
4
  # source formatting inputs.
5
- harper-app/web/
5
+ harper-app/resources.js
6
+ harper-app/resource-*.js
7
+ harper-app/web/**
8
+ harper-app/lib/**
6
9
  research/articles/
7
10
 
8
11
  # END: AI GUARDRAILS HARPER-FABRIC
@@ -15,7 +15,8 @@
15
15
  "**/node_modules/**",
16
16
  "harper-app/resources.js",
17
17
  "harper-app/resource-*.js",
18
- "harper-app/web/**/*.js"
18
+ "harper-app/web/**",
19
+ "harper-app/lib/**"
19
20
  ],
20
21
  "ignoreIssues": {
21
22
  "src/types/harper-schema.ts": ["types"]
@@ -22,6 +22,7 @@
22
22
  "coverage",
23
23
  "harper-app/resources.js",
24
24
  "harper-app/resource-*.js",
25
- "harper-app/web/**/*.js"
25
+ "harper-app/web/**",
26
+ "harper-app/lib/**"
26
27
  ]
27
28
  }
@@ -12,6 +12,7 @@
12
12
  "**/generated/**",
13
13
  "harper-app/resources.js",
14
14
  "harper-app/resource-*.js",
15
- "harper-app/web/**/*.js"
15
+ "harper-app/web/**",
16
+ "harper-app/lib/**"
16
17
  ]
17
18
  }
@@ -7,6 +7,7 @@
7
7
  "node_modules/**",
8
8
  "harper-app/resources.js",
9
9
  "harper-app/resource-*.js",
10
- "harper-app/web/**/*.js"
10
+ "harper-app/web/**",
11
+ "harper-app/lib/**"
11
12
  ]
12
13
  }
package/package.json CHANGED
@@ -84,7 +84,7 @@
84
84
  "lodash": ">=4.18.1"
85
85
  },
86
86
  "name": "@codyswann/lisa",
87
- "version": "2.160.0",
87
+ "version": "2.161.0",
88
88
  "description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
89
89
  "main": "dist/index.js",
90
90
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "Universal governance: agents, skills, commands, hooks, and rules for all projects.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "AWS CDK-specific Lisa plugin.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "Expo/React Native-specific skills, agents, rules, and MCP servers",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "Expo and React Native-specific skills, agents, rules, and MCP servers.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "Expo/React Native-specific skills, agents, rules, and MCP servers",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "Expo/React Native-specific skills, agents, rules, and MCP servers",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "Expo/React Native-specific skills, agents, rules, and MCP servers",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "Harper/Fabric-specific rules for TypeScript component apps",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -9,6 +9,17 @@
9
9
  "lisa-typescript"
10
10
  ],
11
11
  "hooks": {
12
+ "PreToolUse": [
13
+ {
14
+ "matcher": "Write|Edit|MultiEdit",
15
+ "hooks": [
16
+ {
17
+ "type": "command",
18
+ "command": "${CLAUDE_PLUGIN_ROOT}/hooks/block-generated-artifact-edits.sh"
19
+ }
20
+ ]
21
+ }
22
+ ],
12
23
  "SessionStart": [
13
24
  {
14
25
  "matcher": "",
@@ -1,5 +1,16 @@
1
1
  {
2
2
  "hooks": {
3
+ "PreToolUse": [
4
+ {
5
+ "matcher": "Write|Edit|MultiEdit",
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "${PLUGIN_ROOT}/hooks/block-generated-artifact-edits.sh"
10
+ }
11
+ ]
12
+ }
13
+ ],
3
14
  "SessionStart": [
4
15
  {
5
16
  "matcher": "",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "Harper/Fabric-specific Lisa rules for TypeScript component apps.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -0,0 +1,4 @@
1
+ harper-app/resources.js
2
+ harper-app/resource-*.js
3
+ harper-app/web/**
4
+ harper-app/lib/**
@@ -0,0 +1,72 @@
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
+ # PreToolUse hook: block Write/Edit/MultiEdit on generated Harper deploy
6
+ # artifacts. Harper/Fabric projects build these files from TypeScript under
7
+ # src/, so direct edits are overwritten by the next build and usually ship as
8
+ # no-op fixes.
9
+ # Reference: https://docs.claude.com/en/docs/claude-code/hooks
10
+ # Exit code 2 blocks the tool call and surfaces stderr to Claude.
11
+
12
+ JSON_INPUT=$(cat)
13
+
14
+ command -v jq >/dev/null 2>&1 || exit 0
15
+
16
+ FILE_PATH=$(printf '%s' "$JSON_INPUT" | jq -r '.tool_input.file_path // empty')
17
+ [ -n "$FILE_PATH" ] || exit 0
18
+
19
+ PLUGIN_ROOT=${CLAUDE_PLUGIN_ROOT:-}
20
+ if [ -z "$PLUGIN_ROOT" ]; then
21
+ PLUGIN_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
22
+ fi
23
+ GLOBS_FILE="$PLUGIN_ROOT/generated-artifact-globs.txt"
24
+ [ -f "$GLOBS_FILE" ] || exit 0
25
+
26
+ normalize_path() {
27
+ local path="$1"
28
+ path="${path#./}"
29
+ printf '%s' "$path"
30
+ }
31
+
32
+ matches_glob() {
33
+ local file="$1"
34
+ local glob="$2"
35
+
36
+ if [ "${glob: -3}" = "/**" ]; then
37
+ local dir="${glob%/**}"
38
+ case "$file" in
39
+ "$dir"/* | */"$dir"/*) return 0 ;;
40
+ esac
41
+ return 1
42
+ fi
43
+
44
+ case "$file" in
45
+ $glob | */$glob) return 0 ;;
46
+ esac
47
+
48
+ return 1
49
+ }
50
+
51
+ NORMALIZED_FILE=$(normalize_path "$FILE_PATH")
52
+
53
+ while IFS= read -r glob || [ -n "$glob" ]; do
54
+ [ -n "$glob" ] || continue
55
+ case "$glob" in \#*) continue ;; esac
56
+
57
+ if matches_glob "$NORMALIZED_FILE" "$glob"; then
58
+ cat >&2 <<MSG
59
+ Blocked: direct edit to generated Harper/Fabric artifact.
60
+
61
+ File: $FILE_PATH
62
+ Matched generated artifact pattern: $glob
63
+
64
+ TypeScript under src/ is the source of truth for Harper resources, web assets,
65
+ and shared libraries. Change the matching TypeScript source under src/ and run
66
+ the project build to regenerate harper-app outputs.
67
+ MSG
68
+ exit 2
69
+ fi
70
+ done <"$GLOBS_FILE"
71
+
72
+ exit 0
@@ -0,0 +1,4 @@
1
+ harper-app/resources.js
2
+ harper-app/resource-*.js
3
+ harper-app/web/**
4
+ harper-app/lib/**
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "Harper/Fabric-specific rules for TypeScript component apps",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "Harper/Fabric-specific rules for TypeScript component apps",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -9,6 +9,17 @@
9
9
  "lisa-typescript"
10
10
  ],
11
11
  "hooks": {
12
+ "preToolUse": [
13
+ {
14
+ "matcher": "Write|Edit|MultiEdit",
15
+ "hooks": [
16
+ {
17
+ "type": "command",
18
+ "command": "${CLAUDE_PLUGIN_ROOT}/hooks/block-generated-artifact-edits.sh"
19
+ }
20
+ ]
21
+ }
22
+ ],
12
23
  "sessionStart": [
13
24
  {
14
25
  "matcher": "",
@@ -0,0 +1,4 @@
1
+ harper-app/resources.js
2
+ harper-app/resource-*.js
3
+ harper-app/web/**
4
+ harper-app/lib/**
@@ -0,0 +1,72 @@
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
+ # PreToolUse hook: block Write/Edit/MultiEdit on generated Harper deploy
6
+ # artifacts. Harper/Fabric projects build these files from TypeScript under
7
+ # src/, so direct edits are overwritten by the next build and usually ship as
8
+ # no-op fixes.
9
+ # Reference: https://docs.claude.com/en/docs/claude-code/hooks
10
+ # Exit code 2 blocks the tool call and surfaces stderr to Claude.
11
+
12
+ JSON_INPUT=$(cat)
13
+
14
+ command -v jq >/dev/null 2>&1 || exit 0
15
+
16
+ FILE_PATH=$(printf '%s' "$JSON_INPUT" | jq -r '.tool_input.file_path // empty')
17
+ [ -n "$FILE_PATH" ] || exit 0
18
+
19
+ PLUGIN_ROOT=${CLAUDE_PLUGIN_ROOT:-}
20
+ if [ -z "$PLUGIN_ROOT" ]; then
21
+ PLUGIN_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
22
+ fi
23
+ GLOBS_FILE="$PLUGIN_ROOT/generated-artifact-globs.txt"
24
+ [ -f "$GLOBS_FILE" ] || exit 0
25
+
26
+ normalize_path() {
27
+ local path="$1"
28
+ path="${path#./}"
29
+ printf '%s' "$path"
30
+ }
31
+
32
+ matches_glob() {
33
+ local file="$1"
34
+ local glob="$2"
35
+
36
+ if [ "${glob: -3}" = "/**" ]; then
37
+ local dir="${glob%/**}"
38
+ case "$file" in
39
+ "$dir"/* | */"$dir"/*) return 0 ;;
40
+ esac
41
+ return 1
42
+ fi
43
+
44
+ case "$file" in
45
+ $glob | */$glob) return 0 ;;
46
+ esac
47
+
48
+ return 1
49
+ }
50
+
51
+ NORMALIZED_FILE=$(normalize_path "$FILE_PATH")
52
+
53
+ while IFS= read -r glob || [ -n "$glob" ]; do
54
+ [ -n "$glob" ] || continue
55
+ case "$glob" in \#*) continue ;; esac
56
+
57
+ if matches_glob "$NORMALIZED_FILE" "$glob"; then
58
+ cat >&2 <<MSG
59
+ Blocked: direct edit to generated Harper/Fabric artifact.
60
+
61
+ File: $FILE_PATH
62
+ Matched generated artifact pattern: $glob
63
+
64
+ TypeScript under src/ is the source of truth for Harper resources, web assets,
65
+ and shared libraries. Change the matching TypeScript source under src/ and run
66
+ the project build to regenerate harper-app outputs.
67
+ MSG
68
+ exit 2
69
+ fi
70
+ done <"$GLOBS_FILE"
71
+
72
+ exit 0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "Harper/Fabric-specific rules for TypeScript component apps",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -0,0 +1,4 @@
1
+ harper-app/resources.js
2
+ harper-app/resource-*.js
3
+ harper-app/web/**
4
+ harper-app/lib/**
@@ -0,0 +1,72 @@
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
+ # PreToolUse hook: block Write/Edit/MultiEdit on generated Harper deploy
6
+ # artifacts. Harper/Fabric projects build these files from TypeScript under
7
+ # src/, so direct edits are overwritten by the next build and usually ship as
8
+ # no-op fixes.
9
+ # Reference: https://docs.claude.com/en/docs/claude-code/hooks
10
+ # Exit code 2 blocks the tool call and surfaces stderr to Claude.
11
+
12
+ JSON_INPUT=$(cat)
13
+
14
+ command -v jq >/dev/null 2>&1 || exit 0
15
+
16
+ FILE_PATH=$(printf '%s' "$JSON_INPUT" | jq -r '.tool_input.file_path // empty')
17
+ [ -n "$FILE_PATH" ] || exit 0
18
+
19
+ PLUGIN_ROOT=${CLAUDE_PLUGIN_ROOT:-}
20
+ if [ -z "$PLUGIN_ROOT" ]; then
21
+ PLUGIN_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
22
+ fi
23
+ GLOBS_FILE="$PLUGIN_ROOT/generated-artifact-globs.txt"
24
+ [ -f "$GLOBS_FILE" ] || exit 0
25
+
26
+ normalize_path() {
27
+ local path="$1"
28
+ path="${path#./}"
29
+ printf '%s' "$path"
30
+ }
31
+
32
+ matches_glob() {
33
+ local file="$1"
34
+ local glob="$2"
35
+
36
+ if [ "${glob: -3}" = "/**" ]; then
37
+ local dir="${glob%/**}"
38
+ case "$file" in
39
+ "$dir"/* | */"$dir"/*) return 0 ;;
40
+ esac
41
+ return 1
42
+ fi
43
+
44
+ case "$file" in
45
+ $glob | */$glob) return 0 ;;
46
+ esac
47
+
48
+ return 1
49
+ }
50
+
51
+ NORMALIZED_FILE=$(normalize_path "$FILE_PATH")
52
+
53
+ while IFS= read -r glob || [ -n "$glob" ]; do
54
+ [ -n "$glob" ] || continue
55
+ case "$glob" in \#*) continue ;; esac
56
+
57
+ if matches_glob "$NORMALIZED_FILE" "$glob"; then
58
+ cat >&2 <<MSG
59
+ Blocked: direct edit to generated Harper/Fabric artifact.
60
+
61
+ File: $FILE_PATH
62
+ Matched generated artifact pattern: $glob
63
+
64
+ TypeScript under src/ is the source of truth for Harper resources, web assets,
65
+ and shared libraries. Change the matching TypeScript source under src/ and run
66
+ the project build to regenerate harper-app outputs.
67
+ MSG
68
+ exit 2
69
+ fi
70
+ done <"$GLOBS_FILE"
71
+
72
+ exit 0
@@ -0,0 +1,11 @@
1
+ {
2
+ "version": 1,
3
+ "hooks": {
4
+ "preToolUse": [
5
+ {
6
+ "command": "${CURSOR_PLUGIN_ROOT}/hooks/block-generated-artifact-edits.sh",
7
+ "matcher": "Write|Edit|MultiEdit"
8
+ }
9
+ ]
10
+ }
11
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (migration write-protection)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "NestJS-specific skills and migration write-protection hooks.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (migration write-protection)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (migration write-protection)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (migration write-protection)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-openclaw",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-openclaw",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, across Claude and Codex.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-openclaw",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-openclaw",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-openclaw",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "Ruby on Rails-specific skills and hooks for RuboCop and ast-grep scanning on edit.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "TypeScript-specific hooks for formatting, linting, and ast-grep scanning on edit.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "Distributable LLM Wiki kernel — ingest, query, lint, and maintain a git-native markdown knowledge base across Claude and Codex.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "2.160.0",
3
+ "version": "2.161.0",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -5,6 +5,14 @@
5
5
  "author": { "name": "Cody Swann" },
6
6
  "dependencies": ["lisa-typescript"],
7
7
  "hooks": {
8
+ "PreToolUse": [
9
+ {
10
+ "matcher": "Write|Edit|MultiEdit",
11
+ "hooks": [
12
+ { "type": "command", "command": "${CLAUDE_PLUGIN_ROOT}/hooks/block-generated-artifact-edits.sh" }
13
+ ]
14
+ }
15
+ ],
8
16
  "SessionStart": [
9
17
  { "matcher": "", "hooks": [{ "type": "command", "command": "${CLAUDE_PLUGIN_ROOT}/hooks/inject-rules.sh" }] }
10
18
  ],
@@ -0,0 +1,4 @@
1
+ harper-app/resources.js
2
+ harper-app/resource-*.js
3
+ harper-app/web/**
4
+ harper-app/lib/**
@@ -0,0 +1,72 @@
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
+ # PreToolUse hook: block Write/Edit/MultiEdit on generated Harper deploy
6
+ # artifacts. Harper/Fabric projects build these files from TypeScript under
7
+ # src/, so direct edits are overwritten by the next build and usually ship as
8
+ # no-op fixes.
9
+ # Reference: https://docs.claude.com/en/docs/claude-code/hooks
10
+ # Exit code 2 blocks the tool call and surfaces stderr to Claude.
11
+
12
+ JSON_INPUT=$(cat)
13
+
14
+ command -v jq >/dev/null 2>&1 || exit 0
15
+
16
+ FILE_PATH=$(printf '%s' "$JSON_INPUT" | jq -r '.tool_input.file_path // empty')
17
+ [ -n "$FILE_PATH" ] || exit 0
18
+
19
+ PLUGIN_ROOT=${CLAUDE_PLUGIN_ROOT:-}
20
+ if [ -z "$PLUGIN_ROOT" ]; then
21
+ PLUGIN_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
22
+ fi
23
+ GLOBS_FILE="$PLUGIN_ROOT/generated-artifact-globs.txt"
24
+ [ -f "$GLOBS_FILE" ] || exit 0
25
+
26
+ normalize_path() {
27
+ local path="$1"
28
+ path="${path#./}"
29
+ printf '%s' "$path"
30
+ }
31
+
32
+ matches_glob() {
33
+ local file="$1"
34
+ local glob="$2"
35
+
36
+ if [ "${glob: -3}" = "/**" ]; then
37
+ local dir="${glob%/**}"
38
+ case "$file" in
39
+ "$dir"/* | */"$dir"/*) return 0 ;;
40
+ esac
41
+ return 1
42
+ fi
43
+
44
+ case "$file" in
45
+ $glob | */$glob) return 0 ;;
46
+ esac
47
+
48
+ return 1
49
+ }
50
+
51
+ NORMALIZED_FILE=$(normalize_path "$FILE_PATH")
52
+
53
+ while IFS= read -r glob || [ -n "$glob" ]; do
54
+ [ -n "$glob" ] || continue
55
+ case "$glob" in \#*) continue ;; esac
56
+
57
+ if matches_glob "$NORMALIZED_FILE" "$glob"; then
58
+ cat >&2 <<MSG
59
+ Blocked: direct edit to generated Harper/Fabric artifact.
60
+
61
+ File: $FILE_PATH
62
+ Matched generated artifact pattern: $glob
63
+
64
+ TypeScript under src/ is the source of truth for Harper resources, web assets,
65
+ and shared libraries. Change the matching TypeScript source under src/ and run
66
+ the project build to regenerate harper-app outputs.
67
+ MSG
68
+ exit 2
69
+ fi
70
+ done <"$GLOBS_FILE"
71
+
72
+ exit 0
@@ -15,6 +15,8 @@
15
15
  "coverage",
16
16
  "node_modules",
17
17
  "harper-app/resources.js",
18
- "harper-app/web/**/*.js"
18
+ "harper-app/resource-*.js",
19
+ "harper-app/web/**",
20
+ "harper-app/lib/**"
19
21
  ]
20
22
  }