| 1 | # Ceremony Reference |
| 2 | |
| 3 | On-demand reference for ceremony configuration, facilitator spawn, and execution rules. |
| 4 | |
| 5 | ## Config Format |
| 6 | |
| 7 | Ceremonies are declared in `.squad/ceremonies.md`. Each ceremony is a section with a table of fields: |
| 8 | |
| 9 | ```markdown |
| 10 | ## {CeremonyName} |
| 11 | |
| 12 | | Field | Value | |
| 13 | |-------|-------| |
| 14 | | **Trigger** | auto \| manual | |
| 15 | | **When** | before \| after | |
| 16 | | **Condition** | {when auto-triggered: natural language condition} | |
| 17 | | **Facilitator** | lead \| {specific-agent} | |
| 18 | | **Participants** | all-relevant \| all-involved \| {comma-separated names} | |
| 19 | | **Time budget** | focused \| extended | |
| 20 | | **Enabled** | ✅ yes \| ❌ no | |
| 21 | |
| 22 | **Agenda:** |
| 23 | 1. {Step 1} |
| 24 | 2. {Step 2} |
| 25 | ... |
| 26 | ``` |
| 27 | |
| 28 | ### Field Definitions |
| 29 | |
| 30 | | Field | Values | Meaning | |
| 31 | |-------|--------|---------| |
| 32 | | Trigger | `auto` | Fires automatically when Condition matches | |
| 33 | | Trigger | `manual` | Only when user says "run {ceremony}" | |
| 34 | | When | `before` | Runs before work batch spawns | |
| 35 | | When | `after` | Runs after work batch completes | |
| 36 | | Condition | free text | Evaluated against current task context | |
| 37 | | Facilitator | agent name | Who runs the meeting | |
| 38 | | Participants | selector | Who attends | |
| 39 | | Time budget | `focused` | Keep it short — key decisions only | |
| 40 | | Time budget | `extended` | Thorough discussion — all angles | |
| 41 | | Enabled | boolean | Skip disabled ceremonies entirely | |
| 42 | |
| 43 | ## Facilitator Spawn Template |
| 44 | |
| 45 | When a ceremony triggers, spawn the facilitator (sync) with this prompt structure: |
| 46 | |
| 47 | ``` |
| 48 | You are {FacilitatorName}, facilitating the "{CeremonyName}" ceremony. |
| 49 | |
| 50 | PARTICIPANTS: {participant list} |
| 51 | TRIGGER CONDITION: {what triggered this ceremony} |
| 52 | AGENDA: |
| 53 | {numbered agenda items from config} |
| 54 | |
| 55 | RULES: |
| 56 | - Follow the agenda in order. |
| 57 | - For each agenda item, spawn relevant participants as sub-tasks to gather their input. |
| 58 | - Synthesize participant input into clear decisions and action items. |
| 59 | - Keep to the time budget: {focused|extended}. |
| 60 | - Output a structured summary at the end. |
| 61 | |
| 62 | TASK CONTEXT: |
| 63 | {description of the work that triggered this ceremony} |
| 64 | ``` |
| 65 | |
| 66 | ## Execution Rules |
| 67 | |
| 68 | 1. **Before ceremonies** fire AFTER routing decisions but BEFORE agent spawn. The ceremony summary is included in all subsequent work-batch spawn prompts. |
| 69 | 2. **After ceremonies** fire when ALL agents in the batch have completed (success or failure). |
| 70 | 3. **Manual ceremonies** fire only on explicit user request ("run retro", "do a design review"). |
| 71 | 4. **Cooldown:** After a ceremony completes, skip auto-trigger checks for the immediately following step. This prevents ceremony loops. |
| 72 | 5. **Participant resolution:** |
| 73 | - `all-relevant` → agents routed to the current task |
| 74 | - `all-involved` → agents that participated in the completed batch |
| 75 | - Named agents → spawn only those specific agents |
| 76 | 6. **Scribe integration:** Spawn Scribe (background) at ceremony start to record decisions and action items. |
| 77 | 7. **Output format:** |
| 78 | ``` |
| 79 | 📋 {CeremonyName} completed — facilitated by {Facilitator}. |
| 80 | Decisions: {count} | Action items: {count}. |
| 81 | ``` |
| 82 | 8. **Failure handling:** If the facilitator fails or times out, log a warning and proceed with work. Ceremonies must never block the pipeline indefinitely. |