shraga 0.1.39 → 0.1.40

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.
@@ -131,9 +131,16 @@ Write to `data/workspace/garden-reports/{YYYY-MM-DD}.md`:
131
131
 
132
132
  The full report is the audit trail. Raw agent reports let you verify the diagnosis. Diff previews let you verify the prescription. Skipped findings let you verify the triage.
133
133
 
134
+ ### Check auto-apply preference
135
+
136
+ Read `data/workspace/preferences/garden.json` (if present). This is the owner's standing instruction and **overrides the default approval gate** — check it before deciding whether to stop and wait.
137
+
138
+ - `{"autoApply": true, ...}` → **Phase 4 applies automatically**, no waiting. Only proposals whose `Risk` is `none` or `low` auto-apply; anything `medium`/`high`, or involving conflicting sources / a judgment call, still goes to DM-and-wait regardless of the flag (per the file's own `note` on what still needs Elya).
139
+ - Missing file, or `autoApply` absent/false → default gate applies: propose, DM, and **STOP** (below).
140
+
134
141
  ### Send Slack DM to owners
135
142
 
136
- Send a DM to each owner (from `<known_contacts>` with Slack IDs) using `post_slack_message`:
143
+ Send a DM to each owner (from `<known_contacts>` with Slack IDs) using `post_slack_message`. Adjust wording based on the auto-apply check above:
137
144
 
138
145
  ```
139
146
  🌱 Knowledge Garden — {date}
@@ -152,17 +159,21 @@ Full audit trail: data/workspace/garden-reports/{date}.md
152
159
  Diff: -{removed summary} +{added summary}
153
160
 
154
161
  Skipped {N} lower-priority findings (see report).
155
- Reply with numbers to approve (e.g. "1,3") or "all".
156
162
  ```
157
163
 
158
- **STOP here. Do not apply changes. Wait for user approval.**
164
+ If autoApply: append `Auto-applying #1, #2 (risk: none/low). Nothing needs your review this run.` — or, if something is held back — `Applied #1 automatically. #2 needs your call (risk: medium / conflicting sources) — reply with the number to approve.`
165
+ If not autoApply: append `Reply with numbers to approve (e.g. "1,3") or "all".` and **STOP here. Do not apply changes. Wait for user approval.**
166
+
167
+ ## Phase 4: Apply
168
+
169
+ **If autoApply (per the check above):** apply every proposed change with `Risk: none` or `Risk: low` immediately, in the same run — no waiting. Hold back anything `medium`/`high` risk and DM as described above.
159
170
 
160
- ## Phase 4: Apply (only when user approves)
171
+ **If not autoApply:** apply only when the user replies with numbers (e.g. "1,3") or "all".
161
172
 
162
- When the user replies with numbers (e.g. "1,3") or "all":
173
+ Either way:
163
174
 
164
175
  1. Load the report from `data/workspace/garden-reports/{date}.md`
165
- 2. Apply only the approved changes using Edit tool
176
+ 2. Apply the approved/qualifying changes using Edit tool
166
177
  3. Commit:
167
178
 
168
179
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shraga",
3
- "version": "0.1.39",
3
+ "version": "0.1.40",
4
4
  "description": "The teammate you delegate coding to — a self-hostable, multi-user AI coding agent web UI (Claude Code, with a pluggable engine seam).",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",