Skip to content

Accumulate, maintain, and use knowledge ​

Form candidates from selected conversation records, UTF-8 project files or fixed local Git files, review and retain them in a library, revise outdated content, and maintain carriers that cite it. Retention, carrier saving, and effect verification have separate records. For a first use, start with the guided CLI or Studio. To use saved knowledge in a new task, see complete a task with existing knowledge.

This guide's release baseline is 1.0.0; a source build may contain later changes. Run omk --version after installation and read the migration guide before upgrading.

Capabilities and versions ​

CapabilityAvailability boundary
Core library, artifact authoring, ongoing revision and change reviewAvailable since published 1.0.0-beta.14; Beta.13 does not include this maintenance UI.
Source3 project/trace selection, body generation with windows for long histories, independent source review and association rebuilding, current journals and explicit copy migrationAvailable in 1.0.0-beta.15; published Beta.14 does not contain these capabilities.
Task retrieval, text v2 reading and the official Skill's existing-knowledge maintenance branchAvailable in 1.0.0-beta.15; published Beta.14 contains neither retrieve/text v1 nor v2.
Read retry, save recovery and guided CLI extractionAvailable since 1.0.0-beta.15. The Codex default model and resume fixes are available in 1.0.0.

The current knowledge extraction contract generates prompt, Schema and capacity values from runtime code. It identifies the build rather than replacing release records. @next is a release channel and does not automatically contain unpublished main changes.

Complete your first extraction ​

Install OMK 1.0 and prepare an authenticated runtime, then start the guide:

bash
npm i -g oh-my-knowledge
omk know extract

Without arguments, the CLI helps you choose a source type. To select part of a project file directly:

bash
omk know extract --file PRODUCT.md --lines 1:80

You do not need to assemble SourceRefs or stage JSON by hand. Review the complete source preview before saving, and each complete model request before sending; saving a source does not authorize model dispatch. Extraction calls a model and may incur costs. Completed bodies remain pending candidates rather than becoming retained knowledge automatically.

Use omk know list to find the candidates, then follow inspect and maintain to read and retain them. See guided CLI extraction for traces, existing scopes, interruption recovery, and the fixed JSON interfaces for Agents and CI.

Studio ​

bash
omk studio

Use the returned address and check the current knowledge location first. Changing the default directory does not move saved data. Connected conversations use the host's conversation catalog. For project files, local Git files or configured trace files, the host first supplies a finite source scope, then starts Studio with omk studio --source-scope ./scope.json. The browser chooses configured IDs and relative paths; it cannot grant an arbitrary project root.

  1. Select and preview sources: Choose explicitly authorized material from a conversation turn or Choose sources and extract knowledge. Read complete excerpts and separate read/save/send scopes. Capture selected sources only saves locally. Confirm the writing draft and subsequent body requests separately. Long histories may require separate confirmation of each window. Prepare source review or pending associations separately as needed. Every sent stage may incur cost; model analysis never approves itself.
  2. Review candidates: Read complete body segments, conditions, attribution, exceptions and unknowns; open source evidence. Record a reason to retain, discard, or revise. New revisions require review again.
  3. Review entities as needed: Check names, references, levels, and original text from a candidate or entity list. Entity corrections do not rewrite body; independently apply and review exact segment/entity associations.
  4. Accumulate across records: Create an object in the knowledge library, check whether source entities from different windows refer to the same object, and confirm with reasons. Equal names do not merge identities; resolve ambiguity and missing sources first.
  5. Revise and update: Carrier details show items requiring review after knowledge changes. Inspect revisions, retention changes, and sources item by item before selecting update content; old versions remain available.
  6. Generate and save a carrier: Select matching retained knowledge, choose skill/prompt, check text and exact sources, and save a version. Generation organizes existing content without another model call. Updates rebuild the selected knowledge section while preserving manual content outside it and dependent assets.
  7. Verify a change: Choose verification from carrier details, declare samples, control, and model, and confirm the preview before starting. Read execution and evidence status before conclusions; saving or use alone does not establish effects.

Candidate pages switch between content and source evidence; entity/library lists support narrow-screen switching. Failure, zero candidates, cancellation, and missing sources have explicit states. Extraction records and knowledge todos reopen saved content.

Conversation selection retains the selected messages' complete original records. Every readable event projected from those records appears in the preview and proposed model material. For example, a Claude record can contain both a message and tool events; those same-record events are included. Independent unselected records, project files and attachment originals are not added automatically. Readable previews, raw records retained locally and the complete prepared model request have separate views. Host root paths stay outside model metadata, while paths already written in source text remain source text. This establishes neither complete project coverage nor the truth of assistant-reported execution.

Library, entity, and artifact pages show the selected knowledge directory; reading an explicit directory does not require model settings. Retry failed reads in place while preserving organization entries. Association conflicts preserve the body and draft; reread exact body/catalog/projection heads before applying again. Generic server failures or unreadable acknowledgements do not prove no write occurred. Choose “Check saved version”: organization checks the request receipt, while artifacts check content and exact references, avoiding duplicate saves. Pending content stays read-only and copyable; saving and checking make no extra model calls.

Find knowledge for a task in Studio ​

In Knowledge → Knowledge library, switch to Find for a task and enter the question you need to resolve. Search retained content by default; explicitly choose Include candidates without a retain decision when inspecting undecided content. Discarded revisions are excluded. Reading does not require organizing an object or generating an artifact first.

Expand Source scope and response budget to select an exact source version and adjust the UTF-8 byte budget. Results show complete provided segments, the provided scope for each knowledge item and budget omissions. No returned content does not mean no knowledge exists. Increase the budget and search again, or open complete content and exact evidence. Opening a result uses the actual revision returned by retrieval; later revisions do not silently replace it.

Task retrieval uses the same deterministic literal search as the CLI, without a generation model call; different wording can still miss relevant content. A search hit, matching quotation position or retain decision does not establish truth or applicability to the current task. Follow content omissions, wrong associations and insufficient sources back to their respective revision or review entry points.

Open Related knowledge on an exact body, explicitly select another body in the same workspace and the relevant paragraphs, then inspect both complete bodies and their sources. Record a supplement or possible conflict with the question, applicability, reason and limits. A new proposal is pending. Unknown comparison conditions prevent accepting a conflict; acceptance records an operator opinion, not truth. Review, rejection, author-only withdrawal and historical reopening preserve the original bodies. See the relation contract for CLI commands, evidence and copy activation.

