---
title: "Agent Boot Protocol - Quick Start"
version: "1.0"
applyTo: "AI Agents / Copilot Sessions"
---

# 🚀 Agent Boot Protocol - Quick Start for New Sessions

**Purpose:** 60-second setup for every Copilot session  
**Goal:** Start every session with full context and best practices  
**Time:** 2 minutes before coding

---

## 📋 Pre-Coding Checklist (Run This First)

### 1. Read Core Instructions (90 seconds)
```
□ Open: .github/instructions/AGENT_AUTONOMOUS_PROTOCOL.md
  └─ Read: "Core Protocol: 5-Layer Decision Framework" section
  └─ Time: 60 seconds
  └─ Retention: You'll apply this to every change

□ Open: .github/instructions/TRIGGER_RULES.md  
  └─ Read: "Decision Matrix" section
  └─ Time: 30 seconds
  └─ Retention: You'll know WHEN to apply what
```

### 2. Review Authority Documents (60 seconds)
```
□ Read: docs/technical/reference.md (skim, 1 minute)
  └─ Purpose: Know what exists and where
  └─ Find: Domain your task touches
  └─ Extract: Entry points, related files

□ Read: AGENTS.md (if workspace unknown, 30 seconds)
  └─ Purpose: Understand workspace structure
  └─ Extract: Paths for your domain
```

### 3. Understand Your Task (30 seconds)
```
□ Read user request carefully
  └─ Identify: Request TYPE (create/fix/refactor/review/question)
  └─ Identify: Priority (critical/high/medium/low)
  └─ Identify: Scope (1 file / multiple / large refactor)

Result: You know what to do and how to do it
```

---

## 🎯 Quick Decision Guide

**Use this to decide your approach:**

### "What TYPE of request is this?"

| Type | Detection | Protocol | Time |
|------|-----------|----------|------|
| **Create/Add** | "create", "add", "new" | Full 5-Layer AAP | 15-30 min |
| **Fix/Bug** | "error", "broken", "fix" | Fast 5-Layer AAP | 5-15 min |
| **Refactor** | "clean", "improve", "optimize" | Full 5-Layer AAP | 15-45 min |
| **Question** | "where", "what", "how" | Read only | 2-5 min |
| **Review** | "review", "audit", "check" | Analyze + Selective | 30-60 min |

---

## 🎓 The 5-Layer Protocol (Condensed)

**Follow this for EVERY code change:**

### Layer 1: UNDERSTAND (5 mins)
```
□ Read docs/technical/reference.md → Find your domain
□ Grep for related files → Find 5-10 affected files
□ Trace data flow → Input → Process → Output
Result: You have full context
```

### Layer 2: VALIDATE (3 mins)
```
□ Single responsibility? → One thing per function
□ Data flow complete? → No missing steps
□ Breaking changes? → Will this break other code?
Result: You're confident in approach
```

### Layer 3: IMPLEMENT (Variable)
```
□ Follow established patterns
□ Use proper types/interfaces  
□ Build immediately (npm run build:frontend)
□ Fix any errors
Result: Code that compiles
```

### Layer 4: DOCUMENT (2-3 mins)
```
□ Update docs/technical/reference.md
□ Update index.ts files
□ Update AGENTS.md (if needed)
Result: References stay current
```

### Layer 5: VERIFY (2 mins)
```
□ Build passes? (0 errors)
□ TypeScript clean? (0 errors)
□ Related files work? (imports resolve)
Result: Task complete, verified
```

---

## 🚨 Before You Start Coding

### Ask Yourself These 5 Questions

```
1️⃣  "Do I understand the workspace?"
    NO → Read docs/technical/reference.md (2 mins)
    YES → Continue

2️⃣  "Do I know what TYPE of change this is?"
    NO → Read TRIGGER_RULES.md (1 min)
    YES → Continue

3️⃣  "Can I find 5-10 related files?"
    NO → Do Layer 1 UNDERSTAND (read+grep)
    YES → Continue

4️⃣  "Do I understand the data flow?"
    NO → Trace through code (5 mins)
    YES → Continue

5️⃣  "Am I following a pattern that exists?"
    NO → Check components/ or composables/ (2 mins)
    YES → Continue

All YES? → You're ready to start Layer 1
```

---

## ⚡ Super Quick Reference

### For "Create a new component":
```
1. Find similar component (patterns)
2. Layer 1: Understand where it goes
3. Layer 2: Validate doesn't duplicate code
4. Layer 3: Create following pattern
5. Layer 4: Add to docs/technical/reference.md + export
6. Layer 5: Build passes ✓
Done
```

### For "Fix a TypeScript error":
```
1. Find error source
2. Layer 1: Understand affected files
3. Layer 2: Validate fix doesn't break others
4. Layer 3: Fix root cause, build
5. Layer 4: Add comment WHY if complex
6. Layer 5: Verify 0 errors ✓
Done
```

### For "Refactor duplicated code":
```
1. Find duplication (grep)
2. Layer 1: Understand all uses
3. Layer 2: Plan extraction (composable/helper)
4. Layer 3: Extract and update imports
5. Layer 4: Update docs + exports
6. Layer 5: Build passes, 0 regressions ✓
Done
```

