diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md index 118cf02..b66fb52 100644 --- a/.claude/CLAUDE.md +++ b/.claude/CLAUDE.md @@ -241,7 +241,7 @@ Vault structure: `infrastructure/`, `clients/`, `services/`, `projects/`, `msp-t ## Local AI (Ollama) -Tier 0 — **Ollama is the documentation engine.** Route all prose generation through it: session log narratives, commit messages, ticket comments, client notes, code docs. Claude reviews output, owns credentials/facts/execution. +Tier 0 — **Ollama is the documentation engine.** Route prose generation through it: commit messages, ticket comments, client notes, code docs. Claude reviews output, owns credentials/facts/execution. Session log narratives are written directly by Claude (Ollama too slow for /save). - **DESKTOP-0O8A1RL:** `http://localhost:11434` - **Other machines:** `http://100.92.127.64:11434` (Tailscale required) diff --git a/.claude/commands/save.md b/.claude/commands/save.md index 16b2c86..a9ebc69 100644 --- a/.claude/commands/save.md +++ b/.claude/commands/save.md @@ -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: - - -Write these three sections only: - -## Session Summary -<3-5 paragraph narrative: what was accomplished, in what order, why> - -## Key Decisions - - -## Problems Encountered - -``` - -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. --- diff --git a/.claude/memory/MEMORY.md b/.claude/memory/MEMORY.md index e3dd35f..e5bb31e 100644 --- a/.claude/memory/MEMORY.md +++ b/.claude/memory/MEMORY.md @@ -26,6 +26,7 @@ - [Bypass Permissions Setting](feedback_bypass_permissions_setting.md) - Set permissions.defaultMode to bypassPermissions in settings.json on all machines - [365 Remediation Tool](feedback_365_remediation_tool.md) - Always means Graph API app fabb3421, not CIPP - [Ollama Tier-0 Routing](feedback_ollama_tier0_routing.md) - Route drafts/summaries/classifications through Ollama (qwen3:14b). Mike designed ClaudeTools this way — not optional. +- [/save writes narrative directly](feedback_save_no_ollama.md) — No Ollama for /save; write all sections inline — too slow - [Syncro Emergency Billing](feedback_syncro_emergency_billing.md) — Emergency = 1.5× multiplier, not additive. Branch by `customer.prepay_hours`: no-prepaid → `26184` at actual hrs; prepaid → `26118` at hrs×1.5. Never stack. Always set `price_retail`. - [Identity precedence](feedback_identity_precedence.md) — Trust `.claude/identity.json` over the system-reminder `userEmail` hint when they disagree (shared-login machines). - [1Password — always use service token](feedback_1password_service_token.md) — Source OP_SERVICE_ACCOUNT_TOKEN from SOPS for every `op` call. Desktop-app integration prompts are unacceptable in agent flows. diff --git a/.claude/memory/feedback_save_no_ollama.md b/.claude/memory/feedback_save_no_ollama.md new file mode 100644 index 0000000..af36033 --- /dev/null +++ b/.claude/memory/feedback_save_no_ollama.md @@ -0,0 +1,11 @@ +--- +name: /save writes narrative directly — no Ollama +description: Claude writes all /save session log sections directly; Ollama removed from save workflow +type: feedback +--- + +Do NOT use Ollama for /save session log narrative sections (Session Summary, Key Decisions, Problems Encountered). Write them directly. Ollama takes too long. + +**Why:** User explicitly removed Ollama from the /save documentation role on 2026-05-12 — the Ollama round-trip added unacceptable latency to every /save. + +**How to apply:** On every /save invocation, write all narrative sections yourself inline. Do not curl Ollama, do not write a prompt file, do not spawn a py subprocess. Ollama is still available for other prose tasks (commit messages, ticket comments, client notes) but not /save.