OctoEvidence.Cli 0.0.13

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global OctoEvidence.Cli --version 0.0.13
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local OctoEvidence.Cli --version 0.0.13
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=OctoEvidence.Cli&version=0.0.13
                    
nuke :add-package OctoEvidence.Cli --version 0.0.13
                    

OctoEvidence

OctoEvidence is a file-backed knowledge and traceability control plane for a four-role delivery team: business analyst, solution architect, developer, and quality engineer. It holds the facts a project runs on — business rules, requirements, API contracts, technology stacks, configuration — each cited to a real source, and turns them into reviewable work: needs, requirements, architecture, components, stories, per-platform tasks with a generated brief, proven changes, and a feature document that reconciles what was intended with what was built and verified.

There are no readiness gates, stage outcomes, continuous controls, or waivers. Readiness is carried by accepted records, their typed trace, and their evidence.

See PRODUCT.md for the product contract, docs/architecture.md for implementation boundaries, and the field guide for the people who use it. The field guide is written for the human who never opens a terminal. It walks the flows a project actually runs through: day one on an existing codebase, brief to requirements, design, stories and tasks, shipping a change, verification, and reconciliation. Every step shows the same three lanes: what the person says in their own words, what the agent does with the tool, and the decision only a human may take.

Supported surface

This greenfield project has one v1 format and no compatibility layer. The CLI exposes:

octoevidence init
octoevidence doctor
octoevidence agent
octoevidence id
octoevidence knowledge
octoevidence lifecycle
octoevidence mcp
octoevidence serve

Unknown configuration fields, versions, record layouts, roles, platforms, identity kinds, source kinds, statuses, document types, trace relations, and reserved task.* properties fail closed.

Exit codes are part of the contract: 0 ok · 1 usage error · 2 refusal or domain error · 3 doctor unhealthy or agent setup incomplete · 4 unexpected error, reported as a message and never as a stack trace.

Build

The repository targets .NET 10. The web portal is a TypeScript client built with Node 20+.

dotnet restore OctoEvidence.slnx
npm ci --prefix src/OctoEvidence.Cli/ClientApp
npm run build --prefix src/OctoEvidence.Cli/ClientApp
dotnet build OctoEvidence.slnx --no-restore
dotnet test OctoEvidence.slnx --no-build

The client build is optional for the CLI and MCP: without it, octoevidence serve reports that the portal is not built into the executable and everything else works unchanged.

Initialize source and knowledge repositories

Choose the role doing the first work. Initialization inspects the repository, detects its platforms and existing source/test roots, and returns the role's ready prompt:

octoevidence init --directory . --role developer

Friendly role names such as developer, ba, qa, architect, solution-architect, sa, and coordinator map to the closed role catalog. Developer setup fails when no source code exists; it never creates a plausible empty mapping. A new repository can start as coordinator, BA, or architect before code exists. Preview detection without writing anything:

octoevidence init --directory . --role developer --dry-run

Override detection only when the repository needs it:

