sync: auto-sync from DESKTOP-0O8A1RL at 2026-05-12 05:50:33

Author: Mike Swanson
Machine: DESKTOP-0O8A1RL
Timestamp: 2026-05-12 05:50:33
This commit is contained in:
2026-05-12 05:50:33 -07:00
parent 307e9cfc9a
commit b6265cc930
4 changed files with 19 additions and 56 deletions

View File

@@ -6,68 +6,19 @@ Save a comprehensive session log to the appropriate `session-logs/` directory, t
## Phase 1 — Generate the narrative
Ollama drafts the prose sections (qwen3:14b at `localhost:11434` or Tailscale `100.92.127.64:11434`). Claude owns the factual sections — never delegate facts to Ollama.
Claude writes all sections directly. Be concise, factual, technical. No filler phrases. Past tense. No emojis.
| Author | Sections |
|---|---|
| Ollama | Session Summary, Key Decisions, Problems Encountered |
| Claude (verbatim) | User block, Configuration Changes, Credentials, Infrastructure, Commands & Outputs, Pending Tasks, References |
| Claude | All sections |
### Resolve Ollama endpoint
### Narrative sections (Claude writes directly)
```bash
if curl -s -m 2 http://localhost:11434/api/tags >/dev/null 2>&1; then
OLLAMA="http://localhost:11434"
elif curl -s -m 3 http://100.92.127.64:11434/api/tags >/dev/null 2>&1; then
OLLAMA="http://100.92.127.64:11434"
else
OLLAMA="" # Claude drafts narrative directly
fi
```
**Session Summary** — 3-5 paragraphs: what was accomplished, in what order, why.
### Draft via Ollama
**Key Decisions** — bullet list of non-obvious decisions and their rationale.
**Always delete the prompt file first** — prior `/save` runs leave a stale `save_narrative_prompt.txt` in `%LOCALAPPDATA%/Temp`, and the Write tool refuses to overwrite without a Read. The silent fallback is `py` reading the leftover file and Ollama producing a perfectly-coherent narrative about *the previous session's work*. Documented in `.claude/memory/feedback_tmp_path_windows.md`.
```bash
PROMPT_FILE="$LOCALAPPDATA/Temp/save_narrative_prompt.txt"
rm -f "$PROMPT_FILE" # critical — see above
# ... then Write the prompt with this session's WORK DONE bullets ...
```
Prompt template:
```
You are a technical session log writer for an MSP (Arizona Computer Guru). Write three sections in markdown. Be concise, factual, technical. No filler phrases. Use past tense. No emojis.
WORK DONE THIS SESSION:
<paste bullet list of what happened>
Write these three sections only:
## Session Summary
<3-5 paragraph narrative: what was accomplished, in what order, why>
## Key Decisions
<bullet list of non-obvious decisions and their rationale>
## Problems Encountered
<bullet list of problems hit and how each was resolved; omit if none>
```
Run via Python (PyJWT-free path):
```bash
py -c "
import urllib.request, json
prompt = open('$PROMPT_FILE', encoding='utf-8').read()
body = json.dumps({'model':'qwen3:14b','messages':[{'role':'user','content':prompt}],'stream':False,'think':False}).encode()
res = json.loads(urllib.request.urlopen(urllib.request.Request('$OLLAMA/api/chat', body), timeout=300).read())
print(res['message']['content'])
"
```
Claude reviews the output before assembling. Common Ollama issues to fix on review: invented compliance/risk language, hallucinated reasoning, off-task content if the prompt file was stale.
**Problems Encountered** — bullet list of problems hit and how each was resolved. Omit section if none.
---