auroq-os 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.auroq-core/constitution.md +153 -0
- package/.auroq-core/core/synapse/context/context-builder.js +34 -0
- package/.auroq-core/core/synapse/context/context-tracker.js +198 -0
- package/.auroq-core/core/synapse/diagnostics/collectors/consistency-collector.js +168 -0
- package/.auroq-core/core/synapse/diagnostics/collectors/hook-collector.js +129 -0
- package/.auroq-core/core/synapse/diagnostics/collectors/manifest-collector.js +82 -0
- package/.auroq-core/core/synapse/diagnostics/collectors/output-analyzer.js +134 -0
- package/.auroq-core/core/synapse/diagnostics/collectors/pipeline-collector.js +75 -0
- package/.auroq-core/core/synapse/diagnostics/collectors/quality-collector.js +252 -0
- package/.auroq-core/core/synapse/diagnostics/collectors/relevance-matrix.js +174 -0
- package/.auroq-core/core/synapse/diagnostics/collectors/safe-read-json.js +31 -0
- package/.auroq-core/core/synapse/diagnostics/collectors/session-collector.js +102 -0
- package/.auroq-core/core/synapse/diagnostics/collectors/timing-collector.js +126 -0
- package/.auroq-core/core/synapse/diagnostics/collectors/uap-collector.js +83 -0
- package/.auroq-core/core/synapse/diagnostics/report-formatter.js +484 -0
- package/.auroq-core/core/synapse/diagnostics/synapse-diagnostics.js +95 -0
- package/.auroq-core/core/synapse/domain/domain-loader.js +322 -0
- package/.auroq-core/core/synapse/engine.js +400 -0
- package/.auroq-core/core/synapse/layers/l0-constitution.js +80 -0
- package/.auroq-core/core/synapse/layers/l1-global.js +102 -0
- package/.auroq-core/core/synapse/layers/l2-agent.js +94 -0
- package/.auroq-core/core/synapse/layers/l3-workflow.js +94 -0
- package/.auroq-core/core/synapse/layers/l4-task.js +83 -0
- package/.auroq-core/core/synapse/layers/l5-squad.js +244 -0
- package/.auroq-core/core/synapse/layers/l6-keyword.js +154 -0
- package/.auroq-core/core/synapse/layers/l7-star-command.js +169 -0
- package/.auroq-core/core/synapse/layers/layer-processor.js +82 -0
- package/.auroq-core/core/synapse/memory/memory-bridge.js +220 -0
- package/.auroq-core/core/synapse/memory/synapse-memory-provider.js +201 -0
- package/.auroq-core/core/synapse/output/formatter.js +561 -0
- package/.auroq-core/core/synapse/runtime/hook-runtime.js +98 -0
- package/.auroq-core/core/synapse/scripts/generate-constitution.js +204 -0
- package/.auroq-core/core/synapse/session/session-manager.js +404 -0
- package/.auroq-core/core/synapse/utils/atomic-write.js +79 -0
- package/.auroq-core/core/synapse/utils/paths.js +57 -0
- package/.auroq-core/core/synapse/utils/tokens.js +25 -0
- package/.auroq-core/core-config.yaml +80 -0
- package/.auroq-core/development/sistema-gestao-projetos.md +193 -0
- package/.auroq-core/development/sistema-memoria.md +157 -0
- package/.auroq-core/dna-operacional.md +134 -0
- package/.claude/CLAUDE.md +399 -0
- package/.claude/commands/AuroqOS/agents/forge.md +374 -0
- package/.claude/commands/AuroqOS/agents/ops.md +277 -0
- package/.claude/commands/companion.md +7 -0
- package/.claude/hooks/precompact-session-digest.cjs +46 -0
- package/.claude/hooks/synapse-engine.cjs +99 -0
- package/.claude/rules/agent-authority.md +79 -0
- package/.claude/rules/agent-handoff.md +97 -0
- package/.claude/rules/commit-inteligente.md +86 -0
- package/.claude/rules/dna-operacional.md +53 -0
- package/.claude/rules/evolucao-incremental.md +43 -0
- package/.claude/rules/mcp-usage.md +38 -0
- package/.claude/rules/memoria-inteligente.md +65 -0
- package/.claude/rules/project-tracker.md +49 -0
- package/.claude/rules/tool-response-filtering.md +57 -0
- package/.claude/settings.json +1 -0
- package/.claude/settings.local.json +33 -0
- package/.env.example +22 -0
- package/.gitignore +23 -0
- package/.synapse/constitution +21 -0
- package/.synapse/context +8 -0
- package/.synapse/global +10 -0
- package/.synapse/manifest +35 -0
- package/README.md +67 -0
- package/agents/companion/agents/companion.md +306 -0
- package/agents/companion/data/contexto-dinamico.md +23 -0
- package/agents/companion/data/demandas-backlog.md +19 -0
- package/agents/companion/data/log-decisoes.md +11 -0
- package/agents/companion/data/padroes-observados.md +10 -0
- package/agents/companion/knowledge/companion-foundation.md +49 -0
- package/agents/companion/knowledge/expert-essencial.md +30 -0
- package/agents/companion/knowledge/modus-operandi.md +161 -0
- package/agents/companion/tasks/new-project.md +111 -0
- package/agents/companion/tasks/save-memory.md +73 -0
- package/agents/companion/tasks/start.md +136 -0
- package/agents/companion/tasks/weekly-review.md +82 -0
- package/bin/auroq-os.js +346 -0
- package/business/campanhas/_template/BRIEFING.md +45 -0
- package/business/campanhas/_template/CHECKLIST.md +29 -0
- package/business/campanhas/_template/DIARIO.md +15 -0
- package/business/campanhas/_template/RETROVISOR.md +34 -0
- package/business/cockpit.md +72 -0
- package/business/templates/tracker-template.md +71 -0
- package/docs/knowledge/expert-business/posicionamento.md +27 -0
- package/docs/knowledge/expert-business/publico-alvo.md +39 -0
- package/docs/knowledge/expert-mind/historia.md +27 -0
- package/docs/knowledge/expert-mind/identidade.md +23 -0
- package/docs/knowledge/expert-mind/tom-de-voz.md +30 -0
- package/docs/knowledge/expert-mind/valores.md +32 -0
- package/package.json +26 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// SYN-14: Boot time captured before ANY require — measures hook cold start
|
|
3
|
+
const _BOOT_TIME = process.hrtime.bigint();
|
|
4
|
+
'use strict';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* SYNAPSE Hook Entry Point — UserPromptSubmit
|
|
8
|
+
*
|
|
9
|
+
* Thin wrapper that reads JSON from stdin, delegates to SynapseEngine,
|
|
10
|
+
* and writes <synapse-rules> context to stdout.
|
|
11
|
+
*
|
|
12
|
+
* - Silent exit on missing .synapse/ directory
|
|
13
|
+
* - Silent exit on any error (never blocks the user prompt)
|
|
14
|
+
* - All errors logged to stderr with [synapse-hook] prefix
|
|
15
|
+
* - 5s safety timeout as defense-in-depth
|
|
16
|
+
*
|
|
17
|
+
* @module synapse-engine-hook
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
const path = require('path');
|
|
21
|
+
const { resolveHookRuntime, buildHookOutput } = require(
|
|
22
|
+
path.join(__dirname, '..', '..', '.auroq-core', 'core', 'synapse', 'runtime', 'hook-runtime.js'),
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
/** Safety timeout (ms) — defense-in-depth; Claude Code also manages hook timeout. */
|
|
26
|
+
const HOOK_TIMEOUT_MS = 5000;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Read all data from stdin as a JSON object.
|
|
30
|
+
* @returns {Promise<object>} Parsed JSON input
|
|
31
|
+
*/
|
|
32
|
+
function readStdin() {
|
|
33
|
+
return new Promise((resolve, reject) => {
|
|
34
|
+
let data = '';
|
|
35
|
+
process.stdin.setEncoding('utf8');
|
|
36
|
+
process.stdin.on('error', (e) => reject(e));
|
|
37
|
+
process.stdin.on('data', (chunk) => { data += chunk; });
|
|
38
|
+
process.stdin.on('end', () => {
|
|
39
|
+
try { resolve(JSON.parse(data)); }
|
|
40
|
+
catch (e) { reject(e); }
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** Main hook execution pipeline. */
|
|
46
|
+
async function main() {
|
|
47
|
+
const input = await readStdin();
|
|
48
|
+
const runtime = resolveHookRuntime(input);
|
|
49
|
+
if (!runtime) return;
|
|
50
|
+
|
|
51
|
+
const result = await runtime.engine.process(input.prompt, runtime.session);
|
|
52
|
+
|
|
53
|
+
// QW-1: Wire updateSession() — persist bracket transitions after each prompt
|
|
54
|
+
if (runtime.sessionId && runtime.sessionsDir) {
|
|
55
|
+
try {
|
|
56
|
+
const { updateSession } = require(
|
|
57
|
+
path.join(runtime.cwd, '.auroq-core', 'core', 'synapse', 'session', 'session-manager.js'),
|
|
58
|
+
);
|
|
59
|
+
updateSession(runtime.sessionId, runtime.sessionsDir, {
|
|
60
|
+
context: { last_bracket: result.bracket || 'FRESH' },
|
|
61
|
+
});
|
|
62
|
+
} catch (_err) {
|
|
63
|
+
// Fire-and-forget — never block the prompt
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const output = JSON.stringify(buildHookOutput(result.xml));
|
|
68
|
+
|
|
69
|
+
// Write and flush stdout (callback may not exist in mocked environments)
|
|
70
|
+
const flushed = process.stdout.write(output);
|
|
71
|
+
if (!flushed) {
|
|
72
|
+
await new Promise((resolve) => process.stdout.once('drain', resolve));
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Safely exit the process — no-op inside Jest workers to prevent worker crashes.
|
|
78
|
+
* @param {number} code - Exit code
|
|
79
|
+
*/
|
|
80
|
+
function safeExit(code) {
|
|
81
|
+
if (process.env.JEST_WORKER_ID) return;
|
|
82
|
+
process.exit(code);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/** Entry point runner — sets safety timeout and executes main(). */
|
|
86
|
+
function run() {
|
|
87
|
+
const timer = setTimeout(() => safeExit(0), HOOK_TIMEOUT_MS);
|
|
88
|
+
timer.unref();
|
|
89
|
+
main()
|
|
90
|
+
.then(() => safeExit(0))
|
|
91
|
+
.catch((err) => {
|
|
92
|
+
console.error(`[synapse-hook] ${err.message}`);
|
|
93
|
+
safeExit(0);
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
if (require.main === module) run();
|
|
98
|
+
|
|
99
|
+
module.exports = { readStdin, main, run, HOOK_TIMEOUT_MS };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Agent Authority — Auroq OS
|
|
2
|
+
|
|
3
|
+
## Delegation Matrix
|
|
4
|
+
|
|
5
|
+
### Ops — Operacoes Exclusivas
|
|
6
|
+
|
|
7
|
+
| Operacao | Exclusivo? | Outros Agentes |
|
|
8
|
+
|----------|-----------|--------------|
|
|
9
|
+
| `git push` / `git push --force` | SIM | BLOQUEADO |
|
|
10
|
+
| `gh pr create` / `gh pr merge` | SIM | BLOQUEADO |
|
|
11
|
+
| MCP add/remove/configure | SIM | BLOQUEADO |
|
|
12
|
+
| Environment bootstrap | SIM | BLOQUEADO |
|
|
13
|
+
| Commit inteligente (ritual completo) | SIM | Outros agentes delegam |
|
|
14
|
+
|
|
15
|
+
### Companion — Cerebro do Sistema
|
|
16
|
+
|
|
17
|
+
| Operacao | Exclusivo? |
|
|
18
|
+
|----------|-----------|
|
|
19
|
+
| Situacao diaria (boot + briefing) | SIM |
|
|
20
|
+
| Sistema de memoria (contexto, decisoes, padroes) | SIM |
|
|
21
|
+
| Sistema de projetos (cockpit, trackers, escalacao) | SIM |
|
|
22
|
+
| Weekly review | SIM |
|
|
23
|
+
| Roteamento para agente adequado | SIM |
|
|
24
|
+
| Criacao de projetos | SIM |
|
|
25
|
+
|
|
26
|
+
### Forge — Criacao de Agentes
|
|
27
|
+
|
|
28
|
+
| Operacao | Exclusivo? |
|
|
29
|
+
|----------|-----------|
|
|
30
|
+
| Criar workers | SIM (basico) — Forges premium quando instalados |
|
|
31
|
+
| Criar minds | SIM (basico) — Forges premium quando instalados |
|
|
32
|
+
| Criar squads | SIM (basico) — Forges premium quando instalados |
|
|
33
|
+
|
|
34
|
+
### Workers — Execucao
|
|
35
|
+
|
|
36
|
+
| Permitido | Bloqueado |
|
|
37
|
+
|---------|---------|
|
|
38
|
+
| `git add`, `git commit`, `git status` | `git push` (delegar pra Ops) |
|
|
39
|
+
| `git branch`, `git checkout` (local) | `gh pr create/merge` (delegar pra Ops) |
|
|
40
|
+
| Execucao de tasks operacionais | Criar novos agentes (delegar pra Forge) |
|
|
41
|
+
| Atualizacao de documentos de trabalho | Decisoes estrategicas (delegar pro Expert) |
|
|
42
|
+
|
|
43
|
+
### Squads — Processos Complexos
|
|
44
|
+
|
|
45
|
+
| Permitido | Bloqueado |
|
|
46
|
+
|---------|---------|
|
|
47
|
+
| Executar pipeline completo com quality gates | `git push` (delegar pra Ops) |
|
|
48
|
+
| Criar documentos de output | Criar novos agentes (delegar pra Forge) |
|
|
49
|
+
| Atualizar KBs e skills | Decisoes fora do escopo do squad |
|
|
50
|
+
|
|
51
|
+
## Cross-Agent Delegation
|
|
52
|
+
|
|
53
|
+
### Git Push Flow
|
|
54
|
+
```
|
|
55
|
+
QUALQUER agente → Ops (*commit / *push)
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Novo Agente Flow
|
|
59
|
+
```
|
|
60
|
+
Expert pede → Forge cria → Expert valida
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Projeto Novo Flow
|
|
64
|
+
```
|
|
65
|
+
Expert pede → Companion cria (*novo-projeto) → Expert valida
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Memoria Flow
|
|
69
|
+
```
|
|
70
|
+
QUALQUER agente detecta trigger → salva (ou pergunta) conforme rule memoria-inteligente
|
|
71
|
+
Companion consolida no weekly review
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Escalation Rules
|
|
75
|
+
|
|
76
|
+
1. Agente nao consegue completar task → Informar expert com contexto
|
|
77
|
+
2. Quality gate falha → Retornar pro executor com feedback especifico
|
|
78
|
+
3. Violacao constitucional detectada → BLOCK, corrigir antes de prosseguir
|
|
79
|
+
4. Conflito de boundary → Constitution Art. II resolve (cada um faz o seu)
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Agent Handoff Protocol — Context Compaction
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Prevent context window accumulation when switching between Auroq OS agents (`@agent` commands). Each agent switch compacts the previous agent's full persona into a structured handoff artifact (~379 tokens) instead of retaining the full definition (~3-5K tokens).
|
|
6
|
+
|
|
7
|
+
## When This Applies
|
|
8
|
+
|
|
9
|
+
This protocol activates whenever:
|
|
10
|
+
1. A user invokes a new agent via `@agent-name` or `/AuroqOS:agents:agent-name`
|
|
11
|
+
2. The current session already has a different agent active
|
|
12
|
+
|
|
13
|
+
## Handoff Protocol
|
|
14
|
+
|
|
15
|
+
### On Agent Switch (outgoing agent)
|
|
16
|
+
|
|
17
|
+
Before loading the new agent, mentally generate a handoff artifact with:
|
|
18
|
+
|
|
19
|
+
```yaml
|
|
20
|
+
handoff:
|
|
21
|
+
from_agent: "{current_agent_id}"
|
|
22
|
+
to_agent: "{new_agent_id}"
|
|
23
|
+
story_context:
|
|
24
|
+
story_id: "{active story ID}"
|
|
25
|
+
story_path: "{active story path}"
|
|
26
|
+
story_status: "{current status}"
|
|
27
|
+
current_task: "{last task being worked on}"
|
|
28
|
+
branch: "{current git branch}"
|
|
29
|
+
decisions:
|
|
30
|
+
- "{key decision 1}"
|
|
31
|
+
- "{key decision 2}"
|
|
32
|
+
files_modified:
|
|
33
|
+
- "{file 1}"
|
|
34
|
+
- "{file 2}"
|
|
35
|
+
blockers:
|
|
36
|
+
- "{any active blockers}"
|
|
37
|
+
next_action: "{what the incoming agent should do}"
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### On Agent Switch (incoming agent)
|
|
41
|
+
|
|
42
|
+
The incoming agent receives:
|
|
43
|
+
1. Its own **full agent profile** (persona, commands, dependencies)
|
|
44
|
+
2. The **handoff artifact** from the previous agent (compact summary)
|
|
45
|
+
3. **NOT** the previous agent's full persona/instructions/tool definitions
|
|
46
|
+
|
|
47
|
+
### Compaction Limits
|
|
48
|
+
|
|
49
|
+
| Limit | Value |
|
|
50
|
+
|-------|-------|
|
|
51
|
+
| Max handoff artifact size | 500 tokens |
|
|
52
|
+
| Max retained agent summaries | 3 (oldest discarded on 4th switch) |
|
|
53
|
+
| Max decisions in artifact | 5 |
|
|
54
|
+
| Max files_modified entries | 10 |
|
|
55
|
+
| Max blockers | 3 |
|
|
56
|
+
|
|
57
|
+
### What to Preserve (ALWAYS include)
|
|
58
|
+
|
|
59
|
+
- Active story ID and path
|
|
60
|
+
- Current task being worked on
|
|
61
|
+
- Git branch name
|
|
62
|
+
- Key architectural decisions made
|
|
63
|
+
- Files created or modified
|
|
64
|
+
- Active blockers
|
|
65
|
+
|
|
66
|
+
### What to Discard (NEVER carry forward)
|
|
67
|
+
|
|
68
|
+
- Previous agent's full persona definition
|
|
69
|
+
- Previous agent's command list
|
|
70
|
+
- Previous agent's dependency list
|
|
71
|
+
- Previous agent's tool configurations
|
|
72
|
+
- Previous agent's CodeRabbit integration details
|
|
73
|
+
- Previous agent's greeting templates
|
|
74
|
+
|
|
75
|
+
## Storage
|
|
76
|
+
|
|
77
|
+
Handoff artifacts are stored at `.auroq/handoffs/` (runtime, gitignored). Format: `handoff-{from}-to-{to}-{timestamp}.yaml`.
|
|
78
|
+
|
|
79
|
+
## Template Reference
|
|
80
|
+
|
|
81
|
+
Full template: `.auroq-core/development/templates/agent-handoff-tmpl.yaml`
|
|
82
|
+
|
|
83
|
+
## Example
|
|
84
|
+
|
|
85
|
+
Session flow: `@sm` creates story → `@dev` implements → `@qa` reviews
|
|
86
|
+
|
|
87
|
+
After `@sm` → `@dev` switch:
|
|
88
|
+
- `@sm` full persona (~3K tokens) is **discarded**
|
|
89
|
+
- Handoff artifact (~379 tokens) is **retained**: story ID, decisions, files, next action
|
|
90
|
+
- `@dev` full persona (~5K tokens) is **loaded**
|
|
91
|
+
- **Total context: ~5.4K** instead of ~8K (33% reduction per switch)
|
|
92
|
+
|
|
93
|
+
After `@dev` → `@qa` switch:
|
|
94
|
+
- `@dev` full persona is **discarded**
|
|
95
|
+
- `@dev` handoff artifact is **retained** alongside `@sm` handoff
|
|
96
|
+
- `@qa` full persona is **loaded**
|
|
97
|
+
- **Total context: ~5.2K** instead of ~12K (57% reduction after 2 switches)
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Commit Inteligente — Ritual de Incrementacao
|
|
2
|
+
|
|
3
|
+
> No Auroq OS, commit nao e sobre deployar codigo. E sobre **salvar o checkpoint do negocio**.
|
|
4
|
+
> Cada commit e um ponto de evolucao incremental do sistema.
|
|
5
|
+
|
|
6
|
+
## Quando Commitar
|
|
7
|
+
|
|
8
|
+
- Final de sessao de trabalho significativa
|
|
9
|
+
- Antes de trocar de assunto/projeto
|
|
10
|
+
- Antes de fechar o computador
|
|
11
|
+
- Quando completou uma etapa de projeto
|
|
12
|
+
- Quando tomou decisoes importantes
|
|
13
|
+
|
|
14
|
+
## Ritual do Commit (Ops executa)
|
|
15
|
+
|
|
16
|
+
### 1. Revisar o que mudou
|
|
17
|
+
```
|
|
18
|
+
git status + git diff
|
|
19
|
+
```
|
|
20
|
+
Entender: o que progrediu desde o ultimo commit?
|
|
21
|
+
|
|
22
|
+
### 2. Verificar projetos ativos
|
|
23
|
+
- SE trabalhou num projeto do cockpit → tracker esta atualizado?
|
|
24
|
+
- SE tracker nao foi atualizado → atualizar ANTES do commit (log, status, blockers)
|
|
25
|
+
|
|
26
|
+
### 3. Verificar contexto
|
|
27
|
+
- SE houve decisoes importantes → estao no `agents/companion/data/log-decisoes.md`?
|
|
28
|
+
- SE o estado do negocio mudou → `agents/companion/data/contexto-dinamico.md` reflete?
|
|
29
|
+
- SE algo foi aprendido → esta documentado em algum lugar?
|
|
30
|
+
|
|
31
|
+
### 4. Commitar com mensagem significativa
|
|
32
|
+
A mensagem conta O QUE ACONTECEU no negocio, nao o que mudou nos arquivos:
|
|
33
|
+
|
|
34
|
+
**Formato:**
|
|
35
|
+
```
|
|
36
|
+
{tipo}: {o que aconteceu}
|
|
37
|
+
|
|
38
|
+
{detalhes se necessario}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
**Tipos:**
|
|
42
|
+
- `progresso:` — avancou em projeto/tarefa
|
|
43
|
+
- `decisao:` — tomou decisao estrategica
|
|
44
|
+
- `processo:` — documentou/criou/melhorou processo
|
|
45
|
+
- `agente:` — criou/melhorou agente/squad/worker
|
|
46
|
+
- `conhecimento:` — adicionou/tratou conhecimento na biblioteca
|
|
47
|
+
- `campanha:` — acao de campanha (criativo, disparo, ajuste)
|
|
48
|
+
- `fix:` — corrigiu problema
|
|
49
|
+
- `setup:` — configuracao/infra
|
|
50
|
+
|
|
51
|
+
**Exemplos:**
|
|
52
|
+
```
|
|
53
|
+
progresso: NDF Workshop fase 1 concluida — LP, flows e criativos prontos
|
|
54
|
+
decisao: definiu preco do ingresso em R$47 (teste contra R$97 no proximo ciclo)
|
|
55
|
+
processo: documentou SOP de shift entre ciclos de lancamento
|
|
56
|
+
agente: criou worker TechOps com vault e SOPs operacionais
|
|
57
|
+
conhecimento: ETL completo de criativos de anuncio (9 vols, 6450 linhas)
|
|
58
|
+
campanha: lancou lote 2 de criativos — 9 pecas, 3 hooks novos
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### 5. Push
|
|
62
|
+
- Backup na nuvem (GitHub)
|
|
63
|
+
- Historico incremental do negocio
|
|
64
|
+
- Qualquer maquina, qualquer momento: `git clone` e o negocio ta la
|
|
65
|
+
|
|
66
|
+
## O que o Commit NAO e
|
|
67
|
+
|
|
68
|
+
- NAO e sobre codigo limpo ou testes passando
|
|
69
|
+
- NAO precisa de conventional commits estilo dev (feat/fix/chore)
|
|
70
|
+
- NAO e obrigatorio ter tudo perfeito — e checkpoint, nao release
|
|
71
|
+
- NAO e so pra deploy — e pra PERSISTIR evolucao
|
|
72
|
+
|
|
73
|
+
## Commit como Seguro
|
|
74
|
+
|
|
75
|
+
> "Commit e o botao salvar do sistema."
|
|
76
|
+
|
|
77
|
+
Se o computador quebrar, se o autocompact apagar tudo, se trocar de maquina — o ultimo commit e o ponto de restauracao. Quanto mais frequente, menos se perde.
|
|
78
|
+
|
|
79
|
+
## Protocolo do Ops
|
|
80
|
+
|
|
81
|
+
Quando o expert pede `*commit` ou `*push`, o Ops executa o ritual completo:
|
|
82
|
+
1. Revisa mudancas
|
|
83
|
+
2. Pergunta se trackers e contexto estao atualizados
|
|
84
|
+
3. Sugere mensagem de commit baseada no que aconteceu
|
|
85
|
+
4. Expert aprova
|
|
86
|
+
5. Commit + push
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# DNA Operacional — Rules
|
|
2
|
+
|
|
3
|
+
> Regras de comportamento que todo agente ativo no Auroq OS segue automaticamente.
|
|
4
|
+
|
|
5
|
+
## Documentacao Continua
|
|
6
|
+
|
|
7
|
+
SEMPRE que estiver trabalhando numa tarefa com mais de 3 etapas:
|
|
8
|
+
|
|
9
|
+
1. **Criar ou atualizar documento de trabalho** no inicio da tarefa
|
|
10
|
+
2. **Atualizar a cada etapa significativa**: progresso, decisoes, problemas, estado
|
|
11
|
+
3. **Salvar estado ANTES de operacoes longas** (previne perda por autocompact)
|
|
12
|
+
4. **Consolidar ao final**: resultado, aprendizados, proximos passos
|
|
13
|
+
|
|
14
|
+
O documento de trabalho fica em:
|
|
15
|
+
- `business/campanhas/{campanha}/` para trabalho de campanha
|
|
16
|
+
- `business/processos/` para SOPs
|
|
17
|
+
- Dentro do squad ou no local mais logico para o contexto
|
|
18
|
+
|
|
19
|
+
## Anti-Viagem
|
|
20
|
+
|
|
21
|
+
SEMPRE que for executar:
|
|
22
|
+
|
|
23
|
+
1. Verificar se existe plano/briefing aprovado para o trabalho
|
|
24
|
+
2. Executar DENTRO do escopo planejado
|
|
25
|
+
3. Se perceber necessidade de mudar escopo: **PARAR e perguntar ao expert**
|
|
26
|
+
4. Nao adicionar features, melhorias ou conteudo nao solicitado
|
|
27
|
+
5. Nao gerar dados, numeros ou fatos sem fonte verificada
|
|
28
|
+
|
|
29
|
+
## Handoff entre Agentes
|
|
30
|
+
|
|
31
|
+
SEMPRE que trocar de agente:
|
|
32
|
+
|
|
33
|
+
1. Documento de trabalho deve estar atualizado com estado atual
|
|
34
|
+
2. Gerar handoff artifact compacto (~379 tokens): de quem, pra quem, decisoes, proxima acao
|
|
35
|
+
3. Armazenar em `.auroq/handoffs/`
|
|
36
|
+
4. Novo agente le documento + handoff antes de comecar
|
|
37
|
+
|
|
38
|
+
## Anti-Entropia
|
|
39
|
+
|
|
40
|
+
SEMPRE:
|
|
41
|
+
|
|
42
|
+
1. Tasks com inputs e outputs definidos quando possivel
|
|
43
|
+
2. Se for squad: coordenador nao executa, executor nao se auto-valida
|
|
44
|
+
3. Output importante vira documento .md (nao fica so na conversa)
|
|
45
|
+
4. Quality gates em pontos criticos
|
|
46
|
+
5. Ao terminar trabalho: registrar aprendizados que melhoram o sistema
|
|
47
|
+
|
|
48
|
+
## Session Management
|
|
49
|
+
|
|
50
|
+
1. Antes de autocompact iminente: salvar estado no documento de trabalho
|
|
51
|
+
2. Apos autocompact: reativar agente (rele arquivos + resumo da sessao)
|
|
52
|
+
3. Antes de trocar de sessao: commit (commit = botao salvar)
|
|
53
|
+
4. Em novo chat: ativar agente → apontar pro documento de trabalho → continuar
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Evolucao Incremental — Rules
|
|
2
|
+
|
|
3
|
+
> Constitution Art. VI: Nunca do zero. REUSE > ADAPT > CREATE.
|
|
4
|
+
|
|
5
|
+
## Hierarquia de Verificacao
|
|
6
|
+
|
|
7
|
+
Antes de criar QUALQUER artefato (documento, agente, processo, template):
|
|
8
|
+
|
|
9
|
+
### Gate 1: REUSE — Ja existe?
|
|
10
|
+
- Buscar no Exocortex (docs/knowledge/)
|
|
11
|
+
- Buscar nos squads instalados (agents/)
|
|
12
|
+
- Buscar nos processos documentados (business/processos/)
|
|
13
|
+
- Buscar nos templates de campanha (business/campanhas/_template/)
|
|
14
|
+
|
|
15
|
+
SE encontrou algo que resolve → USAR direto. Nao recriar.
|
|
16
|
+
|
|
17
|
+
### Gate 2: ADAPT — Existe algo parecido?
|
|
18
|
+
- Buscar por artefato similar que pode ser adaptado
|
|
19
|
+
- Template que pode ser preenchido
|
|
20
|
+
- KB de dominio adjacente que pode ser reutilizada
|
|
21
|
+
- Processo de outra campanha que pode ser copiado
|
|
22
|
+
|
|
23
|
+
SE encontrou algo parecido → ADAPTAR. Nao criar do zero.
|
|
24
|
+
|
|
25
|
+
### Gate 3: CREATE — Nao existe nada?
|
|
26
|
+
- So agora criar do zero
|
|
27
|
+
- Ao criar: documentar para futuro reuso
|
|
28
|
+
- Usar templates padrao quando disponiveis
|
|
29
|
+
|
|
30
|
+
## Aplicacoes Praticas
|
|
31
|
+
|
|
32
|
+
| Situacao | REUSE | ADAPT | CREATE |
|
|
33
|
+
|----------|-------|-------|--------|
|
|
34
|
+
| Nova campanha | Copiar _template/ | Ajustar campanha anterior | So se for modelo novo |
|
|
35
|
+
| Novo processo | Verificar se ja tem SOP | Adaptar SOP similar | Documentar apos fazer |
|
|
36
|
+
| Novo agente | Verificar se ja existe squad/worker | Adaptar agente existente | Criar via Forge |
|
|
37
|
+
| Novo documento | Verificar biblioteca-pmi/ | Adaptar doc existente | Criar e adicionar a biblioteca |
|
|
38
|
+
|
|
39
|
+
## Regra de Ouro
|
|
40
|
+
|
|
41
|
+
**Cada artefato criado deve ser reusavel.** Se criou um processo, documente como SOP. Se criou um template, coloque em _template/. Se criou um documento, adicione a biblioteca.
|
|
42
|
+
|
|
43
|
+
O sistema fica mais rico a cada uso — nao mais poluido.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# MCP Usage — Auroq OS
|
|
2
|
+
|
|
3
|
+
## Prioridade de Ferramentas
|
|
4
|
+
|
|
5
|
+
SEMPRE preferir ferramentas nativas do Claude Code sobre MCP:
|
|
6
|
+
|
|
7
|
+
| Task | USAR | NAO USAR |
|
|
8
|
+
|------|------|----------|
|
|
9
|
+
| Ler arquivos | `Read` tool | MCP servers |
|
|
10
|
+
| Escrever arquivos | `Write` / `Edit` tools | MCP servers |
|
|
11
|
+
| Rodar comandos | `Bash` tool | MCP servers |
|
|
12
|
+
| Buscar arquivos | `Glob` tool | MCP servers |
|
|
13
|
+
| Buscar conteudo | `Grep` tool | MCP servers |
|
|
14
|
+
|
|
15
|
+
## MCP Governance
|
|
16
|
+
|
|
17
|
+
Gestao de MCP servers (add/remove/configure) e **EXCLUSIVA do Ops**.
|
|
18
|
+
|
|
19
|
+
Outros agentes sao **consumidores** de MCP, nao administradores. Se precisar de gestao MCP, delegar pro Ops.
|
|
20
|
+
|
|
21
|
+
## Quando usar MCP
|
|
22
|
+
|
|
23
|
+
1. Browser automation (Playwright) — testes, screenshots, interacao web
|
|
24
|
+
2. WhatsApp (quando configurado) — mensagens, contatos
|
|
25
|
+
3. Notion (quando configurado) — docs externos
|
|
26
|
+
4. Ferramentas externas sem equivalente nativo
|
|
27
|
+
|
|
28
|
+
## Quando NAO usar MCP
|
|
29
|
+
|
|
30
|
+
- Operacoes com arquivos locais (usar ferramentas nativas)
|
|
31
|
+
- Comandos de shell (usar Bash)
|
|
32
|
+
- Qualquer coisa que uma ferramenta nativa resolve
|
|
33
|
+
|
|
34
|
+
## Rationale
|
|
35
|
+
|
|
36
|
+
- Ferramentas nativas executam no sistema LOCAL
|
|
37
|
+
- MCP servers podem ter latencia, falhas de conexao, custos
|
|
38
|
+
- Ferramentas nativas sao mais rapidas e confiaveis pra operacoes locais
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Memoria Inteligente — Rule Global
|
|
2
|
+
|
|
3
|
+
> Todo agente no Auroq OS segue este protocolo de memoria. Nao e opcional.
|
|
4
|
+
|
|
5
|
+
## 6 Triggers — Quando Salvar
|
|
6
|
+
|
|
7
|
+
### 1. Decisao Tomada
|
|
8
|
+
SE o expert decidiu algo significativo (estrategia, preco, foco, prioridade, cancelamento):
|
|
9
|
+
→ Perguntar: "Registro essa decisao no log?"
|
|
10
|
+
→ SE sim: salvar em `agents/companion/data/log-decisoes.md` no formato:
|
|
11
|
+
```
|
|
12
|
+
## [DATA] — [TITULO]
|
|
13
|
+
**Contexto:** [situacao]
|
|
14
|
+
**Decisao:** [o que decidiu]
|
|
15
|
+
**Racional:** [por que]
|
|
16
|
+
**Impacto:** [o que muda]
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### 2. Projeto Progrediu
|
|
20
|
+
SE completou tarefa de projeto ou avancou fase:
|
|
21
|
+
→ Atualizar tracker do projeto (conforme project-tracker protocol)
|
|
22
|
+
→ Adicionar entrada no LOG do tracker
|
|
23
|
+
|
|
24
|
+
### 3. Conhecimento Criado
|
|
25
|
+
SE produziu documento, framework, analise, ou processo novo que tem valor permanente:
|
|
26
|
+
→ Perguntar: "Salvo na biblioteca? Onde faz mais sentido?"
|
|
27
|
+
→ Salvar em `docs/knowledge/` (subpasta adequada) ou `business/processos/`
|
|
28
|
+
|
|
29
|
+
### 4. Padrao Detectado
|
|
30
|
+
SE o Companion percebe comportamento recorrente (so Companion faz isso):
|
|
31
|
+
→ Registrar silenciosamente em `agents/companion/data/padroes-observados.md`
|
|
32
|
+
|
|
33
|
+
### 5. Sessao Encerrando
|
|
34
|
+
SE expert indica que vai fechar ou pede commit final:
|
|
35
|
+
→ Ops verifica no ritual de commit: contexto e trackers atualizados?
|
|
36
|
+
→ Atualizar `agents/companion/data/contexto-dinamico.md` com onde paramos
|
|
37
|
+
|
|
38
|
+
### 6. Autocompact Iminente
|
|
39
|
+
SE sessao longa e contexto pode ser compactado:
|
|
40
|
+
→ SALVAR ESTADO IMEDIATAMENTE no documento de trabalho
|
|
41
|
+
→ Atualizar contexto-dinamico se nao fez ainda
|
|
42
|
+
|
|
43
|
+
## Onde Cada Coisa Vai
|
|
44
|
+
|
|
45
|
+
| Tipo de informacao | Destino |
|
|
46
|
+
|-------------------|---------|
|
|
47
|
+
| Decisao estrategica | `agents/companion/data/log-decisoes.md` |
|
|
48
|
+
| Progresso de projeto | `business/campanhas/{projeto}/tracker.md` |
|
|
49
|
+
| Onde estamos agora | `agents/companion/data/contexto-dinamico.md` |
|
|
50
|
+
| Ideia ou pendencia | `agents/companion/data/demandas-backlog.md` |
|
|
51
|
+
| Padrao recorrente | `agents/companion/data/padroes-observados.md` |
|
|
52
|
+
| Conhecimento permanente | `docs/knowledge/{subpasta}/` |
|
|
53
|
+
| Processo documentado | `business/processos/` |
|
|
54
|
+
| Estado de trabalho (pre-autocompact) | Documento de trabalho do projeto |
|
|
55
|
+
|
|
56
|
+
## Regra de Ouro
|
|
57
|
+
|
|
58
|
+
**Na duvida, salva.** E mais barato salvar informacao que nao vai usar do que perder informacao que precisava.
|
|
59
|
+
|
|
60
|
+
## O que NAO salvar
|
|
61
|
+
|
|
62
|
+
- Conversa trivial sem decisao ou aprendizado
|
|
63
|
+
- Informacao que ja existe em outro lugar (nao duplicar)
|
|
64
|
+
- Dados temporarios que perdem valor em 24h
|
|
65
|
+
- Output intermediario que vai ser refinado (salvar so o final)
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Project Tracker Protocol — Regra para Todos os Agentes
|
|
2
|
+
|
|
3
|
+
## Quando Esta Regra se Aplica
|
|
4
|
+
|
|
5
|
+
Esta regra se aplica sempre que um agente trabalha em algo relacionado a um projeto listado no cockpit (`business/cockpit.md`).
|
|
6
|
+
|
|
7
|
+
## Protocolo Obrigatorio
|
|
8
|
+
|
|
9
|
+
### ANTES de trabalhar
|
|
10
|
+
|
|
11
|
+
1. **Ler o tracker do projeto** (path no cockpit) — entender onde estamos, quais tarefas sao suas, o que esta bloqueado
|
|
12
|
+
2. **Verificar dependencias** — se sua tarefa depende de outra que nao esta Done, nao comece (registre como blocker)
|
|
13
|
+
3. **Identificar sua tarefa** — saber exatamente o que precisa fazer antes de comecar
|
|
14
|
+
|
|
15
|
+
### DURANTE o trabalho
|
|
16
|
+
|
|
17
|
+
4. **Focar no escopo** — fazer o que o tracker define, nao mais, nao menos
|
|
18
|
+
5. **Se encontrar blocker novo** — registrar imediatamente no tracker (secao BLOCKERS)
|
|
19
|
+
|
|
20
|
+
### DEPOIS de trabalhar
|
|
21
|
+
|
|
22
|
+
6. **Atualizar o tracker** — marcar tarefas como Done + data, atualizar status
|
|
23
|
+
7. **Adicionar entrada no LOG** — uma linha: data — agente: o que fez
|
|
24
|
+
8. **Se desbloqueou outra tarefa** — isso fica visivel automaticamente pela mudanca de status da dependencia
|
|
25
|
+
9. **Se completou a ultima tarefa da fase** — atualizar a fase para Done e indicar proxima fase
|
|
26
|
+
|
|
27
|
+
### SE nao existe tracker
|
|
28
|
+
|
|
29
|
+
- Se o projeto esta no cockpit mas nao tem tracker: avisar o Euriler ("Projeto X nao tem tracker. Quer que eu crie?")
|
|
30
|
+
- Se o trabalho nao esta relacionado a nenhum projeto do cockpit: trabalhar normalmente sem tracker
|
|
31
|
+
|
|
32
|
+
## O que NAO fazer
|
|
33
|
+
|
|
34
|
+
- NAO criar tracker sem o projeto estar no cockpit
|
|
35
|
+
- NAO alterar tarefas de outros agentes (so atualizar as suas)
|
|
36
|
+
- NAO remover entradas do log (log e append-only)
|
|
37
|
+
- NAO mudar o objetivo ou fases do projeto (so o Euriler/Jarvis fazem isso)
|
|
38
|
+
|
|
39
|
+
## Formato do LOG
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
- DD/MM — @nome-agente: descricao curta do que foi feito
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Exemplo:
|
|
46
|
+
```
|
|
47
|
+
- 16/03 — @tech-ops: Configurou UTMs na LP final
|
|
48
|
+
- 15/03 — @design: Entregou criativos lote 2 (9 pecas)
|
|
49
|
+
```
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
paths:
|
|
3
|
+
- .auroq-core/data/tool-registry.yaml
|
|
4
|
+
- .mcp.json
|
|
5
|
+
---
|
|
6
|
+
# Tool Response Filtering — Dynamic Token Reduction
|
|
7
|
+
|
|
8
|
+
When processing responses from MCP tools or large web fetches, apply the filter
|
|
9
|
+
configuration defined in `.auroq-core/data/tool-registry.yaml` for the tool that
|
|
10
|
+
produced the response. This reduces context token consumption without losing
|
|
11
|
+
task-relevant information.
|
|
12
|
+
|
|
13
|
+
## Filter Types
|
|
14
|
+
|
|
15
|
+
### content
|
|
16
|
+
Extract the main informational content and discard noise (navigation, ads,
|
|
17
|
+
boilerplate, repetitive headers/footers). Limit the extracted output to
|
|
18
|
+
approximately `max_tokens` tokens, truncating at a natural paragraph or
|
|
19
|
+
sentence boundary. If `extract` fields are specified, prioritize those
|
|
20
|
+
fields from the response object.
|
|
21
|
+
|
|
22
|
+
**Apply to:** WebFetch HTML responses, EXA search results, Context7 docs.
|
|
23
|
+
|
|
24
|
+
### schema
|
|
25
|
+
From a JSON object or array of objects, select ONLY the fields listed in
|
|
26
|
+
`fields`. Discard all other keys. If `max_tokens` is set, truncate the
|
|
27
|
+
serialized result at that token limit.
|
|
28
|
+
|
|
29
|
+
**Apply to:** Playwright page data, API responses with known schemas.
|
|
30
|
+
|
|
31
|
+
### field
|
|
32
|
+
From an array of objects (tabular data), project ONLY the columns listed
|
|
33
|
+
in `fields` and limit the result to `max_rows` rows. This is analogous to
|
|
34
|
+
`SELECT field1, field2 FROM data LIMIT max_rows`.
|
|
35
|
+
|
|
36
|
+
**Apply to:** Apify scraper results, database query results, CSV-like data.
|
|
37
|
+
|
|
38
|
+
## How to Apply
|
|
39
|
+
|
|
40
|
+
1. After receiving a tool response, identify the tool name.
|
|
41
|
+
2. Look up the tool in `tool-registry.yaml` → check for a `filter` key.
|
|
42
|
+
3. If a filter exists, apply the corresponding type rules above.
|
|
43
|
+
4. If NO filter exists for the tool, use the full response as-is.
|
|
44
|
+
5. Present the filtered result in your reasoning — do NOT repeat the raw
|
|
45
|
+
unfiltered payload.
|
|
46
|
+
|
|
47
|
+
## Fallback
|
|
48
|
+
|
|
49
|
+
If the filter would remove ALL content (empty result), fall back to the
|
|
50
|
+
full unfiltered response. Never produce an empty result from filtering.
|
|
51
|
+
|
|
52
|
+
## Performance Note
|
|
53
|
+
|
|
54
|
+
This is a zero-overhead optimization. The filter is applied during your
|
|
55
|
+
reasoning step — no external scripts are invoked. The utility scripts at
|
|
56
|
+
`.auroq-core/utils/filters/` are available for batch post-processing of
|
|
57
|
+
saved responses but are NOT required during normal tool use.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "language": "portuguese" }
|