octoevidence init --directory . --role developer `
  --knowledge-root ..\checkout-knowledge `
  --platform backend --platform web `
  --source "src/**" --source "tests/**"

For several source repositories, run init once in each repository and point every command at the same knowledge root. The first call creates knowledge.json; later calls adopt its existing knw_* identity and append their own distinct rep_* identity. Concurrent first calls also converge: atomic manifest creation selects one knw_*, and only a losing configuration newly created by that init may adopt it. A pre-existing incompatible configuration fails for explicit repair instead of being silently rebound.

Initialization creates only what is immediately required:

  • octoevidence.json with immutable source-repository and knowledge-workspace identities;
  • schemas/repository-config.v1.json beside that configuration;
  • <knowledge.root>/knowledge.json with attached source repository ids;
  • the five knowledge JSON schemas under <knowledge.root>/schemas/.

Canonical collection folders and .octoevidence-evidence/ are created lazily by the operation that first needs them. octoevidence agent setup remains an explicit integration step when project-local agent assets are wanted.

{
  "$schema": "schemas/repository-config.v1.json",
  "schemaVersion": 1,
  "repository": {
    "id": "rep_0198d42e0f51733198b5b60311768020",
    "platforms": ["backend"]
  },
  "knowledge": {
    "id": "knw_0198d42e0f51733198b5b60311768021",
    "root": "../checkout-knowledge"
  },
  "bindings": [
    {
      "id": "cmp_0198d42e0f51733198b5b60311768022",
      "unit": "components/cmp_0198d42e0f51733198b5b60311768022",
      "role": "owner",
      "platforms": ["backend"],
      "sources": ["src/**", "tests/**"]
    }
  ],
  "lifecycleRoles": [
    {
      "profile": "octoevidence/four-role-delivery/v1",
      "role": "coordinator"
    }
  ]
}

Each source repository has its own rep_*. Several repositories may attach to the same knw_* workspace by pointing --knowledge-root at the same location. Commands validate that octoevidence.json and knowledge.json agree. A developer binding declares which source globs a component owns; the architect creates that component's record with knowledge record create component --id <the binding's cmp_id> so binding and record share one identity. lifecycleRoles is a repository capability: only a coordinator repository may create or reconcile a project; a reader repository inspects.

Agent-first kickoff

Agents operate; the human reviews. Agents inspect, register sources, extract cited observations, create and revise canonical records, derive stories and platform tasks, brief and implement changes, run checks, capture evidence, maintain trace, and generate the feature document. Only a human may accept or reject knowledge or a generated document, confirm that a stale or unconfirmed fact still holds, approve a planned task, or accept a completed change. A residual risk is stated in the record that carries it and is accepted with that record; there is no separate risk surface.

octoevidence agent setup --directory . --role developer
octoevidence agent setup --directory . --role developer --target codex --prune
octoevidence agent setup --directory . --role developer --target claude --prune
octoevidence agent roles
octoevidence agent roles --explain developer
octoevidence agent prompt --role lifecycle-coordinator --mode delivery

--target all is the compatibility default: it installs the canonical skill beneath .agents and a Claude discovery mirror beneath .claude. Use codex or claude for a single-host repository; add --prune to remove unchanged built-in assets from the other target while preserving local customizations as conflicts.

--prune removes unselected role and out-of-target skill files only when their content exactly matches the corresponding built-in asset; modified or unknown octoevidence-* files are preserved and reported as conflicts.

Start as Canonical role First responsibility
coordinator Lifecycle coordinator Scope the system, sequence roles, keep trace and evidence whole, hand off to the reviewer.
ba Business analyst Turn cited needs into verifiable requirements and acceptance criteria; derive stories.
architect Software architect Define component, interface, data, deployment, and trust boundaries with platform facts.
developer Software developer Take the brief, implement, pin the revision, prove the checks, advance the change.
qa Quality engineer Plan and execute separate verification and validation evidence; verify changes.

There is no separate security, product, operations, or audit role: the four roles carry security between them, and the coordinator is an orchestrator the agent plays, not a person.

agent prompt binds one session to one role, one mode, and optionally one task and one project:

octoevidence agent prompt `
  --role business-analyst `
  --mode knowledge `
  --task "Reconcile the payment requirements against the current code and list every conflict" `
  --lifecycle lcy_<UUIDv7>

Two modes exist:

Mode Use it for
delivery A baseline, a feature, a fix, or a change to existing behaviour, through to human review.
knowledge Building, correcting, or reconciling canonical knowledge with no repository edit, no review, no change advance, and no project mutation. Safe for any person in any role.

An unknown role, mode, or lifecycle id fails closed, and a requested task over 2000 characters is rejected rather than pasted into the prompt.

Start a project and ingest existing material

$lifecycle = (octoevidence lifecycle create checkout `
  --directory . `
  --title "Checkout" `
  --platform backend --platform android `
  --actor human:product-owner | ConvertFrom-Json).id

$brd = (octoevidence knowledge source add docs/BRD.md `
  --directory . `
  --kind brd `
  --actor agent:business-analyst | ConvertFrom-Json).id

