AGENT SKILL

CoderOS Cognitive Persistence

Validate, reconcile, and promote records in the Knowledge/Episodic/Wisdom/Runtime-Inference persistence layer.

License 许可
MIT
最近更新
2026-10-07
Stars
★ 1
Forks
0

01 前言 Front Matter

name
CoderOS Cognitive Persistence
description
Validate, reconcile, and promote records in the Knowledge/Episodic/Wisdom/Runtime-Inference persistence layer.

03 SKILL.md 正文

CoderOS Cognitive Persistence

Provides rules for working with repo_dev_runtime.cognitive_persistence, repo_dev_runtime.knowledge, repo_dev_runtime.memory.episodic_trajectory, repo_dev_runtime.source_truth, and repo_dev_runtime.consolidation.claude: the cognitive_persistence_cli's validate, reconcile, promote, report, integration-audit, and render subcommands, plus the Canonical Consolidation Authority Graph's validate-graph, authority-audit, contradiction-report, and reconcile subcommands (python -m repo_dev_runtime.consolidation.claude.cli).

Rules

  • Never construct a KnowledgeRecord with provenance_status="unverified" unless both evidence and attested_by are populated -- knowledge cannot rest on an unverified model statement alone.
  • Never hand-set WisdomCandidateRecord.wisdom_promotion_status="promoted" without re-running it through wisdom.evaluate_wisdom_promotion first -- promotion requires >= 3 independent (lane_id, work_order_id) pairs.
  • Never write code that converts a RuntimeInferenceRecord directly into a KnowledgeRecord or WisdomCandidateRecord -- the only path is adapters.propose_knowledge_from_runtime_inference, which requires independent evidence and rejects a verbatim-matching statement.
  • Never resolve a ContradictionRecord to confirmed/superseded/rejected without resolution_evidence, resolved_event_time, and resolver all populated.
  • Never give an EvidenceTrustFinding a free-text adapted_from -- it must be a "file#record_id" pointer to an already-existing record, never a copy of that record's own text.
  • Decay is never a stored field on EpisodicTrajectoryRecord -- always compute it at read time via memory.decay.evaluate_decay.
  • Supersession is never a mutation of a KnowledgeRecord -- always compute it via knowledge.supersession.compute_effective_status.
  • WisdomCandidateRecord.supporting_decision_refs (distinct from supporting_trajectory_ids) is the only way an accepted ImprovementDecisionRecord may count toward independent confirmation -- never append a decision reference into supporting_trajectory_ids, and never write to improvement_decision_ledger.py from this layer (read decision_status only, via accepted_decision_confirmation_ref).
  • source_truth.SourceTruthLedgerEntry never carries fact text -- it is a pointer (knowledge_id) plus confidence/validity_status, always produced by source_truth.ledger.build_source_truth_ledger, never hand-constructed with a fabricated confidence score.
  • consolidation.claude.graph.CapabilityGraphNode.module_path must be a file that actually exists in this repository (or a pinned external commit SHA) -- never a templated/sequential placeholder path. Before trusting any projects/coderos/source_mining/*.json corpus as an ingestion source, spot-check several rows for exactly this pattern (see reconciliation.REJECTED_TEMPLATED_SOURCE_FILES for a real example of four files that failed this check and were rejected as inputs).
  • Every DuplicateAuthorityFinding and ArtifactReconciliationRecord requires an adapted_from "file#record_id" pointer -- never free text -- exactly like EvidenceTrustFinding.
  • consolidation.claude.mvp_projection functions prove compatibility with another subsystem's input contract by actually constructing and .validate()-ing a real instance of that subsystem's own dataclass -- never by assertion. If a real field's value has no valid translation (e.g. a reuse_mode absent from work_order_factory.SOURCE_MODES), raise; never silently coerce or drop content to force a fake pass. operator_loop.py may be imported read-only for its dataclasses in this module -- it is a forbidden-to-modify file for this mission's own allowed-paths, and no code here ever writes to it.
  • Episodic memory's confidence, frequency, replay_status, and decay_stage are always computed via memory.episodic_projection.compute_episodic_memory_projection -- never new stored fields on EpisodicTrajectoryRecord, which stays frozen. frequency counts cohort records sharing (lane_id, work_order_id) -- the same independence unit wisdom.evaluate_wisdom_promotion uses -- so the two never disagree about what "the same attempt context" means.
  • consolidation.claude.context_projection and feedback_projection project real records into the pre-existing context_tiers.ContextNode and source_leverage_routing_feedback.ReuseOutcomeSignal/ CandidateLaneFit dataclasses -- never a new L0/L1/L2 or feedback/lane-fit schema. candidate_lane_fit_from_wisdom_candidate requires an explicit, pre-validated lane argument and raises on any value outside source_leverage_routing_feedback.LANES -- that enum shares zero members with real lane_id values, so never guess a mapping between them.
  • consolidation.claude.authority.check_no_forbidden_authority_duplication is the live, ast-based self-check proving this subsystem never defines a Scheduler, MergeQueue, OperatorLoop, SupervisorLoop, or bare Queue name -- re-run it (via authority-audit) after adding any new top-level class/function to an owned package, never assume it still passes.

04 同仓库更多 Skills