soturail 1.2.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/README.md +74 -703
  2. package/dist/cli.js +6 -0
  3. package/dist/cli.js.map +1 -1
  4. package/dist/commands/bench.js +4 -4
  5. package/dist/commands/bench.js.map +1 -1
  6. package/dist/commands/eval.js +14 -0
  7. package/dist/commands/eval.js.map +1 -1
  8. package/dist/commands/evidence.d.ts +2 -0
  9. package/dist/commands/evidence.js +18 -0
  10. package/dist/commands/evidence.js.map +1 -0
  11. package/dist/commands/knowledge.d.ts +2 -0
  12. package/dist/commands/knowledge.js +26 -0
  13. package/dist/commands/knowledge.js.map +1 -0
  14. package/dist/commands/skills.js +26 -0
  15. package/dist/commands/skills.js.map +1 -1
  16. package/dist/commands/tasklet.d.ts +2 -0
  17. package/dist/commands/tasklet.js +20 -0
  18. package/dist/commands/tasklet.js.map +1 -0
  19. package/dist/core/agent-qa.d.ts +26 -0
  20. package/dist/core/agent-qa.js +178 -0
  21. package/dist/core/agent-qa.js.map +1 -0
  22. package/dist/core/code-health.js +19 -19
  23. package/dist/core/code-health.js.map +1 -1
  24. package/dist/core/config.d.ts +4 -0
  25. package/dist/core/config.js +8 -0
  26. package/dist/core/config.js.map +1 -1
  27. package/dist/core/context-intelligence.js +1 -1
  28. package/dist/core/context-intelligence.js.map +1 -1
  29. package/dist/core/evidence-provenance.d.ts +45 -0
  30. package/dist/core/evidence-provenance.js +122 -0
  31. package/dist/core/evidence-provenance.js.map +1 -0
  32. package/dist/core/harness-lifecycle.js +1 -1
  33. package/dist/core/harness-lifecycle.js.map +1 -1
  34. package/dist/core/harness-rail.js +2 -2
  35. package/dist/core/harness-rail.js.map +1 -1
  36. package/dist/core/knowledge-rail.d.ts +58 -0
  37. package/dist/core/knowledge-rail.js +224 -0
  38. package/dist/core/knowledge-rail.js.map +1 -0
  39. package/dist/core/release-preflight.js +18 -18
  40. package/dist/core/release-preflight.js.map +1 -1
  41. package/dist/core/reverse-specification.js +2 -2
  42. package/dist/core/reverse-specification.js.map +1 -1
  43. package/dist/core/schema-readiness.js +22 -16
  44. package/dist/core/schema-readiness.js.map +1 -1
  45. package/dist/core/skill-rail-v2.d.ts +24 -0
  46. package/dist/core/skill-rail-v2.js +106 -0
  47. package/dist/core/skill-rail-v2.js.map +1 -0
  48. package/dist/core/tasklet-rail.d.ts +22 -0
  49. package/dist/core/tasklet-rail.js +69 -0
  50. package/dist/core/tasklet-rail.js.map +1 -0
  51. package/dist/core/version.d.ts +1 -1
  52. package/dist/core/version.js +1 -1
  53. package/docs/README.md +53 -0
  54. package/docs/{observability-rail.md → architecture/observability-rail.md} +5 -5
  55. package/docs/{agent-harness-synthesis-2026.md → ecosystem/agent-harness-synthesis-2026.md} +3 -3
  56. package/docs/{conductor-mode.md → ecosystem/conductor-mode.md} +3 -3
  57. package/docs/{ecosystem-influences.md → ecosystem/ecosystem-influences.md} +13 -13
  58. package/docs/{external-projects-audit.md → ecosystem/external-projects-audit.md} +1 -1
  59. package/docs/{migration-v1.md → getting-started/migration-v1.md} +1 -1
  60. package/docs/{context-intelligence.md → rails/context/context-intelligence.md} +4 -4
  61. package/docs/{context-packs.md → rails/context/context-packs.md} +7 -7
  62. package/docs/{memory-rail.md → rails/context/memory-rail.md} +2 -2
  63. package/docs/{structured-payload-rail.md → rails/context/structured-payload-rail.md} +3 -3
  64. package/docs/{spec-driven-workflow.md → rails/design/spec-driven-workflow.md} +1 -1
  65. package/docs/rails/evaluation/agent-qa-rail.md +34 -0
  66. package/docs/{benchmarking.md → rails/evaluation/benchmarking.md} +1 -1
  67. package/docs/rails/evidence/evidence-provenance-rail.md +41 -0
  68. package/docs/{report-rail.md → rails/evidence/report-rail.md} +4 -4
  69. package/docs/{governance-cost-rail.md → rails/governance/governance-cost-rail.md} +1 -1
  70. package/docs/{rules.md → rails/governance/rules.md} +2 -2
  71. package/docs/{harness-lifecycle-rail.md → rails/harness/harness-lifecycle-rail.md} +2 -2
  72. package/docs/{harness-rail.md → rails/harness/harness-rail.md} +1 -1
  73. package/docs/{workflow-rail.md → rails/harness/workflow-rail.md} +4 -4
  74. package/docs/{agent-docs-hygiene.md → rails/hosts/agent-docs-hygiene.md} +1 -1
  75. package/docs/{agent-hosts.md → rails/hosts/agent-hosts.md} +4 -4
  76. package/docs/{agents.md → rails/hosts/agents.md} +10 -10
  77. package/docs/rails/knowledge/knowledge-rail.md +49 -0
  78. package/docs/rails/skills/skill-rail-2.md +42 -0
  79. package/docs/rails/tasklets/tasklet-rail.md +32 -0
  80. package/docs/{release-checklist.md → reference/commands/release-checklist.md} +1 -1
  81. package/docs/{stable-command-surface.md → reference/commands/stable-command-surface.md} +20 -13
  82. package/docs/reference/commands/v1.4-commands.md +51 -0
  83. package/docs/{deprecation-policy.md → reference/contracts/deprecation-policy.md} +1 -1
  84. package/docs/{v1-contract.md → reference/contracts/v1-contract.md} +3 -3
  85. package/docs/{licensing-strategy.md → reference/licensing-strategy.md} +1 -1
  86. package/docs/{schema-contracts.md → reference/schemas/schema-contracts.md} +16 -2
  87. package/docs/releases/RELEASE_NOTES_v0.10.1.md +3 -3
  88. package/docs/releases/RELEASE_NOTES_v1.0.1.md +1 -1
  89. package/docs/releases/RELEASE_NOTES_v1.4.0.md +47 -0
  90. package/docs/{future-rails-index.md → roadmap/future-rails-index.md} +83 -91
  91. package/docs/{repo-docs-audit-2026-06-05.md → roadmap/repo-docs-audit-2026-06-05.md} +10 -10
  92. package/docs/{roadmap-docs-audit.md → roadmap/roadmap-docs-audit.md} +14 -14
  93. package/docs/{roadmap-harness-diagram-payload-addendum.md → roadmap/roadmap-harness-diagram-payload-addendum.md} +10 -10
  94. package/docs/{security-boundaries.md → security/security-boundaries.md} +8 -5
  95. package/docs/{security-model.md → security/security-model.md} +1 -1
  96. package/docs/{tutorial-codex.md → tutorials/tutorial-codex.md} +1 -1
  97. package/examples/workflows/agent-pipeline-workflow.md +11 -0
  98. package/package.json +2 -1
  99. package/docs/agent-qa-rail.md +0 -92
  100. package/docs/evidence-provenance-rail.md +0 -70
  101. package/docs/knowledge-rail.md +0 -76
  102. package/docs/skill-rail-2.md +0 -110
  103. package/docs/tasklet-rail.md +0 -62
  104. /package/docs/{architecture-boundaries.md → architecture/architecture-boundaries.md} +0 -0
  105. /package/docs/{architecture.md → architecture/architecture.md} +0 -0
  106. /package/docs/{clean-code-guidelines.md → architecture/clean-code-guidelines.md} +0 -0
  107. /package/docs/{dashboard-rail.md → architecture/dashboard-rail.md} +0 -0
  108. /package/docs/{comparisons.md → ecosystem/comparisons.md} +0 -0
  109. /package/docs/{first-real-workflow.md → getting-started/first-real-workflow.md} +0 -0
  110. /package/docs/{migration-v0.5.md → getting-started/migration-v0.5.md} +0 -0
  111. /package/docs/{mvp.md → getting-started/mvp.md} +0 -0
  112. /package/docs/{quickstart.md → getting-started/quickstart.md} +0 -0
  113. /package/docs/{usage.md → getting-started/usage.md} +0 -0
  114. /package/docs/{windows.md → getting-started/windows.md} +0 -0
  115. /package/docs/{prompt-caching.md → rails/context/prompt-caching.md} +0 -0
  116. /package/docs/{reducers.md → rails/context/reducers.md} +0 -0
  117. /package/docs/{response-compression.md → rails/context/response-compression.md} +0 -0
  118. /package/docs/{design-rail.md → rails/design/design-rail.md} +0 -0
  119. /package/docs/{diagram-rail.md → rails/design/diagram-rail.md} +0 -0
  120. /package/docs/{eval-datasets.md → rails/evaluation/eval-datasets.md} +0 -0
  121. /package/docs/{evaluation-suite.md → rails/evaluation/evaluation-suite.md} +0 -0
  122. /package/docs/{golden-agent-tests.md → rails/evaluation/golden-agent-tests.md} +0 -0
  123. /package/docs/{llm-as-judge-policy.md → rails/evaluation/llm-as-judge-policy.md} +0 -0
  124. /package/docs/{metrics.md → rails/evaluation/metrics.md} +0 -0
  125. /package/docs/{agent-readable-reports.md → rails/evidence/agent-readable-reports.md} +0 -0
  126. /package/docs/{report-redaction.md → rails/evidence/report-redaction.md} +0 -0
  127. /package/docs/{agent-governance-rail.md → rails/governance/agent-governance-rail.md} +0 -0
  128. /package/docs/{baseline-snapshots.md → rails/governance/baseline-snapshots.md} +0 -0
  129. /package/docs/{native-performance-policy.md → rails/governance/native-performance-policy.md} +0 -0
  130. /package/docs/{native-runner.md → rails/governance/native-runner.md} +0 -0
  131. /package/docs/{policy-rail.md → rails/governance/policy-rail.md} +0 -0
  132. /package/docs/{rate-limit-and-fallback-policy.md → rails/governance/rate-limit-and-fallback-policy.md} +0 -0
  133. /package/docs/{resilience-rail.md → rails/governance/resilience-rail.md} +0 -0
  134. /package/docs/{filesystem-evidence-rail.md → rails/harness/filesystem-evidence-rail.md} +0 -0
  135. /package/docs/{deep-agents-patterns.md → rails/hosts/deep-agents-patterns.md} +0 -0
  136. /package/docs/{hooks.md → rails/hosts/hooks.md} +0 -0
  137. /package/docs/{host-compatibility-rail.md → rails/hosts/host-compatibility-rail.md} +0 -0
  138. /package/docs/{host-router-rail.md → rails/hosts/host-router-rail.md} +0 -0
  139. /package/docs/{mcp-host-manifest.md → rails/hosts/mcp-host-manifest.md} +0 -0
  140. /package/docs/{mcp-report-resources.md → rails/hosts/mcp-report-resources.md} +0 -0
  141. /package/docs/{mcp.md → rails/hosts/mcp.md} +0 -0
  142. /package/docs/{code-graph.md → rails/knowledge/code-graph.md} +0 -0
  143. /package/docs/{knowledge-graph-rail.md → rails/knowledge/knowledge-graph-rail.md} +0 -0
  144. /package/docs/{knowledge-to-rules.md → rails/knowledge/knowledge-to-rules.md} +0 -0
  145. /package/docs/{project-brain.md → rails/knowledge/project-brain.md} +0 -0
  146. /package/docs/{reverse-specification-rail.md → rails/knowledge/reverse-specification-rail.md} +0 -0
  147. /package/docs/{skill-rail.md → rails/skills/skill-rail.md} +0 -0
  148. /package/docs/{multi-agent-workflow-templates.md → rails/tasklets/multi-agent-workflow-templates.md} +0 -0
  149. /package/docs/{branding.md → reference/branding.md} +0 -0
  150. /package/docs/{release-workflow.md → reference/commands/release-workflow.md} +0 -0
  151. /package/docs/{status-command.md → reference/commands/status-command.md} +0 -0
  152. /package/docs/{agent-export-contract.md → reference/contracts/agent-export-contract.md} +0 -0
  153. /package/docs/{media-guide.md → reference/media-guide.md} +0 -0
  154. /package/docs/{host-matrix-schema.md → reference/schemas/host-matrix-schema.md} +0 -0
  155. /package/docs/{public-roadmap.md → roadmap/public-roadmap.md} +0 -0
  156. /package/docs/{roadmap-agent-runtime-addendum.md → roadmap/roadmap-agent-runtime-addendum.md} +0 -0
  157. /package/docs/{tutorial-antigravity.md → tutorials/tutorial-antigravity.md} +0 -0
  158. /package/docs/{tutorial-claude-code.md → tutorials/tutorial-claude-code.md} +0 -0
  159. /package/docs/{tutorial-context-formats.md → tutorials/tutorial-context-formats.md} +0 -0
  160. /package/docs/{tutorial-cursor.md → tutorials/tutorial-cursor.md} +0 -0
  161. /package/docs/{tutorial-deep-agents-role-packs.md → tutorials/tutorial-deep-agents-role-packs.md} +0 -0
  162. /package/docs/{tutorial-diagram-spec.md → tutorials/tutorial-diagram-spec.md} +0 -0
  163. /package/docs/{tutorial-gemini-cli.md → tutorials/tutorial-gemini-cli.md} +0 -0
  164. /package/docs/{tutorial-harness-workflow.md → tutorials/tutorial-harness-workflow.md} +0 -0
  165. /package/docs/{tutorial-opencode.md → tutorials/tutorial-opencode.md} +0 -0