$observation = (octoevidence knowledge observation add `
  --directory . `
  --lifecycle $lifecycle `
  --statement "Customers need one reliable checkout journey." `
  --classification observed `
  --citation "$brd@heading: Business need" `
  --actor agent:business-analyst | ConvertFrom-Json).id

Existing BRDs and TRDs are inputs. Source code, tests, pipelines, API contracts, and stack documents are registered the same way. A source record stores repository id, path, revision, SHA-256, who registered it, and who last refreshed it (updatedBy). source add, source refresh, and lifecycle reconcile default --revision to git rev-parse HEAD when the repository is a clean Git work tree; otherwise --revision is required. If the file changes:

octoevidence knowledge source refresh $brd --directory . --actor agent:business-analyst

Refresh appends source history, then compares the exact span each citation names — a heading, a symbol, a statement — rather than the whole file, and sorts the dependent observations three ways: untouched when every cited span is byte-identical after normalizing line endings and trailing whitespace, stale when a cited span moved, and unconfirmed when a span resolved but had no earlier digest to compare against. A locator that cannot be resolved falls back to watching the whole file. Stale blocks the records citing it; unconfirmed asks for a look but does not block.

A stale or unconfirmed fact whose statement still holds is settled without being replaced:

octoevidence knowledge observation confirm $observation `
  --directory . `
  --actor human:product-owner `
  --rationale "Re-read the Business need heading at the new revision; the statement is unchanged."

Confirmation re-binds every citation to the span as it stands now and keeps the id, history, and trace. It needs a human:<name> who did not write the observation (four eyes), validates the observation, and is refused when a cited source belongs to another repository. A fact that had been accepted returns to accepted; one that never was returns to proposed for ordinary review. When the statement itself is now wrong, the agent extracts a new observation instead. doctor reports the drift as knowledge.source.changed, knowledge.observation.stale, and knowledge.observation.unconfirmed, each pointing at lifecycle reconcile.

Proposed observations are routed to the review role best matched by their cited source kinds, tags, classification, and statement. The queue explains its choice. Conflicts go to the coordinator; ambiguous content falls back to Business analyst triage. Stale and unconfirmed observations appear in the queue with a confirm action. Ask for a role's queue directly — --lifecycle defaults to the single project when exactly one exists:

octoevidence knowledge queue --directory . --role ba

A human in the assigned role, or the coordinator, can move the accept/reject decision to another role without supplying a comment:

octoevidence knowledge observation assignment $observation --directory .

octoevidence knowledge observation delegate $observation `
  --directory . `
  --from-role business-analyst `
  --to-role software-architect `
  --actor human:product-owner

The transfer is appended to the observation's audit history. It changes the role queue, not the observation's review status; acceptance and rejection remain named-human decisions.

Human review and canonical records

Agents create proposals. A human records acceptance or rejection:

octoevidence knowledge review $observation `
  --directory . `
  --status accepted `
  --actor human:product-owner

$need = (octoevidence knowledge record create need `
  --directory . `
  --lifecycle $lifecycle `
  --title "Reliable checkout" `
  --summary "Customers complete checkout without duplicate payment." `
  --observation $observation `
  --property "success-measure=Successful checkout rate is measured." `
  --actor agent:business-analyst | ConvertFrom-Json).id

$requirement = (octoevidence knowledge record create requirement `
  --directory . `
  --lifecycle $lifecycle `
  --title "Place order" `
  --summary "The system accepts a submitted cart as an order." `
  --observation $observation `
  --trace "refines:$need" `
  --property "user-story=As a customer I want to submit my cart so that I can pay for it." `
  --property "acceptance-criterion.1=POST /orders returns 201 with the order id." `
  --actor agent:business-analyst | ConvertFrom-Json).id

