fix(#2641): treat absent capture_artifacts as enabled (schema default) (#2982)

* test(#2641): add regression for mempalace-capture gate default inversion

* fix(#2641): treat absent capture_artifacts as enabled (schema default)

The gate used `capture_artifacts !== true` which treated absent (undefined)
as disabled — inverted from the capability registry's declared default of
true. Changed to `capture_artifacts === false` (disabled only on explicit
false), matching the sibling gsd-mempalace-recall skill's correct pattern.

* chore(#2641): add changeset fragment

* chore(#2641): backfill changeset PR number 2982

---------

Co-authored-by: sim <sim@local>
This commit is contained in:
Tom Boucher
2026-08-01 15:23:58 -04:00
committed by GitHub
parent 6c96b13cfe
commit 4df6d884b3
4 changed files with 49 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
---
type: Fixed
pr: 2982
---
**MemPalace capture no longer silently disables itself when `capture_artifacts` is unset** — the skill gate used `!== true` (treating absent as disabled), but the capability schema defaults to enabled. Fixed to `=== false` (disabled only on explicit false). (#2641)

View File

@@ -25,7 +25,7 @@ Then proceed to Step 1.
Check whether the MemPalace capability is enabled by reading `.planning/config.json` directly with the Read tool.
1. Read `.planning/config.json` with the Read tool.
2. If the file does not exist, or `config.mempalace` is absent, or `config.mempalace.enabled !== true`, or `config.mempalace.capture_artifacts !== true`: display the disabled message and **STOP**.
2. If the file does not exist, or `config.mempalace` is absent, or `config.mempalace.enabled !== true`, or `config.mempalace.capture_artifacts === false`: display the disabled message and **STOP**.
3. Otherwise proceed to Step 2.
**Disabled message:**

View File

@@ -25,7 +25,7 @@ Then proceed to Step 1.
Check whether the MemPalace capability is enabled by reading `.planning/config.json` directly with the Read tool.
1. Read `.planning/config.json` with the Read tool.
2. If the file does not exist, or `config.mempalace` is absent, or `config.mempalace.enabled !== true`, or `config.mempalace.capture_artifacts !== true`: display the disabled message and **STOP**.
2. If the file does not exist, or `config.mempalace` is absent, or `config.mempalace.enabled !== true`, or `config.mempalace.capture_artifacts === false`: display the disabled message and **STOP**.
3. Otherwise proceed to Step 2.
**Disabled message:**

View File

@@ -0,0 +1,42 @@
// allow-test-rule: source-text-is-the-product (see #2641)
// The mempalace-capture skill gates on config.mempalace.capture_artifacts.
// The capability registry declares this key with default: true, so an absent
// key must be treated as enabled. The skill previously used `!== true` which
// treated absent (undefined) as disabled — inverted from the schema default.
// The fix changes it to `=== false` (disabled only on explicit false).
'use strict';
const { describe, test } = require('node:test');
const assert = require('node:assert/strict');
const fs = require('node:fs');
const path = require('node:path');
const SKILL = path.join(__dirname, '..', 'skills', 'gsd-mempalace-capture', 'SKILL.md');
const COMMAND = path.join(__dirname, '..', 'commands', 'gsd', 'mempalace-capture.md');
describe('#2641 — mempalace-capture gate treats absent capture_artifacts as enabled', () => {
test('SKILL.md uses === false (disabled only on explicit false), not !== true', () => {
const text = fs.readFileSync(SKILL, 'utf8');
assert.ok(
text.includes('capture_artifacts === false'),
'SKILL.md must use capture_artifacts === false (defaults to enabled when absent, matching the schema) — not !== true (#2641)',
);
assert.ok(
!text.includes('capture_artifacts !== true'),
'SKILL.md must NOT use the inverted capture_artifacts !== true check (#2641)',
);
});
test('commands/gsd/mempalace-capture.md uses === false, not !== true', () => {
const text = fs.readFileSync(COMMAND, 'utf8');
assert.ok(
text.includes('capture_artifacts === false'),
'commands/gsd/mempalace-capture.md must use capture_artifacts === false (#2641)',
);
assert.ok(
!text.includes('capture_artifacts !== true'),
'commands/gsd/mempalace-capture.md must NOT use the inverted check (#2641)',
);
});
});