### For "Where is X?":
```
1. Search docs/technical/reference.md
2. If found → Answer with path
3. If not found → Search AGENTS.md
4. If still not found → grep or ask for clarity
Done (no code changes)
```

---

## 📚 File Navigation Quick Links

**These files control everything:**

| File | Purpose | Read When | Time |
|------|---------|-----------|------|
| `.github/instructions/AGENT_AUTONOMOUS_PROTOCOL.md` | How to work | Starting session | 2 min |
| `.github/instructions/TRIGGER_RULES.md` | When to apply what | Need decision | 1 min |
| `.github/instructions/DOCUMENTATION_SYNC.md` | How to update docs | Before Layer 4 | 2 min |
| `docs/technical/reference.md` | Authority doc | Need to find something | 1-5 min |
| `AGENTS.md` | Workspace map | Understanding structure | 1-2 min |
| `AGENTS.md` | Workspace map | All sessions start here |  |

---

## 🎯 Session Types & Boot Sequences

### Session Type 1: "Crée un nouveau truc"
```
Boot Sequence:
  1. Read: TRIGGER_RULES.md (Decision Matrix section)
  2. Read: docs/technical/reference.md (find similar)
  3. ✅ Ready for 5-Layer Protocol
```

### Session Type 2: "J'ai une erreur"
```
Boot Sequence:
  1. Find: Error source (read error message)
  2. Read: TRIGGER_RULES.md (Scenario B: Fix/Debug)
  3. ✅ Ready for fast 5-Layer Protocol
```

### Session Type 3: "Refactore et optimise"
```
Boot Sequence:
  1. Read: TRIGGER_RULES.md (Scenario C: Refactor)
  2. Read: AGENT_AUTONOMOUS_PROTOCOL.md (Layer 1-2)
  3. ✅ Ready for full 5-Layer Protocol
```

### Session Type 4: "Où est X?"
```
Boot Sequence:
  1. Search: docs/technical/reference.md
  2. If not found: AGENTS.md
  3. ✅ Ready to answer
```

---

## 🚀 "Start Coding" Checklist

Before you write ANY code:

```
□ Do I have full context?
  └─ Read docs/technical/reference.md for domain? ✓

□ Do I know the approach?
  └─ Reviewed existing patterns? ✓

□ Do I have the protocol?
  └─ Know I'll do Layers 1-5? ✓

□ Do I understand constraints?
  └─ No breaking changes? ✓
  └─ Build must pass? ✓
  └─ Docs must be updated? ✓

□ Am I ready?
  YES → Start Layer 1: UNDERSTAND
  NO → Spend 5 more minutes reading
```

---

## ✅ Session Exit Checklist

Before finishing EVERY session:

```
□ Build passes
  └─ npm run build:frontend ✓

□ No TypeScript errors
  └─ 0 errors in output ✓

□ Documentation updated
  └─ docs/technical/reference.md updated ✓
  └─ index.ts files updated ✓
  └─ AGENTS.md updated (if needed) ✓

□ No red flags
  └─ No orphaned files ✓
  └─ No broken imports ✓
  └─ No outdated references ✓

□ Task complete?
  YES → Mark "✅ COMPLETE"
  NO → Return to Layer 1-5
```

---

## 🎓 One-Minute Orientation

**Confused? Read this (60 seconds):**

```
1. "I don't know where to start"
   → Read: docs/technical/reference.md (scan for your domain)
   → Time: 1 minute

2. "I don't know how to do this"
   → Read: TRIGGER_RULES.md (find your request type)
   → Time: 1 minute

3. "I don't know if I'm done"
   → Use: "Session Exit Checklist" above
   → Time: 2 minutes

4. "Something feels wrong"
   → Read: AGENT_AUTONOMOUS_PROTOCOL.md (Red Flags section)
   → Time: 1 minute
```

---

## 🎯 Most Important Principles

**Remember these 3 rules:**

1. **Follow the 5-Layer Protocol**
   ```
   UNDERSTAND → VALIDATE → IMPLEMENT → DOCUMENT → VERIFY
   Every task, every time
   ```

2. **Keep Documentation Current**
   ```
   Code without docs = Technical debt
   Update docs/technical/reference.md, AGENTS.md, index.ts EVERY time
   Takes 2-3 minutes, worth it
   ```

3. **Build and Verify**
   ```
   Never leave with broken build
   npm run build:frontend must pass
   0 TypeScript errors required
   ```

---

## 🚀 Ready to Start?

### Checklist (2 minutes)
- [ ] Read AGENT_AUTONOMOUS_PROTOCOL.md (Layer framework)
- [ ] Read TRIGGER_RULES.md (Decision matrix for your request type)
- [ ] Scan docs/technical/reference.md (understand domain)
- [ ] Have context? → Ready to code

### Then:
1. Start **Layer 1: UNDERSTAND**
2. Follow **Layers 2-5**
3. Verify with **Session Exit Checklist**
4. Mark complete ✅

---

**Version:** 1.0  
**Status:** Active  
**Use:** Before every coding session  
**Time to complete:** 2 minutes

**Now go code! 🚀**