octoevidence knowledge review $need `
  --directory . `
  --status accepted `
  --actor human:product-owner

Canonical kinds are need, requirement, architecture, component, story, change, and test-campaign. Records support typed trace, structured properties, revisions, append-only revision history, and append-only human review decisions.

Review rules the tool enforces:

  • only a human:<name> actor may accept, reject, or confirm; acceptance needs no comment, while rejection and confirmation require a rationale that tells agents what to revise, revalidate, or what was re-read;
  • a record may be accepted while the facts it cites are still proposed or unconfirmed — the accountable decision sits on the record — but never on a rejected or stale fact or a trace target that is not accepted;
  • a person who proposed or revised a record does not accept it, and a person who wrote an observation does not confirm it (four eyes);
  • a rejected record must be revised before it can be accepted;
  • a decision is recorded once, and a record that accepted records depend on cannot be rejected until they are revised or rejected first.

Revise a record without changing its identity:

octoevidence knowledge record revise $need `
  --directory . `
  --summary "Customers complete a measurable checkout without duplicate payment." `
  --rationale "Clarify the measurable outcome." `
  --actor agent:business-analyst

A revision returns the record to proposed. Use repeated --observation, --platform, or --trace values to replace those complete sets, --property name=value to add/replace a property, and --remove-property name to remove one. Properties beginning with task. belong to the change workflow and are refused here.

Design: platform facts live on architecture and components

$component = (octoevidence knowledge record create component `
  --directory . --lifecycle $lifecycle `
  --title "Orders API" --summary "Owns order intake and persistence." `
  --platform backend `
  --observation $observation `
  --trace "realizes:$requirement" `
  --property "stack=.NET 10" --property "interface=POST /orders" `
  --actor agent:software-architect | ConvertFrom-Json).id

A requirement names no platform. A component owns its platforms and traces realizes to the requirements it implements; that trace is what turns a story into one task per platform and what the brief reads its stack=, interface=, data=, and dependency= facts from.

Stories, tasks, and the brief

octoevidence knowledge story suggest --directory . --lifecycle $lifecycle

$story = octoevidence knowledge story create `
  --directory . `
  --requirement $requirement `
  --title "Place order" `
  --component $component `
  --actor agent:business-analyst | ConvertFrom-Json

octoevidence knowledge change link $story.tasks[0].id --directory . --key PAY-481
octoevidence knowledge brief PAY-481 --directory .

story suggest lists, per accepted requirement without a story, its acceptance criteria and the components that realise it. story create writes one proposed sto_* and one planned chg_* per platform of each named component; a requirement carries one story. The team's ticket key is attached once, and the brief answers to the key or the chg_* id. It carries the requirement and its acceptance criteria, the need it serves, the platform's stack and contract facts, the trace ids, blockers, the rules, an implementation prompt, and what is not yet known. The MCP equivalents are suggest_stories, create_story, link_change_key, open_change, and brief_change.

The change lifecycle

planned ──► approved ──► implemented ──► deployed ──► verified ──► closed
octoevidence knowledge change advance PAY-481 --directory . --to approved `
  --actor human:solution-architect --rationale "Scope agreed."

octoevidence knowledge record revise $story.tasks[0].id --directory . `
  --property "revision=$(git rev-parse HEAD)" `
  --property "check.unit=dotnet test" `
  --property "evidence.unit=.octoevidence-evidence/tests/unit.log@<sha256>" `
  --actor agent:software-developer --rationale "Record the revision and the check that ran."

