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.
npx agentmods add commands/kastalien-research/thoughtbox/stategit clone --depth 1 https://github.com/Kastalien-Research/thoughtboxWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/kastalien-research/thoughtbox/state)<a href="https://agentmods.dev/commands/kastalien-research/thoughtbox/state"><img src="https://agentmods.dev/badge/commands/kastalien-research/thoughtbox/state.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00443 |
| Opus 5 | $0.00000 | $0.00221 |
| Sonnet 5 | $0.00000 | $0.00089 |
| Haiku 4.5 | $0.00000 | $0.00044 |
Grade A, and why
state 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 yesterday.
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.
What it actually says
HDD State Contract
Canonical state structure for the modular HDD workflow.
State Path
.hdd/state.json
Required Fields
{
"workflow": "hdd",
"version": "2.0",
"adr_number": "",
"title": "",
"phase": "research|stage|implement|validate|decide|complete",
"current_task": "",
"status": "idle|in_progress|blocked|complete|failed",
"artifacts": [],
"errors": [],
"handoff": {
"module_path": "",
"task_goal": "",
"paths_to_inspect": [],
"acceptance_checks": []
},
"open_risks": [],
"updated_at": ""
}
Phase Transition Rules
Each transition requires on-disk verification — read the state file back after writing and confirm the required data is present. Conversation memory is not an artifact.
research -> stagerequireshypothesesarray in state.json with length > 0. Each entry must haveid,claim,prediction,validationfields.stage -> implementrequiresstaging_adr_pathandspec_pathnon-null in state.json AND both files exist on disk (verified by reading them).implement -> validaterequiresartifactsarray with implementation files and test targets recorded in state.json.validate -> deciderequires hypothesis outcomes written to state.json (each hypothesis has anoutcomefield: VALIDATED | INVALIDATED | INCONCLUSIVE).decide -> completerequires accepted/rejected migration artifact on disk.
Enforcement: The orchestrator MUST read .hdd/state.json after every write and verify
the transition prerequisite before starting the next phase. If verification fails, fix the
write — do not advance.
Resume Rules
- Load state and verify phase prerequisites using the transition rules above.
- Re-run current phase module if output artifacts are missing from disk.
- Preserve prior artifacts and append new events.
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.
- yesterday First seen · 53 lines · 0 tokens per session scan A 5f87ba7b7f54
state is a command published in the GitHub repository Kastalien-Research/thoughtbox (64 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 443 tokens. 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-09-03.
Other commands, from other repositories
validate-prd
Validate an existing PRD against BMAD standards - comprehensive review for completeness, clarity, and quality.
editorial-review-structure
Structural editor that proposes cuts, reorganization, and simplification while preserving comprehension.
add-tool
Scaffold a new FreeAgent MCP tool (handler + registration + test) following the repo pattern.
OPSX: Archive
Archive a completed change in the experimental workflow.
audit-web
请使用 anjian MCP 工具处理这个网站安全评估请求:$ARGUMENTS.
data-mesh-contract
Create federated data product contracts for mesh architectures with SLAs, governance, and interoperability guarantees (project).