Record reviews and task feedback ​

Open an exact body and enter Content review. Content opinions remain separate from retain/discard choices, association acceptance and independent human acceptance. A new record changes neither content nor carriers automatically.

  1. Read the original and necessary context, then record issues requiring revision or a review with explicit limits. Findings may target segments or an entirely omitted topic; source passages not cited in the body can also support an omission.
  2. Inspect existing entity mappings per segment, distinguishing linked, no reliable object, observed gaps and unknown. No mapping does not mean no object exists; exact quotations establish neither contextual correctness nor identity.
  3. When recording feedback from a task result, retain the actually provided body revision, segments and task query. Separately record provided, read, reported use, observed help or controlled effect reports. The last two require task/comparison references or valid evidence, without automatic system certification.
  4. Distinguish missing content, wrong associations and unavailable sources, then enter the appropriate revision, mapping review or source view. Historical-version feedback never follows the latest version automatically. Content changes explicitly create a new revision, require a fresh retain decision and review of affected associations/carriers.
  5. Earlier revision-needed opinions are resolved only by explicit supersession; a new positive opinion does not silently replace them. An unclear acknowledgement requires checking saved records for the same requestId before redispatch. Conflicts preserve the draft; reread and confirm a new decision.

The CLI first reads status for the actually consumed exact revision, then accepts a complete draft from a regular UTF-8 JSON file. Replace the following identifiers with real values:

bash
omk know review status --workspace ./knowledge --id <knowledge-id> --revision <revision-id> --body-digest sha256:<digest> --json
omk know review content --workspace ./knowledge --input ./content-review.json --json
omk know review coverage --workspace ./knowledge --input ./coverage-review.json --json
omk know review record-use --workspace ./knowledge --input ./use-feedback.json --json

For example, a content review draft:

json
{
  "requestId": "<stable-request-uuid>",
  "bodyRef": { "knowledgeId": "<knowledge-id>", "revisionId": "<revision-id>", "bodyDigest": "sha256:<digest>" },
  "sources": [{ "snapshotId": "<snapshot-uuid>", "sourceVersion": "sha256:<source-digest>" }],
  "expectedGeneration": 0,
  "expectedHeadEventId": null,
  "supersedesEventIds": [],
  "status": "needs_revision",
  "reason": "Applicable conditions in the source are missing from the content.",
  "limitations": ["Only the selected source was reviewed; truth is not established."],
  "findings": [{ "problemKind": "omission", "description": "Add the conditions that change subsequent decisions.", "segmentIds": [], "evidence": [] }]
}

Read bodyRef, generation and head from the exact status. Copy only snapshotId/sourceVersion into sources, excluding current availability fields. An unavailable ledger's unknown generation is not zero. Replaying the same intent preserves its requestId and draft; changing content or CAS creates a new explicit decision. The three CLI writes require trusted-host attribution context; unknown terminals are not recorded as humans. Status reads need no actor context.

See the review and feedback contract for complete fields, classifications and non-inheritance rules. These operations call no generation model; persistence establishes neither truth nor benefits.

Trace and correct graph associations ​

In Knowledge → Knowledge library, first find knowledge by title, tags and maintenance state, then switch to Graph. Inspect the current knowledge's neighborhood or the filtered collection. Knowledge without a valid entity mapping still has readable content and source entry points. Nodes identify exact knowledge revisions, source-window entity revisions and source snapshots; equal names never merge identities.

  1. Select a knowledge node to read its complete content. Select a “segment concerns entity” edge to inspect its segments, mentions and complete original source. This edge represents a saved segment mapping, not a verified relationship between entities. Semantic relations, possible identities and revision parents are presented separately when present in the stored records.
  2. Open entity inspection or Edit entity mappings from the reader. Catalog choices match the content's exact source snapshots and versions. Check the source and entity revision, then explicitly choose segments, entities and mentions. Correcting an entity does not rebind knowledge automatically; applying a new mapping remains a separate confirmation.
  3. In Entity relations, inspect, edit, remove or add relations individually. A readable projection for the exact current body preserves existing relation drafts; stale or failed projections are not carried over automatically. Choose the subject and optional object from entities mapped to the selected segments, and choose evidence from those segments' existing exact citations. Preserve assertion or inference basis, interpretation and unresolved issues; saving does not establish truth. If a segment, catalog or mapping change invalidates a relation, its draft remains and must be explicitly corrected or removed before saving.
  4. Enter a reason, save the selected mappings and relations, and read back the new projection's exact revision and pending state. Association operations do not change content, its digest or retention decision. A new projection does not inherit acceptance of the old one; earlier relations and their revisions remain inspectable.
  5. Refresh or reopen the current address and check filters, graph selection, content revision and sources; expand history as needed. An unclear acknowledgement requires checking the saved version first. Conflicts preserve the draft; reread current state before deciding, rather than resending a stale save.

Incomplete coverage still shows known readable associations in the graph, entity detail and library object detail, alongside unknown counts, failed, stale, rejected or unavailable-source states. Historical edges describe their exact past bindings and do not apply to current content. Multi-source content can trace each source; manual mapping can retain several exact source catalogs, selecting entities and mentions per catalog before saving them together. A source without a catalog is not replaced by a same-name entity from another source. Browsing, manual correction and reopening call no generation model. Separately requesting model-assisted rebuilding requires reviewing the transmission scope.

Explicit stages and project todos ​

This build provides explicit stages only; conversation scheduling is retired. Old auto3 permissions, schedules, reservations and unknown claims retain their originals and are archive-only during independent migration. They are not upgraded into new workflow grants, and migration does not re-enable automatic mode. Preview/enable refuse, status reports explicit_stages_required, and stop/close do not rewrite old history.

Use Extract conversation or Choose sources and extract knowledge, reviewing each complete request. Record an actual coverage decision separately if source review is needed. The inbox still gathers candidates; explicit refresh or scoped maintenance events update it without automatically retaining knowledge, confirming cross-window identity or rewriting carriers.

Guided CLI extraction ​

