User Customization Command¶
Input Validation¶
@.claude/context/AGENT_INPUT_VALIDATION.md
Usage¶
/amplihack:customize <action> [preference] [value]
Actions¶
set - Set a preference¶
/amplihack:customize set <preference> <value>
Sets or updates a user preference. Examples:
/amplihack:customize set verbosity concise/amplihack:customize set communication_style technical/amplihack:customize set priority_type bugs
show - Display current preferences¶
/amplihack:customize show
Shows all current user preferences and their values.
reset - Reset preferences¶
/amplihack:customize reset [preference]
Resets a specific preference or all preferences to defaults.
/amplihack:customize reset verbosity- resets verbosity to default/amplihack:customize reset- resets all preferences
learn - Learn from feedback¶
/amplihack:customize learn <feedback>
Captures user feedback to improve future interactions.
/amplihack:customize learn "Always include unit tests when creating new functions"/amplihack:customize learn "Prefer async/await over callbacks"
list-workflows - List available workflows¶
/amplihack:customize list-workflows
Displays all available workflows in .claude/workflow/ directory with descriptions.
Example output:
Available Workflows:
1. DEFAULT_WORKFLOW
Description: Standard workflow for most development tasks
Location: .claude/workflow/DEFAULT_WORKFLOW.md
Steps: 15
Best for: Features, bug fixes, refactoring, day-to-day work
2. CONSENSUS_WORKFLOW
Description: Enhanced workflow with consensus mechanisms
Location: .claude/workflow/CONSENSUS_WORKFLOW.md
Steps: 15
Best for: Critical tasks, ambiguous requirements, architectural changes
Current Selection: DEFAULT_WORKFLOW
show-workflow - Display workflow content¶
/amplihack:customize show-workflow <workflow_name>
Shows the content of a specific workflow file.
/amplihack:customize show-workflow DEFAULT_WORKFLOW/amplihack:customize show-workflow CONSENSUS_WORKFLOW
set-workflow - Switch to a different workflow¶
/amplihack:customize set-workflow <workflow_name>
Changes the active workflow in USER_PREFERENCES.md.
/amplihack:customize set-workflow CONSENSUS_WORKFLOW- Switch to consensus workflow/amplihack:customize set-workflow DEFAULT_WORKFLOW- Switch back to default/amplihack:customize set-workflow MY_CUSTOM_WORKFLOW- Switch to custom workflow
Available Preferences¶
verbosity¶
- concise: Brief, to-the-point responses
- balanced: Standard level of detail (default)
- detailed: Comprehensive explanations
communication_style¶
- formal: Professional, structured communication
- casual: Conversational, friendly tone
- technical: Direct, code-focused responses (default)
update_frequency¶
- minimal: Only essential updates
- regular: Standard progress updates (default)
- frequent: Detailed step-by-step updates
priority_type¶
- features: Focus on new functionality
- bugs: Prioritize bug fixes
- performance: Emphasize optimization
- security: Security-first approach
- balanced: No specific priority (default)
collaboration_style¶
- independent: Work autonomously, minimal interaction
- interactive: Regular check-ins and confirmations (default)
- guided: Step-by-step with user approval
auto_update¶
Controls automatic updating of .claude/ directory when version mismatch detected:
- always: Always auto-update without prompting
- never: Never auto-update (just show warning)
- ask: Prompt user each time (default)
preferred_languages¶
Comma-separated list of preferred programming languages/frameworks Example: python,typescript,react
coding_standards¶
Custom coding standards or guidelines (can be multi-line)
workflow_preferences¶
Custom workflow requirements or gates
consensus_depth¶
Controls the depth of consensus mechanisms when using CONSENSUS_WORKFLOW:
- quick: 2 agents, 2 rounds (faster, less thorough)
- balanced: 3-4 agents, 3 rounds (recommended, good balance)
- comprehensive: 5+ agents, 4+ rounds (slower, most thorough)
Use set command to change:
/amplihack:customize set consensus_depth quick/amplihack:customize set consensus_depth balanced/amplihack:customize set consensus_depth comprehensive
Note: Workflow selection (DEFAULT_WORKFLOW vs CONSENSUS_WORKFLOW) is managed via dedicated workflow commands (list-workflows, show-workflow, set-workflow).
Implementation¶
This command is a prompt that instructs Claude Code to use its native tools (Read, Edit, Write) to manage the USER_PREFERENCES.md file.
When you invoke this command, follow these steps:
For "set" action:¶
- Use the Read tool to read
.claude/context/USER_PREFERENCES.md - Validate the preference name and value against the available preferences list above
- Use the Edit tool to update the preference section in USER_PREFERENCES.md:
- Find the section matching the preference (e.g., "### Verbosity")
- Replace the value on the next line with the new value
- Use the Edit tool to update the "Last updated" timestamp at the bottom
- Confirm the change to the user
Example for setting verbosity to concise:
Use Edit tool on .claude/context/USER_PREFERENCES.md:
old_string: "### Verbosity\n\nbalanced"
new_string: "### Verbosity\n\nconcise"
Then update timestamp:
old_string: "_Last updated: [old timestamp]_"
new_string: "_Last updated: [current timestamp]_"
For "show" action:¶
- Use the Read tool to read
.claude/context/USER_PREFERENCES.md - Display the contents to the user in a formatted manner
For "reset" action:¶
If resetting a specific preference:
- Use the Read tool to read
.claude/context/USER_PREFERENCES.md - Use the Edit tool to replace the preference value with its default
- Update the timestamp
If resetting all preferences:
- Use the Write tool to overwrite
.claude/context/USER_PREFERENCES.mdwith the default template (see below)
Default template structure:
# User Preferences
**MANDATORY ENFORCEMENT**: All agents and Claude Code MUST strictly follow these preferences. These are NOT advisory - they are REQUIRED behavior that CANNOT be optimized away or ignored.
This file contains user-specific preferences and customizations that persist across sessions.
## Core Preferences
### Verbosity
balanced
### Communication Style
technical
### Update Frequency
regular
### Priority Type
balanced
### Collaboration Style
interactive
### Preferred Languages
(not set)
### Coding Standards
(not set)
### Workflow Preferences
(not set)
## Learned Patterns
<!-- User feedback and learned behaviors will be added here -->
---
_Last updated: [current timestamp]_
For "learn" action:¶
- Use the Read tool to read
.claude/context/USER_PREFERENCES.md - Extract the feedback text from the command arguments
- Use the Edit tool to add the feedback to the "Learned Patterns" section:
- Insert after the "" comment
- Format as:
### [timestamp]\n\n[feedback text]\n\n - Update the "Last updated" timestamp
Example:
Use Edit tool on .claude/context/USER_PREFERENCES.md:
old_string: "## Learned Patterns\n\n<!-- User feedback and learned behaviors will be added here -->"
new_string: "## Learned Patterns\n\n<!-- User feedback and learned behaviors will be added here -->\n\n### [2025-09-29 10:30:00]\n\nAlways include unit tests when creating new functions\n"
For "list-workflows" action:¶
- Use the Bash tool to list workflow files:
- For each workflow file found, use the Read tool to extract:
- Workflow name (from filename)
- Title (from first # heading)
- Description (from first paragraph after "How This Workflow Works")
- Number of steps (count lines starting with "### Step")
- Use the Read tool on
.claude/context/USER_PREFERENCES.mdto get current selection: - Find line "Selected Workflow:"
- Extract workflow name
- Format and display results as shown in the command documentation above
- Highlight current selection
For "show-workflow" action:¶
- Validate workflow_name argument is provided
- If missing: Display error and show available workflows (use list-workflows logic)
- Construct absolute file path:
.claude/workflow/{workflow_name}.md - Use the Read tool to read the workflow file
- If file not found:
- Show error message
- List available workflows
- Show how to create custom workflow from template
- If file found: Display full contents to user
For "set-workflow" action:¶
- Validate workflow_name argument is provided
- If missing: Display error and show usage
- Construct workflow file path:
.claude/workflow/{workflow_name}.md - Verify file exists using Read tool (attempt to read)
- If not found: Show error with available workflows list
- Use the Read tool to read
.claude/context/USER_PREFERENCES.md - Use the Edit tool to update workflow selection:
- Update timestamp at bottom of file:
- Confirm change to user with helpful message including:
- Confirmation of workflow change
- How this affects /ultrathink
- How to view the workflow
- How to learn more
Validation Rules¶
Before making changes, validate:
- Preference names must match exactly (case-insensitive matching is acceptable):
-
verbosity, communication_style, update_frequency, priority_type, collaboration_style, auto_update, preferred_languages, coding_standards, workflow_preferences, consensus_depth
-
Enumerated values must match allowed options:
- verbosity: concise, balanced, detailed
- communication_style: formal, casual, technical
- update_frequency: minimal, regular, frequent
- priority_type: features, bugs, performance, security, balanced
- collaboration_style: independent, interactive, guided
- auto_update: always, never, ask
-
consensus_depth: quick, balanced, comprehensive
-
Free-form values (preferred_languages, coding_standards, workflow_preferences) can be any non-empty string
-
If validation fails, provide clear error message and do NOT modify the file
Error Handling¶
- If
.claude/context/USER_PREFERENCES.mddoesn't exist, create it with the default template - If preference name is invalid, list valid preferences
- If value is invalid for enumerated preference, list valid values
- If file operations fail, report the error clearly
- Never leave the file in a partially edited state
Integration¶
This command integrates with the project by:
- Storing preferences in
.claude/context/USER_PREFERENCES.md - Preferences are loaded via CLAUDE.md imports at session start
- Agents and workflows reference these preferences (MANDATORY enforcement)
- Learned patterns accumulate over time
Priority Hierarchy¶
Preferences follow this priority hierarchy (highest to lowest):
- USER_PREFERENCES.md (HIGHEST - MANDATORY)
- Task-specific user instructions
- Project philosophy (CLAUDE.md, PHILOSOPHY.md)
- Default Claude Code behavior (LOWEST)
Notes¶
- Preferences persist across sessions
- The preferences file is imported automatically in CLAUDE.md
- Agents MUST check preferences and apply them strictly
- Learned patterns help improve future interactions
- Use simple, direct tool invocations - no complex abstractions