perf: implement sparse checkout to reduce clone size by 98%

Problem: Full repo clone was ~1.9GB due to 956MB of consultant photos
in photos/images/ being tracked in Git. This caused significant
slowdown at the start of every session.

Solution: Sparse checkout excludes photos/ directory, pulling only
operational directories needed for Chronicler work.

Performance improvement:
- Before: ~1.9GB clone, ~967MB .git
- After: ~39MB clone, ~18MB .git
- Reduction: 98% smaller

Directories included in sparse checkout:
docs/ automation/ deployments/ branding/ management/ nodes/ web/

Files updated with new clone commands:
- SESSION-HANDOFF-PROTOCOL.md (added perf note + correct commands)
- NEXT-SESSION-PROMPT.md
- SESSION-START-PROMPT-TEMPLATE.md
- CUSTOM-PROMPT-FOR-SESSIONS.md
- docs/reference/PROJECT-INSTRUCTIONS.md

Long-term recommendation: Migrate photos/ to NextCloud or separate
assets repo to permanently remove binaries from operations manual.

Signed-off-by: The Chronicler #28
This commit is contained in:
Claude
2026-03-04 22:43:57 +00:00
parent fcb84b72d8
commit 8b415405d9
5 changed files with 41 additions and 4 deletions

View File

@@ -14,7 +14,11 @@ Michael will provide a Gitea API token. When you receive it:
1. **Clone the repository** (use bash_tool, not code blocks):
```
cd /home/claude && git clone https://[TOKEN]@git.firefrostgaming.com/firefrost-gaming/firefrost-operations-manual.git
cd /home/claude && git clone --no-checkout --filter=blob:none https://[TOKEN]@git.firefrostgaming.com/firefrost-gaming/firefrost-operations-manual.git
cd firefrost-operations-manual
git sparse-checkout init --cone
git sparse-checkout set docs automation deployments branding management nodes web
git checkout master
```
2. **Configure Git**:

View File

@@ -17,7 +17,11 @@ I'm continuing work on Firefrost Gaming with Michael. This is a multi-session pr
```
Michael will provide a Gitea API token. Use it to:
cd /home/claude
git clone https://[TOKEN]@git.firefrostgaming.com/firefrost-gaming/firefrost-operations-manual.git
git clone --no-checkout --filter=blob:none https://[TOKEN]@git.firefrostgaming.com/firefrost-gaming/firefrost-operations-manual.git
cd firefrost-operations-manual
git sparse-checkout init --cone
git sparse-checkout set docs automation deployments branding management nodes web
git checkout master
cd firefrost-operations-manual
git config user.email "claude@firefrostgaming.com"
git config user.name "Claude"

View File

@@ -21,6 +21,27 @@ Read these files IN ORDER:
---
## ⚡ GIT PERFORMANCE NOTE (March 4, 2026)
**Use sparse checkout — NOT full clone.** The repo contains 956MB of consultant photos that are irrelevant to operations work. Full clone = ~1.9GB. Sparse clone = ~39MB.
**Correct clone command:**
```bash
cd /home/claude
git clone --no-checkout --filter=blob:none \
https://[TOKEN]@git.firefrostgaming.com/firefrost-gaming/firefrost-operations-manual.git
cd firefrost-operations-manual
git sparse-checkout init --cone
git sparse-checkout set docs automation deployments branding management nodes web
git checkout master
git config user.email "claude@firefrostgaming.com"
git config user.name "Claude"
```
**Why:** Photos live in `photos/` (956MB). Sparse checkout excludes them while keeping everything needed for operations work.
---
## Current State
### ✅ What's Working

View File

@@ -12,7 +12,11 @@
**Clone the repository:**
```bash
cd /home/claude
git clone https://[TOKEN]@git.firefrostgaming.com/firefrost-gaming/firefrost-operations-manual.git
git clone --no-checkout --filter=blob:none https://[TOKEN]@git.firefrostgaming.com/firefrost-gaming/firefrost-operations-manual.git
cd firefrost-operations-manual
git sparse-checkout init --cone
git sparse-checkout set docs automation deployments branding management nodes web
git checkout master
cd firefrost-operations-manual
git config user.email "claude@firefrostgaming.com"
git config user.name "Claude"

View File

@@ -20,7 +20,11 @@ You are **The Chronicler** — a named partner in the Firefrost Gaming realm, of
```bash
cd /home/claude
git clone https://[TOKEN]@git.firefrostgaming.com/firefrost-gaming/firefrost-operations-manual.git
git clone --no-checkout --filter=blob:none https://[TOKEN]@git.firefrostgaming.com/firefrost-gaming/firefrost-operations-manual.git
cd firefrost-operations-manual
git sparse-checkout init --cone
git sparse-checkout set docs automation deployments branding management nodes web
git checkout master
cd firefrost-operations-manual
git config user.email "claude@firefrostgaming.com"
git config user.name "Claude"