Install
Install with PiG
pig install npm:memory-downInstall with Pi
pi install npm:memory-downPackages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.
Pi manifest JSON
The pi field of package.json.
{
"extensions": [
"./build/extension/index.js"
]
}README
Written by the package's publisher, shown as published in version 0.2.0 (README.md). PiG does not review it.
Memory Down
Memory Down is the working name for a Pi extension to replace pi-memory-md.
The core model stays simple: agents record and recall durable knowledge in Markdown files, organized into global, project, language/framework, organization, and execution-environment scopes and synchronized through a configured Git repository. Agents should consult relevant memories before asking questions that those memories may already answer.
Status: Parts 1–6 implemented in Gleam, compiled to JavaScript. Configuration/status, discovery, automatic recall, safe recording, bounded capture, and opt-in integrated Git synchronization are available in source. An npm release is required to distribute unreleased changes.
The extension owns recall, capture scheduling, and validated persistence. A separately configured management model can select fresh user statements outside the foreground conversation, without per-note approval. Initial capture adds verbatim project notes only; automatic rewriting/deletion is deferred. Model output never controls permissions or Git publication.
Installation
After the first public npm release:
pi install npm:memory-down
Pi installs the latest stable release and registers the compiled extension; restart Pi to load it. Update with pi update npm:memory-down. No GitLab login, artifact URLs, manual downloads or local compiler are needed. Requires Pi 1.5.2 on Node.js ≥26.13.1. Generated builds remain ignored; source-only Git installation is not supported. See Installation and releases.
Memory storage and provider authorization remain separate from package installation; /memory-status reports the existing trusted configuration, or missing configuration if it has not been set up. Installation does not migrate existing memories.
Development
Tooling is managed by mise.toml: Gleam 1.19.2, Node.js 26.13.1 (LTS), and pnpm 12.18.0. TypeScript is limited to the Pi/Node adapters, development tooling and integration-test fixtures.
mise trust
mise install
mise run setup
mise run check
mise run setup installs both dependency sets and builds. mise run check compiles Gleam and adapters, checks Gleam/Oxfmt formatting, enforces strict type-aware Oxlint and TypeScript checks, and runs Gleam unit and Node acceptance tests. Use mise exec -- pnpm format to format sources or mise exec -- pnpm lint:fix for safe lint fixes.
To try the built extension in an existing Pi installation:
mise exec -- pi -e ./build/extension/index.js --memory-environment linux-container
Create the trusted configuration described in Configuration, then run /memory-status. Without it, the command reports missing configuration and activates no scopes. Status never reads memory bodies.
Use /memory-search deployment rollback to search active scopes, or /memory-search to list notes. Plain Markdown and optional YAML metadata are supported; results include source paths, scopes, line-numbered excerpts, and partial/unavailable diagnostics. See Discovery for matching rules and fixed limits. Neither command calls models or changes Pi configuration. Search performs configured Git synchronization before reading; status stays local.
With valid configuration, recall supplies fresh source excerpts before foreground model requests. These excerpts are sent to the foreground provider. Use --memory-no-recall to disable automatic and model-requested recall; manual inspection commands remain available. The model can use memory_recall for focused follow-up searches. See Automatic recall for lifecycle behavior, budgets, retention limits, and verification.
Model writes are enabled by default with valid configuration, without approval dialogs. memory_record supports remember, revision inspection, correct, and forget, with scoped authorization, evidence checks, revision conflicts, and persistent suppression. Use --memory-no-record to disable note recording and capture. Configured Git synchronization can still update/publish the repository during reads. See Recording, especially recovery and retention limits.
To enable automatic capture, configure capture.provider, capture.model, capture.maxCalls, and capture.maxCostUsd in the trusted configuration. Bounded user text and related active-scope notes are sent to that provider. No configured manager means no management calls; there is no foreground-model fallback. Inspect /memory-capture-status for the latest outcome, last applied receipt, usage, and estimated cost. See Automated capture for limits, exclusions, and pricing caveats.
Use --memory-off to disable all extension-owned memory activity, including manual filesystem inspection. --memory-no-record also disables automatic capture; --memory-no-recall does not disable capture or its provider sharing.
Enable integrated synchronization with trusted sync.remote (a literal endpoint) and sync.branch. HTTPS authentication can use optional sync.token in the owner-only configuration file; keep tokens out of URLs and shared notes (added after the 0.1.0 release). Memory operations pull/rebase first; writes commit and push automatically. Conflicting notes use the remote version. Failures stop the operation, preserve local work, and retry on the next operation. Remote wins can discard local changes; publication exposes the entire repository history. See Git synchronization for setup, bounds and recovery.
The package is configured for public npm publication. Development types target Pi 1.5.2; the host provides Pi at runtime. mise run dist builds and verifies a production archive with real Pi before creating a checksum. Matching protected version tags publish that same archive to npm using OIDC trusted publishing and provenance, without rebuilding. Stable releases use latest; prereleases use next. From a clean checkout, mise run release:create infers the next version from Conventional Commits, generates the changelog, aligns versions, runs checks, commits and tags locally; pushing remains explicit. npm ownership, repository visibility and trusted-publisher setup remain manual. See Distribution and installation.
See Gleam guidance and TypeScript adapter guidance. Use pnpm for JavaScript dependency changes; never edit dependencies or devDependencies directly. Gleam manages its own locked Hex dependencies.
Documentation
Distribution and installation — npm installation, updates, trusted-publisher setup and verified releases.
Configuration — implemented schema, scope layout, selection, and status semantics.
Discovery — local search, optional metadata, resource bounds, diagnostics, and safety limits.
Automatic recall — request-local evidence, deeper search, disablement, freshness, and provider data sharing.
Recording — no-approval model mutations, revisions, provenance, suppression, and failure recovery.
Automated capture — isolated management, additive project notes, privacy controls, quotas, cancellation, and status.
Git synchronization — automatic pull/rebase, commit/push, remote-wins conflicts, bounded retries and recovery.
Gleam implementation guidance — language boundary, build, FFI, and verification.
ADR 006: Gleam core and JavaScript target — implementation-language and packaging decision.
Incremental implementation plan — accepted delivery sequence, first-part acceptance criteria, and instructions for subsequent agents.
Research: Agent memory landscape — comparison of ten systems, source-backed findings, recommended behavior, and an evaluation plan.
PRD: Markdown memory extension — goals, requirements, boundaries, and acceptance scenarios.
ADR 001: Markdown and five memory scopes — requested architectural foundations.
ADR 002: Memory-first clarification — accepted recall behavior and safeguards.
ADR 003: Git synchronization — accepted Git foundation and safe synchronization policy.
ADR 004: Curated memory and selective recall — accepted research-backed behavior, amended for automation.
ADR 005: Extension-owned automation — deterministic controls, automatic recall/capture, and isolated background management.
Design notes and open questions — illustrative layout, Pi integration options, replacement considerations, and unresolved decisions.
The PRD is the accepted product baseline. ADR 005 amends the earlier manual-first capture recommendation in favor of extension-owned automation. The configuration/status, discovery, recall, explicit-recording, and additive automatic-capture contracts are implemented. ADR 003's operator-approved amendment adds integrated automatic Git synchronization. Broader semantic maintenance and migration mechanics remain open.