# Shared Projects SOP Draft

Status: active draft. Batch 1 has been approved and executed; use this SOP for subsequent migration batches, but still require approval before each batch and before any deletion.

## Purpose

Standardize Local Reach Web Design project storage so active work is portable across devices, safe for Codex/AI workflows, compatible with GitHub private repositories, and usable over Cloudflare WARP/Zero Trust while traveling.

## Canonical Workspace

Target root:

```text
~/Library/Mobile Documents/com~apple~CloudDocs/Shared Projects/
```

Top-level folders:

```text
Shared Projects/
  LRWD/
  traveltechus/
  heatpro/
  alohachallengecoins/
  client-projects/
  archived-projects/
```

## Standard Project Shape

```text
project-name/
  AGENTS.md
  README.md
  deployment.md
  SOP.md
  .gitignore
  docs/
  assets/
  backups/
  src/       # if applicable
```

## Never Commit Or Sync As Project Source

- API keys, secrets, tokens, SSH keys, restic passwords, service tokens.
- `.env`, `.env.local`, and environment-specific config files.
- `node_modules`, `.next`, `dist`, `build`, `.cache`, `cache`, `.turbo`.
- Large raw backup archives unless explicitly approved for archive storage.
- Raw WordPress `wp-config.php` files unless stored in a secured backup/archive workflow.

## New Project Workflow

1. Create the folder under the correct `Shared Projects` category.
2. Add `AGENTS.md`, `README.md`, `deployment.md`, `SOP.md`, and `.gitignore` before serious work begins.
3. Initialize Git locally unless the project is intentionally archive-only.
4. Create a private GitHub repository when the project becomes active or client-facing.
5. Confirm `.gitignore` excludes generated files and secrets before first commit.
6. Add deployment notes before the first deployment.

## Migration Workflow

1. Run a dry-run copy command first.
2. Review expected copied/excluded files.
3. Copy with metadata preservation after approval.
4. Verify Git status in the new location.
5. Open/build/test the project in the new location.
6. Update project docs to reflect the new canonical path and workflow.
7. Leave the old location in place until the new location is validated.
8. Archive or remove the old location only after a separate approval.

## Completed Migration Batches

- 2026-05-25 HST: copied `Mission Control` to `Shared Projects/LRWD/mission-control` and `Shot Clock` to `Shared Projects/archived-projects/shot-clock`. Desktop source folders were moved to `/Users/nick/Desktop/Migrated` after validation.
- 2026-05-25 HST: copied `mission-control-collector` to `Shared Projects/LRWD/mission-control-collector`, `majorchangeinitiative` to `Shared Projects/LRWD/majorchangeinitiative`, and `traveltechus-com` to `Shared Projects/traveltechus/traveltechus-com`. Desktop sources for MCI and traveltechus were moved to `/Users/nick/Desktop/Migrated` after validation; collector source remains at `/Users/nick/infra/mission-control-collector` as rollback/reference.
- 2026-05-25 HST: copied `ACD` to `Shared Projects/alohachallengecoins/acd`, `ACD DIVI` to `Shared Projects/alohachallengecoins/acd-divi-assets`, and `Duke Plumb` to `Shared Projects/client-projects/dukeplumb`. Desktop sources were moved to `/Users/nick/Desktop/Migrated` after validation. Duke raw backup/sql artifacts were excluded from the iCloud project copy.
- 2026-05-25 HST: copied archive-review projects `Glass Vodka`, `GIT`, `LRWD Remodel`, `kbar`, and `laspanishlessons`. Desktop sources were moved to `/Users/nick/Desktop/Migrated` after validation. LA Spanish Lessons backup zips, SQL dump, and compressed DB backup were excluded from the iCloud project copy.
- 2026-05-25 HST: deferred raw backup-review folders `clsps.net` and `kitsapCriminalDefense.com` from normal iCloud project source handling; prefer TrueNAS/Backblaze archive handling.
- 2026-05-25 HST: Desktop cleanup batch copied remaining non-secret Desktop material into `Shared Projects/` under `LRWD/ops-docs`, `client-projects`, `personal-archive`, `cleanup-review`, and archive folders. Original Desktop sources were consolidated under `/Users/nick/Desktop/Migrated/desktop-cleanup-2026-05-25` as rollback/reference copies. Secret-bearing Desktop folders were kept out of iCloud and moved to `/Users/nick/.localreach-secrets`; the Mission Control SSH key pair was copied to `/Users/nick/.ssh/localreach`, and `mc-ops-01` SSH aliases were updated.

## Migrated Source Holding Folder

Migrated Desktop source folders go here after the iCloud copy is verified:

```text
/Users/nick/Desktop/Migrated
```

This is a rollback/reference holding area, not a deletion queue. Remove items from it only after separate approval.

## Documentation Update Rule

Whenever a project is migrated, update project docs in the same migration batch:

- `AGENTS.md`: canonical path, stack, deployment workflow, WARP/Zero Trust notes, GitHub/private repo rules, Codex instructions.
- `README.md`: setup from a fresh Mac, install/run/build/test commands, troubleshooting.
- `deployment.md`: deployment targets, remote names, branch workflow, VPS/Cloudflare/DNS notes, PM2 or build commands.
- `SOP.md`: repeatable workflow for this project, maintenance, rollback, handoff notes.

If a project does not have one of these files, create a minimal version during standardization.

## GitHub Preparation

- Repos should be private by default.
- Default branch should match the project reality (`main` or `master`) until deliberately renamed.
- Do not rewrite history during migration.
- Do not push to GitHub without explicit approval.
- Before first push, check for large files and secret-like files by path/name.
- Current GitHub CLI auth uses account `localreachwd` and HTTPS remotes with the `gh` credential helper for newly created repos. The existing GitHub SSH identity currently reports as repo-scoped deploy key `localreachwd/mci-site`, so do not assume SSH can push to all new repos until account-level SSH access is corrected.

## WARP / Zero Trust Workflow

- Keep WARP enabled when working from untrusted networks.
- Preferred operational SSH aliases are WARP/Access aliases where available: `mc-ops-01-warp`, `west-01-warp`, `east-01-warp`.
- Direct SSH aliases are break-glass only unless the project docs explicitly say otherwise.
- TrueNAS file access over WARP uses Finder/SMB: `smb://192.168.68.126`.

## Mission Control Runner Lineage

Mission Control has had three runner generations: local Mac trigger/runner, TrueNAS runner, and current `mc-ops-01` runner. The current production runner is `mc-ops-01`; older local and TrueNAS paths are rollback/reference until explicitly decommissioned. Do not delete old runner copies just because they are no longer primary.

## iCloud Sync Best Practices

- Current iCloud+ plan: 2TB, upgraded 2026-05-25 HST.
- Keep generated dependency/build folders out of synced project folders.
- Avoid running heavy builds in a folder while iCloud is still syncing the same tree on another device.
- Check Git status before switching devices.
- If iCloud creates conflicted copies, stop work and resolve manually instead of continuing in both copies.
- Prefer Git commits for source history; iCloud is portability/sync, not source control.

## Backup Strategy

- GitHub stores source and project memory.
- iCloud stores active working copies and collaboration context.
- TrueNAS/Backblaze store durable backups and large archives.
- Large client site backups should generally go to TrueNAS/Backblaze, not normal iCloud project sync.

## Cleanup Policy

- No immediate deletion during migration.
- Move suspected stale items to a dated `_cleanup-review-*` folder first.
- Delete only after explicit approval and a waiting period.
