Atrévete Bot prompt editing gateway — file map, token budgets, and anti-patterns. Trigger: When editing, reviewing, or creating any file under agent/prompts/**/*.md.
Load this skill before editing any file under agent/prompts/**/*.md.
It answers:
Do NOT skip this skill — prompt degradation is cumulative and hard to reverse.
The assembly pipeline in agent/prompts/loader.py:
shared/identity.md
→ shared/critical_rules.md
→ shared/glossary.md
→ [MODE OVERLAY if applicable]
→ dynamic_context (injected by loader.py)
Key points:
.md files are cached at startup with 10-minute TTLloader.py:get_system_prompt()loader.clear_prompt_cache()) or service restartEach rule/instruction type has exactly ONE canonical home.
| Rule / Instruction Type | Canonical File | Notes |
|---|---|---|
| Agent identity, name, personality | shared/identity.md | Single source of truth |
| Rules that MUST NEVER be broken | shared/critical_rules.md | Hard constraints only |
| Business terms, service glossary | shared/glossary.md | Definitions and synonyms |
| Mode-specific flow | modes/{mode}.md | GREETING, BOOKING, GENERAL, ESCALATION |
| Cancellation handling | cancellation.md | Standalone cancellation flow |
| Conversation summary | summarization_prompt.md | Summarization logic |
| Legacy monolithic prompt | maite_system_prompt.md | DEPRECATED — do not edit |
PROHIBITED duplications:
shared/identity.mdshared/critical_rules.mdToken estimate: len(content) // 4 (proxy — real GPT tokens ≈ words × 1.3)
| File | Token Budget | Chars (actual) | Purpose |
|---|---|---|---|
shared/identity.md | ≤350 | ≤1,400 | Who is Maite — currently ~301t |
shared/critical_rules.md | ≤1,100 | ≤4,400 | Hard constraints — currently ~1,056t |
shared/glossary.md | N/A | N/A | NOT loaded at runtime — developer reference only |
modes/greeting.md | ≤280 | ≤1,120 | First contact — currently ~232t |
modes/booking.md | ≤1,800 | ≤7,200 | Booking flow (8-step + errors) — currently ~1,734t |
modes/general.md | ≤450 | ≤1,800 | FAQs — currently ~443t |
modes/escalation.md | N/A | N/A | NOT loaded at runtime — FSM in Python, doc only |
| RUNTIME TOTAL | ≤3,980 | ≤15,920 | shared/ + active mode overlay |
Note on
modes/booking.md: This file has a higher budget than other modes because it covers an 8-step flow with error handling, date parsing, and upsell logic. The 1,800t ceiling reflects the minimum after a full deduplication pass (April 2026). Do NOT compress below ~1,500t without a dedicated exploration — further cuts risk behavioral regressions on Steps 4–8.
Note on
glossary.mdandescalation.md: These files are never injected into the LLM context.glossary.mdis excluded byloader.py(tools serve the service catalog).escalation.mdis never loaded because EscalationMode is a deterministic Python FSM. Edits to these files have zero runtime impact.
Measure current size:
python3 -c "print(len(open('agent/prompts/modes/booking.md').read()) // 4)"
MANDATORY before any change to agent/prompts/:
python -c "print(len(open('PATH').read()) // 4)"rg "your rule" agent/prompts/❌ This file is DEPRECATED (28KB legacy monolith)
Why harmful: It's not used by the v6.0 loader. Changes here have no effect.
Rule: Edit shared/*.md and modes/*.md instead.
❌ Same rule in shared/critical_rules.md AND modes/booking.md
Why harmful: Creates contradictions when rules diverge.
Rule: One canonical location per rule type.
❌ El cliente se llama Juan in .md files
Why harmful: Context is dynamic via dynamic_context.py.
Rule: Never hardcode client data in prompt files.
❌ Editing legacy/step*.md files
Why harmful: These are archived FSM prompts, not used in v6.0.
Rule: Do not touch legacy/ directory.
❌ Edit prompt → test immediately → "nothing changed!"
Why harmful: 10-minute cache TTL means changes don't reflect immediately.
Rule: After prompt edits, run loader.clear_prompt_cache() or restart agent.
atrevete-prompts skill before editing promptsmaite_system_prompt.md (deprecated)legacy/*.md files (archived).md filesagent/prompts/ (shared/ + modes/)agent/prompts/loader.pyagent/prompts/dynamic_context.pyloader.clear_prompt_cache()agent/AGENTS.md → Prompt System sectionatrevete-agent — agent architecture37:["$","$L3d",null,{"content":"$3e","frontMatter":{"name":"atrevete-prompts","description":"Atrévete Bot prompt editing gateway — file map, token budgets, and anti-patterns. Trigger: When editing, reviewing, or creating any file under agent/prompts/**/*.md.\n","metadata":{"author":"atrevete-bot","version":"1.0","scope":["root","agent"],"auto_invoke":["Editing agent system prompts","Modifying files in agent/prompts/","Working on prompt .md files","Creating new prompt module","Reviewing prompt quality","Working on system prompts","Modifying core prompt rules","Modifying mode prompt instructions","Editing identity.md or critical_rules.md"]}}}]