- Add service management prompts (review, standardize, troubleshoot, integration) - Add Docker Swarm migration and tutoring workflows (swarm-migration, swarm-tutor) - Add SSO onboarding guide for Authentik integration (sso-onboarding) - Add session lifecycle prompts (start, end, status) for context continuity - Add node bootstrap scripts for Debian Trixie (day0bootstrap.sh) and Ubuntu/Debian (pi_init.sh) These prompts implement gated, step-by-step workflows with explicit confirmation requirements to prevent accidental changes during service operations. Bootstrap scripts standardize IP configuration (10.0.0.200) and install Docker + Ansible on new nodes.
2.8 KiB
2.8 KiB
description, trigger
| description | trigger |
|---|---|
| Scan for untracked runtime artifacts and update .gitignore patterns. | //ignore |
<!-- RESTART NOTE (Session end: 2025-12-27 22:00)
Last context: Protocol refactored for improved artifact analysis and user validation
Next steps:
1. Review and commit changes
2. Validate protocol in live workflow
Blockers: None
Reference files: documentation/project-history/SESSION_SNAPSHOT_2025-12-27_2200.md
-->
Git Ignore Maintenance Protocol
Goal
Maintain repository hygiene by identifying untracked runtime artifacts (logs, caches, temp files) and generating precise .gitignore patterns to exclude them, ensuring only source code and config are tracked.
Cognitive Protocol: ReAct (Reason + Act)
Reference: .github/knowledge/example.ReAct.md
Phase 1: Security & User Validation (REQUIRED)
Objective: Ensure all git operations occur as the correct repository owner.
Enforced Workflow:
- ACT: Execute
whoami. - OBSERVATION:
- If
chester: Proceed to Phase 2. - If
root(or other):- ACT:
su - chester - ACT:
whoami(Verify switch). - CONSTRAINT: If switch fails, STOP and report error. Do not touch git.
- ACT:
- If
Phase 2: Artifact Analysis (The Scan)
Objective: Identify what is untracked and why.
- ACT: Execute
git status --short. - THOUGHT (ReAct): For each
??(untracked) item, determine its nature:- Runtime Artifact? (e.g.,
*.log,__pycache__,tmp/). -> IGNORE. - Generated Data? (e.g.,
dist/,build/). -> IGNORE. - Environment/Secrets? (e.g.,
.env,id_rsa). -> IGNORE IMMEDIATELY. - Source/Config? (e.g.,
compose.yaml,src/main.py). -> DO NOT IGNORE. (Flag to user).
- Runtime Artifact? (e.g.,
Phase 3: Pattern Generation (Meta-Prompting)
Objective: Create specific, resilient patterns. Do not use overly broad wildcards.
- Bad Pattern:
*log*(Might ignorelogic.py). - Good Pattern:
*.logorlogs/.
Phase 4: Execution & Verification
Action Plan:
- Append: Add the identified patterns to the relevant
.gitignore(Root or Service-level). - Verify: Run
git statusagain to confirm the files are no longer listed.
Example Output
🛡️ User Validation
- Current User:
chester(Verified)
📋 Analysis
_thelab/core/media/ghost/content/logs/-> Log Directory (Safe to ignore)src/.DS_Store-> OS Garbage (Safe to ignore)config.json-> Configuration (⚠️ User attention required - track or ignore?)
📝 Action Taken
Appended to _thelab/.gitignore:
# Ghost Blog Logs
_thelab/core/media/ghost/content/logs/
# OS Files
.DS_Store
✅ Verification
git status is clean.