package/README.md CHANGED
@@ -1,756 +1,127 @@
1
- <p align="center">
2
- <img src="docs/assets/soturail-fox.svg" alt="SotuRail fox logo" width="180" />
3
- </p>
4
-
5
1
  # SotuRail
6
2
 
7
- [![Node.js >=20](https://img.shields.io/badge/node-%3E%3D20-3c873a)](package.json)
8
- [![TypeScript](https://img.shields.io/badge/TypeScript-strict-3178c6)](tsconfig.json)
9
- [![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue)](LICENSE)
3
+ [![npm](https://img.shields.io/npm/v/soturail)](https://www.npmjs.com/package/soturail)
10
4
  [![CI](https://github.com/Soturine/soturail/actions/workflows/ci.yml/badge.svg)](https://github.com/Soturine/soturail/actions/workflows/ci.yml)
11
- [![npm version](https://img.shields.io/npm/v/soturail.svg)](https://www.npmjs.com/package/soturail)
12
- [![npm downloads](https://img.shields.io/npm/dm/soturail.svg)](https://www.npmjs.com/package/soturail)
13
- [![local-first](https://img.shields.io/badge/local--first-yes-f97316)](docs/security-model.md)
14
- [![context-engineering](https://img.shields.io/badge/context--engineering-SotuRail-7c3aed)](docs/prompt-caching.md)
15
-
16
- SotuRail — Local-first context rails for AI coding agents.
17
- SotuRail — trilhos locais de contexto para agentes de IA.
18
-
19
- ## 1. What Is SotuRail?
20
-
21
- SotuRail is a local-first Context OS for AI coding agents such as Claude Code, Codex CLI, Gemini CLI, Cursor, Antigravity-style hosts and similar tools.
22
-
23
- It wraps a repository and terminal session with reversible evidence rails: heuristic repo maps, progressive file reading, safe command execution, raw log recovery, reducers, prompt-cache-friendly blocks, Spec-Driven Development artifacts, local memory, hooks, benchmarks, rules extraction, context packs, agent exports and workflow records.
24
-
25
- SotuRail is not the agent, not a Claude-only harness, not a Mermaid-only workflow tool and not a heavy production gateway. It is the local rail layer that helps agents work with better context, safer logs, smaller prompts, approved memory, structured payloads, diagrams, policies and auditable workflows.
26
-
27
- ## Project Status
28
-
29
- v1.2.0 keeps the stable local Context OS surface, polishes Host Compatibility Rail and adds Harness Lifecycle Rail. The stable surface covers status, reports, dashboard, observability, Project Brain, evaluation, benchmarks, native candidate reporting, baseline snapshots, release checks, workflow/harness/diagram rails, lifecycle state, agent exports, host doctors and read-only MCP report/host resources.
30
-
31
- Experimental host runtimes remain documented but are not part of the stable contract until promoted. SotuRail does not add cloud telemetry, a required dashboard server, destructive MCP tools, shell execution through MCP or a native-only runtime. TypeScript remains the portable fallback. See [ROADMAP.md](ROADMAP.md), [docs/v1-contract.md](docs/v1-contract.md), [docs/schema-contracts.md](docs/schema-contracts.md), [docs/stable-command-surface.md](docs/stable-command-surface.md), [docs/agent-hosts.md](docs/agent-hosts.md) and [docs/future-rails-index.md](docs/future-rails-index.md).
32
-
33
- ## v0.5.x MVP Rails
34
-
35
- ```bash
36
- soturail memory remember "Decision: keep MCP read-oriented by default" --tag architecture
37
- soturail memory recall "MCP safety" --limit 5
38
- soturail context select --query "prepare npm release"
39
- soturail context budget --target claude --explain
40
- soturail context pack --role reviewer
41
- soturail harness contract init
42
- soturail policy doctor
43
- soturail fs snapshot
44
- soturail mcp exposure
45
- soturail run workspace new "Try v0.5.x rails"
46
- soturail native doctor
47
- soturail validate json package.json --strict
48
- soturail format compare README.md
49
- ```
50
-
51
- These rails write local JSON, JSONL and Markdown under `.soturail/`. They do not create cloud resources, background agents, global config writes or arbitrary MCP shell execution.
52
-
53
- ## v0.6.0 Agent Runtime Adapter
54
-
55
- ```bash
56
- soturail agents capabilities
57
- soturail agents capabilities --json
58
- soturail agents status
59
- soturail agents status --json
60
- soturail agents doctor --verbose
61
- soturail agents install --agent claude --dry-run
62
- soturail agents install --agent cursor --dry-run
63
- soturail agents install --agent gemini --dry-run
64
- soturail agents export --agent deepagents
65
- soturail agents export --agent deepagents-js
66
- ```
67
-
68
- The adapter is host-aware but conservative. It reports real, experimental, prompt-only and planned surfaces for Claude Code, Codex, Gemini CLI, Cursor, Antigravity, Generic, OpenCode/Amp/Kiro-style hosts and Deep Agents-style targets. Dry-run installs show planned file writes, backups, context references, payload recommendations and policy warnings before anything changes.
69
-
70
- ## v0.6.1 Evaluation Suite
71
-
72
- ```bash
73
- soturail eval list
74
- soturail eval run
75
- soturail eval report
76
- ```
77
-
78
- The evaluation suite is deterministic and local. It checks memory recall, context selection, reducers, routing, role packs, agent-doc hygiene, offload/restore, payload formats, strict JSON validation, evidence packs, harness scenarios and Diagram Rail validation seeds. Reports are written to `.soturail/eval/latest.json` and `.soturail/eval/latest.md`.
79
-
80
- Token savings alone are not treated as success. The suite checks whether important files, commands, errors, policy decisions and recovery pointers survive compression and selection. See [docs/evaluation-suite.md](docs/evaluation-suite.md).
81
-
82
- ## v0.7.0 Workflow, Harness And Diagram Rails
83
-
84
- ```bash
85
- soturail workflow setup
86
- soturail workflow plan "Implement feature"
87
- soturail workflow work --note "Implemented the first slice"
88
- soturail workflow review --all
89
- soturail workflow verify
90
- soturail workflow evidence <id>
91
- soturail workflow diagram <id>
92
-
93
- soturail diagram init
94
- soturail diagram new "Feature flow"
95
- soturail diagram audit docs/diagrams/feature-flow.md
96
- soturail diagram validate
97
- soturail diagram from-workflow <id>
98
- ```
99
-
100
- Workflow Rail 2.0 writes local plan/work/review/verify artifacts under `.soturail/workflows/`. Harness Rail connects repeated failures and acceptance contracts to verification and evidence. Diagram Rail writes text-based Mermaid diagrams and `.spec.md` visual contracts under `docs/diagrams/` and `.soturail/diagrams/`.
101
-
102
- Release notes now live under `docs/releases/`, and release evidence points to `docs/releases/RELEASE_NOTES_vX.Y.Z.md`.
103
-
104
- ## v0.8.x Verified Project Brain
105
-
106
- ```bash
107
- soturail brain init
108
- soturail brain scan
109
- soturail brain consolidate --dry-run
110
- soturail brain profile
111
- soturail brain recall "release notes"
112
- soturail brain stale --repair-plan
113
- soturail brain doctor --repair-plan
114
- soturail brain export --agent codex --limit 10
115
-
116
- soturail reverse scan ./src
117
- soturail reverse claims ./src
118
- soturail reverse specs ./src
119
- soturail reverse gaps
120
- soturail reverse export --target agent
121
-
122
- soturail rules from-brain
123
- soturail eval run --suite brain
124
- ```
125
-
126
- Project Brain stores source-backed knowledge under `.soturail/brain/` using JSONL records for claims, decisions, bugs, gaps, rules and stale events, JSON views for current state and Markdown briefs for agent handoff.
127
-
128
- Reverse Specification Rail extracts deterministic claims and draft specs from local source/docs/tests. It does not call an LLM, use embeddings, require a database or send project data to a network service.
5
+ [![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue)](LICENSE)
129
6
 
130
- v0.8.1 improves trust in that brain: stale detection can report relocated ranges, `brain consolidate --dry-run` groups duplicate claims without deleting history, repair plans explain safe human follow-up and agent briefs separate verified, suspect and stale records.
7
+ SotuRail is a local-first Context OS for AI coding agents. It prepares compact project knowledge, evidence, workflows, reports and agent-safe exports without becoming an autonomous agent, cloud gateway or required server.
131
8
 
132
- ## v0.9.0 Benchmark-Gated Native/Performance Engine
9
+ ## Install
133
10
 
134
11
  ```bash
135
- soturail bench list
136
- soturail bench run --suite brain
137
- soturail bench run --suite reducers
138
- soturail bench run --suite filesystem
139
- soturail bench compare
140
- soturail bench report
141
-
142
- soturail native candidates
143
- soturail native status
144
- soturail native doctor
145
- soturail native compare
146
-
147
- soturail self baseline --check
148
- soturail self baseline --zip
149
- soturail self baseline --bundle
150
- soturail self baseline --pack
12
+ npm install -g soturail
13
+ soturail --version
14
+ npx soturail --help
151
15
  ```
152
16
 
153
- v0.9.0 adds stable local benchmark reports under `.soturail/bench/`, native candidate reports under `.soturail/native/` and baseline snapshot reports under `.soturail/baselines/`.
154
-
155
- The rule is simple: no benchmark, no native rewrite. SotuRail does not claim native speedups unless a local benchmark report proves them. Native acceleration is optional; TypeScript remains the portable baseline and normal npm installs do not require Rust.
17
+ SotuRail requires Node.js 20 or newer. TypeScript is the portable default; native acceleration remains optional.
156
18
 
157
- ## v0.10.x Local Reports, Observability And Dashboard
19
+ ## Quick Start
158
20
 
159
21
  ```bash
160
- soturail status --json
161
- soturail status --md
162
22
  soturail status --agent
163
-
23
+ soturail knowledge compile project-guide README.md docs
24
+ soturail evidence collect
164
25
  soturail report build
165
- soturail report latest
166
- soturail report export --format html
167
- soturail report doctor
168
- soturail report redact
169
- soturail report github-summary
170
- soturail report agent --agent codex
171
- soturail report diff
172
-
173
26
  soturail dashboard build
174
- soturail dashboard doctor
175
-
176
- soturail obs collect
177
- soturail obs summary
178
- soturail obs timeline
179
- soturail obs export
180
-
181
- soturail mcp resources report
182
-
183
- soturail self schemas --check
184
- soturail self schemas --check --json
185
- soturail self readiness --v1
186
- soturail self readiness --v1 --json
27
+ soturail self readiness --v1 --strict
187
28
  ```
188
29
 
189
- v0.10.0 writes local status artifacts under `.soturail/status/`, local reports under `.soturail/reports/`, a static dashboard under `.soturail/dashboard/`, observability events under `.soturail/observability/` and read-only MCP report resources under `.soturail/mcp/report-resources.json`.
30
+ All generated artifacts stay local under `.soturail/`.
190
31
 
191
- v0.10.1 hardens those artifacts: every `--json` output is parseable by `JSON.parse`, report diff and doctor output are more actionable, observability de-duplicates repeated local events, and schema/readiness reports are written under `.soturail/schemas/` and `.soturail/readiness/`.
32
+ ## Stable Rails
192
33
 
193
- SotuRail reports are local artifacts. They are designed for humans, CI and coding agents. They do not upload telemetry or require a dashboard server.
34
+ | Rail | Purpose |
35
+ | --- | --- |
36
+ | Context and Project Brain | Progressive repo reading, memory, verified claims and agent briefs |
37
+ | Knowledge and Evidence | Source-backed knowledge packs, provenance and honest verification status |
38
+ | Workflow and Harness | Local workflow evidence, lifecycle state, handoffs and safe task coordination |
39
+ | Evaluation and Skills | Deterministic datasets, golden checks and source-mapped Skill Rail 2.0 packs |
40
+ | Reports and Dashboard | Local status, static dashboard, observability and redacted agent reports |
41
+ | Release and Contracts | Schema checks, readiness gates, baselines and release evidence |
194
42
 
195
- ## v1.0.0 Stable Context OS Surface
43
+ ## Main Commands
196
44
 
197
45
  ```bash
198
- soturail status --json
46
+ soturail knowledge estimate README.md docs
47
+ soturail knowledge compile project-guide README.md docs
48
+ soturail knowledge verify project-guide
49
+ soturail evidence collect
50
+ soturail evidence verify
51
+ soturail eval dataset init
52
+ soturail eval golden
53
+ soturail eval regression
54
+ soturail skills build project-guide README.md docs
55
+ soturail skills lint
56
+ soturail tasklet create review-docs
57
+ soturail tasklet run review-docs --dry-run
199
58
  soturail report build
200
- soturail dashboard build
201
- soturail obs summary
202
- soturail self schemas --check --strict
203
- soturail self readiness --v1 --strict
204
- soturail self code-health
205
- soturail self architecture --check
206
- soturail agents matrix
207
59
  soturail release check --strict
208
60
  ```
209
61
 
210
- v1.0.0 adds strict schema/readiness/release gates, lightweight code-health and architecture checks, a documented v1 contract, a host compatibility matrix and a golden smoke suite for stable commands. See [docs/quickstart.md](docs/quickstart.md), [docs/v1-contract.md](docs/v1-contract.md), [docs/schema-contracts.md](docs/schema-contracts.md), [docs/clean-code-guidelines.md](docs/clean-code-guidelines.md), [docs/architecture-boundaries.md](docs/architecture-boundaries.md) and [docs/agent-hosts.md](docs/agent-hosts.md).
211
-
212
- ## v1.1.0 Host Compatibility Rail
213
-
214
- ```bash
215
- soturail agents matrix --json
216
- soturail agents export --agent opencode
217
- soturail agents export --agent antigravity
218
- soturail agents export --agent deepagents --role reviewer
219
- soturail agents doctor --host codex
220
- soturail agents doctor --all --json
221
- soturail mcp resources host-manifest --host codex
222
- soturail report agent --agent opencode
223
- ```
224
-
225
- v1.1.0 adds host matrix 2.0 fields, mirrored exports under `.soturail/agents/<host>/`, per-host doctor reports, OpenCode-compatible exports, Antigravity transition guidance, Gemini legacy-compatible exports, DeepAgents role-pack exports and read-only MCP host manifests. See [docs/host-matrix-schema.md](docs/host-matrix-schema.md), [docs/agent-export-contract.md](docs/agent-export-contract.md), [docs/mcp-host-manifest.md](docs/mcp-host-manifest.md), [docs/tutorial-opencode.md](docs/tutorial-opencode.md) and [docs/media-guide.md](docs/media-guide.md).
226
-
227
- ## v1.2.0 Harness Lifecycle Rail
228
-
229
- ```bash
230
- soturail harness init
231
- soturail harness audit --json
232
- soturail session start "Implement a focused change"
233
- soturail feature add "Lifecycle-backed feature"
234
- soturail feature list
235
- soturail handoff generate
236
- soturail session end --summary "Verified the focused change"
237
- ```
238
-
239
- v1.2.0 adds safe local harness scaffolds, lifecycle audits, one-active-feature tracking, session state and bounded handoffs under `.soturail/harness/` and `.soturail/state/`. Initialization preserves existing files by default, audit does not execute verification commands, and handoffs do not read private shell history.
240
-
241
- The ecosystem review now distinguishes Hermes as an agent runtime, Odysseus as a workspace/runtime stack and SotuRail as the local-first context/harness OS. A future optional [SotuRail Conductor](docs/conductor-mode.md) remains proposed and is not implemented. See [Harness Lifecycle Rail](docs/harness-lifecycle-rail.md), [Agent And Harness Synthesis 2026](docs/agent-harness-synthesis-2026.md) and [Security Boundaries](docs/security-boundaries.md).
242
-
243
- ## Why SotuRail Exists
244
-
245
- AI coding agents often receive too much unstable context: full files, noisy test logs, repeated terminal output and long conversational summaries. SotuRail is designed to unify those workflows into one independent local-first tool without sending telemetry or inventing provider metrics.
246
-
247
- The long-term product direction is simple:
248
-
249
- ```txt
250
- SotuRail does not replace Claude, Codex, Gemini, Cursor or other agents.
251
- SotuRail prepares the local context, memory, logs, diagrams, policies, payload formats and reports those agents need.
252
- ```
253
-
254
- ## Where It Fits
255
-
256
- Useful mental model:
257
-
258
- ```txt
259
- Hermes-like systems: agent brain and execution loop.
260
- Deep Agents-style systems: batteries-included harness with sub-agents, tools, filesystem, memory and approvals.
261
- Claude Code Harness-style systems: disciplined setup/plan/work/review/release loops with guardrails and evidence.
262
- MDDD-style systems: Mermaid/.spec.md visual contracts before implementation.
263
- Plano-like systems: gateway, router and production data plane.
264
- SotuRail: local Context OS for context, memory, reducers, policy, logs, workflows, diagrams, payload formats and reports.
265
- ```
266
-
267
- A newer mental model from the v0.5 planning cycle:
268
-
269
- ```txt
270
- Dense-agent setup: every task gets every instruction, file and rule.
271
- SotuRail setup: route the task to the right local context expert, memory, role pack, rule set, payload format, diagram and workflow evidence.
272
- ```
273
-
274
- SotuRail absorbs patterns from the context-engineering ecosystem without vendoring or copying adjacent projects. It stays small, local-first, npm-friendly and safe-by-default. Research notes and product ideas live in [docs/ecosystem-influences.md](docs/ecosystem-influences.md), [docs/comparisons.md](docs/comparisons.md), [docs/deep-agents-patterns.md](docs/deep-agents-patterns.md), [docs/future-rails-index.md](docs/future-rails-index.md), [docs/external-projects-audit.md](docs/external-projects-audit.md), [docs/host-compatibility-rail.md](docs/host-compatibility-rail.md), [docs/harness-rail.md](docs/harness-rail.md), [docs/policy-rail.md](docs/policy-rail.md), [docs/diagram-rail.md](docs/diagram-rail.md), [docs/structured-payload-rail.md](docs/structured-payload-rail.md) and [docs/agent-docs-hygiene.md](docs/agent-docs-hygiene.md).
275
-
276
- ## Built With SotuRail
277
-
278
- SotuRail dogfoods itself for release-oriented development. `soturail self all` runs repository checks, indexing, build, tests, benchmarks and a local Markdown report through SotuRail's own rails.
279
-
280
- ```bash
281
- soturail self doctor
282
- soturail self index
283
- soturail self build
284
- soturail self test
285
- soturail self bench
286
- soturail self report
287
- soturail self all
288
- ```
289
-
290
- Reports are written to `.soturail/reports/self-dogfood.md` with stable project context first and dynamic raw IDs, command status and benchmark data later.
291
-
292
- ## Key Features
293
-
294
- - Heuristic Repo Map with cross-platform ignore handling.
295
- - Progressive reader for large files with reversible collapsed ranges.
296
- - Safe tee-stream runner with raw log preservation.
297
- - Git, test, npm, TypeScript, Docker, ESLint, Java/Maven/Gradle, build, JSON and generic terminal reducers.
298
- - Cross-call and block-level dedupe for repeated command output.
299
- - Optional Rust native reducer and runner hot paths with TypeScript fallback.
300
- - Reproducible local benchmark suite.
301
- - Agent response compression modes.
302
- - Knowledge-to-Rules ingestion and validators.
303
- - Prompt-only and hook-style agent integrations.
304
- - Agent exports for Claude, Codex, Gemini/Gemini-compatible, Cursor, Antigravity, OpenCode, generic hosts and DeepAgents-style role packs.
305
- - MCP-compatible local stdio server and config helpers.
306
- - Workflow Rail for local task records, phase evidence and optional worktree planning.
307
- - Memory Rail with explicit local records, recall, capture and consolidation.
308
- - Context Intelligence with selection, pruning, budget reports, offload/restore and role packs.
309
- - Harness, Policy, Filesystem Evidence, Diagram and Run Workspace rails.
310
- - MCP exposure reports and skill routing seeds.
311
- - Agent docs hygiene checks for short root instruction files.
312
- - SDD specs, approved memory and cache block normalization.
313
- - Honest local metrics.
314
-
315
- ## Planned Next Features
316
-
317
- Post-v1 work is staged so the stable Context OS surface stays reliable. v1.1.1 ecosystem documentation/golden export polish and the v1.2.0 Harness Lifecycle slice are delivered; the remaining staged rails include:
318
-
319
- - v1.2.x Spec, Design And Diagram Rail expansion;
320
- - v1.3.0 Knowledge, Evidence and Evaluation Rail;
321
- - v1.4.0 Skill Rail 2.0, Knowledge-to-Skill and Tasklet Packs;
322
- - v1.5.0 Governance, Cost, Resilience and Host Router Rail;
323
- - v1.6.0 Agent Governance / Evolution Rail.
324
-
325
- Experimental portions of those rails are not stable contracts until promoted.
326
-
327
- ## Future Rails Documentation
328
-
329
- Future planning is split across focused docs so the roadmap does not become the only source of truth:
330
-
331
- - [Future Rails Index](docs/future-rails-index.md)
332
- - [Harness Rail](docs/harness-rail.md)
333
- - [Policy Rail](docs/policy-rail.md)
334
- - [Diagram Rail](docs/diagram-rail.md)
335
- - [Structured Payload Rail](docs/structured-payload-rail.md)
336
- - [Agent Docs Hygiene](docs/agent-docs-hygiene.md)
337
- - [Evaluation Suite](docs/evaluation-suite.md)
338
- - [Project Brain](docs/project-brain.md)
339
- - [Reverse Specification Rail](docs/reverse-specification-rail.md)
340
- - [Knowledge To Rules](docs/knowledge-to-rules.md)
341
- - [Benchmarking](docs/benchmarking.md)
342
- - [Native Performance Policy](docs/native-performance-policy.md)
343
- - [Baseline Snapshots](docs/baseline-snapshots.md)
344
- - [Status Command](docs/status-command.md)
345
- - [Report Rail](docs/report-rail.md)
346
- - [Dashboard Rail](docs/dashboard-rail.md)
347
- - [Observability Rail](docs/observability-rail.md)
348
- - [Quickstart](docs/quickstart.md)
349
- - [v1 Contract](docs/v1-contract.md)
350
- - [Schema Contracts](docs/schema-contracts.md)
351
- - [Stable Command Surface](docs/stable-command-surface.md)
352
- - [Agent Hosts](docs/agent-hosts.md)
353
- - [Clean Code Guidelines](docs/clean-code-guidelines.md)
354
- - [Architecture Boundaries](docs/architecture-boundaries.md)
355
- - [Agent-Readable Reports](docs/agent-readable-reports.md)
356
- - [MCP Report Resources](docs/mcp-report-resources.md)
357
- - [Report Redaction](docs/report-redaction.md)
358
- - [Code Graph Seed](docs/code-graph.md)
359
- - [Roadmap Addendum](docs/roadmap-harness-diagram-payload-addendum.md)
360
- - [External Projects Audit](docs/external-projects-audit.md)
361
- - [2026 Agent Harness Synthesis](docs/agent-harness-synthesis-2026.md)
362
- - [Agent QA Rail](docs/agent-qa-rail.md)
363
- - [Eval Datasets](docs/eval-datasets.md)
364
- - [Golden Agent Tests](docs/golden-agent-tests.md)
365
- - [LLM-As-Judge Policy](docs/llm-as-judge-policy.md)
366
- - [Evidence And Provenance Rail](docs/evidence-provenance-rail.md)
367
- - [Agent Governance Rail](docs/agent-governance-rail.md)
368
- - [Harness Lifecycle Rail](docs/harness-lifecycle-rail.md)
369
- - [Knowledge Rail](docs/knowledge-rail.md)
370
- - [Resilience Rail](docs/resilience-rail.md)
371
- - [Rate Limit And Fallback Policy](docs/rate-limit-and-fallback-policy.md)
372
- - [Multi-Agent Workflow Templates](docs/multi-agent-workflow-templates.md)
373
- - [Host Router Rail](docs/host-router-rail.md)
374
- - [Tasklet Rail](docs/tasklet-rail.md)
375
- - [Host Compatibility Rail](docs/host-compatibility-rail.md)
376
- - [Security Boundaries](docs/security-boundaries.md)
377
- - [SotuRail Conductor Mode](docs/conductor-mode.md)
378
- - [Design Rail](docs/design-rail.md)
379
- - [Knowledge Graph Rail](docs/knowledge-graph-rail.md)
380
- - [Skill Rail 2.0](docs/skill-rail-2.md)
381
- - [Governance And Cost Rail](docs/governance-cost-rail.md)
382
- - [Roadmap Docs Audit](docs/roadmap-docs-audit.md)
383
-
384
- ## Installation
385
-
386
- Use directly with npx:
387
-
388
- ```bash
389
- npx soturail --help
390
- npx soturail@latest --help
391
- ```
392
-
393
- Install globally:
394
-
395
- ```bash
396
- npm install -g soturail
397
- soturail --help
398
- soturail --version
399
- ```
400
-
401
- Install the stable v1 release exactly with:
402
-
403
- ```bash
404
- npm install -g soturail@1.2.0
405
- ```
406
-
407
- For local development from source:
62
+ See the [documentation index](docs/README.md) and [usage guide](docs/getting-started/usage.md) for the full surface.
408
63
 
409
- ```bash
410
- npm install
411
- npm run build
412
- npm link
413
- soturail --help
414
- ```
64
+ ## Safety Model
415
65
 
416
- Rust is optional. TypeScript builds do not require Rust.
66
+ - Local artifacts by default; no telemetry upload.
67
+ - No external LLM calls, paid embeddings or mandatory database.
68
+ - No arbitrary shell execution through MCP.
69
+ - No autonomous code rewriting.
70
+ - Evidence distinguishes verified, unverified, inferred and blocked states.
71
+ - Tasklets simulate and export work; they are not an agent runtime.
417
72
 
418
- ```bash
419
- npm run build:native # optional, requires cargo
420
- npm run build:all # TypeScript + native, requires cargo
421
- ```
422
-
423
- npm package: https://www.npmjs.com/package/soturail
424
-
425
- ## Quick Start
426
-
427
- ```bash
428
- soturail init
429
- soturail index
430
- soturail read README.md --query "quick start"
431
- soturail context pack --target all
432
- soturail agents doctor
433
- soturail agents export --agent all
434
- soturail mcp smoke
435
- soturail workflow new "Try SotuRail"
436
- soturail skills init demo-skill
437
- soturail skills validate
438
- soturail run npm test
439
- soturail expand <raw_id>
440
- soturail stats
441
- ```
73
+ Read [Security Boundaries](docs/security/security-boundaries.md), [Security Model](docs/security/security-model.md) and [Evidence Provenance Rail](docs/rails/evidence/evidence-provenance-rail.md).
442
74
 
443
- For an installed clean-folder walkthrough, see [docs/first-real-workflow.md](docs/first-real-workflow.md).
75
+ ## Agent Hosts
444
76
 
445
- ## First Clean Project Flow
77
+ SotuRail exports provider-agnostic context for Codex, Claude, Cursor, OpenCode-compatible hosts, Gemini-compatible hosts, Antigravity-style hosts, DeepAgents-style targets and generic consumers.
446
78
 
447
79
  ```bash
448
- soturail init
449
- soturail memory doctor
450
- soturail context budget --explain
451
- soturail context pack --role planner
452
- soturail harness doctor
453
- soturail policy doctor
454
- soturail run workspace new "Try SotuRail"
455
- soturail context pack --target all
456
- soturail agents doctor
457
- soturail agents export --agent all
458
- soturail mcp smoke
459
- soturail workflow new "Try SotuRail"
460
- soturail workflow list
80
+ soturail agents matrix
81
+ soturail agents export --host codex
82
+ soturail report agent --agent codex
461
83
  ```
462
84
 
463
- `soturail init` scaffolds agent, MCP, context pack, hook, skill and workflow examples without overwriting user-edited files.
464
-
465
- ## Agent Setup Tutorials
85
+ Compatibility is described conservatively in [Agent Hosts](docs/rails/hosts/agent-hosts.md).
466
86
 
467
- - [Claude Code](docs/tutorial-claude-code.md)
468
- - [Codex](docs/tutorial-codex.md)
469
- - [Gemini CLI](docs/tutorial-gemini-cli.md)
470
- - [Cursor](docs/tutorial-cursor.md)
471
- - [Antigravity prompt-only](docs/tutorial-antigravity.md)
472
- - [Deep Agents-style role packs](docs/tutorial-deep-agents-role-packs.md)
473
- - [Harness workflow](docs/tutorial-harness-workflow.md)
474
- - [Diagram specs](docs/tutorial-diagram-spec.md)
475
- - [Context formats](docs/tutorial-context-formats.md)
87
+ ## Documentation
476
88
 
477
- ## Commands
89
+ - [Quickstart](docs/getting-started/quickstart.md)
90
+ - [Documentation index](docs/README.md)
91
+ - [v1 contract](docs/reference/contracts/v1-contract.md)
92
+ - [Stable command surface](docs/reference/commands/stable-command-surface.md)
93
+ - [Knowledge Rail](docs/rails/knowledge/knowledge-rail.md)
94
+ - [Evidence Provenance Rail](docs/rails/evidence/evidence-provenance-rail.md)
95
+ - [Agent QA Rail](docs/rails/evaluation/agent-qa-rail.md)
96
+ - [Skill Rail 2.0](docs/rails/skills/skill-rail-2.md)
97
+ - [Tasklet Rail](docs/rails/tasklets/tasklet-rail.md)
98
+ - [Roadmap](ROADMAP.md)
478
99
 
479
- ```bash
480
- soturail init
481
- soturail index
482
- soturail read <file> --query "goal"
483
- soturail run --engine auto <command...>
484
- soturail run --similar-dedupe conservative npm test
485
- soturail run --engine native <command...>
486
- soturail expand <raw_id>
487
- soturail expand <raw_id> --allow-raw --yes
488
- soturail dedupe stats
489
- soturail bench prepare
490
- soturail bench run --engine ts
491
- soturail bench list
492
- soturail bench run --suite brain
493
- soturail native candidates
494
- soturail self baseline --check
495
- soturail hooks list
496
- soturail agents list
497
- soturail agents doctor
498
- soturail agents export --agent all
499
- soturail mcp smoke
500
- soturail mcp config --agent generic
501
- soturail context pack --target all
502
- soturail context pack --role planner
503
- soturail context select --query "release checklist"
504
- soturail context budget --explain
505
- soturail workflow list
506
- soturail workflow show <id>
507
- soturail workflow close <id>
508
- soturail brain scan
509
- soturail brain consolidate --dry-run
510
- soturail brain recall "release notes"
511
- soturail brain stale --repair-plan
512
- soturail brain export --agent codex --limit 10
513
- soturail reverse specs ./src
514
- soturail rules from-brain
515
- soturail eval run --suite brain
516
- soturail run workspace show <run-id>
517
- soturail format README.md --mode concise
518
- soturail format compare README.md
519
- soturail validate json package.json --strict
520
- soturail ingest README.md --type docs
521
- soturail rules check
522
- soturail skills init demo-skill
523
- soturail skills validate
524
- soturail skills export --target claude
525
- soturail spec status
526
- soturail memory propose "decision"
527
- soturail doctor cache
528
- ```
100
+ ## Roadmap
529
101
 
530
- ## Release Workflow
102
+ v1.4.0 combines Knowledge, Evidence, Evaluation, Skills and Tasklets into one coherent local pipeline. The former v1.3.0 scope is absorbed into v1.4.0 so source-backed knowledge and provenance ship with their evaluation and reusable-work contracts.
531
103
 
532
- Release automation is local-first and conservative:
104
+ Next directions:
533
105
 
534
- ```bash
535
- npm run release:check
536
- npm run release:publish -- X.Y.Z
537
- npm run release:github -- X.Y.Z
538
- npm run release:full -- X.Y.Z --publish-npm --github-release
539
- ```
106
+ - v1.5.0: Governance and Cost Rail
107
+ - v1.6.0: Optional Conductor experiments behind explicit approval gates
540
108
 
541
- The release commands accept a positional version, `--target-version X.Y.Z`, or the backward-compatible `--version X.Y.Z` option. The release script never runs `npm audit fix --force`, never publishes when build/tests/runtime audit fail and never creates a GitHub release before npm publish succeeds. See [docs/release-workflow.md](docs/release-workflow.md).
109
+ See [Future Rails](docs/roadmap/future-rails-index.md).
542
110
 
543
- Release verification installs the packed `.tgz` into a clean temporary project and executes `node_modules/soturail/dist/cli.js` directly to avoid npm cache or global CLI false positives.
111
+ ## Development
544
112
 
545
113
  ```bash
114
+ npm install
115
+ npm run typecheck
546
116
  npm run build
547
117
  npm test
118
+ npm run docs:check
119
+ npm audit --omit=dev
548
120
  npm run release:check
549
- npm pack --dry-run
550
- ```
551
-
552
- ## Agent Integrations
553
-
554
- SotuRail provides reviewed agent integration profiles for Claude, Codex, Gemini, Cursor, Antigravity and generic agents.
555
-
556
- ```bash
557
- soturail agents list
558
- soturail agents doctor
559
- soturail agents export --agent all
560
- soturail agents install --agent claude --mode mcp --dry-run
561
- soturail agents install --agent cursor --mode rules --dry-run
562
- ```
563
-
564
- Exports live under `.soturail/exports/agents/`. Install commands are dry-run-first, backup-first and project-local by default. SotuRail does not auto-enable arbitrary shell execution or unknown global host configs.
565
-
566
- ## MCP And Context Packs
567
-
568
- SotuRail exposes local context through a minimal MCP-compatible stdio server and cache-friendly context packs.
569
-
570
- ```bash
571
- soturail mcp doctor
572
- soturail mcp manifest
573
- soturail mcp serve --transport stdio
574
- soturail mcp smoke
575
- soturail context pack --target claude
576
- soturail context pack --target codex
577
- soturail context pack --target gemini
578
- soturail context pack --target cursor
579
- soturail context pack --target antigravity
580
- soturail context pack --target generic
581
- soturail context pack --target all
582
- soturail context explain
583
- ```
584
-
585
- MCP does not expose arbitrary shell execution. Raw log expansion redacts probable secrets unless raw output is explicitly requested.
586
-
587
- Context packs are written to `.soturail/context/<target>-context.md`. JSON-RPC examples live under [examples/mcp](examples/mcp).
588
-
589
- Role packs, structured payload validation and offload flows are tracked in [docs/context-packs.md](docs/context-packs.md), [docs/structured-payload-rail.md](docs/structured-payload-rail.md) and [docs/deep-agents-patterns.md](docs/deep-agents-patterns.md).
590
-
591
- ## Workflow Rail
592
-
593
- Workflow Rail stores local task state under `.soturail/workflows/` and can optionally plan Git worktree isolation. v0.7.0 adds phase artifacts for setup, plan, work, review, verify and evidence.
594
-
595
- ```bash
596
- soturail workflow setup
597
- soturail workflow plan "Implement feature"
598
- soturail workflow work --note "Progress note"
599
- soturail workflow review --all
600
- soturail workflow verify
601
- soturail workflow evidence <id>
602
- soturail workflow diagram <id>
603
- soturail workflow new "Implement feature"
604
- soturail workflow list
605
- soturail workflow show <id>
606
- soturail workflow close <id>
607
- soturail workflow start <id> --worktree --dry-run
608
- ```
609
-
610
- SotuRail does not push, merge or delete worktrees automatically.
611
-
612
- Harness-style phases and diagram-driven workflows are documented in [docs/workflow-rail.md](docs/workflow-rail.md), [docs/harness-rail.md](docs/harness-rail.md) and [docs/diagram-rail.md](docs/diagram-rail.md).
613
-
614
- ## Skill Rail
615
-
616
- Skill Rail creates, validates, exports and packs safe local agent skills without depending on external skill ecosystems.
617
-
618
- ```bash
619
- soturail skills init demo-skill
620
- soturail skills list
621
- soturail skills validate
622
- soturail skills export --target claude
623
- soturail skills pack --format markdown
624
121
  ```
625
122
 
626
- Exports are written under `.soturail/exports/skills/` and should be reviewed before enabling in an agent host. Examples live under [examples/skills](examples/skills).
627
-
628
- Future task/role-aware skill routing is tracked in [docs/skill-rail.md](docs/skill-rail.md).
629
-
630
- ## Reducers And Dedupe
631
-
632
- v0.3.2 added stronger reducers for common developer commands including `npm install`, `npm test`, Vitest, `tsc`, `git diff`, `git status`, Docker logs, ESLint, Vite/Next build output and Java/Maven/Gradle failures. Reducers preserve errors, warnings, file paths, line/column references, stack traces, security warnings and the raw recovery hint.
633
-
634
- Block-level dedupe is conservative by default. It can replace repeated safe blocks with references such as `[deduped block: ...]`, while preserving error blocks and current failure context. Similar-output dedupe is experimental and opt-in:
635
-
636
- ```bash
637
- soturail run --similar-dedupe conservative npm test
638
- soturail dedupe stats
639
- ```
640
-
641
- ## Benchmarks And Honest Metrics
642
-
643
- SotuRail includes deterministic local fixtures for terminal compression, agent response compression, JSON/tool payload compression, Knowledge-to-Rules structuring, dedupe and native performance readiness.
644
-
645
- ```bash
646
- npm run build
647
- soturail bench prepare
648
- soturail bench run --engine ts
649
- soturail bench run --suite brain
650
- soturail native candidates
651
- soturail self baseline --check
652
- soturail bench report
653
- ```
654
-
655
- The latest report is written to [benchmarks/reports/latest.md](benchmarks/reports/latest.md). External comparisons are optional and user-provided only.
656
-
657
- Local token counts are deterministic estimates. SotuRail reports raw payload tokens, reduced payload tokens, metadata overhead and net estimated tokens. For tiny outputs, compression may be ineffective once recovery metadata is included; SotuRail says that directly while preserving raw recovery paths.
658
-
659
- Benchmark Rail 2.0 writes `.soturail/bench/latest.json`, `.soturail/bench/latest.md` and versioned reports such as `benchmarks/reports/bench-v<version>.json`. It covers `brain-scan`, `brain-stale`, `brain-consolidate`, `reverse-claims`, `reducer-large-log`, `jsonl-read-write`, `range-hash`, `file-scan`, `workflow-evidence`, `format-compare`, `json-validate` and `release-preflight`.
660
-
661
- ## Knowledge-to-Rules Engine
662
-
663
- SotuRail can ingest Markdown, TXT, JSON and YAML into structured YAML/JSON rules, checklists, citations and simple validators.
664
-
665
- ```bash
666
- soturail ingest docs/requirements.md --type requirements
667
- soturail rules list
668
- soturail rules check
669
- soturail rules export --format yaml
670
- ```
671
-
672
- This makes heavy docs smaller, reusable and auditable without inventing rules that do not appear in the source. See [docs/knowledge-to-rules.md](docs/knowledge-to-rules.md), [docs/rules.md](docs/rules.md) and [docs/policy-rail.md](docs/policy-rail.md).
673
-
674
- ## Prompt Caching Design
675
-
676
- Stable blocks are ordered before dynamic data:
677
-
678
- 1. static_header
679
- 2. governance
680
- 3. config
681
- 4. repo_map
682
- 5. approved_specs
683
- 6. approved_memory
684
- 7. dynamic_footer
685
-
686
- SotuRail reports estimated cache stability only. It never claims real provider cache hits unless imported metadata exists.
687
-
688
- ## Native Performance Path
689
-
690
- TypeScript remains the public CLI, orchestration, docs and npm distribution layer. Rust handles optional hot paths where streaming, low overhead and binary execution matter:
691
-
692
- - native terminal reducers;
693
- - native JSON/tool payload reducer;
694
- - native tee-stream runner with raw log and summary sidecar support.
695
-
696
- SotuRail does not claim native speedups unless local benchmark results show them for your machine.
697
-
698
- ## Security Model
699
-
700
- `soturail run` blocks dangerous patterns by default, including `rm -rf`, `sudo`, `format`, `dd if=`, `curl | sh`, `del /s` and `git push`.
701
-
702
- Raw logs may contain secrets because they preserve real terminal output. Treat `.soturail/raw/` as local evidence, not public artifact material. `soturail expand <raw_id>` redacts probable secrets by default; use `--allow-raw --yes` only when you intentionally need exact raw output.
703
-
704
- Policy queue, auth guidance and MCP exposure reports are tracked in [docs/policy-rail.md](docs/policy-rail.md) and [docs/security-model.md](docs/security-model.md).
705
-
706
- ## Migration
707
-
708
- Moving from v0.4.x to v0.5.x keeps the agent export, MCP and Workflow Rail commands, then adds local `.soturail/` folders for Memory, Context Intelligence, Harness, Policy, Filesystem Evidence and Run Workspace seeds. See [docs/migration-v0.5.md](docs/migration-v0.5.md).
709
-
710
- ## Windows Notes
711
-
712
- Windows users should see [docs/windows.md](docs/windows.md) for CMD vs PowerShell quoting, global install, `npx`, local tarball testing and common paste mistakes such as copying Markdown code-fence labels into CMD.
713
-
714
- ## Comparison Philosophy
715
-
716
- SotuRail is inspired by the broader context-engineering ecosystem, including terminal reducers, agent response compression, spec-driven workflows, local memory, rules extraction, hooks, benchmarks, skill registries, agent memory, harness workflows, Mermaid diagram-driven development, structured prompt payloads and gateway/observability ideas. SotuRail does not vendor or depend on those projects. It aims to unify similar ideas into one local-first workflow while keeping benchmarks honest. See [docs/comparisons.md](docs/comparisons.md), [docs/ecosystem-influences.md](docs/ecosystem-influences.md), [docs/deep-agents-patterns.md](docs/deep-agents-patterns.md) and [docs/future-rails-index.md](docs/future-rails-index.md).
717
-
718
- ## Roadmap
719
-
720
- See [ROADMAP.md](ROADMAP.md).
721
-
722
- Near-term direction:
723
-
724
- ```txt
725
- v0.5.0 Memory Rail + Context Intelligence + Role Packs + Harness/Policy seeds + reliability
726
- v0.5.1 Memory/context polish + Structured Payload Rail + Agent Docs Hygiene + Diagram docs
727
- v0.5.2 CI stabilization + lightweight quality fixtures + roadmap realignment
728
- v0.6.0 Real agent runtime integration + host capability matrix + host-aware payload/policy docs
729
- v0.6.1 Agent UX polish + full evaluation suite
730
- v0.7.0 Workflow Rail 2.0 + Harness Rail + Diagram Rail + .spec.md visual contracts
731
- v0.8.0 Verified Project Brain + Reverse Specification Rail
732
- v0.8.1 Project Brain polish, stale-evidence quality and agent-brief improvements
733
- v0.9.0 Benchmark-gated native/performance engine
734
- v0.10.0 Local reports, observability timeline and static dashboard
735
- v0.10.1 Stability, JSON validity, report polish and v1 readiness
736
- v1.0.0 Stable Context OS surface and strict contracts
737
- v1.1.0 Host Compatibility Rail
738
- v1.2.0 Harness Lifecycle Rail + Spec/Design/Diagram planning
739
- v1.3.0 Knowledge Graph Rail
740
- v1.4.0 Skill Rail 2.0 And Domain Skill Packs
741
- v1.5.0 Governance And Cost Rail
742
- ```
743
-
744
- ## Contributing
745
-
746
- See [CONTRIBUTING.md](CONTRIBUTING.md). Reducers, hooks and rules should include tests, safety notes and benchmark impact when relevant.
123
+ Tests are local and deterministic. No network is required for normal commands or test suites.
747
124
 
748
125
  ## License
749
126
 
750
- SotuRail is licensed under the [Apache License 2.0](LICENSE).
751
-
752
- This means you can use, copy, modify, distribute and build on the project under the Apache-2.0 terms, including commercial use, as long as the license notice is preserved.
753
-
754
- Older releases remain governed by the license terms that applied at the time of each release.
755
-
756
- See [docs/licensing-strategy.md](docs/licensing-strategy.md).
127
+ Apache-2.0. See [LICENSE](LICENSE).