@codyswann/lisa 4.60.8 → 4.60.10

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 (86) hide show
  1. package/all/copy-overwrite/scripts/lisa-gates.mjs +9 -8
  2. package/all/copy-overwrite/scripts/lisa-hooks/block-instruction-file-edits.sh +26 -35
  3. package/all/create-only/.agents/rules/README.md +13 -6
  4. package/dist/core/host-rules-pointer.js +2 -2
  5. package/dist/core/host-rules-pointer.js.map +1 -1
  6. package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
  7. package/dist/core/lisa-owned-hash-ledger.js +4 -0
  8. package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
  9. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  10. package/dist/core/nightly-e2e-guard-behavior-certificate.js.map +1 -1
  11. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  12. package/dist/core/upstream-evidence-manifest.js +8 -6
  13. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  14. package/dist/migrations/index.d.ts +1 -0
  15. package/dist/migrations/index.d.ts.map +1 -1
  16. package/dist/migrations/index.js +3 -0
  17. package/dist/migrations/index.js.map +1 -1
  18. package/dist/migrations/preserve-verification-opt-ins.d.ts +41 -0
  19. package/dist/migrations/preserve-verification-opt-ins.d.ts.map +1 -0
  20. package/dist/migrations/preserve-verification-opt-ins.js +244 -0
  21. package/dist/migrations/preserve-verification-opt-ins.js.map +1 -0
  22. package/dist/opencode/plugin-templates/lisa-block-instruction-file-edits.ts +25 -22
  23. package/package.json +4 -4
  24. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  25. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  26. package/plugins/lisa/hooks/block-instruction-file-edits.sh +26 -35
  27. package/plugins/lisa/rules/reference/config-resolution.md +1 -1
  28. package/plugins/lisa/rules/reference/project-learnings.md +28 -3
  29. package/plugins/lisa-agy/hooks/block-instruction-file-edits.sh +26 -35
  30. package/plugins/lisa-agy/plugin.json +1 -1
  31. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  32. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  33. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  34. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  35. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  36. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  37. package/plugins/lisa-copilot/hooks/block-instruction-file-edits.sh +26 -35
  38. package/plugins/lisa-copilot/rules/reference/config-resolution.md +1 -1
  39. package/plugins/lisa-copilot/rules/reference/project-learnings.md +28 -3
  40. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  41. package/plugins/lisa-cursor/hooks/block-instruction-file-edits.sh +26 -35
  42. package/plugins/lisa-cursor/rules/config-resolution-reference.mdc +1 -1
  43. package/plugins/lisa-cursor/rules/project-learnings-reference.mdc +28 -3
  44. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  45. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  46. package/plugins/lisa-expo-agy/plugin.json +1 -1
  47. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  48. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  49. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  50. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  51. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  52. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  53. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  54. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  55. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  56. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  57. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  58. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  59. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  60. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  61. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  62. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  63. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  64. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  65. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  66. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  67. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  68. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  69. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  70. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  71. package/plugins/lisa-rails-agy/plugin.json +1 -1
  72. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  73. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  74. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  75. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  76. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  77. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  78. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  79. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  80. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  81. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  82. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  83. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  84. package/plugins/src/base/hooks/block-instruction-file-edits.sh +26 -35
  85. package/plugins/src/base/rules/reference/config-resolution.md +1 -1
  86. package/plugins/src/base/rules/reference/project-learnings.md +28 -3
@@ -24,11 +24,9 @@
24
24
  # Reads (`cat AGENTS.md`, `rg pattern AGENTS.md`) never fire.
25
25
  #
26
26
  # Exemptions (allowed):
27
- # - `LISA_ALLOW_INSTRUCTION_FILE_WRITE` set — the operator's explicit override,
28
- # named in the refusal so a human who really wants the edit can take it;
29
- # - payloads carrying a `<!-- LISA_` marker: Lisa's own marker-bounded regions
30
- # (the agy project-learnings bridge, cross-pollinate's rule section) replace
31
- # in place on re-run and cannot grow the file;
27
+ # - `LISA_ALLOW_INSTRUCTION_FILE_WRITE` set in the operator's runtime config.
28
+ # This cooperative override does not authenticate conversation approval;
29
+ # - Edit/MultiEdit replacing only bounded `<!-- LISA_` regions on both sides;
32
30
  # - paths under `node_modules/` or `dist/` — vendored copies, not the host's.
