Liking cljdoc? Tell your friends :D

vaelii.impl.koinii.speech-acts

Koinii speech-acts: the small vocabulary of moves agents make, as sentexes in the KB. A move is not an out-of-band message but knowledge — queryable, retractable, auditable like any other fact — and the SHAPE of the move carries the layer's headline property (koinii design D1 / D5).

Two kinds of move, one split (koinii.md, Reply is an assertion):

  • Origination (asserts, queries) — a plain assertion in the acting agent's own context. The claim, or the query node, plus its provenance IS the act: nothing wraps it, because provenance already records who spoke (first-writer-wins). So an assertion in koinii is just an assertion — assert-claim mints no asserts edge. A query is minted as a node (pose-query), because a question must be told apart from a claim.
  • Response (answers, disputes, endorses, justifies) — a META-SENTEX on the target sentex, naming it by handle (sentexHandle H), asserted in the RESPONDER's own context and stamped with the responder as creator. Each response predicate is declared targetFollowingPredicate in CxSpeechActs, so retracting a target sweeps its replies with it (core/retract-following-metas!). Two facts force this: the cascade needs BOTH the meta-sentex AND the mark (an unmarked meta orphans harmlessly), and first-writer-wins forces each act to be its own object — two endorsers are two sentexes with two creators, never one re-assert.

retracts is the engine's retract! on a handle. The error acts (notUnderstood, refuse) name the received edge, in the refusing agent's context, and are deliberately unmarked. This layer only REPRESENTS the moves; adjudication is a separate layer.

Additive, like the sibling koinii modules: requires only the public core API and koinii identity — nothing under vaelii.impl, and nothing in core loads it. Every write goes through the provenance-stamping assert path, never bulk-assert-facts!.

Koinii speech-acts: the small vocabulary of moves agents make, as
sentexes in the KB.  A move is not an out-of-band message but knowledge — queryable,
retractable, auditable like any other fact — and the SHAPE of the move carries the
layer's headline property (koinii design D1 / D5).

Two kinds of move, one split (`koinii.md`, *Reply is an assertion*):

- **Origination** (`asserts`, `queries`) — a plain assertion in the acting agent's
  own context.  The claim, or the query node, plus its provenance IS the act: nothing
  wraps it, because provenance already records who spoke (first-writer-wins).  So an
  assertion in koinii is just an assertion — `assert-claim` mints no `asserts` edge.
  A query is minted as a node (`pose-query`), because a question must be told apart
  from a claim.
- **Response** (`answers`, `disputes`, `endorses`, `justifies`) — a META-SENTEX on
  the target sentex, naming it by handle `(sentexHandle H)`, asserted in the
  RESPONDER's own context and stamped with the responder as creator.  Each response
  predicate is declared `targetFollowingPredicate` in `CxSpeechActs`, so retracting a
  target sweeps its replies with it (`core/retract-following-metas!`).  Two facts
  force this: the cascade needs BOTH the meta-sentex AND the mark (an unmarked meta
  orphans harmlessly), and first-writer-wins forces each act to be its own object —
  two endorsers are two sentexes with two creators, never one re-assert.

`retracts` is the engine's `retract!` on a handle.  The error acts
(`notUnderstood`, `refuse`) name the received edge, in the refusing agent's context,
and are deliberately unmarked.  This layer only REPRESENTS the moves; adjudication is
a separate layer.

Additive, like the sibling koinii modules: requires only the public core API and koinii
`identity` — nothing under `vaelii.impl`, and nothing in core loads it.  Every write goes
through the provenance-stamping `assert` path, never `bulk-assert-facts!`.
raw docstring

answerclj

(answer kb agent content target-handle)

The answers response act: agent answers the query at target-handle with content. A meta-sentex (answers agent content (sentexHandle target-handle)) in agent's own context, creator agent. targetFollowingPredicate. The answerer's identity is read off THIS sentex (its context + provenance), not off the query. Returns the answer's handle.

The `answers` response act: `agent` answers the query at `target-handle` with
`content`.  A meta-sentex `(answers agent content (sentexHandle target-handle))` in
`agent`'s own context, creator `agent`.  targetFollowingPredicate.  The answerer's
identity is read off THIS sentex (its context + provenance), not off the query.
Returns the answer's handle.
sourceraw docstring

answers-toclj

