# pablothethinker/hermespace — AlpLab Radar Static Code Audit

- Ring: `trial`
- Category: `agents`
- Overall score: `3.5/5`
- Implementation check: `verified`
- Maturity: `early`
- Audited commit: `8e36c51aff37` (read-only; nothing from the repository was executed)
- Reviewed at: 2026-12-02T05:51:29Z
- Repository: https://github.com/pablothethinker/hermespace
- Radar entry: https://radar.alplab.co/#repo/pablothethinker/hermespace
- License: `MIT`
- CI workflows: `.github/workflows`
- Tags: `hermes-agent`, `agent-memory`, `context-engine`, `plugin`, `workspace`, `global-workspace`

## Summary

A Hermes Agent companion plugin (Python + CLI + desktop/HTTP surface) that implements a bounded session workspace — desk/FOA, dual-decode turns, persistent JSONL world archive with epochs, autonomy grid, and a local operator viewport — wired into Hermes via 14 native lifecycle hooks.

## Implementation Check

README claims map to working code: hook table -> src/hermespace/hermes_bridge.py (on_pre_llm_call/on_session_finalize), World Model -> src/hermespace/world.py (WorldModel.evolve/_compute_epoch), CLI table -> src/hermespace/cli.py, plugin registration -> src/hermespace/plugin.py register(); only the optional Cube/Insight organs degrade to standalone fallbacks via feature-detection in src/hermespace/cube_module.py, exactly as documented.

## When to Use

Use with a Hermes Agent v0.20+ host when you want bounded context injection, per-session desks, dual user/model channel separation, and a Tailscale-reachable operator dashboard. Not useful outside the Hermes ecosystem, and the GWT/consciousness framing is harness metaphor, not model introspection.

## Sub-scores

| Dimension | Score |
|---|---|
| quality | 3.5/5 |
| usability | 3.5/5 |
| reliability | 3.0/5 |
| security | 3.5/5 |
| integration | 4.0/5 |

## Code Evidence

src/hermespace/hermes_bridge.py on_pre_llm_call builds one user-message inject bounded by _bounded_context (<9k) with fluent-ack skip via context_surgery.is_fluent_ack and fail-open harvest threads (_run_fail_open); src/hermespace/access/hub.py AccessHub implements hold/reason_step/sync_from_desk with HUB_CAP=25, FOCUS_CAP=4 and atomic saves; src/hermespace/world.py WorldArchive is an append-only JSONL with epoch thresholds (_EPOCH_THRESHOLDS) and a five-stage evolve() cycle; src/hermespace/workflow.py Workflow.run runs GATE->desk->neural->fabric->cube_beat->OEW->inject and records every turn into HermespaceMemory SQLite (memory_db.py, parameterized queries); src/hermespace/plugin.py register() wires 14 hooks with fail-open for optional ones and registers /hermespace slash + CLI commands; src/hermespace/grid/boundary.py check_path default-denies external writes and _is_secretish blocks .env/.ssh/.pem even with autonomy on; src/hermespace/grid/view_server.py serve() defaults to loopback, allows Tailscale CGNAT without --open, requires --allow-remote for 0.0.0.0, optional HERMESPACE_VIEW_TOKEN; src/hermespace/local_model.py OllamaEmbedBackend/HashEmbedBackend gives real embedding backend with deterministic fallback; tests/test_plugin_contract.py test_registration_and_native_lifecycle drives the full hook lifecycle, asserts inject <=2800 chars and that tool args/results never persist; .github/workflows/ci.yml runs unittest discover + scripts/verify_hermes_integration.py + scripts/smoke_test.sh + security_audit.sh on Python 3.10/3.12/3.13; desktop_plugin/hermespace/plugin.js registers pane/page/nav/status-chip surfaces against http://127.0.0.1:8764.

## Issues Found

src/hermespace/world.py _analyze_relationships: avg_affinity uses sum() which returns 0 (never None) so the `is not None` guard is dead and the divisor counts unparsed history entries, deflating relationship affinity. src/hermespace/grid/view_server.py: token accepted via ?token= query string and compared with plain == (non-constant-time), all responses send Access-Control-Allow-Origin: *, and non-loopback/Tailscale binds run unauthenticated unless HERMESPACE_VIEW_TOKEN is set. src/hermespace/cli.py world subcommands (add-belief, set-trait, leave) never define --agent-id so getattr(args,'agent_id','hermes-agent') always targets the default agent, inconsistent with every other subcommand. src/hermespace/install_kit.py offer_organs runs `pip install git+https://github.com/PabloTheThinker/hermescube.git` (mutable remote ref) when invoked with --yes — supply-chain trust in unaudited companion repos.

## Key Risks

Full value requires a Hermes Agent v0.20+ host; standalone use works but only exercises the library/CLI. Only numpy is a dependency (no lockfiles); CI actions are major-tag pinned, not SHA-pinned. Project is ~3 months old with zero commits in the last 90 days and no releases, despite the 'production' label. Companion repos (hermescube, hermes-insight) are soft-imported and were not audited. Broad `except Exception: pass` blocks throughout hermes_bridge.py/workflow.py create silent failure modes that tests only partially cover. Benchmarks in docs/research/24-comparative-analysis.md measure context assembly, not LLM output quality — the authors acknowledge no LLM-in-loop eval exists. Nothing was executed in this audit; 'tests exist and CI runs them' is not 'tests pass'.

## Reviewed Files

- `README.md`
- `pyproject.toml`
- `plugin.yaml`
- `src/hermespace/__init__.py`
- `hermes_plugin/__init__.py`
- `__init__.py`
- `.github/workflows/ci.yml`
- `SECURITY.md`
- `src/hermespace/workbench.py`
- `src/hermespace/plugin.py`
- `src/hermespace/hermes_bridge.py`
- `src/hermespace/world.py`
- `src/hermespace/workflow.py`
- `src/hermespace/access/engine.py`
- `src/hermespace/access/hub.py`
- `src/hermespace/access/env.py`
- `src/hermespace/cli.py`
- `src/hermespace/gate.py`
- `src/hermespace/context_surgery.py`
- `src/hermespace/cube_module.py`
- `src/hermespace/local_model.py`
- `src/hermespace/paths.py`
- `src/hermespace/atomic.py`
- `src/hermespace/memory_db.py`
- `src/hermespace/install_kit.py`
- `src/hermespace/grid/view_server.py`
- `src/hermespace/grid/boundary.py`
- `src/hermespace/grid/secure_store.py`
- `desktop_plugin/hermespace/plugin.js`
- `skills/hermespace/SKILL.md`
- `scripts/install_hermes.sh`
- `scripts/smoke_test.sh`
- `scripts/security_audit.sh`
- `scripts/verify_hermes_integration.py`
- `tests/test_world.py`
- `tests/test_access_hub.py`
- `tests/test_plugin_contract.py`
- `tests/test_tailscale_bind.py`
- `experiments/comparative_benchmark.py`
- `benchmarks/hermespace-benchmark/README.md`
