Bootstrap EDEN: Fase 0 (arquitetura) e Fase 1 (monorepo + infra)
Fase 0 — descoberta e arquitetura:
- Inventário do projeto, glossário de domínio, arquitetura com bounded
contexts e topologia de containers, threat model inicial.
- 12 ADRs cobrindo modular monolith, topologia de containers (Postgres
isolado + eden-core/parceiros/assinante em containers e portas
distintos), auth/sessões, modelo de permissões, criptografia/segredos,
contrato first-class, stock ledger, separação billing/finance/fiscal,
outbox transacional, adapters SaperX e Focus NFe, e identidade
compartilhada entre as 3 apps.
- 14 subagentes e 7 skills especializados por domínio em .claude/.
- Hooks de segurança (PreToolUse/PostToolUse/Stop) testados via pipe.
Fase 1 — plataforma (em andamento):
- Monorepo pnpm workspaces + Turborepo: apps/{api,worker,core-web,
reseller-web,subscriber-web} + 9 packages compartilhados.
- apps/api: NestJS mínimo com /health/live e /health/ready (checando
Postgres real via @eden/database).
- 3 frontends Vite + React + TypeScript + Tailwind, com o favicon
oficial do EDEN.
- packages/database: migration baseline (node-pg-migrate) criando
roles/role_permissions/applications/users/user_applications/sessions/
audit_log — audit log append-only com hash-chain, testado ao vivo
(UPDATE/DELETE bloqueados pelo trigger).
- compose.yaml implementando a topologia da ADR-0002, validada de ponta
a ponta: os 6 containers sobem e ficam saudáveis com um único
`docker compose up`.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
18
.claude/skills/eden-fiscal/SKILL.md
Normal file
18
.claude/skills/eden-fiscal/SKILL.md
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
name: eden-fiscal
|
||||
description: Fiscal catalog and Focus NFe integration conventions for EDEN (NCM/CFOP/municipality catalogs, product fiscal profiles, NFCom/NFS-e/recibo de locação). Load when implementing any fiscal classification or emission logic.
|
||||
---
|
||||
|
||||
# EDEN fiscal skill
|
||||
|
||||
## When to use
|
||||
- Porting or extending a fiscal catalog table → `references/focus-nfcom.md` / `references/focus-nfse.md` for emission specifics; see `eden.md` §5.2-5.3 (via `eden-domain` skill's index) for the exact catalog shapes.
|
||||
- Implementing recibo de locação → `references/rental-receipt.md`.
|
||||
|
||||
## References
|
||||
- `references/focus-nfcom.md`
|
||||
- `references/focus-nfse.md`
|
||||
- `references/rental-receipt.md`
|
||||
|
||||
## Rule
|
||||
A fiscal document is always a consequence of a billing item already classified via `product_fiscal_profiles` — never hardcoded per screen (ADR-0011, Master Prompt §6.11).
|
||||
5
.claude/skills/eden-fiscal/references/focus-nfcom.md
Normal file
5
.claude/skills/eden-fiscal/references/focus-nfcom.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# Focus NFCom adapter (Master Prompt §6.11, ADR-0011)
|
||||
|
||||
Implement: adapter, unique/idempotent reference per document, emission, query, cancellation, webhooks, persistence of the normalized request without secrets, response/status, keys/identifiers, XML/PDF artifacts when available, retries with backoff, dead-letter/manual retry.
|
||||
|
||||
Classification comes from `product_fiscal_profiles` (`document_type = 'NFCOM'`, `nfcom_cclass_id`, etc.) — never inferred ad hoc at emission time.
|
||||
3
.claude/skills/eden-fiscal/references/focus-nfse.md
Normal file
3
.claude/skills/eden-fiscal/references/focus-nfse.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Focus NFS-e adapter (Master Prompt §6.11, ADR-0011)
|
||||
|
||||
Asynchronous flow: envio → status processando → consulta/webhook → autorizada/rejeitada → cancelamento/substituição where applicable. Municipal particularities isolated in configuration/adapter, never hardcoded in the domain (municipalities vary widely — reuse the legacy's `fiscal_nfse_trib_nacional`/`fiscal_nfse_trib_municipal` catalog split).
|
||||
3
.claude/skills/eden-fiscal/references/rental-receipt.md
Normal file
3
.claude/skills/eden-fiscal/references/rental-receipt.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Recibo de locação (Master Prompt §6.11)
|
||||
|
||||
Own document type for locação billing when that's the legal/tax classification defined by Handix/contabilidade — not a generic invoice. Versioned template, numbering, issuing legal entity, locatário, competência, itens, valores, and linkage to contract/invoice. Never encode a specific tax interpretation as universal — this classification must be reviewable by Handix's fiscal/accounting team.
|
||||
Reference in New Issue
Block a user