fix(config): allow intel.enabled in config-set whitelist (#2021)
`intel.enabled` is the documented opt-in for the intel subsystem (see commands/gsd/intel.md and docs/CONFIGURATION.md), but it was missing from VALID_CONFIG_KEYS in config.cjs, so the canonical command failed: $ gsd-tools config-set intel.enabled true Error: Unknown config key: "intel.enabled" Add the key to the whitelist, document it under a new "Intel Fields" section in planning-config.md alongside the other namespaced fields, and cover it with a config-set test. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -36,6 +36,7 @@ const VALID_CONFIG_KEYS = new Set([
|
||||
'project_code', 'phase_naming',
|
||||
'manager.flags.discuss', 'manager.flags.plan', 'manager.flags.execute',
|
||||
'response_language',
|
||||
'intel.enabled',
|
||||
]);
|
||||
|
||||
/**
|
||||
|
||||
@@ -310,6 +310,14 @@ Set via `learnings.*` namespace (e.g., `"learnings": { "max_inject": 5 }`). Used
|
||||
|-----|------|---------|----------------|-------------|
|
||||
| `learnings.max_inject` | number | `10` | Any positive integer | Maximum number of global learning entries to inject into agent prompts per session |
|
||||
|
||||
### Intel Fields
|
||||
|
||||
Set via `intel.*` namespace (e.g., `"intel": { "enabled": true }`). Controls the queryable codebase intelligence system consumed by `/gsd-intel`.
|
||||
|
||||
| Key | Type | Default | Allowed Values | Description |
|
||||
|-----|------|---------|----------------|-------------|
|
||||
| `intel.enabled` | boolean | `false` | `true`, `false` | Enable queryable codebase intelligence system. When `true`, `/gsd-intel` commands build and query a JSON index in `.planning/intel/`. |
|
||||
|
||||
### Manager Fields
|
||||
|
||||
Set via `manager.*` namespace (e.g., `"manager": { "flags": { "discuss": "--auto" } }`).
|
||||
|
||||
@@ -252,6 +252,16 @@ describe('config-set command', () => {
|
||||
assert.strictEqual(config.git.base_branch, 'master');
|
||||
});
|
||||
|
||||
test('sets intel.enabled to opt into the intel subsystem', () => {
|
||||
writeConfig(tmpDir, {});
|
||||
|
||||
const result = runGsdTools('config-set intel.enabled true', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const config = readConfig(tmpDir);
|
||||
assert.strictEqual(config.intel.enabled, true);
|
||||
});
|
||||
|
||||
test('errors when no key path provided', () => {
|
||||
const result = runGsdTools('config-set', tmpDir);
|
||||
assert.strictEqual(result.success, false);
|
||||
|
||||
Reference in New Issue
Block a user