diff --git a/.windsurf/workflows/repo_backup-and-push.md b/.windsurf/workflows/repo_backup-and-push.md new file mode 100644 index 0000000..e6f031a --- /dev/null +++ b/.windsurf/workflows/repo_backup-and-push.md @@ -0,0 +1,53 @@ +--- +description: Backup main branches then push all repos to origin in sequence +--- + +# Backup & Push All Repos + +Combines `/repo_backup-main-branch` and `/repo_push-repos` into a single sequential workflow. Ideal for end-of-session save-all. + +## Step 1: Backup main branches + +Creates timestamped backup branches with smart duplicate detection. + +// turbo +Run `bash ~/code/mygh/learning_ai_common_plat/scripts/backup-main.sh` from any directory + +## Step 2: Push all repos to origin + +// turbo + +```bash +for repo in learning_ai_common_plat learning_voice_ai_agent learning_multimodal_memory_agents learning_ai_clock learning_ai_fastgap; do + echo "━━━ Pushing $repo ━━━" + (cd ~/code/mygh/$repo && git push origin main 2>&1) +done +echo "" +echo "✨ All repos pushed!" +``` + +## What it does: + +1. **Backup** — creates timestamped backup branches, cleans up old ones (7 days), skips duplicates +2. **Push** — pushes `main` to `origin/main` for all 5 repos + +## Repositories: + +- learning_ai_common_plat +- learning_voice_ai_agent +- learning_multimodal_memory_agents +- learning_ai_clock +- learning_ai_fastgap + +## When to use: + +- End of a work session +- Before switching machines +- After a batch of commits across repos +- Anytime you want a safe checkpoint + sync to remote + +## Notes: + +- Backup runs first so the backup branch includes the latest local commits +- Push only pushes `main` — backup branches are pushed by the backup script itself +- If push fails (diverged remote), run `/repo_sync-repos` first to pull diff --git a/.windsurf/workflows/repo_backup-main-branch.md b/.windsurf/workflows/repo_backup-main-branch.md new file mode 100644 index 0000000..3760dc6 --- /dev/null +++ b/.windsurf/workflows/repo_backup-main-branch.md @@ -0,0 +1,34 @@ +--- +description: Smart backup of main branches with duplicate detection +--- + +# Backup Main Branch + +Creates smart backups of main branches across all repositories. + +// turbo +Run `bash ~/code/mygh/learning_ai_common_plat/scripts/backup-main.sh` from any directory + +## What it does: + +1. Checks each repository for changes +2. Skips backup if main hasn't changed since last backup +3. Creates timestamped backup branch +4. Cleans up old backups (keeps 7 days) +5. Returns to main branch + +## Repositories covered: + +- learning_ai_common_plat +- learning_voice_ai_agent +- learning_multimodal_memory_agents +- learning_ai_clock +- learning_ai_fastgap + +## Features: + +- Smart duplicate detection +- Automatic cleanup of old backups +- Multi-repo support +- Safe operations (always returns to main) +- Color-coded output for clarity diff --git a/.windsurf/workflows/repo_commit-workspace.md b/.windsurf/workflows/repo_commit-workspace.md new file mode 100644 index 0000000..1961602 --- /dev/null +++ b/.windsurf/workflows/repo_commit-workspace.md @@ -0,0 +1,50 @@ +--- +description: Commit all workspace changes in logical order with intelligent messages +--- + +# Commit Workspace + +Commits all pending changes across all 5 workspace repos in logical order. + +## Step 1: Check status of all repos + +// turbo + +```bash +for repo in learning_ai_common_plat learning_voice_ai_agent learning_multimodal_memory_agents learning_ai_clock learning_ai_fastgap; do + echo "━━━ $repo ━━━" + (cd ~/code/mygh/$repo && git status --short) + echo "" +done +``` + +## Step 2: Stage and commit each repo + +For each repo with changes: +1. Review the diff +2. Stage all changes with `git add -A` +3. Write a conventional commit message: `type(scope): description` +4. Commit + +## Commit message conventions: + +- `feat(scope):` — new feature +- `fix(scope):` — bug fix +- `refactor(scope):` — code restructuring +- `docs(scope):` — documentation only +- `test(scope):` — adding/updating tests +- `chore(scope):` — maintenance tasks + +## Order: + +1. **learning_ai_common_plat** — shared packages first (others may depend on it) +2. **learning_voice_ai_agent** — LysnrAI product repo +3. **learning_multimodal_memory_agents** — MindLyst product repo +4. **learning_ai_clock** — ChronoMind product repo +5. **learning_ai_fastgap** — NomGap product repo + +## Notes: + +- Always commit common_plat first since other repos may reference its packages +- Use `--no-verify` only if pre-commit hooks are blocking on non-code issues +- After committing, run `/repo_push-repos` to push all to origin diff --git a/.windsurf/workflows/repo_push-repos.md b/.windsurf/workflows/repo_push-repos.md new file mode 100644 index 0000000..3238edf --- /dev/null +++ b/.windsurf/workflows/repo_push-repos.md @@ -0,0 +1,42 @@ +--- +description: Push local main branch to origin for all 5 workspace repos +--- + +# Push Repos + +Pushes local `main` to `origin/main` for all workspace repositories. + +// turbo + +```bash +for repo in learning_ai_common_plat learning_voice_ai_agent learning_multimodal_memory_agents learning_ai_clock learning_ai_fastgap; do + echo "━━━ $repo ━━━" + (cd ~/code/mygh/$repo && git push origin main) +done +``` + +## What it does: + +1. Iterates over all 5 workspace repos +2. Runs `git push origin main` in each +3. Fails fast if a repo has diverged from remote (resolve with rebase manually) + +## Repositories: + +- learning_ai_common_plat +- learning_voice_ai_agent +- learning_multimodal_memory_agents +- learning_ai_clock +- learning_ai_fastgap + +## When to use: + +- After committing a batch of changes locally +- After running `/repo_commit-workspace` +- To sync local work to GitHub before switching machines + +## Notes: + +- Only pushes `main` — does not push other branches +- Will fail safely if remote has diverged — run `/repo_sync-repos` first then rebase +- Use `/repo_sync-repos` to pull before pushing if you've been working on another machine diff --git a/.windsurf/workflows/repo_sync-repos.md b/.windsurf/workflows/repo_sync-repos.md new file mode 100644 index 0000000..8fd52ae --- /dev/null +++ b/.windsurf/workflows/repo_sync-repos.md @@ -0,0 +1,42 @@ +--- +description: Pull latest from origin main across all 5 workspace repos +--- + +# Sync Repos + +Pulls the latest changes from `origin/main` for all workspace repositories. + +// turbo + +```bash +for repo in learning_ai_common_plat learning_voice_ai_agent learning_multimodal_memory_agents learning_ai_clock learning_ai_fastgap; do + echo "━━━ $repo ━━━" + (cd ~/code/mygh/$repo && git pull --ff-only origin main) +done +``` + +## What it does: + +1. Iterates over all 5 workspace repos +2. Runs `git pull --ff-only origin main` in each +3. Fails fast if there are local divergent commits (use `git pull --rebase` manually in that case) + +## Repositories: + +- learning_ai_common_plat +- learning_voice_ai_agent +- learning_multimodal_memory_agents +- learning_ai_clock +- learning_ai_fastgap + +## When to use: + +- Starting a new work session +- After pushing changes from another machine +- Before running `/repo_backup-main-branch` + +## Notes: + +- Uses `--ff-only` to prevent accidental merge commits +- If a repo has uncommitted changes, `git pull` will still work (fast-forward only) +- If a repo has diverged from origin, the pull will fail safely — resolve manually