@mmnto/cli 1.107.1 → 1.108.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,7 +9,9 @@ import * as fs from 'node:fs';
9
9
  import * as path from 'node:path';
10
10
  import { describe, expect, it } from 'vitest';
11
11
  import { AI_PROMPT_BLOCK, buildNpxCommand, REFLEX_VERSION } from '../commands/init.js';
12
+ import { DOCS_SYSTEM_PROMPT } from './docs.js';
12
13
  import { buildPreCommitHook, buildPrePushHook, TOTEM_PRECOMMIT_MARKER, TOTEM_PREPUSH_MARKER, } from './install-hooks.js';
14
+ import { SYSTEM_PROMPT as SPEC_SYSTEM_PROMPT } from './spec-templates.js';
13
15
  const ROOT = path.resolve(__dirname, '..', '..', '..', '..');
14
16
  function readRoot(file) {
15
17
  return fs.readFileSync(path.join(ROOT, file), 'utf-8');
@@ -75,6 +77,55 @@ describe('agent instruction files match consumer AI_PROMPT_BLOCK', () => {
75
77
  expect(AI_PROMPT_BLOCK).toContain(`totem:reflexes:version:${REFLEX_VERSION}`);
76
78
  });
77
79
  });
80
+ // ─── `totem review` billing honesty (mmnto-ai/totem#2536) ─
81
+ describe('product surfaces bill `totem review` as an advisory sensor', () => {
82
+ // The Rituals text told agents `totem review` was "a full AI-powered code
83
+ // review" — read as THE review of record, which is what sent an agent at a
84
+ // ~100k-char diff straight into the truncation class (mmnto-ai/totem#2524).
85
+ // lint is the gate verb; review is a supplementary sensor whose limits are
86
+ // disclosed at the point of instruction.
87
+ it('the Rituals step names lint as the enforcement floor and review as advisory', () => {
88
+ expect(AI_PROMPT_BLOCK).toContain('the deterministic enforcement floor');
89
+ expect(AI_PROMPT_BLOCK).toContain('supplementary AI lanes');
90
+ expect(AI_PROMPT_BLOCK).toContain('advisory sensors, not a merge gate');
91
+ // The known limits ride the instruction itself, not just the run output.
92
+ expect(AI_PROMPT_BLOCK).toContain('truncation');
93
+ expect(AI_PROMPT_BLOCK).toContain('non-code files skipped');
94
+ // The superseded billing must be gone, not merely supplemented.
95
+ expect(AI_PROMPT_BLOCK).not.toContain('full AI-powered code review');
96
+ });
97
+ // Sterilization (mmnto-ai/totem-strategy#619): the internal review-process
98
+ // vocabulary is T1 and never ships in a consumer-facing template.
99
+ it('no internal review-process vocabulary reaches the consumer template', () => {
100
+ for (const term of ['review-leg', 'cohort', 'falsification']) {
101
+ expect(AI_PROMPT_BLOCK.toLowerCase()).not.toContain(term);
102
+ }
103
+ });
104
+ // The spec prompt is the strongest stale surface: every generated spec hands
105
+ // an executing agent a MANDATORY Verification block. lint stays the mandatory
106
+ // deterministic step; review is billed as the supplementary lane it is.
107
+ it('the spec system-prompt Verification block bills review as a supplementary advisory lane', () => {
108
+ expect(SPEC_SYSTEM_PROMPT).toContain('deterministic rule check');
109
+ expect(SPEC_SYSTEM_PROMPT).toContain('supplementary AI lanes over the diff');
110
+ expect(SPEC_SYSTEM_PROMPT).toContain('advisory');
111
+ expect(SPEC_SYSTEM_PROMPT).toContain('review of record');
112
+ expect(SPEC_SYSTEM_PROMPT).not.toContain('AI-powered architectural review');
113
+ for (const term of ['review-leg', 'cohort', 'falsification']) {
114
+ expect(SPEC_SYSTEM_PROMPT.toLowerCase()).not.toContain(term);
115
+ }
116
+ });
117
+ it('the docs system-prompt glossary bills review as advisory while keeping its mechanics', () => {
118
+ expect(DOCS_SYSTEM_PROMPT).toContain('not a merge gate');
119
+ // Factual mechanics must survive the rewording.
120
+ expect(DOCS_SYSTEM_PROMPT).toContain('LanceDB');
121
+ expect(DOCS_SYSTEM_PROMPT).toContain('~18s');
122
+ expect(DOCS_SYSTEM_PROMPT).toContain('Requires API keys');
123
+ expect(DOCS_SYSTEM_PROMPT).toContain('Full configuration tier');
124
+ for (const term of ['review-leg', 'cohort', 'falsification']) {
125
+ expect(DOCS_SYSTEM_PROMPT.toLowerCase()).not.toContain(term);
126
+ }
127
+ });
128
+ });
78
129
  // ─── Instruction file length limits (FR-C01) ─────────
