Totem Shield
Version updated for https://github.com/mmnto-ai/totem to version @mmnto/totem@1.23.0.
- This action is used across all versions by ? repositories.
Action Type
This is a Composite action.
Go to the GitHub Marketplace to find the latest changes.
Action Summary
Totem is a CLI tool designed to provide a persistent memory and enforcement layer for AI coding agents, addressing their tendency to forget architectural context or reuse existing helpers. It automates the process of catching and preventing repetitive coding mistakes by converting plain-English lessons into deterministic, offline linting rules that block problematic changes before they are pushed. This ensures consistent code quality and reduces the friction of manual reviews, enabling AI agents to operate with improved architectural integrity.
What’s Changed
Minor Changes
94ea4a8: Pack v0.1 alpha pilot:
@totem/pack-rust-architecturelift + ADR-091/097 substrate completion (#1773)First non-trivial consumer of the ADR-097 § 10 Pack v0.1 substrate (#1768/#1769/#1770 in 1.22.0). Validates the substrate end-to-end by registering Rust as a language extension and dispatching ast-grep rules against
.rssource.@totem/pack-rust-architecture@1.23.0— new package (private: true)- 8 baseline lessons sourced from
mmnto-ai/liquid-city#134(slice-6 vehicle-agent + dispersion review cycle, lc-Claude attribution preserved) - Synchronous CJS
register.cjswires Rust into both engine paths:api.registerLanguage('.rs', 'rust', wasmLoader)for the web-tree-sitter side andnapi.registerDynamicLanguage({ rust })for the @ast-grep/napi side (v0.1 side-channel, see@mmnto/totem#1774) - Bundled
tree-sitter-rust.wasm(1.1 MB) sourced from@vscode/tree-sitter-wasm@0.3.1(MIT, Microsoft) viaprepare-time copy compiled-rules.jsonships one tracer-bullet seed rule (lesson-8cefba95, Bevy hot-pathLocal<Vec<T>>per-tick allocation) — full LLM-compile of the 8-lesson set deferred to a focused follow-up since γ (per-languageKIND_ALLOW_LIST, #1655) is needed before LLM-compile of Rust patterns avoids TS-grammar hallucinations- Runtime integration tests boot the pack via
loadInstalledPacks({ inMemoryPacks })and verify the seed rule fires on.rssource through the full substrate path
@mmnto/totem— #1654 fix: thread target Lang through the compile-time pattern validatorPre-#1654,
validateAstGrepPatternalways parsed underLang.Tsxregardless of the rule’sfileGlobs, andinferBadExampleExts(smoke gate) used a TS/JS-only regex that silently fell back to the default set for non-TS rules. A Rust pattern would either false-pass under TSX (theResMut<TacticalState>exhibit) or false-fail with a TSX-parser error.validateAstGrepPattern(pattern, fileGlobs?)now resolves the target Lang viaresolveAstGrepLangs(fileGlobs)and accepts the pattern when any one Lang accepts it. Falls back toLang.Tsxwhen fileGlobs is empty or no glob carries a registered extension (preserves legacy unscoped-rule semantics).inferBadExampleExtsextracts any trailing extension fromfileGlobs(not just TS/JS); runtime’sextensionToLangfilters out unmapped extensions insidematchAstGrepPatternso unmapped extensions cleanly return zero matches without parsing under the wrong grammar.- New
resolveAstGrepLangshelper exported alongsideextensionToLangfromast-grep-query.ts. - 6 new regression tests covering the LC false-positive exhibit and the TS-fallback preservation invariant.
Substrate-extension follow-up filed as #1774 (tier-2, investigation): lift the napi-side language registration into
PackRegistrationAPI.registerNapiLanguageonce N≥2 pack consumers exist. PR-B’s side-channel pattern inregister.cjsis the time-boxed precedent that gathers design data; the side-channel is documented as visible debt in the pack’s README.- 8 baseline lessons sourced from