HermesGuardian - Current Architecture Path
This document reflects the path the repository is actually taking now.
It intentionally supersedes older assumptions about required apps/web,
mandatory cloud services, or chain-first UI data sources when those do not
match the current codebase.
1. Direction
HermesGuardian is being built as a local-first memory defense product.
The order of truth is:
packages/coreowns scoring logicpackages/pluginis the authoritative enforcement boundary- the local dashboard reads the plugin's local data
- chain receipts are supplemental evidence, not the primary source of truth
- cloud services are optional later expansion, not the immediate blocker
This means the product is still useful if every remote service is absent:
- the plugin still blocks malicious writes
- the local dashboard still shows local evidence
- the user still has an audit trail on disk
2. Current Repo Shape
hermes-guardian/
├── apps/
│ └── dashboard/ # Vite React SPA for the local-first dashboard
│
├── packages/
│ ├── core/ # TrustScorer, patterns, semantic signal, judge client
│ └── plugin/ # Hermes plugin, local event log, local server
│
├── contracts/ # Solana Anchor receipt programs
└── docs/ # Architecture, plan, threat model
Things that do not exist yet in the repo:
apps/apiapps/detectionapps/learning
Those are not immediate blockers if the equivalent capability is delivered locally first.
3. Current Runtime Flow
Plugin and scorer
Current real path:
- Hermes calls the plugin hook in
packages/plugin - the plugin builds a
WriteEvent packages/corescores the write with temporal, pattern, and optional judge- the plugin logs the scored event locally
- the plugin allows or blocks the write
Current status:
- scorer path is real
- fail-closed ambiguous handling exists
- scored event metadata is logged
- local JSONL event flow exists
Still missing for the full plugin path:
- full Hermes
MemoryProviderlifecycle implementation - background sync and flush behavior
Local dashboard path
Current real path:
apps/dashboardbuilds a static SPApackages/pluginserves the SPA and local read APIs- dashboard pages fetch local data from the plugin server
Current status:
Events,Overview,Threat, andMemory Gateread live/api/events- when event data is missing or unavailable, those event surfaces fall back to sample rows
BaselinesPagereads live/api/baseline/diffProvenancePagereads live/api/eventsplus/api/provenance/:idProvenancePagerenders an interactive XyFlow DAG for one eventFleetPagereads live/api/fleet/summaryFleetPagerenders a local topology graph from propagation evidencescripts/seed_demo_data.shcan pre-populate demo-ready local evidence
This means the dashboard is now local-first and mostly real, with sample fallback retained only for event-stream surfaces.
4. What Is Real vs Mock
Real now
packages/corescoring pipeline- plugin enforcement hook
- JSONL event schema with score breakdown
- local event API at
/api/events - local provenance API at
/api/provenance/:id - local fleet summary plus topology payload at
/api/fleet/summary - interactive XyFlow provenance graph
- interactive XyFlow fleet topology graph
- reproducible demo seed path for local first-load state
- Solana Anchor receipt programs under
contracts/ - verified local Solana build and deploy path
Mock or incomplete now
- richer PLUR propagation state beyond local replay-derived topology edges
- continuous drift monitoring beyond point-in-time baseline diffs
- remote multi-user backend
5. Chain Position
The repo is currently on a Solana Anchor path, not the older Base Sepolia Solidity path described in the original broad requirements document.
That means:
contracts/is the single intended on-chain workspace- chain work should continue on Solana unless we explicitly change direction
- the requirements doc still needs to be interpreted with that correction in mind
- the local toolchain and localnet deploy path are now verified in-repo
Important architectural rule:
Solana should not be the source of truth for dashboard graphs.
The provenance graph and fleet graph should be driven by local provenance and propagation records first. Solana receipts can be shown as:
- a receipt badge
- an anchor timestamp
- an external verification link
- a hash proof reference in a details panel
Chain data is evidence, not the primary model for the UI.
6. Recommended Build Order
The path that makes the repo coherent is:
- finish plugin persistence and lifecycle
- finish local dashboard data plumbing
- add reproducible attack scenario tests
- add provenance, baselines, drift monitor, and PLUR gate
- add Solana receipt writer integration
- only then decide whether separate cloud services are worth the extra code
This order keeps the product aligned with the core principle that the plugin is the ground truth.
7. Optional Later Expansions
These can exist later if they provide a real capability increase, but they are not required merely to satisfy an older diagram:
apps/api- remote event aggregation
- team accounts
- shared provenance views
- auth and persistence outside the local machine
apps/detection- isolated hosted LLM judge endpoint
- hosted score or embed endpoints
- provider key isolation
apps/learning- scheduled red or blue loop
- pattern evolution from blocked write history
- dashboard-visible cycle summaries
If we implement equivalent local-first behavior and the remote service adds no new product value, we should prefer the simpler local path.
8. Near-Term Architecture Targets
Plugin target
packages/plugin should grow into:
- enforcement hook
- lifecycle wrapper for Hermes memory APIs
- local JSONL log
- local SQLite store
- provenance builder
- baseline snapshotter
- PLUR gate hooks
Dashboard target
apps/dashboard should evolve from mixed live or mock pages into:
- live event feed
- real memory gate view
- real baseline diff view
- real provenance graph view
- real fleet or propagation view
- seeded first-load demo liveness for review sessions
Server target
The local server now exposes:
GET /api/eventsGET /api/provenance/:idGET /api/baseline/diffGET /api/fleet/summaryGET /api/receipts
Still optional later:
- local update streaming
We do not need to force FastAPI immediately if the current lightweight server remains sufficient, but websocket or richer endpoint work may justify that upgrade later.
9. Non-Negotiable Rules
- The plugin remains the only authoritative write-time gate
packages/coreremains the single source of scoring logic- Dashboard graphs must be sourced from local records, not from chain data
- Mock dashboard surfaces must be replaced before claiming those features are implemented
- Separate cloud apps are justified only when they add capabilities the local path does not already cover

Log in or sign up for Devpost to join the conversation.