Problem
Three strings in `src/agent_loop.py` instruct the agent to consult the skill registry before every task and to treat extracted skills as proven, authoritative procedures. Together they produce a mandatory pre-task consultation loop that consumes agent rounds on overhead before any user work begins.
String 1 — `manage_skills` tool description (line ~417):
"Use this BEFORE doing domain work — there may already be a procedure (published or draft) that prescribes the correct steps. Drafts written by the teacher loop are authoritative guidance even though they're not yet published."
This instructs the agent to call `manage_skills list` before starting any task. For tasks with a non-empty skill index, the agent then calls `manage_skills view` for each seemingly relevant skill — consuming 2–3 rounds before the actual work begins.
String 2 — matched-skills injection header (lines ~1274-1279):
"Each is a procedure proven to work. Follow them step by step."
Skills are LLM extractions from a 12-message context window — they are approximations, not verified facts. "Proven to work" is a false claim. "Follow them step by step" causes unconditional execution even when the skill mismatches the current task.
String 3 — skill index block header (lines ~1447-1453):
"Procedures the assistant should consult before doing domain work. [...] treat them as authoritative guidance"
Same pattern: mandatory pre-task gate + unconditional deference.
Observed behavior: The agent calls `manage_skills` at the start of nearly every session that has skills present. On tasks with a large skill index, this is 2–4 extra rounds before user work starts.
Proposed fix
`src/agent_loop.py` — 3 string replacements:
Change 1 (line 417): Replace "BEFORE doing domain work" and "authoritative guidance" with conditional language — check the registry when the domain looks familiar, treat published skills as reviewed and drafts as candidates.
Change 2 (lines 1274-1279): Replace "proven to work. Follow them step by step." with "candidate procedures. Evaluate fit — apply if relevant, use own judgment if not."
Change 3 (lines 1447-1453): Replace "consult before doing domain work" and "treat them as authoritative guidance" with "reference procedures for this session. When a task closely matches, apply; evaluate drafts before following."
Tests
New file `tests/test_agent_skill_prompt_language.py` — 6 static source-text assertions:
- "BEFORE doing domain work" not in agent_loop.py source
- "authoritative guidance" not in manage_skills tool description block
- "proven to work" not in agent_loop.py source
- "Follow them step by step" not in agent_loop.py source
- "consult before doing domain work" not in agent_loop.py source
- "treat them as authoritative" not in agent_loop.py source
Upstream relevance
ROADMAP lists "Agent prompt/context bloat" as high priority. Removing the mandatory pre-task consultation loop directly reduces per-request token overhead and agent round consumption. References upstream issue #2750 "Agent prompt token bloat: measure, slim, and modularize".
Branch: `fix/skill-agent-prompt-language` (from `upstream-mirror`)
Upstream target: `pewdiepie-archdaemon/odysseus` dev branch
Problem
Three strings in `src/agent_loop.py` instruct the agent to consult the skill registry before every task and to treat extracted skills as proven, authoritative procedures. Together they produce a mandatory pre-task consultation loop that consumes agent rounds on overhead before any user work begins.
String 1 — `manage_skills` tool description (line ~417):
This instructs the agent to call `manage_skills list` before starting any task. For tasks with a non-empty skill index, the agent then calls `manage_skills view` for each seemingly relevant skill — consuming 2–3 rounds before the actual work begins.
String 2 — matched-skills injection header (lines ~1274-1279):
Skills are LLM extractions from a 12-message context window — they are approximations, not verified facts. "Proven to work" is a false claim. "Follow them step by step" causes unconditional execution even when the skill mismatches the current task.
String 3 — skill index block header (lines ~1447-1453):
Same pattern: mandatory pre-task gate + unconditional deference.
Observed behavior: The agent calls `manage_skills` at the start of nearly every session that has skills present. On tasks with a large skill index, this is 2–4 extra rounds before user work starts.
Proposed fix
`src/agent_loop.py` — 3 string replacements:
Change 1 (line 417): Replace "BEFORE doing domain work" and "authoritative guidance" with conditional language — check the registry when the domain looks familiar, treat published skills as reviewed and drafts as candidates.
Change 2 (lines 1274-1279): Replace "proven to work. Follow them step by step." with "candidate procedures. Evaluate fit — apply if relevant, use own judgment if not."
Change 3 (lines 1447-1453): Replace "consult before doing domain work" and "treat them as authoritative guidance" with "reference procedures for this session. When a task closely matches, apply; evaluate drafts before following."
Tests
New file `tests/test_agent_skill_prompt_language.py` — 6 static source-text assertions:
Upstream relevance
ROADMAP lists "Agent prompt/context bloat" as high priority. Removing the mandatory pre-task consultation loop directly reduces per-request token overhead and agent round consumption. References upstream issue #2750 "Agent prompt token bloat: measure, slim, and modularize".
Branch: `fix/skill-agent-prompt-language` (from `upstream-mirror`)
Upstream target: `pewdiepie-archdaemon/odysseus` dev branch