musememory 1.11.0 β 2.1.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.
- package/.agents/archive/.gitkeep +0 -0
- package/.agents/artifacts/.gitkeep +0 -0
- package/.agents/brand/a11y.md +32 -0
- package/.agents/brand/bem-conventions.md +42 -0
- package/.agents/brand/design.md +45 -0
- package/.agents/brand/screenshots/.gitkeep +0 -0
- package/.agents/brand/screenshots/README.md +9 -0
- package/.agents/brand/tokens/base.css +139 -0
- package/.agents/brand/tokens/colors.json +127 -0
- package/.agents/brand/tokens/motion.json +61 -0
- package/.agents/brand/tokens/radii.json +36 -0
- package/.agents/brand/tokens/shadows.json +27 -0
- package/.agents/brand/tokens/spacing.json +68 -0
- package/.agents/brand/tokens/typography.json +79 -0
- package/.agents/context/architecture.md +140 -0
- package/.agents/context/brand.md +19 -0
- package/.agents/context/current.md +44 -0
- package/.agents/context/decisions.md +25 -0
- package/.agents/context/index.md +16 -0
- package/.agents/context/product.md +100 -0
- package/.agents/context/roadmap.md +19 -0
- package/.agents/goals/.gitkeep +0 -0
- package/.agents/research/research-brief-agent-memory-migrator.md +245 -0
- package/.agents/standards/backend-workers-hono.md +41 -0
- package/.agents/standards/council-roles.md +36 -0
- package/.agents/standards/dox-hierarchy.md +80 -0
- package/.agents/standards/execution-kernel.md +122 -0
- package/.agents/standards/frontend-astro.md +50 -0
- package/.agents/standards/frontend-nextjs.md +93 -0
- package/.agents/standards/git-workflow.md +98 -0
- package/.agents/standards/memory-context.md +60 -0
- package/.agents/standards/security-vibeguard.md +41 -0
- package/.agents/standards/system-design.md +67 -0
- package/.agents/standards/tech-stacks.md +52 -0
- package/.agents/standards/workflows.md +54 -0
- package/.agents/workflows/.gitkeep +0 -0
- package/README.md +51 -19
- package/dist/index.js +11269 -3732
- package/package.json +1 -1
- package/schema.json +120 -2
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# π System, Domain & Resilience Design Standards
|
|
2
|
+
|
|
3
|
+
> Synthesized from: Eric Evans' *Domain-Driven Design*, Michael Nygard's *Release It!*, and High-Reliability Distributed Systems Engineering.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Domain-Driven Design Principles (Eric Evans)
|
|
8
|
+
|
|
9
|
+
### Ubiquitous Language & Bounded Contexts
|
|
10
|
+
- **Ubiquitous Language**: Code entities, method names, and test descriptions must use the exact business terminology of the domain expert within that bounded context.
|
|
11
|
+
- **Explicit Context Boundaries**: A domain model is valid only inside its own bounded context. Never create a company-wide "god" model. Translate across context boundaries using explicit Anti-Corruption Layers (ACL) or Published Languages.
|
|
12
|
+
- **Core Domain Distillation**: Focus rich modeling on the core strategic domain; keep supporting and generic subdomains lightweight.
|
|
13
|
+
|
|
14
|
+
### Building Blocks
|
|
15
|
+
- **Entities**: Objects with persistent identity over time. Entities must protect their own valid state transitions (no public setters for arbitrary mutations).
|
|
16
|
+
- **Value Objects**: Immutable objects defined strictly by their attributes. Construction must guarantee validity; equality is determined by value.
|
|
17
|
+
- **Aggregates & Consistency Boundaries**: Aggregates are strict consistency boundaries. Keep them as small as possible. All modifications must route through the aggregate root; reference other aggregates by identity only.
|
|
18
|
+
- **Repositories**: Repositories exist for aggregate roots, not individual database tables. Return domain objects, not raw database rows or ORM records.
|
|
19
|
+
- **Domain Services**: Use domain services only for business logic that naturally spans multiple entities or value objects.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 2. Production Stability & Resilience (Michael Nygard)
|
|
24
|
+
|
|
25
|
+
### Stability Mindset
|
|
26
|
+
Assume production is hostile and fragile: every dependency can be slow, every queue can fill, every cache can miss or stampede.
|
|
27
|
+
|
|
28
|
+
### Dependency Protection
|
|
29
|
+
- **Mandatory Timeouts**: Every outbound network call, database query, or inter-service request MUST have an explicit, intentional timeout. Infinite waits are strictly forbidden.
|
|
30
|
+
- **Disciplined Retries**: Retry only idempotent operations. Always apply exponential backoff with random jitter to prevent retry storms. Never retry permanent 4xx or validation failures.
|
|
31
|
+
- **Circuit Breakers**: Protect unstable downstreams by tripping to fast-fail mode when error rates spike.
|
|
32
|
+
- **Bulkheads & Isolation**: Isolate slow or failure-prone dependencies in dedicated resource pools so one failing third-party does not exhaust the entire system's thread or connection pool.
|
|
33
|
+
|
|
34
|
+
### Overload & Capacity Control
|
|
35
|
+
- **Back Pressure**: Implement explicit back pressure when producers outpace consumers.
|
|
36
|
+
- **Load Shedding**: Gracefully reject low-priority requests under extreme load to preserve core system availability.
|
|
37
|
+
- **Dead-Letter Queues**: Every asynchronous queue must define poison-message handling and a dead-letter queue.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## 3. Explicit Persistence & Data Mapping Boundaries
|
|
42
|
+
|
|
43
|
+
- **Named Mapping Methods**: Persistence-layer β domain-model conversions (Payload CMS, Neon, Supabase, SQLite, ORMs) MUST use explicit named methods (e.g., `fromRecord()`, `toRecord()`, `toDTO()`).
|
|
44
|
+
- **Prohibited**: Implicit casting, unchecked `as unknown as Type`, or field-by-field object spreading (`{ ...dbRow }`) across architectural boundaries.
|
|
45
|
+
- **Data Protection**: Prevent internal database columns, metadata, or sensitive properties from leaking to client components or public API responses.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## 4. Database Safety & Migration Rehearsal Protocol
|
|
50
|
+
|
|
51
|
+
- **Rehearsal Before Proposal**: Before proposing or applying database migrations (Drizzle, Prisma, SQL), rehearse the full migration history against a fresh throwaway database (`npx create-db@latest --json` or local isolated container) and verify test passes.
|
|
52
|
+
- **Destructive Operation Gate**: Never run destructive operations (`DROP TABLE`, `TRUNCATE`, `db push --accept-data-loss`, `migrate reset`) on staging or production without explicit authorization.
|
|
53
|
+
- **Zero Inlined Credentials**: Store connection strings strictly in `.env.local` or environment secrets. Never commit connection URIs to version control.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## 5. Mathematical & Algorithmic Exactness
|
|
58
|
+
|
|
59
|
+
- **Concrete Scoring Formulas**: Algorithms for ranking, cache invalidation, or relevance must use explicit mathematical weights and decay constants ($Score = \sum W_i \cdot S_i \times e^{-\lambda \Delta t}$).
|
|
60
|
+
- **Determinism & Fallback Parity**: Accelerators (e.g., SQLite FTS5 or vector indices) must maintain output parity with zero-dependency fallbacks.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## 6. API & Library Fidelity (Zero Hallucinated Options)
|
|
65
|
+
|
|
66
|
+
- **Exact Constructor Signatures**: Verify configuration keys against installed `.d.ts` definitions or local package documentation before use.
|
|
67
|
+
- **Dual-Layer Specifications**: Pair human-readable YAML/JSON examples with formal machine-checkable schemas (Zod, JSON Schema, Pydantic) validated via automated tests.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# π Agency Tech Stack Directions & Architectural Standards
|
|
2
|
+
|
|
3
|
+
All digital products and client builds follow one of three designated architectural directions. All tooling is kept at the latest stable version.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## π§ Direction 1: Modern Web & High-Performance Astro
|
|
8
|
+
|
|
9
|
+
> **Best For**: High-speed marketing platforms, content ecosystems, portals, and interactive agency web applications.
|
|
10
|
+
|
|
11
|
+
### Core Toolchain & Stack
|
|
12
|
+
- **Framework**: **Astro v7.2.x** (Server-first, content collections, hybrid rendering)
|
|
13
|
+
- **Styling**: **UnoCSS v66.x** + Custom Semantic BEM CSS tokens
|
|
14
|
+
- **Animations**: **Motion.dev** (Framer Motion engine for high-end web interactions)
|
|
15
|
+
- **UI & Accessibility**: **Aria Builder `@latest`** (WCAG 2.2 AA compliant accessible components)
|
|
16
|
+
- **Testing**: **Vitest** (Unit, component, and utility tests)
|
|
17
|
+
- **Runtime & Deployment**: **`@astrojs/cloudflare`** on **Cloudflare Free Tier** or **GitHub Pages**
|
|
18
|
+
- **Persistence & Analytics**: SQLite DB (when local storage/edge persistence is needed) + Cloudflare Web Analytics
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## β‘ Direction 2: Instatic (Pure HTML / Brochure & Static Sites)
|
|
23
|
+
|
|
24
|
+
> **Best For**: Pure HTML brochure sites, lightweight marketing landing pages, and zero-JS static client deliverables.
|
|
25
|
+
|
|
26
|
+
### Core Toolchain & Stack
|
|
27
|
+
- **Engine**: **[Instatic](https://github.com/corebunch/instatic)** β Pure HTML-based static site generator
|
|
28
|
+
- **Delivery**: Semantic HTML5, CSS3, minimal vanilla JS
|
|
29
|
+
- **Hosting**: Cloudflare Pages / GitHub Pages (Zero compute overhead, sub-millisecond TTFB)
|
|
30
|
+
- **Principle**: Zero runtime dependencies, 100/100 Lighthouse performance score by default.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## ποΈ Direction 3: Headless E-Commerce & Dynamic CMS
|
|
35
|
+
|
|
36
|
+
> **Best For**: Direct-to-Consumer (D2C) e-commerce brands, high-scale digital stores, and content-managed portals.
|
|
37
|
+
|
|
38
|
+
### Core Toolchain & Stack
|
|
39
|
+
- **CMS & Backend**: **Payload CMS** with official E-Commerce Module
|
|
40
|
+
- **Frontend Framework**: **Next.js** (App Router, Server Components by default)
|
|
41
|
+
- **Styling & Motion**: **UnoCSS** + **Motion.dev**
|
|
42
|
+
- **Type Safety & Validation**: **Zod** (strict schema validation at all API boundaries)
|
|
43
|
+
- **Testing**: **Vitest** (Unit, integration, and API tests)
|
|
44
|
+
- **Database**: **Neon** (Serverless PostgreSQL) or **Supabase**
|
|
45
|
+
- **Hosting & Infrastructure**: **Cloudflare Free / Low-Cost Tier** + edge caching for zero-to-low operational cost
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## π Tech Stack Invariants
|
|
50
|
+
1. **No Speculative Dependencies**: Do not introduce unlisted frameworks or heavy third-party runtime libraries without explicit human authorization.
|
|
51
|
+
2. **Edge-First Hosting**: Default to Cloudflare edge deployment across all three directions to maintain zero-to-low infrastructure costs.
|
|
52
|
+
3. **Accessibility Baseline**: WCAG 2.2 AA compliance is mandatory across all user-facing components.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# π Agent Development Workflows & Phase Gates
|
|
2
|
+
|
|
3
|
+
> **Lifecycle Doctrine**: Every engineering task moves through deterministic phases scaled to its classification tier. Bypassing quality gates is strictly prohibited.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Scaled Task Classification Tiers
|
|
8
|
+
|
|
9
|
+
To balance velocity with rigor, overhead is strictly proportional to task risk:
|
|
10
|
+
|
|
11
|
+
| Classification | Scope & Criteria | Required Phases & Gates |
|
|
12
|
+
| :--- | :--- | :--- |
|
|
13
|
+
| **`tiny-fix`** | < 3 files, typo, CSS token tweak, no semantic/logic change | Direct edit + 1-line verification check. Skips heavy planning. |
|
|
14
|
+
| **`quick-win`** | < 1 module, localized bug fix, small feature enhancement | Scoping β Implement β Targeted Test & Review. |
|
|
15
|
+
| **`feature`** | Multi-file additions, new endpoints, stateful UI flows | Full 5-Phase Pipeline (Scoping β Plan β Implement β Review β Ship). |
|
|
16
|
+
| **`architecture-change`** | Core schemas, database migrations, auth, global router/build refactors | Full 5-Phase Pipeline + Architecture Decision Record (ADR) + Nexus Gate. |
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## 2. The 5-Phase Execution Pipeline
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
[ π 1. Scoping & Intake ] βββΊ [ π 2. Plan ] βββΊ [ β‘ 3. Implement ] βββΊ [ π‘οΈ 4. Review & Hardening ] βββΊ [ π’ 5. Ship & Archive ]
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Phase 1: π Scoping & Intake (Muse)
|
|
27
|
+
- **Decomposition Gate**: For multi-feature requests, decompose the input into a structured Feature Inventory before writing individual specifications.
|
|
28
|
+
- **Classification Freeze**: Lock task classification (`tiny-fix`, `quick-win`, `feature`, `architecture-change`). Silent scope expansion mid-implementation is prohibited. If scope grows, pause and notify the user.
|
|
29
|
+
- Identify the target tech direction (Astro / Instatic / Payload + Next.js).
|
|
30
|
+
- Load active constraints from `./.agents/context/` and `./.memory`.
|
|
31
|
+
|
|
32
|
+
### Phase 2: π Plan & Design
|
|
33
|
+
- For `feature` and `architecture-change` tasks, generate an implementation plan inside `.agents/artifacts/`.
|
|
34
|
+
- Satisfy the **Task Start Gate**:
|
|
35
|
+
1. **Goal**: What exact outcome is required?
|
|
36
|
+
2. **Mechanism**: What is the root cause / structural design?
|
|
37
|
+
3. **Proof**: What exact automated or visual observation proves success?
|
|
38
|
+
|
|
39
|
+
### Phase 3: β‘ Implement (Sol / Jasper)
|
|
40
|
+
- Apply **The Confidence Gate** (<80% Stop, 80-90% State Assumption, >90% Proceed).
|
|
41
|
+
- Apply **Read-Before-Write**: Inspect target files, imported types, and callers before modifying code.
|
|
42
|
+
- Apply **Preparatory Refactoring**: Restructure cleanly before introducing functional changes.
|
|
43
|
+
- Respect code limits (pure UI components < 200 lines, custom hooks `use<Feature><Action>`).
|
|
44
|
+
|
|
45
|
+
### Phase 4: π‘οΈ Review & Hardening (Nexus Quality Gate)
|
|
46
|
+
- Run targeted automated tests (`bun test` / `vitest`).
|
|
47
|
+
- Run the Vibeguard SecretScan (`bun ~/.config/LIFEOS/runtime/TOOLS/SecretScan.ts .`).
|
|
48
|
+
- Verify WCAG 2.2 AA accessibility and responsive mobile breakpoints.
|
|
49
|
+
|
|
50
|
+
### Phase 5: π’ Ship & Archive (Crew)
|
|
51
|
+
- Create structured Conventional Commits following the Git standard.
|
|
52
|
+
- **Archive Work Artifacts**: Move completed plans or temporary scratchpads into `.agents/archive/` using the timestamped format `[title]-[YYYYMMDD-HHMMSS].md`.
|
|
53
|
+
- **DOX Pass**: Update `./.agents/context/current.md` and the nearest owning `AGENTS.md`.
|
|
54
|
+
- **Memory Update**: Persist newly confirmed invariants or architectural decisions into `./.memory`.
|
|
File without changes
|
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|

|
|
14
14
|

|
|
15
15
|
|
|
16
|
-

|
|
17
17
|

|
|
18
18
|

|
|
19
19
|

|
|
@@ -24,22 +24,23 @@
|
|
|
24
24
|
|
|
25
25
|
---
|
|
26
26
|
|
|
27
|
-
## π What's New in
|
|
27
|
+
## π What's New in v2.0.0 (Autonomous Cognitive Engine Major Overhaul)
|
|
28
28
|
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
29
|
+
- **π₯ Unified 5-Pillar Project Health Gate (`memory health` / `muse_health`)**: Comprehensive single-call architectural and memory health audit scoring Store Integrity, Code Anchor Validity, Doc $\leftrightarrow$ Code Alignment, Negative Sentry, and Technical Debt with letter grades (A-F), PASS/WARN/FAIL status, and automated remediation checklists.
|
|
30
|
+
- **π§ Autonomous Engineering Cognition & "Why" Reasoner (`muse_why`)**: Traces code evolution backwards through past bug fixes, ADRs, accepted trade-offs, and invariants to explain *why* code was built the way it is before refactoring.
|
|
31
|
+
- **ποΈ First-Class Architecture Decision Records (`memory_adr_record` / `memory_adr_list`)**: ADRs as queryable, scored, living memory units with options considered, consequences, native code anchors, and supersession lineage.
|
|
32
|
+
- **π Bidirectional Documentation $\leftrightarrow$ Code Drift Engine (`memory_drift_audit`)**: Continuously verifies that documented architectural invariants match live implementation and flags missing, stale, or conflicting code.
|
|
33
|
+
- **π― Flagship Unified Context Orchestrator (`muse_context`)**: Single-call fused entry point combining search, active file, symbol, error messages, and task intent under strict knapsack token budgets.
|
|
34
|
+
- **βοΈ Task-Focused MCP Profiles**: Solves agent tool bloat with role-tailored tool filtering profiles (`core`, `coding`, `debugging`, `review`, `architecture`, `maintenance`).
|
|
35
|
+
- **β Native Structural Code Anchors (`src/anchors/`)**: Line-independent structural hashing invariant to comment/spacing edits while strictly sensitive to AST/logic modifications.
|
|
36
|
+
- **πͺ Scoped Promotion & Extended Archival Lifecycle (`src/promotion/`)**: 3-tier promotion ladder (`local` $\rightarrow$ `project` $\rightarrow$ `global`), 5Γ repeated success policy, universal generalization, and `active` $\rightarrow$ `cold` $\rightarrow$ `dormant` $\rightarrow$ `archived` lifecycle with dynamic query rehydration.
|
|
37
|
+
- **β‘ Hot Query Cache & Multi-Factor Retrieval**: Microsecond caching, SQLite WAL optimization, and 11-dimension retrieval scoring.
|
|
37
38
|
|
|
38
39
|
---
|
|
39
40
|
|
|
40
41
|
## π Table of Contents
|
|
41
42
|
|
|
42
|
-
- [π What's New in
|
|
43
|
+
- [π What's New in v2.0.0](#-whats-new-in-v200-autonomous-cognitive-engine-major-overhaul)
|
|
43
44
|
- [π‘ What is Muse Memory? (TL;DR)](#-what-is-muse-memory-tldr)
|
|
44
45
|
- [β¨ Key Feature Highlights](#-key-feature-highlights)
|
|
45
46
|
- [β‘ Quick Start & Installation](#-quick-start--installation)
|
|
@@ -359,18 +360,23 @@ memory migrate --all
|
|
|
359
360
|
|
|
360
361
|
---
|
|
361
362
|
|
|
362
|
-
## π Cognitive Studio Dashboard (`memory ui`)
|
|
363
|
+
## π Cognitive Studio Dashboard (`memory ui` / `memory studio`)
|
|
363
364
|
|
|
364
|
-
Muse Memory includes an embedded, zero-dependency visual graph studio:
|
|
365
|
+
Muse Memory includes an embedded, zero-dependency visual graph studio and observability dashboard:
|
|
365
366
|
|
|
366
367
|
```bash
|
|
367
|
-
memory
|
|
368
|
-
# or
|
|
368
|
+
memory studio
|
|
369
|
+
# or alias:
|
|
369
370
|
memory ui --port 2222
|
|
370
371
|
```
|
|
371
372
|
|
|
372
373
|
Navigate to `http://localhost:2222` to access:
|
|
373
374
|
- π **3D Force-Directed Knowledge Graph**: Orbital canvas physics, degree-scaled node radii, and link relationship viewer.
|
|
375
|
+
- π₯ **5-Pillar Project Health Gate**: Live architectural scorecard (Store Integrity, Native Anchors, Doc-Code Alignment, Anti-Pattern Sentry, Technical Debt) with A-F grading and PASS/WARN/FAIL status.
|
|
376
|
+
- ποΈ **ADR Registry & Drift Inspector**: First-class Architecture Decision Records and bi-directional code β documentation drift auditor.
|
|
377
|
+
- π€ **Autonomous "Why" Reasoner**: Traces historical evolution of symbols/files backwards through past bug fixes and trade-offs to explain architectural rationale before refactoring.
|
|
378
|
+
- π€ **P2P Gossip Mesh Topology**: Real-time peer vector clocks, local agent identity, and one-click broadcast/shared pool sync.
|
|
379
|
+
- πΈοΈ **Monorepo & Cross-Project Mesh**: Workspace monorepo topology (pnpm, npm, bun, lerna), discovered package nodes, cross-project memory query, and contract drift audit.
|
|
374
380
|
- β‘ **Active Invariants & Real-Time Handoff**: Live `CURRENT.md` monitor tracking in-flight session status and agent checkpoints.
|
|
375
381
|
- π **Obsidian Wiki Browser**: Concept and entity page reader with full Markdown rendering.
|
|
376
382
|
- π€ **Persona Studio (`USER.md`)**: 5 archetype picker (`developer`, `designer`, `marketer`, `casual`, `custom`) and live editor.
|
|
@@ -382,12 +388,33 @@ Navigate to `http://localhost:2222` to access:
|
|
|
382
388
|
## π Deep Technical References & Documentation
|
|
383
389
|
|
|
384
390
|
<details>
|
|
385
|
-
<summary><b>π Complete MCP Tool Reference (
|
|
391
|
+
<summary><b>π Complete MCP Tool Reference (61 Tools across 6 Profiles)</b> β <i>Click to expand</i></summary>
|
|
386
392
|
|
|
387
|
-
When registered as an MCP server, `musememory` exposes the following native tools:
|
|
393
|
+
When registered as an MCP server, `musememory` exposes the following native tools (filtered dynamically into role-tailored profiles to eliminate tool bloat):
|
|
388
394
|
|
|
389
395
|
| MCP Tool | Execution Phase | Description |
|
|
390
396
|
| :--- | :--- | :--- |
|
|
397
|
+
| `muse_context` | **Flagship Fusion** | Single-call fused orchestrator combining search, active file, symbol, error messages, and task intent under strict knapsack token budgets. |
|
|
398
|
+
| `muse_health` | **Quality Gate** | 5-Pillar Project Health Gate: audits store integrity, code anchors, doc/code alignment, anti-pattern sentry, and technical debt with A-F grading and pass/fail status. |
|
|
399
|
+
| `muse_why` | **Cognition / "Why"** | Explains *why* code was designed the way it is by reconstructing past ADRs, bug fixes, trade-offs, and timeless rules. |
|
|
400
|
+
| `muse_bug_clusters` | **Fragility Hotspots** | Categorizes recurring bugs into 5 root causes with subsystem fragility scoring. |
|
|
401
|
+
| `muse_tech_debt` | **Technical Debt** | Scans code and memory for TODO/FIXME markers, unsafe `as any` casts, and drifted anchors. |
|
|
402
|
+
| `muse_memory_for_code`| **Code-to-Memory** | Queries all memories, ADRs, constraints, and bugs associated with a code file and symbol. |
|
|
403
|
+
| `muse_code_for_memory`| **Memory-to-Code** | Resolves all native code anchors and affected source files for a given memory entry. |
|
|
404
|
+
| `memory_adr_record` / `list` | **Architecture Decisions** | Records and queries first-class Architecture Decision Records with native code anchors and options considered. |
|
|
405
|
+
| `memory_drift_audit` | **Drift Engine** | Audits bi-directional documentation $\longleftrightarrow$ code drift across 6 alignment states (`DOCUMENTED`, `IMPLEMENTED`, `PARTIAL`, `CONFLICTING`, `STALE`, `MISSING`). |
|
|
406
|
+
| `memory_capture_negative` | **Negative Sentry** | Records failed approaches, anti-patterns, and reproduction commands to prevent repeating mistakes. |
|
|
407
|
+
| `memory_promote_scope` | **Scoped Promotion** | Promotes memory along 3-tier ladder (`local` $\rightarrow$ `project` $\rightarrow$ `global`) with 5Γ repeated success policy and universal generalization. |
|
|
408
|
+
| `memory_archive` / `rehydrate` | **Archival Lifecycle** | Evaluates and manages `active` $\rightarrow$ `cold` $\rightarrow$ `dormant` $\rightarrow$ `archived` lifecycle with query rehydration. |
|
|
409
|
+
| `memory_lifecycle_stats` / `sweep` | **Lifecycle Sweeper** | Reports store-wide lifecycle statistics and executes sweep transitions for aging memories. |
|
|
410
|
+
| `anchor_create` / `verify` / `audit` | **Code Identity** | Creates, verifies, and audits line-independent structural code anchors. |
|
|
411
|
+
| `muse_sync_broadcast` / `ingest` | **P2P Gossip Mesh** | Broadcasts and ingests portable sealed SyncPackets with deduplication and contradiction flagging. |
|
|
412
|
+
| `muse_sync_status` / `pool` | **Sync Coordination** | Tracks peer vector clocks and synchronizes memories bidirectionally via shared drop-directory pool. |
|
|
413
|
+
| `muse_mesh_status` | **Monorepo Topology** | Discovers monorepo workspaces and multi-repo sibling groups with package dependencies and stores. |
|
|
414
|
+
| `muse_mesh_query` | **Cross-Project Query** | Queries memories across the entire workspace mesh with origin package provenance tags. |
|
|
415
|
+
| `muse_mesh_audit` | **Contract Verification** | Audits cross-package dependency contracts, entrypoint exports, and cross-repo code anchors. |
|
|
416
|
+
| `muse_mesh_link` | **Mesh Linking** | Explicitly links or unlinks external repository paths into the workspace mesh registry. |
|
|
417
|
+
| `profile_list` / `profile_switch` | **Tool Management** | Lists and switches task-focused MCP profiles (`core`, `coding`, `debugging`, `review`, `architecture`, `maintenance`). |
|
|
391
418
|
| `get_context` | **Session Start** | Fetches Top-$K$ ranked memories, `USER.md` profile, active `CURRENT.md` constraints, and supports `--tier 0|1|2`. |
|
|
392
419
|
| `search` | **Investigation** | Searches memory units with query, token budget, project, type, and verification filters. |
|
|
393
420
|
| `memory_current` | **Constraints** | Reads or appends active project working constraints (`CURRENT.md`). |
|
|
@@ -431,7 +458,7 @@ When registered as an MCP server, `musememory` exposes the following native tool
|
|
|
431
458
|
</details>
|
|
432
459
|
|
|
433
460
|
<details>
|
|
434
|
-
<summary><b>π» Full CLI Command Matrix (
|
|
461
|
+
<summary><b>π» Full CLI Command Matrix (47 Commands)</b> β <i>Click to expand</i></summary>
|
|
435
462
|
|
|
436
463
|
```bash
|
|
437
464
|
memory <command> [arguments] [flags] # alias: musememory
|
|
@@ -439,6 +466,12 @@ memory <command> [arguments] [flags] # alias: musememory
|
|
|
439
466
|
|
|
440
467
|
| Command | Arguments / Flags | Description |
|
|
441
468
|
| :--- | :--- | :--- |
|
|
469
|
+
| `health` | `[--json] [--global]` | **Unified 5-Pillar Project Health Gate**: audits Store Integrity, Code Anchors, Drift, Sentry, and Tech Debt with A-F grading and pass/fail gate. |
|
|
470
|
+
| `studio` / `ui` | `[--port N] [--global]` | **Web Observability Studio**: visual dashboard with 5-pillar health, ADR drift, why reasoner, and live mesh (default port: `2222`). |
|
|
471
|
+
| `sync` | `[status\|broadcast\|ingest\|pool] [flags]` | **P2P Gossip Mesh**: peer vector clock status, packet export, ingestion, and shared pool gossip sync. |
|
|
472
|
+
| `mesh` | `[overview\|query\|check\|link\|unlink\|propagate] [flags]` | **Monorepo & Multi-Repo Mesh**: workspace discovery, cross-project memory query, and contract drift audit. |
|
|
473
|
+
| `adr` | `[record\|list\|supersede] [args]` | **Architecture Decision Records**: record, list, and supersede living architecture decisions. |
|
|
474
|
+
| `anchor` | `[create\|verify\|audit] [args]` | **Code Anchors**: create, verify, and audit line-independent structural code anchors. |
|
|
442
475
|
| `install` | `[path] [--global]` | **One-line complete setup**: initializes `.memory/`, `USER.md`, and auto-wires coding agents. |
|
|
443
476
|
| `doctor` | `[path] [--global]` | **System diagnostic**: checks SQLite primary, schemas, secrets, and MCP connections. |
|
|
444
477
|
| `uninstall` | `[agent] [--purge] [--dry-run]` | **Clean uninstaller**: unwires MCP configs (and optionally purges `.memory/`). |
|
|
@@ -448,7 +481,6 @@ memory <command> [arguments] [flags] # alias: musememory
|
|
|
448
481
|
| `agents` | *(none)* | Scan workstation for 80+ coding agents (Cursor, Claude Code, Antigravity, etc.). |
|
|
449
482
|
| `detect` | *(none)* | Scan workstation and local workspace for 29 external memory systems. |
|
|
450
483
|
| `migrate` | `[--provider P] [--all] [--dry-run] [--overwrite]` | Migrate memories into Muse Memory preserving active/archived state. |
|
|
451
|
-
| `ui` | `[--port N] [--global]` | Launch 6-view Cognitive Studio dashboard (default port: `2222`). |
|
|
452
484
|
| `context` | `[query] [--token-budget N] [--limit N] [--tier 0\|1\|2]` | Retrieve Top-$K$ ranked active context for prompt injection. |
|
|
453
485
|
| `search` | `<query> [--limit N] [--token-budget N] [--type T]` | Ranked multi-factor token search with score breakdown. |
|
|
454
486
|
| `search-transcript` | `<query> [file.jsonl] [--window N]` | Full-text search past transcripts with dialogue context windows. |
|