sinapse-ai 7.7.5 → 7.7.7
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/.claude/CLAUDE.md +1 -0
- package/.claude/rules/security-data-protection.md +233 -0
- package/.codex/delegation-matrix.json +364 -475
- package/.codex/handoff-packet.schema.json +13 -93
- package/.codex/scripts/resolve-codex-delegation-parity.js +205 -0
- package/.codex/scripts/resolve-codex-delegation.js +92 -121
- package/.codex/tasks/route-sinapse-request.md +2 -2
- package/.sinapse-ai/constitution.md +67 -1
- package/.sinapse-ai/core/doctor/checks/constitution-consistency.js +1 -0
- package/.sinapse-ai/core/health-check/checks/project/constitution-consistency.js +1 -0
- package/.sinapse-ai/data/entity-registry.yaml +757 -764
- package/.sinapse-ai/data/registry-update-log.jsonl +3 -0
- package/.sinapse-ai/infrastructure/scripts/validate-codex-delegation.js +5 -3
- package/.sinapse-ai/install-manifest.yaml +12 -12
- package/.sinapse-ai/product/templates/ide-rules/claude-rules.md +1 -0
- package/docs/codex-delegation-parity.md +115 -0
- package/docs/codex-parity-program.md +7 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# SINAPSE Constitution
|
|
2
2
|
|
|
3
|
-
> **Version:** 2.
|
|
3
|
+
> **Version:** 2.2.0 | **Ratified:** 2025-01-30 | **Last Amended:** 2026-04-03
|
|
4
4
|
|
|
5
5
|
Este documento define os princípios fundamentais e inegociáveis do SINAPSE. Todos os agentes, tasks, e workflows DEVEM respeitar estes princípios. Violações são bloqueadas automaticamente via gates.
|
|
6
6
|
|
|
@@ -239,6 +239,72 @@ Usuários são product builders, não especialistas em git. Agentes DEVEM gerenc
|
|
|
239
239
|
|
|
240
240
|
---
|
|
241
241
|
|
|
242
|
+
### X. Security & Data Protection (NON-NEGOTIABLE)
|
|
243
|
+
|
|
244
|
+
Todo projeto que manipula dados de usuarios DEVE seguir praticas de seguranca rigorosas. Nenhum atalho e aceito — seguranca e inegociavel desde o primeiro commit.
|
|
245
|
+
|
|
246
|
+
**Regras — Banco de Dados:**
|
|
247
|
+
- MUST: TODA tabela com dados de usuario DEVE ter Row Level Security (RLS) ativado
|
|
248
|
+
- MUST: Chave `service_role` NUNCA exposta no frontend — apenas no servidor
|
|
249
|
+
- MUST: Queries DEVEM ser parametrizadas (`$1, $2`) — NUNCA string interpolation
|
|
250
|
+
- MUST: Cada servico DEVE usar role com privilegios minimos (principio do menor privilegio)
|
|
251
|
+
- MUST: Dados sensiveis (CPF, cartao, saude) DEVEM ser criptografados em repouso
|
|
252
|
+
|
|
253
|
+
**Regras — APIs:**
|
|
254
|
+
- MUST: TODA API publica DEVE ter rate limiting configurado
|
|
255
|
+
- MUST: TODA API DEVE validar input (schema validation com Zod ou equivalente)
|
|
256
|
+
- MUST: CORS DEVE restringir origens permitidas (NUNCA `origin: '*'` em producao)
|
|
257
|
+
- MUST: Headers de seguranca DEVEM estar ativos (helmet ou equivalente)
|
|
258
|
+
- MUST: Autenticacao DEVE usar OAuth 2.0 / OIDC ou Supabase Auth
|
|
259
|
+
|
|
260
|
+
**Regras — Secrets & Keys:**
|
|
261
|
+
- MUST: API keys, tokens e credenciais DEVEM estar em variaveis de ambiente (.env)
|
|
262
|
+
- MUST: Arquivos .env NUNCA commitados no repositorio (gitignore obrigatorio)
|
|
263
|
+
- MUST: .env.example DEVE existir com placeholders (sem valores reais)
|
|
264
|
+
- MUST: Variaveis prefixadas com `NEXT_PUBLIC_` sao PUBLICAS — NUNCA colocar secrets nelas
|
|
265
|
+
- MUST: Rotacao de chaves DEVE ser feita ao menor sinal de vazamento
|
|
266
|
+
- MUST NOT: Nenhum agente pode commitar arquivos contendo credentials em plaintext
|
|
267
|
+
|
|
268
|
+
**Regras — LGPD (Lei Geral de Protecao de Dados):**
|
|
269
|
+
- MUST: Consentimento explicito DEVE ser coletado antes de processar dados pessoais (Art. 7)
|
|
270
|
+
- MUST: Usuarios DEVEM poder acessar, corrigir e deletar seus dados (Art. 18)
|
|
271
|
+
- MUST: DPO/Encarregado DEVE ser designado para projetos com dados pessoais (Art. 37)
|
|
272
|
+
- MUST: Medidas de seguranca tecnica DEVEM proteger dados contra acesso nao autorizado (Art. 46)
|
|
273
|
+
- MUST: Incidentes de seguranca DEVEM ser notificados a ANPD e titulares (Art. 48)
|
|
274
|
+
- MUST: Dados pessoais DEVEM ter periodo de retencao definido e documentado
|
|
275
|
+
- MUST: Audit logging DEVE registrar todo acesso a dados pessoais
|
|
276
|
+
|
|
277
|
+
**Regras — Repositorio:**
|
|
278
|
+
- MUST: Repositorios com codigo de producao DEVEM ser privados por padrao
|
|
279
|
+
- MUST: Branch protection DEVE estar ativa em main (PR + approval)
|
|
280
|
+
- MUST: GitHub Secret Scanning DEVE estar habilitado
|
|
281
|
+
- MUST: Dependabot DEVE estar configurado para alertas de seguranca
|
|
282
|
+
- MUST: CODEOWNERS DEVE proteger arquivos criticos
|
|
283
|
+
|
|
284
|
+
**Delegacao:**
|
|
285
|
+
|
|
286
|
+
| Dominio de Seguranca | Agente Responsavel |
|
|
287
|
+
|----------------------|-------------------|
|
|
288
|
+
| Threat modeling, MITRE ATT&CK | @cyber-orqx → Shield (threat-analyst) |
|
|
289
|
+
| Penetration testing, OWASP | @cyber-orqx → Breach (penetration-tester) |
|
|
290
|
+
| SOC, detection engineering | @cyber-orqx → Sentinel (soc-analyst) |
|
|
291
|
+
| Incident response | @cyber-orqx → Rapid (incident-responder) |
|
|
292
|
+
| Cloud security, IAM, encryption | @cyber-orqx → Nimbus (cloud-security-engineer) |
|
|
293
|
+
| Network security, zero trust | @cyber-orqx → Wire (network-security-engineer) |
|
|
294
|
+
| LGPD, GDPR, SOC 2, ISO 27001 | @cyber-orqx → Govern (compliance-officer) |
|
|
295
|
+
| Database security, RLS | @data-engineer (Dara) |
|
|
296
|
+
| Application security, hooks | @developer (Dex) + hooks automaticos |
|
|
297
|
+
|
|
298
|
+
**Gates:**
|
|
299
|
+
- Hook `sql-governance.py` — BLOCK DDL perigoso
|
|
300
|
+
- Hook `secret-scanning.cjs` — BLOCK credentials em commits
|
|
301
|
+
- Hook `staged-secret-scan.js` — BLOCK .env e tokens pre-commit
|
|
302
|
+
- Checklist: `.claude/rules/security-data-protection.md`
|
|
303
|
+
|
|
304
|
+
**Rule file:** `.claude/rules/security-data-protection.md`
|
|
305
|
+
|
|
306
|
+
---
|
|
307
|
+
|
|
242
308
|
## Governance
|
|
243
309
|
|
|
244
310
|
### Amendment Process
|
|
@@ -28,6 +28,7 @@ const EXPECTED_ARTICLES = [
|
|
|
28
28
|
{ number: 'VII', title: 'Ecosystem Metrics Accuracy', severity: 'NON-NEGOTIABLE' },
|
|
29
29
|
{ number: 'VIII', title: 'Mandatory Delegation', severity: 'NON-NEGOTIABLE' },
|
|
30
30
|
{ number: 'IX', title: 'Safe Collaboration', severity: 'NON-NEGOTIABLE' },
|
|
31
|
+
{ number: 'X', title: 'Security & Data Protection', severity: 'NON-NEGOTIABLE' },
|
|
31
32
|
];
|
|
32
33
|
|
|
33
34
|
/**
|