OctoEvidence.Cli
0.0.7
See the version list below for details.
dotnet tool install --global OctoEvidence.Cli --version 0.0.7
dotnet new tool-manifest
dotnet tool install --local OctoEvidence.Cli --version 0.0.7
#tool dotnet:?package=OctoEvidence.Cli&version=0.0.7
nuke :add-package OctoEvidence.Cli --version 0.0.7
OctoEvidence
OctoEvidence is a deterministic control plane for agent-authored Open Knowledge Format (OKF) v0.2 bundles. It helps an AI coding agent discover project knowledge, validate it, verify cited source lines, route future tasks, and reconcile knowledge with a Git branch. It does not call a model or author knowledge itself.
The model
Every project must contain octoevidence.json, and that file must define knowledgeRoot.
There is no runtime fallback. If the configuration is missing, malformed, points to a missing
directory, or omits knowledgeRoot, commands stop with a configuration error.
A knowledge root contains units at one fixed depth:
<knowledgeRoot>/
<area>/
<name>/
index.md
component.md
...agent-authored Markdown
The unit name and bundle path are the same string. For example, backend/identity lives at
<knowledgeRoot>/backend/identity/. There is no okf/ marker and no recursive source-tree
discovery.
Knowledge first, source authoritative
OKF is a compact, cited map of the codebase. An agent starts with find_components and
read_component to learn the relevant concepts and narrow its source reads to the right unit,
files, and lines instead of scanning the whole repository.
That knowledge is not a substitute for the current implementation. For questions about how a mechanism works, which path executes, or whether a setting is enabled, the checked-out source code and active configuration are authoritative. If they disagree with OKF, the agent answers from the implementation and repairs any owned stale knowledge. Requirements and linked decision records remain the authority for intent.
Install
dotnet tool install --global OctoEvidence.Cli
The executable is global; every configuration file, bundle, generated agent asset, cache marker, and MCP registration remains project-scoped.
Initialize a project
Run from the repository:
octoevidence init
On a new project, init scaffolds octoevidence.json with a local knowledge_base directory:
{
"schemaVersion": 1,
"knowledgeRoot": "knowledge_base",
"modules": [
// Ask your agent: "fill octoevidence.json from the source tree".
]
}
knowledgeRoot is relative to the repository unless it is absolute. init creates the local
knowledge_base/ directory, but runtime commands never invent or substitute a root.
Describe the source modules and their knowledge access:
{
"schemaVersion": 1,
"knowledgeRoot": "knowledge_base",
"modules": [
{
"src": "src/identity",
"okf": [
{ "unit": "backend/identity", "access": "readwrite" },
{ "unit": "brd/*", "access": "read" }
]
}
]
}
Then run octoevidence init again. It creates the empty directory of every exact unit declared
readwrite, such as knowledge_base/backend/identity/. It creates no file inside a bundle;
the external agent owns every bundle byte, including index.md.
Module src paths must exist inside the selected source repository. Absolute paths, ..
escapes, and symbolic-link or junction escapes are rejected.
Access and ownership
readwritemeans the module owns the unit. Itssrcfolder is the evidence root for claims, it may prepare citations and author the bundle, and its branch drift is a gate.readmeans visibility only. The project may inspect the unit but cannot cite for it, prepare it for authoring, or pull branch changes into it.<area>/*grants the stated access to every unit in that area.- An absent or empty
moduleslist sees all existing units and owns none. --scopeandOCTOEVIDENCE_SCOPEchange visibility for one run; they never grant ownership.
Examples:
octoevidence component list
octoevidence component list --scope owned
octoevidence brd list --scope brd
Local and shared knowledge roots
The default local layout is:
repository/
octoevidence.json
src/
knowledge_base/
octoevidence.json
backend/
identity/
brd/
refunds-v2/
trd/
refund-service/
The repository-level file owns the mapping from source to knowledge. The file inside
knowledge_base/ owns synchronization for that knowledge tree:
{
"schemaVersion": 1,
"syncBranch": "origin/main",
"fetchEverySeconds": 300
}
init --sync-branch origin/main writes that policy to the knowledge root. When
knowledgeRoot points to a shared hub, the hub's configuration supplies the same policy to
every source repository that consumes it.
For a shared hub, point knowledgeRoot at its clone:
{
"knowledgeRoot": "../company-knowledge",
"modules": [
{
"src": "src",
"okf": [
{ "unit": "backend/identity", "access": "readwrite" },
{ "unit": "web/app", "access": "read" },
{ "unit": "brd/*", "access": "read" }
]
}
]
}
Set OCTOEVIDENCE_KNOWLEDGE_ROOT only when one machine clones an already-configured root at a
different path. The variable may override a configured path; it cannot introduce one.
Component workflow
octoevidence component list
octoevidence component find "refund authorization"
octoevidence component prepare backend/identity --prompt "document refund authorization"
octoevidence component cite backend/identity RefundEndpoint.cs --lines 20-42
octoevidence component validate backend/identity --fail-on-error
The agent stores prose, links, locations, and citation digests in the bundle. It does not copy source code, SQL, DDL, credentials, data rows, raw configuration, or logs into knowledge.
Synchronization
OctoEvidence compares each unit across the working tree, merge base, and immutable source-branch revision. The six states are:
in-synclocal-onlyremote-onlylocal-aheadremote-aheaddiverged
Check and reconcile with:
octoevidence component check
octoevidence component pull backend/identity
Pull is explicit and ownership-scoped. It applies only remote-only and remote-ahead bundles
owned by this project, rechecks state immediately before writing, and refuses divergence.
Read-only units are never changed. A remote-ahead pull may overwrite or delete unchanged local
bundle documents to reproduce the branch snapshot, so MCP hosts receive destructive-operation
metadata for both the pull tool and the check tool that can apply a user-approved pull.
Business and technical requirement documents
BRDs and TRDs use the same unit layout:
<knowledgeRoot>/brd/<slug>/
<knowledgeRoot>/trd/<slug>/
The source .docx remains in the source repository or the author's document location, outside
the knowledge root. A bundle records its relative source path and whole-file digest.
Useful commands:
octoevidence brd ingest docs/refunds.docx
octoevidence brd extract docs/refunds.docx
octoevidence brd list
octoevidence brd analyze refunds-v2
octoevidence brd trace refunds-v2
octoevidence brd history refunds-v2
Extraction is deterministic and read-only. The agent decides semantic overlap and authors the BRD or TRD bundle; OctoEvidence performs schema, graph, coverage, blocking, readiness, history, and traceability calculations over that authored content.
MCP surface
Register the project-scoped server using the command printed by init. Important tools include:
check_component_updatespull_okf_updateslist_okf_componentsprepare_okf_fillfind_componentsread_componentcite_linesvalidate_okfokf_authoring_guideprepare_brd_ingest,read_brd_source,list_brds,read_brdanalyze_brd,trace_brd,read_brd_history
The MCP server uses standard input/output and makes no model calls.
Configuration reference
| Field | Location | Meaning |
|---|---|---|
schemaVersion |
Both | Configuration schema version; currently 1. |
knowledgeRoot |
Source repository | Required path to the knowledge root, relative or absolute. |
modules |
Source repository | Source-folder-to-unit access map. |
syncBranch |
Knowledge root | Local or remote-tracking branch used for three-way comparison. |
fetchEverySeconds |
Knowledge root | Fetch throttle. 0 always fetches, -1 disables fetching, default 300. |
JSON comments and trailing commas are accepted.
Development
dotnet restore OctoEvidence.slnx
dotnet build OctoEvidence.slnx --configuration Release
dotnet test OctoEvidence.slnx --configuration Release
dotnet format OctoEvidence.slnx --verify-no-changes --no-restore
CI runs on Windows and Linux and includes a packaged global-tool smoke test.
See docs/architecture.md for the internal design and PRODUCT.md for the normative product contract.
License
See LICENSE.txt.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.0.18 | 171 | 8/27/2026 |
| 0.0.17 | 120 | 8/27/2026 |
| 0.0.16 | 131 | 8/26/2026 |
| 0.0.15 | 135 | 8/26/2026 |
| 0.0.14 | 130 | 8/25/2026 |
| 0.0.13 | 139 | 8/23/2026 |
| 0.0.12 | 124 | 8/21/2026 |
| 0.0.11 | 135 | 8/21/2026 |
| 0.0.10 | 137 | 8/21/2026 |
| 0.0.9 | 137 | 8/20/2026 |
| 0.0.8 | 133 | 8/19/2026 |
| 0.0.7 | 139 | 8/18/2026 |
| 0.0.6 | 148 | 8/17/2026 |
| 0.0.5 | 156 | 8/16/2026 |
| 0.0.4 | 125 | 8/7/2026 |
| 0.0.3 | 151 | 8/2/2026 |
| 0.0.2 | 155 | 8/2/2026 |
| 0.0.1 | 158 | 7/23/2026 |
- BREAKING: every runtime command now requires a valid octoevidence.json with a non-empty knowledgeRoot. There is no fallback to the source repository; init scaffolds knowledge_base for a local project.
- Uniform knowledge layout: every bundle lives directly at <knowledgeRoot>/<area>/<name>, including brd/<slug> and trd/<slug>. Unit names and bundle paths are identical; there is no okf marker.
- Module access: modules map contained source folders to exact units or area wildcards. readwrite is ownership; read is visibility only. Missing, external, or link-escaping source folders are rejected.
- Ownership-safe synchronization: read-only drift is visible but never gates, and pull applies only to explicitly owned remote-only or remote-ahead units. MCP mutation metadata reflects that an approved pull may overwrite or delete bundle documents.
- Agent guidance now treats OKF as a compact, cited map for targeted understanding while keeping checked-out source code and active configuration authoritative for current implementation mechanics and state.
- Deterministic BRD/TRD workflows include DOCX extraction, typed registers, coverage and blocking analysis, platform views, test coverage, Git history, reverse relations, and requirement-to-code traceability.
- CLI, MCP, generated agent assets, package smoke tests, README, product contract, and architecture documentation describe the same configuration and layout.