musememory 1.10.0 → 2.0.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 +137 -0
- package/.agents/context/brand.md +19 -0
- package/.agents/context/current.md +41 -0
- package/.agents/context/decisions.md +25 -0
- package/.agents/context/index.md +16 -0
- package/.agents/context/product.md +94 -0
- package/.agents/context/roadmap.md +12 -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 +65 -11
- package/dist/index.js +10395 -3316
- 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,8 +24,23 @@
|
|
|
24
24
|
|
|
25
25
|
---
|
|
26
26
|
|
|
27
|
+
## 🚀 What's New in v2.0.0 (Autonomous Cognitive Engine Major Overhaul)
|
|
28
|
+
|
|
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.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
27
41
|
## 📑 Table of Contents
|
|
28
42
|
|
|
43
|
+
- [🚀 What's New in v2.0.0](#-whats-new-in-v200-autonomous-cognitive-engine-major-overhaul)
|
|
29
44
|
- [💡 What is Muse Memory? (TL;DR)](#-what-is-muse-memory-tldr)
|
|
30
45
|
- [✨ Key Feature Highlights](#-key-feature-highlights)
|
|
31
46
|
- [⚡ Quick Start & Installation](#-quick-start--installation)
|
|
@@ -368,13 +383,28 @@ Navigate to `http://localhost:2222` to access:
|
|
|
368
383
|
## 📖 Deep Technical References & Documentation
|
|
369
384
|
|
|
370
385
|
<details>
|
|
371
|
-
<summary><b>🔌 Complete MCP Tool Reference (
|
|
386
|
+
<summary><b>🔌 Complete MCP Tool Reference (61 Tools across 6 Profiles)</b> — <i>Click to expand</i></summary>
|
|
372
387
|
|
|
373
|
-
When registered as an MCP server, `musememory` exposes the following native tools:
|
|
388
|
+
When registered as an MCP server, `musememory` exposes the following native tools (filtered dynamically into role-tailored profiles to eliminate tool bloat):
|
|
374
389
|
|
|
375
390
|
| MCP Tool | Execution Phase | Description |
|
|
376
391
|
| :--- | :--- | :--- |
|
|
377
|
-
| `
|
|
392
|
+
| `muse_context` | **Flagship Fusion** | Single-call fused orchestrator combining search, active file, symbol, error messages, and task intent under strict knapsack token budgets. |
|
|
393
|
+
| `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. |
|
|
394
|
+
| `muse_why` | **Cognition / "Why"** | Explains *why* code was designed the way it is by reconstructing past ADRs, bug fixes, trade-offs, and timeless rules. |
|
|
395
|
+
| `muse_bug_clusters` | **Fragility Hotspots** | Categorizes recurring bugs into 5 root causes with subsystem fragility scoring. |
|
|
396
|
+
| `muse_tech_debt` | **Technical Debt** | Scans code and memory for TODO/FIXME markers, unsafe `as any` casts, and drifted anchors. |
|
|
397
|
+
| `muse_memory_for_code`| **Code-to-Memory** | Queries all memories, ADRs, constraints, and bugs associated with a code file and symbol. |
|
|
398
|
+
| `muse_code_for_memory`| **Memory-to-Code** | Resolves all native code anchors and affected source files for a given memory entry. |
|
|
399
|
+
| `memory_adr_record` / `list` | **Architecture Decisions** | Records and queries first-class Architecture Decision Records with native code anchors and options considered. |
|
|
400
|
+
| `memory_drift_audit` | **Drift Engine** | Audits bi-directional documentation $\longleftrightarrow$ code drift across 6 alignment states (`DOCUMENTED`, `IMPLEMENTED`, `PARTIAL`, `CONFLICTING`, `STALE`, `MISSING`). |
|
|
401
|
+
| `memory_capture_negative` | **Negative Sentry** | Records failed approaches, anti-patterns, and reproduction commands to prevent repeating mistakes. |
|
|
402
|
+
| `memory_promote_scope` | **Scoped Promotion** | Promotes memory along 3-tier ladder (`local` $\rightarrow$ `project` $\rightarrow$ `global`) with 5× repeated success policy and universal generalization. |
|
|
403
|
+
| `memory_archive` / `rehydrate` | **Archival Lifecycle** | Evaluates and manages `active` $\rightarrow$ `cold` $\rightarrow$ `dormant` $\rightarrow$ `archived` lifecycle with query rehydration. |
|
|
404
|
+
| `memory_lifecycle_stats` / `sweep` | **Lifecycle Sweeper** | Reports store-wide lifecycle statistics and executes sweep transitions for aging memories. |
|
|
405
|
+
| `anchor_create` / `verify` / `audit` | **Code Identity** | Creates, verifies, and audits line-independent structural code anchors. |
|
|
406
|
+
| `profile_list` / `profile_switch` | **Tool Management** | Lists and switches task-focused MCP profiles (`core`, `coding`, `debugging`, `review`, `architecture`, `maintenance`). |
|
|
407
|
+
| `get_context` | **Session Start** | Fetches Top-$K$ ranked memories, `USER.md` profile, active `CURRENT.md` constraints, and supports `--tier 0|1|2`. |
|
|
378
408
|
| `search` | **Investigation** | Searches memory units with query, token budget, project, type, and verification filters. |
|
|
379
409
|
| `memory_current` | **Constraints** | Reads or appends active project working constraints (`CURRENT.md`). |
|
|
380
410
|
| `memory_get_user_profile` | **Context Loading** | Reads active `USER.md` persona and communication preferences. |
|
|
@@ -386,6 +416,13 @@ When registered as an MCP server, `musememory` exposes the following native tool
|
|
|
386
416
|
| `memory_mark_stale` | **Deprecation** | Flags decaying knowledge with deprecation rationale. |
|
|
387
417
|
| `memory_reject` | **Hypothesis Refutation** | Marks invalidated hypotheses as rejected. |
|
|
388
418
|
| `memory_delete` | **Purge** | Permanently deletes an entry and records audit ledger log. |
|
|
419
|
+
| `memory_source_add` / `list` | **Provenance** | Records external docs/RFCs/URLs into `.memory/sources.json` and queries sources. |
|
|
420
|
+
| `memory_claim_record` / `list` | **Claim Ledger** | Records evidence-backed claims tagged with `[RAW]`, `[FETCH]`, `[SEARCH]`, `[INFER]`. |
|
|
421
|
+
| `memory_freeze_run` / `list` | **Execution Snapshots** | Freezes immutable task snapshots with file inventory and SHA-256 memory hashes. |
|
|
422
|
+
| `memory_prompt_list` / `get` / `run` | **Prompt Templates** | Manages and executes native structured prompt templates with live context injection. |
|
|
423
|
+
| `memory_rollup` | **Temporal Compounding** | Aggregates atomic memories into weekly, monthly, and quarterly rollups and updates `HOT.md`. |
|
|
424
|
+
| `memory_loop_record` / `status` | **Gauntlet Loops** | Multi-agent iteration ledger and plateau/regression detector (`.memory/iterations.jsonl`). |
|
|
425
|
+
| `memory_verify_strict` | **Integrity Gate** | Zero-tolerance audit verifying secrets, referential links, wikilinks, claims, and candidates. |
|
|
389
426
|
| `memory_tree_search` | **Tree Retrieval** | Hierarchical reasoning search across partitioned memory shards. |
|
|
390
427
|
| `memory_wiki_compile` | **Wiki Compiler** | Compiles confirmed memories into Obsidian-compatible Markdown pages. |
|
|
391
428
|
| `memory_wiki_search` / `get` | **Wiki Reading** | Searches and reads compiled concept and entity wiki pages. |
|
|
@@ -410,7 +447,7 @@ When registered as an MCP server, `musememory` exposes the following native tool
|
|
|
410
447
|
</details>
|
|
411
448
|
|
|
412
449
|
<details>
|
|
413
|
-
<summary><b>💻 Full CLI Command Matrix (
|
|
450
|
+
<summary><b>💻 Full CLI Command Matrix (42 Commands)</b> — <i>Click to expand</i></summary>
|
|
414
451
|
|
|
415
452
|
```bash
|
|
416
453
|
memory <command> [arguments] [flags] # alias: musememory
|
|
@@ -418,6 +455,7 @@ memory <command> [arguments] [flags] # alias: musememory
|
|
|
418
455
|
|
|
419
456
|
| Command | Arguments / Flags | Description |
|
|
420
457
|
| :--- | :--- | :--- |
|
|
458
|
+
| `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. |
|
|
421
459
|
| `install` | `[path] [--global]` | **One-line complete setup**: initializes `.memory/`, `USER.md`, and auto-wires coding agents. |
|
|
422
460
|
| `doctor` | `[path] [--global]` | **System diagnostic**: checks SQLite primary, schemas, secrets, and MCP connections. |
|
|
423
461
|
| `uninstall` | `[agent] [--purge] [--dry-run]` | **Clean uninstaller**: unwires MCP configs (and optionally purges `.memory/`). |
|
|
@@ -428,7 +466,7 @@ memory <command> [arguments] [flags] # alias: musememory
|
|
|
428
466
|
| `detect` | *(none)* | Scan workstation and local workspace for 29 external memory systems. |
|
|
429
467
|
| `migrate` | `[--provider P] [--all] [--dry-run] [--overwrite]` | Migrate memories into Muse Memory preserving active/archived state. |
|
|
430
468
|
| `ui` | `[--port N] [--global]` | Launch 6-view Cognitive Studio dashboard (default port: `2222`). |
|
|
431
|
-
| `context` | `[query] [--token-budget N] [--limit N]` | Retrieve Top-$K$ ranked active context for prompt injection. |
|
|
469
|
+
| `context` | `[query] [--token-budget N] [--limit N] [--tier 0\|1\|2]` | Retrieve Top-$K$ ranked active context for prompt injection. |
|
|
432
470
|
| `search` | `<query> [--limit N] [--token-budget N] [--type T]` | Ranked multi-factor token search with score breakdown. |
|
|
433
471
|
| `search-transcript` | `<query> [file.jsonl] [--window N]` | Full-text search past transcripts with dialogue context windows. |
|
|
434
472
|
| `learn` / `sync-chats` | `[--confirm] [--force] [--max N]` | **Universal auto-learner**: auto-discovers and distills memories from all agent chats across host machine. |
|
|
@@ -441,6 +479,13 @@ memory <command> [arguments] [flags] # alias: musememory
|
|
|
441
479
|
| `mark-stale` | `<id> [--reason <text>]` | Mark an entry stale with deprecation rationale. |
|
|
442
480
|
| `reject` | `<id> [--global]` | Mark an entry rejected. |
|
|
443
481
|
| `delete` | `<id> [--reason <text>]` | Permanently delete a memory entry and record audit event. |
|
|
482
|
+
| `source` | `add\|list\|show <url> [--title T] [--type T]` | Manage external documentation and URLs in provenance Source Ledger (`.memory/sources.json`). |
|
|
483
|
+
| `claim` | `record\|list\|show <text> [--confidence RAW\|FETCH\|SEARCH\|INFER]` | Record and query verifiable claims connected to sources (`.memory/claims.json`). |
|
|
484
|
+
| `freeze` | `--task <task.md\|text> [--run-id R]` | Capture immutable execution snapshot with file inventory and SHA-256 memory hashes. |
|
|
485
|
+
| `prompt` | `list\|show\|run <name> [--args k=v,...]` | Manage and run structured prompt templates with live context injection. |
|
|
486
|
+
| `rollup` | `--period week\|month\|quarter [--date YYYY-MM-DD]` | Multi-scale temporal compounding and `.memory/HOT.md` working memory cache compiler. |
|
|
487
|
+
| `loop` | `record\|status\|clear` | Multi-agent Gauntlet iteration ledger and plateau/regression detector. |
|
|
488
|
+
| `verify` | `<id> [--timeout S] [--strict]` | Execute a fix entry's test command or run full strict integrity gate. |
|
|
444
489
|
| `audit` | `[--operation OP] [--entry-id ID] [--limit N]` | Query append-only operational audit trail (`.memory/audit.jsonl`). |
|
|
445
490
|
| `link` | `<id> --related <id1,id2>` | Synchronize bidirectional relation links between entries. |
|
|
446
491
|
| `export` / `import` | `[--out <file.json>]` / `<file.json>` | Export and import portable JSON memory snapshots. |
|
|
@@ -505,7 +550,7 @@ memory user set "- Prefers TypeScript, Bun, and ultra terse responses"
|
|
|
505
550
|
|
|
506
551
|
```bash
|
|
507
552
|
bun install
|
|
508
|
-
bun test #
|
|
553
|
+
bun test # 322 passed across 58 test files (1305 assertions)
|
|
509
554
|
bun run typecheck # 0 static type errors
|
|
510
555
|
bun run build # Clean bundled distribution build (dist/index.js)
|
|
511
556
|
```
|
|
@@ -517,13 +562,18 @@ bun run build # Clean bundled distribution build (dist/index.js)
|
|
|
517
562
|
<details>
|
|
518
563
|
<summary><b>🔮 Sprint & Roadmap Lifecycle (Requested ➔ Planned ➔ In Progress ➔ Done)</b> — <i>Click to expand</i></summary>
|
|
519
564
|
|
|
520
|
-
Muse Memory features are developed in structured sprints moving across 4 deterministic lifecycle phases. Every sprint is delivered via PR from `dev` to `main` with associated GitHub milestones. Live tracking: [GitHub Issues & Milestones](https://github.com/harshsinghmp/musememory/issues).
|
|
565
|
+
Muse Memory features are developed in structured sprints moving across 4 deterministic lifecycle phases following strict `vX.Y.Z` semantic versioning. Every sprint is delivered via PR from `dev` to `main` with associated GitHub milestones. Live tracking: [GitHub Issues & Milestones](https://github.com/harshsinghmp/musememory/issues).
|
|
521
566
|
|
|
522
567
|
```
|
|
523
568
|
[ 📋 Requested ] ──► [ 📅 Planned ] ──► [ ⚡ In Progress ] ──► [ ✅ Done ]
|
|
524
569
|
(Issues / PRs) (Sprint Backlog) (Active PR / Milestone) (Shipped to Main)
|
|
525
570
|
```
|
|
526
571
|
|
|
572
|
+
### 🏷️ Semantic Versioning Protocol (`vX.Y.Z`)
|
|
573
|
+
- **`X` (Major)**: Breaking architectural changes, core schema shifts, or protocol overhauls (`vX.0.0`).
|
|
574
|
+
- **`Y` (Feature)**: Substantive new agent capabilities, MCP tools, or CLI subcommands (`vX.Y.0`).
|
|
575
|
+
- **`Z` (Minor / Hotfix / Critical Fix)**: Bug remediations, security patches, performance, and urgent hotfixes (`vX.Y.Z`).
|
|
576
|
+
|
|
527
577
|
### 📋 Phase 1: Requested (Backlog)
|
|
528
578
|
*Incoming community proposals, agent adapters, and feature requests pending sprint triage:*
|
|
529
579
|
- [ ] Multi-Agent Consensus Verification Protocol (cross-agent memory agreement)
|
|
@@ -532,9 +582,13 @@ Muse Memory features are developed in structured sprints moving across 4 determi
|
|
|
532
582
|
|
|
533
583
|
### 📅 Phase 2: Planned
|
|
534
584
|
*Confirmed high-leverage features scheduled for upcoming sprints:*
|
|
535
|
-
- [ ]
|
|
536
|
-
- [ ]
|
|
537
|
-
- [ ]
|
|
585
|
+
- [ ] **Tiered Retrieval Engine**: Deterministic Tier 0 (manifest), Tier 1 (invariants), Tier 2 (bounded bodies) knapsack retrieval
|
|
586
|
+
- [ ] **Provenance & Claim Ledgers**: Direct memory citations with `[RAW]`, `[FETCH]`, `[SEARCH]`, and `[INFER]` confidence tagging
|
|
587
|
+
- [ ] **Frozen Context Snapshots**: Immutable SHA-256 state tracking for reproducible agent execution
|
|
588
|
+
- [ ] **Native Prompt Registry**: Declarative prompt library & runner (`.memory/prompts/*.md`, `memory prompt run`)
|
|
589
|
+
- [ ] **Temporal Compounding**: Multi-scale Day $\to$ Week $\to$ Quarter wiki rollups & `.memory/HOT.md` cache
|
|
590
|
+
- [ ] **Gauntlet Iteration Ledger**: Multi-turn improvement loop tracking and plateau detection
|
|
591
|
+
- [ ] **Strict Health Gate**: Comprehensive `memory verify --strict` referential, link, and secret validator
|
|
538
592
|
|
|
539
593
|
### ⚡ Phase 3: In Progress (Active Sprint / PR)
|
|
540
594
|
*Currently under active development on dedicated feature branches:*
|