feat(wiki): draft wiki articles with a Sonnet subagent, not Ollama
Seed/full synthesis in /wiki-compile (and the /save Phase 3 recompile) now delegates the draft to a Sonnet subagent (model: "sonnet") instead of Ollama qwen3 — better prose quality, no local-Ollama dependency. Refresh mode unchanged (surgical, no model). Main agent still reviews the draft before writing (billing/IPs/vault-paths; Patterns/History preserved). Softfail now keys on subagent unavailability -> surgical refresh. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -61,7 +61,7 @@ When in doubt, include MORE detail — future sessions search these logs to reco
|
||||
|
||||
## Phase 3 — Wiki Compile (before sync)
|
||||
|
||||
Fold what you just worked on into the wiki article so it ships in the **same commit** as the session log. This runs before sync and **re-synthesizes** the article (Ollama), so new findings/patterns actually land — not just dynamic fields.
|
||||
Fold what you just worked on into the wiki article so it ships in the **same commit** as the session log. This runs before sync and **re-synthesizes** the article (via a **Sonnet subagent** — `model: "sonnet"`, not Ollama), so new findings/patterns actually land — not just dynamic fields.
|
||||
|
||||
1. Derive the slug from the session-log path written in Phase 2:
|
||||
- `clients/<slug>/session-logs/...` → client `<slug>`
|
||||
@@ -69,12 +69,12 @@ Fold what you just worked on into the wiki article so it ships in the **same com
|
||||
- Root `session-logs/...` → **skip this phase entirely** (no single article is implied)
|
||||
|
||||
2. Run the `/wiki-compile` generation for that target, writing the article + updating `wiki/index.md`, but **stop before its commit/push step** — `sync.sh` (Phase 4) commits everything together in one commit:
|
||||
- **Article exists** → **full recompile** (`/wiki-compile <type>:<slug> --full`): Ollama re-synthesis that **preserves Patterns and History verbatim** (unless the new session log shows an item resolved) and refreshes everything else, absorbing this session's work. Clients also refresh live Syncro fields (hours, tickets).
|
||||
- **Article exists** → **full recompile** (`/wiki-compile <type>:<slug> --full`): the Sonnet subagent re-synthesizes, **preserving Patterns and History verbatim** (unless the new session log shows an item resolved) and refreshing everything else, absorbing this session's work. Clients also refresh live Syncro fields (hours, tickets).
|
||||
- **No article yet** → **seed** (full synthesis) to create it.
|
||||
- Claude reviews the synthesized article before writing — verify IPs/paths; never invent vault paths (use `(verify)`); keep billing fields Syncro-authoritative.
|
||||
- The main agent reviews the subagent's draft before writing — verify IPs/paths; never invent vault paths (use `(verify)`); keep billing fields Syncro-authoritative.
|
||||
|
||||
3. **Softfail (critical) — a wiki failure must NEVER block the save:**
|
||||
- If **Ollama is unreachable**, fall back to a surgical **refresh** (bump `last_compiled` + `sources`; refresh client Syncro fields) so the article still records the session, and emit `[WARN] Ollama down — wiki refreshed, not recompiled; run /wiki-compile --full later`.
|
||||
- If the synthesis subagent fails or is unavailable, fall back to a surgical **refresh** (bump `last_compiled` + `sources`; refresh client Syncro fields) so the article still records the session, and emit `[WARN] wiki refreshed, not recompiled; run /wiki-compile --full later`.
|
||||
- Any other failure: log it and continue to sync.
|
||||
|
||||
The article + `wiki/index.md` are picked up by `sync.sh`'s `git add -A` and committed alongside the session log.
|
||||
|
||||
Reference in New Issue
Block a user