Start with bare omk know extract instead of learning the internal generation protocol:

bash
omk know extract
omk know extract --file PRODUCT.md --lines 1:80
omk know extract --trace ./session.jsonl --trace-kind codex --records 0:20
omk know extract --scope ./scope.json --selection ./selections.json
omk know extract --run-id <run-id>

Without arguments, choose a source type interactively. --file selects a project file inside the current directory; --lines is an inclusive start:end range starting at 1, and omitting it selects the whole file. Traces use --trace, --trace-kind, and an inclusive zero-based --records range. With an existing trusted scope, provide a selection JSON array through --selection, or select a bound source interactively.

The guide shows the complete source preview and saves only after confirmation; saving does not authorize model dispatch. Every model stage still shows the complete system, input, producer, model, and requestDigest, and is dispatched only after separate confirmation. SourceRefs, run IDs, generations, and stage digests are continued internally rather than copied into new JSON files by hand.

For a new guided run, model selection checks --model, OMK_MODEL, and the saved knowledge model in that order. With Codex, the local Codex config supplies the default when none is set.

Stopping before confirmation leaves the stage unsent. Run the printed command in the original workspace and execution environment to resume with the same --run-id. The guide uses the recorded executor and model. Failures, cancellation, and unknown outcomes preserve their records without automatic retry or redispatch. Completed bodies remain pending candidates; retention and association approval are not automatic. Source coverage review and entity associations remain separate optional workflows.

extract prepare, extract generate, and extract continue remain fixed JSON interfaces for Agents, CI, and explicit control. Guided and explicit paths share the same application use cases and request digests rather than a second generation protocol.

Select sources and generate knowledge ​

CLI and Studio use the same selected knowledge workspace. Preview reads; capture saves; preparing a request makes it inspectable; sending requires an explicit confirmation. See the source contract for exact formats and limits.

Configure trusted source bindings ​

Create scope.json on the host. Replace these paths with actual authorized locations:

json
{
  "scopeVersion": "knowledge-source-scope/v1",
  "projects": [{ "projectId": "project", "root": "/absolute/project" }],
  "traces": [{ "sourceId": "worklog", "traceKind": "codex", "path": "/absolute/session.jsonl" }]
}

Only this host configuration contains filesystem roots and trace paths. Selection JSON contains logical IDs, relative paths and explicit ranges. Optional material declarations apply to exact relative paths; undeclared material stays unknown. Reading test code does not establish that a test ran. Binary files, invalid UTF-8 and paths escaping the configured root are rejected.

For example, selections.json selects real lines from one project file:

json
{
  "selections": [{
    "sourceKind": "project_file",
    "projectId": "project",
    "relativePath": "PRODUCT.md",
    "lineRanges": [{ "startLine": 1, "endLine": 20 }]
  }]
}

Adjust the file and range to existing content. File/Git line ranges are one-based and inclusive; lineRanges: null explicitly selects the whole bounded file. A git_blob selector also supplies revision, such as HEAD, which preview resolves to fixed local objects. An agent_trace selector uses sourceId, traceKind and zero-based inclusive recordRanges; it selects whole original nonempty records and all their readable events. Disjoint selections remain separate. No remote Git fetch or whole-project scan occurs.

Preview and save ​

bash
omk know sources preview --workspace ./knowledge --scope ./scope.json --input ./selections.json --json > preview.json
omk know sources capture --workspace ./knowledge --scope ./scope.json --input ./preview.json --json > capture.json

Read preview.json before saving: it contains literal selected text, original records and separate actual-read, proposed-send and save manifests. A reader may read a whole file or scan a trace prefix to locate the selection; only selected units are retained. Preview saves no formal snapshot and calls no model. Capture rebuilds the fixed selection and checks the preview digest and host scope. Source changes require a new preview; a moving Git branch cannot replace the pinned preview silently. Capacity failures reject rather than truncate. These exports can contain private source text.

Capture also calls no model and grants no send permission. From capture.json → saveManifest.items, copy each exact snapshotId and sourceVersion into sources.json, with no availability or ordinal fields:

json
{
  "sources": [{ "snapshotId": "<saved-snapshot-uuid>", "sourceVersion": "sha256:<saved-source-digest>" }]
}

Use actual saved values. The two fields together form the SourceRef; an ID alone cannot select or delete a captured version.

Prepare and confirm each model request ​

bash
omk know extract prepare --workspace ./knowledge --input ./sources.json --executor codex --model <model> --json > request.json
omk know extract generate --workspace ./knowledge --input ./sources.json --executor codex --model <model> --confirm-request <draft-request-digest> --json

Generation starts with an unverified writing draft. Preparation calls no model. Inspect the complete prepared system, input, model, producer and requestDigest before using generate to send the draft request. Capture and transmission require separate approval. Ordinary body requests take complete original Source3 as evidence. Source inventory can be prepared separately.

After the draft completes, prepare the next stage with the same run and exact sources. Inspect the complete new request and confirm it using its current generation/digest:

bash
omk know extract prepare --workspace ./knowledge --input ./sources.json --run-id <run-id> --executor codex --model <model> --json > next-request.json
omk know extract continue --workspace ./knowledge --id <run-id> --generation <journal-generation> --executor codex --model <model> --confirm-request <prepared-stage-digest> --json

When the full grounded-body input JSON exceeds 512 KiB and fits the window limits, Codex processes consecutive windows over the complete ordered source passages. Use the same pair of commands above to prepare, inspect and confirm each window in order. Window outputs are archived as they return. After all windows succeed, the host combines their validated bodies and source references locally and publishes them together. Use inspect to check saved stage status.

Each stage claims once and archives the complete returned outcome before decoding. The ordinary body stage or completed set of windows produces pending and unretained candidates. Zero bodies also complete without placeholders. Use source review and rebuilding with complete original sources and exact saved bodies when optional coverage or entity associations are needed.

Read the exact analyses and record an actual decision:

bash
omk know runs inspect --workspace ./knowledge --id <run-id> --json
omk know review source-ledger --workspace ./knowledge --id <ledger-id> --revision <ledger-revision-id> --json
omk know review source-coverage --workspace ./knowledge --id <coverage-id> --revision <coverage-revision-id> --json
omk know review source-decide --workspace ./knowledge --input ./coverage-decision.json --json

