* feat(#956): add MemPalace memory capability (ADR-857 feature plug-in) Adds an opt-in, default-resilient ADR-857 feature capability that wires MemPalace (local-first memory: MCP server + CLI) into the GSD loop: deliberate recall before discuss/plan and verbatim + temporal-KG capture at phase boundaries. Three memory modes (augment default; kg_backend and replace forward-declared). Master gate mempalace.enabled (default off); every hook onError:skip, zero gates; absent/disabled MemPalace => loop unchanged. Transport is rendered-markdown only — MemPalace runs out-of-process, no third-party code in gsd-core (ADR-857 §7). Capability: capabilities/mempalace/ (manifest + 2 fragments), skills commands/gsd/mempalace-{recall,capture}.md, agent agents/gsd-mempalace-curator.md. Registration: ns-context router, utility cluster, KNOWN_SKILLS, help full.md, model-catalog, copilot install list, size baselines; regenerated capability-registry + inventory manifest. ship:post wired into ship.md (wire-on-demand). HELD on #1196: this capability also declares hooks at discuss:pre and discuss:post, which are structurally un-wireable until the host-loop conformance model covers the discuss phase (discuss-phase.md is not in HOST_LOOP_FILES). The phase6-capstone-conformance gate therefore fails on exactly those two orphaned points by design — see #1196. Once #1196 lands, rebase onto next and the gate goes green with no further change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs(#956): backfill changeset PR number (#1201) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -10,7 +10,7 @@ GSD uses a multi-agent architecture where thin orchestrators (workflow files) sp
|
||||
|
||||
### Agent Categories
|
||||
|
||||
> The table below covers the **21 primary agents** detailed in this section. Twelve additional shipped agents (pattern-mapper, debug-session-manager, code-reviewer, code-fixer, ai-researcher, domain-researcher, eval-planner, eval-auditor, framework-selector, intel-updater, doc-classifier, doc-synthesizer) have concise stubs in the [Advanced and Specialized Agents](#advanced-and-specialized-agents) section below. For the authoritative 33-agent roster, see [`docs/INVENTORY.md`](INVENTORY.md) and the `agents/` directory.
|
||||
> The table below covers the **21 primary agents** detailed in this section. Thirteen additional shipped agents (pattern-mapper, debug-session-manager, code-reviewer, code-fixer, ai-researcher, domain-researcher, eval-planner, eval-auditor, framework-selector, intel-updater, doc-classifier, doc-synthesizer, mempalace-curator) have concise stubs in the [Advanced and Specialized Agents](#advanced-and-specialized-agents) section below. For the authoritative 34-agent roster, see [`docs/INVENTORY.md`](INVENTORY.md) and the `agents/` directory.
|
||||
|
||||
| Category | Count | Agents |
|
||||
|----------|-------|--------|
|
||||
@@ -732,9 +732,30 @@ Twelve additional agents ship under `agents/gsd-*.md` and are used by specialty
|
||||
|
||||
---
|
||||
|
||||
### gsd-mempalace-curator
|
||||
|
||||
**Role:** Ship-time memory curation — writes per-agent diary entries, proposes and creates cross-project tunnels, runs wing-scoped sync pruning, and mirrors `extract-learnings` output into MemPalace's temporal knowledge graph with provenance.
|
||||
|
||||
| Property | Value |
|
||||
|----------|-------|
|
||||
| **Spawned by** | MemPalace capability at `ship:post` (when `mempalace.enabled = true`); diary/tunnels/KG-mirror are then refined by their own toggles |
|
||||
| **Parallelism** | Single instance |
|
||||
| **Tools** | Read, Bash, Grep, Glob |
|
||||
| **Model (balanced)** | Sonnet |
|
||||
| **Produces** | Diary entry in MemPalace, wing tunnel proposals, KG provenance records |
|
||||
|
||||
**Key behaviors:**
|
||||
- Best-effort only — every operation is `onError: skip`; a MemPalace failure never halts the loop
|
||||
- Wing-scoped sync pruning (`mempalace sync --wing <wing> --apply`) — never runs a global prune
|
||||
- Cross-project tunnel proposals when `mempalace.cross_project_tunnels = true`
|
||||
- Mirrors `extract-learnings` decisions, lessons, patterns, and surprises into the KG with `source_drawer_id` provenance
|
||||
- Requires MemPalace MCP server or CLI to be reachable; writes a skip-notice stub when unavailable
|
||||
|
||||
---
|
||||
|
||||
## Agent Tool Permissions Summary
|
||||
|
||||
> **Scope:** this table covers the 21 primary agents only. The 12 advanced/specialized agents listed above carry their own tool surfaces in their `agents/gsd-*.md` frontmatter (summarized in the per-agent stubs above and in [`docs/INVENTORY.md`](INVENTORY.md)).
|
||||
> **Scope:** this table covers the 21 primary agents only. The 13 advanced/specialized agents listed above carry their own tool surfaces in their `agents/gsd-*.md` frontmatter (summarized in the per-agent stubs above and in [`docs/INVENTORY.md`](INVENTORY.md)).
|
||||
|
||||
| Agent | Read | Write | Edit | Bash | Grep | Glob | WebSearch | WebFetch | MCP |
|
||||
|-------|------|-------|------|------|------|------|-----------|----------|-----|
|
||||
|
||||
@@ -1157,6 +1157,41 @@ Build, query, and inspect the project knowledge graph stored in `.planning/graph
|
||||
|
||||
**Programmatic access:** `node gsd-tools.cjs graphify <build|query|status|diff|snapshot>` — see [CLI Tools Reference](CLI-TOOLS.md).
|
||||
|
||||
### `/gsd-mempalace-recall`
|
||||
|
||||
Recall prior decisions, patterns, and surprises from MemPalace into `MEMORY-RECALL.md` before planning. Reads `CONTEXT.md` to derive a search query, runs `mempalace wake-up` + `mempalace_search` + `mempalace_kg_query`/timeline, and writes a deduped recall document. When MemPalace is unavailable the skill writes a stub and continues. Opt-in via `mempalace.enabled: true` and `mempalace.recall_on_plan: true` (see [Configuration Reference](CONFIGURATION.md#mempalace-settings)).
|
||||
|
||||
| Argument | Required | Description |
|
||||
|----------|----------|-------------|
|
||||
| `phase-slug` | No | Phase slug used to scope the search query (defaults to the active phase from CONTEXT.md) |
|
||||
|
||||
**Produces:** `MEMORY-RECALL.md` in the active phase directory (or an "unavailable" stub when MemPalace is unreachable)
|
||||
|
||||
```bash
|
||||
/gsd-mempalace-recall # Recall for the current phase
|
||||
/gsd-mempalace-recall 03-auth # Recall scoped to a specific phase slug
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### `/gsd-mempalace-capture`
|
||||
|
||||
File a phase artifact (`CONTEXT.md`, `PLAN.md`, or `SUMMARY.md`) verbatim into MemPalace and mirror decision facts into its temporal knowledge graph. Uses `mempalace_check_duplicate` before filing, so re-running the same phase is idempotent. Opt-in via `mempalace.enabled: true` and `mempalace.capture_artifacts: true` (see [Configuration Reference](CONFIGURATION.md#mempalace-settings)).
|
||||
|
||||
| Argument | Required | Description |
|
||||
|----------|----------|-------------|
|
||||
| `CONTEXT.md\|PLAN.md\|SUMMARY.md` | No | Artifact to capture (defaults to `CONTEXT.md` when called at `discuss:post`) |
|
||||
|
||||
**Produces:** A drawer in the appropriate MemPalace room (`decisions`, `planning`, or `milestones`) plus KG facts when `mempalace.mirror_kg: true`
|
||||
|
||||
```bash
|
||||
/gsd-mempalace-capture CONTEXT.md # File CONTEXT.md → decisions room
|
||||
/gsd-mempalace-capture PLAN.md # File PLAN.md → planning room
|
||||
/gsd-mempalace-capture SUMMARY.md # File SUMMARY.md → milestones room
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### `gsd-tools intel api-surface`
|
||||
|
||||
Render the `.planning/intel/api-map.json` index (built by `/gsd-map-codebase`) into a human-readable `API-SURFACE.md` in `.planning/intel/`. Gated on `intel.enabled: true` in `config.json`; when Intel is disabled the command prints an activation hint and exits. The output path is always `.planning/intel/API-SURFACE.md` — there is no `--out` or `--format` flag. When `api-map.json` is absent or empty the command still writes the file with an explicit "incomplete" banner so consumers never mistake silence for "nothing exists".
|
||||
|
||||
@@ -531,6 +531,49 @@ The `plan_review.*` namespace controls the plan drift guard, which verifies that
|
||||
| `plan_review.source_grounding` | boolean | `true` | Enable the plan drift guard. When `true` (the default), plan review resolves every symbol reference cited in a PLAN.md against the live source tree. Plans that cite a non-existent function, class, decorator, or CLI flag produce a `needs-acknowledgement` notice before the plan is approved. Disable with `false` to skip symbol verification entirely. Toggle during setup (`/gsd:new-project`) or at any time via `/gsd:settings`. |
|
||||
| `plan_review.source_grounding_authority` | enum | `grep` | Selects the resolver adapter used to verify symbol existence. Allowed values: `grep` (default — ripgrep/grep search of source files, works in any project without additional tooling), `intel` (query the `.planning/intel/api-map.json` index built by `/gsd:map-codebase`; requires `intel.enabled: true`), `treesitter` (reserved for future tree-sitter adapter), `lsp` (reserved for future LSP adapter), `scip` (reserved for future SCIP/LSIF adapter). Use `intel` when you have run `/gsd:map-codebase` and want the faster, pre-indexed lookup. All other values beyond `grep` and `intel` are reserved and have no effect in the current release. |
|
||||
|
||||
<a id="mempalace-settings"></a>
|
||||
### MemPalace Settings
|
||||
|
||||
MemPalace is an opt-in, default-resilient memory capability. Every hook is `onError: skip` — a missing or unreachable MemPalace installation never halts or fails the loop. Enable with `mempalace.enabled: true` after installing MemPalace (`pip install mempalace`).
|
||||
|
||||
`mempalace.enabled` is the **master gate**: all five loop hooks (discuss, plan, execute-wave, verify, ship) and both curator contributions are gated on this key. When it is `false` (the default), nothing fires and the GSD loop is byte-for-byte unchanged. The remaining keys only refine behavior when `mempalace.enabled` is `true`; they are honored at runtime by the skills, curator, and fragments — they do not add independent hook gating.
|
||||
|
||||
| Setting | Type | Default | Description |
|
||||
|---------|------|---------|-------------|
|
||||
| `mempalace.enabled` | boolean | `false` | Master gate for the MemPalace memory capability. When `false` (the default) every recall/capture hook is inactive and the loop is unchanged. All other `mempalace.*` keys are inert while this is `false`. |
|
||||
| `mempalace.memory_mode` | enum: `augment`, `kg_backend`, `replace` | `augment` | How MemPalace relates to GSD native memory. `augment` (**implemented** — MemPalace is an additional write-mostly recall layer alongside GSD's native graphs/learnings; lowest coupling). `kg_backend` (**declared; routing seam not yet implemented** — intended to route graphify KG queries through MemPalace's temporal graph instead of `.planning/graphs/`; selecting this today behaves the same as `augment`). `replace` (**declared; not yet functional** — intended to make the palace the durable store for GSD memory reads; selecting this today behaves the same as `augment`). |
|
||||
| `mempalace.wing` | string | `""` | Palace wing name for this project. Empty (the default) derives the wing from `project_code` or the project directory name. |
|
||||
| `mempalace.recall_on_discuss` | boolean | `true` | When `mempalace.enabled` is `true`: inject a wake-up + semantic-search recall fragment into the orchestrator at `discuss:pre`. Surfaces prior decisions, patterns, and surprises before the discussion starts. |
|
||||
| `mempalace.recall_on_plan` | boolean | `true` | When `mempalace.enabled` is `true`: run the `mempalace-recall` skill at `plan:pre` to produce `MEMORY-RECALL.md` from prior decisions, patterns, and surprises relevant to the plan. |
|
||||
| `mempalace.capture_artifacts` | boolean | `true` | When `mempalace.enabled` is `true`: file phase artifacts (`CONTEXT.md`, `PLAN.md`, `SUMMARY.md`) verbatim into MemPalace at their respective phase boundaries (`discuss:post`, `plan:post`, `verify:post`). Also captures confirmed bug→fix pairs at `execute:wave:post`. |
|
||||
| `mempalace.mirror_kg` | boolean | `true` | When `mempalace.enabled` is `true`: mirror decisions and learnings into MemPalace's temporal knowledge graph (`mempalace_kg_add` with `valid_from` = phase date) alongside drawer capture. |
|
||||
| `mempalace.cross_project_tunnels` | boolean | `false` | When `mempalace.enabled` is `true`: at `ship:post`, propose and create tunnels between this wing's rooms and semantically related wings in other projects (`mempalace_find_tunnels`, `mempalace_create_tunnel`). |
|
||||
| `mempalace.diary_journal` | boolean | `true` | When `mempalace.enabled` is `true`: at `ship:post`, write a per-agent diary entry (`mempalace_diary_write`) summarising the session. |
|
||||
| `mempalace.auto_capture_hooks` | boolean | `false` | **Reserved — not yet implemented.** Intended to install MemPalace's native Claude Code hooks (`session-start`, `stop`, `precompact`) for passive mid-session capture between loop points. The capability's `hooks` array is currently empty; no native hooks are installed by setting this key. This key is forward-declared for the future "Connected Capability" phase. |
|
||||
|
||||
#### Memory modes in detail
|
||||
|
||||
| Mode | `.planning/graphs` KG | Recall source | Coupling | Status |
|
||||
|------|-----------------------|---------------|---------|--------|
|
||||
| `augment` (default) | stays native | GSD native + palace search | lowest | **Implemented** |
|
||||
| `kg_backend` | intended: routed to MemPalace temporal graph | intended: KG queries hit MemPalace | medium | **Declared — routing seam not yet implemented; behaves as `augment`** |
|
||||
| `replace` | intended: backed by palace | intended: palace is the durable store | highest | **Declared — not yet functional; behaves as `augment`** |
|
||||
|
||||
Mode is read at hook-render time; switching modes is a config change, not a reinstall. Only `augment` has effect today — `kg_backend` and `replace` are forward-declared for a future release.
|
||||
|
||||
#### Example
|
||||
|
||||
```bash
|
||||
# Enable MemPalace (augment mode — the only implemented mode today)
|
||||
gsd-tools query config-set mempalace.enabled true
|
||||
|
||||
# Forward-declared: kg_backend/replace are not yet functional (declared for future release)
|
||||
# gsd-tools query config-set mempalace.memory_mode kg_backend
|
||||
|
||||
# Enable cross-project tunnel proposals at ship:post
|
||||
gsd-tools query config-set mempalace.cross_project_tunnels true
|
||||
```
|
||||
|
||||
<a id="graphify-settings"></a>
|
||||
### Graphify Settings
|
||||
|
||||
|
||||
@@ -166,6 +166,8 @@
|
||||
- [Structured JSON Error Mode](#142-structured-json-error-mode)
|
||||
- [UAT-Passed Predicate](#143-uat-passed-predicate)
|
||||
- [Spec-Phase Edge-Completeness Probe](#144-spec-phase-edge-completeness-probe)
|
||||
- [v1.43.0 Features](#v1430-features)
|
||||
- [MemPalace Memory Capability](#145-mempalace-memory-capability)
|
||||
|
||||
---
|
||||
|
||||
@@ -3119,3 +3121,27 @@ The load-bearing wire is the `plan-phase` lift: `covered` and `backstop` edges b
|
||||
- REQ-EDGE-06: `plan-phase` MUST lift `covered` criteria and `backstop` notes into `must_haves.truths`.
|
||||
|
||||
**Reference:** [Edge Probe](../gsd-core/references/edge-probe.md)
|
||||
|
||||
---
|
||||
|
||||
## v1.43.0 Features
|
||||
|
||||
### 145. MemPalace Memory Capability
|
||||
|
||||
**Purpose:** Opt-in cross-session and cross-project memory via the [MemPalace](https://github.com/MemPalace/mempalace) external service (local-first, MCP + CLI). Wires deliberate recall before discuss/plan and verbatim capture + temporal-KG sync at phase boundaries through the ADR-857 capability mechanism. Default-resilient: disabled by default, every hook is `onError: skip`, and an absent MemPalace installation leaves the loop unchanged.
|
||||
|
||||
**Commands:** `/gsd-mempalace-recall`, `/gsd-mempalace-capture`
|
||||
|
||||
**Requirements:**
|
||||
- REQ-MP-01: Opt-in via `mempalace.enabled: true`. Default `false` — the loop is unchanged when unset.
|
||||
- REQ-MP-02: At `plan:pre`, skill `mempalace-recall` produces `MEMORY-RECALL.md` from prior decisions, patterns, and surprises retrieved via wake-up + semantic search + KG timeline. When MemPalace is unreachable, writes an "unavailable" stub and continues.
|
||||
- REQ-MP-03: At `discuss:post`, `plan:post`, and `verify:post`, skill `mempalace-capture` files the phase artifact verbatim into the appropriate MemPalace room (`decisions`, `planning`, `milestones`). Capture is idempotent via `mempalace_check_duplicate`.
|
||||
- REQ-MP-04: At `ship:post`, agent `gsd-mempalace-curator` writes a diary entry, proposes cross-project tunnels (when `mempalace.cross_project_tunnels: true`), and runs wing-scoped sync pruning.
|
||||
- REQ-MP-05: `mempalace.memory_mode` declares three values: `augment` (default, **implemented** — palace is an additional recall layer alongside GSD native memory), `kg_backend` (**forward-declared; routing seam not yet implemented** — selecting this today behaves identically to `augment`), `replace` (**forward-declared; not yet functional** — selecting this today behaves identically to `augment`). Only `augment` has effect in the current release.
|
||||
- REQ-MP-06: Every hook is `onError: skip`. No hook carries `blocking: true`. Memory never halts or fails a phase.
|
||||
- REQ-MP-07: Interactive runs prefer MCP tools; headless/cron runs prefer the MemPalace CLI (`mempalace wake-up`, `mempalace search`, `mempalace mine`, `mempalace sync`).
|
||||
- REQ-MP-08: `mempalace.auto_capture_hooks` is **forward-declared and not yet functional**. No native Claude Code hooks (`stop`, `precompact`, `session-start`) are installed by this key; the capability's hooks array is empty. This key is reserved for the future "Connected Capability" phase. Default `false`.
|
||||
|
||||
**Configuration:** `mempalace.enabled`, `mempalace.memory_mode`, `mempalace.wing`, `mempalace.recall_on_discuss`, `mempalace.recall_on_plan`, `mempalace.capture_artifacts`, `mempalace.mirror_kg`, `mempalace.cross_project_tunnels`, `mempalace.diary_journal`, `mempalace.auto_capture_hooks`
|
||||
|
||||
See [Configuration Reference](CONFIGURATION.md#mempalace-settings) for full schema and [How to enable cross-session memory with MemPalace](how-to/enable-cross-session-memory-with-mempalace.md) for a setup walkthrough.
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
"gsd-framework-selector",
|
||||
"gsd-integration-checker",
|
||||
"gsd-intel-updater",
|
||||
"gsd-mempalace-curator",
|
||||
"gsd-nyquist-auditor",
|
||||
"gsd-pattern-mapper",
|
||||
"gsd-phase-researcher",
|
||||
@@ -64,6 +65,8 @@
|
||||
"/gsd-ingest-docs",
|
||||
"/gsd-manager",
|
||||
"/gsd-map-codebase",
|
||||
"/gsd-mempalace-capture",
|
||||
"/gsd-mempalace-recall",
|
||||
"/gsd-milestone-summary",
|
||||
"/gsd-mvp-phase",
|
||||
"/gsd-new-milestone",
|
||||
|
||||
@@ -51,6 +51,7 @@ Full roster at `agents/gsd-*.md`. The "Primary doc" column flags whether [`docs/
|
||||
| gsd-intel-updater | Writes structured intel files (`.planning/intel/*.json`) used as a queryable codebase knowledge base. | `/gsd-map-codebase --query` | advanced stub |
|
||||
| gsd-doc-classifier | Classifies a single planning document as ADR, PRD, SPEC, DOC, or UNKNOWN; spawned in parallel to process the doc corpus. | `/gsd-ingest-docs` | advanced stub |
|
||||
| gsd-doc-synthesizer | Synthesizes classified planning docs into a single consolidated context with precedence rules, cycle detection, and three-bucket conflicts report. | `/gsd-ingest-docs` | advanced stub |
|
||||
| gsd-mempalace-curator | Ship-time MemPalace curation — diary entry, cross-project tunnel proposals, wing-scoped sync pruning, and extract-learnings → KG mirroring with provenance. | MemPalace capability at `ship:post` | advanced stub |
|
||||
|
||||
**Coverage note.** `docs/AGENTS.md` gives full role cards for the primary agents plus concise stubs for the advanced agents. The Agent Tool Permissions Summary in that file covers only the primary agents; the advanced agents' tool lists are captured in their per-agent frontmatter in `agents/gsd-*.md`.
|
||||
|
||||
@@ -138,6 +139,8 @@ These six routers are descriptor-only entries that the model picks first; the bo
|
||||
| `/gsd-map-codebase` | Analyze codebase with parallel mapper agents; use `--fast` for lightweight scan or `--query` for intel queries. | [commands/gsd/map-codebase.md](../commands/gsd/map-codebase.md) |
|
||||
| `/gsd-graphify` | Build, query, and inspect the project knowledge graph in `.planning/graphs/`. | [commands/gsd/graphify.md](../commands/gsd/graphify.md) |
|
||||
| `/gsd-extract-learnings` | Extract decisions, lessons, patterns, and surprises from completed phase artifacts. | [commands/gsd/extract-learnings.md](../commands/gsd/extract-learnings.md) |
|
||||
| `/gsd-mempalace-recall` | Recall prior decisions, patterns, and surprises from MemPalace into MEMORY-RECALL.md before planning. | [commands/gsd/mempalace-recall.md](../commands/gsd/mempalace-recall.md) |
|
||||
| `/gsd-mempalace-capture` | File a phase artifact (CONTEXT/PLAN/SUMMARY) verbatim into MemPalace and mirror decision facts into its temporal KG. | [commands/gsd/mempalace-capture.md](../commands/gsd/mempalace-capture.md) |
|
||||
|
||||
### Review, Debug & Recovery
|
||||
|
||||
|
||||
138
docs/how-to/enable-cross-session-memory-with-mempalace.md
Normal file
138
docs/how-to/enable-cross-session-memory-with-mempalace.md
Normal file
@@ -0,0 +1,138 @@
|
||||
# How to enable cross-session memory with MemPalace
|
||||
|
||||
Give GSD durable memory across sessions and projects. When MemPalace is connected, GSD recalls prior decisions and patterns before you plan, and captures phase artifacts verbatim at each phase boundary.
|
||||
|
||||
**What you need:** [MemPalace](https://github.com/MemPalace/mempalace) installed locally. GSD never installs MemPalace for you — `pip install mempalace` is your action. A working MemPalace install is not required to complete GSD work; the capability is `onError: skip` at every hook, so an absent or unreachable MemPalace leaves the loop unchanged.
|
||||
|
||||
---
|
||||
|
||||
## Step 1 — Install MemPalace
|
||||
|
||||
Follow the [MemPalace installation guide](https://github.com/MemPalace/mempalace#installation). The quick path:
|
||||
|
||||
```bash
|
||||
pip install mempalace
|
||||
mempalace init # creates the local palace (ChromaDB + SQLite)
|
||||
mempalace status # verify the server is reachable
|
||||
```
|
||||
|
||||
For interactive use (Claude Code), MemPalace's MCP server must be running so `mempalace_*` tool calls resolve. For headless or cron runs, the CLI path (`mempalace wake-up`, `mempalace search`, etc.) is used automatically — no MCP server needed.
|
||||
|
||||
---
|
||||
|
||||
## Step 2 — Enable the capability
|
||||
|
||||
Inside your GSD project:
|
||||
|
||||
```bash
|
||||
gsd-tools query config-set mempalace.enabled true
|
||||
```
|
||||
|
||||
That is the only required step — `mempalace.enabled` is the master switch that gates all loop hooks. All other `mempalace.*` keys are optional refinements of the enabled behavior; they are honored at runtime by the skills, curator, and fragments.
|
||||
|
||||
---
|
||||
|
||||
## Step 3 — Choose a memory mode
|
||||
|
||||
The `mempalace.memory_mode` key controls how tightly MemPalace couples to GSD's native memory. **Only `augment` is implemented today.** The other modes are declared for future use — selecting them today has no additional effect beyond `augment`.
|
||||
|
||||
| Mode | What it does | When to use it | Status |
|
||||
|------|-------------|----------------|--------|
|
||||
| `augment` (default) | MemPalace is an additional recall layer alongside `.planning/graphs/` and learnings. Lowest coupling — palace is write-mostly and never required. | Most users. Safe to enable immediately. | **Implemented** |
|
||||
| `kg_backend` | Intended to route knowledge-graph queries through MemPalace's temporal graph instead of `.planning/graphs/`. | Future use — not yet functional today. | **Declared; routing seam not yet implemented** |
|
||||
| `replace` | Intended to make the palace the durable store; GSD memory reads would resolve through it. | Future use — not yet functional today. | **Declared; not yet functional** |
|
||||
|
||||
Until `kg_backend` and `replace` are implemented, changing `memory_mode` away from `augment` has no effect. Use the default and revisit when these modes ship.
|
||||
|
||||
```bash
|
||||
# memory_mode defaults to augment (the only functional mode today)
|
||||
# no change needed for most users
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Step 4 — Run a phase and observe recall and capture
|
||||
|
||||
With `mempalace.enabled: true`, here is what you will see at each loop point:
|
||||
|
||||
**Discuss phase (`/gsd-discuss-phase`):**
|
||||
1. At `discuss:pre` — MemPalace recall fires: prior decisions, patterns, and surprises are surfaced as context before the discussion begins.
|
||||
2. At `discuss:post` — `CONTEXT.md` is filed into the `decisions` room in MemPalace.
|
||||
|
||||
**Plan phase (`/gsd-plan-phase`):**
|
||||
3. At `plan:pre` — a `MEMORY-RECALL.md` file appears in the phase directory containing prior decisions, patterns, and surprises retrieved from the palace.
|
||||
4. At `plan:post` — `PLAN.md` is filed into the `planning` room.
|
||||
|
||||
**Verify phase (`/gsd-verify-work`):**
|
||||
5. At `verify:post` — `SUMMARY.md` is filed into `milestones` in MemPalace.
|
||||
|
||||
**Ship phase (`/gsd-ship`):**
|
||||
6. At `ship:post` — the `gsd-mempalace-curator` agent writes a diary entry and (if enabled) proposes cross-project tunnels.
|
||||
|
||||
**Execute phase (`/gsd-execute-phase`, each wave):**
|
||||
7. At `execute:wave:post` — confirmed problem→fix pairs are captured into the `problems` room via the `capture-problems` fragment.
|
||||
|
||||
If MemPalace is unreachable at any step, a skip-notice is written and the loop continues normally.
|
||||
|
||||
---
|
||||
|
||||
## Optional configuration
|
||||
|
||||
### Turn off recall or capture independently
|
||||
|
||||
```bash
|
||||
# Disable recall injection at discuss:pre (keeps capture)
|
||||
gsd-tools query config-set mempalace.recall_on_discuss false
|
||||
|
||||
# Disable the MEMORY-RECALL.md step at plan:pre
|
||||
gsd-tools query config-set mempalace.recall_on_plan false
|
||||
|
||||
# Disable artifact capture at phase boundaries
|
||||
gsd-tools query config-set mempalace.capture_artifacts false
|
||||
```
|
||||
|
||||
### Cross-project tunnels
|
||||
|
||||
Enable tunnel proposals at `ship:post` to connect related rooms across projects:
|
||||
|
||||
```bash
|
||||
gsd-tools query config-set mempalace.cross_project_tunnels true
|
||||
```
|
||||
|
||||
The curator agent will call `mempalace_find_tunnels` and propose connections to the wings it finds semantically related to this project's wing.
|
||||
|
||||
### Passive mid-session capture (reserved — not yet implemented)
|
||||
|
||||
`mempalace.auto_capture_hooks` is a forward-declared key reserved for a future "Connected Capability" phase. Setting it to `true` currently has no effect — no native Claude Code hooks (`stop`, `precompact`, `session-start`) are installed by this key yet. The capability's hooks array is empty; the deliberate loop hooks are the only active integration today.
|
||||
|
||||
```bash
|
||||
# Not yet functional — reserved for a future release
|
||||
# gsd-tools query config-set mempalace.auto_capture_hooks true
|
||||
```
|
||||
|
||||
### Override the wing name
|
||||
|
||||
By default, the wing name derives from `project_code` or the project directory. Override it:
|
||||
|
||||
```bash
|
||||
gsd-tools query config-set mempalace.wing my-project-name
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## What to expect when MemPalace is absent
|
||||
|
||||
If MemPalace is not installed, not running, or unreachable:
|
||||
|
||||
- Every hook logs a skip notice and continues.
|
||||
- `MEMORY-RECALL.md` is written with an "unavailable" stub (the planner can still proceed without it).
|
||||
- No phase step fails or blocks.
|
||||
- Loop behaviour is identical to having `mempalace.enabled: false`.
|
||||
|
||||
You can safely leave `mempalace.enabled: true` in a config that will be used on machines without MemPalace — it is safe to do so.
|
||||
|
||||
---
|
||||
|
||||
## Full configuration reference
|
||||
|
||||
See [MemPalace Settings](../CONFIGURATION.md#mempalace-settings) in the Configuration Reference for the complete key list with types and defaults.
|
||||
Reference in New Issue
Block a user