Skip to content

feat(flutter): WA-E4 UX curadoria de corpos d'água - #465

Merged
sraphaz merged 3 commits into
mainfrom
feat/wa-e4-water-bodies-curation-ux
Aug 10, 2026
Merged

feat(flutter): WA-E4 UX curadoria de corpos d'água#465
sraphaz merged 3 commits into
mainfrom
feat/wa-e4-water-bodies-curation-ux

Conversation

@sraphaz

@sraphaz sraphaz commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • Assets: criar corpo d'água (natural + subtype) com linguagem de cuidado; lista/curadoria contextual
  • Mapa: subtítulo do pin hídrico; l10n pt/en
  • Sem NaturalAsset / HIGH-RESTRICTED (FASE24.0)

Spec-Id: water-bodies-curation

Test plan

  • dart analyze assets + map_screen
  • flutter gen-l10n
  • CI verde
  • Smoke: Assets → Água → Nascente → criar; filtro Corpos d'água no mapa após curadoria

Made with Cursor

Summary by CodeRabbit

  • New Features

    • Added support for creating and classifying water bodies with localized subtype selection.
    • Added water-body curation actions, statuses, validation, and care-oriented guidance.
    • Water-body map pins now display localized subtype labels.
    • Added English and Portuguese translations for water-body workflows and empty states.
  • Documentation

    • Updated water-body feature specifications, backlog status, phase tracking, and changelog.

Permite sugerir type=natural+subtype no app com copy de cuidado, lista/curadoria contextual e subtítulo hídrico no mapa.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown
Contributor

PR Steward — Apontamentos de bots

Regra obrigatória

Todo apontamento de bot deve ser resolvido ou respondido antes de merge. Não deixar threads abertas em arquivos alterados neste PR.

Checklist

  • CI verde (build-test, Flutter, Agents Gates, CodeQL)
  • CodeRabbit / reviews — todos os threads tratados
  • Dependabot / segurança — CVEs novas endereçadas ou justificadas
  • Comentários inline em arquivos do diff — resolvidos ou respondidos
  • sync-docs-check sem erros bloqueantes
  • Corpo do PR preenchido (template agente)

Como resolver

./scripts/agents/arah-agents.ps1 bot-review -PrNumber <N>
./scripts/agents/arah-agents.ps1 pr-ready -PrNumber <N>

Merge

  • Steward posta ready-for-merge quando pr-ready passa.
  • Humano executa merge (ou workflow_dispatch em agents-pr-steward.yml com confirmação).

Automático via agents-pr-steward.yml

Status: CI OK — revisar checklist

@github-actions github-actions Bot added the ready-for-merge PR aprovado pelo steward; merge humano label Aug 10, 2026
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@sraphaz, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 35 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: cb25ffa4-0911-4a3f-8f38-b8ba6f64211c

📥 Commits

Reviewing files that changed from the base of the PR and between 54331e4 and a40fdf0.

📒 Files selected for processing (10)
  • docs/CHANGELOG.md
  • docs/backlog-api/CORPOS_DAGUA_TERRITORIO.md
  • frontend/arah.app/lib/features/assets/data/models/asset_item.dart
  • frontend/arah.app/lib/features/assets/presentation/screens/assets_screen.dart
  • frontend/arah.app/lib/features/map/presentation/screens/map_screen.dart
  • frontend/arah.app/lib/l10n/app_en.arb
  • frontend/arah.app/lib/l10n/app_localizations.dart
  • frontend/arah.app/lib/l10n/app_localizations_en.dart
  • frontend/arah.app/lib/l10n/app_localizations_pt.dart
  • frontend/arah.app/lib/l10n/app_pt.arb
📝 Walkthrough

Walkthrough

The Flutter asset flow now supports water-body creation, subtype classification, localized curation actions, and map-pin subtitles. Asset models, creation APIs, localization resources, map presentation, and WA-E4 documentation were updated.

Changes

Water-body curation