coverage-decision.json is the complete record_decision command, without an operation wrapper or client-supplied actor. Copy the exact coverage/ledger/body/SourceSet bindings, generation/head and unresolved IDs from the readback. Give every unresolved item a disposition, reasons and limitations; choose proceed_with_limits, needs_revision or stop. Missing trusted actual-actor context refuses writes; do not invent an actor. A revoke_decision command names the prior event and preserves history. See the decision contract.

For entities and semantic relations, put the complete explicitly selected sources and exact bodyRefs array in association-input.json, with at most one revision per knowledgeId. Prepare a new run and confirm it separately. Prior source coverage analysis or a continuation decision is not required; do not automatically reduce sources to existing body quotations.

bash
omk know runs prepare-associations --workspace ./knowledge --input ./association-input.json --run-id <run-id> --executor codex --model <model> --json > association-request.json
omk know extract continue --workspace ./knowledge --id <run-id> --generation <journal-generation> --executor codex --model <model> --confirm-request <association-request-digest> --json

Preparation and the dispatch claim under the shared lock revalidate complete sources, exact bodies and request identity; missing, out-of-scope or changed input is not sent. Associations stay pending. Source opinions are stored independently and never automatically approve associations; an association failure does not delete saved content.

Ordinary model stages default to 300 seconds. Codex windows use low reasoning effort and at most 150 seconds per window. Complete enriched input is subject to the 1 MiB request limit, with separate capacity limits for windows. Capacity failures stop the run. Failed or unknown outcomes are never automatically resent. Default imports bind the workflow and sorted exact SourceSet, reusing completed, failed and unknown journals. A completed reimport makes no new call or duplicate body. A new run is only for deliberately independent generation, never an unknown-claim bypass. Calls/tokens/time and unreported costs remain separate from quality.

BREAKING-SCHEMA/API/COMPARABILITY. Current journals use Schema 9. Ordinary body requests still bind the exact same-run draft and complete Source3. Codex body requests above the threshold use ordered windows. The host publishes only after every window succeeds. Source review and pending association generation remain independent. Matching older builds read older journals. knowledge-workflow-to9 migrates only to an independent copy and archives older journals, analyses, originals and automatic permissions unchanged. Historical measurements retain their original identities.

Old wire2/prompt3 and wire3/prompt4–5 coverage retains passive-read semantics with originalVerification=not_verified, without inheriting current source-review verification. Current coverage originals still use wire3/prompt6; there is no compatibility decoder or rewriting of old outputs. Use the preserved old workspace and matching build for old execution or rollback. Association generation independently binds explicit sources and bodyRefs, without using old coverage or its decisions as admission credentials.

Active journals containing old profiles, including body v18 and association v7 in prepared/claimed/archived states, require their preserved matching build; do not resend or rewrite their requests with the new profile. Recorded prepared_writes can recover fixed publication intents with zero model calls under the existing rules; remaining unfinished old-profile work then returns to unsupported. Completed/failed history and existing current-format data remain readable. The supported workflow copy handles older journal formats separately. Parameter errors exit 2, business failures exit 1 and success exits 0. After an unclear acknowledgement, inspect durable state before repeating a mutation.

Inspect and maintain ​

bash
omk know show --workspace ./knowledge --id <knowledge-id> --json
omk know review retain --workspace ./knowledge --id <knowledge-id> --revision <revision-id> --generation <read-generation> --reason 'Reviewed source and applicability'

Use the actual revision and history.generation from the latest detail; discard records the same exact-revision decision without deleting history. Retention is not truth verification.

For CLI retain, discard, revise, correct-entities, apply-associations and review-associations, a recognized Codex Desktop launcher with a valid thread identity records the actual Agent on new maintenance writes. Other contexts retain the existing human/local-user default; that fallback does not certify a human operator. This is launcher attribution, not identity authentication or support for other Agent hosts. Old actors/receipts and knowledge creation attribution stay unchanged, as do capture, generation and the independent review entries. No actor flag or self-declared draft field is added. See the exact attribution boundary.

For a revision draft copy only title, content and reuseRationale. Preserve every segment's stable segmentId, complete text and inline evidence. Evidence includes exact source: {snapshotId, sourceVersion}, selection: {evidenceRef, start, end, quote}, basis and optional interpretation. Positions are zero-based UTF-16 into the exact excerpt. Read the source before changing them; the host independently rereads each source/version and rejects mismatches.

bash
omk know revise --workspace ./knowledge --id <knowledge-id> --revision <revision-id> --generation <read-generation> --input ./body.json --reason 'Preserve the changed condition'

Studio computes positions from selected exact quotes; CLI drafts supply the complete inline evidence. The old --citations, citationLocators and parallel grounding API are replaced. New body revisions remain pending and do not inherit retention; previous derived projections become stale. Source-unavailable edits are rejected, while the previously stored body remains readable. Inspect historical bodies with show --revision <old-revision-id>.

Inspect entities and apply corrections ​

bash
omk know show entities --workspace ./knowledge --analysis <run-id> --json
omk know revise entities --workspace ./knowledge --analysis <run-id> --entity-revision <entity-revision-id> --generation <read-generation> --input ./entities.json --reason 'Separate same-name entities using the source' --json

entities reads the current revision by default; use --entity-revision for history. Correction drafts contain only the returned revision.entities and revision.mentions. Preserve existing identities; new entities/mentions use distinct new:<local-name> identifiers, which the host replaces with UUIDs. An existing mention identity cannot move to different text. Mentions must exactly reference the selected source, and every entity needs an admitted mention. Use identityStatus: unresolved with uncertainties for unknown entities. possibleEntityIds may reference proposed entities; do not select one as an established identity.

Preserve the required referentKind, componentRef, and collection fields. An instance/version links a proposed component in this analysis; collections record known members and complete/partial/unknown completeness. Each link's mentionIds must include a mention of its owner, and rationale records the source interpretation. Partial or unknown membership needs an uncertainty reason; unknown membership cannot also list definite members. Before removing or reassigning entities/mentions, explicitly correct component, collection, candidate, and evidence references to them; silently removing references must not hide missing information.

Without --analysis, entities searches current objects across workspace analyses:

