Totem Shield
Version updated for https://github.com/mmnto-ai/totem to version @mmnto/totem@1.14.0.
- This action is used across all versions by 0 repositories.
Action Type
This is a Composite action.
Go to the GitHub Marketplace to find the latest changes.
Action Summary
Totem is a developer tool that provides AI coding agents with a persistent, cross-repository memory to prevent repeated mistakes and enforce architectural best practices. By compiling human-readable lessons into deterministic linting rules, it automates the enforcement of coding guidelines, blocks problematic patterns during development, and ensures consistency across projects without relying on runtime LLMs. It integrates seamlessly into existing workflows and CI pipelines, offering a self-healing loop where mistakes are observed, learned, and enforced for continuous improvement.
What’s Changed
Minor Changes
11ab03b: 1.14.0 — The Nervous System Foundation
Cross-repo federated context (shipped as the headline feature) plus opt-in preview of persistent LLM context caching. Mesh and caching are two halves of the same nervous system — sharing context across space (cross-repo federation) and across time (cached tokens) — but they ship at different maturity levels in 1.14.0: mesh is the active default, caching is opt-in preview machinery whose default activation is tracked for 1.15.0 in mmnto/totem#1291.
- Cross-Repo Context Mesh (#1295): New
linkedIndexes: []option intotem.config.tslets a repo federate semantic search against sibling Totem-managed repos.SearchResultnow includes source context fields (sourceRepo,absoluteFilePath) so agents can Read/Edit results unambiguously regardless of which repo the hit came from. Federation merges results via cross-store Reciprocal Rank Fusion (RRF k=60) rather than raw score comparison, eliminating the score-scale bias that would otherwise pin one store’s results below another’s when their underlying search methods produce scores in incompatible ranges (hybrid RRF ~0.03 vs vector-only ~0.85). A healthy primary + one broken linked store returns partial results with a per-query runtime warning; an entire-federation outage returnsisError: trueinstead of masking as “no results found.” Per-store reconnect+retry recovers from stale handles during concurrenttotem syncrebuilds. Targetedboundary: "<name>"queries route only to that linked store. Strategy Proposal 215. - LLM Context Caching — Opt-In Preview (#1292): Anthropic
cache_controlmarkers wired through the orchestrator middleware for compile + review paths. Sliding TTL configurable viacacheTTL, constrained to the two values Anthropic supports natively:300(5 minutes, default ephemeral) or3600(1 hour, extended cache). The TTL resets on every cache hit, so bulk recompile runs stay warm end-to-end as long as operations land inside the active window. Defaults to off in 1.14.0 — opt-in viaenableContextCaching: trueintotem.config.tsto avoid surprising existing users mid-cycle with a token-usage profile shift. Default activation tracked for 1.15.0 in mmnto/totem#1291. Anthropic-only in this release; GeminiCachedContentsupport tracked for 1.16.0+. Strategy Proposal 217. The full machinery (orchestrator middleware, schema field, TTL-literal validation, per-call cache metric tracking) ships in 1.14.0 — only the default-on behavior is deferred. - Federation diagnostic hardening: Dimension-mismatch diagnostic now persists across queries (one-shot is wrong when the underlying state is actively blocking — a single warning followed by cryptic LanceDB errors was worse than a persistent actionable message). One-shot first-query flags are only consumed after the gated operation actually succeeds, so transient
getContextfailures don’t permanently suppress startup warnings. Linked-store init warnings (empty stores, name collisions, dimension mismatches) survive reconnect cycles intact — they represent static config state that a runtime reconnect can’t fix. - Collision-safe state: Linked store name collisions (two paths deriving to the same basename) are keyed under the bare derived name in
linkedStoreInitErrorsso theperformSearchboundary lookup can find them — earlier revisions used a descriptive composite key that was unreachable by any user-facing query. Primary store failures are tracked in a dedicatedFailureLog.primaryslot rather than overloading'primary'as a map key, which would have collided with legal link names (deriveLinkNamestrips leading dots, so a linked repo at.primary/derives to'primary'). - Smoke test (#1295 Phase 3): Standalone CLI integration test (
packages/mcp/dist/smoke-test.js) exercises a realServerContextagainst the currenttotem.config.ts, runs a federated query across primary + all linked stores, and emits a pass/fail verdict with per-store hit counts and top-N formatted results. Used as the empirical proof for the PR #1295 body; repurposable for any future cross-repo validation. - 19 lessons extracted from the 1.14.0 PR arc (#1292, #1295, #1296); 1 new compiled rule via local Sonnet (394 total, up from 393). 18 lessons skipped as architectural/conceptual — tracked as
nonCompilabletuples for doctor triage. Most of the architectural 1.14.0 learnings (silent-drift anti-patterns, reserved-key collisions, session-vs-per-request state confusion, failure-modes-table-as-design-review-tool) are non-compilable by nature but live in.totem/lessons/as referenceable architectural patterns. (The initial compile pass produced 2 rules; the delimiter-cache-key rule was reframed as architectural after both bots caught a malformed ast-grep pattern that the LLM produced twice in a row — Tenet 4 says broken rules should not ship, so the lesson now lives as documentation only.) - 2722 tests across core + cli + mcp (up from 2580 at the start of the 1.14.0 cycle).
- Cross-Repo Context Mesh (#1295): New