diff --git a/ask-hermes/SKILL.md b/ask-hermes/SKILL.md index 79ced6a..5a9a049 100644 --- a/ask-hermes/SKILL.md +++ b/ask-hermes/SKILL.md @@ -80,7 +80,10 @@ hermes -p general chat --resume -q "" -Q --max-tur ## Session Persistence -**HARD RULE: Always --resume the prior session for follow-up asks.** The session_id is captured from output line 1 of the first ask. Every subsequent ask in the same line of work MUST use `--resume `, not start a fresh session. Starting fresh discards the peer's context, wastes tokens re-establishing state, and breaks multi-turn workflows. If you don't have the session_id, you failed to capture it — that's a separate failure. The session_id lives in conversation context; hold it there. +**HARD RULE: Same topic = resume. New topic = new session.** + +- **Same topic / same line of work:** Always `--resume `. The session_id is captured from output line 1 of the first ask. Every subsequent ask in the same line of work MUST use `--resume `, not start a fresh session. Starting fresh discards the peer's context, wastes tokens re-establishing state, and breaks multi-turn workflows. If you don't have the session_id, you failed to capture it — that's a separate failure. +- **New topic / new line of work:** Start a fresh session. Do NOT resume an unrelated session — the peer's context is polluted with the old topic and will confuse it. The session_id lives in conversation context. No state file. If the LXC crashes, we both crash — next session starts fresh. @@ -176,6 +179,28 @@ When the user says "ask hermes to fix X, then YOU validate," follow this exact s 8. **Don't silently paraphrase.** Relay the peer's actual response. If long, chunk it. Call out unverified claims. 10. **Peers can overstate findings.** A peer may correctly identify real gaps AND incorrectly flag things that aren't actually broken. In this session, the peer correctly identified the tool_executor.py ThreadPoolExecutor as the root cause of the Ctrl+C hang, but also flagged cli.py:9452 (account-usage fetch) as a second culprit — that one uses a `with` context manager that properly joins, so it's not a leak. Always verify each claim independently; don't assume all of a peer's findings are correct just because some are. +## Pre-Dispatch Reasoning Check (MANDATORY) + +Before EVERY `ask hermes` dispatch, verify the general profile's `reasoning_effort` is set to the maximum the model supports. This is a hard gate — do not dispatch without checking. + +``` +# 1. Read the general profile's current model and reasoning_effort +grep -E "default:|reasoning_effort:" ~/.hermes/profiles/general/config.yaml | head -5 + +# 2. If reasoning_effort is NOT at max for the model: +# - deepseek-v4-pro:cloud → set to 'max' (xhigh rejected) +# - glm-5.2:cloud → set to 'max' (xhigh rejected) +# - minimax-m3:cloud → set to 'xhigh' (supports it) +# - If unsure what the model supports → set to 'max' (safe default) + +# 3. Apply the fix if needed: +hermes -p general config set agent.reasoning_effort xhigh +# OR for models that reject xhigh: +hermes -p general config set agent.reasoning_effort max +``` + +**Rule:** Always dispatch with the highest reasoning effort the model actually supports. Never silently downgrade. If the model changed and you don't know what it supports, test with `max` first (universally safer than `xhigh`). + ## Verification Checklist - [x] First `ask hermes ` returns peer's response showing real tool use diff --git a/deep-research/SKILL.md b/deep-research/SKILL.md index b016bec..f19cd47 100644 --- a/deep-research/SKILL.md +++ b/deep-research/SKILL.md @@ -1,7 +1,7 @@ --- name: deep-research description: Dispatch exhaustive deep web research to the research profile. Triggered by "deep research", "ask web", or "research this". The research profile runs with the deep-web-research skill loaded — five-move flow, external ledger, mechanical saturation, disconfirmation, condensation from disk. -version: 1.0.0 +version: 1.0.1 author: Hermes Agent license: MIT platforms: [linux] @@ -70,7 +70,10 @@ The research agent self-reports are not verified fact. If it claims a file write ## Session Persistence -Capture session_id from output line 1. Every follow-up in the same line of research MUST use `--resume `. Starting fresh discards the research context and wastes turns. +**HARD RULE: Same topic = resume. New topic = new session.** + +- **Same topic / same line of research:** Always `--resume `. Capture session_id from output line 1. Every follow-up in the same line of research MUST use `--resume `. Starting fresh discards the research context and wastes turns. +- **New topic / new line of research:** Start a fresh session. Do NOT resume an unrelated session — the research context is polluted with the old topic and will produce confused results. ## Common Pitfalls @@ -79,4 +82,59 @@ Capture session_id from output line 1. Every follow-up in the same line of resea 3. **--yolo is required.** The research agent runs headless. Without it, approval prompts fail closed. 4. **200 turns is the ceiling, not the target.** The research agent should condense well before 200. Hitting the ceiling means it failed to condense. 5. **Don't re-condense.** The research agent already produced a condensed answer. Relay it, don't summarize it further. -6. **Don't do the research yourself.** If the user triggers deep research, dispatch it. Don't run a few searches and call it done. +6. **Don't do the research yourself.** If the user triggers deep research, dispatch it. Don't run a few searches and call it done. This is the #1 failure mode: the agent runs 2-3 `mcp_searxng_searxng_web_search` calls, gets empty results, and gives up. That's not deep research — that's a casual lookup. If you catch yourself typing `mcp_searxng_searxng_web_search` for a deep research request, STOP. You're doing it wrong. Dispatch to the research profile. +7. **The methodology skill lives on the research profile.** `deep-web-research` is at `~/.hermes/profiles/research/skills/research/deep-web-research/SKILL.md`. It does NOT exist on the general profile. Don't search for it here — it won't be found. The general profile only has this delegation skill. +8. **`reasoning_effort: xhigh` breaks `glm-5.2:cloud`.** The research profile's default model (`glm-5.2:cloud` via `custom:ollama`) rejects `xhigh` — it only accepts `high`, `medium`, `low`, `max`, or `none`. If the dispatch fails with "HTTP 400: invalid reasoning value: 'xhigh'", check `~/.hermes/profiles/research/config.yaml` → `agent.reasoning_effort`. Set it to `max` (the highest level the model actually supports). Do NOT downgrade to `high` without asking the user — they explicitly want maximum reasoning effort. If the model changes to one that supports `xhigh`, revert to `xhigh`. + +## Pre-Dispatch Reasoning Check (MANDATORY) + +Before EVERY deep research dispatch, verify the research profile's reasoning_effort is set to the maximum the model supports. This is a hard gate — do not dispatch without checking. + +``` +# 1. Read the research profile's current model and reasoning_effort +grep -E "default:|reasoning_effort:" ~/.hermes/profiles/research/config.yaml + +# 2. If reasoning_effort is NOT 'max' (or 'xhigh' for models that support it): +# - If model is glm-5.2:cloud → set to 'max' (xhigh rejected) +# - If model is deepseek-v4-pro:cloud → set to 'max' (xhigh rejected) +# - If model is minimax-m3:cloud → set to 'xhigh' (supports it) +# - If unsure what the model supports → set to 'max' (safe default) + +# 3. Apply the fix if needed: +hermes -p research config set agent.reasoning_effort max +# OR for models that support xhigh: +hermes -p research config set agent.reasoning_effort xhigh +``` + +**Rule:** Always dispatch with the highest reasoning effort the model actually supports. Never silently downgrade. If the model changed and you don't know what it supports, test with `max` first (universally safer than `xhigh`). + +## Research → Validate → Fix Pipeline + +When the user wants a research deliverable validated and corrected, use this three-stage pipeline: + +``` +Stage 1: Deep research → produces .md +Stage 2: Ask-hermes validation → produces _validation.md +Stage 3: Deep research fix pass → updates .md with corrections +``` + +**Stage 2 prompt template** (dispatch to `ask-hermes`): +``` +Validate the plan at . Read the full file first. +CRITICAL: Use mcp_searxng_searxng_web_search for EVERY claim and cite the source URL. +Validate: model versions, license claims, VRAM claims, tool availability, new tools since plan was written, hardware benchmarks. +For each finding: CLAIM → VERIFIED/CONTRADICTED/UPDATED → source URL → recommended fix. +Save to _validation.md. +``` + +**Stage 3 prompt template** (resume the research session): +``` +Read the validation report at _validation.md. Read the current plan at .md. +Apply ALL fixes from the validation report. Keep all existing content. Make targeted edits only. Do NOT rewrite the whole plan. +``` + +**Key rules:** +- Stage 2 and 3 can run in parallel with other work (both are background processes). +- Stage 3 MUST use `--resume ` from Stage 1 — same research session, same context. +- The validation agent (Stage 2) is a fresh `ask-hermes` session each time — no resume needed. +- If Stage 2 finds CRITICAL omissions, Stage 3 must address them before the plan is considered complete.