knowledge command group lets you export the decision memory that WattSwarm accumulates in the local Knowledge Store as tasks are executed and finalized. Decision memory drives the kernel’s reuse and seed bundle features — previous outputs, evidence, and reputation scores are injected into new task executions to reduce redundant exploration. Exporting a bundle lets you inspect, audit, and archive that memory outside the kernel.
knowledge export
Export a decision knowledge bundle to a JSON file.
Synopsis
You must pass exactly one of
--task_type or --task_id. Passing both or neither returns an error.
Description
Reads the Knowledge Store tables from the local PostgreSQL database and writes a structured JSON bundle to the output file. The export includes all knowledge rows that match the filter, serialised as a single JSON object that you can inspect directly or archive.
Examples
What the exported bundle contains
The exported bundle is a JSON object with the following top-level sections: Decision records — one record per finalized task. Each record captures:task_idandtask_typefinalized_candidate_idand the candidate output valuequorum_result_json— the full quorum outcome snapshot at finalizationreason_details— structured details forFINALIZED,ERROR, orEXPIRYterminal states- Timestamps for creation, finalization, and expiry
ArtifactRef entries from proposers and verifiers attached to the winning candidate. Each ref includes uri, digest, size_bytes, mime, created_at, and producer.
Reuse metrics — per-task-type and per-task reuse statistics:
reuse_hit_rate_exact— fraction of tasks where an exact knowledge match was found and reusedreuse_hit_rate_similar— fraction of tasks where a similar (fuzzy) match was found and reusedreuse_candidate_accept_rate— fraction of reused candidates that were ultimately accepted by quorumexact_hit_countandsimilar_hit_countper lookup row
REPUTATION_WEIGHTED aggregation. Each entry includes the verifier’s node_id, accumulated reputation units, and any downgrade events recorded against them.