[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7A7T8J213J9487SGC7464AY":3,"skill-same:01M7A7T8J213J9487SGC7464AY":58},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":35,"commitSha":36,"skillDirectory":37,"forksCount":38,"repositoryHtmlUrl":39,"repositoryHomepageUrl":6,"ownerHtmlUrl":40,"ownerBlogUrl":41,"ownerDescription":42,"updatedAt":43,"install":44,"resources":57},"01M7A7T8J213J9487SGC7464AY","huginn",null,"Use when developing the Huginn coding-agent harness — an opinionated personal coding-agent CLI in Rust for Linux\u002FPi (Ollama \u002F OpenAI-compatible endpoints). Provides architecture, module map, conventions, verify commands, and the enforced-verification gate.","raythurman2386\u002Fhuginn","raythurman2386","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F36676341?v=4","01M7A7T6XTCQ9SGY5PS2HB6992","Raymond Thurman","01M7A7T6YXQRSBEY6C9QP6ETWT",2,"MIT","https:\u002F\u002Fgithub.com\u002Fraythurman2386\u002Fhuginn\u002Fblob\u002Fmaster\u002F.agents\u002Fskills\u002Fhuginn\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: huginn\ndescription: \"Use when developing the Huginn coding-agent harness — an opinionated personal coding-agent CLI in Rust for Linux\u002FPi (Ollama \u002F OpenAI-compatible endpoints). Provides architecture, module map, conventions, verify commands, and the enforced-verification gate.\"\nversion: 1.1.0\nauthor: Hermes Agent\nlicense: MIT\nmetadata:\n  hermes:\n    tags: [rust, cli, agent, ollama, coding-agent, huginn]\n    related_skills: []\n---\n\n# Huginn — Development Skill\n\nHuginn is an opinionated, personal coding-agent harness written in Rust for\nLinux and Raspberry Pi. It runs a streaming agent loop against a local (or\ncloud) Ollama \u002F OpenAI-compatible `\u002Fv1\u002Fchat\u002Fcompletions` endpoint, with tools,\nplan mode, context compaction, and parallel sub-agents. This skill gives you\nthe full context to work on it correctly.\n\n## When to Use\n\n- Implementing or fixing issues in the huginn repo\n- Adding or modifying tools in `crates\u002Fhuginn-tools\u002F` or confinement in `crates\u002Fhuginn-sandbox\u002F`\n- Changing the agent loop, compaction, or context management\n- Modifying the TUI, session persistence, or CLI\n- Reviewing PRs to the repo\n\nDon't use for: porting the Ravenwood palette to other apps — use the\n`ravenwood-theme` porting skill instead.\n\n## Architecture\n\n```\nCLI (src\u002Fmain.rs)\n  └─ Settings (huginn-config) ── named providers, context-window inference\n  └─ Agent (huginn-agent)\n       ├─ system prompt (stable instructions + mode) and a following setup message\n       ├─ streaming loop ── POST \u002Fv1\u002Fchat\u002Fcompletions (Ollama \u002F OpenRouter \u002F …)\n       ├─ compaction (huginn-agent context) ── estimate tokens, summarize middle\n       ├─ tool dispatch (huginn-tools) ── mutators serial; others spawn_blocking\n       └─ events (mpsc) ── TextDelta, ToolStart\u002FEnd, Iteration, Compacted,\n                           VerifyRequired, AskUser, PlanProgress, Done, Error\n  └─ TUI (huginn-tui)  ── ratatui event loop, drains agent events\n  └─ run_parallel ── N independent Agent tasks on git worktrees\n```\n\nOne binary, `huginn`. Dependencies point only downward. Do not add a crate. `delegate_task` runs in `huginn-agent` (`tools_exec.rs`), not in `huginn-tools`.\n\n### Module Layout\n\n| Crate | Owns |\n|------|------|\n| `crates\u002Fhuginn-proto` | `ChatMessage`, `ToolCall`, `FunctionCall`, `AgentEvent`, `AgentError` \u002F `ToolError`, plan types, `TodoItem`, `Goal`. Depends on serde, thiserror, tokio, serde_json. |\n| `crates\u002Fhuginn-tokenizer` | Estimator, usage meters, pricing. Depends on proto. |\n| `crates\u002Fhuginn-config` | `Settings`, named providers, onboarding, Grok auth, MCP server specs. Depends on proto. |\n| `crates\u002Fhuginn-persist` | Session JSONL (atomic writes), session-scoped goal\u002Ftodos, memory. Depends on proto, config. |\n| `crates\u002Fhuginn-sandbox` | Path confinement, shell, Landlock, seccomp, rlimits. Depends on proto. `landlock` and `seccompiler` are Linux target-cfg deps of this crate only. |\n| `crates\u002Fhuginn-tools` | Definitions, dispatch, git, patch, documents, validate, web, skills, repomap, plugins, stdio MCP client. Depends on proto, config, persist, sandbox. |\n| `crates\u002Fhuginn-agent` | Streaming loop (`core`, `stream`, `tools_exec`, `loop_control`, `parallel`), compaction (`context.rs`). Depends on proto, tokenizer, config, persist, tools. Re-exports the MCP client and plugin specs the TUI and ACP call. |\n| `crates\u002Fhuginn-tui` | Ratatui UI, markdown, slash commands. Depends on proto, config, persist, agent. ratatui, crossterm, and pulldown-cmark stay here. |\n| `crates\u002Fhuginn-acp` | ACP v1 stdio adapter (`huginn --acp`). Depends on proto, config, persist, agent. |\n| `crates\u002Fhuginn-testutil` | `outer_sandbox_restrictive`, `home_env_lock`. Depends only on libc. |\n| root `huginn` | `src\u002Fmain.rs` (clap), `src\u002Frunner.rs`, `src\u002Fupdate.rs`, and `src\u002Flib.rs` facade re-exports. |\n\nRoot `src\u002F\u003Cmodule>.rs` files other than `main.rs`, `runner.rs`, and `update.rs` are `pub use` facades. Public paths that benches and integration tests use stay: `huginn::agent::ChatMessage`, `huginn::tokenizer`, `huginn::context`, `huginn::repomap`, `huginn::testutil`. Session store: repo → `{workspace}\u002F.huginn\u002Fsessions`, system → `~\u002F.huginn\u002Fsystem\u002Fsessions`. Goal and todos: `.huginn\u002Fsessions\u002F\u003Cid>\u002Fstate\u002F`; legacy `.huginn\u002Fstate\u002F` is read-only.\n\n## Conventions\n\n### Rust\n\n- **Rust 2021 edition.** Target MSRV: 1.97 (pinned in `rust-toolchain.toml`).\n- Keep the binary small and dependency-light. Thin stdio MCP client only\n  (no marketplace, no HTTP\u002FSSE). Agent Plugins `mcp.json` is stdio-only.\n  No telemetry.\n- Every public struct, enum, and fn should have a doc comment.\n- `cargo doc --workspace --no-deps` must build with no warnings.\n- `cargo build --workspace` must build with no warnings.\n- Prefer `anyhow` for error handling in the binary; `thiserror` is available if a crate-level error type is needed.\n- **DO NOT add comments unless asked** — keep code self-documenting.\n\n### File Organization\n\n- The root `src\u002Flib.rs` declares the facade modules. Implementation lives in\n  `crates\u002F\u003Cname>\u002Fsrc`. Benches stay at the repo root and call the facades.\n- Tests live in `#[cfg(test)]` modules next to the code they cover (agent\n  tests under `crates\u002Fhuginn-agent\u002Fsrc\u002Ftests\u002F`), plus black-box tests in `tests\u002F`.\n\n## Build, Lint, Test\n\n```bash\ncargo build                    # debug build, must be warning-free\ncargo build --release          # LTO + strip\ncargo test --workspace         # every member, all offline (no Ollama needed)\ncargo clippy --workspace --all-targets -- -D warnings   # must be zero warnings\ncargo fmt --all --check        # formatting check\ncargo doc --workspace --no-deps # docs must build with no warnings\ncargo bench                    # Criterion benchmarks (tokenizer, context, repomap)\n```\n\nCI runs: `cargo fmt --all --check`, `cargo clippy --workspace --all-targets -- -D warnings`,\n`cargo build --workspace --all-targets`, `cargo test --workspace`, `cargo doc --workspace --no-deps`, and\n`cargo audit`. **All of these must pass before a PR is mergeable.**\n\n## The Enforced-Verify Gate\n\nThe agent has a built-in verification gate (default on, `--no-verify` to\ndisable). When the model edits files in a turn but does **not** call `run_tests`\nbefore finishing, the harness injects a recovery reminder and re-runs the turn\n(capped at 3 attempts). This is the project's core \"verifiable changes\" contract:\n\n- `AgentEvent::VerifyRequired` is emitted when the gate re-runs.\n- The gate is skipped when the workspace has no detectable test runner\n  (`has_test_runner`: `Cargo.toml`; `package.json` **and** `node_modules`;\n  Python only if `pytest` is spawnable).\n- Credit is fail-closed: `run_tests` **or** `run_shell` with\n  `is_verification_command` counts, and only when `parse_exit_code` is `0`\n  (do not use `contains(\"exit=0\")` — `exit=10` must fail).\n- Failed \u002F sandbox-rejected edits must not arm the gate.\n\nWhen implementing a fix, **always run the real verification commands**\n(`cargo test --workspace`, `cargo clippy --workspace --all-targets -- -D warnings`,\n`cargo fmt --all`) — do not rely on the agent's simulated `run_tests` tool.\n\n## Common Pitfalls\n\n1. **Tools and sandbox are separate crates** — definitions and dispatch live\n   in `crates\u002Fhuginn-tools` (`definitions.rs`, `dispatch.rs`). OS confinement\n   (Landlock \u002F seccomp \u002F rlimits) lives in `crates\u002Fhuginn-sandbox`\n   (`confinement.rs`). `landlock` and `seccompiler` stay on that crate.\n   `huginn-tokenizer` does not depend on the sandbox. `delegate_task` stays\n   in `huginn-agent`'s `tools_exec.rs`.\n2. **Tokenizer is a fast estimator, not exact** — it over-estimates tiktoken counts by roughly 10–35% (mean ~28%), biased slightly high so compaction triggers early. It treats non-newline whitespace as free and applies a ~12% structural-overhead factor. Don't \"fix\" it to be exact without a real tokenizer to validate against.\n3. **Compaction invariants** — `messages[0]` is always the system message;\n   tool-call\u002Ftool-result pairs are never split. Don't break these.\n4. **Sandbox** — all file paths are relative to the workspace root and confined\n   to it. `run_shell` blocks dangerous patterns and strips known secret env\n   vars. The blocklist is a denylist (best-effort), not an allowlist (issue #14).\n   Landlock write roots are workspace + explicit extras + `\u002Fdev` — never the\n   process temp dir. `TMPDIR` is pinned under `.huginn\u002Ftmp`.\n5. **Session IDs** — `{iso}-{pid}-{counter}` (issue #10 is fixed). Still\n   don't invent a different scheme without updating `generate_session_id`.\n6. **Repo map is cached** per workspace path until `repomap::invalidate`\n   (called when `repo_map_stale` after a successful file edit). Discovery\n   prefers `git ls-files --exclude-standard`, else an `ignore`-crate walk;\n   both honor `.gitignore` and hard `SKIP_DIRS`. Candidates are path-scored\n   before the extract budget (`MAX_WALK_DEPTH` \u002F `MAX_SOURCE_FILES_SCANNED`).\n   Cache key is the raw `Path`, not canonical — keep `settings.workspace`\n   consistent.\n7. **Session writes are atomic** (`write_atomic` temp+rename) for both\n   `append_message` and `save_all_messages`. Do not reintroduce in-place\n   truncate.\n8. **TUI `Agent::new` is off-thread** — never construct an `Agent` on the\n   event-loop thread. Each turn owns its own `mpsc` pair (`begin_agent_turn`).\n   Interrupt\u002F`\u002Fstop`\u002F`\u002Fnew` must `abort_current_turn` (abort handle **and**\n   drop `event_rx`) so a leftover `Done` cannot join the next handle. Do not\n   share one session-long channel.\n9. **Named providers** — `Provider` bundles endpoint + auth + default model.\n   Resolution: `--provider` > `HUGINN_PROVIDER` > config `provider` > builtin\n   `ollama`. `\u002Fprovider` with no args lists names; unknown names must not\n   silently become ollama. Session summary stores `model` only — resume can\n   pair a stored OpenRouter model with the default Ollama provider.\n10. **Headless plan revise** — after `[r]evise` + approve, execute the\n    *revised* plan and *revised* message list (`run_plan_flow`), not the first\n    proposal.\n11. **Persistent state** — todos\u002Fgoal live under `.huginn\u002Fsessions\u002F\u003Cid>\u002Fstate\u002F`\n    (`crates\u002Fhuginn-persist\u002Fsrc\u002Fstate.rs`); legacy `.huginn\u002Fstate\u002F` is read-only.\n    Not a `static`. `todo_write`\u002F`goal_set` persist; rebuild the system\n    message at the start of every turn *and* after those tools. Nested\n    `delegate_task` is depth-1 (`allow_delegate = false` on the child; no\n    parent goal\u002Ftodo overwrite). `think` is read-only and available in\n    plan\u002Fchat.\n12. **Compaction thrashing** — `Agent.compact_thrash_count` pauses auto-\n    compaction after 3 consecutive no-reduction compactions; retry every 4th\n    iteration so a later prune can resume.\n\n## Verification Checklist\n\n- [ ] `cargo build` succeeds with no warnings\n- [ ] `cargo clippy --workspace --all-targets -- -D warnings` passes (zero warnings)\n- [ ] `cargo fmt --all --check` passes\n- [ ] `cargo test --workspace` passes (all offline)\n- [ ] `cargo doc --workspace --no-deps` builds with no warnings\n- [ ] New public items have doc comments\n- [ ] New logic has unit tests in the module's `#[cfg(test)]` block\n- [ ] No new dependencies unless justified (keep the binary small)\n\n## Related Files\n\n- `README.md` — User-facing documentation, feature list, quick start\n- `ROADMAP.md` — Current state, planned work, tool count\n- `docs\u002Farchitecture.md` — Detailed design walkthrough\n- `docs\u002Ftools.md` — Tool contracts and sandbox rules\n- `docs\u002Ftesting.md` — Test structure, coverage, mutation testing\n- `docs\u002Fcontributing.md` — Build, style, and layout\n","# Huginn — Development Skill\n\nHuginn is an opinionated, personal coding-agent harness written in Rust for\nLinux and Raspberry Pi. It runs a streaming agent loop against a local (or\ncloud) Ollama \u002F OpenAI-compatible `\u002Fv1\u002Fchat\u002Fcompletions` endpoint, with tools,\nplan mode, context compaction, and parallel sub-agents. This skill gives you\nthe full context to work on it correctly.\n\n## When to Use\n\n- Implementing or fixing issues in the huginn repo\n- Adding or modifying tools in `crates\u002Fhuginn-tools\u002F` or confinement in `crates\u002Fhuginn-sandbox\u002F`\n- Changing the agent loop, compaction, or context management\n- Modifying the TUI, session persistence, or CLI\n- Reviewing PRs to the repo\n\nDon't use for: porting the Ravenwood palette to other apps — use the\n`ravenwood-theme` porting skill instead.\n\n## Architecture\n\n```\nCLI (src\u002Fmain.rs)\n  └─ Settings (huginn-config) ── named providers, context-window inference\n  └─ Agent (huginn-agent)\n       ├─ system prompt (stable instructions + mode) and a following setup message\n       ├─ streaming loop ── POST \u002Fv1\u002Fchat\u002Fcompletions (Ollama \u002F OpenRouter \u002F …)\n       ├─ compaction (huginn-agent context) ── estimate tokens, summarize middle\n       ├─ tool dispatch (huginn-tools) ── mutators serial; others spawn_blocking\n       └─ events (mpsc) ── TextDelta, ToolStart\u002FEnd, Iteration, Compacted,\n                           VerifyRequired, AskUser, PlanProgress, Done, Error\n  └─ TUI (huginn-tui)  ── ratatui event loop, drains agent events\n  └─ run_parallel ── N independent Agent tasks on git worktrees\n```\n\nOne binary, `huginn`. Dependencies point only downward. Do not add a crate. `delegate_task` runs in `huginn-agent` (`tools_exec.rs`), not in `huginn-tools`.\n\n### Module Layout\n\n| Crate | Owns |\n|------|------|\n| `crates\u002Fhuginn-proto` | `ChatMessage`, `ToolCall`, `FunctionCall`, `AgentEvent`, `AgentError` \u002F `ToolError`, plan types, `TodoItem`, `Goal`. Depends on serde, thiserror, tokio, serde_json. |\n| `crates\u002Fhuginn-tokenizer` | Estimator, usage meters, pricing. Depends on proto. |\n| `crates\u002Fhuginn-config` | `Settings`, named providers, onboarding, Grok auth, MCP server specs. Depends on proto. |\n| `crates\u002Fhuginn-persist` | Session JSONL (atomic writes), session-scoped goal\u002Ftodos, memory. Depends on proto, config. |\n| `crates\u002Fhuginn-sandbox` | Path confinement, shell, Landlock, seccomp, rlimits. Depends on proto. `landlock` and `seccompiler` are Linux target-cfg deps of this crate only. |\n| `crates\u002Fhuginn-tools` | Definitions, dispatch, git, patch, documents, validate, web, skills, repomap, plugins, stdio MCP client. Depends on proto, config, persist, sandbox. |\n| `crates\u002Fhuginn-agent` | Streaming loop (`core`, `stream`, `tools_exec`, `loop_control`, `parallel`), compaction (`context.rs`). Depends on proto, tokenizer, config, persist, tools. Re-exports the MCP client and plugin specs the TUI and ACP call. |\n| `crates\u002Fhuginn-tui` | Ratatui UI, markdown, slash commands. Depends on proto, config, persist, agent. ratatui, crossterm, and pulldown-cmark stay here. |\n| `crates\u002Fhuginn-acp` | ACP v1 stdio adapter (`huginn --acp`). Depends on proto, config, persist, agent. |\n| `crates\u002Fhuginn-testutil` | `outer_sandbox_restrictive`, `home_env_lock`. Depends only on libc. |\n| root `huginn` | `src\u002Fmain.rs` (clap), `src\u002Frunner.rs`, `src\u002Fupdate.rs`, and `src\u002Flib.rs` facade re-exports. |\n\nRoot `src\u002F\u003Cmodule>.rs` files other than `main.rs`, `runner.rs`, and `update.rs` are `pub use` facades. Public paths that benches and integration tests use stay: `huginn::agent::ChatMessage`, `huginn::tokenizer`, `huginn::context`, `huginn::repomap`, `huginn::testutil`. Session store: repo → `{workspace}\u002F.huginn\u002Fsessions`, system → `~\u002F.huginn\u002Fsystem\u002Fsessions`. Goal and todos: `.huginn\u002Fsessions\u002F\u003Cid>\u002Fstate\u002F`; legacy `.huginn\u002Fstate\u002F` is read-only.\n\n## Conventions\n\n### Rust\n\n- **Rust 2021 edition.** Target MSRV: 1.97 (pinned in `rust-toolchain.toml`).\n- Keep the binary small and dependency-light. Thin stdio MCP client only\n  (no marketplace, no HTTP\u002FSSE). Agent Plugins `mcp.json` is stdio-only.\n  No telemetry.\n- Every public struct, enum, and fn should have a doc comment.\n- `cargo doc --workspace --no-deps` must build with no warnings.\n- `cargo build --workspace` must build with no warnings.\n- Prefer `anyhow` for error handling in the binary; `thiserror` is available if a crate-level error type is needed.\n- **DO NOT add comments unless asked** — keep code self-documenting.\n\n### File Organization\n\n- The root `src\u002Flib.rs` declares the facade modules. Implementation lives in\n  `crates\u002F\u003Cname>\u002Fsrc`. Benches stay at the repo root and call the facades.\n- Tests live in `#[cfg(test)]` modules next to the code they cover (agent\n  tests under `crates\u002Fhuginn-agent\u002Fsrc\u002Ftests\u002F`), plus black-box tests in `tests\u002F`.\n\n## Build, Lint, Test\n\n```bash\ncargo build                    # debug build, must be warning-free\ncargo build --release          # LTO + strip\ncargo test --workspace         # every member, all offline (no Ollama needed)\ncargo clippy --workspace --all-targets -- -D warnings   # must be zero warnings\ncargo fmt --all --check        # formatting check\ncargo doc --workspace --no-deps # docs must build with no warnings\ncargo bench                    # Criterion benchmarks (tokenizer, context, repomap)\n```\n\nCI runs: `cargo fmt --all --check`, `cargo clippy --workspace --all-targets -- -D warnings`,\n`cargo build --workspace --all-targets`, `cargo test --workspace`, `cargo doc --workspace --no-deps`, and\n`cargo audit`. **All of these must pass before a PR is mergeable.**\n\n## The Enforced-Verify Gate\n\nThe agent has a built-in verification gate (default on, `--no-verify` to\ndisable). When the model edits files in a turn but does **not** call `run_tests`\nbefore finishing, the harness injects a recovery reminder and re-runs the turn\n(capped at 3 attempts). This is the project's core \"verifiable changes\" contract:\n\n- `AgentEvent::VerifyRequired` is emitted when the gate re-runs.\n- The gate is skipped when the workspace has no detectable test runner\n  (`has_test_runner`: `Cargo.toml`; `package.json` **and** `node_modules`;\n  Python only if `pytest` is spawnable).\n- Credit is fail-closed: `run_tests` **or** `run_shell` with\n  `is_verification_command` counts, and only when `parse_exit_code` is `0`\n  (do not use `contains(\"exit=0\")` — `exit=10` must fail).\n- Failed \u002F sandbox-rejected edits must not arm the gate.\n\nWhen implementing a fix, **always run the real verification commands**\n(`cargo test --workspace`, `cargo clippy --workspace --all-targets -- -D warnings`,\n`cargo fmt --all`) — do not rely on the agent's simulated `run_tests` tool.\n\n## Common Pitfalls\n\n1. **Tools and sandbox are separate crates** — definitions and dispatch live\n   in `crates\u002Fhuginn-tools` (`definitions.rs`, `dispatch.rs`). OS confinement\n   (Landlock \u002F seccomp \u002F rlimits) lives in `crates\u002Fhuginn-sandbox`\n   (`confinement.rs`). `landlock` and `seccompiler` stay on that crate.\n   `huginn-tokenizer` does not depend on the sandbox. `delegate_task` stays\n   in `huginn-agent`'s `tools_exec.rs`.\n2. **Tokenizer is a fast estimator, not exact** — it over-estimates tiktoken counts by roughly 10–35% (mean ~28%), biased slightly high so compaction triggers early. It treats non-newline whitespace as free and applies a ~12% structural-overhead factor. Don't \"fix\" it to be exact without a real tokenizer to validate against.\n3. **Compaction invariants** — `messages[0]` is always the system message;\n   tool-call\u002Ftool-result pairs are never split. Don't break these.\n4. **Sandbox** — all file paths are relative to the workspace root and confined\n   to it. `run_shell` blocks dangerous patterns and strips known secret env\n   vars. The blocklist is a denylist (best-effort), not an allowlist (issue #14).\n   Landlock write roots are workspace + explicit extras + `\u002Fdev` — never the\n   process temp dir. `TMPDIR` is pinned under `.huginn\u002Ftmp`.\n5. **Session IDs** — `{iso}-{pid}-{counter}` (issue #10 is fixed). Still\n   don't invent a different scheme without updating `generate_session_id`.\n6. **Repo map is cached** per workspace path until `repomap::invalidate`\n   (called when `repo_map_stale` after a successful file edit). Discovery\n   prefers `git ls-files --exclude-standard`, else an `ignore`-crate walk;\n   both honor `.gitignore` and hard `SKIP_DIRS`. Candidates are path-scored\n   before the extract budget (`MAX_WALK_DEPTH` \u002F `MAX_SOURCE_FILES_SCANNED`).\n   Cache key is the raw `Path`, not canonical — keep `settings.workspace`\n   consistent.\n7. **Session writes are atomic** (`write_atomic` temp+rename) for both\n   `append_message` and `save_all_messages`. Do not reintroduce in-place\n   truncate.\n8. **TUI `Agent::new` is off-thread** — never construct an `Agent` on the\n   event-loop thread. Each turn owns its own `mpsc` pair (`begin_agent_turn`).\n   Interrupt\u002F`\u002Fstop`\u002F`\u002Fnew` must `abort_current_turn` (abort handle **and**\n   drop `event_rx`) so a leftover `Done` cannot join the next handle. Do not\n   share one session-long channel.\n9. **Named providers** — `Provider` bundles endpoint + auth + default model.\n   Resolution: `--provider` > `HUGINN_PROVIDER` > config `provider` > builtin\n   `ollama`. `\u002Fprovider` with no args lists names; unknown names must not\n   silently become ollama. Session summary stores `model` only — resume can\n   pair a stored OpenRouter model with the default Ollama provider.\n10. **Headless plan revise** — after `[r]evise` + approve, execute the\n    *revised* plan and *revised* message list (`run_plan_flow`), not the first\n    proposal.\n11. **Persistent state** — todos\u002Fgoal live under `.huginn\u002Fsessions\u002F\u003Cid>\u002Fstate\u002F`\n    (`crates\u002Fhuginn-persist\u002Fsrc\u002Fstate.rs`); legacy `.huginn\u002Fstate\u002F` is read-only.\n    Not a `static`. `todo_write`\u002F`goal_set` persist; rebuild the system\n    message at the start of every turn *and* after those tools. Nested\n    `delegate_task` is depth-1 (`allow_delegate = false` on the child; no\n    parent goal\u002Ftodo overwrite). `think` is read-only and available in\n    plan\u002Fchat.\n12. **Compaction thrashing** — `Agent.compact_thrash_count` pauses auto-\n    compaction after 3 consecutive no-reduction compactions; retry every 4th\n    iteration so a later prune can resume.\n\n## Verification Checklist\n\n- [ ] `cargo build` succeeds with no warnings\n- [ ] `cargo clippy --workspace --all-targets -- -D warnings` passes (zero warnings)\n- [ ] `cargo fmt --all --check` passes\n- [ ] `cargo test --workspace` passes (all offline)\n- [ ] `cargo doc --workspace --no-deps` builds with no warnings\n- [ ] New public items have doc comments\n- [ ] New logic has unit tests in the module's `#[cfg(test)]` block\n- [ ] No new dependencies unless justified (keep the binary small)\n\n## Related Files\n\n- `README.md` — User-facing documentation, feature list, quick start\n- `ROADMAP.md` — Current state, planned work, tool count\n- `docs\u002Farchitecture.md` — Detailed design walkthrough\n- `docs\u002Ftools.md` — Tool contracts and sandbox rules\n- `docs\u002Ftesting.md` — Test structure, coverage, mutation testing\n- `docs\u002Fcontributing.md` — Build, style, and layout\n",{"name":5,"author":24,"license":15,"version":25,"metadata":26,"description":7},"Hermes Agent","1.1.0",{"hermes":27},{"tags":28,"related_skills":34},[29,30,31,32,33,5],"rust","cli","agent","ollama","coding-agent",[],"master","f8d88c600b9891ab03e6714e354b5eb842ac288a",".agents\u002Fskills\u002Fhuginn",0,"https:\u002F\u002Fgithub.com\u002Fraythurman2386\u002Fhuginn","https:\u002F\u002Fgithub.com\u002Fraythurman2386","https:\u002F\u002Fwww.raythurman.dev","🇺🇸 Army Veteran | Full Stack Software Engineer","2026-11-15 00:52:57",{"source":8,"skillName":5,"commands":45,"prompt":55,"zipAvailable":56},[46,49,52],{"tool":47,"command":48},"npx","npx skills add raythurman2386\u002Fhuginn --skill huginn",{"tool":50,"command":51},"bunx","bunx skills add raythurman2386\u002Fhuginn --skill huginn",{"tool":53,"command":54},"pnpm","pnpm dlx skills add raythurman2386\u002Fhuginn --skill huginn","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fraythurman2386\u002Fhuginn\u002Fblob\u002Fmaster\u002F.agents\u002Fskills\u002Fhuginn\u002FSKILL.md",true,[],[59],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M7A7TDJVZZ984MTJAH46ATCX","hello-style","Specifies the exact contents for src\u002Fhello.txt","https:\u002F\u002Fgithub.com\u002Fraythurman2386\u002Fhuginn\u002Fblob\u002Fmaster\u002Fevals\u002Fcases\u002F08_skill_use\u002Frepo\u002F.huginn\u002Fskills\u002Fhello-style\u002FSKILL.md",[],[]]