(answers-to kb query-handle)
(answers-to kb query-handle context)

Every believed answer naming the query query-handle, seen from context (default ?ctx — match anywhere): the sentex maps (answers ?agent ?content (sentexHandle query-handle)). Pair each with responder-of for who answered and its :context for where from — 'what answered A's question, and who said it' is this read.

Every believed answer naming the query `query-handle`, seen from `context` (default
?ctx — match anywhere): the sentex maps `(answers ?agent ?content (sentexHandle
query-handle))`.  Pair each with `responder-of` for who answered and its `:context`
for where from — 'what answered A's question, and who said it' is this read.
sourceraw docstring

assert-claimclj

(assert-claim kb agent claim)
(assert-claim kb agent claim ctx)

The asserts move: originate a claim. A bare assertion of claim in agent's own context, stamped agent as creator — NO asserts wrapper, because provenance already records who asserted (first-writer-wins), so wrapping would only duplicate it. A second agent re-asserting the same sentence in the same context writes no new provenance, which is exactly why an endorsement must be its own object. Returns the claim's handle.

The `asserts` move: originate a claim.  A bare assertion of `claim` in `agent`'s own
context, stamped `agent` as creator — NO `asserts` wrapper, because provenance already
records who asserted (first-writer-wins), so wrapping would only duplicate it.  A
second agent re-asserting the same sentence in the same context writes no new
provenance, which is exactly why an endorsement must be its own object.  Returns the
claim's handle.
sourceraw docstring

disputeclj

(dispute kb agent target-handle)

The disputes response act: agent challenges the claim at target-handle. Does two writes in agent's own context, both stamped creator agent:

  1. the REBUTTING claim — the negation of the target's sentence — so the pair surfaces in (v/contradictions kb) (both sides believed at their defeat class);
  2. a disputes meta-sentex naming the target by handle — targetFollowingPredicate, so retracting the target sweeps the dispute edge.

Represents the challenge only; adjudication is a separate layer. Returns the dispute edge's handle (write 2).

The `disputes` response act: `agent` challenges the claim at `target-handle`.  Does
two writes in `agent`'s own context, both stamped creator `agent`:

1. the REBUTTING claim — the negation of the target's sentence — so the pair surfaces
   in `(v/contradictions kb)` (both sides believed at their defeat class);
2. a `disputes` meta-sentex naming the target by handle — targetFollowingPredicate, so
   retracting the target sweeps the dispute edge.

Represents the challenge only; adjudication is a separate layer.  Returns the dispute
edge's handle (write 2).
sourceraw docstring

endorseclj

(endorse kb agent target-handle)

The endorses response act: agent stands behind the claim at target-handle. A meta-sentex (endorses agent (sentexHandle target-handle)) in agent's own context, creator agent. targetFollowingPredicate, so it is swept when the target is retracted. Two endorsers of one claim yield two distinct sentexes with two creators — the case a bare re-assert would collapse to one. Returns the endorsement's handle.

The `endorses` response act: `agent` stands behind the claim at `target-handle`.  A
meta-sentex `(endorses agent (sentexHandle target-handle))` in `agent`'s own context,
creator `agent`.  targetFollowingPredicate, so it is swept when the target is
retracted.  Two endorsers of one claim yield two distinct sentexes with two creators —
the case a bare re-assert would collapse to one.  Returns the endorsement's handle.
sourceraw docstring

endorsements-ofclj

(endorsements-of kb target-handle)
(endorsements-of kb target-handle context)

Every believed endorsement naming target-handle, seen from context (default ?ctx): the sentex maps (endorses ?agent (sentexHandle target-handle)). Distinct endorsers are distinct sentexes; read each one's creator with responder-of.

Every believed endorsement naming `target-handle`, seen from `context` (default ?ctx):
the sentex maps `(endorses ?agent (sentexHandle target-handle))`.  Distinct endorsers
are distinct sentexes; read each one's creator with `responder-of`.
sourceraw docstring

justifyclj

(justify kb agent ground target-handle)

The justifies response act: agent offers ground as a reason for the claim at target-handle. A meta-sentex (justifies agent ground (sentexHandle target-handle)) in agent's own context, creator agent. targetFollowingPredicate. Returns the justification's handle.

