feat: add mosaic upgrade command to clean stale per-project files
Detects and cleans up files that are now centralized: - SOUL.md: removed (now global at ~/.config/mosaic/SOUL.md) - CLAUDE.md: replaced with thin pointer to global AGENTS.md - AGENTS.md: stale load-order sections stripped, project content preserved Supports --dry-run, --all (scan ~/src/*), and per-project paths. Creates .mosaic-bak backups before any modification. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -34,6 +34,7 @@ Management:
|
||||
doctor [args...] Audit runtime state and detect drift
|
||||
sync [args...] Sync skills from canonical source
|
||||
bootstrap <path> Bootstrap a repo with Mosaic standards
|
||||
upgrade [path] Clean up stale SOUL.md/CLAUDE.md in a project
|
||||
|
||||
Options:
|
||||
-h, --help Show this help
|
||||
@@ -146,6 +147,11 @@ run_bootstrap() {
|
||||
exec "$MOSAIC_HOME/bin/mosaic-bootstrap-repo" "$@"
|
||||
}
|
||||
|
||||
run_upgrade() {
|
||||
check_mosaic_home
|
||||
exec "$MOSAIC_HOME/bin/mosaic-upgrade" "$@"
|
||||
}
|
||||
|
||||
# Main router
|
||||
if [[ $# -eq 0 ]]; then
|
||||
usage
|
||||
@@ -163,6 +169,7 @@ case "$command" in
|
||||
doctor) run_doctor "$@" ;;
|
||||
sync) run_sync "$@" ;;
|
||||
bootstrap) run_bootstrap "$@" ;;
|
||||
upgrade) run_upgrade "$@" ;;
|
||||
help|-h|--help) usage ;;
|
||||
version|-v|--version) echo "mosaic $VERSION" ;;
|
||||
*)
|
||||
|
||||
Reference in New Issue
Block a user