33
31
  set -euo pipefail
34
32
 
@@ -58,8 +56,8 @@ fi
58
56
 
59
57
  command -v jq >/dev/null 2>&1 || exit 0
60
58
 
61
- # The operator's override. Checked before anything else so it is always the
62
- # cheapest way out of a refusal a human deliberately wants to overrule.
59
+ # Existing operator-configured override. This hook sees tool payloads, not the
60
+ # conversation; the environment variable is not proof of who approved an edit.
63
61
  if [ -n "${LISA_ALLOW_INSTRUCTION_FILE_WRITE:-}" ]; then
64
62
  exit 0
65
63
  fi
@@ -129,34 +127,27 @@ refuse() {
129
127
  cat >&2 <<EOF
130
128
  BLOCKED: refusing to write \`$target\`.
131
129
 
132
- WHY: this is a session-instruction file, not a place to record what you just
133
- learned. Every line in it is loaded into the context of every agent, in every
134
- future session, in this project, forever. It is human-curated on purpose. An
135
- agent appending its own findings is how these files grow into hundreds of lines
136
- of stale, ticket-specific trivia that every later session pays for and half of
137
- which was only ever true once.
138
-
139
- WHERE IT GOES INSTEAD — take the first one that fits:
140
-
141
- 1. Every agent genuinely needs this in every session, and only in this project.
142
- That is a project rule — but do not write it yourself. Capture it with
143
- \`/lisa:persist-learning\` so it lands in the learnings ledger with provenance
144
- and a confidence score. The gardener (\`/lisa:learnings:audit\`) then proposes
145
- promotion into the host-rules directory \`.agents/rules/\` as a human-gated ticket.
146
-
147
- 2. It changes how an existing skill should behave. Edit that skill's SKILL.md.
148
- Knowledge belongs next to the procedure it modifies, not in a global preamble.
149
-
150
- 3. It is true beyond this project. Propose it upstream to Lisa via
151
- \`/lisa:cross-pollinate\`, or open an issue on CodySwannGT/lisa. A local copy of
152
- a general rule silently drifts the moment upstream changes.
153
-
154
- 4. None of the above — it is background someone may want to look up, not a
155
- standing instruction. Write it into the project documentation (\`wiki/\` or
156
- \`docs/\`).
157
-
158
- If a human explicitly asked for this edit, they can re-run with
159
- \`LISA_ALLOW_INSTRUCTION_FILE_WRITE=1\` set, which bypasses this guard.
130
+ WHY: this session-instruction file is loaded into future agent sessions.
131
+ Appending incidental findings makes every later session carry those notes.
132
+ This hook checks write patterns; it cannot read or authenticate conversation approval.
133
+
134
+ If an operator already requested a standing-rule edit, that authorization is
135
+ enough for the requested change. Use the relevant topic file in \`.agents/rules/\`
136
+ when no other destination was specified. All six supported agents read that
137
+ directory through the existing \`AGENTS.md\` pointer. Edit it directly; do not
138
+ require learning capture, another ticket, or repeated approval for the same ruling.
139
+
140
+ If the operator explicitly named this guarded file, preserve that target and
141
+ use the runtime's authorized edit path, or report this remaining restriction.
142
+ Do not silently move the edit, switch tools to evade this refusal, or set an
143
+ override yourself. The existing operator-configured
144
+ \`LISA_ALLOW_INSTRUCTION_FILE_WRITE=1\` escape hatch is not proof of consent.
145
+
146
+ For an agent's own finding, first decide whether it is worth maintaining.
147
+ Decline one-off trivia and unnecessary rules. Durable project knowledge can
148
+ use \`/lisa:persist-learning\`; procedural knowledge belongs with its SKILL.md;
149
+ background belongs in existing project documentation. Use
150
+ \`/lisa:cross-pollinate\` only for a material, reusable upstream improvement.
160
151
  EOF
161
152
  exit 2
162
153
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.60.8",
3
+ "version": "4.60.10",
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": "4.60.8",
3
+ "version": "4.60.10",
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": "4.60.8",
3
+ "version": "4.60.10",
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": "4.60.8",
3
+ "version": "4.60.10",
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": "4.60.8",
3
+ "version": "4.60.10",
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": "4.60.8",
3
+ "version": "4.60.10",
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": "4.60.8",
3
+ "version": "4.60.10",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -24,11 +24,9 @@
24
24
  # Reads (`cat AGENTS.md`, `rg pattern AGENTS.md`) never fire.
25
25
  #
26
26
  # Exemptions (allowed):
27
- # - `LISA_ALLOW_INSTRUCTION_FILE_WRITE` set — the operator's explicit override,
28
- # named in the refusal so a human who really wants the edit can take it;
29
- # - payloads carrying a `<!-- LISA_` marker: Lisa's own marker-bounded regions
30
- # (the agy project-learnings bridge, cross-pollinate's rule section) replace
31
- # in place on re-run and cannot grow the file;
27
+ # - `LISA_ALLOW_INSTRUCTION_FILE_WRITE` set in the operator's runtime config.
28
+ # This cooperative override does not authenticate conversation approval;
29
+ # - Edit/MultiEdit replacing only bounded `<!-- LISA_` regions on both sides;
32
30
  # - paths under `node_modules/` or `dist/` — vendored copies, not the host's.
33
31
  set -euo pipefail
34
32
 
@@ -58,8 +56,8 @@ fi
58
56
 
59
57
  command -v jq >/dev/null 2>&1 || exit 0
60
58
 
61
- # The operator's override. Checked before anything else so it is always the
62
- # cheapest way out of a refusal a human deliberately wants to overrule.
59
+ # Existing operator-configured override. This hook sees tool payloads, not the
60
+ # conversation; the environment variable is not proof of who approved an edit.
63
61
  if [ -n "${LISA_ALLOW_INSTRUCTION_FILE_WRITE:-}" ]; then
64
62
  exit 0
65
63
  fi
@@ -129,34 +127,27 @@ refuse() {
129
127
  cat >&2 <<EOF
130
128
  BLOCKED: refusing to write \`$target\`.
131
129
 
132
- WHY: this is a session-instruction file, not a place to record what you just
133
- learned. Every line in it is loaded into the context of every agent, in every
134
- future session, in this project, forever. It is human-curated on purpose. An
135
- agent appending its own findings is how these files grow into hundreds of lines
136
- of stale, ticket-specific trivia that every later session pays for and half of
137
- which was only ever true once.
138
-
139
- WHERE IT GOES INSTEAD — take the first one that fits:
140
-
141
- 1. Every agent genuinely needs this in every session, and only in this project.
142
- That is a project rule — but do not write it yourself. Capture it with
143
- \`/lisa:persist-learning\` so it lands in the learnings ledger with provenance
144
- and a confidence score. The gardener (\`/lisa:learnings:audit\`) then proposes
145
- promotion into the host-rules directory \`.agents/rules/\` as a human-gated ticket.
146
-
147
- 2. It changes how an existing skill should behave. Edit that skill's SKILL.md.
148
- Knowledge belongs next to the procedure it modifies, not in a global preamble.
149
-
150
- 3. It is true beyond this project. Propose it upstream to Lisa via
151
- \`/lisa:cross-pollinate\`, or open an issue on CodySwannGT/lisa. A local copy of
152
- a general rule silently drifts the moment upstream changes.
153
-
154
- 4. None of the above — it is background someone may want to look up, not a
155
- standing instruction. Write it into the project documentation (\`wiki/\` or
156
- \`docs/\`).
157
-
158
- If a human explicitly asked for this edit, they can re-run with
159
- \`LISA_ALLOW_INSTRUCTION_FILE_WRITE=1\` set, which bypasses this guard.
130
+ WHY: this session-instruction file is loaded into future agent sessions.
131
+ Appending incidental findings makes every later session carry those notes.
132
+ This hook checks write patterns; it cannot read or authenticate conversation approval.
133
+
134
+ If an operator already requested a standing-rule edit, that authorization is
135
+ enough for the requested change. Use the relevant topic file in \`.agents/rules/\`
136
+ when no other destination was specified. All six supported agents read that
137
+ directory through the existing \`AGENTS.md\` pointer. Edit it directly; do not
138
+ require learning capture, another ticket, or repeated approval for the same ruling.
139
+
140
+ If the operator explicitly named this guarded file, preserve that target and
141
+ use the runtime's authorized edit path, or report this remaining restriction.
142
+ Do not silently move the edit, switch tools to evade this refusal, or set an
143
+ override yourself. The existing operator-configured
144
+ \`LISA_ALLOW_INSTRUCTION_FILE_WRITE=1\` escape hatch is not proof of consent.
145
+
146
+ For an agent's own finding, first decide whether it is worth maintaining.
147
+ Decline one-off trivia and unnecessary rules. Durable project knowledge can
148
+ use \`/lisa:persist-learning\`; procedural knowledge belongs with its SKILL.md;
149
+ background belongs in existing project documentation. Use
150
+ \`/lisa:cross-pollinate\` only for a material, reusable upstream improvement.
160
151
  EOF
161
152
  exit 2
162
153
  }
@@ -286,7 +286,7 @@ fi
286
286
  Host-authored operating rules live in `.agents/rules/` — **fixed, not configurable**. One directory, every agent.
287
287
 
288
288
  - **Not a native auto-load tree.** `.claude/rules`, `.cursor/rules`, and `.github/instructions` are; `.agents/rules` deliberately is not. Every agent reaches it through the single Lisa-managed pointer block in `AGENTS.md` (Claude via the `@AGENTS.md` import in `CLAUDE.md`), so no agent loads host rules twice.
289
- - **Host-owned.** Lisa never writes rule bodies into `.agents/rules/`, and never edits or deletes a file there. Lisa's own rules originate in its plugins and arrive by their own route.
289
+ - **Host-owned.** Lisa's installer never overwrites host rule bodies. Agents may make specific operator-requested edits directly, without recapturing the approved decision as a learning or promotion ticket; see **Operator-directed standing rules** in `project-learnings.md`. Lisa's own rules arrive through its plugins.
290
290
  - **Not the learnings ledger.** `.agents/rules` is reserved in the auto-loaded-tree blocklist, so a `learnings.file` override can never resolve inside it.
291
291
  - **Transition.** A project that still has the retired `.claude/rules/PROJECT_RULES.md` keeps it, untouched and authoritative. The pointer block names it so agents whose runtime does not auto-load `.claude/rules/` still find it. Moving that content is a human-gated decision, never an automated rewrite.
292
292
 
@@ -81,10 +81,35 @@ collide.
81
81
  - The **build-intake flows** advance `last_confirmed` at claim time
82
82
  (`confirmLearningEntry`, below).
83
83
 
84
- Promotion to a higher rung (skill, eager rule, executable control, upstream
85
- ticket) is never a writer here — it is the gardener's job, gated by a human
84
+ Automated promotion of a captured learning to a higher rung (skill, eager rule,
85
+ executable control, upstream ticket) is the gardener's job, gated by a human
86
86
  flipping a tracker ticket to `status:ready`.
87
87
 
88
+ ## Operator-directed standing rules
89
+
90
+ An operator's instruction to add, revise, or remove a standing rule is already
91
+ authorization for that specific edit. It is not a new machine-captured learning.
92
+ Make the requested change directly, preserving unrelated content; do not require
93
+ learning capture, a promotion ticket, or repeated approval for the same decision.
94
+ "Human-authored" describes who controls the rule, not who types the approved edit.
95
+
96
+ Use the existing topic file under `.agents/rules/`, or create a short one there,
97
+ when the operator has not specified another destination. The `AGENTS.md` host-rules
98
+ pointer reaches Claude Code, Codex, Cursor, OpenCode, Antigravity, and Copilot.
99
+ These shared rules are not a Claude-only surface, and they do not need to be
100
+ copied into every agent's startup file.
101
+
102
+ If the operator explicitly named a guarded startup file, do not substitute a
103
+ different destination or switch tools to evade a refusal. Use the runtime's
104
+ authorized edit path, or report the specific remaining runtime restriction.
105
+ The existing instruction-file override is an operator-configured escape hatch,
106
+ not proof of human approval; agents must not set it to work around a refusal.
107
+ No new approval token is needed for ordinary authorized edits to shared host rules.
108
+
109
+ This does not authorize agents to promote their own incidental findings. Decline
110
+ one-off notes and unnecessary rules; use the existing learning flow only for
111
+ durable knowledge worth maintaining.
112
+
88
113
  ## Claim-time confirmation (`last_confirmed`)
89
114
 
90
115
  `last_confirmed` is advanced at claim time by the build-intake flows (step
@@ -111,7 +136,7 @@ warning, apply no entry, and do not block unrelated work.
111
136
  Precedence:
112
137
 
113
138
  1. System, developer, user, and repo instructions still outrank learnings.
114
- 2. Committed host rules (`.agents/rules/`) remain durable human-authored
139
+ 2. Committed host rules (`.agents/rules/`) remain durable, operator-controlled
115
140
  guidance.
116
141
  3. Project learnings add recent operational knowledge, but never rewrite or
117
142
  append to host rules.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.60.8",
3
+ "version": "4.60.10",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -24,11 +24,9 @@
24
24
  # Reads (`cat AGENTS.md`, `rg pattern AGENTS.md`) never fire.
25
25
  #
26
26
  # Exemptions (allowed):
27
- # - `LISA_ALLOW_INSTRUCTION_FILE_WRITE` set — the operator's explicit override,
28
- # named in the refusal so a human who really wants the edit can take it;
29
- # - payloads carrying a `<!-- LISA_` marker: Lisa's own marker-bounded regions
30
- # (the agy project-learnings bridge, cross-pollinate's rule section) replace
31
- # in place on re-run and cannot grow the file;
27
+ # - `LISA_ALLOW_INSTRUCTION_FILE_WRITE` set in the operator's runtime config.
28
+ # This cooperative override does not authenticate conversation approval;
29
+ # - Edit/MultiEdit replacing only bounded `<!-- LISA_` regions on both sides;
32
30
  # - paths under `node_modules/` or `dist/` — vendored copies, not the host's.
33
31
  set -euo pipefail
34
32
 
@@ -58,8 +56,8 @@ fi
58
56
 
59
57
  command -v jq >/dev/null 2>&1 || exit 0
60
58
 
61
- # The operator's override. Checked before anything else so it is always the
62
- # cheapest way out of a refusal a human deliberately wants to overrule.
59
+ # Existing operator-configured override. This hook sees tool payloads, not the
60
+ # conversation; the environment variable is not proof of who approved an edit.
63
61
  if [ -n "${LISA_ALLOW_INSTRUCTION_FILE_WRITE:-}" ]; then
64
62
  exit 0
65
63
  fi
@@ -129,34 +127,27 @@ refuse() {
129
127
  cat >&2 <<EOF
130
128
  BLOCKED: refusing to write \`$target\`.
131
129
 
132
- WHY: this is a session-instruction file, not a place to record what you just
133
- learned. Every line in it is loaded into the context of every agent, in every
134
- future session, in this project, forever. It is human-curated on purpose. An
135
- agent appending its own findings is how these files grow into hundreds of lines
136
- of stale, ticket-specific trivia that every later session pays for and half of
137
- which was only ever true once.
138
-
139
- WHERE IT GOES INSTEAD — take the first one that fits:
140
-
141
- 1. Every agent genuinely needs this in every session, and only in this project.
142
- That is a project rule — but do not write it yourself. Capture it with
143
- \`/lisa:persist-learning\` so it lands in the learnings ledger with provenance
144
- and a confidence score. The gardener (\`/lisa:learnings:audit\`) then proposes
145
- promotion into the host-rules directory \`.agents/rules/\` as a human-gated ticket.
146
-
147
- 2. It changes how an existing skill should behave. Edit that skill's SKILL.md.
148
- Knowledge belongs next to the procedure it modifies, not in a global preamble.
149
-
150
- 3. It is true beyond this project. Propose it upstream to Lisa via
151
- \`/lisa:cross-pollinate\`, or open an issue on CodySwannGT/lisa. A local copy of
152
- a general rule silently drifts the moment upstream changes.
153
-
154
- 4. None of the above — it is background someone may want to look up, not a
155
- standing instruction. Write it into the project documentation (\`wiki/\` or
156
- \`docs/\`).
157
-
158
- If a human explicitly asked for this edit, they can re-run with
159
- \`LISA_ALLOW_INSTRUCTION_FILE_WRITE=1\` set, which bypasses this guard.
130
+ WHY: this session-instruction file is loaded into future agent sessions.
131
+ Appending incidental findings makes every later session carry those notes.
132
+ This hook checks write patterns; it cannot read or authenticate conversation approval.
133
+
134
+ If an operator already requested a standing-rule edit, that authorization is
135
+ enough for the requested change. Use the relevant topic file in \`.agents/rules/\`
136
+ when no other destination was specified. All six supported agents read that
137
+ directory through the existing \`AGENTS.md\` pointer. Edit it directly; do not
138
+ require learning capture, another ticket, or repeated approval for the same ruling.
139
+
140
+ If the operator explicitly named this guarded file, preserve that target and
141
+ use the runtime's authorized edit path, or report this remaining restriction.
142
+ Do not silently move the edit, switch tools to evade this refusal, or set an
143
+ override yourself. The existing operator-configured
144
+ \`LISA_ALLOW_INSTRUCTION_FILE_WRITE=1\` escape hatch is not proof of consent.
145
+
146
+ For an agent's own finding, first decide whether it is worth maintaining.
147
+ Decline one-off trivia and unnecessary rules. Durable project knowledge can
148
+ use \`/lisa:persist-learning\`; procedural knowledge belongs with its SKILL.md;
149
+ background belongs in existing project documentation. Use
150
+ \`/lisa:cross-pollinate\` only for a material, reusable upstream improvement.
160
151
  EOF
161
152
  exit 2
162
153
  }
@@ -291,7 +291,7 @@ fi
291
291
  Host-authored operating rules live in `.agents/rules/` — **fixed, not configurable**. One directory, every agent.
292
292
 
293
293
  - **Not a native auto-load tree.** `.claude/rules`, `.cursor/rules`, and `.github/instructions` are; `.agents/rules` deliberately is not. Every agent reaches it through the single Lisa-managed pointer block in `AGENTS.md` (Claude via the `@AGENTS.md` import in `CLAUDE.md`), so no agent loads host rules twice.
294
- - **Host-owned.** Lisa never writes rule bodies into `.agents/rules/`, and never edits or deletes a file there. Lisa's own rules originate in its plugins and arrive by their own route.
294
+ - **Host-owned.** Lisa's installer never overwrites host rule bodies. Agents may make specific operator-requested edits directly, without recapturing the approved decision as a learning or promotion ticket; see **Operator-directed standing rules** in `project-learnings.md`. Lisa's own rules arrive through its plugins.
295
295
  - **Not the learnings ledger.** `.agents/rules` is reserved in the auto-loaded-tree blocklist, so a `learnings.file` override can never resolve inside it.
296
296
  - **Transition.** A project that still has the retired `.claude/rules/PROJECT_RULES.md` keeps it, untouched and authoritative. The pointer block names it so agents whose runtime does not auto-load `.claude/rules/` still find it. Moving that content is a human-gated decision, never an automated rewrite.
297
297
 
@@ -86,10 +86,35 @@ collide.
86
86
  - The **build-intake flows** advance `last_confirmed` at claim time
87
87
  (`confirmLearningEntry`, below).
88
88
 
89
- Promotion to a higher rung (skill, eager rule, executable control, upstream
90
- ticket) is never a writer here — it is the gardener's job, gated by a human
89
+ Automated promotion of a captured learning to a higher rung (skill, eager rule,
90
+ executable control, upstream ticket) is the gardener's job, gated by a human
91
91
  flipping a tracker ticket to `status:ready`.
92
92
 
93
+ ## Operator-directed standing rules
94
+
95
+ An operator's instruction to add, revise, or remove a standing rule is already
96
+ authorization for that specific edit. It is not a new machine-captured learning.
97
+ Make the requested change directly, preserving unrelated content; do not require
98
+ learning capture, a promotion ticket, or repeated approval for the same decision.
99
+ "Human-authored" describes who controls the rule, not who types the approved edit.
100
+
101
+ Use the existing topic file under `.agents/rules/`, or create a short one there,
102
+ when the operator has not specified another destination. The `AGENTS.md` host-rules
103
+ pointer reaches Claude Code, Codex, Cursor, OpenCode, Antigravity, and Copilot.
104
+ These shared rules are not a Claude-only surface, and they do not need to be
105
+ copied into every agent's startup file.
106
+
107
+ If the operator explicitly named a guarded startup file, do not substitute a
108
+ different destination or switch tools to evade a refusal. Use the runtime's
109
+ authorized edit path, or report the specific remaining runtime restriction.
110
+ The existing instruction-file override is an operator-configured escape hatch,
111
+ not proof of human approval; agents must not set it to work around a refusal.
112
+ No new approval token is needed for ordinary authorized edits to shared host rules.
113
+
114
+ This does not authorize agents to promote their own incidental findings. Decline
115
+ one-off notes and unnecessary rules; use the existing learning flow only for
116
+ durable knowledge worth maintaining.
117
+
93
118
  ## Claim-time confirmation (`last_confirmed`)
94
119
 
95
120
  `last_confirmed` is advanced at claim time by the build-intake flows (step
@@ -116,7 +141,7 @@ warning, apply no entry, and do not block unrelated work.
116
141
  Precedence:
117
142
 
118
143
  1. System, developer, user, and repo instructions still outrank learnings.
119
- 2. Committed host rules (`.agents/rules/`) remain durable human-authored
144
+ 2. Committed host rules (`.agents/rules/`) remain durable, operator-controlled
120
145
  guidance.
121
146
  3. Project learnings add recent operational knowledge, but never rewrite or
122
147
  append to host rules.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "4.60.8",
3
+ "version": "4.60.10",
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": "4.60.8",
3
+ "version": "4.60.10",
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": "4.60.8",
3
+ "version": "4.60.10",
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": "4.60.8",
3
+ "version": "4.60.10",
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": "4.60.8",
3
+ "version": "4.60.10",
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": "4.60.8",
3
+ "version": "4.60.10",
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": "4.60.8",
3
+ "version": "4.60.10",
4
4
  "description": "Harper/Fabric-specific Lisa 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": "4.60.8",
3
+ "version": "4.60.10",
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": "4.60.8",
3
+ "version": "4.60.10",
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": "4.60.8",
3
+ "version": "4.60.10",
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-nestjs",
3
- "version": "4.60.8",
3
+ "version": "4.60.10",
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": "4.60.8",
3
+ "version": "4.60.10",
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": "4.60.8",
3
+ "version": "4.60.10",
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": "4.60.8",
3
+ "version": "4.60.10",
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": "4.60.8",
3
+ "version": "4.60.10",
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": "4.60.8",
3
+ "version": "4.60.10",
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": "4.60.8",
3
+ "version": "4.60.10",
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": "4.60.8",
3
+ "version": "4.60.10",
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"