Layer / File(s) Summary
Asset subtype contracts and creation API
frontend/arah.app/lib/features/assets/data/models/asset_item.dart, frontend/arah.app/lib/features/assets/data/repositories/assets_repository.dart, frontend/arah.app/lib/features/assets/presentation/providers/assets_provider.dart
AssetItem now reads and normalizes water-body subtypes. Asset creation forwards non-empty subtype values through the provider and repository.
Localized asset creation and curation
frontend/arah.app/lib/features/assets/presentation/screens/assets_screen.dart, frontend/arah.app/lib/l10n/*
The asset screen supports water-body selection, subtype validation, localized labels, empty states, list subtitles, and curation outcomes. English and Portuguese localization resources include the new messages.
Water-body map pin labels
frontend/arah.app/lib/features/map/presentation/screens/map_screen.dart
Map pins display localized water-body kinds derived from subtype or legacy type values.
Phase and feature documentation
docs/CHANGELOG.md, docs/STATUS_FASES.md, docs/_meta/PHASE_QUEUE.yaml, docs/backlog-api/CORPOS_DAGUA_TERRITORIO.md, docs/specs/features/water-bodies-curation.spec.yaml
WA-E4 completion, water-body curation scope, and the Flutter implementation are recorded in project documentation.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant AssetsScreen
  participant AssetsNotifier
  participant AssetsRepository
  participant MapScreen
  participant AppLocalizations

  AssetsScreen->>AssetsNotifier: Create water-body with subtype
  AssetsNotifier->>AssetsRepository: Send optional subtype
  AssetsRepository-->>AssetsNotifier: Return asset result
  AssetsNotifier-->>AssetsScreen: Refresh asset list
  MapScreen->>AppLocalizations: Resolve localized water-body pin label
  AppLocalizations-->>MapScreen: Return pin subtitle
Loading

Possibly related PRs

  • sraphaz/arah#462: Introduces the water-body curation concepts and subtype terminology used here.
  • sraphaz/arah#463: Adds the water-body subtype support extended by this Flutter flow.
  • sraphaz/arah#464: Adds related water-body subtype handling for map presentation.

Suggested reviewers: cursoragent

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning A descrição resume a mudança e o plano de testes, mas omite várias seções obrigatórias do template, incluindo tipo, documentação, links, screenshots e breaking changes. Complete a descrição com as seções do template, marque os itens aplicáveis e registre testes pendentes, documentos atualizados, links relacionados e screenshots de UI.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed O título identifica de forma clara e concisa a implementação da UX de curadoria de corpos d’água no Flutter.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/wa-e4-water-bodies-curation-ux

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

QA Agent — Checklist

Revise este PR conforme docs/21_CODE_REVIEW.md e docs/22_COHESION_AND_TESTS.md.

Arquitetura

  • Dependências apontam para dentro (Clean Architecture)
  • Territory sem lógica social embutida
  • Nomenclatura: territory, items, membership (nunca place/listings)

Testes

  • Comportamento novo tem teste
  • run-tests passou na área alterada
  • Sem regressão óbvia em edge cases

UI (se aplicável)

  • Mobile-first
  • Sem cores hardcoded (variáveis CSS / tokens)
  • Acessibilidade básica (labels, contraste)

PR

  • Escopo atômico
  • sync-docs aplicado
  • Corpo do PR preenchido (template agente)

Automático via agents-gates.yml — comentário orientativo; merge continua humano.

Status gates: ✅ Gates automáticos passaram

@github-actions

Copy link
Copy Markdown
Contributor

Security Agent — Relatório

Dependências

  • dotnet list package --vulnerable sem críticas novas
  • lock files commitados quando deps mudaram

Secrets

  • Nenhum token/senha/API key no diff
  • Sem .env ou credenciais em paths rastreados

LGPD / dados sensíveis

  • Sem log de PII desnecessário
  • Dados sensíveis conforme SECURITY.md

Bloqueio recomendado

  • CVE crítico novo → não mergear até correção
  • Secret no diff → reverter imediatamente

Automático via agents-gates.yml.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 54331e46fb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +127 to +131
await ref.read(assetsProvider.notifier).createAsset(
name: name,
type: 'natural',
subtype: waterSubtype,
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Bypass the cached list after creating a water body

With the default BFF configuration, opening this screen caches the GET assets?territoryId=... response for 60 seconds, while the subsequent POST does not invalidate that cache. AssetsNotifier.createAsset then calls refresh(), which receives the cached pre-creation list, so a successfully created water body disappears from the UI until the cache expires and another refresh occurs. Preserve the returned item in state, invalidate the assets cache after mutations, or otherwise force an uncached refresh.

Useful? React with 👍 / 👎.

Comment on lines 138 to 143
if (ctx.mounted) {
Navigator.pop(ctx);
showSuccessSnackBar(
ctx,
asWaterBody ? l10n.waterBodySuggested : l10n.assetCreated,
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Report missing geolocation instead of claiming creation

When location permission is denied or the position has not loaded, AssetsNotifier.createAsset returns early because geo == null; it does not throw or create anything. This branch nevertheless closes the dialog and shows waterBodySuggested, causing the user to lose their input and believe the water body was registered. Gate submission on an available location or make the notifier report failure before showing success.

Useful? React with 👍 / 👎.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
frontend/arah.app/lib/features/assets/presentation/screens/assets_screen.dart (1)

52-159: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Dispose the dialog controllers.

Lines 54 and 55 create TextEditingController instances that are never disposed. Repeated dialog use keeps their listeners and state alive after the dialog closes.

Wrap showDialog in try/finally and dispose both nameController and typeController in finally.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@frontend/arah.app/lib/features/assets/presentation/screens/assets_screen.dart`
around lines 52 - 159, Update _showCreateDialog to wrap the await showDialog
call in a try/finally block, and dispose nameController and typeController in
the finally block so both controllers are released after the dialog closes or
fails.
🧹 Nitpick comments (1)
frontend/arah.app/lib/features/assets/presentation/screens/assets_screen.dart (1)

190-202: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Remove the raw fixed height.

Line 191 uses height: 240. Use a semantic layout token or token-based padding instead of an arbitrary pixel value.

As per coding guidelines, “Use design tokens for spacing and typography, following the 8px spacing scale; do not use arbitrary pixel values.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@frontend/arah.app/lib/features/assets/presentation/screens/assets_screen.dart`
around lines 190 - 202, Replace the raw height value in the no-assets
empty-state layout around the Text widget with a semantic design token or
token-based spacing that follows the established 8px scale. Preserve the
centered, padded message layout and reuse an existing AppConstants token rather
than introducing an arbitrary pixel value.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/backlog-api/CORPOS_DAGUA_TERRITORIO.md`:
- Line 85: Update the WA-E4 entry to replace “pin mapa” with “subtítulo do pin
mapa” or explicitly reference WA-E2 for map-pin ownership, while preserving the
existing Flutter create/list/curate and NaturalAsset details.

In `@docs/CHANGELOG.md`:
- Around line 12-16: Update the `Última Atualização` changelog footer date from
2026-08-05 to 2026-08-10, leaving the surrounding changelog entries unchanged.

In `@frontend/arah.app/lib/features/assets/data/models/asset_item.dart`:
- Around line 50-54: The water-body kind resolution must accept only allowlisted
values. In
frontend/arah.app/lib/features/assets/data/models/asset_item.dart#L50-L54,
update AssetItem.waterBodyKind to return the normalized subtype only when it
appears in kWaterBodySubtypeValues, otherwise fall back to the normalized legacy
type only when that type is allowlisted. In
frontend/arah.app/lib/features/map/presentation/screens/map_screen.dart#L398-L405,
resolve an allowlisted normalized MapPin.assetSubtype first, then an allowlisted
normalized assetType so blank or invalid subtypes do not block the fallback.

In
`@frontend/arah.app/lib/features/assets/presentation/screens/assets_screen.dart`:
- Around line 256-262: Update _assetSubtitle to localize asset.status before
constructing base, mapping every supported backend status to its corresponding
AppLocalizations key while preserving a fallback for unknown values. Keep the
existing kind and validation metadata formatting unchanged.
- Around line 121-153: Update the create dialog’s FilledButton handler to track
an in-flight submission state, disable the button while createAsset is awaiting,
and restore the enabled state only when the request fails. Keep the existing
success flow, including closing the dialog, unchanged; apply this behavior to
both water-body and regular asset creation paths.

---

Outside diff comments:
In
`@frontend/arah.app/lib/features/assets/presentation/screens/assets_screen.dart`:
- Around line 52-159: Update _showCreateDialog to wrap the await showDialog call
in a try/finally block, and dispose nameController and typeController in the
finally block so both controllers are released after the dialog closes or fails.

---

Nitpick comments:
In
`@frontend/arah.app/lib/features/assets/presentation/screens/assets_screen.dart`:
- Around line 190-202: Replace the raw height value in the no-assets empty-state
layout around the Text widget with a semantic design token or token-based
spacing that follows the established 8px scale. Preserve the centered, padded
message layout and reuse an existing AppConstants token rather than introducing
an arbitrary pixel value.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e16596ed-10f5-407d-ab50-9a8b815abe2b

📥 Commits

Reviewing files that changed from the base of the PR and between 08ce6c9 and 54331e4.

📒 Files selected for processing (15)
  • docs/CHANGELOG.md
  • docs/STATUS_FASES.md
  • docs/_meta/PHASE_QUEUE.yaml
  • docs/backlog-api/CORPOS_DAGUA_TERRITORIO.md
  • docs/specs/features/water-bodies-curation.spec.yaml
  • frontend/arah.app/lib/features/assets/data/models/asset_item.dart
  • frontend/arah.app/lib/features/assets/data/repositories/assets_repository.dart
  • frontend/arah.app/lib/features/assets/presentation/providers/assets_provider.dart
  • frontend/arah.app/lib/features/assets/presentation/screens/assets_screen.dart
  • frontend/arah.app/lib/features/map/presentation/screens/map_screen.dart
  • frontend/arah.app/lib/l10n/app_en.arb
  • frontend/arah.app/lib/l10n/app_localizations.dart
  • frontend/arah.app/lib/l10n/app_localizations_en.dart
  • frontend/arah.app/lib/l10n/app_localizations_pt.dart
  • frontend/arah.app/lib/l10n/app_pt.arb

Comment thread docs/backlog-api/CORPOS_DAGUA_TERRITORIO.md Outdated
Comment thread docs/CHANGELOG.md
Comment thread frontend/arah.app/lib/features/assets/data/models/asset_item.dart Outdated
Comment thread frontend/arah.app/lib/features/assets/presentation/screens/assets_screen.dart Outdated
@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Agente acionado: Spec Steward (SDD)

ID: spec-steward | Quando: 2026-08-10T16:25:02Z UTC | Gatilho: pull_request:synchronize
Workflow: 31408526254

Verificações automáticas de conduta

✅ Guardrail no_merge
✅ Guardrail require_ci (opcional por agente)
✅ Checklist de conduta (checklists/spec-steward.checklist.md)
❌ Escopo de paths respeitado — fora do escopo: docs/CHANGELOG.md, docs/STATUS_FASES.md, docs/_meta/PHASE_QUEUE.yaml, docs/backlog-api/CORPOS_DAGUA_TERRITORIO.md, frontend/arah.app/lib/features/assets/data/models/asset_item.dart, frontend/arah.app/lib/features/assets/data/repositories/assets_repository.dart, frontend/arah.app/lib/features/assets/presentation/providers/assets_provider.dart, frontend/arah.app/lib/features/assets/presentation/screens/assets_screen.dart, frontend/arah.app/lib/features/map/presentation/screens/map_screen.dart, frontend/arah.app/lib/l10n/app_en.arb, frontend/arah.app/lib/l10n/app_localizations.dart, frontend/arah.app/lib/l10n/app_localizations_en.dart, frontend/arah.app/lib/l10n/app_localizations_pt.dart, frontend/arah.app/lib/l10n/app_pt.arb

Conduta compartilhada

Conduta comum (todos os agentes)

  • Merge humano — nunca mergear em main sem aprovação explícita
  • Escopo mínimo — alterar apenas paths permitidos no manifest
  • Sem secrets — nada de tokens, senhas ou chaves no diff
  • PR obrigatório — todo código via branch + Pull Request
  • CI verde — gates passam antes de pedir review
  • Bots resolvidos — apontamentos de CodeRabbit/Dependabot tratados (PR Steward)
  • Doc-syncsync-docs no mesmo PR quando código mudar comportamento documentado

Checklist do agente

Spec Steward (SDD) — Checklist de conduta

Escopo permitido

  • docs/specs/**, docs/_meta/SDD_AND_HARNESS.md, scripts/harness/**
  • .github/workflows/spec-harness.yml, manifests de agentes ligados a SDD

Antes do PR (spec-before-code)

  • Spec *.spec.yaml existe com id, acceptance, status: active|draft
  • Acceptance em formato EARS (when + then verificável) quando aplicável
  • Clarify: ambiguidades da spec listadas e resolvidas com o humano antes de ativar (nunca deixar o agente "adivinhar")
  • ./scripts/harness/validate-specs.ps1 passa (inclui gate covered_by/evidence)
  • harness.commands / harness.scripts apontam para comandos reais
  • PR referencia Spec-Id: <id> no corpo quando há código de implementação

Skills (ordem sugerida)

  1. spec-validate
  2. harness-run (opcional -SpecId)
  3. spec-author (criar/atualizar spec a partir do template)
  4. sync-docs (PLATFORM_STATE, STATUS_FASES, FASE*.md)
  5. open-pr

Aderência

  • Critérios acceptance cobertos por testes ou scripts no harness
  • Spec não contradiz handoff C4 nem docs/backlog-api/FASE*.md
  • Territory data stays on instance (Core não persiste dados de território)

Proibido

  • Implementar feature de fase sem spec active ou draft revisada
  • Merge sem workflow spec-harness verde (quando paths SDD alterados)

Skills sugeridas (ordem)

  1. spec-validate
  2. spec-author
  3. harness-run
  4. sync-docs
  5. open-pr

Manifest

.agents/spec-steward.agent.yaml


Visível via agents.yml — artifact agent-activity.json. Merge continua humano.

@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Agente acionado: Flutter Agent

ID: flutter | Quando: 2026-08-10T16:25:03Z UTC | Gatilho: pull_request:synchronize
Workflow: 31408526254

Verificações automáticas de conduta

✅ Guardrail no_merge
✅ Guardrail require_ci (opcional por agente)
✅ Checklist de conduta (checklists/flutter.checklist.md)
❌ Escopo de paths respeitado — fora do escopo: docs/CHANGELOG.md, docs/STATUS_FASES.md, docs/_meta/PHASE_QUEUE.yaml, docs/backlog-api/CORPOS_DAGUA_TERRITORIO.md, docs/specs/features/water-bodies-curation.spec.yaml

Conduta compartilhada

Conduta comum (todos os agentes)

  • Merge humano — nunca mergear em main sem aprovação explícita
  • Escopo mínimo — alterar apenas paths permitidos no manifest
  • Sem secrets — nada de tokens, senhas ou chaves no diff
  • PR obrigatório — todo código via branch + Pull Request
  • CI verde — gates passam antes de pedir review
  • Bots resolvidos — apontamentos de CodeRabbit/Dependabot tratados (PR Steward)
  • Doc-syncsync-docs no mesmo PR quando código mudar comportamento documentado

Checklist do agente

Flutter Agent — Checklist de conduta

Escopo permitido

  • Alterações apenas em frontend/arah.app/**
  • App fala somente com BFF (BFF_BASE_URL)

Antes do PR

  • flutter analyze e flutter test passam
  • gen-l10n se strings .arb alteradas
  • Material 3 + tokens do design system (sem cores hardcoded)
  • Mobile-first; flutter_map 8.x usa MapOptions.onTap
  • sync-docs se fluxo de jornada ou contrato mudou

Skills (ordem sugerida)

  1. run-tests (area flutter)
  2. gen-l10n (se l10n)
  3. sync-docs
  4. open-pr

Proibido

  • Chamar API backend diretamente (bypass BFF)
  • Commit direto em main

Skills sugeridas (ordem)

  1. run-tests
  2. gen-l10n
  3. sync-docs
  4. open-pr
  5. code-review
  6. craft-review

Manifest

.agents/flutter.agent.yaml


Visível via agents.yml — artifact agent-activity.json. Merge continua humano.

@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Agente acionado: Review / QA Agent

ID: qa | Quando: 2026-08-10T16:25:05Z UTC | Gatilho: pull_request:synchronize
Workflow: 31408526254

Verificações automáticas de conduta

✅ Guardrail no_merge
✅ Guardrail require_ci (opcional por agente)
✅ Checklist de conduta (checklists/qa.checklist.md)
✅ Escopo de paths respeitado

Conduta compartilhada

Conduta comum (todos os agentes)

  • Merge humano — nunca mergear em main sem aprovação explícita
  • Escopo mínimo — alterar apenas paths permitidos no manifest
  • Sem secrets — nada de tokens, senhas ou chaves no diff
  • PR obrigatório — todo código via branch + Pull Request
  • CI verde — gates passam antes de pedir review
  • Bots resolvidos — apontamentos de CodeRabbit/Dependabot tratados (PR Steward)
  • Doc-syncsync-docs no mesmo PR quando código mudar comportamento documentado

Checklist do agente

QA Agent — Checklist de conduta

Papel

  • Comentar e orientarcomment_only; não altera código de produto
  • Revisar todo PR aberto

Checklist de review

  • Clean Architecture e SOLID
  • Testes para comportamento novo
  • Spec-Id e critérios acceptance atendidos (SDD)
  • Escopo atômico do PR
  • sync-docs aplicado
  • Mobile-first e acessibilidade (se UI)
  • Sem regressão óbvia

Skills

  1. code-review
  2. run-tests (área inferida do diff)
  3. spec-validate (se docs/specs/ ou Arah.Core no diff)

Referência

Skills sugeridas (ordem)

  1. code-review
  2. craft-review
  3. run-tests
  4. spec-validate
  5. harness-run

Manifest

.agents/qa.agent.yaml


Visível via agents.yml — artifact agent-activity.json. Merge continua humano.

@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Agente acionado: PR Steward (Review & Merge)

ID: pr-steward | Quando: 2026-08-10T16:25:07Z UTC | Gatilho: pull_request:synchronize
Workflow: 31408526254

Verificações automáticas de conduta

✅ Guardrail no_merge
✅ Guardrail require_ci (opcional por agente)
✅ Checklist de conduta (checklists/pr-steward.checklist.md)
❌ Escopo de paths respeitado — fora do escopo: docs/CHANGELOG.md, docs/STATUS_FASES.md, docs/_meta/PHASE_QUEUE.yaml, docs/backlog-api/CORPOS_DAGUA_TERRITORIO.md, frontend/arah.app/lib/features/assets/data/models/asset_item.dart, frontend/arah.app/lib/features/assets/data/repositories/assets_repository.dart, frontend/arah.app/lib/features/assets/presentation/providers/assets_provider.dart, frontend/arah.app/lib/features/assets/presentation/screens/assets_screen.dart, frontend/arah.app/lib/features/map/presentation/screens/map_screen.dart, frontend/arah.app/lib/l10n/app_en.arb, frontend/arah.app/lib/l10n/app_localizations.dart, frontend/arah.app/lib/l10n/app_localizations_en.dart, frontend/arah.app/lib/l10n/app_localizations_pt.dart, frontend/arah.app/lib/l10n/app_pt.arb

Conduta compartilhada

Conduta comum (todos os agentes)

  • Merge humano — nunca mergear em main sem aprovação explícita
  • Escopo mínimo — alterar apenas paths permitidos no manifest
  • Sem secrets — nada de tokens, senhas ou chaves no diff
  • PR obrigatório — todo código via branch + Pull Request
  • CI verde — gates passam antes de pedir review
  • Bots resolvidos — apontamentos de CodeRabbit/Dependabot tratados (PR Steward)
  • Doc-syncsync-docs no mesmo PR quando código mudar comportamento documentado

Checklist do agente

PR Steward — Checklist de conduta

Obrigatório antes de merge

  • Todo apontamento de bot resolvido ou respondido explicitamente
  • CI verde (build, testes, Agents Gates, CodeQL, spec-harness se SDD)
  • Spec-Id presente e spec válida quando Arah.Core ou docs/specs/ no PR
  • Label ready-for-merge só quando pr-ready passa
  • Merge continua humano (no_merge: true)

Skills

  1. address-bot-review
  2. spec-validate / harness-run (paths SDD/Core)
  3. code-review (orientativo)
  4. next-phase (após merge em main)

Referência

Skills sugeridas (ordem)

  1. address-bot-review
  2. respond-bot-review
  3. code-review
  4. run-tests
  5. spec-validate
  6. harness-run
  7. sync-docs
  8. next-phase
  9. open-pr

Manifest

.agents/pr-steward.agent.yaml


Visível via agents.yml — artifact agent-activity.json. Merge continua humano.

@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Parecer de domínio: Domain — Mapa, Lugares & Assets Territoriais

ID: mapa-lugares | Quando: 2026-08-10T16:25:12Z UTC | Gatilho: choreography-ci

Enriquecimento (negócio)

O mapa é a leitura do território real: entidades de mapa e assets curados
representam lugares vivos (rios, córregos, nascentes, fontes, trilhas, feiras,
pontos de cuidado). Corpos d'água (WaterBody = alias de produto/API para
NaturalAsset tipado RIVER|STREAM|SPRING|WATERFALL|POTABLE_WATER) são entidades
escopadas por territoryId — nunca campos de Territory. MapEntity é neutra como
o Territory — a curadoria (capability Curator) é camada social separada.
Geolocalização de pessoas é dado sensível; o mapa mostra o lugar, não rastreia
quem passa por ele. Nascentes e captações podem exigir sensitivity HIGH /
access RESTRICTED (filtragem server-side em list/get/pins).

Validar no PR

  • Lat/lng validados em ranges válidos (-90..90 / -180..180)
  • MapEntity/asset/corpo d'água escopados por territoryId; sem vazamento entre territórios
  • Curadoria de assets exige capability Curator verificada no servidor
  • Assets com sensitivity HIGH / access RESTRICTED: autorização de leitura no servidor; omitir pin/coordenadas se não autorizado (Curator ≠ leitura automática)
  • Assets hídricos nunca expostos como item de marketplace
  • Flutter acessa backend só via BFF (--dart-define=BFF_BASE_URL=...); sem URL direta da API
  • Nenhuma localização pessoal contínua persistida (sem tracking de usuários)
  • Paginação/bounding-box em consultas geoespaciais; sem N+1

Arquivos relacionados

  • docs/CHANGELOG.md
  • docs/STATUS_FASES.md
  • docs/_meta/PHASE_QUEUE.yaml
  • docs/backlog-api/CORPOS_DAGUA_TERRITORIO.md
  • docs/specs/features/water-bodies-curation.spec.yaml
  • frontend/arah.app/lib/features/assets/data/models/asset_item.dart
  • frontend/arah.app/lib/features/assets/data/repositories/assets_repository.dart
  • frontend/arah.app/lib/features/assets/presentation/providers/assets_provider.dart

Referências

  • docs/backend/12_DOMAIN_MODEL.md
  • docs/product/05_GLOSSARY.md
  • docs/backlog-api/CORPOS_DAGUA_TERRITORIO.md
  • docs/funcional/09_ASSETS.md
  • docs/specs/features/water-bodies-curation.spec.yaml
  • docs/api/60_08_API_ASSETS.md

Autonomia via coreografia (.agents/choreography.yaml). Agente consultivo — não altera código.

@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Parecer de domínio: Domain — Design & Experiência (UX/UI)

ID: design-ux | Quando: 2026-08-10T16:25:14Z UTC | Gatilho: choreography-ci

Enriquecimento (negócio)

Design de baixa excitação, silêncio funcional e ação consciente — território
como referência visual. High-premium = consistência entre superfícies, tokens
como fonte única (web e Flutter), hierarquia clara e acessível. Mobile-first
obrigatório. Cores sempre via variáveis/tokens, nunca hardcoded. Toda revisão
captura lição (LICOES_APRENDIDAS) e evolui as diretrizes.

Validar no PR

  • Sem cores hardcoded (hex/rgb ou Tailwind arbitrárias) — usa var(--...), classes configuradas ou AppDesignTokens/AppColors no Flutter
  • Mobile-first: base sem media query; ajustes em @media (min-width) / lg:
  • Espaçamento e tipografia via tokens (escala 8px); sem px arbitrário
  • Contraste WCAG AA; focus-visible; navegação por teclado; alvo de toque >= 44px
  • HTML semântico + aria-label/alt; sem CSS/JS inline
  • Tokens de marca consistentes entre web e app (glass, raio, cores) — sem deriva por plataforma
  • Estados cobertos: loading, vazio, erro, foco, hover, desabilitado
  • Lição registrada em docs/LICOES_APRENDIDAS.md quando a revisão achar padrão recorrente

Arquivos relacionados

  • docs/CHANGELOG.md
  • docs/STATUS_FASES.md
  • docs/_meta/PHASE_QUEUE.yaml
  • docs/backlog-api/CORPOS_DAGUA_TERRITORIO.md
  • docs/specs/features/water-bodies-curation.spec.yaml
  • frontend/arah.app/lib/features/assets/data/models/asset_item.dart
  • frontend/arah.app/lib/features/assets/data/repositories/assets_repository.dart
  • frontend/arah.app/lib/features/assets/presentation/providers/assets_provider.dart

Referências

  • docs/DESIGN_SYSTEM_IDENTIDADE_VISUAL.md
  • docs/CURSOR_DESIGN_RULES.md
  • docs/REVISAO_ARTE_DESIGN_WIKI.md
  • docs/LICOES_APRENDIDAS.md
  • docs/design/AUDITORIA_DESIGN.md

Autonomia via coreografia (.agents/choreography.yaml). Agente consultivo — não altera código.

@github-actions

Copy link
Copy Markdown
Contributor

Orquestrador Arah — PR

Agente principal: flutter — Flutter Agent
Skills sugeridas: run-tests, gen-l10n, sync-docs, open-pr, code-review, craft-review

Agentes por paths alterados:

  • design-ux (10 arquivo(s))
  • docs-steward (5 arquivo(s))
  • flutter (10 arquivo(s))
  • mapa-lugares (3 arquivo(s))
  • planner (4 arquivo(s))
  • pr-steward (1 arquivo(s))
  • spec-steward (1 arquivo(s))

Pareceres de domínio: mapa-lugares, design-ux
Regras de coreografia: map-places, specs-sdd, design-ux, craft-flutter, pr-always
Agentes co-ativados: spec-steward, flutter, qa, pr-steward

QA agent revisará este PR (checklist em .agents/qa.agent.yaml).

Use .agents/templates/pr-body.md no corpo do PR.


Automático via agents.yml.

sraphaz and others added 2 commits August 10, 2026 13:20
Dispose dos controllers, submit guard, status localizado, allowlist de kind e docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
initialValue não existe no SDK do job CI / Flutter app.

Co-authored-by: Cursor <cursoragent@cursor.com>
@sraphaz
sraphaz merged commit b0d76f0 into main Aug 10, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-merge PR aprovado pelo steward; merge humano

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant