Skip to main content

Layer 3 · capability

knowledge

blocks/3-capability/knowledge.yaml

layer 3capability
1entity
3commands
3events
2views
8refusals
2KPIs

What an agent is given before it acts: instructions, skills, memory entries, context files and concepts. A concept is a named practice an agent applies, such as "test first" or "a default proceeds". An item is published for a scope (every agent its owner runs, an organization or a repository) with a rank among the items of its scope and kind, revised as its content changes, and withdrawn when it no longer applies. An item may name the one principal who revises it, take no revision from a sub-agent session, and need the owner's approval of the exact new content; the caller states who revises, from which kind of session, and the digest the approval named. Content is held as a digest and a length, never as text.

Depends on​

Used by​

  • agent · layer 4 · 4 references

Entities​

KnowledgeItem​

One item of knowledge for one scope. Published until withdrawn; a revision keeps the identity.

Identified by knowledge_id (KnowledgeId).

fieldtypemeaning
kindKnowledgeKind
nameName
scopeKnowledgeScope
repositoryoptional stringThe repository the item applies to; present exactly when the scope is Repository.
contentContent
revisioninteger1 at publication, one more at each revision.
rankintegerAmong items of one scope and kind, a higher rank is read first and wins where two say different things. 0 when publication named none.
editoroptional PrincipalIdThe one principal who may revise the item; absent, any author.
main_thread_onlybooleanA sub-agent session may not revise the item; a session's main thread may.
needs_approvalbooleanA revision needs the owner's approval of that exact content.

Relations:

  • editor references Principal of principal (one, by editor)

Always holds: revision >= 1, rank >= 0.

Lifecycle of KnowledgeItem

PublishedWithdrawnrevisewithdrawPublishedWithdrawnrevisewithdraw
Ends in Withdrawn.

Commands​

PublishKnowledge​

Publish knowledge.

Called by: Knowledge author.

fieldtype
knowledge_idKnowledgeId
kindKnowledgeKind
nameName
scopeKnowledgeScope
repositoryoptional string
contentContent
rankoptional integer
editoroptional PrincipalId
main_thread_onlyoptional boolean
needs_approvaloptional boolean
outcomewhenresult
repository-missing refusedscope == Repository and not (defined(repository))ScopeTargetMissing: The scope names a repository and the request gave none.
negative-rank refuseddefined(rank) and rank < 0NegativeRank: The rank is below 0.
publishedotherwisecreates a KnowledgeItem in Published; emits KnowledgePublished

ReviseKnowledge​

Revise knowledge.

Called by: Knowledge author.

fieldtypemeaning
knowledge_idKnowledgeId
contentContent
editorPrincipalIdThe principal of the revising session.
by_sub_agentbooleanThe revising session's role is agentic.harness.SessionRole.SubAgent, as the harness that calls states it.
approved_digestoptional stringThe content digest the owner's approval named; absent, no approval.
outcomewhenresult
no-such-item refusedno such KnowledgeItemKnowledgeNotFound: No item has this identity.
not-the-editor refuseddefined(editor) and editor != input.editorNotTheEditor: The item names its editor, and the revising principal is another.
sub-agent-not-main-thread refusedmain_thread_only == true and input.by_sub_agent == trueSubAgentMayNotRevise: The item is revised only from a session's main thread, and the revising session is a sub-agent.
approval-not-of-this-change refusedneeds_approval == true and (not (defined(input.approved_digest)) or input.approved_digest != input.content.digest)ApprovalNotOfThisChange: The item needs the owner's approval of the new content, and no approval was named or the one named approved other content.
revisedotherwisemoves the KnowledgeItem Published → Published; emits KnowledgeRevised
wrong-state refusedthe KnowledgeItem is in a state that does not allow itKnowledgeStateConflict: The item is not in a state this command acts from; it was withdrawn.

WithdrawKnowledge​

Withdraw knowledge.

Called by: Knowledge author.

fieldtype
knowledge_idKnowledgeId
outcomewhenresult
withdrawnotherwisemoves the KnowledgeItem Published → Withdrawn; emits KnowledgeWithdrawn
wrong-state refusedthe KnowledgeItem is in a state that does not allow itKnowledgeStateConflict: The item is not in a state this command acts from; it was withdrawn.

Events​

eventfieldsemitted by
KnowledgePublishedknowledge_id KnowledgeId, kind KnowledgeKind, name Name, scope KnowledgeScope, repository optional string, content ContentPublishKnowledge
KnowledgeRevisedknowledge_id KnowledgeId, content ContentReviseKnowledge
KnowledgeWithdrawnknowledge_id KnowledgeIdWithdrawKnowledge

Views​

viewrowsfields
Knowledge
Knowledge
each KnowledgeItemknowledge_id KnowledgeId, kind KnowledgeKind, name Name, scope KnowledgeScope, repository optional string, content Content, revision integer, rank integer, editor optional PrincipalId, main_thread_only boolean, needs_approval boolean, state State
PublishedConcepts
Published concepts
each KnowledgeItem with kind == Concept and state == Publishedknowledge_id KnowledgeId, name Name, scope KnowledgeScope

Types​

typeisvalues or fields
KnowledgeKind
What an item is. An Instruction tells an agent what to do, a Skill is a procedure it may load, Memory is what it kept from earlier work, a ContextFile is a file read into its context, a Concept is a named practice it applies.
one ofInstruction, Skill, Memory, ContextFile, Concept
KnowledgeScope
Whom an item applies to. UserGlobal applies to every agent its owner runs, in every organization and repository, above Organization. Organization applies to every agent of the organization, Repository to agents working in one repository. What one agent is given is listed by its revision in agentic.agent.
one ofUserGlobal, Organization, Repository

KPIs​

2 KPIs from the KPI catalogue. A gate must be zero for a variant of an architecture to count.

Correctness​

KPIunitbettergatestatus
stale_entries_open
Knowledge entries that describe code that has changed since and were not revised.
How: Published entries with a cited path that received a PathWritten after the entry's last KnowledgePublished or KnowledgeRevised, and no revision since. A stale line is corrected, not deleted.
countlower–planned
source: research/2611.09802

Quality​

KPIunitbettergatestatus
precedence_followed_share
Share of conflicts between a written rule and the code in which the agent followed the rule.
How: In probe tasks where an instruction and the code disagree, runs that followed the instruction divided by probe runs. Run per model, because wording is tested per model.
sharehigher–planned
source: research/2610.30571

Settings​

The settings a part of this block carries in an architecture document. agenticspec sim check refuses any other setting (setting_unknown) and a value outside its type (setting_invalid), and a part that lacks a setting marked required in the default column; the contract copies a setting into the ports it narrows. The last rows of each table are the settings every part takes. What no setting here types (a file, a path, an audience, the use of a model) goes into the part's notes, a map with free keys and values that the check takes as written and nothing reads.

A part knowledge:

settingtypeunitdefaultcontractwhat
kindstringWhat the knowledge is.
countinteger of at least 11How many copies of the part run.
perpartOne copy of the part for each copy of the named part.
notesnotesFree notes on the part, a map with keys and values of any kind: what no setting of its block types. The check takes any map; the simulator, the search and the contract never read it.