bash
omk know show entities --workspace ./knowledge --query Atlas --identity-status unresolved --page-size 20 --json

Search covers names, source mentions, qualifiers, and origin. --source-status unavailable finds unavailable-source results; --page selects a page. Same-name results preserve separate analysis/entity identities. JSON includes analysis/entity/revision identities, mention and linked-knowledge counts, and a separate older-binding count. Corrupt analyses contribute to unavailableAnalyses rather than disappearing silently.

Corrections append an entity revision without rewriting body. To connect segments to a chosen catalog, inspect the exact body and catalog, then write a separate projection:

bash
omk know revise associations --workspace ./knowledge --id <knowledge-id> --revision <body-revision-id> --body-digest sha256:<digest> --generation <association-generation> --input ./associations.json --reason 'Reviewed source-backed segment links' --json
omk know review associations --workspace ./knowledge --id <knowledge-id> --revision <projection-revision-id> --generation <association-generation> --choice accept --reason 'Reviewed this projection' --json

The draft contains catalogRefs:[{analysisId,entityRevisionId}], segmentEntityRefs, optional typedRelations and issues. Segment references are {segmentId,analysisId,entityRevisionId,entityId,mentionIds}; typed subjects/objects use the same catalog-qualified entity triple. Combine catalogs matching body sources without merging local names or IDs. The old --analysis/--entity-revision flags are no longer accepted by apply-associations. Read association generation from derivedAssociations.generation, not body history.generation; absent association starts at 0. Manual application and model rebuilding create a new pending projection, preserving the body/revision/digest and its maintenance decision. Accept/reject review applies only to that projection and does not confirm external truth. A rejected or stale projection is not a current library binding. See the domain contract.

Organize and find knowledge ​

Topic tags organize content without changing its body or maintenance. For task consumption, retrieve complete segments from retained bodies by default:

bash
omk know retrieve --workspace ./knowledge --query 'What are the initialization conditions?' --max-bytes 65536
omk know retrieve --workspace ./knowledge --query 'What remains unknown?' --include-candidates --snapshot <snapshot-id> --source-version sha256:<source-digest>

For the default JSON view, 65536 UTF-8 bytes counts the entire single-line JSON plus newline, not stored knowledge or a model context limit. Explicit --max-bytes 8192 remains supported; the maximum stays 1 MiB. Complete segments and their inline evidence are atomic: oversized or budget-excluded segments are reported in omitted, never condition-truncated. This initial budget does not establish complete task coverage or optimal selection, and does not upgrade previously recorded smaller-budget failures. The optional text view below is budgeted against its own complete output.

Recall and ordering use deterministic literal ASCII/code identifiers and Han runs/bigrams. The response records rankingPolicyId: knowledge-body-literal-topic-priority/v3. After source/entity scoping, each body's title, tags and eligible segment text determine its matched query ASCII/code term set. A strict subset lowers packing priority only: it does not prove redundant content or remove candidates. Equal sets tie, and incomparable sets do not demote each other; pure Han queries and queries with no ASCII hits retain the existing ordering. Among fitting segments, maximal topic sets come first, followed by incremental literal coverage/cost; lower-priority candidates remain eligible for remaining budget. All oversized or budget-excluded candidates count in omitted. This uses no embeddings and infers no semantic identity. --include-candidates explicitly includes unretained pending bodies; discarded revisions remain excluded. --snapshot and --source-version must be provided together to scope an exact source reference. --entity-id requires both --analysis and --entity-revision and uses an available matching derived projection, without automatic name merging; rejected/unavailable/stale associations cannot supply that scope. Unavailable source evidence remains explicitly unavailable while stored body text is readable.

Search an exact captured source ​

When you have permission to read a specific saved source version, search-source can locate passages that the knowledge body may have omitted. Use the snapshot ID and version from its capture receipt or existing evidence reference.

bash
omk know sources search --workspace ./knowledge --snapshot <snapshot-id> --source-version sha256:<source-digest> --query 'EOS 80D' --json

The read-only command ranks literal matches in that version's captured excerpts without a model. Matching uses Latin terms and Han bigrams or individual Han characters, ignoring common English words. Each hit includes the exact quote, UTF-16 offsets into the excerpt, and the source coordinate, including speaker and timestamp when the capture provides them. File coordinates describe the captured excerpt. The compact JSON and its newline share a UTF-8 budget of 16384 bytes by default, adjustable from 1024 to 65536. omittedMatches counts matched passages excluded by that budget. source.status distinguishes an unavailable version from an available source with no hits. When using a hit, cite it as original evidence and check nearby context if the passage leaves an attribution, date, or condition unresolved.

Maintain existing knowledge with new material ​

For an update, retrieve for the actual task and use show to pin knowledgeId, revisionId, bodyDigest and the body's history.generation; read relevant review opinions. Matching names do not establish identity. Distinguish added conditions, corrections, different positions and independent new cases. Express stable methods separately from dated/versioned cases: historical versions are not permanent requirements, and recency does not resolve contradictions.

Only a concrete gap warrants previewing and capturing manifests, execution results, documentation or fixed source code within an authorized finite scope. Saving old query output does not rerun the query; declare material types and inference limits accurately. Draft a complete KnowledgeDraft from actual source excerpts, preserving still-applicable segments, exact quotes, attribution, conditions, negation and unknowns. Append it using revise --id … --revision … --generation … --input … --reason … --json; --input is the complete body, not a patch. On conflicts read the current head first; on unknown receipts inspect history before redispatching.

Read back the new body and parent from the receipt, then retrieve for a subsequent real task and check the added evidence. A new revision does not inherit retention, association acceptance, content review or task benefits; do not automatically retain just to make retrieval hit. A host Agent's draft is Agent maintenance, not evidence that native extraction updated itself. The official Skill's maintenance workflow reuses these existing interfaces without another model stage or Schema. Report actual use, human feedback and controlled effects separately; compare necessary lookup, checking and editing effort with ordinary notes, simplifying or stopping when results do not justify it.

Complete a task with existing knowledge ​

The official OMK Agent Skill prefers retrieve --format text for reading historical knowledge, with JSON, show and source for precise readback when needed. It skips evaluation-project and eval-samples scanning for this branch. Use the user's selected workspace or the CLI's configured default; do not invent a directory or automatically install, upgrade, migrate, or change knowledge. Check installed command capabilities against the version boundaries above.