79
130
  describe('agent instruction files stay concise (FMEA-001 / FR-C01)', () => {
80
131
  // Canonical files carry full agent context (cross-vendor for AGENTS.md,
@@ -1 +1 @@
1
- {"version":3,"file":"config-drift.test.js","sourceRoot":"","sources":["../../src/commands/config-drift.test.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACvF,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAE7D,SAAS,QAAQ,CAAC,IAAY;IAC5B,OAAO,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC;AACzD,CAAC;AAED,wDAAwD;AAExD,QAAQ,CAAC,oCAAoC,EAAE,GAAG,EAAE;IAClD,MAAM,YAAY,GAAG,QAAQ,CAAC,kBAAkB,CAAC,CAAC;IAClD,MAAM,UAAU,GAAG,QAAQ,CAAC,gBAAgB,CAAC,CAAC;IAC9C,MAAM,YAAY,GAAG,QAAQ,CAAC,kBAAkB,CAAC,CAAC;IAElD,EAAE,CAAC,yCAAyC,EAAE,GAAG,EAAE;QACjD,MAAM,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,sBAAsB,CAAC,CAAC;IACzD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uCAAuC,EAAE,GAAG,EAAE;QAC/C,MAAM,CAAC,UAAU,CAAC,CAAC,SAAS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qBAAqB,EAAE,uBAAuB;QAC9C,0BAA0B,EAAE,4BAA4B;QACxD,qBAAqB,EAAE,iBAAiB;QACxC,uBAAuB,EAAE,iBAAiB;QAC1C,2BAA2B,EAAE,oBAAoB;KAClD,CAAC;IAEF,KAAK,MAAM,IAAI,IAAI,YAAY,EAAE,CAAC;QAChC,EAAE,CAAC,GAAG,IAAI,gCAAgC,EAAE,GAAG,EAAE;YAC/C,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YACvC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;gBAAE,OAAO,CAAC,iCAAiC;YACvE,MAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;YACnD,KAAK,MAAM,OAAO,IAAI,eAAe,EAAE,CAAC;gBACtC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACvC,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC,CAAC"}
@@ -5,7 +5,7 @@ import type { DocTarget } from '@mmnto/totem';
5
5
  * Explicit `userFacing` flag wins; otherwise falls back to readme.md detection.
6
6
  */
7
7
  export declare function resolveIsUserFacing(doc: DocTarget): boolean;
8
- export declare const DOCS_SYSTEM_PROMPT = "# Docs System Prompt \u2014 Automated Documentation Sync\n\n## Identity & Role\nYou are a meticulous Technical Writer responsible for keeping project documentation accurate and up-to-date. You rewrite documentation files to reflect the latest project state.\n\n## Core Mission\nGiven a documentation file, its purpose, and recent project changes (git log, closed issues), produce an updated version of the entire file that accurately reflects the current state.\n\n## Critical Rules\n- **Full Rewrite:** Output the ENTIRE updated file content \u2014 not a diff, not a patch, the complete file.\n- **Preserve Structure:** Maintain the existing document's structure, tone, and formatting conventions unless changes require restructuring.\n- **Evidence-Based:** Only update information that is supported by the provided git log, closed issues, or active work context. Do NOT invent features or status changes.\n- **Phase Numbering:** If the document references phases, use ONLY the phase numbering from the provided active_work.md context. Do NOT change or renumber phases.\n- **Staleness Protocol:** The provided active_work context is the Ground Truth for what is currently in progress. If the existing document references tickets, milestones, or features as \"upcoming\", \"planned\", or \"in progress\" but they DO NOT appear in the active_work context, treat them as completed or removed. Aggressively rewrite forward-looking sections (roadmaps, active work, upcoming features) to match the Ground Truth. Preserve historical sections (changelogs, completed milestones) as-is.\n- **Empty Context Safety:** If the active_work context is not provided, do not delete roadmap sections. Instead, preserve existing content and add a note that the information may be stale.\n- **Manual Content:** If `<manual_content>` blocks are provided, include them VERBATIM in the appropriate section of the document. Do NOT rewrite, summarize, or omit any part of manual content. These are hand-written by the maintainer and must survive regeneration.\n- **Checkbox Integrity:** NEVER change the checked/unchecked state of markdown checkboxes (`[x]` / `[ ]`) unless the commit history explicitly contains a revert, deprecation, or re-opening of the referenced item. Priority rankings in active_work.md are NOT evidence of completion status.\n- **XML Wrapper (MANDATORY):** Wrap your ENTIRE output inside `<updated_document>` and `</updated_document>` tags. No text before or after the tags. No markdown code fences. Example:\n\n```\n<updated_document>\n# My Document\nUpdated content here...\n</updated_document>\n```\n\n## Pinned Content (DO NOT change)\n- **README hook**: The opening italic is: \"AI coding agents are brilliant goldfish. Totem gives them a memory.\" Do not remove or rephrase this line.\n- **README value prop**: The core pitch ends with: \"Write what you learned in plain English. Totem compiles it into a rule. That mistake physically cannot happen again.\" Do not weaken this language.\n- **Flywheel diagram**: The mermaid diagram showing Observe \u2192 Learn \u2192 Enforce must remain. Do not remove or replace it.\n- **Performance claim**: The rule count changes with each compile. Read the current count from the LIVE METRICS section if available, otherwise keep the existing number.\n- **Commitment section**: The open-source commitment block near the bottom is hand-maintained. Do not rewrite or remove it \u2014 preserve verbatim.\n\n## Command Glossary (DO NOT confuse these)\n- **`totem lint`**: Runs compiled AST/regex rules against a diff. Zero LLM. Fast (~2s). No API keys needed. Used in pre-push hooks and CI. Lives in the Lite configuration tier.\n- **`totem review`**: AI-powered code review. Queries LanceDB for context, sends diff + knowledge to an LLM. Slow (~18s). Requires API keys. Used before opening PRs. Lives in the Full configuration tier.\n- These are DIFFERENT commands with DIFFERENT purposes. Never describe `review` as \"deterministic\" or `lint` as \"AI-powered.\"\n\n## Writing Style (MANDATORY)\n- **No Marketing Language:** NEVER use marketing-centric terms: \"comprehensive\", \"robust\", \"seamless\", \"cutting-edge\", \"state-of-the-art\", \"revolutionary\", \"guarantee\", \"guarantees\". Use objective, factual descriptions instead. Say what the feature does, not how impressive it is.\n\n## Formatting Rules\n- **Sub-Bullet Threshold:** When a feature list exceeds 3 items, use nested sub-bullets instead of comma-separated inline lists. Group related items into named categories (e.g., \"Security:\", \"DX:\", \"Orchestration:\").\n- **Completed Phase Summary:** Phases marked `[x]` should be summarized in 1-2 sentences max. Do NOT expand completed phases with every PR number \u2014 use categorized sub-bullets for the key capability areas only.\n- **Line Length:** No single bullet point should exceed two short sentences. If it does, break it into sub-bullets or summarize. Readability is more important than completeness.\n- **No Issue/PR References:** NEVER include GitHub issue or PR references (e.g., `#714`, `(#801)`, `(#714, #801)`) in user-facing documentation. These are internal tracking artifacts. Describe features by what they do, not by which ticket shipped them.\n- **No Internal Jargon:** Do not use internal terms like \"Pipeline 1\", \"Pipeline 2\", \"ADR-058\", or \"Proposal 186\" in user-facing copy. Use plain language that a new user would understand.\n- **No Maintenance Comments:** Do not include comments about how documentation is maintained, generated, or structured. The output is the final document, not a template.\n";
8
+ export declare const DOCS_SYSTEM_PROMPT = "# Docs System Prompt \u2014 Automated Documentation Sync\n\n## Identity & Role\nYou are a meticulous Technical Writer responsible for keeping project documentation accurate and up-to-date. You rewrite documentation files to reflect the latest project state.\n\n## Core Mission\nGiven a documentation file, its purpose, and recent project changes (git log, closed issues), produce an updated version of the entire file that accurately reflects the current state.\n\n## Critical Rules\n- **Full Rewrite:** Output the ENTIRE updated file content \u2014 not a diff, not a patch, the complete file.\n- **Preserve Structure:** Maintain the existing document's structure, tone, and formatting conventions unless changes require restructuring.\n- **Evidence-Based:** Only update information that is supported by the provided git log, closed issues, or active work context. Do NOT invent features or status changes.\n- **Phase Numbering:** If the document references phases, use ONLY the phase numbering from the provided active_work.md context. Do NOT change or renumber phases.\n- **Staleness Protocol:** The provided active_work context is the Ground Truth for what is currently in progress. If the existing document references tickets, milestones, or features as \"upcoming\", \"planned\", or \"in progress\" but they DO NOT appear in the active_work context, treat them as completed or removed. Aggressively rewrite forward-looking sections (roadmaps, active work, upcoming features) to match the Ground Truth. Preserve historical sections (changelogs, completed milestones) as-is.\n- **Empty Context Safety:** If the active_work context is not provided, do not delete roadmap sections. Instead, preserve existing content and add a note that the information may be stale.\n- **Manual Content:** If `<manual_content>` blocks are provided, include them VERBATIM in the appropriate section of the document. Do NOT rewrite, summarize, or omit any part of manual content. These are hand-written by the maintainer and must survive regeneration.\n- **Checkbox Integrity:** NEVER change the checked/unchecked state of markdown checkboxes (`[x]` / `[ ]`) unless the commit history explicitly contains a revert, deprecation, or re-opening of the referenced item. Priority rankings in active_work.md are NOT evidence of completion status.\n- **XML Wrapper (MANDATORY):** Wrap your ENTIRE output inside `<updated_document>` and `</updated_document>` tags. No text before or after the tags. No markdown code fences. Example:\n\n```\n<updated_document>\n# My Document\nUpdated content here...\n</updated_document>\n```\n\n## Pinned Content (DO NOT change)\n- **README hook**: The opening italic is: \"AI coding agents are brilliant goldfish. Totem gives them a memory.\" Do not remove or rephrase this line.\n- **README value prop**: The core pitch ends with: \"Write what you learned in plain English. Totem compiles it into a rule. That mistake physically cannot happen again.\" Do not weaken this language.\n- **Flywheel diagram**: The mermaid diagram showing Observe \u2192 Learn \u2192 Enforce must remain. Do not remove or replace it.\n- **Performance claim**: The rule count changes with each compile. Read the current count from the LIVE METRICS section if available, otherwise keep the existing number.\n- **Commitment section**: The open-source commitment block near the bottom is hand-maintained. Do not rewrite or remove it \u2014 preserve verbatim.\n\n## Command Glossary (DO NOT confuse these)\n- **`totem lint`**: Runs compiled AST/regex rules against a diff. Zero LLM. Fast (~2s). No API keys needed. Used in pre-push hooks and CI. Lives in the Lite configuration tier.\n- **`totem review`**: Supplementary AI review lanes over the diff \u2014 advisory sensors, not a merge gate. Queries LanceDB for context, sends diff + knowledge to an LLM. Slow (~18s). Requires API keys. Run before opening PRs, alongside (never instead of) the team's own review. Lives in the Full configuration tier.\n- These are DIFFERENT commands with DIFFERENT purposes. Never describe `review` as \"deterministic\" or `lint` as \"AI-powered.\"\n\n## Writing Style (MANDATORY)\n- **No Marketing Language:** NEVER use marketing-centric terms: \"comprehensive\", \"robust\", \"seamless\", \"cutting-edge\", \"state-of-the-art\", \"revolutionary\", \"guarantee\", \"guarantees\". Use objective, factual descriptions instead. Say what the feature does, not how impressive it is.\n\n## Formatting Rules\n- **Sub-Bullet Threshold:** When a feature list exceeds 3 items, use nested sub-bullets instead of comma-separated inline lists. Group related items into named categories (e.g., \"Security:\", \"DX:\", \"Orchestration:\").\n- **Completed Phase Summary:** Phases marked `[x]` should be summarized in 1-2 sentences max. Do NOT expand completed phases with every PR number \u2014 use categorized sub-bullets for the key capability areas only.\n- **Line Length:** No single bullet point should exceed two short sentences. If it does, break it into sub-bullets or summarize. Readability is more important than completeness.\n- **No Issue/PR References:** NEVER include GitHub issue or PR references (e.g., `#714`, `(#801)`, `(#714, #801)`) in user-facing documentation. These are internal tracking artifacts. Describe features by what they do, not by which ticket shipped them.\n- **No Internal Jargon:** Do not use internal terms like \"Pipeline 1\", \"Pipeline 2\", \"ADR-058\", or \"Proposal 186\" in user-facing copy. Use plain language that a new user would understand.\n- **No Maintenance Comments:** Do not include comments about how documentation is maintained, generated, or structured. The output is the final document, not a template.\n";
9
9
  interface ReleaseContext {
10
10
  tag: string | null;
11
11
  gitLog: string;
@@ -1 +1 @@
1
- {"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/commands/docs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAiB,MAAM,cAAc,CAAC;AAI7D;;;;GAIG;AACH,wBAAg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ary (DO NOT confuse these)
54
54
  - **\`totem lint\`**: Runs compiled AST/regex rules against a diff. Zero LLM. Fast (~2s). No API keys needed. Used in pre-push hooks and CI. Lives in the Lite configuration tier.
55
- - **\`totem review\`**: AI-powered code review. Queries LanceDB for context, sends diff + knowledge to an LLM. Slow (~18s). Requires API keys. Used before opening PRs. Lives in the Full configuration tier.
55
+ - **\`totem review\`**: Supplementary AI review lanes over the diff — advisory sensors, not a merge gate. Queries LanceDB for context, sends diff + knowledge to an LLM. Slow (~18s). Requires API keys. Run before opening PRs, alongside (never instead of) the team's own review. Lives in the Full configuration tier.
56
56
  - These are DIFFERENT commands with DIFFERENT purposes. Never describe \`review\` as "deterministic" or \`lint\` as "AI-powered."
57
57
 
58
58
  ## Writing Style (MANDATORY)
@@ -1,11 +1,11 @@
1
1
  import type { IngestTarget } from '@mmnto/totem';
2
2
  import type { ConfigFormat, EmbeddingTier } from './init-detect.js';
3
- export declare const REFLEX_VERSION = 7;
3
+ export declare const REFLEX_VERSION = 8;
4
4
  export declare const REFLEX_START = "<!-- totem:reflexes:start -->";
5
5
  export declare const REFLEX_END = "<!-- totem:reflexes:end -->";
6
6
  export declare const REFLEX_VERSION_RE: RegExp;
7
7
  export declare const LEGACY_SENTINEL = "## Totem AI Integration (Auto-Generated)";
8
- export declare const AI_PROMPT_BLOCK = "\n<!-- totem:reflexes:start -->\n<!-- totem:reflexes:version:7 -->\n\n## Totem AI Integration (Auto-Generated)\nYou have access to the Totem MCP for long-term project memory. You MUST operate with the following reflexes:\n\n### Memory Reflexes\n1. **BLOCKING \u2014 Pull Before Coding:** Before writing or modifying code that touches more than one file, you MUST call `search_knowledge` with a query describing what you're about to change. This is not optional. The vector DB contains traps, edge cases, and architectural constraints that prevent rework. Skip this and you risk repeating a mistake that's already been solved.\n2. **Pull Before Planning:** Before writing specs, architecture, or fixing complex bugs, use `search_knowledge` to retrieve domain constraints and past traps.\n3. **Pull on Session Start:** At the beginning of every session, call `search_knowledge` with a broad query about the current task or area of work. The vector DB is your institutional memory \u2014 use it before relying on your own context window.\n4. **Proactive Anchoring (The 3 Triggers):** You must autonomously call `add_lesson` when any of the following occur \u2014 do NOT wait for the user to ask:\n - **The Trap Trigger:** If you spend >2 turns fixing a bug caused by a framework quirk, unexpected API response, or edge case. (Anchor the symptom + fix).\n - **The Pivot Trigger:** If the user introduces a new architectural pattern or deprecates an old one. (Anchor the rule).\n - **The Handoff Trigger:** At the end of a session or when wrapping up a complex feature, extract the non-obvious lessons learned and anchor them.\n5. **Tool Preference (MCP over CLI):** Always prioritize using dedicated MCP tools (e.g., GitHub, Supabase, Vercel) over executing generic shell commands (like `gh issue view` or `curl`). MCP tools provide structured, un-truncated data optimized for your context window. Only fall back to bash execution if an MCP tool is unavailable or fails.\n\nLessons are automatically re-indexed in the background after each `add_lesson` call \u2014 no manual sync needed.\n\n### Memory Classification\nWhen deciding where to store information or rules, use this decision tree:\n- If forgetting this causes a mistake on an UNRELATED task (Core Safety): Store in your root agent memory file (e.g., CLAUDE.md or GEMINI.md).\n- If it's a stable, project-wide workflow rule: Store in project config (e.g., CLAUDE.md).\n- If it's a stable syntax/style pattern: Store in the project's styleguide or linter rules.\n- If it's domain knowledge, an edge case, or a past trap: You MUST use the Totem `add_lesson` tool to anchor it into the project's LanceDB.\n\n### Workflow Orchestrator Rituals\n[FOR LOCAL CLI/TERMINAL AGENTS ONLY] Do not attempt to run these commands if you are a headless bot or operating in a cloud PR environment (e.g., Gemini Code Assist on GitHub).\nTotem provides CLI commands that map to your development lifecycle. Use them at these moments:\n1. **Start of Session:** The SessionStart hook automatically runs `totem describe` to emit the project-orientation banner (project, tier, rule/lesson counts, targets, hooks). For richer derived project state (recent merged PRs, current branch + uncommitted files, latest strategy journal pointer, package versions, rule/lesson counts), call the MCP `describe_project` tool \u2014 the derived view replaces the retired `docs/active_work.md` convention (state is observed, not declared). For a freshness check (manifest staleness, shield drift, review state), run `totem status`. Run `totem triage` if you need to pick a new task.\n2. **Before Implementation:** Run `totem spec <issue-url-or-topic>` to generate an architectural plan and review related context before writing code.\n3. **Before Push:** Run `totem lint` for a fast compiled-rules check (zero LLM, ~2s). **Before PR:** Run `totem review` for a full AI-powered code review against project knowledge (~18s).\n4. **End of Session:** Run `totem handoff` to generate a snapshot for the next agent session with current progress and open threads.\n5. **Managed hooks self-repair:** `totem init` distributes `.totem/prepare.cjs` and wires `package.json` `prepare` to it only when no `prepare` script exists. The wrapper runs `totem hook install` on every `pnpm install`, drift-repairing the managed Claude/Gemini hooks \u2014 no manual re-install needed.\n\n### Cloud / PR Review Bots\n[FOR CLOUD BOTS ONLY \u2014 e.g., Gemini Code Assist, GitHub Copilot PR Review]\nYou do NOT have access to the local CLI. Instead, use the Totem MCP tools directly:\n1. **Before reviewing a PR:** Call `search_knowledge` with queries about the files and patterns being changed to check for known traps and architectural constraints.\n2. **Before suggesting changes:** Call `search_knowledge` to verify your suggestion aligns with established project patterns and past lessons.\n3. **When you spot a recurring issue:** Call `add_lesson` to persist the trap so future reviews catch it automatically.\n\n### Context Management Guardrail\nYou must be highly defensive of your own context window. If you notice this session becoming long, or if you are asked to read multiple massive files at once, you MUST proactively warn the user about impending context loss. When warning the user, suggest they run `totem handoff` to capture mid-task state so they can safely clear the chat and resume. If you receive a `<totem_system_warning>` tag in a tool response, read it silently and synthesize a natural-language warning to the user. Do NOT echo the raw XML.\n<!-- totem:reflexes:end -->\n";
8
+ export declare const AI_PROMPT_BLOCK = "\n<!-- totem:reflexes:start -->\n<!-- totem:reflexes:version:8 -->\n\n## Totem AI Integration (Auto-Generated)\nYou have access to the Totem MCP for long-term project memory. You MUST operate with the following reflexes:\n\n### Memory Reflexes\n1. **BLOCKING \u2014 Pull Before Coding:** Before writing or modifying code that touches more than one file, you MUST call `search_knowledge` with a query describing what you're about to change. This is not optional. The vector DB contains traps, edge cases, and architectural constraints that prevent rework. Skip this and you risk repeating a mistake that's already been solved.\n2. **Pull Before Planning:** Before writing specs, architecture, or fixing complex bugs, use `search_knowledge` to retrieve domain constraints and past traps.\n3. **Pull on Session Start:** At the beginning of every session, call `search_knowledge` with a broad query about the current task or area of work. The vector DB is your institutional memory \u2014 use it before relying on your own context window.\n4. **Proactive Anchoring (The 3 Triggers):** You must autonomously call `add_lesson` when any of the following occur \u2014 do NOT wait for the user to ask:\n - **The Trap Trigger:** If you spend >2 turns fixing a bug caused by a framework quirk, unexpected API response, or edge case. (Anchor the symptom + fix).\n - **The Pivot Trigger:** If the user introduces a new architectural pattern or deprecates an old one. (Anchor the rule).\n - **The Handoff Trigger:** At the end of a session or when wrapping up a complex feature, extract the non-obvious lessons learned and anchor them.\n5. **Tool Preference (MCP over CLI):** Always prioritize using dedicated MCP tools (e.g., GitHub, Supabase, Vercel) over executing generic shell commands (like `gh issue view` or `curl`). MCP tools provide structured, un-truncated data optimized for your context window. Only fall back to bash execution if an MCP tool is unavailable or fails.\n\nLessons are automatically re-indexed in the background after each `add_lesson` call \u2014 no manual sync needed.\n\n### Memory Classification\nWhen deciding where to store information or rules, use this decision tree:\n- If forgetting this causes a mistake on an UNRELATED task (Core Safety): Store in your root agent memory file (e.g., CLAUDE.md or GEMINI.md).\n- If it's a stable, project-wide workflow rule: Store in project config (e.g., CLAUDE.md).\n- If it's a stable syntax/style pattern: Store in the project's styleguide or linter rules.\n- If it's domain knowledge, an edge case, or a past trap: You MUST use the Totem `add_lesson` tool to anchor it into the project's LanceDB.\n\n### Workflow Orchestrator Rituals\n[FOR LOCAL CLI/TERMINAL AGENTS ONLY] Do not attempt to run these commands if you are a headless bot or operating in a cloud PR environment (e.g., Gemini Code Assist on GitHub).\nTotem provides CLI commands that map to your development lifecycle. Use them at these moments:\n1. **Start of Session:** The SessionStart hook automatically runs `totem describe` to emit the project-orientation banner (project, tier, rule/lesson counts, targets, hooks). For richer derived project state (recent merged PRs, current branch + uncommitted files, latest strategy journal pointer, package versions, rule/lesson counts), call the MCP `describe_project` tool \u2014 the derived view replaces the retired `docs/active_work.md` convention (state is observed, not declared). For a freshness check (manifest staleness, shield drift, review state), run `totem status`. Run `totem triage` if you need to pick a new task.\n2. **Before Implementation:** Run `totem spec <issue-url-or-topic>` to generate an architectural plan and review related context before writing code.\n3. **Before Push:** Run `totem lint` \u2014 the deterministic enforcement floor (zero LLM, ~2s). **Before PR:** `totem review` runs supplementary AI lanes over the diff (~18s) \u2014 advisory sensors, not a merge gate; known limits are disclosed in the run output (LLM window truncation on large diffs; non-code files skipped). Your team's own review discipline decides what constitutes the review of record.\n4. **End of Session:** Run `totem handoff` to generate a snapshot for the next agent session with current progress and open threads.\n5. **Managed hooks self-repair:** `totem init` distributes `.totem/prepare.cjs` and wires `package.json` `prepare` to it only when no `prepare` script exists. The wrapper runs `totem hook install` on every `pnpm install`, drift-repairing the managed Claude/Gemini hooks \u2014 no manual re-install needed.\n\n### Cloud / PR Review Bots\n[FOR CLOUD BOTS ONLY \u2014 e.g., Gemini Code Assist, GitHub Copilot PR Review]\nYou do NOT have access to the local CLI. Instead, use the Totem MCP tools directly:\n1. **Before reviewing a PR:** Call `search_knowledge` with queries about the files and patterns being changed to check for known traps and architectural constraints.\n2. **Before suggesting changes:** Call `search_knowledge` to verify your suggestion aligns with established project patterns and past lessons.\n3. **When you spot a recurring issue:** Call `add_lesson` to persist the trap so future reviews catch it automatically.\n\n### Context Management Guardrail\nYou must be highly defensive of your own context window. If you notice this session becoming long, or if you are asked to read multiple massive files at once, you MUST proactively warn the user about impending context loss. When warning the user, suggest they run `totem handoff` to capture mid-task state so they can safely clear the chat and resume. If you receive a `<totem_system_warning>` tag in a tool response, read it silently and synthesize a natural-language warning to the user. Do NOT echo the raw XML.\n<!-- totem:reflexes:end -->\n";
9
9
  export declare const TOTEM_FILE_MARKER = "// [totem] auto-generated";
10
10
  /**
11
11
  * The end marker that CLOSES every managed whole-file session hook template
@@ -1 +1 @@
1
- {"version":3,"file":"init-templates.d.ts","sourceRoot":"","sources":["../../src/commands/init-templates.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cA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,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CAkBhD"}
@@ -3,7 +3,7 @@
3
3
  // ─── Reflex versioning ────────────────────────────────────
4
4
  // Bump REFLEX_VERSION whenever the AI_PROMPT_BLOCK content changes materially.
5
5
  // This allows `totem init` to detect stale blocks and offer upgrades.
6
- export const REFLEX_VERSION = 7;
6
+ export const REFLEX_VERSION = 8;
7
7
  export const REFLEX_START = '<!-- totem:reflexes:start -->';
8
8
  export const REFLEX_END = '<!-- totem:reflexes:end -->';
9
9
  export const REFLEX_VERSION_RE = /<!-- totem:reflexes:version:(\d+) -->/;
@@ -39,7 +39,7 @@ When deciding where to store information or rules, use this decision tree:
39
39
  Totem provides CLI commands that map to your development lifecycle. Use them at these moments:
40
40
  1. **Start of Session:** The SessionStart hook automatically runs \`totem describe\` to emit the project-orientation banner (project, tier, rule/lesson counts, targets, hooks). For richer derived project state (recent merged PRs, current branch + uncommitted files, latest strategy journal pointer, package versions, rule/lesson counts), call the MCP \`describe_project\` tool — the derived view replaces the retired \`docs/active_work.md\` convention (state is observed, not declared). For a freshness check (manifest staleness, shield drift, review state), run \`totem status\`. Run \`totem triage\` if you need to pick a new task.
41
41
  2. **Before Implementation:** Run \`totem spec <issue-url-or-topic>\` to generate an architectural plan and review related context before writing code.
42
- 3. **Before Push:** Run \`totem lint\` for a fast compiled-rules check (zero LLM, ~2s). **Before PR:** Run \`totem review\` for a full AI-powered code review against project knowledge (~18s).
42
+ 3. **Before Push:** Run \`totem lint\` the deterministic enforcement floor (zero LLM, ~2s). **Before PR:** \`totem review\` runs supplementary AI lanes over the diff (~18s) — advisory sensors, not a merge gate; known limits are disclosed in the run output (LLM window truncation on large diffs; non-code files skipped). Your team's own review discipline decides what constitutes the review of record.
43
43
  4. **End of Session:** Run \`totem handoff\` to generate a snapshot for the next agent session with current progress and open threads.
44
44
  5. **Managed hooks self-repair:** \`totem init\` distributes \`.totem/prepare.cjs\` and wires \`package.json\` \`prepare\` to it only when no \`prepare\` script exists. The wrapper runs \`totem hook install\` on every \`pnpm install\`, drift-repairing the managed Claude/Gemini hooks — no manual re-install needed.
45
45
 
@@ -0,0 +1,17 @@
1
+ /**
2
+ * CLI-level `totem review` run-start banner test (mmnto-ai/totem#2536).
3
+ *
4
+ * The billing truth-up moved the honest description of `totem review` into the
5
+ * template and the docs prompt; this pins the third surface — the line the
6
+ * command itself emits at run start, where stale muscle memory actually gets
7
+ * corrected. It must state the advisory role and the known limits, and it must
8
+ * NOT fire on the read-only `--covariate` transport verb, which short-circuits
9
+ * before any review work.
10
+ *
11
+ * Lives in its own file to avoid mock contamination (same harness shape as
12
+ * `shield-covariate.test.ts`): the heavy seams (config, engine bootstrap, hook
13
+ * installer, git diff) are mocked so the run-start path is exercised without a
14
+ * real repo, config, or network invoke.
15
+ */
16
+ export {};
17
+ //# sourceMappingURL=shield-banner.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shield-banner.test.d.ts","sourceRoot":"","sources":["../../src/commands/shield-banner.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG"}
@@ -0,0 +1,118 @@
1
+ /**
2
+ * CLI-level `totem review` run-start banner test (mmnto-ai/totem#2536).
3
+ *
4
+ * The billing truth-up moved the honest description of `totem review` into the
5
+ * template and the docs prompt; this pins the third surface — the line the
6
+ * command itself emits at run start, where stale muscle memory actually gets
7
+ * corrected. It must state the advisory role and the known limits, and it must
8
+ * NOT fire on the read-only `--covariate` transport verb, which short-circuits
9
+ * before any review work.
10
+ *
11
+ * Lives in its own file to avoid mock contamination (same harness shape as
12
+ * `shield-covariate.test.ts`): the heavy seams (config, engine bootstrap, hook
13
+ * installer, git diff) are mocked so the run-start path is exercised without a
14
+ * real repo, config, or network invoke.
15
+ */
16
+ import * as fs from 'node:fs';
17
+ import * as os from 'node:os';
18
+ import * as path from 'node:path';
19
+ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
20
+ import { cleanTmpDir } from '../test-utils.js';
21
+ const bootstrapEngineSpy = vi.fn(async (..._args) => { });
22
+ const upgradePrePushHookSpy = vi.fn((..._args) => false);
23
+ const getDiffForReviewSpy = vi.fn(async (..._args) => null);
24
+ const TEST_CONFIG = {
25
+ totemDir: '.totem',
26
+ review: { sourceExtensions: ['.ts'] },
27
+ };
28
+ vi.mock('../utils/bootstrap-engine.js', async (importOriginal) => {
29
+ const actual = await importOriginal();
30
+ return { ...actual, bootstrapEngine: bootstrapEngineSpy };
31
+ });
32
+ vi.mock('./install-hooks.js', async (importOriginal) => {
33
+ const actual = await importOriginal();
34
+ return { ...actual, upgradePrePushHookIfNeeded: upgradePrePushHookSpy };
35
+ });
36
+ vi.mock('../utils.js', async (importOriginal) => {
37
+ const actual = await importOriginal();
38
+ return {
39
+ ...actual,
40
+ loadEnv: vi.fn(),
41
+ resolveConfigPath: (cwd) => path.join(cwd, 'totem.config.ts'),
42
+ loadConfig: vi.fn(async () => TEST_CONFIG),
43
+ };
44
+ });
45
+ vi.mock('../git.js', async (importOriginal) => {
46
+ const actual = await importOriginal();
47
+ return { ...actual, getDiffForReview: getDiffForReviewSpy };
48
+ });
49
+ describe('`totem review` run-start self-description (#2536)', () => {
50
+ let tmpDir;
51
+ let emitted;
52
+ beforeEach(() => {
53
+ tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'shield-banner-'));
54
+ emitted = [];
55
+ vi.spyOn(process, 'cwd').mockReturnValue(tmpDir);
56
+ vi.spyOn(console, 'error').mockImplementation((...args) => {
57
+ emitted.push(args.map(String).join(' '));
58
+ });
59
+ vi.spyOn(console, 'log').mockImplementation((...args) => {
60
+ emitted.push(args.map(String).join(' '));
61
+ });
62
+ bootstrapEngineSpy.mockClear();
63
+ upgradePrePushHookSpy.mockClear();
64
+ getDiffForReviewSpy.mockClear();
65
+ });
66
+ afterEach(() => {
67
+ vi.restoreAllMocks();
68
+ try {
69
+ cleanTmpDir(tmpDir);
70
+ // totem-context: test-harness temp-dir cleanup — Windows can hold a handle under the temp tree after the command run, and a failed rmdir must not fail a suite whose assertions are all about printed output; the OS reclaims the directory
71
+ }
72
+ catch {
73
+ // Best-effort cleanup; see the totem-context justification above.
74
+ }
75
+ });
76
+ it('declares the advisory role and the known limits at run start', async () => {
77
+ const { shieldCommand } = await import('./shield.js');
78
+ // ShieldOptions is a wide options bag; a bare run takes the ordinary path.
79
+ await shieldCommand({});
80
+ const output = emitted.join('\n');
81
+ expect(output).toMatch(/advisory/i);
82
+ expect(output).toMatch(/not a merge gate/i);
83
+ expect(output).toMatch(/truncation/i);
84
+ expect(output).toMatch(/non-code files skipped/i);
85
+ });
86
+ it('does not fire on the read-only --covariate transport verb', async () => {
87
+ const { shieldCommand } = await import('./shield.js');
88
+ await shieldCommand({ covariate: true });
89
+ expect(emitted.join('\n')).not.toMatch(/not a merge gate/i);
90
+ });
91
+ it('does not fire under --raw (zero-LLM context dump, not an AI review lane)', async () => {
92
+ const { shieldCommand } = await import('./shield.js');
93
+ try {
94
+ await shieldCommand({ raw: true });
95
+ // totem-context: the raw path continues past the banner site into retrieval work this harness does not stub; the assertion is about what was PRINTED before that point, so a downstream failure is irrelevant here
96
+ }
97
+ catch {
98
+ // Intentionally swallowed — see the totem-context justification above.
99
+ }
100
+ expect(emitted.join('\n')).not.toMatch(/not a merge gate/i);
101
+ });
102
+ it('does not fire under --estimate (deterministic pre-flight returns before the banner)', async () => {
103
+ // Pinned deliberately: --estimate exits on an earlier branch, so its silence
104
+ // is a property of ORDER, not of a flag check. A refactor that moves the
105
+ // banner earlier must fail here rather than start billing the deterministic
106
+ // estimator as an AI review lane.
107
+ const { shieldCommand } = await import('./shield.js');
108
+ try {
109
+ await shieldCommand({ estimate: true });
110
+ // totem-context: the estimator path runs the deterministic engine against a diff this harness stubs as null; any downstream failure is irrelevant to the printed-output assertion
111
+ }
112
+ catch {
113
+ // Intentionally swallowed — see the totem-context justification above.
114
+ }
115
+ expect(emitted.join('\n')).not.toMatch(/not a merge gate/i);
116
+ });
117
+ });
118
+ //# sourceMappingURL=shield-ban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) {
1061
1061
  });
1062
1062
  return;
1063
1063
  }
1064
+ // Run-start self-description (mmnto-ai/totem#2536): the command states its own
1065
+ // role and known limits at the point of invocation, where stale "run review for
1066
+ // THE review" muscle memory actually gets corrected. Emitted after the
1067
+ // read-only `--covariate` short-circuit so that transport verb stays quiet, and
1068
+ // suppressed for `--raw`, which deactivates the fan and dumps retrieval context
1069
+ // with ZERO LLM calls — billing that as an AI review lane is the same
1070
+ // misstatement this banner exists to correct. (`--estimate` is already silent:
1071
+ // it returns on an earlier branch.)
1072
+ if (!options.raw) {
1073
+ log.info(DISPLAY_TAG, 'Supplementary AI review lanes (advisory — not a merge gate). Limits disclosed in output: LLM window truncation on large diffs; non-code files skipped.');
1074
+ }
1064
1075
  // Engine boot (mmnto-ai/totem#1794) — see lint.ts wiring for context.
1065
1076
  const { bootstrapEngine } = await import('../utils/bootstrap-engine.js');
1066
1077
  await bootstrapEngine(config, configRoot);