state-encoder

An internal worker that turns a module’s code structure and recent problem history into a structured state summary. A module is a distinct part of a software project.

In plain words
What is it for?
Use it within the dynos-work start pipeline to produce a JSON signature for a target module. It should not be started directly.
Why use it?
The summary records complexity, connections to other code, and the concentration of security, logic, and cost findings, making the module’s current condition easier to compare.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/dynos-fit/dynos-work/state-encoder
Clone the repo
git clone --depth 1 https://github.com/dynos-fit/dynos-work
Per session 64 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 281 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00064 $0.00281
Opus 5 $0.00032 $0.00140
Sonnet 5 $0.00013 $0.00056
Haiku 4.5 $0.00006 $0.00028

Measured 2d ago against content hash ce68dad01997, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

state-encoder scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

cli/assets/templates/base/agents/state-encoder.md · 30 lines

What it actually says

State-Encoder Agent ($)

Your goal is to discretize the technical state of a module into a structured state signature.

If available in this repo, the deterministic runtime for this agent is:

python3 hooks/dynostate.py --root . --target <path>

What you do

Step 1 -- Code Graph Retrieval

  1. Code Graph Scan: Identify the module's code files and import references.
  2. Context Density: Read the module's core files and estimate structural complexity.

Step 2 -- Discretization

Create a structured state signature including:

  • Architecture Complexity Score (Cyclomatic complexity + Nesting depth).
  • Dependency Flux (Count of inbound/outbound references).
  • Finding Entropy (Current finding density by category — security, logic, cost).

Step 3 -- Output Code Signature (JSON)

Output the state signature as a single JSON object. This signature is used to search the trajectory store for similar past tasks.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 30 lines · 64 tokens per session scan A ce68dad01997

Subscribe to this mod's changes

state-encoder is an agent published in the GitHub repository dynos-fit/dynos-work (2 stars, last pushed 1mo ago), licensed MIT. It adds 64 tokens to every session and 281 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

ring:backend-go

Senior Backend Engineer specialized in Go for high-demand financial systems. Handles API development, microservices, databases, message queues, and business logic implementation.

LerianStudio/ring · 34 tokens

ring:commons-reviewer

Reviews correct usage of Lerian lib-commons non-observability packages (lifecycle, tenancy, http, idempotency, security, database, messaging, outbox-repo side), identifies reinvented-wheel opportunities, and enforces version consistency. Runs in parallel with other reviewers.

LerianStudio/ring · 63 tokens

ring:perf-reviewer

Performance Reviewer covering code-level hotspots (allocations, goroutine leaks, N+1 queries, event loop blocking) and runtime/infra misconfigurations (GOMAXPROCS, GC tuning, CFS throttling, connection pool sizing). Runs in parallel with other reviewers.

LerianStudio/ring · 62 tokens

ring:test-reviewer

Test Quality Review: Reviews test coverage, edge cases, test independence, assertion quality, and test anti-patterns. Runs in parallel with other reviewers at Gate 8.

LerianStudio/ring · 39 tokens

ring:codebase-explorer

Deep codebase exploration agent for architecture understanding, pattern discovery, and comprehensive code analysis. Use for 'how' and 'why' questions — not for 'where' searches (use built-in Explore for those).

LerianStudio/ring · 49 tokens

ring:obs-reviewer

Conditional Gate 8 specialist for lib-observability, tracing, metrics, logging, runtime recovery, panic safety, redaction, constants, and SafeGo implications.

LerianStudio/ring · 39 tokens