Keep the complete natural task for reading and final checking. Each trimmed --query allows at most 512 JavaScript string units (UTF-16). Start with the original question when it fits; split longer tasks faithfully into natural subquestions while retaining names, versions and constraints, without cutting conditions or replacing them with expected answers. Start with an adjustable per-read budget appropriate to the tool's visible capacity, for example:

bash
omk know retrieve --workspace <selected-workspace> --query '<current-task>' --format text --max-bytes 16384

16384 is only an example, not a product default or a knowledge/model limit, and it cannot guarantee complete display in every tool. If the tool supports a display limit such as max_output_tokens, match it to the expected output as well. The default budget remains 65536 UTF-8 bytes for the selected complete view plus one LF, with a maximum of 1 MiB. Text v2 / packing v2 preserves complete stored segments in each knowledge item's segmentIndex order and stable knowledge/revision/digest/status fields. Exact source identities appear once; each citation keeps its evidenceIndex, source index, basis, position status and interpretation index, with every distinct interpretation displayed unchanged at the end. S/I are local view indexes, not object identities. Read complete quotes, evidenceRef and UTF-16 anchors from exact show --id … --revision … --json output using segmentId/evidenceIndex. Read independent content reviews separately with review-status. Check maintenance/source/position states, omitted, the returned/total segment count, the final endView: knowledge-body-text/v2 line, and tool truncation notices. A complete archive or compliant CLI byte budget does not prove that the Agent saw everything. If output is truncated or its end cannot be confirmed, reduce the per-read budget, narrow the natural subquestion or read back the selected exact revision; never rewrite conditions to fit. A partial result is not automatically a task gap.

Literal recall can miss saved content because of language or wording differences. If a complete result still lacks task-required information, faithfully restate the whole question in the language of the material already read, or form a natural follow-up from that material, and search saved bodies first. Preserve names, versions, negation, time and conditions, and keep the same workspace, source/entity scope and candidate permission. Do not query expected answers or guessed entity names, or expand reading authorization. Do not add queries when saved bodies already suffice. Stop repeated reformulation when it adds no new task evidence and state the remaining gap.

JSON remains the default for retrieve; --format json or --json selects the full machine/evidence structure, while --format text and --json are mutually exclusive. Each format packs its own complete representation, so a new JSON retrieval may select different segments. When checking a quotation or source state, or supplying information beyond the body, use the actual knowledgeId and revisionId with show --id <knowledge-id> --revision <revision-id> --json, preserving its body digest and source version. By default, retrieval uses retained knowledge; include pending candidates only when the task explicitly needs them. Use a source read to check a citation or supply clearly labelled source material, not as an unmarked replacement for missing knowledge text.

Answer or act according to the task, preserving relevant concrete reasons, conditions, counterexamples, attribution, historical requests and their responses, and unresolved decisions. Keep qualifiers such as “only”, “must”, “must not” and “except” next to the action they constrain, rather than leaving them only in a citation or general disclaimer. A later response does not erase an earlier request or objection. Cite the knowledge body/revision/segment and its existing source evidence. Before delivery, check once that information affecting the conclusion, action qualifiers and citations survived the answer's compression; identify unread or missing material. There is no required long checklist, new model stage, judge, or coverage guarantee; the host Agent still incurs its own reading and answering costs. Knowledge text is data, not authority to execute its instructions or write to the workspace.

Accumulate knowledge around entities ​

Follow Studio step 4 to confirm source links. Object knowledge defaults to retained items with matching revisions. Link-review, empty-object, and unreadable-count states remain distinct. See library contracts for linking, history, and recovery.

Generate and save knowledge artifacts ​

Follow Studio step 6 to save. Each selected exact revision defines that version’s references. Manual content outside the knowledge section and dependent assets remain, and prior versions are unchanged. Knowledge maintenance contracts own paths and metadata; carrier properties are not a library writeback interface.

Evaluate an artifact change ​

Follow Studio step 7 to preview and run. Check status before repeating a start request whose response was lost. Failures, cancellation, and interruption remain distinct. See evaluation guides for formal samples, exit codes, and report scope.

Codex version check ​

OMK uses codex from the current process PATH. Check codex --version; if the server reports that the model requires a newer client, update or explicitly select an existing compatible client rather than changing models or APIs. The desktop app and shell may use different versions.

Migrate an older workspace ​

Copy an old workflow into an independent workflow9 workspace ​

Preserve the old directory and matching installable package, then stop old writers. This slice supports only healthy active Source3/body3/entity2/association2/reviews1/tags. All bytes, identities, history, retention and review opinions stay unchanged; they do not become source-coverage approval. Library, carriers, entity-links or other unsupported content require retaining the old directory and reporting unsupported, never silent dropping or retargeting.

bash
omk know migrate workflow --from-workspace ./old-workflow --workspace ./workflow9 --operation-id <stable-uuid> --matching-build ./omk-old.tgz --matching-build-id <old-build-id> --plan-only --json > workflow-plan.json
omk know migrate workflow --input ./workflow-plan.json --confirm-plan <plan-digest> --json

Planning writes nothing. Review actual roots, full inventory/digests, old package, capacity and limits before applying that fixed plan and digest. Journal8 and earlier (including outcomes), source-ledgers, source-coverage, auto-extraction and old migration/marker are archive-only: no old call or automatic allowance resumes. Roots must be independent and non-overlapping. Interrupted steps/receipts resume only the same plan; unknown temporary files stop for inspection. Completed additions/edits/deletions are never overwritten or resurrected. Explicit requests start the new stages; rollback uses the old directory and matching build. Source2 reference conversion remains the separate path below, without upgrading historical measurements.

Migrate association Schema 1 into a separate copy ​

Preserve the old workspace and its matching installed package, and stop old writers. An association Schema 1 workspace first needs its explicit Schema 2 copy migration; that operation does not create Source3 or make an old journal current. Run explicitly:

bash
omk know migrate associations --from-workspace ./schema1 --workspace ./schema2 --operation-id <stable-uuid> --json