The `justifies` response act: `agent` offers `ground` as a reason for the claim at
`target-handle`.  A meta-sentex `(justifies agent ground (sentexHandle target-handle))`
in `agent`'s own context, creator `agent`.  targetFollowingPredicate.  Returns the
justification's handle.
sourceraw docstring

load-speech-actsclj

(load-speech-acts kb)

Load the CxSpeechActs vocabulary into kb from resources/kb/koinii/CxSpeechActs.txt. Koinii KB files are not auto-discovered (the starter walks only upper/ and middle/), so this explicit loader is how the context comes into being. Requires CxCore already loaded (CxSpeechActs wires (genlCx CxSpeechActs CxCore)). Returns kb.

Load the CxSpeechActs vocabulary into `kb` from resources/kb/koinii/CxSpeechActs.txt.
Koinii KB files are not auto-discovered (the starter walks only upper/ and middle/),
so this explicit loader is how the context comes into being.  Requires CxCore already
loaded (CxSpeechActs wires `(genlCx CxSpeechActs CxCore)`).  Returns kb.
sourceraw docstring

not-understoodclj

(not-understood kb agent received-handle)

The notUnderstood error act: agent could not parse the received edge at received-handle. A meta-sentex (notUnderstood agent (sentexHandle received-handle)) in agent's own context, creator agent. Deliberately NOT targetFollowingPredicate: a parse failure is a fact about the exchange and outlives what provoked it. Returns its handle.

The `notUnderstood` error act: `agent` could not parse the received edge at
`received-handle`.  A meta-sentex `(notUnderstood agent (sentexHandle received-handle))`
in `agent`'s own context, creator `agent`.  Deliberately NOT targetFollowingPredicate:
a parse failure is a fact about the exchange and outlives what provoked it.  Returns
its handle.
sourceraw docstring

pose-queryclj

(pose-query kb agent question)
(pose-query kb agent question ctx)

The queries move: originate a query NODE (queries agent question) in agent's own context, stamped agent as creator — the node a responder later answers by handle. Minted (unlike assert-claim) because a question must be told apart from a claim. Returns the query node's handle.

The `queries` move: originate a query NODE `(queries agent question)` in `agent`'s own
context, stamped `agent` as creator — the node a responder later answers by handle.
Minted (unlike `assert-claim`) because a question must be told apart from a claim.
Returns the query node's handle.
sourceraw docstring

refuseclj

(refuse kb agent received-handle)

The refuse error act: agent will not act on the received edge at received-handle. Same shape and placement as not-understood, also unmarked. Returns its handle.

The `refuse` error act: `agent` will not act on the received edge at `received-handle`.
Same shape and placement as `not-understood`, also unmarked.  Returns its handle.
sourceraw docstring

responder-ofclj

(responder-of kb handle)

The agent credited (via provenance :creator) with the response sentex handle, or nil — 'who made this move', read off the move itself.

The agent credited (via provenance `:creator`) with the response sentex `handle`, or
nil — 'who made this move', read off the move itself.
sourceraw docstring

retract-moveclj

(retract-move kb handle)

The retracts move: the engine's retract! on handle. It is this very teardown that the targetFollowingPredicate response acts cascade with — retract a target and its answers / endorses / disputes / justifies edges go with it. Returns retract!'s counts.

The `retracts` move: the engine's `retract!` on `handle`.  It is this very teardown
that the targetFollowingPredicate response acts cascade with — retract a target and
its answers / endorses / disputes / justifies edges go with it.  Returns retract!'s
counts.
sourceraw docstring

speaker-contextclj

(speaker-context kb channel agent)

Create/lift agent's per-agent context (id/context-for): under channel so the channel sees the agent's moves — (genlCx channel CxAtlas) — and under CxSpeechActs so the agent speaks the act vocabulary and the rules over it fire. Both edges are monotonic topology. Returns the agent context symbol.

This is the identity substrate acts land in: 'who' comes from the edge's own context and provenance, never from the target it names.

Create/lift `agent`'s per-agent context (`id/context-for`): under `channel` so the
channel sees the agent's moves — `(genlCx channel CxAtlas)` — and under CxSpeechActs so
the agent speaks the act vocabulary and the rules over it fire.  Both edges are
monotonic topology.  Returns the agent context symbol.

This is the identity substrate acts land in: 'who' comes from the edge's own context
and provenance, never from the target it names.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close