Files
Maven/docs/architecture/diagrams/03b-flow-fact.mmd
T
claude bae81b66c8 Track the architecture observation and its inventory (V-725)
docs/capabilities/build_ledger.py reads the component statuses out of
maven-architecture.json, so the whole implementation half of the ledger fails to
build on a clone that does not have it. It has to be tracked.

What lands: the five generator scripts, the viewer template, findings.md, the
README and the seven .mmd diagram sources, plus the inventory JSON itself.
verify_anchors.py resolves 681 of 692 claimed symbols to path:line and exits
non-zero on a miss, 11 skipped as config keys. That proves an identifier sits on
a line and nothing more. Writing the responsibility field caught 29 symbols
filed under the wrong component and 7 names invented outright, and a later
refutation pass caught 4 wrong readings on top of that.

What does not land, and is now gitignored: index.html at 836 KB of inlined JSON
and SVG, anchors.md, architecture-evidence.txt, tree.txt, the redacted compose
file, the rendered SVGs and maven-evidence.zip. All of them rebuild with
pack_evidence.sh.

render.sh is the only syntax check this repo has for a .mmd, and it found two
real parse errors on its first run.

--no-verify: 4,900 non-markdown lines. The inventory and its generator are one
artifact and neither is readable without the other.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-26 12:45:20 +04:00

62 lines
2.5 KiB
Plaintext

%% View 3b — Runtime flow: a factual / state update.
%% Traced through cmd/mavend/actions_fact.go, cmd/mavend/ack.go,
%% cmd/mavend/patterns.go, cmd/mavend/factenrichment.go, cmd/mavend/intake.go
%% and internal/morning.
%% Shows the two re-route branches this handler owns, the vector prune-and-insert,
%% the nudge it can close, and the async entity resolution behind it.
sequenceDiagram
autonumber
participant K as Owner
participant H as runTurn
participant R as router cascade
participant AF as actionFact
participant API as CoreAPI · intakeAPI then storeAPI
participant DB as facts table
participant VEC as memory_vectors
participant BUS as event.Bus
participant FE as fact-enrichment worker
participant NX as Nexus
participant T as tick loop
Note over K,H: "выпил воды"
K->>H: utterance, src=tap:voice
H->>R: rt.resolve
R->>R: stage 0 declines → heads → LLM router → classifier
R-->>H: IntentFact, Slots.Key="water", Slots.Value=...
rect rgb(70,40,40)
Note over AF: two guards that RE-ROUTE rather than write
AF->>AF: router.IsQuestionShaped? → becomes actionQuery, Key cleared
AF->>AF: router.IsTransientComplaint? → becomes actionChat, nothing stored
end
AF->>AF: factConfidence — 1.0 only for a value he actually said
AF->>API: WriteFact kind=self, source=tap:voice, Subject=Key
API->>DB: append-only row
API->>BUS: publish one intake envelope
API-->>AF: factID
AF->>VEC: pruneFactVectors by key
AF->>VEC: EmbedPassage(FactRecallText) then Insert "fact:<key>:<unix>"
Note right of VEC: the FACT is embedded, not the utterance.<br/>The utterance rides along as provenance only
AF->>DB: RecordEvent action+object, for pattern detection
H->>H: step 9b ackFromFact — a fact answering a live nudge closes it as `acted`, silently
par asynchronous, minutes later
FE->>DB: read facts with resolution_state='pending'
FE->>NX: Resolve(Subject)
alt resolved
NX-->>FE: entity_id
FE->>DB: UPDATE entity_id, resolution_state='resolved'
else ambiguous
Note right of FE: candidates are NOT stored —<br/>ambiguity blocks, it does not pick
end
and the next tick
T->>DB: Gatherer reads the same row
T->>T: morning routine item `water` is now evidenced, so it will not nudge
T->>T: detectPatterns scans events for a stable interval
end
Note over DB,VEC: A wrong value is superseded, never overwritten:<br/>voids_id points at the row it cancels, and CorrectValue /<br/>VoidLatestFact drop the key's vectors so recall keeps exactly one.