The new target must be empty and neither root may contain the other. The operation uses no models and copies body, source, entity, retention and historical-measurement bytes unchanged. Original association histories/receipts live under migration/<operation-id>/original/; plan.json fixes source pins and old/new revision mappings, and complete.json records completion. Converted projections have fresh pending revisions without inherited acceptance. Old journals/native outcomes retain original bytes and appear unsupported, without fabricated profiles or resumed dispatch. Old automatic permissions, schedules and budgets are archived only; the new workspace executes only explicitly confirmed stages, without a new automatic grant.

After interruption, preserve the plan and replay the same roots and --operation-id. Source drift or target edits reject replay without overwrite. Completed replay verifies its plan; later additions, edits and deletions must not be resurrected or overwritten. Rollback uses the old workspace and matching binary; the new copy retains originals and mappings. Mechanical migration, readability and successful saves do not establish semantic acceptance.

Migrate Source2 into a separate Source3 copy ​

Keep the original workspace and matching installable build archive, and stop its writers. The Source3 migration slice accepts a healthy body Schema 3 / Source2 workspace with current entity/association formats; it refuses missing or deleted required sources, corrupt data and unsupported versions. Resolve earlier format boundaries with their explicit migration procedures and matching builds; do not upgrade the original in place.

bash
omk know migrate sources --from-workspace ./source2 --workspace ./source3 --operation-id <stable-uuid> --matching-build ./omk-old.tgz --matching-build-id <old-build-id> --plan-only --json > migration-plan.json
omk know migrate sources --input ./migration-plan.json --confirm-plan <plan-digest> --json

The first command is read-only. Review its actual source/target, archive and limitations, then copy the exported planDigest into the second command. The target is an independent non-overlapping copy. Old raw material, journals/outcomes, review records, permissions, library/carrier references and the matching build retain their bytes in the archive; the original remains unchanged. New source/body/catalog/projection references are mapped explicitly and remain pending. Old retention, identity acceptance, reviews, task feedback and automatic grants are not transferred; ordinary organization tags stay separate.

After interruption, preserve the fixed plan and replay that same input and digest. An incomplete target cannot open as a normal workspace. Changed target data is not overwritten, and deleted completed output is not resurrected. A crash before durable target ownership can require owner inspection rather than automatic recovery. Rollback uses the untouched old workspace and matching build. Copying an archive does not prove that installation or rollback has been tested; see the source migration contract.

Recovery and data ​

Default imports already reuse the exact source set's journal. If an explicit run UUID was chosen, keep it for the same request. A different source/model/runtime cannot reuse that identity.

bash
omk know runs list --workspace ./knowledge --json
omk know runs inspect --workspace ./knowledge --id <run-id> --json
omk know runs resume --workspace ./knowledge --id <run-id> --json

resume can archive an original still held in the same process, attach a persisted original or finish fixed writes, without calling a model. A claimed phase without recoverable output stays outcome_unknown_do_not_redispatch; process exit proves neither no dispatch nor zero cost. Only a never-claimed prepared phase can be sent after reviewing and explicitly confirming its exact requestDigest, with the original model configuration.

Review revised sources and rebuild ​

A revised body does not inherit source-coverage approval. Put the complete original sources, new exact bodyRefs and optional matching ledgerRef in source-review.json, never only the sources still cited by the body. No ledgerRef runs inventory then coverage; a matching reference runs coverage only. It generates no body or automatic association.

bash
omk know review source-prepare --workspace ./knowledge --input ./source-review.json --run-id <review-run-id> --executor codex --model <model> --json
omk know extract continue --workspace ./knowledge --id <review-run-id> --generation <journal-generation> --executor codex --model <model> --confirm-request <prepared-stage-digest> --json

Without ledgerRef, the first continuation sends inventory. After it completes, repeat prepare-source-review with the same input and review-run-id, then inspect and confirm coverage. With a matching ledgerRef, only the coverage request is needed.

When source review is needed, read the analysis and record the actual opinion with review-source-coverage; revocation still uses a complete revoke_decision with targetEventId, reason and CAS/idempotence fields. Association rebuilding independently uses {sources, bodyRefs} and does not accept sourceCoverageDecisionRef. Both commands below use the same explicit new run UUID.

bash
omk know runs prepare-associations --workspace ./knowledge --input ./association-input.json --run-id <new-stable-uuid> --executor codex --model <model> --json > association-request.json
omk know runs rebuild-associations --workspace ./knowledge --input ./association-input.json --run-id <new-stable-uuid> --executor codex --model <model> --confirm-request <prepared-request-digest> --json

Rebuilding creates an independent pending projection without another body generation. Manual correct-entities/apply-associations retain their explicit maintenance paths and do not fabricate source-coverage approval.

Current journal9 records live at generation-journals/<run-id>.json, with complete originals at generation-journals/outcomes/<run-id>/<invocation-id>.json. Journal8 and earlier, old typed and source formats are explicitly unsupported, never healthy empty data. Preserve the original directory and matching build; follow the applicable workflow copy, body migration or source migration, without resuming old claims.

Check source changes ​

Save an exact check request as source-check.json:

json
{ "source": { "snapshotId": "<saved-snapshot-uuid>", "sourceVersion": "sha256:<saved-source-digest>" } }
bash
omk know sources updates --workspace ./knowledge --scope ./scope.json --input ./source-check.json --json

This reads current material and known exact body/catalog/projection references without a model call or knowledge change. Read both currentness and impact completeness: a partial inventory cannot establish zero impact. A changed file can leave selected bytes unchanged; review conditions before creating a new pending revision. Default Git checking reopens the captured objects, not the latest branch; checking a branch needs an explicit replacementSelection. A different path is only a possible move for review, even if bytes match. An unavailable root does not prove the original file was deleted.

After capturing a Git source in Studio, explicitly enter another local commit or branch under “Source change impact” and choose “Compare revision and check impact”. This keeps the old source reference and its original project, path and fixed line ranges, without automatically selecting HEAD or recapturing the new version. The interface keeps the old fixed commit visible and shows the entered revision, actual resolved commit, source state, exact body/entity catalog/association version reference counts and review suggestions separately. Checking preserves model-send approval; suggestions do not mean knowledge has been updated. Comparing does not replace this capture or model input; to use the new version, preview and capture it separately.

