fix(3735): add surface to PROFILES.core (restore ADR-0011 expand contract) (#3744)
* test(3735): add failing test that PROFILES.core includes surface
Regression test asserting that resolveProfile({ modes: ['core'] }) includes
'surface' in its transitive closure — the ADR-0011 contract that --profile=core
users can expand via /gsd:surface enable <cluster>. Also updates stale
hardcoded skill-count assertions (7→8) across install-minimal*.test.cjs and
install-profiles-resolve.test.cjs to reflect the correct post-fix baseline.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(3735): add 'surface' to PROFILES.core to restore ADR-0011 expand contract
PROFILES.core omitted 'surface', silently breaking the documented contract
in ADR-0011 that --profile=core users can expand their skill surface via
/gsd:surface enable <cluster>. The sub-command is only available if surface.md
is staged — which requires it to appear in the resolved set for the core profile.
Added 'surface' to both PROFILES.core and PROFILES.standard (standard is a
documented superset of core; omitting it from standard would break the
"standard must include all core skills" invariant and the resolveProfile tests).
The MINIMAL_SKILL_ALLOWLIST back-compat shim is derived from PROFILES.core so
it picks up surface automatically, ensuring --minimal and --core-only installs
also stage surface.md.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* chore(3735): update changeset to reference PR #3744
The fix commit landed with the linked-issue number as the pr: field
placeholder. Updating to the actual PR number now that the PR is open.
* docs(install-profiles): fix stale 'six skills' count in module header comment
After #3735 added surface to PROFILES.core the skill count became eight,
but the module-level comment still said "six skills covering the main project
loop". Update the description to reflect the correct count and reference the
ADR-0011 expand contract that surface fulfils.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
49
tests/bug-3735-profiles-core-includes-surface.test.cjs
Normal file
49
tests/bug-3735-profiles-core-includes-surface.test.cjs
Normal file
@@ -0,0 +1,49 @@
|
||||
'use strict';
|
||||
/**
|
||||
* Regression test for #3735: PROFILES.core must include 'surface' in its
|
||||
* resolved closure so that --profile=core users can expand via
|
||||
* /gsd:surface enable <cluster> — the advertised use-case from ADR-0011.
|
||||
*
|
||||
* Stage 2 (RED): This test must fail before the fix is applied.
|
||||
* Stage 3 (GREEN): This test must pass after 'surface' is added to PROFILES.core.
|
||||
*/
|
||||
|
||||
const { test, describe } = require('node:test');
|
||||
const assert = require('node:assert/strict');
|
||||
const path = require('path');
|
||||
|
||||
const {
|
||||
PROFILES,
|
||||
resolveProfile,
|
||||
loadSkillsManifest,
|
||||
} = require('../get-shit-done/bin/lib/install-profiles.cjs');
|
||||
|
||||
const REAL_COMMANDS_DIR = path.join(__dirname, '..', 'commands', 'gsd');
|
||||
|
||||
describe('PROFILES.core — ADR-0011 expand contract', () => {
|
||||
test("PROFILES.core includes 'surface' so users can expand via /gsd:surface enable", () => {
|
||||
const manifest = loadSkillsManifest(REAL_COMMANDS_DIR);
|
||||
const result = resolveProfile({ modes: ['core'], manifest });
|
||||
|
||||
assert.ok(result.skills instanceof Set,
|
||||
'resolveProfile must return a skills Set for core profile');
|
||||
|
||||
// The primary assertion: surface must be in the resolved closure.
|
||||
// ADR-0011 documents that --profile=core users expand via /gsd:surface enable <cluster>.
|
||||
// That sub-command is only available if surface.md is staged — which requires it to be
|
||||
// in the resolved set for the core profile.
|
||||
assert.ok(result.skills.has('surface'),
|
||||
`PROFILES.core resolved closure must include 'surface'; got: [${[...result.skills].sort().join(', ')}]`);
|
||||
});
|
||||
|
||||
// Counter-test: 'forensics' is NOT in core — proves the assertion above is selective,
|
||||
// not vacuously true for all skills.
|
||||
test("PROFILES.core does NOT include 'forensics' (selective assertion counter-check)", () => {
|
||||
const manifest = loadSkillsManifest(REAL_COMMANDS_DIR);
|
||||
const result = resolveProfile({ modes: ['core'], manifest });
|
||||
|
||||
assert.ok(result.skills instanceof Set);
|
||||
assert.ok(!result.skills.has('forensics'),
|
||||
`'forensics' should NOT be in core closure — it is a specialist skill, not a core loop skill`);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user