octoevidence knowledge change advance PAY-481 --directory . --to implemented `
  --actor agent:software-developer --rationale "Built and tested."

approved takes a human who authored neither the story nor the change, and the task's story must already be accepted; implemented needs revision, one check.<name> per check that ran, and a matching evidence.<name> whose artifact lies beneath .octoevidence-evidence/ and still hashes; deployed needs a check.deploy-<env> with evidence; verified needs a tst_* that verifies the change and every depends-on change at least deployed. Accepting the change is what closes it, and acceptance re-hashes the evidence again. A bug is knowledge change bug PAY-481: a new planned change in the same story that supersedes the one it corrects; the feature cannot close while it is open.

Generate the feature document

$document = (octoevidence knowledge document generate `
  --directory . --feature $need `
  --actor agent:quality-engineer | ConvertFrom-Json).id

Each run creates:

documents/<doc_id>/
├── record.json   type, feature, lifecycle, status, inputs, fingerprint, digest, decisions
└── content.md    the generated review view

The document is scoped to one need. It reconciles requirements, stories, architecture, components, platform tasks with their state, changes, verification, the observations everything cites, the trace between them, and what is not yet settled. content.md is never hand-edited. A changed input or a record joining the feature makes the snapshot non-current; regenerate instead. A human can accept it only when every input is accepted and unchanged and every requirement, story, and change in scope has an accepted tst_* that verifies it. knowledge review-feature <nde_id> applies one human decision across every proposed observation and record in the feature, in dependency order; changes are always accepted one at a time against their own evidence.

Reconcile after implementation

octoevidence lifecycle reconcile --directory . --lifecycle $lifecycle --actor agent:lifecycle-coordinator

Reconciliation re-reads every source this repository registered and every evidence artifact its changes cite, refreshes the sources that moved, compares each cited span, sorts dependent observations into untouched, stale, unconfirmed, and alreadyStale, names the records that now rest on them, reports evidence that was rewritten after it was recorded, and lists generated documents that stopped being current. --dry-run reports without refreshing and is allowed in knowledge mode. doctor re-hashes the same evidence on every health check.

Identities and collections

Ids use a type prefix followed by UUIDv7. They are immutable and never derived from a title, path, platform, repository URL, branch, revision, or sequence.

rep_ knw_ sys_ lcy_ src_ obs_ doc_ nde_ req_ arc_ cmp_ sto_ chg_ tst_
knowledge.json      sources/           observations/       documents/
lifecycles/         needs/             requirements/       architectures/
components/         stories/           changes/            test-campaigns/

The JSON contracts used to build and validate the tool are in schemas. Initialization installs the repository schema beside octoevidence.json and the knowledge schemas beneath the configured knowledge root. Nested canonical records use portable ../../schemas/... references. Run octoevidence knowledge schema sync after upgrading an existing workspace. Record directories and record bodies must agree on id and kind. Non-ASCII text is stored as written, so Arabic and other scripts read in Git diffs, and records are written with LF line endings on every OS; digests and document currency are line-ending independent. doctor validates source freshness, citations, status dependencies, trace targets, generated-document integrity, project headers, and change evidence, and names each problem by rule id (for example knowledge.change.evidence, knowledge.source.changed, knowledge.observation.stale, knowledge.observation.unconfirmed).

Evidence

Evidence is recorded on the change: revision, check.<name>, and evidence.<name>=.octoevidence-evidence/<file>@<sha256>. Artifacts live beneath .octoevidence-evidence/ in the originating source repository and nowhere else; a path that escapes that directory is refused, not merely one whose text does not start with it. The artifact is re-hashed on every state change, at acceptance, in doctor, and in reconcile. A change that landed in another repository names it with repository=rep_<UUIDv7>, and only that repository re-hashes its artifacts.

There is no signing layer. Trust comes from repository permissions and the accountable human who accepts the record.

Web portal

octoevidence serve --directory . --open

The portal is a loopback-only web page over the same operations. A person types their name and picks their role; the portal shows what waits on that role — observations, needs and requirements for the analyst; architecture, components, stories, planned tasks, and verified changes for the architect; approved and implemented tasks for the developer; deployed changes and campaigns for the quality engineer; everything for the coordinator — and lets them accept, reject, approve, advance, read the brief, propose and revise records, create stories, ask the knowledge base, and run the health check and reconciliation. Each observation shows its assigned role, its routing reason, and the citation it rests on; the reviewer can delegate it inline to another role, with optional context, and confirm a stale or unconfirmed one. The queue counts only actionable decisions, every decision dialog says who is deciding and that the decision is recorded once, and a task's state is a six-step progress glyph. Every action is recorded as human:<name>, so the rules above hold: what you propose, someone else accepts.

The typed name is a local declaration, not authenticated identity, and the portal is hardened rather than authenticated: it listens on loopback only and refuses to start anywhere else, every API request must carry the per-process token injected into the page, the Host header is validated, and responses are compressed. Use it only on a trusted machine.

MCP

octoevidence mcp --directory .
octoevidence mcp --directory . --mode knowledge --actor-policy agent-only

The MCP server, named octoevidence, explicitly registers agent, identity, knowledge, and project tools. Knowledge tools register, refresh, and list sources; create, list, inspect assignments for, delegate, and confirm observations (confirm_knowledge_observation); create, revise, trace, inspect, list, query, and review canonical records; read a role's queue (review_queue) and run the health check (validate_knowledge); suggest and create stories; open, link, advance, and brief changes; open bugs; review a whole feature; and generate and list feature documents (generate_feature_document, list_feature_documents). Agent and identity tools are setup_agents, list_agent_roles, create_agent_prompt, and new_id. Every mutating tool requires an explicit actor, and revise and trace require rationale; nothing is defaulted.

--mode knowledge registers no review, approval, or project-mutation tool, and --actor-policy agent-only refuses human: actors over MCP so that human decisions are recorded only through the CLI or the portal. The defaults are full and any. Every refusal reaches the calling agent with its reason. Assembly scanning cannot expose unrelated attributed tools.

License

MIT. See LICENSE.txt.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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

0.0.13
- Citations are compared span by span: refresh and reconcile sort each fact into untouched, stale, or unconfirmed, fall back to watching the whole file when a locator cannot be resolved, and digest after normalizing line endings and trailing whitespace. reconcile --dry-run reports alreadyStale apart from untouched; doctor reports knowledge.source.changed, knowledge.observation.stale, and knowledge.observation.unconfirmed.
- A human who did not write a stale or unconfirmed fact can confirm that it still holds (knowledge observation confirm; MCP confirm_knowledge_observation): citations are re-bound, id, history, and trace are kept, and the fact returns to accepted or to proposed. A cited source from another repository is refused.
- Proposed observations are routed to an explainable review role and can be delegated with an audit trail; stale and unconfirmed facts appear in the role queue with a confirm action and their citation.
- New knowledge queue --role (with --lifecycle defaulting to the single project) and MCP review_queue and validate_knowledge.
- MCP: server name octoevidence, --mode full|knowledge (knowledge registers no review, approve, or project-mutation tool), --actor-policy any|agent-only (refuses human: actors), an explicit actor on every mutating tool with rationale on revise and trace, and renamed tools generate_feature_document, list_feature_documents, new_id, setup_agents, list_agent_roles, and create_agent_prompt.
- Portal: loopback only with a refusal to start elsewhere, a per-process API token, Host validation, compressed responses, queue counts of actionable decisions only, citations in the queue, decision dialogs that say who decides and that a decision is recorded once, a six-step task.state glyph, and a map that folds repeated facts and files into references.
- Records are written with LF line endings on every OS and document currency is line-ending independent. source add, source refresh, and lifecycle reconcile default --revision to a clean work tree's HEAD and record the acting --actor as updatedBy.
- planned to approved requires the task's story to be accepted and four eyes (the approver authored neither the story nor the change); a rejected record must be revised before it can be accepted.
- Exit codes: 0 ok, 1 usage error, 2 refusal, 3 doctor unhealthy or agent setup incomplete, 4 unexpected (message only). Role aliases solution-architect and sa. A residual risk is stated in the record that carries it and accepted with that record; there is no separate risk surface.