Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .specs/sprints/task-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ Checklist que precisa estar 100% antes de marcar como `done` no `BACKLOG.md`.
- [ ] Mudanças de schema ou contrato registradas em ADR.
- [ ] Status atualizado em `BACKLOG.md` e em `sprint-XX/SPRINT.md`.

> Se a task tocar `simplicio_mapper/` (pacote Python): nenhuma issue/task
> fecha sem cobrir as 7 dimensões — implementation, unit, integration,
> system, regression, perf benchmark e coverage >= 85% (piso de CI real é
> 88%, ver `.github/workflows/python-ci.yml` e a seção "DoD específico do
> pacote Python" em `AGENTS.md`).

## Pegadinhas conhecidas

Liste armadilhas, dívida técnica encostada, comportamentos não óbvios. Atualize conforme o time descobre durante a execução.
Expand Down
20 changes: 20 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,26 @@ PR só faz merge quando **todos** os itens abaixo estão marcados:

CI bloqueia merge se DoD falhar (`.github/workflows/dod.yml`).

### DoD específico do pacote Python (`simplicio_mapper/`)

O checklist acima é o DoD genérico do scaffold (Node/npm). Para trabalho dentro
de `simplicio_mapper/` (o pacote Python canônico), nenhuma issue/task fecha
sem cobrir as **7 dimensões** abaixo — regra explícita, não é opcional:

- [ ] **Implementation** — o código de produção que a task pede, sem escopo extra.
- [ ] **Unit** — cobre a lógica isolada do módulo tocado (`tests/python/test_*.py`).
- [ ] **Integration** — cobre a interação entre módulos/CLI (ex.: dispatch via `main()`, `cli/_repo_commands.py`).
- [ ] **System** — cobre o fluxo ponta-a-ponta via entry point real (ex.: `simplicio-mapper snapshot ...` contra um repo de verdade), não só unidades isoladas.
- [ ] **Regression** — todo bug real corrigido ganha um teste que trava a regressão (não só o fix).
- [ ] **Perf benchmark** — quando a mudança toca caminho quente (retrieval, indexação, parsing em escala), roda `python3 scripts/runtime_scale_benchmark.py` (ou o benchmark relevante em `scripts/*_benchmark.py`) e reporta o número; não é "achismo".
- [ ] **Coverage >= 85%** — piso do pacote Python. O gate real de CI (`.github/workflows/python-ci.yml`, job `python-tests`) já roda `python -m pytest tests/python -q --cov=simplicio_mapper --cov-report=term --cov-fail-under=88`, ou seja, o piso de CI (88%) é mais estrito que este mínimo (85%) — nunca reduzir o `--cov-fail-under` do workflow para acomodar uma task.

Comando de verificação local (mesmo usado no CI):

```bash
python -m pytest tests/python -q --cov=simplicio_mapper --cov-report=term --cov-fail-under=88
```

---

## Padrões de código
Expand Down
20 changes: 20 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,26 @@ PR só faz merge quando **todos** os itens abaixo estão marcados:

CI bloqueia merge se DoD falhar (`.github/workflows/dod.yml`).

### DoD específico do pacote Python (`simplicio_mapper/`)

O checklist acima é o DoD genérico do scaffold (Node/npm). Para trabalho dentro
de `simplicio_mapper/` (o pacote Python canônico), nenhuma issue/task fecha
sem cobrir as **7 dimensões** abaixo — regra explícita, não é opcional:

- [ ] **Implementation** — o código de produção que a task pede, sem escopo extra.
- [ ] **Unit** — cobre a lógica isolada do módulo tocado (`tests/python/test_*.py`).
- [ ] **Integration** — cobre a interação entre módulos/CLI (ex.: dispatch via `main()`, `cli/_repo_commands.py`).
- [ ] **System** — cobre o fluxo ponta-a-ponta via entry point real (ex.: `simplicio-mapper snapshot ...` contra um repo de verdade), não só unidades isoladas.
- [ ] **Regression** — todo bug real corrigido ganha um teste que trava a regressão (não só o fix).
- [ ] **Perf benchmark** — quando a mudança toca caminho quente (retrieval, indexação, parsing em escala), roda `python3 scripts/runtime_scale_benchmark.py` (ou o benchmark relevante em `scripts/*_benchmark.py`) e reporta o número; não é "achismo".
- [ ] **Coverage >= 85%** — piso do pacote Python. O gate real de CI (`.github/workflows/python-ci.yml`, job `python-tests`) já roda `python -m pytest tests/python -q --cov=simplicio_mapper --cov-report=term --cov-fail-under=88`, ou seja, o piso de CI (88%) é mais estrito que este mínimo (85%) — nunca reduzir o `--cov-fail-under` do workflow para acomodar uma task.

Comando de verificação local (mesmo usado no CI):

```bash
python -m pytest tests/python -q --cov=simplicio_mapper --cov-report=term --cov-fail-under=88
```

---

## Padrões de código
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@
"rationale": "stable strategy order; renderer chooses coordinates"
}
],
"mapper_version": "0.20.0",
"mapper_version": "0.0.0",
"project": {
"file_count": 3,
"root": "."
Expand Down Expand Up @@ -934,15 +934,15 @@
"rationale": "stable strategy order; renderer chooses coordinates"
}
],
"mapper_version": "0.20.0",
"mapper_version": "0.0.0",
"nodes": [
{
"canonical": "cli/commands.py",
"id": "file:145bdf0adbfba8d6",
"kind": "file",
"language": "python",
"metrics": {
"size_bytes": 43
"size_bytes": 41
},
"name": "commands.py",
"parent_id": "module:26f9252a7a7e4177",
Expand All @@ -954,7 +954,7 @@
"kind": "file",
"language": "python",
"metrics": {
"size_bytes": 112
"size_bytes": 105
},
"name": "main.py",
"parent_id": "module:26f9252a7a7e4177",
Expand All @@ -966,7 +966,7 @@
"kind": "file",
"language": "toml",
"metrics": {
"size_bytes": 51
"size_bytes": 48
},
"name": "pyproject.toml",
"parent_id": "module:5a219264bc5d86e9",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@
"rationale": "stable strategy order; renderer chooses coordinates"
}
],
"mapper_version": "0.20.0",
"mapper_version": "0.0.0",
"project": {
"file_count": 4,
"root": "."
Expand Down Expand Up @@ -982,15 +982,15 @@
"rationale": "stable strategy order; renderer chooses coordinates"
}
],
"mapper_version": "0.20.0",
"mapper_version": "0.0.0",
"nodes": [
{
"canonical": "package.json",
"id": "file:d7f6204f00b61069",
"kind": "file",
"language": "json",
"metrics": {
"size_bytes": 51
"size_bytes": 50
},
"name": "package.json",
"parent_id": "module:5a219264bc5d86e9",
Expand All @@ -1002,7 +1002,7 @@
"kind": "file",
"language": "javascript",
"metrics": {
"size_bytes": 77
"size_bytes": 75
},
"name": "consumer.js",
"parent_id": "module:04164df2fbf7cf9b",
Expand All @@ -1014,7 +1014,7 @@
"kind": "file",
"language": "json",
"metrics": {
"size_bytes": 39
"size_bytes": 38
},
"name": "events.json",
"parent_id": "module:04164df2fbf7cf9b",
Expand All @@ -1026,7 +1026,7 @@
"kind": "file",
"language": "javascript",
"metrics": {
"size_bytes": 125
"size_bytes": 122
},
"name": "producer.js",
"parent_id": "module:04164df2fbf7cf9b",
Expand Down
Loading
Loading