migrate mosaic home to xdg config path

This commit is contained in:
Jason Woltje
2026-02-17 14:12:02 -06:00
parent e16ff8af70
commit c7f363b2d2
60 changed files with 330 additions and 330 deletions

View File

@@ -27,12 +27,12 @@ if [[ ! -d "$TARGET_DIR" ]]; then
exit 1
fi
MOSAIC_HOME="${MOSAIC_HOME:-$HOME/.mosaic}"
MOSAIC_HOME="${MOSAIC_HOME:-$HOME/.config/mosaic}"
TEMPLATE_ROOT="$MOSAIC_HOME/templates/repo"
if [[ ! -d "$TEMPLATE_ROOT" ]]; then
echo "[mosaic] Missing templates at $TEMPLATE_ROOT" >&2
echo "[mosaic] Install or refresh framework: ~/.mosaic/install.sh" >&2
echo "[mosaic] Install or refresh framework: ~/.config/mosaic/install.sh" >&2
exit 1
fi
@@ -74,7 +74,7 @@ if [[ ! -f "$TARGET_DIR/AGENTS.md" ]]; then
## Standards Load Order
1. `~/.mosaic/STANDARDS.md`
1. `~/.config/mosaic/STANDARDS.md`
2. `AGENTS.md` (this file)
3. `.mosaic/repo-hooks.sh`
@@ -88,8 +88,8 @@ bash scripts/agent/session-end.sh
## Shared Rails
- Quality and orchestration guides: `~/.mosaic/guides/`
- Shared automation rails: `~/.mosaic/rails/`
- Quality and orchestration guides: `~/.config/mosaic/guides/`
- Shared automation rails: `~/.config/mosaic/rails/`
## Repo-Specific Notes
@@ -103,8 +103,8 @@ fi
echo "[mosaic] Repo bootstrap complete: $TARGET_DIR"
echo "[mosaic] Next: edit $TARGET_DIR/.mosaic/repo-hooks.sh with project workflows"
echo "[mosaic] Optional: apply quality rails via ~/.mosaic/bin/mosaic-quality-apply --template <template> --target $TARGET_DIR"
echo "[mosaic] Optional: run orchestrator rail via ~/.mosaic/bin/mosaic-orchestrator-matrix-cycle"
echo "[mosaic] Optional: apply quality rails via ~/.config/mosaic/bin/mosaic-quality-apply --template <template> --target $TARGET_DIR"
echo "[mosaic] Optional: run orchestrator rail via ~/.config/mosaic/bin/mosaic-orchestrator-matrix-cycle"
if [[ -n "$QUALITY_TEMPLATE" ]]; then
if [[ -x "$MOSAIC_HOME/bin/mosaic-quality-apply" ]]; then

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
MOSAIC_HOME="${MOSAIC_HOME:-$HOME/.mosaic}"
MOSAIC_HOME="${MOSAIC_HOME:-$HOME/.config/mosaic}"
FAIL_ON_WARN=0
VERBOSE=0

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
MOSAIC_HOME="${MOSAIC_HOME:-$HOME/.mosaic}"
MOSAIC_HOME="${MOSAIC_HOME:-$HOME/.config/mosaic}"
backup_stamp="$(date +%Y%m%d%H%M%S)"
copy_file_managed() {

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
MOSAIC_HOME="${MOSAIC_HOME:-$HOME/.mosaic}"
MOSAIC_HOME="${MOSAIC_HOME:-$HOME/.config/mosaic}"
APPLY=0
usage() {
@@ -9,7 +9,7 @@ usage() {
Usage: $(basename "$0") [--apply]
Migrate runtime-local skill directories (e.g. ~/.claude/skills/jarvis) to Mosaic-managed
skills by replacing local directories with symlinks to ~/.mosaic/skills-local.
skills by replacing local directories with symlinks to ~/.config/mosaic/skills-local.
Default mode is dry-run.
USAGE

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
MOSAIC_HOME="${MOSAIC_HOME:-$HOME/.mosaic}"
MOSAIC_HOME="${MOSAIC_HOME:-$HOME/.config/mosaic}"
BRIDGE="$MOSAIC_HOME/rails/orchestrator-matrix/transport/matrix_transport.py"
if [[ ! -f "$BRIDGE" ]]; then

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
MOSAIC_HOME="${MOSAIC_HOME:-$HOME/.mosaic}"
MOSAIC_HOME="${MOSAIC_HOME:-$HOME/.config/mosaic}"
consume="$MOSAIC_HOME/bin/mosaic-orchestrator-matrix-consume"
run="$MOSAIC_HOME/bin/mosaic-orchestrator-run"

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
MOSAIC_HOME="${MOSAIC_HOME:-$HOME/.mosaic}"
MOSAIC_HOME="${MOSAIC_HOME:-$HOME/.config/mosaic}"
BRIDGE="$MOSAIC_HOME/rails/orchestrator-matrix/transport/matrix_transport.py"
if [[ ! -f "$BRIDGE" ]]; then

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
MOSAIC_HOME="${MOSAIC_HOME:-$HOME/.mosaic}"
MOSAIC_HOME="${MOSAIC_HOME:-$HOME/.config/mosaic}"
CTRL="$MOSAIC_HOME/rails/orchestrator-matrix/controller/mosaic_orchestrator.py"
if [[ ! -f "$CTRL" ]]; then

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
MOSAIC_HOME="${MOSAIC_HOME:-$HOME/.mosaic}"
MOSAIC_HOME="${MOSAIC_HOME:-$HOME/.config/mosaic}"
RUNTIME="claude"
APPLY=0
@@ -10,7 +10,7 @@ usage() {
Usage: $(basename "$0") [options]
Remove legacy runtime files that were preserved as *.mosaic-bak-* after Mosaic linking.
Only removes backups when the active file is a symlink to ~/.mosaic.
Only removes backups when the active file is a symlink to ~/.config/mosaic.
Options:
--runtime <name> Runtime to prune (default: claude)

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
MOSAIC_HOME="${MOSAIC_HOME:-$HOME/.mosaic}"
MOSAIC_HOME="${MOSAIC_HOME:-$HOME/.config/mosaic}"
TARGET_DIR="$(pwd)"
TEMPLATE=""

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
MOSAIC_HOME="${MOSAIC_HOME:-$HOME/.mosaic}"
MOSAIC_HOME="${MOSAIC_HOME:-$HOME/.config/mosaic}"
TARGET_DIR="$(pwd)"
usage() {

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
MOSAIC_HOME="${MOSAIC_HOME:-$HOME/.mosaic}"
MOSAIC_HOME="${MOSAIC_HOME:-$HOME/.config/mosaic}"
SKILLS_REPO_URL="${MOSAIC_SKILLS_REPO_URL:-https://git.mosaicstack.dev/mosaic/agent-skills.git}"
SKILLS_REPO_DIR="${MOSAIC_SKILLS_REPO_DIR:-$MOSAIC_HOME/sources/agent-skills}"
MOSAIC_SKILLS_DIR="$MOSAIC_HOME/skills"
@@ -14,17 +14,17 @@ usage() {
cat <<USAGE
Usage: $(basename "$0") [options]
Sync canonical skills into ~/.mosaic/skills and link all Mosaic skills into runtime skill directories.
Sync canonical skills into ~/.config/mosaic/skills and link all Mosaic skills into runtime skill directories.
Options:
--link-only Skip git clone/pull and only relink from ~/.mosaic/{skills,skills-local}
--link-only Skip git clone/pull and only relink from ~/.config/mosaic/{skills,skills-local}
--no-link Sync canonical skills but do not update runtime links
-h, --help Show help
Env:
MOSAIC_HOME Default: ~/.mosaic
MOSAIC_HOME Default: ~/.config/mosaic
MOSAIC_SKILLS_REPO_URL Default: https://git.mosaicstack.dev/mosaic/agent-skills.git
MOSAIC_SKILLS_REPO_DIR Default: ~/.mosaic/sources/agent-skills
MOSAIC_SKILLS_REPO_DIR Default: ~/.config/mosaic/sources/agent-skills
USAGE
}

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
MOSAIC_HOME="${MOSAIC_HOME:-$HOME/.mosaic}"
MOSAIC_HOME="${MOSAIC_HOME:-$HOME/.config/mosaic}"
BOOTSTRAP_CMD="$MOSAIC_HOME/bin/mosaic-bootstrap-repo"
roots=("$HOME/src")
@@ -45,7 +45,7 @@ done
if [[ ! -x "$BOOTSTRAP_CMD" ]]; then
echo "[mosaic-upgrade] Missing bootstrap command: $BOOTSTRAP_CMD" >&2
echo "[mosaic-upgrade] Install/refresh framework first: ~/.mosaic/install.sh" >&2
echo "[mosaic-upgrade] Install/refresh framework first: ~/.config/mosaic/install.sh" >&2
exit 1
fi