
Nav Profile
- 2 installs
- 32 repo stars
- Updated January 23, 2026
- dkyazzentwatwa/supernavigator
Stores and auto-learns user preferences and past corrections so the agent adapts to your working style across sessions.
About
Manages persistent user preferences and corrections so the agent adapts to a developer's working style across sessions. A developer uses it to save preferences or auto-learn from corrections.
- Stores user preferences in .agent/.user-profile.json across sessions
- Auto-learns from session corrections for bilateral modeling
Nav Profile by the numbers
- 2 all-time installs (skills.sh)
- Ranked #2,409 of 3,280 Productivity & Planning skills by installs in the Skillselion catalog
- Data as of Jul 29, 2026 (Skillselion catalog sync)
npx skills add https://github.com/dkyazzentwatwa/supernavigator --skill nav-profileAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 2 |
|---|---|
| repo stars | ★ 32 |
| Last updated | January 23, 2026 |
| Repository | dkyazzentwatwa/supernavigator ↗ |
What it does
Stores and auto-learns user preferences and past corrections so the agent adapts to your working style across sessions.
Files
Navigator Profile Skill
Manage user preferences for bilateral modeling - enabling Claude to understand and adapt to your working style, technical preferences, and past corrections.
Why This Exists (Theory of Mind)
Based on Riedl & Weidmann 2025 research on Human-AI Synergy:
- Theory of Mind (ToM) is the key differentiator in human-AI collaboration success
- Users with higher ToM achieve 23-29% performance boost
- Bilateral modeling completes the ToM loop: Claude models you, you model Claude
This skill enables Claude to:
- Remember your preferences across sessions
- Learn from corrections without you repeating them
- Adapt communication style to your level
- Build a persistent mental model of YOU
When to Invoke
Auto-invoke when:
- User says "save my preferences", "remember I like..."
- User says "update my profile", "change my preference for..."
- After detecting a correction pattern (auto-learn mode)
- User says "show my profile", "what do you know about me?"
DO NOT invoke if:
- User is creating a context marker (use nav-marker)
- User wants session-specific preferences only
- User explicitly says "just for this session"
Profile Location
.agent/.user-profile.json (git-ignored, session-persistent)
Execution Steps
Step 1: Determine Action
SHOW (viewing profile):
User: "Show my profile", "What do you remember about me?"
→ Display current profileUPDATE (explicit preference):
User: "Remember I prefer functional style", "Save that I like concise explanations"
→ Update specific preferenceLEARN (auto-detect correction):
[Internal trigger after correction detected]
→ Extract and save correction patternRESET (clear profile):
User: "Reset my profile", "Clear my preferences"
→ Confirm and delete profileStep 2: Load or Initialize Profile
Check if profile exists:
if [ -f ".agent/.user-profile.json" ]; then
echo "Profile exists"
else
echo "No profile found, will create new"
fiInitialize new profile (if not exists):
{
"version": "1.0",
"created": "{YYYY-MM-DD}",
"last_updated": "{YYYY-MM-DD}",
"preferences": {
"communication": {
"verbosity": "balanced",
"confirmation_threshold": "high-stakes",
"explanation_style": "examples"
},
"technical": {
"preferred_frameworks": [],
"code_style": "mixed",
"testing_preference": "tdd"
},
"workflow": {
"autonomous_commits": true,
"auto_compact_threshold": 80,
"marker_before_risky": true
}
},
"corrections": [],
"goals": []
}Step 3A: Show Profile (If SHOW Action)
Display current profile:
Your Navigator Profile
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Communication Preferences:
- Verbosity: {verbosity}
- Confirmation: {confirmation_threshold} (when to verify understanding)
- Explanations: {explanation_style}
Technical Preferences:
- Preferred frameworks: {frameworks or "none set"}
- Code style: {code_style}
- Testing: {testing_preference}
Workflow Preferences:
- Autonomous commits: {autonomous_commits}
- Auto-compact at: {auto_compact_threshold}% context
- Markers before risky changes: {marker_before_risky}
Learned Corrections ({count}):
{recent_corrections_list}
Active Goals ({count}):
{active_goals_list}
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Last updated: {last_updated}Step 3B: Update Profile (If UPDATE Action)
Parse preference from user input:
User: "Remember I prefer functional style"
→ Category: technical
→ Field: code_style
→ Value: functional
User: "I like concise explanations"
→ Category: communication
→ Field: verbosity
→ Value: conciseMap common expressions to profile fields:
| User Says | Category | Field | Value |
|---|---|---|---|
| "concise", "brief", "short" | communication | verbosity | concise |
| "detailed", "thorough" | communication | verbosity | detailed |
| "always confirm" | communication | confirmation_threshold | always |
| "skip confirmations" | communication | confirmation_threshold | never |
| "functional style" | technical | code_style | functional |
| "OOP style" | technical | code_style | oop |
| "prefer React" | technical | preferred_frameworks | [append "react"] |
| "prefer Express" | technical | preferred_frameworks | [append "express"] |
Update and save:
// Update specific field
profile.preferences[category][field] = value;
profile.last_updated = "{YYYY-MM-DD}";
// Write to file
Write(".agent/.user-profile.json", JSON.stringify(profile, null, 2));Confirm update:
✅ Profile updated!
Changed: {category}.{field}
From: {old_value}
To: {new_value}
This will affect future sessions.Step 3C: Auto-Learn Correction (If LEARN Action) [AUTO-TRIGGER]
IMPORTANT: This action triggers automatically - no explicit skill invocation needed.
When to detect corrections (monitor ALL conversations):
- User says "No, I meant...", "Actually...", "Not X, use Y"
- User repeats a correction they gave before
- User shows frustration at repeated mistake
Trigger patterns to watch for:
"No, ..." → Direct correction
"I said ..." → Repeated instruction
"Actually, ..." → Clarification
"Not X, Y" → Substitution
"Always use ..." → Rule establishment
"Never do ..." → Anti-pattern
"I prefer ..." → PreferenceWhen detected:
User: "No, I meant plural /users not /user"
→ Correction detected: REST naming convention preference
→ Auto-save to profile (silent)Extract correction pattern:
correction = {
"date": "{YYYY-MM-DD}",
"context": "{what we were doing}",
"original": "{what I said/generated}",
"corrected_to": "{what user wanted}",
"pattern": "{generalized rule}",
"confidence": "high|medium|low"
}Add to corrections list:
profile.corrections.push(correction);
// Keep last 20 corrections (rolling window)
if (profile.corrections.length > 20) {
profile.corrections.shift();
}Silently acknowledge (don't interrupt flow):
[Internal log: Correction saved to profile]Periodically surface learnings (every 5 corrections):
📚 I've learned from your corrections:
- REST endpoints should use plural nouns
- You prefer functional components over class components
- TypeScript strict mode is required
These will be applied in future sessions.Step 3D: Reset Profile (If RESET Action)
Confirm before delete:
⚠️ This will delete your Navigator profile:
- {X} saved preferences
- {Y} learned corrections
- {Z} active goals
This cannot be undone.
Delete profile? [y/N]If confirmed:
rm .agent/.user-profile.jsonConfirm deletion:
✅ Profile deleted
Future sessions will start fresh.
To rebuild, use "Save my preferences" as you work.Step 4: Update Goals (Optional)
If user mentions a goal:
User: "I'm working on the OAuth feature"
→ Add/update goal in profileGoal structure:
{
"name": "oauth-feature",
"started": "{YYYY-MM-DD}",
"context": "OAuth implementation for user login",
"status": "in-progress",
"last_mentioned": "{YYYY-MM-DD}"
}Goal cleanup (auto-archive goals not mentioned in 7 days):
// Move to completed if not mentioned recently
goals.forEach(goal => {
if (daysSince(goal.last_mentioned) > 7) {
goal.status = "completed-or-abandoned";
}
});Step 5: Confirm Action
For explicit actions (SHOW, UPDATE, RESET): Show confirmation message.
For auto-learn (LEARN): Silent acknowledgment, periodic summaries.
---
Profile Schema Reference
{
"version": "1.0",
"created": "2025-12-09",
"last_updated": "2025-12-09",
"preferences": {
"communication": {
"verbosity": "concise|balanced|detailed",
"confirmation_threshold": "always|high-stakes|never",
"explanation_style": "examples|theory|both"
},
"technical": {
"preferred_frameworks": ["react", "express", "etc"],
"code_style": "functional|oop|mixed",
"testing_preference": "tdd|bdd|manual"
},
"workflow": {
"autonomous_commits": true|false,
"auto_compact_threshold": 70-90,
"marker_before_risky": true|false
}
},
"corrections": [
{
"date": "2025-12-09",
"context": "creating API endpoint",
"original": "Created /user endpoint",
"corrected_to": "Should be /users (plural)",
"pattern": "REST endpoints use plural nouns",
"confidence": "high"
}
],
"goals": [
{
"name": "oauth-feature",
"started": "2025-12-07",
"context": "OAuth implementation for user login",
"status": "in-progress",
"last_mentioned": "2025-12-09"
}
]
}---
Integration with Other Skills
nav-start (Session Start)
Loads profile automatically:
### Step 3.5: Load User Profile
If `.agent/.user-profile.json` exists:
- Load preferences into context
- Apply confirmation threshold
- Note active goals
- Show: "Loaded preferences from profile"nav-marker (Context Markers)
Preserves profile reference:
## Profile State
- Preferences loaded: ✅
- Corrections this session: {count}
- Goals active: {goal_names}All ToM Checkpoints
Respect profile settings:
// Before showing verification checkpoint
if (profile.preferences.communication.confirmation_threshold === "never") {
// Skip verification
} else if (profile.preferences.communication.confirmation_threshold === "high-stakes") {
// Only verify for complex operations
}---
Auto-Learn Triggers
Correction patterns to detect:
| User Pattern | Extracted Learning |
|---|---|
| "No, I meant..." | Direct correction |
| "Actually, prefer..." | Preference correction |
| "Not X, use Y" | Substitution correction |
| "Always do X" | Rule establishment |
| "Never do Y" | Anti-pattern |
| "I like when you..." | Positive preference |
| "Stop doing X" | Negative preference |
Confidence scoring:
- High: Explicit correction with reasoning
- Medium: Correction without explanation
- Low: Implicit preference from behavior
---
Privacy & Data
Profile is:
- Git-ignored (
.agent/.user-profile.json) - Local only (not synced)
- User-controlled (can delete anytime)
- Session-persistent (survives context clears)
Profile does NOT store:
- Code snippets
- File contents
- Conversation history
- Sensitive data
---
Success Criteria
Profile management succeeds when:
- [ ] Profile loads at session start
- [ ] Preferences affect behavior (verbosity, confirmations)
- [ ] Corrections persist across sessions
- [ ] Auto-learn captures patterns silently
- [ ] Goals track user's current focus
- [ ] Reset cleanly removes all data
---
Best Practices
Good profile usage:
- "Remember I prefer concise explanations" (clear preference)
- "Save that I use functional components" (specific)
- "Show my profile" (verify what's stored)
Avoid:
- Storing sensitive information
- Over-correcting (let auto-learn work)
- Resetting frequently (defeats purpose)
---
This skill enables bilateral Theory of Mind - Claude understanding you as well as you understanding Claude 🧠
#!/usr/bin/env python3
"""
Preference Extractor - Extract preferences and corrections from user input
Parses natural language to identify preference updates and correction patterns.
"""
import json
import sys
import argparse
import re
from typing import Optional, Dict, Tuple
# Preference mappings: user phrases -> (category, field, value)
PREFERENCE_PATTERNS = {
# Communication - Verbosity
r'\b(concise|brief|short)\b': ('communication', 'verbosity', 'concise'),
r'\b(detailed|thorough|verbose)\b': ('communication', 'verbosity', 'detailed'),
r'\bbalanced\b': ('communication', 'verbosity', 'balanced'),
# Communication - Confirmation threshold
r'\balways confirm\b': ('communication', 'confirmation_threshold', 'always'),
r'\b(skip confirmations?|no confirmations?)\b': ('communication', 'confirmation_threshold', 'never'),
r'\bhigh.?stakes?\s*(only)?\b': ('communication', 'confirmation_threshold', 'high-stakes'),
# Communication - Explanation style
r'\bshow\s*examples?\b': ('communication', 'explanation_style', 'examples'),
r'\btheory\s*(first|based)?\b': ('communication', 'explanation_style', 'theory'),
r'\bboth\s*(examples?\s*(and|&)\s*theory|theory\s*(and|&)\s*examples?)\b': ('communication', 'explanation_style', 'both'),
# Technical - Code style
r'\bfunctional\s*(style|programming)?\b': ('technical', 'code_style', 'functional'),
r'\b(oop|object.?oriented)\s*(style|programming)?\b': ('technical', 'code_style', 'oop'),
r'\bmixed\s*(style)?\b': ('technical', 'code_style', 'mixed'),
# Technical - Testing
r'\btdd\b': ('technical', 'testing_preference', 'tdd'),
r'\bbdd\b': ('technical', 'testing_preference', 'bdd'),
r'\bmanual\s*test(ing)?\b': ('technical', 'testing_preference', 'manual'),
# Workflow - Autonomous commits
r'\bautonomous\s*commits?\b': ('workflow', 'autonomous_commits', True),
r'\bask\s*before\s*commit(ting)?\b': ('workflow', 'autonomous_commits', False),
r'\bno\s*auto\s*commit\b': ('workflow', 'autonomous_commits', False),
# Workflow - Markers
r'\bmarkers?\s*before\s*risky\b': ('workflow', 'marker_before_risky', True),
r'\b(no|skip)\s*markers?\b': ('workflow', 'marker_before_risky', False),
}
# Framework patterns
FRAMEWORK_PATTERNS = {
r'\breact\b': 'react',
r'\bvue\b': 'vue',
r'\bangular\b': 'angular',
r'\bsvelte\b': 'svelte',
r'\bnext\.?js\b': 'nextjs',
r'\bexpress\b': 'express',
r'\bfastify\b': 'fastify',
r'\bnest\.?js\b': 'nestjs',
r'\bdjango\b': 'django',
r'\bflask\b': 'flask',
r'\bfastapi\b': 'fastapi',
}
# Correction patterns
CORRECTION_SIGNALS = [
r'\bno,?\s*i\s*meant\b',
r'\bactually,?\s*(i\s*)?(prefer|want)\b',
r'\bnot\s+(\w+),?\s*(use|prefer)\s+(\w+)\b',
r'\balways\s+do\b',
r'\bnever\s+do\b',
r'\bi\s*like\s*when\s*you\b',
r'\bstop\s+doing\b',
r'\bdon\'?t\s+(do|use|make)\b',
r'\bshould\s*be\b',
r'\bshould\s*have\s*been\b',
]
def extract_preference(text: str) -> Optional[Dict]:
"""Extract preference from user text."""
text_lower = text.lower()
for pattern, (category, field, value) in PREFERENCE_PATTERNS.items():
if re.search(pattern, text_lower):
return {
'category': category,
'field': field,
'value': value,
'confidence': 'high'
}
return None
def extract_framework_preference(text: str) -> Optional[Dict]:
"""Extract framework preference from user text."""
text_lower = text.lower()
# Check if this is a preference statement
is_preference = any(
word in text_lower
for word in ['prefer', 'like', 'use', 'want', 'love', 'favorite']
)
if not is_preference:
return None
frameworks = []
for pattern, framework in FRAMEWORK_PATTERNS.items():
if re.search(pattern, text_lower):
frameworks.append(framework)
if frameworks:
return {
'category': 'technical',
'field': 'preferred_frameworks',
'value': frameworks,
'action': 'append', # Append to existing list
'confidence': 'medium'
}
return None
def detect_correction(text: str) -> Optional[Dict]:
"""Detect if text contains a correction pattern."""
text_lower = text.lower()
for signal in CORRECTION_SIGNALS:
match = re.search(signal, text_lower)
if match:
return {
'is_correction': True,
'signal': match.group(),
'original_text': text,
'confidence': 'high' if 'should' in text_lower or 'meant' in text_lower else 'medium'
}
return None
def extract_correction_pattern(text: str) -> Optional[Dict]:
"""Extract the correction pattern from user text."""
detection = detect_correction(text)
if not detection:
return None
# Try to extract "not X, use Y" pattern
not_use_match = re.search(
r'not\s+["\']?(\w+)["\']?,?\s*(use|prefer)\s+["\']?(\w+)["\']?',
text.lower()
)
if not_use_match:
return {
'context': 'naming convention',
'original': not_use_match.group(1),
'corrected_to': not_use_match.group(3),
'pattern': f"Use {not_use_match.group(3)} instead of {not_use_match.group(1)}",
'confidence': detection['confidence']
}
# Try to extract "should be X" pattern
should_be_match = re.search(
r'should\s*(have\s*)?be(en)?\s+["\']?([^"\']+)["\']?',
text.lower()
)
if should_be_match:
return {
'context': 'correction',
'original': 'previous output',
'corrected_to': should_be_match.group(3).strip(),
'pattern': f"Should be: {should_be_match.group(3).strip()}",
'confidence': detection['confidence']
}
# Generic correction
return {
'context': 'general correction',
'original': 'previous output',
'corrected_to': text[:100], # Truncate
'pattern': 'User correction (review manually)',
'confidence': 'low'
}
def main():
parser = argparse.ArgumentParser(description='Extract preferences from user input')
parser.add_argument('--text', required=True, help='User input text to analyze')
parser.add_argument('--mode', default='all',
choices=['preference', 'framework', 'correction', 'all'],
help='What to extract')
parser.add_argument('--json', action='store_true', help='Output as JSON')
args = parser.parse_args()
results = {
'preference': None,
'framework': None,
'correction': None
}
if args.mode in ['preference', 'all']:
results['preference'] = extract_preference(args.text)
if args.mode in ['framework', 'all']:
results['framework'] = extract_framework_preference(args.text)
if args.mode in ['correction', 'all']:
results['correction'] = extract_correction_pattern(args.text)
if args.json:
print(json.dumps(results, indent=2))
else:
for key, value in results.items():
if value:
print(f"{key.upper()}: {json.dumps(value)}")
# Exit with appropriate code
if any(results.values()):
sys.exit(0)
else:
sys.exit(1) # Nothing extracted
if __name__ == '__main__':
main()
#!/usr/bin/env python3
"""
Profile Manager - CRUD operations for user profile
Manages .agent/.user-profile.json for bilateral modeling in Navigator.
"""
import json
import sys
import argparse
from datetime import datetime
from pathlib import Path
def load_profile(profile_path: str) -> dict:
"""Load profile from file, return empty dict if not exists."""
path = Path(profile_path)
if path.exists():
with open(path, 'r') as f:
return json.load(f)
return {}
def save_profile(profile_path: str, profile: dict) -> bool:
"""Save profile to file."""
try:
path = Path(profile_path)
path.parent.mkdir(parents=True, exist_ok=True)
with open(path, 'w') as f:
json.dump(profile, f, indent=2)
return True
except Exception as e:
print(f"Error saving profile: {e}", file=sys.stderr)
return False
def create_default_profile() -> dict:
"""Create a new default profile."""
today = datetime.now().strftime("%Y-%m-%d")
return {
"version": "1.0",
"created": today,
"last_updated": today,
"preferences": {
"communication": {
"verbosity": "balanced",
"confirmation_threshold": "high-stakes",
"explanation_style": "examples"
},
"technical": {
"preferred_frameworks": [],
"code_style": "mixed",
"testing_preference": "tdd"
},
"workflow": {
"autonomous_commits": True,
"auto_compact_threshold": 80,
"marker_before_risky": True
}
},
"corrections": [],
"goals": []
}
def update_preference(profile: dict, category: str, field: str, value) -> dict:
"""Update a specific preference in the profile."""
if "preferences" not in profile:
profile["preferences"] = {}
if category not in profile["preferences"]:
profile["preferences"][category] = {}
old_value = profile["preferences"][category].get(field)
profile["preferences"][category][field] = value
profile["last_updated"] = datetime.now().strftime("%Y-%m-%d")
return {"old_value": old_value, "new_value": value}
def add_correction(profile: dict, correction: dict) -> dict:
"""Add a correction to the profile, maintaining max 20."""
if "corrections" not in profile:
profile["corrections"] = []
correction["date"] = datetime.now().strftime("%Y-%m-%d")
profile["corrections"].append(correction)
# Keep only last 20 corrections
if len(profile["corrections"]) > 20:
profile["corrections"] = profile["corrections"][-20:]
profile["last_updated"] = datetime.now().strftime("%Y-%m-%d")
return profile
def add_goal(profile: dict, goal: dict) -> dict:
"""Add or update a goal in the profile."""
if "goals" not in profile:
profile["goals"] = []
today = datetime.now().strftime("%Y-%m-%d")
# Check if goal already exists
existing = next((g for g in profile["goals"] if g["name"] == goal["name"]), None)
if existing:
existing["last_mentioned"] = today
existing["status"] = goal.get("status", existing["status"])
else:
goal["started"] = today
goal["last_mentioned"] = today
goal["status"] = goal.get("status", "in-progress")
profile["goals"].append(goal)
profile["last_updated"] = today
return profile
def format_profile_display(profile: dict) -> str:
"""Format profile for display."""
if not profile:
return "No profile found. Use 'save my preferences' to create one."
prefs = profile.get("preferences", {})
comm = prefs.get("communication", {})
tech = prefs.get("technical", {})
work = prefs.get("workflow", {})
corrections = profile.get("corrections", [])
goals = profile.get("goals", [])
frameworks = tech.get("preferred_frameworks", [])
framework_str = ", ".join(frameworks) if frameworks else "none set"
# Recent corrections (last 3)
recent_corrections = corrections[-3:] if corrections else []
corrections_str = "\n".join([
f" - {c.get('pattern', c.get('corrected_to', 'Unknown'))}"
for c in recent_corrections
]) if recent_corrections else " None yet"
# Active goals
active_goals = [g for g in goals if g.get("status") == "in-progress"]
goals_str = "\n".join([
f" - {g['name']}: {g.get('context', 'No context')}"
for g in active_goals
]) if active_goals else " None active"
return f"""Your Navigator Profile
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Communication Preferences:
- Verbosity: {comm.get('verbosity', 'balanced')}
- Confirmation: {comm.get('confirmation_threshold', 'high-stakes')}
- Explanations: {comm.get('explanation_style', 'examples')}
Technical Preferences:
- Preferred frameworks: {framework_str}
- Code style: {tech.get('code_style', 'mixed')}
- Testing: {tech.get('testing_preference', 'tdd')}
Workflow Preferences:
- Autonomous commits: {work.get('autonomous_commits', True)}
- Auto-compact at: {work.get('auto_compact_threshold', 80)}% context
- Markers before risky changes: {work.get('marker_before_risky', True)}
Learned Corrections ({len(corrections)}):
{corrections_str}
Active Goals ({len(active_goals)}):
{goals_str}
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Last updated: {profile.get('last_updated', 'Unknown')}"""
def main():
parser = argparse.ArgumentParser(description='Manage Navigator user profile')
parser.add_argument('--action', required=True,
choices=['show', 'create', 'update', 'add-correction', 'add-goal', 'delete'],
help='Action to perform')
parser.add_argument('--profile-path', default='.agent/.user-profile.json',
help='Path to profile file')
parser.add_argument('--category', help='Preference category (communication, technical, workflow)')
parser.add_argument('--field', help='Preference field to update')
parser.add_argument('--value', help='New value for preference')
parser.add_argument('--correction-json', help='JSON string of correction to add')
parser.add_argument('--goal-json', help='JSON string of goal to add')
args = parser.parse_args()
if args.action == 'show':
profile = load_profile(args.profile_path)
print(format_profile_display(profile))
elif args.action == 'create':
profile = create_default_profile()
if save_profile(args.profile_path, profile):
print(f"✅ Profile created at {args.profile_path}")
else:
sys.exit(1)
elif args.action == 'update':
if not all([args.category, args.field, args.value]):
print("Error: --category, --field, and --value required for update", file=sys.stderr)
sys.exit(1)
profile = load_profile(args.profile_path)
if not profile:
profile = create_default_profile()
# Parse value (handle booleans and numbers)
value = args.value
if value.lower() == 'true':
value = True
elif value.lower() == 'false':
value = False
elif value.isdigit():
value = int(value)
result = update_preference(profile, args.category, args.field, value)
if save_profile(args.profile_path, profile):
print(f"✅ Updated {args.category}.{args.field}")
print(f" From: {result['old_value']}")
print(f" To: {result['new_value']}")
else:
sys.exit(1)
elif args.action == 'add-correction':
if not args.correction_json:
print("Error: --correction-json required", file=sys.stderr)
sys.exit(1)
profile = load_profile(args.profile_path)
if not profile:
profile = create_default_profile()
correction = json.loads(args.correction_json)
profile = add_correction(profile, correction)
if save_profile(args.profile_path, profile):
print(f"✅ Correction saved: {correction.get('pattern', 'Unknown')}")
else:
sys.exit(1)
elif args.action == 'add-goal':
if not args.goal_json:
print("Error: --goal-json required", file=sys.stderr)
sys.exit(1)
profile = load_profile(args.profile_path)
if not profile:
profile = create_default_profile()
goal = json.loads(args.goal_json)
profile = add_goal(profile, goal)
if save_profile(args.profile_path, profile):
print(f"✅ Goal saved: {goal.get('name', 'Unknown')}")
else:
sys.exit(1)
elif args.action == 'delete':
path = Path(args.profile_path)
if path.exists():
path.unlink()
print(f"✅ Profile deleted: {args.profile_path}")
else:
print(f"No profile found at {args.profile_path}")
if __name__ == '__main__':
main()
{
"version": "1.0",
"created": "${CREATED_DATE}",
"last_updated": "${UPDATED_DATE}",
"preferences": {
"communication": {
"verbosity": "balanced",
"confirmation_threshold": "high-stakes",
"explanation_style": "examples"
},
"technical": {
"preferred_frameworks": [],
"code_style": "mixed",
"testing_preference": "tdd"
},
"workflow": {
"autonomous_commits": true,
"auto_compact_threshold": 80,
"marker_before_risky": true
}
},
"corrections": [],
"goals": []
}