Overview
Pre-Task Intelligence Protocol — activates ALL relevant agents in the ANT ecosystem BEFORE executing any task requested by the user. It enriches the context with parallel multi-agent analysis, produces a realistic time estimate (start→finish), maps probable and improbable problems, and formulates an upfront execution plan with contingency strategies.
When to Use This Skill
- When the user mentions "pre-task briefing" or related topics
- When the user mentions "briefing tarefa" or related topics
- When the user mentions "plano execucao tarefa" or related topics
- When the user mentions "antes de executar analise" or related topics
- When the user mentions "task intelligence" or related topics
- When the user mentions "consultar agentes paralelo" or related topics
Do Not Use This Skill When
- The task is unrelated to task intelligence
- A simpler, more specific tool can handle the request
- The user needs general-purpose assistance without domain expertise
How It Works
Before any execution, this agent performs a complete intelligent briefing:
- Activates all relevant agents in parallel — each one analyzes the task from its own perspective
- Synthesizes the collective knowledge into a unified plan
- Estimates real time from start to finish (with a breakdown by step)
- Maps probable problems and resolves them in advance
- Defines checkpoints to detect deviations before they become blockers
The core reason: executing a task without this briefing is like performing surgery without a pre-operative examination. The cost of 30-60 seconds of parallel analysis eliminates hours of rework.
Phase 1 — Task Classification (5-10 Seconds)
Before anything else, classify the task into one of the categories:
| Category | Examples | Briefing Level |
|---|---|---|
| Simple | answer a question, explain a concept, small edit | Minimal (scan only) |
| Moderate | create a file, modify a skill, install a dependency | Normal (scan + match + estimate) |
| Complex | create a new skill, API integration, architecture, refactoring | Complete (all steps below) |
| Critical | irreversible actions, deploys, delete, reset, modify infrastructure | Maximum + explicit confirmation |
For Simpletasks, execute normally without a complete briefing. For Moderate, Complex and Critical, execute the complete protocol below.
Phase 2 — Parallel Scan And Match
Execute simultaneously:
## Terminal 1 — Atualizar Registry
python agent-orchestrator/scripts/scan_registry.py
## Terminal 2 — Identificar Agentes Relevantes
python agent-orchestrator/scripts/match_skills.py "<tarefa do usuário>"
If matched >= 2, execute orchestration:
python agent-orchestrator/scripts/orchestrate.py --skills <skill1,skill2,...> --query "<tarefa>"
Phase 3 — Briefing Of Specialized Agents
For each relevant agent identified in the match, ask a targeted question:
Query pattern by agent type:
- 007 (Security): "Does this task have attack vectors, exposed data, or irreversible actions?"
- skill-sentinel (Quality): "Is there a redundant skill? Does the skill that will be created/modified follow the standards?"
- agent-orchestrator (Orchestration): "Which existing skills already solve part of this task?"
- matematico-tao (Complexity): "What is the computational complexity? Are there non-obvious optimizations?"
- context-guardian (Continuity): "Is there context from previous sessions relevant to this task?"
- advogado-especialista/criminal (Legal): "Are there legal implications, LGPD, or regulatory risks?"
- leiloeiro-ia (Auctions): "Does this task involve data or logic from the auction domain?"
Do not consult all agents blindly — choose the 3-5 most relevant for the task.
Phase 4 — Real-Time Estimate
Build an honest time breakdown based on real complexity:
ESTIMATIVA DE TEMPO — [Nome da Tarefa]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Etapa 1: [nome] ~X min [motivo do tempo]
Etapa 2: [nome] ~X min [motivo do tempo]
Etapa 3: [nome] ~X min [motivo do tempo]
Contingência (problemas) +X min [buffer para imprevistos típicos]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
TOTAL ESTIMADO: ~X min
Confiança: Alta/Média/Baixa — [justificativa]
Honest estimation rules:
- Never underestimate to please — the user needs to know the real time
- Always add 20-30% buffer for typical problems
- If confidence is Low, explain why and what would increase it
- Differentiate "agent execution time" vs "user waiting time"
Phase 5 — Problem Map (Proactive Anticipation)
Think in THREE layers of problems:
Likely Problems (80%+ chance of happening)
These are the problems that ALWAYS happen. Solve them BEFORE starting.
Examples by category:
- New skills: Invalid YAML → validate with
python -c "import yaml; yaml.safe_load(open('SKILL.md').read())"before installing - External APIs: expired key, rate limit, endpoint change → check authentication first
- Installations: missing dependencies, incompatible version → read requirements.txt before executing
- Files: path does not exist, permission denied, wrong encoding → check before opening
- Git/Versioning: wrong branch, merge conflict, uncommitted changes → always
git statusbefore
Possible Problems (30-70% chance)
Problems that may happen depending on the current state.
Strategy: quickly check the state before assuming it is OK.
Unlikely but Critical Problems (< 10% but high impact)
Irreversible actions, data loss, credential exposure.
Strategy: preventive backup, explicit confirmation, rollback plan.
Problem map template:
MAPA DE PROBLEMAS — [Nome da Tarefa]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PROVÁVEIS (resolver antes de começar):
⚠ [problema] → [solução preventiva aplicada agora]
⚠ [problema] → [solução preventiva aplicada agora]
POSSÍVEIS (monitorar durante execução):
~ [problema] → [sinal de alerta] → [ação se ocorrer]
CRÍTICOS (baixa prob, alto impacto):
🔴 [risco] → [backup/rollback plan]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Phase 6 — Enriched Execution Plan
After collecting agent analyses + estimates + problem map, produce:
BRIEFING PRÉ-EXECUÇÃO — [Nome da Tarefa]
════════════════════════════════════════════
CONTEXTO COLETADO:
• [insight do agente 1]
• [insight do agente 2]
• [insight do agente 3]
PLANO DE EXECUÇÃO:
1. [etapa] (~Xmin) — [por quê esta ordem]
2. [etapa] (~Xmin) — [dependência da anterior]
3. [etapa] (~Xmin) — [verificação de qualidade]
TEMPO TOTAL: ~Xmin | CONFIANÇA: Alta/Média/Baixa
PROBLEMAS PRÉ-RESOLVIDOS:
✅ [problema] → [solução aplicada]
✅ [problema] → [solução aplicada]
PONTOS DE VERIFICAÇÃO:
[ ] Após etapa 1: verificar [critério de sucesso]
[ ] Após etapa 2: verificar [critério de sucesso]
[ ] Final: validar resultado completo
ROLLBACK PLAN (se algo der errado):
→ [como desfazer cada etapa crítica]
════════════════════════════════════════════
Integration With The Ecosystem
This agent complements the agent-orchestrator — it does not replace it:
- agent-orchestrator: identifies WHICH skills to use (routing)
- task-intelligence: enriches HOW to use them + when + with what risks (briefing)
Both should be activated together. CLAUDE.md already requires the orchestrator — this agent adds the intelligence layer on top of it.
When Not To Use The Full Briefing
- Quick 1-line questions (answering directly is more efficient)
- Pure read tasks (read, grep, glob with no side effects)
- Simple iterations within an already planned task
- When the user asks "just answer quickly" / "vibe with me"
The goal is not bureaucracy — it is intelligence in the service of real speed.
References
references/problem-catalog.md— Catalog of typical problems by domainreferences/time-patterns.md— Historical time patterns by task typescripts/pre_task_check.py— Automated pre-task verification script
Full Briefing Example
User task: "Create a skill for Stripe integration"
BRIEFING PRÉ-EXECUÇÃO — Skill: stripe-integration
════════════════════════════════════════════════════
CONTEXTO COLETADO (3 agentes consultados):
• 007: CRÍTICO — API keys do Stripe NÃO devem ir para SKILL.md ou git.
Usar variáveis de ambiente (.env). Webhooks precisam validação HMAC-SHA256.
• skill-sentinel: whatsapp-cloud-api já implementa padrão HMAC-SHA256 para webhooks
— reusar esse padrão. Skill deve seguir estrutura: config.py + client.py + SKILL.md.
• agent-orchestrator: 3 skills similares (whatsapp, telegram, instagram) como referência
de arquitetura. Nenhuma conflita com Stripe.
PLANO DE EXECUÇÃO:
1. Criar estrutura de diretórios (~2min) — base para os demais arquivos
2. Escrever SKILL.md com workflow (~5min) — define comportamento do agente
3. Criar config.py com variáveis de ambiente (~3min) — sem hardcode de keys
4. Criar stripe_client.py com autenticação (~10min) — métodos principais
5. Criar webhook_handler.py com HMAC-SHA256 (~5min) — reusar padrão whatsapp
6. Instalar via skill-installer (~2min) — validação + registro
7. Gerar ZIP (~1min) — para backup/upload manual
TEMPO TOTAL: ~28min | CONFIANÇA: Alta
(estrutura clara, dependências conhecidas, sem APIs externas incertas)
PROBLEMAS PRÉ-RESOLVIDOS:
✅ API key exposta → .env obrigatório, .gitignore configurado
✅ YAML inválido → validar antes de instalar
✅ Webhook sem autenticação → HMAC-SHA256 incluído no plano
PONTOS DE VERIFICAÇÃO:
[ ] Após SKILL.md: yaml.safe_load não levanta exceção
[ ] Após config.py: sem strings hardcoded de credenciais
[ ] Final: skill-installer valida os 10 checks
ROLLBACK PLAN:
→ Se skill-installer falhar: pasta em /tmp/stripe-skill-backup/
→ Se ZIP corrompido: reconstruir com build_ecosystem.py
════════════════════════════════════════════════════
Best Practices
- Provide clear, specific context about your project and requirements
- Review all suggestions before applying them to production code
- Combine with other complementary skills for comprehensive analysis
Common Pitfalls
- Using this skill for tasks outside its domain expertise
- Applying recommendations without understanding your specific context
- Not providing enough project context for accurate analysis
Related Skills
agent-orchestrator- Complementary skill for enhanced analysismulti-advisor- Complementary skill for enhanced analysis
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.