From codescope
View and modify CodeScope configuration interactively or via direct commands.
npx claudepluginhub jwadhwa2259/codescope --plugin codescopeThis skill is limited to using the following tools:
You are the settings manager. Help the user view and modify CodeScope configuration.
Manages Claude Code settings including settings.json (user/project/enterprise), permissions, sandbox, plugins, env vars, and tools via docs-management delegation. For config setup and troubleshooting.
Manages settings for Claude Code, Codex CLI, OpenCode: views files, configures models, permissions, sandbox, hooks, env vars, profiles. Restart agent after edits.
Share bugs, ideas, or general feedback.
You are the settings manager. Help the user view and modify CodeScope configuration.
Arguments: $ARGUMENTS
Check $ARGUMENTS for special flags:
--reset: Reset config.yml to defaults (preserving project section)--reset-global: Reset global memory to empty template--set key=value: Direct config change (e.g., --set eval.mode=auto-debug)--rollback-convention: Convention rollback mode--detect-teams: Agent teams re-detection modeParse $ARGUMENTS to determine which mode to use. If no recognized flags are found, proceed to Interactive Mode.
Reset config.yml to defaults while preserving the project section. The project section contains project-specific data (name, type, languages, build_command, test_command, e2e_tool, e2e_command, services, root) that was gathered during onboarding and must not be lost.
Load the current config:
node --import tsx/esm -e "import { loadConfig } from './src/config/loader.js'; const c = loadConfig(process.cwd()); console.log(JSON.stringify(c));"
If config is null (file missing), display: "No config found. Run /codescope:onboard first." and stop.
Extract the project section from the current config. Preserve all project fields: name, type, languages, root, services, build_command, test_command, e2e_tool, e2e_command.
Load DEFAULT_CONFIG:
node --import tsx/esm -e "import { DEFAULT_CONFIG } from './src/config/defaults.js'; console.log(JSON.stringify(DEFAULT_CONFIG));"
Merge: take all sections from DEFAULT_CONFIG but replace the project section with the preserved project section from step 3. This resets agents, orient, execute, verify, eval, conventions, learning, bootstrap, and display to their default values.
Validate the merged config against ConfigSchema:
node --import tsx/esm -e "import { ConfigSchema } from './src/config/schema.js'; const result = ConfigSchema.safeParse(JSON.parse(process.argv[2])); console.log(JSON.stringify({ valid: result.success, error: result.success ? null : result.error.message }));" '{mergedConfigJson}'
If validation fails, display the error and stop without writing. This should not happen if defaults are correct, but safety first.
If valid, write using writeConfig:
node --import tsx/esm -e "import { writeConfig } from './src/config/writer.js'; writeConfig(process.cwd(), JSON.parse(process.argv[2]));" '{mergedConfigJson}'
Display: "Config reset to defaults. Project settings preserved: {project.name} ({project.type}, {languages joined by comma})."
Reset global memory to an empty template. This removes all accumulated cross-project preferences, tech stack tendencies, and gotchas.
Get the global memory path:
node --import tsx/esm -e "import { getGlobalMemoryPath } from './src/utils/paths.js'; console.log(getGlobalMemoryPath());"
Write the empty template to that path using the Write tool:
# CodeScope Global Memory
## Preferences
(None yet.)
## Tech Stack Tendencies
(None yet.)
## Ignore Patterns
(None yet.)
## Cross-Project Gotchas
(None yet.)
*Last updated: {today's date in YYYY-MM-DD format}*
Display: "Global memory reset to empty template at {path}."
Directly change a single config value without going through the interactive menu. Useful for scripting or quick changes.
Parse the key and value from $ARGUMENTS: extract the text after --set , split on the first = sign.
eval.mode, learning.auto_capture, agents.researcher.model, verify.timeout_seconds, conventions.detection_threshold, etc.=.Load the current config:
node --import tsx/esm -e "import { loadConfig } from './src/config/loader.js'; const c = loadConfig(process.cwd()); console.log(JSON.stringify(c));"
If config is null, display: "No config found. Run /codescope:onboard first." and stop.
Navigate the config object by the dot-separated path. Record the old value at that path.
Set the new value with type coercion:
"true" -> boolean true"false" -> boolean false"3", "80", "120") -> numberValidate the modified config against ConfigSchema:
node --import tsx/esm -e "import { ConfigSchema } from './src/config/schema.js'; const result = ConfigSchema.safeParse(JSON.parse(process.argv[2])); console.log(JSON.stringify({ valid: result.success, error: result.success ? null : result.error.message }));" '{modifiedConfigJson}'
If validation fails: display "Invalid value: {error}. Config not changed." and stop.
If valid: write the config:
node --import tsx/esm -e "import { writeConfig } from './src/config/writer.js'; writeConfig(process.cwd(), JSON.parse(process.argv[2]));" '{modifiedConfigJson}'
Display: "Updated {key}: {oldValue} -> {newValue}."
Remove enforced conventions from the conventions-enforced.md file. This allows undoing convention enforcement that was auto-detected or manually confirmed.
Read the conventions-enforced.md file:
cat .claude/codescope/conventions-enforced.md
If the file does not exist, display: "No enforced conventions file found." and stop.
Parse the entries. Each enforced convention is an H3 heading (###) with an adoption percentage and evidence beneath it. Collect them into a numbered list.
If no convention entries are found (file is empty or has only headers), display: "No enforced conventions to rollback." and stop.
Present the numbered list of enforced conventions to the user:
## Enforced Conventions
1. {convention 1 heading}
2. {convention 2 heading}
3. {convention 3 heading}
...
Ask the user: "Select convention(s) to remove (comma-separated numbers, or 'all'):"
Parse the user's selection:
1,3): remove those specific conventionsall: remove all conventionsRewrite conventions-enforced.md without the removed entries. Preserve the file header and any remaining entries.
Display: "Removed {N} convention(s) from enforcement."
Re-detect agent teams availability and offer to enable or disable.
Run the detection:
node --import tsx/esm -e "import { detectAgentTeams } from './src/execution/teams-detector.js'; const r = detectAgentTeams(); console.log(JSON.stringify(r));"
Parse the result. The function returns { available: boolean, reason: string }.
Display the current status:
Based on availability, offer the appropriate action:
If available (currently enabled): Ask: "Disable agent teams? Orient will switch to sequential execution. (yes/no)"
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS from shell profile or ~/.claude/settings.json.If not available (currently disabled): Ask: "Enable agent teams? This enables parallel execution during orient. (yes/no)"
If yes: Run enablement:
node --import tsx/esm -e "import { enableAgentTeams } from './src/execution/teams-detector.js'; console.log(JSON.stringify(enableAgentTeams()));"
Parse the result. If success: "Agent teams enabled in ~/.claude/settings.json. Orient will use parallel execution when the planner identifies independent tasks." If failure: display the error message.
If no: "Agent teams remain disabled. Orient will continue using sequential execution."
When no flags are provided, enter the interactive settings browser.
Load the current config:
node --import tsx/esm -e "import { loadConfig } from './src/config/loader.js'; console.log(JSON.stringify(loadConfig(process.cwd()), null, 2));"
If config is null, display: "No config found. Run /codescope:onboard first." and stop.
Display the section menu:
## CodeScope Settings
Current project: {project.name} ({project.type}, {languages})
Select a section to modify:
1. agents - Agent model assignments
2. orient - Orient pipeline settings
3. execute - Execution settings
4. verify - Verification settings
5. eval - Evaluation settings
6. conventions - Convention detection settings
7. learning - Learning system settings
8. bootstrap - Bootstrap settings
9. display - Display preferences
10. [Convention rollback]
11. [Agent teams detection]
12. [Reset config to defaults]
13. [Reset global memory]
14. [Done]
Wait for the user to select an option (1-14).
If the user selects 10-13, execute the corresponding handler (--rollback-convention, --detect-teams, --reset, --reset-global) and return to the menu afterward.
If the user selects 14 (Done), display "Settings saved. Goodbye." and stop.
Based on the user's section selection (1-9), present the section's current values and offer editing.
For each field in the selected section:
{field}: {currentValue}eval.mode, orient.verbosity, conventions.strictness, display.agent_activity): show allowed values from the Zod schemaverify.auto_smoke, learning.auto_capture): show true/falseverify.timeout_seconds, conventions.detection_threshold): show current value with any min/max constraintseval.criteria, agents.*, learning.confidence_decay): display each sub-fieldExample display for the eval section:
## eval - Evaluation settings
- mode: interactive (allowed: interactive, auto-debug, auto-skip-minor)
- auto_debug_max_cycles: 3 (number, 1-10)
- criteria:
- scope_compliance: true (boolean)
- convention_adherence: true (boolean)
- completeness: true (boolean)
- correctness: true (boolean)
Ask: "Enter field name to change (or 'back' to return to sections):"
When the user selects a field:
After each change:
Validate the full config against ConfigSchema using safeParse:
node --import tsx/esm -e "import { ConfigSchema } from './src/config/schema.js'; const result = ConfigSchema.safeParse(JSON.parse(process.argv[2])); console.log(JSON.stringify({ valid: result.success, error: result.success ? null : result.error.message }));" '{updatedConfigJson}'
If valid: write the config using writeConfig:
node --import tsx/esm -e "import { writeConfig } from './src/config/writer.js'; writeConfig(process.cwd(), JSON.parse(process.argv[2]));" '{updatedConfigJson}'
Display: "Updated {section}.{field}: {oldValue} -> {newValue}."
If invalid: display the Zod error message and revert the change. Do not write invalid config to disk.
Return to the section editor. The user can make more changes or select 'back' to return to the main menu.