fix(#2220): replace invalid mempalace mine --room with detect_room() staging (#2260)

* fix(#2220): replace invalid 'mine --room' with detect_room() staging approach

mempalace mine has no --room flag (only search does) — verified against
MemPalace 3.5.0 official docs (mempalaceofficial.com/reference/cli.html).
The headless capture path used --room, causing every headless/no-MCP run
to fail with 'unrecognized arguments: --room' and silently skip capture.

Fix: replace the flag with a staging-based approach that uses detect_room()'s
documented folder-path match — stage the artifact under a room-named subfolder
with a mempalace.yaml room taxonomy, then run 'mempalace mine <stage> --wing'.

Docs sources cited in-file:
- CLI reference:  https://mempalaceofficial.com/reference/cli.html
- Mining guide:   https://mempalaceofficial.com/guide/mining.html
- Config guide:   https://mempalaceofficial.com/guide/configuration.html

Changes:
- skills/gsd-mempalace-capture/SKILL.md: headless staging instructions
- commands/gsd/mempalace-capture.md: same
- capabilities/mempalace/fragments/capture-problems.md: reference staging
- .gitignore: exclude .planning/.mempalace-stage/
- tests/mempalace-capture-headless-invocation.test.cjs: regression test
- Golden install parity fixtures + workflow-size baseline regenerated

* docs: backfill changeset PR number (#2260)

* fix: regenerate golden fixtures after next merge
This commit is contained in:
Tom Boucher
2026-07-14 14:52:24 -04:00
committed by GitHub
parent 8b70db343b
commit d8af61be44
21 changed files with 155 additions and 24 deletions

View File

@@ -0,0 +1,5 @@
---
type: Fixed
pr: 2260
---
**Headless MemPalace capture no longer fails silently** — the headless invocation `mempalace mine <path> --wing <wing> --room <room>` used a `--room` flag that does not exist on the `mine` subcommand (only `search` accepts `--room`), causing every headless/no-MCP capture run to fail with `unrecognized arguments: --room` and silently skip (onError: skip). The fix replaces the flag with MemPalace's documented room-assignment mechanism: stage the artifact under a room-named subfolder with a `mempalace.yaml` taxonomy so `detect_room()` assigns it via folder-path match. (#2220)

1
.gitignore vendored
View File

@@ -239,6 +239,7 @@ tmp/
# MemPalace per-project files (issue #185) # MemPalace per-project files (issue #185)
mempalace.yaml mempalace.yaml
entities.json entities.json
.planning/.mempalace-stage/
# Local scratch + Claude-test artifacts # Local scratch + Claude-test artifacts
.scratch/ .scratch/

View File

@@ -13,7 +13,7 @@ For each confirmed bug/issue resolved in this wave:
1. **Resolve the wing** (`mempalace.wing`, else `project_code`, else project dir) and target `room: problems`. 1. **Resolve the wing** (`mempalace.wing`, else `project_code`, else project dir) and target `room: problems`.
2. **Dedupe first.** Call `mempalace_check_duplicate` (interactive) before filing so re-runs don't create duplicate drawers. 2. **Dedupe first.** Call `mempalace_check_duplicate` (interactive) before filing so re-runs don't create duplicate drawers.
3. **File the drawer verbatim.** Store the problem statement and its fix as a drawer in `room: problems` — interactive: `mempalace_add_drawer`; headless: `mempalace mine` / `mempalace hook run`. Include provenance (`source_file`, phase id). 3. **File the drawer verbatim.** Store the problem statement and its fix as a drawer in `room: problems` — interactive: `mempalace_add_drawer`; headless: stage the artifact under the `problems/` folder and run `mempalace mine` (no `--room` flag — see [CLI reference](https://mempalaceofficial.com/reference/cli.html); room assignment is via `detect_room()` folder-path match per the [mining guide](https://mempalaceofficial.com/guide/mining.html); use the same staging pattern documented in `gsd-mempalace-capture` Step 3). Include provenance (`source_file`, phase id).
4. **Mirror the KG fact** when `mempalace.mirror_kg` is on: add `(<bug>, fixed_by, <fix>)` with `valid_from` = the phase date via `mempalace_kg_add`. 4. **Mirror the KG fact** when `mempalace.mirror_kg` is on: add `(<bug>, fixed_by, <fix>)` with `valid_from` = the phase date via `mempalace_kg_add`.
5. **Mode awareness** (`mempalace.memory_mode`). Under `augment` the fact is an *additive* mirror alongside `.planning/graphs/`. Under `kg_backend`/`replace` the palace is the *authoritative* store for the fact; GSD still writes `.planning/graphs/` through its normal graphify, so an unreachable palace never loses it. 5. **Mode awareness** (`mempalace.memory_mode`). Under `augment` the fact is an *additive* mirror alongside `.planning/graphs/`. Under `kg_backend`/`replace` the palace is the *authoritative* store for the fact; GSD still writes `.planning/graphs/` through its normal graphify, so an unreachable palace never loses it.

View File

@@ -55,7 +55,33 @@ This step is `onError: skip` at `discuss:post` / `plan:post` / `verify:post` --
On any error or timeout, stop and let the phase continue -- capture is best-effort. On any error or timeout, stop and let the phase continue -- capture is best-effort.
1. **Dedup first.** Interactive: `mempalace_check_duplicate` on the artifact's deterministic drawer id. Headless: rely on `mempalace mine`'s content-hash idempotency. 1. **Dedup first.** Interactive: `mempalace_check_duplicate` on the artifact's deterministic drawer id. Headless: rely on `mempalace mine`'s content-hash idempotency.
2. **Add the drawer (verbatim).** File the exact artifact text into `room: <room>` of `wing: <wing>` with provenance (`source_file`, phase id). Interactive: `mempalace_add_drawer`. Headless: `mempalace mine <path> --wing <wing> --room <room>`. 2. **Add the drawer (verbatim).** File the exact artifact text into `room: <room>` of `wing: <wing>` with provenance (`source_file`, phase id). Interactive: `mempalace_add_drawer`. Headless: see below.
**`mempalace mine` has no `--room` flag** — only `search` accepts `--room` ([CLI reference: https://mempalaceofficial.com/reference/cli.html](https://mempalaceofficial.com/reference/cli.html)). Room assignment is driven by `detect_room()` matching folder-path segments against the `rooms:` list in `mempalace.yaml` ([mining guide: https://mempalaceofficial.com/guide/mining.html](https://mempalaceofficial.com/guide/mining.html) — "Rooms are auto-detected from your folder structure"; [config reference: https://mempalaceofficial.com/guide/configuration.html](https://mempalaceofficial.com/guide/configuration.html)). Stage the artifact under a room-named folder so `detect_room()` assigns it correctly:
```bash
STAGE=".planning/.mempalace-stage"
# One-time: declare the GSD room taxonomy so detect_room() recognizes these folders
mkdir -p "$STAGE"
[ -f "$STAGE/mempalace.yaml" ] || cat > "$STAGE/mempalace.yaml" <<'YAML'
rooms:
- decisions
- planning
- milestones
- problems
- general
YAML
# Suppress MemPalace cache artifacts written into the scanned tree
[ -f "$STAGE/.gitignore" ] || echo "mempalace_embedder.json" > "$STAGE/.gitignore"
# Stage under <room>/<phase-id>/<basename> — stable path so mine's content-hash
# idempotency (file_already_mined keys on absolute source_file + mtime) deduplicates
# instead of creating duplicate drawers on re-runs.
ROOM_DIR="$STAGE/<room>/<phase-id>"
mkdir -p "$ROOM_DIR"
cp "<artifact-path>" "$ROOM_DIR/<basename>"
# Mine with --wing only — no --room flag; detect_room() assigns from the folder path
mempalace mine "$STAGE" --wing <wing>
```
3. **Mirror KG facts** when `config.mempalace.mirror_kg` is true: extract decision/delivery facts and `mempalace_kg_add` them with `valid_from` = the phase date (e.g. `(<project>, decided, <decision>)` from CONTEXT; `(<phase>, delivered, <capability>)` from SUMMARY). Under `augment` these are an *additive* mirror of GSD's native `.planning/graphs/`. Under `kg_backend`/`replace` the palace KG is the *authoritative* fact store — GSD still produces `.planning/graphs/` through its normal graphify, so an unreachable palace never loses a fact. 3. **Mirror KG facts** when `config.mempalace.mirror_kg` is true: extract decision/delivery facts and `mempalace_kg_add` them with `valid_from` = the phase date (e.g. `(<project>, decided, <decision>)` from CONTEXT; `(<phase>, delivered, <capability>)` from SUMMARY). Under `augment` these are an *additive* mirror of GSD's native `.planning/graphs/`. Under `kg_backend`/`replace` the palace KG is the *authoritative* fact store — GSD still produces `.planning/graphs/` through its normal graphify, so an unreachable palace never loses a fact.
4. Re-running a phase MUST NOT create duplicate drawers (deterministic ids + `check_duplicate`). 4. Re-running a phase MUST NOT create duplicate drawers (deterministic ids + `check_duplicate`).

View File

@@ -55,7 +55,33 @@ This step is `onError: skip` at `discuss:post` / `plan:post` / `verify:post` --
On any error or timeout, stop and let the phase continue -- capture is best-effort. On any error or timeout, stop and let the phase continue -- capture is best-effort.
1. **Dedup first.** Interactive: `mempalace_check_duplicate` on the artifact's deterministic drawer id. Headless: rely on `mempalace mine`'s content-hash idempotency. 1. **Dedup first.** Interactive: `mempalace_check_duplicate` on the artifact's deterministic drawer id. Headless: rely on `mempalace mine`'s content-hash idempotency.
2. **Add the drawer (verbatim).** File the exact artifact text into `room: <room>` of `wing: <wing>` with provenance (`source_file`, phase id). Interactive: `mempalace_add_drawer`. Headless: `mempalace mine <path> --wing <wing> --room <room>`. 2. **Add the drawer (verbatim).** File the exact artifact text into `room: <room>` of `wing: <wing>` with provenance (`source_file`, phase id). Interactive: `mempalace_add_drawer`. Headless: see below.
**`mempalace mine` has no `--room` flag** — only `search` accepts `--room` ([CLI reference: https://mempalaceofficial.com/reference/cli.html](https://mempalaceofficial.com/reference/cli.html)). Room assignment is driven by `detect_room()` matching folder-path segments against the `rooms:` list in `mempalace.yaml` ([mining guide: https://mempalaceofficial.com/guide/mining.html](https://mempalaceofficial.com/guide/mining.html) — "Rooms are auto-detected from your folder structure"; [config reference: https://mempalaceofficial.com/guide/configuration.html](https://mempalaceofficial.com/guide/configuration.html)). Stage the artifact under a room-named folder so `detect_room()` assigns it correctly:
```bash
STAGE=".planning/.mempalace-stage"
# One-time: declare the GSD room taxonomy so detect_room() recognizes these folders
mkdir -p "$STAGE"
[ -f "$STAGE/mempalace.yaml" ] || cat > "$STAGE/mempalace.yaml" <<'YAML'
rooms:
- decisions
- planning
- milestones
- problems
- general
YAML
# Suppress MemPalace cache artifacts written into the scanned tree
[ -f "$STAGE/.gitignore" ] || echo "mempalace_embedder.json" > "$STAGE/.gitignore"
# Stage under <room>/<phase-id>/<basename> — stable path so mine's content-hash
# idempotency (file_already_mined keys on absolute source_file + mtime) deduplicates
# instead of creating duplicate drawers on re-runs.
ROOM_DIR="$STAGE/<room>/<phase-id>"
mkdir -p "$ROOM_DIR"
cp "<artifact-path>" "$ROOM_DIR/<basename>"
# Mine with --wing only — no --room flag; detect_room() assigns from the folder path
mempalace mine "$STAGE" --wing <wing>
```
3. **Mirror KG facts** when `config.mempalace.mirror_kg` is true: extract decision/delivery facts and `mempalace_kg_add` them with `valid_from` = the phase date (e.g. `(<project>, decided, <decision>)` from CONTEXT; `(<phase>, delivered, <capability>)` from SUMMARY). Under `augment` these are an *additive* mirror of GSD's native `.planning/graphs/`. Under `kg_backend`/`replace` the palace KG is the *authoritative* fact store — GSD still produces `.planning/graphs/` through its normal graphify, so an unreachable palace never loses a fact. 3. **Mirror KG facts** when `config.mempalace.mirror_kg` is true: extract decision/delivery facts and `mempalace_kg_add` them with `valid_from` = the phase date (e.g. `(<project>, decided, <decision>)` from CONTEXT; `(<phase>, delivered, <capability>)` from SUMMARY). Under `augment` these are an *additive* mirror of GSD's native `.planning/graphs/`. Under `kg_backend`/`replace` the palace KG is the *authoritative* fact store — GSD still produces `.planning/graphs/` through its normal graphify, so an unreachable palace never loses a fact.
4. Re-running a phase MUST NOT create duplicate drawers (deterministic ids + `check_duplicate`). 4. Re-running a phase MUST NOT create duplicate drawers (deterministic ids + `check_duplicate`).

View File

@@ -381,7 +381,7 @@
"skills/gsd-ingest-docs/SKILL.md": "f4e43968af317ed8", "skills/gsd-ingest-docs/SKILL.md": "f4e43968af317ed8",
"skills/gsd-manager/SKILL.md": "6e51785860784d8c", "skills/gsd-manager/SKILL.md": "6e51785860784d8c",
"skills/gsd-map-codebase/SKILL.md": "552f914f43b2181c", "skills/gsd-map-codebase/SKILL.md": "552f914f43b2181c",
"skills/gsd-mempalace-capture/SKILL.md": "588ddf4fbf3ebe65", "skills/gsd-mempalace-capture/SKILL.md": "ece243a29d87cfca",
"skills/gsd-mempalace-recall/SKILL.md": "2d95e385fee26dee", "skills/gsd-mempalace-recall/SKILL.md": "2d95e385fee26dee",
"skills/gsd-milestone-summary/SKILL.md": "2955ab3e3a444ca3", "skills/gsd-milestone-summary/SKILL.md": "2955ab3e3a444ca3",
"skills/gsd-mvp-phase/SKILL.md": "1cf7622d655840ac", "skills/gsd-mvp-phase/SKILL.md": "1cf7622d655840ac",

View File

@@ -63,7 +63,7 @@
"commands/gsd-ingest-docs.md": "6718b04c597a5428", "commands/gsd-ingest-docs.md": "6718b04c597a5428",
"commands/gsd-manager.md": "8f4ae79774902293", "commands/gsd-manager.md": "8f4ae79774902293",
"commands/gsd-map-codebase.md": "e4e170d4ef2d46c6", "commands/gsd-map-codebase.md": "e4e170d4ef2d46c6",
"commands/gsd-mempalace-capture.md": "2e610f3ebe2eb5b4", "commands/gsd-mempalace-capture.md": "d57b339a2743f5a4",
"commands/gsd-mempalace-recall.md": "38716c0983a3ef9c", "commands/gsd-mempalace-recall.md": "38716c0983a3ef9c",
"commands/gsd-milestone-summary.md": "ff5e11e6b33d4b5e", "commands/gsd-milestone-summary.md": "ff5e11e6b33d4b5e",
"commands/gsd-mvp-phase.md": "ffc5905aed8f450a", "commands/gsd-mvp-phase.md": "ffc5905aed8f450a",
@@ -428,7 +428,7 @@
"skills/gsd-ns-context/skills/extract-learnings/SKILL.md": "48846bf26ccaf0e7", "skills/gsd-ns-context/skills/extract-learnings/SKILL.md": "48846bf26ccaf0e7",
"skills/gsd-ns-context/skills/graphify/SKILL.md": "3d6341614add6ccd", "skills/gsd-ns-context/skills/graphify/SKILL.md": "3d6341614add6ccd",
"skills/gsd-ns-context/skills/map-codebase/SKILL.md": "2017007dcd69d153", "skills/gsd-ns-context/skills/map-codebase/SKILL.md": "2017007dcd69d153",
"skills/gsd-ns-context/skills/mempalace-capture/SKILL.md": "a7261b5ead71cc58", "skills/gsd-ns-context/skills/mempalace-capture/SKILL.md": "b3c600b306f179eb",
"skills/gsd-ns-context/skills/mempalace-recall/SKILL.md": "646e59e76acd548f", "skills/gsd-ns-context/skills/mempalace-recall/SKILL.md": "646e59e76acd548f",
"skills/gsd-ns-ideate/SKILL.md": "d70360a5f7e8ac90", "skills/gsd-ns-ideate/SKILL.md": "d70360a5f7e8ac90",
"skills/gsd-ns-ideate/skills/capture/SKILL.md": "74651f6959cfbbd3", "skills/gsd-ns-ideate/skills/capture/SKILL.md": "74651f6959cfbbd3",

View File

@@ -379,7 +379,7 @@
"skills/gsd-ingest-docs/SKILL.md": "eb85e654917a503a", "skills/gsd-ingest-docs/SKILL.md": "eb85e654917a503a",
"skills/gsd-manager/SKILL.md": "1370d93741e47828", "skills/gsd-manager/SKILL.md": "1370d93741e47828",
"skills/gsd-map-codebase/SKILL.md": "cf65e61890448285", "skills/gsd-map-codebase/SKILL.md": "cf65e61890448285",
"skills/gsd-mempalace-capture/SKILL.md": "40a31ad049374297", "skills/gsd-mempalace-capture/SKILL.md": "fa47f3e3fb1264eb",
"skills/gsd-mempalace-recall/SKILL.md": "c3f412d5a64f3921", "skills/gsd-mempalace-recall/SKILL.md": "c3f412d5a64f3921",
"skills/gsd-milestone-summary/SKILL.md": "33d51a325d314f3a", "skills/gsd-milestone-summary/SKILL.md": "33d51a325d314f3a",
"skills/gsd-mvp-phase/SKILL.md": "f9a1348c6c297579", "skills/gsd-mvp-phase/SKILL.md": "f9a1348c6c297579",

View File

@@ -332,7 +332,7 @@
"skills/gsd-ns-context/skills/extract-learnings/SKILL.md": "d39269bea995fabc", "skills/gsd-ns-context/skills/extract-learnings/SKILL.md": "d39269bea995fabc",
"skills/gsd-ns-context/skills/graphify/SKILL.md": "030050fcd08d129d", "skills/gsd-ns-context/skills/graphify/SKILL.md": "030050fcd08d129d",
"skills/gsd-ns-context/skills/map-codebase/SKILL.md": "fa6a37402430af7d", "skills/gsd-ns-context/skills/map-codebase/SKILL.md": "fa6a37402430af7d",
"skills/gsd-ns-context/skills/mempalace-capture/SKILL.md": "588ddf4fbf3ebe65", "skills/gsd-ns-context/skills/mempalace-capture/SKILL.md": "ece243a29d87cfca",
"skills/gsd-ns-context/skills/mempalace-recall/SKILL.md": "2d95e385fee26dee", "skills/gsd-ns-context/skills/mempalace-recall/SKILL.md": "2d95e385fee26dee",
"skills/gsd-ns-ideate/SKILL.md": "c10342345c01c91f", "skills/gsd-ns-ideate/SKILL.md": "c10342345c01c91f",
"skills/gsd-ns-ideate/skills/capture/SKILL.md": "fb53053848bb6695", "skills/gsd-ns-ideate/skills/capture/SKILL.md": "fb53053848bb6695",

View File

@@ -63,7 +63,7 @@
"commands/gsd-ingest-docs.md": "ab3e58239c23d61d", "commands/gsd-ingest-docs.md": "ab3e58239c23d61d",
"commands/gsd-manager.md": "bfe9e261fa918876", "commands/gsd-manager.md": "bfe9e261fa918876",
"commands/gsd-map-codebase.md": "5093093d42240325", "commands/gsd-map-codebase.md": "5093093d42240325",
"commands/gsd-mempalace-capture.md": "e9e00b0602e1d8b8", "commands/gsd-mempalace-capture.md": "c687b6d88b50f45c",
"commands/gsd-mempalace-recall.md": "6efef238d8c62569", "commands/gsd-mempalace-recall.md": "6efef238d8c62569",
"commands/gsd-milestone-summary.md": "e3a36fbd695a1833", "commands/gsd-milestone-summary.md": "e3a36fbd695a1833",
"commands/gsd-mvp-phase.md": "671791ba61c4654a", "commands/gsd-mvp-phase.md": "671791ba61c4654a",
@@ -451,7 +451,7 @@
"skills/gsd-ingest-docs/SKILL.md": "2df55e0ec95d57d9", "skills/gsd-ingest-docs/SKILL.md": "2df55e0ec95d57d9",
"skills/gsd-manager/SKILL.md": "816db4d4ed618537", "skills/gsd-manager/SKILL.md": "816db4d4ed618537",
"skills/gsd-map-codebase/SKILL.md": "b304ec25e9a95c93", "skills/gsd-map-codebase/SKILL.md": "b304ec25e9a95c93",
"skills/gsd-mempalace-capture/SKILL.md": "5f10d368835e062c", "skills/gsd-mempalace-capture/SKILL.md": "cb6238896332cedf",
"skills/gsd-mempalace-recall/SKILL.md": "70c8491f53f4161b", "skills/gsd-mempalace-recall/SKILL.md": "70c8491f53f4161b",
"skills/gsd-milestone-summary/SKILL.md": "9eb030a1ac307fa1", "skills/gsd-milestone-summary/SKILL.md": "9eb030a1ac307fa1",
"skills/gsd-mvp-phase/SKILL.md": "236fcdd69f47d101", "skills/gsd-mvp-phase/SKILL.md": "236fcdd69f47d101",

View File

@@ -27,7 +27,7 @@
".agents/skills/gsd-ingest-docs/SKILL.md": "5bd2838bf0b6dc1b", ".agents/skills/gsd-ingest-docs/SKILL.md": "5bd2838bf0b6dc1b",
".agents/skills/gsd-manager/SKILL.md": "cb1cf56f5d3f66d6", ".agents/skills/gsd-manager/SKILL.md": "cb1cf56f5d3f66d6",
".agents/skills/gsd-map-codebase/SKILL.md": "cd27dc028718426b", ".agents/skills/gsd-map-codebase/SKILL.md": "cd27dc028718426b",
".agents/skills/gsd-mempalace-capture/SKILL.md": "1a7fac4d53f607ab", ".agents/skills/gsd-mempalace-capture/SKILL.md": "361675ada00a54b6",
".agents/skills/gsd-mempalace-recall/SKILL.md": "7205b02250e89f25", ".agents/skills/gsd-mempalace-recall/SKILL.md": "7205b02250e89f25",
".agents/skills/gsd-milestone-summary/SKILL.md": "af84ecb400f23556", ".agents/skills/gsd-milestone-summary/SKILL.md": "af84ecb400f23556",
".agents/skills/gsd-mvp-phase/SKILL.md": "72b65ae927b280fe", ".agents/skills/gsd-mvp-phase/SKILL.md": "72b65ae927b280fe",

View File

@@ -354,7 +354,7 @@
"skills/gsd-ingest-docs/SKILL.md": "10500de29525f6cf", "skills/gsd-ingest-docs/SKILL.md": "10500de29525f6cf",
"skills/gsd-manager/SKILL.md": "9946975bec15e737", "skills/gsd-manager/SKILL.md": "9946975bec15e737",
"skills/gsd-map-codebase/SKILL.md": "39e7fd6bcc561f9d", "skills/gsd-map-codebase/SKILL.md": "39e7fd6bcc561f9d",
"skills/gsd-mempalace-capture/SKILL.md": "f4511f69c14befb7", "skills/gsd-mempalace-capture/SKILL.md": "a9f9dd7fb904d09f",
"skills/gsd-mempalace-recall/SKILL.md": "89523db66f834b2f", "skills/gsd-mempalace-recall/SKILL.md": "89523db66f834b2f",
"skills/gsd-milestone-summary/SKILL.md": "5ca1dabfe0cd85f0", "skills/gsd-milestone-summary/SKILL.md": "5ca1dabfe0cd85f0",
"skills/gsd-mvp-phase/SKILL.md": "60ac3c3fa6a6a19b", "skills/gsd-mvp-phase/SKILL.md": "60ac3c3fa6a6a19b",

View File

@@ -63,7 +63,7 @@
"commands/gsd-ingest-docs.md": "9e7f8757b9408c01", "commands/gsd-ingest-docs.md": "9e7f8757b9408c01",
"commands/gsd-manager.md": "f300b708a5487c76", "commands/gsd-manager.md": "f300b708a5487c76",
"commands/gsd-map-codebase.md": "12f705917eb202fb", "commands/gsd-map-codebase.md": "12f705917eb202fb",
"commands/gsd-mempalace-capture.md": "b30bce634ac3136c", "commands/gsd-mempalace-capture.md": "06323113ec60df3e",
"commands/gsd-mempalace-recall.md": "08c910285469a394", "commands/gsd-mempalace-recall.md": "08c910285469a394",
"commands/gsd-milestone-summary.md": "adfad2cf43fc5aad", "commands/gsd-milestone-summary.md": "adfad2cf43fc5aad",
"commands/gsd-mvp-phase.md": "e8debeee627a0bf2", "commands/gsd-mvp-phase.md": "e8debeee627a0bf2",
@@ -429,7 +429,7 @@
"skills/gsd-ingest-docs/SKILL.md": "01ed9183a00252ee", "skills/gsd-ingest-docs/SKILL.md": "01ed9183a00252ee",
"skills/gsd-manager/SKILL.md": "62cd9f671a39e8a4", "skills/gsd-manager/SKILL.md": "62cd9f671a39e8a4",
"skills/gsd-map-codebase/SKILL.md": "383559aca64201e8", "skills/gsd-map-codebase/SKILL.md": "383559aca64201e8",
"skills/gsd-mempalace-capture/SKILL.md": "b308823dee547c65", "skills/gsd-mempalace-capture/SKILL.md": "f14977d3f78291c6",
"skills/gsd-mempalace-recall/SKILL.md": "56f3037091a8bd9a", "skills/gsd-mempalace-recall/SKILL.md": "56f3037091a8bd9a",
"skills/gsd-milestone-summary/SKILL.md": "c5dbbc8edb97a7f7", "skills/gsd-milestone-summary/SKILL.md": "c5dbbc8edb97a7f7",
"skills/gsd-mvp-phase/SKILL.md": "9d8e2999fa9f7830", "skills/gsd-mvp-phase/SKILL.md": "9d8e2999fa9f7830",

View File

@@ -358,7 +358,7 @@
"skills/gsd/gsd-ns-context/skills/extract-learnings/SKILL.md": "36e59d6e514dcaf0", "skills/gsd/gsd-ns-context/skills/extract-learnings/SKILL.md": "36e59d6e514dcaf0",
"skills/gsd/gsd-ns-context/skills/graphify/SKILL.md": "169eefd42c444cde", "skills/gsd/gsd-ns-context/skills/graphify/SKILL.md": "169eefd42c444cde",
"skills/gsd/gsd-ns-context/skills/map-codebase/SKILL.md": "9d36eee52586bb34", "skills/gsd/gsd-ns-context/skills/map-codebase/SKILL.md": "9d36eee52586bb34",
"skills/gsd/gsd-ns-context/skills/mempalace-capture/SKILL.md": "3fa619f73834c436", "skills/gsd/gsd-ns-context/skills/mempalace-capture/SKILL.md": "4a2733dd32cdf737",
"skills/gsd/gsd-ns-context/skills/mempalace-recall/SKILL.md": "5d06922e0d7ab7d9", "skills/gsd/gsd-ns-context/skills/mempalace-recall/SKILL.md": "5d06922e0d7ab7d9",
"skills/gsd/gsd-ns-ideate/SKILL.md": "b36bb4700ed6723a", "skills/gsd/gsd-ns-ideate/SKILL.md": "b36bb4700ed6723a",
"skills/gsd/gsd-ns-ideate/skills/capture/SKILL.md": "76fc7c1200124ece", "skills/gsd/gsd-ns-ideate/skills/capture/SKILL.md": "76fc7c1200124ece",

View File

@@ -63,7 +63,7 @@
"command/gsd-ingest-docs.md": "e655ecf1d4433ba9", "command/gsd-ingest-docs.md": "e655ecf1d4433ba9",
"command/gsd-manager.md": "1cdc133079833552", "command/gsd-manager.md": "1cdc133079833552",
"command/gsd-map-codebase.md": "704cb63214f51523", "command/gsd-map-codebase.md": "704cb63214f51523",
"command/gsd-mempalace-capture.md": "a94ca275cbe7134c", "command/gsd-mempalace-capture.md": "8b6bc24d7baf1e9b",
"command/gsd-mempalace-recall.md": "d358cdd89c935877", "command/gsd-mempalace-recall.md": "d358cdd89c935877",
"command/gsd-milestone-summary.md": "4ab29b777f62f0bb", "command/gsd-milestone-summary.md": "4ab29b777f62f0bb",
"command/gsd-mvp-phase.md": "273a1c26ca13274b", "command/gsd-mvp-phase.md": "273a1c26ca13274b",
@@ -425,7 +425,7 @@
"skills/gsd-ingest-docs/SKILL.md": "f049f06a6ec7da43", "skills/gsd-ingest-docs/SKILL.md": "f049f06a6ec7da43",
"skills/gsd-manager/SKILL.md": "a37ecdbe32952262", "skills/gsd-manager/SKILL.md": "a37ecdbe32952262",
"skills/gsd-map-codebase/SKILL.md": "e06d6ac1b7632cbe", "skills/gsd-map-codebase/SKILL.md": "e06d6ac1b7632cbe",
"skills/gsd-mempalace-capture/SKILL.md": "f960b7b1a8fdf89b", "skills/gsd-mempalace-capture/SKILL.md": "80ffe0ee9b833502",
"skills/gsd-mempalace-recall/SKILL.md": "2091c48e6e986e28", "skills/gsd-mempalace-recall/SKILL.md": "2091c48e6e986e28",
"skills/gsd-milestone-summary/SKILL.md": "da645171ca2299d8", "skills/gsd-milestone-summary/SKILL.md": "da645171ca2299d8",
"skills/gsd-mvp-phase/SKILL.md": "eeb0ac0f88647475", "skills/gsd-mvp-phase/SKILL.md": "eeb0ac0f88647475",

View File

@@ -416,7 +416,7 @@
"skills/gsd-ingest-docs/SKILL.md": "6366644e623ae9e4", "skills/gsd-ingest-docs/SKILL.md": "6366644e623ae9e4",
"skills/gsd-manager/SKILL.md": "8a11a1beb8e35a9c", "skills/gsd-manager/SKILL.md": "8a11a1beb8e35a9c",
"skills/gsd-map-codebase/SKILL.md": "73ab0afb2398de2c", "skills/gsd-map-codebase/SKILL.md": "73ab0afb2398de2c",
"skills/gsd-mempalace-capture/SKILL.md": "64a2ec493092d26e", "skills/gsd-mempalace-capture/SKILL.md": "5ed5ae9c018c89df",
"skills/gsd-mempalace-recall/SKILL.md": "c6e0195e55cd934c", "skills/gsd-mempalace-recall/SKILL.md": "c6e0195e55cd934c",
"skills/gsd-milestone-summary/SKILL.md": "3ea93ccaa0d4d967", "skills/gsd-milestone-summary/SKILL.md": "3ea93ccaa0d4d967",
"skills/gsd-mvp-phase/SKILL.md": "d2f98f1e955797b6", "skills/gsd-mvp-phase/SKILL.md": "d2f98f1e955797b6",

View File

@@ -63,7 +63,7 @@
"command/gsd-ingest-docs.md": "b47c812c247e58a4", "command/gsd-ingest-docs.md": "b47c812c247e58a4",
"command/gsd-manager.md": "86ece154b34b6d1b", "command/gsd-manager.md": "86ece154b34b6d1b",
"command/gsd-map-codebase.md": "9aba6b4eed565912", "command/gsd-map-codebase.md": "9aba6b4eed565912",
"command/gsd-mempalace-capture.md": "a94ca275cbe7134c", "command/gsd-mempalace-capture.md": "8b6bc24d7baf1e9b",
"command/gsd-mempalace-recall.md": "d358cdd89c935877", "command/gsd-mempalace-recall.md": "d358cdd89c935877",
"command/gsd-milestone-summary.md": "86a827271bc647c5", "command/gsd-milestone-summary.md": "86a827271bc647c5",
"command/gsd-mvp-phase.md": "d45fd76cb9cff3ef", "command/gsd-mvp-phase.md": "d45fd76cb9cff3ef",
@@ -453,7 +453,7 @@
"skills/gsd-ingest-docs/SKILL.md": "8f294b4894f782a5", "skills/gsd-ingest-docs/SKILL.md": "8f294b4894f782a5",
"skills/gsd-manager/SKILL.md": "cf40f237b4f20aa7", "skills/gsd-manager/SKILL.md": "cf40f237b4f20aa7",
"skills/gsd-map-codebase/SKILL.md": "73f714297815f74c", "skills/gsd-map-codebase/SKILL.md": "73f714297815f74c",
"skills/gsd-mempalace-capture/SKILL.md": "f960b7b1a8fdf89b", "skills/gsd-mempalace-capture/SKILL.md": "80ffe0ee9b833502",
"skills/gsd-mempalace-recall/SKILL.md": "2091c48e6e986e28", "skills/gsd-mempalace-recall/SKILL.md": "2091c48e6e986e28",
"skills/gsd-milestone-summary/SKILL.md": "175366bb500b5e64", "skills/gsd-milestone-summary/SKILL.md": "175366bb500b5e64",
"skills/gsd-mvp-phase/SKILL.md": "0531d0e907af41ce", "skills/gsd-mvp-phase/SKILL.md": "0531d0e907af41ce",

View File

@@ -357,7 +357,7 @@
"skills/gsd-ns-context/skills/extract-learnings/SKILL.md": "8d38e55e5f8b774b", "skills/gsd-ns-context/skills/extract-learnings/SKILL.md": "8d38e55e5f8b774b",
"skills/gsd-ns-context/skills/graphify/SKILL.md": "ac3661e6e576188b", "skills/gsd-ns-context/skills/graphify/SKILL.md": "ac3661e6e576188b",
"skills/gsd-ns-context/skills/map-codebase/SKILL.md": "cf65e61890448285", "skills/gsd-ns-context/skills/map-codebase/SKILL.md": "cf65e61890448285",
"skills/gsd-ns-context/skills/mempalace-capture/SKILL.md": "40a31ad049374297", "skills/gsd-ns-context/skills/mempalace-capture/SKILL.md": "fa47f3e3fb1264eb",
"skills/gsd-ns-context/skills/mempalace-recall/SKILL.md": "c3f412d5a64f3921", "skills/gsd-ns-context/skills/mempalace-recall/SKILL.md": "c3f412d5a64f3921",
"skills/gsd-ns-ideate/SKILL.md": "4a0d2691054b23e5", "skills/gsd-ns-ideate/SKILL.md": "4a0d2691054b23e5",
"skills/gsd-ns-ideate/skills/capture/SKILL.md": "05fa421c95fbad2d", "skills/gsd-ns-ideate/skills/capture/SKILL.md": "05fa421c95fbad2d",

View File

@@ -329,7 +329,7 @@
"skills/gsd-ns-context/skills/extract-learnings/SKILL.md": "1fc6ba92fc18eb86", "skills/gsd-ns-context/skills/extract-learnings/SKILL.md": "1fc6ba92fc18eb86",
"skills/gsd-ns-context/skills/graphify/SKILL.md": "371ce22f2fe319bc", "skills/gsd-ns-context/skills/graphify/SKILL.md": "371ce22f2fe319bc",
"skills/gsd-ns-context/skills/map-codebase/SKILL.md": "cfc5310b903d594a", "skills/gsd-ns-context/skills/map-codebase/SKILL.md": "cfc5310b903d594a",
"skills/gsd-ns-context/skills/mempalace-capture/SKILL.md": "8524838c851ee44f", "skills/gsd-ns-context/skills/mempalace-capture/SKILL.md": "211b03370a105fae",
"skills/gsd-ns-context/skills/mempalace-recall/SKILL.md": "73b0b7a6301cb214", "skills/gsd-ns-context/skills/mempalace-recall/SKILL.md": "73b0b7a6301cb214",
"skills/gsd-ns-ideate/SKILL.md": "aa399385b735c7c1", "skills/gsd-ns-ideate/SKILL.md": "aa399385b735c7c1",
"skills/gsd-ns-ideate/skills/capture/SKILL.md": "3b7fc696b2107bcf", "skills/gsd-ns-ideate/skills/capture/SKILL.md": "3b7fc696b2107bcf",

View File

@@ -63,7 +63,7 @@
"commands/gsd-ingest-docs.md": "7a3c21ae5d5d133a", "commands/gsd-ingest-docs.md": "7a3c21ae5d5d133a",
"commands/gsd-manager.md": "9f54653a7c589b00", "commands/gsd-manager.md": "9f54653a7c589b00",
"commands/gsd-map-codebase.md": "709e9572953accc6", "commands/gsd-map-codebase.md": "709e9572953accc6",
"commands/gsd-mempalace-capture.md": "5d4556e444acbb90", "commands/gsd-mempalace-capture.md": "be4316828baebe52",
"commands/gsd-mempalace-recall.md": "5ac67fa4b7f2b03b", "commands/gsd-mempalace-recall.md": "5ac67fa4b7f2b03b",
"commands/gsd-milestone-summary.md": "f8fa9c357c08b74b", "commands/gsd-milestone-summary.md": "f8fa9c357c08b74b",
"commands/gsd-mvp-phase.md": "cba67bcb55250e5f", "commands/gsd-mvp-phase.md": "cba67bcb55250e5f",
@@ -400,7 +400,7 @@
"skills/gsd-ns-context/skills/extract-learnings/SKILL.md": "6de7eeaaf4939e5d", "skills/gsd-ns-context/skills/extract-learnings/SKILL.md": "6de7eeaaf4939e5d",
"skills/gsd-ns-context/skills/graphify/SKILL.md": "d54c2b44e8059299", "skills/gsd-ns-context/skills/graphify/SKILL.md": "d54c2b44e8059299",
"skills/gsd-ns-context/skills/map-codebase/SKILL.md": "f48d48b43e2cc4bd", "skills/gsd-ns-context/skills/map-codebase/SKILL.md": "f48d48b43e2cc4bd",
"skills/gsd-ns-context/skills/mempalace-capture/SKILL.md": "40a31ad049374297", "skills/gsd-ns-context/skills/mempalace-capture/SKILL.md": "fa47f3e3fb1264eb",
"skills/gsd-ns-context/skills/mempalace-recall/SKILL.md": "c3f412d5a64f3921", "skills/gsd-ns-context/skills/mempalace-recall/SKILL.md": "c3f412d5a64f3921",
"skills/gsd-ns-ideate/SKILL.md": "4a0d2691054b23e5", "skills/gsd-ns-ideate/SKILL.md": "4a0d2691054b23e5",
"skills/gsd-ns-ideate/skills/capture/SKILL.md": "c848255c134a860f", "skills/gsd-ns-ideate/skills/capture/SKILL.md": "c848255c134a860f",

View File

@@ -0,0 +1,73 @@
'use strict';
// Regression test for #2220: headless mempalace-capture instructed
// `mempalace mine <path> --wing <wing> --room <room>`, but `mine` has no
// --room flag (only `search` does). The fix replaced the flag with a
// detect_room()-based staging approach.
//
// Docs sources:
// CLI reference: https://mempalaceofficial.com/reference/cli.html
// Mining guide: https://mempalaceofficial.com/guide/mining.html
// Config guide: https://mempalaceofficial.com/guide/configuration.html
const { describe, test } = require('node:test');
const assert = require('node:assert/strict');
const fs = require('fs');
const path = require('path');
const ROOT = path.resolve(__dirname, '..');
const SKILL_FILES = [
'skills/gsd-mempalace-capture/SKILL.md',
'commands/gsd/mempalace-capture.md',
];
// Matches actual shell command lines that invoke `mempalace mine`
// (line starts with optional whitespace + "mempalace mine"). Excludes
// prose/instruction text that merely mentions the command.
const MINE_CMD_RE = /^\s*mempalace\s+mine\b/;
describe('#2220 — headless mempalace mine has no --room flag', () => {
for (const rel of SKILL_FILES) {
test(`${rel}: no "mine ... --room" command line`, () => {
const content = fs.readFileSync(path.join(ROOT, rel), 'utf8');
const mineCmdLines = content
.split(/\r?\n/)
.filter((l) => MINE_CMD_RE.test(l));
for (const line of mineCmdLines) {
assert.doesNotMatch(
line,
/--room/,
`${rel}: "mempalace mine" command must not include --room (mine has no such flag per CLI reference). Offending line: ${line.trim()}`,
);
}
});
test(`${rel}: staging instructions present (mempalace.yaml + detect_room)`, () => {
const content = fs.readFileSync(path.join(ROOT, rel), 'utf8');
assert.ok(content.includes('mempalace.yaml'), `${rel}: must reference mempalace.yaml for room taxonomy`);
assert.ok(content.includes('detect_room'), `${rel}: must reference detect_room() as the room-assignment mechanism`);
assert.ok(content.includes('.mempalace-stage'), `${rel}: must use the .mempalace-stage staging directory`);
});
}
test('capture-problems.md: references detect_room staging, not mine --room', () => {
const rel = 'capabilities/mempalace/fragments/capture-problems.md';
const content = fs.readFileSync(path.join(ROOT, rel), 'utf8');
const mineCmdLines = content
.split(/\r?\n/)
.filter((l) => MINE_CMD_RE.test(l));
for (const line of mineCmdLines) {
assert.doesNotMatch(
line,
/--room/,
`${rel}: "mempalace mine" command must not include --room. Offending line: ${line.trim()}`,
);
}
});
test('.gitignore: .mempalace-stage/ is excluded', () => {
const content = fs.readFileSync(path.join(ROOT, '.gitignore'), 'utf8');
assert.ok(content.includes('.mempalace-stage/'), '.gitignore must exclude .planning/.mempalace-stage/');
});
});