For existing knowledge, expand “Check changes affecting the saved source” below the quotation in the “Evidence” tab to check that exact source reference without recapturing. A saved snapshot can still be checked after its upstream file is deleted. An unreadable historical snapshot retains its unavailable state and incomplete-impact limitations; it is not treated as confirmed upstream deletion. Explicit Git comparison is offered only when the saved Git identity and selection for that reference are available.

Read or delete captured evidence ​

bash
omk know sources show --workspace ./knowledge --snapshot <snapshot-id> --source-version sha256:<source-digest> --json
omk know sources delete --workspace ./knowledge --snapshot <snapshot-id> --source-version sha256:<source-digest> --json

Historical captured evidence remains readable after upstream changes or deletion. Explicit delete-source leaves a content-free marker; it changes neither upstream files, stored quotations nor archived model outcomes, and is not a complete data wipe. Default recapture of that deleted version is refused. An explicit afterDeletion: "new_snapshot" in a fresh selection preview can authorize a new reference without reviving the old one. All source and workspace exports can contain private data; saving, quote matching and reopening are not semantic acceptance.

Admission statistics ​

omk know runs quality --workspace ./knowledge --json and Studio read the current knowledge-body-admission projection. It shows each journal's status, recorded bodies, phase state, body rejection count and issues; semanticQuality: not_assessed is explicit. Unsupported legacy inventory remains separate.

These are mechanical observations, not extraction accuracy, completeness, causal comparisons, truth, task success or cost acceptance. A completed workflow can contain a failed derived projection while its body remains saved; inspect phase and body details. Original native usage/reporting flags remain available through CLI inspect. Old run5 quality denominators and historical typed study scores are not recomputed or mixed into the new journal identity.

Extraction quality checks ​

The historical typed annotation guide retains its measurement identity. The study runtime and its CLI/Studio inspection entry are retired from the current build; matching archived builds and original records remain the rollback/readback path. These records do not certify the body-first workflow. Body source fidelity and real task usefulness still require explicit validation with its own source/request/version evidence; do not rescore old runs using the new contract.

Use review knowledge quality to check complete meaning against selected sources, separate failures, revise and reopen content, and record actual cost and review limits before deciding whether to use, continue or stop.

omk observe entity-links reviews two entities from different source windows. Name normalization only recalls candidates; it does not confirm identity. Original entity UUIDs, analyses and knowledge revisions remain separate. Accepted reviews organize references in the library; they do not merge entity records or rewrite knowledge.

  1. Run candidates --workspace ./knowledge --analysis <analysis-id> --entity <entity-id> --json, then inspect the selected sources and mentions.
  2. Freeze one plan and save its complete JSON. Use preview --input to inspect that same file; a new preview creates new stable IDs and a different confirmation digest.
bash
omk observe entity-links preview --workspace ./knowledge \
  --analysis <left-analysis> --entity <left-entity> \
  --right-analysis <right-analysis> --right-entity <right-entity> \
  --executor openai-api --model <model> --json > link-plan.json
omk observe entity-links preview --input link-plan.json
omk observe entity-links propose --input link-plan.json \
  --confirm-input <confirmedDigest> --json

preview makes no model request. Review the complete fixed rules, selected content, model, endpoint and nonsecret producer context before explicitly copying the file’s top-level confirmedDigest. This CLI confirmation binds the normalized absolute workspace and complete shared preview; the nested host confirmation remains a separate identity. Optional repeated --mention / --right-mention flags limit the selected mentions. The saved plan binds its absolute workspace; propose rejects another workspace, changed request/proof content, or changed observable producer configuration before starting. The plan must be a regular JSON file of at most 2 MiB, not a symlink. It contains selected source text: store and share it accordingly.

The API producer is currently supported. It freezes the API request, endpoint, relevant environment and archive-capacity proof; it is not a complete binary, provider or host attestation. Codex is rejected before process dispatch until its archive bound is proven. The invocation budget is one explicitly confirmed call, not a USD spending ceiling; unavailable usage or costs stay unknown. There is no fallback or automatic retry. This command does not restore Anthropic execution.

propose durably prepares before starting. Repeating the same plan inspects its saved review without dispatching again, including when configuration or credentials have since changed. After an uncertain acknowledgement, run show --workspace ./knowledge --id <review-id> --json first. Only a review still at prepared can explicitly continue the same attempt with propose ... --start-prepared; the source, owner and producer proof are rechecked. To abandon an unstarted reservation, use resume --workspace ./knowledge --id <review-id> --cancel-before-start --request-id <stable-UUID> --generation <generation> --reason "cancel reviewed plan".

list and show expose the shared projection and immutable evidence. show --json includes the complete raw result, refusal, usage and event history. Inspecting a failed review succeeds with exit 0; a mutating operation that remains running, unknown, failed or in application conflict exits 1. Invalid parameters or plans exit 2. When produced, JSON stdout contains one machine result; diagnostics use stderr.

Accept only after a person confirms both original UUIDs refer to the same object; the model assessment, even same_object, is not acceptance. Keep the request UUID stable when replaying a decision and use the generation returned by show.

bash
omk observe entity-links accept --workspace ./knowledge --id <review-id> \
  --request-id <stable-UUID> --generation <generation> \
  --reason "checked both sources and identity" --confirm-identity --object-label "complete object label" --json
omk observe entity-links reject --workspace ./knowledge --id <review-id> \
  --request-id <stable-UUID> --generation <generation> --reason "insufficient identity evidence" --json
omk observe entity-links resume --workspace ./knowledge --id <review-id> --json

A rejection suppresses the same pair of source/entity revisions in either order. resume never calls a model; it handles already held archival facts in the same live host or a stable pending library intent. A fresh CLI process cannot recover raw output lost before archival. For a crashed running owner, resume --recover-unknown --request-id <stable-UUID> records unknown only after the local owner is proven exited; no TTL makes that decision, and the consumed slot is not refunded. Inspect failed/unknown evidence before creating a new preview with --retry-of <prior-review-id> and explicitly confirming the new plan. Cancellation and process loss are not successful delivery. See entity-link contracts for the storage and recovery boundaries. Studio exposes the same workflow from the current entity detail’s “Find cross-window identities” action; see the Studio review surface. Real-model quality acceptance and independent human review remain pending.