-
Notifications
You must be signed in to change notification settings - Fork 408
feat(reversa): enhance main entry point description and add chat comm… #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
padsdev
wants to merge
2
commits into
sandeco:main
Choose a base branch
from
padsdev:devpads-feat/update-docs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| # Índice — `_reversa_sdd` | ||
|
|
||
| > **Propósito:** <uma frase sobre o sistema>. | ||
| > | ||
| > Índice gerado por `/reversa` → `indice`. Não adicione rodapé "Gerado em…". | ||
|
|
||
| ## Sumário | ||
|
|
||
| - [Comece por aqui](#comece-por-aqui) | ||
| - [Artefatos globais](#artefatos-globais) | ||
| - [Unidades](#unidades) | ||
| - [Manutenção agêntica](#manutenção-agêntica) | ||
| - [Como atualizar](#como-atualizar) | ||
| - [Sincronização doc ↔ código](#sincronização-doc--código) | ||
| - [Checklist PR](#checklist-pr) | ||
|
|
||
| --- | ||
|
|
||
| ## Comece por aqui | ||
|
|
||
| Ordem de leitura recomendada: | ||
|
|
||
| 1. [domain.md](domain.md) — glossário e regras de negócio | ||
| 2. [architecture.md](architecture.md) — visão arquitetural | ||
| 3. Unidade específica: pasta da unidade → `requirements.md` / `design.md` / `tasks.md` (conforme `doc_level`) | ||
| 4. [confidence-report.md](confidence-report.md) — cobertura e lacunas (se existir) | ||
|
|
||
| --- | ||
|
|
||
| ## Artefatos globais | ||
|
|
||
| | Artefato | Descrição | | ||
| |----------|-----------| | ||
| | [inventory.md](inventory.md) | Inventário do repositório | | ||
| | [dependencies.md](dependencies.md) | Stack e dependências | | ||
| | [code-analysis.md](code-analysis.md) | Análise técnica | | ||
| | [domain.md](domain.md) | Glossário e regras | | ||
| | [architecture.md](architecture.md) | Visão arquitetural | | ||
| | [confidence-report.md](confidence-report.md) | Relatório de confiança | | ||
|
|
||
| <!-- Substitua/expanda a tabela com os arquivos realmente presentes em _reversa_sdd/. --> | ||
|
|
||
| --- | ||
|
|
||
| ## Unidades | ||
|
|
||
| | Unidade | Specs | | ||
| |---------|:-----:| | ||
| | `[nome](nome/)` | ✅ / ⏳ / — | | ||
|
|
||
| <!-- Uma linha por unidade conforme a organização em .reversa/config.toml [specs]. --> | ||
|
|
||
| --- | ||
|
|
||
| ## Manutenção agêntica | ||
|
|
||
| Antes de implementar qualquer alteração, leia nesta ordem: | ||
|
|
||
| 1. `domain.md` | ||
| 2. Artefatos da unidade em escopo (`requirements.md` / `design.md` / `tasks.md`) | ||
| 3. `architecture.md` e ADRs relacionados (se existirem) | ||
| 4. `confidence-report.md` / `gaps.md` (se existirem) | ||
|
|
||
| ``` | ||
| Prompt para IA: | ||
| Leia domain.md e a pasta da unidade antes de codar. | ||
| Não invente endpoints ou tabelas — cite evidência ou marque LACUNA 🔴. | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## Como atualizar | ||
|
|
||
| Com `/reversa` ativo: | ||
|
|
||
| | Comando | Ação | | ||
| |---------|------| | ||
| | `indice` | Regenera este README (preserva a tabela de sync) | | ||
| | `atualizar` | Incremental: commits desde o marco → unidades afetadas | | ||
| | `atualizar [unidade]` | Atualiza uma unidade específica | | ||
| | `atualizar --baseline` | Grava HEAD como marco inicial | | ||
|
|
||
| --- | ||
|
|
||
| ## Checklist PR | ||
|
|
||
| - [ ] Specs da unidade afetada atualizadas | ||
| - [ ] Este README com tabela **Sincronização doc ↔ código** atualizada (append) | ||
| - [ ] `.reversa/doc-sync.json` refletindo o HEAD documentado | ||
| - [ ] Commit de docs no mesmo PR do código (ou PR imediato seguinte) | ||
|
|
||
| --- | ||
|
|
||
| ## Sincronização doc ↔ código | ||
|
|
||
| > Histórico incremental de marcos doc↔código. Append a cada pipeline. | ||
| > Não editar manualmente; use `atualizar`, `atualizar --baseline` ou conclua um pipeline `/reversa`. | ||
|
|
||
| | Data | Branch | Commit | Ação | Notas | | ||
| |------|--------|--------|------|-------| | ||
| | <!-- YYYY-MM-DD HH:MM --> | <!-- branch --> | <!-- `sha` --> | <!-- baseline\|pipeline\|atualizar\|indice --> | <!-- notas --> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,117 @@ | ||
| # Passo — Marco doc ↔ código (doc-sync) e atualização incremental | ||
|
|
||
| O commit **não** é carimbado em cada arquivo de documentação. Há um **marco central** (SHA do HEAD) em `.reversa/doc-sync.json` e um histórico append-only no índice `_reversa_sdd/README.md`. | ||
|
|
||
| ## Artefatos | ||
|
|
||
| | Arquivo | Papel | | ||
| |---------|--------| | ||
| | `.reversa/doc-sync.json` | Último SHA sincronizado (máquina) | | ||
| | `_reversa_sdd/README.md` → `## Sincronização doc ↔ código` | Histórico humano, append-only | | ||
|
|
||
| ### Schema de `.reversa/doc-sync.json` | ||
|
|
||
| ```json | ||
| { | ||
| "commit": "<sha completo de git rev-parse HEAD>", | ||
| "syncedAt": "<ISO-8601>", | ||
| "branch": "<nome da branch, se disponível>", | ||
| "action": "baseline|pipeline|atualizar|indice" | ||
| } | ||
| ``` | ||
|
|
||
| - `commit` é obrigatório e deve ser o SHA de 40 caracteres. | ||
| - `action` descreve o que acabou de gravar o marco. | ||
| - **Proibido** usar slug/nome do projeto no lugar do SHA. | ||
|
|
||
| ### Formato da tabela no README | ||
|
|
||
| ```markdown | ||
| ## Sincronização doc ↔ código | ||
|
|
||
| > Histórico incremental de marcos doc↔código. Append a cada pipeline. | ||
| > Não editar manualmente; use `atualizar`, `atualizar --baseline` ou conclua um pipeline `/reversa`. | ||
|
|
||
| | Data | Branch | Commit | Ação | Notas | | ||
| |------|--------|--------|------|-------| | ||
| | 2026-07-24 16:30 | main | `abcdef0123…` | baseline | Marco inicial | | ||
| ``` | ||
|
|
||
| - **Preservar** todas as linhas existentes ao regenerar o `indice`. | ||
| - Na coluna `Commit`, preferir SHA completo entre backticks; short SHA só se `git rev-parse` ainda resolver. | ||
| - A **última linha** da tabela é o fallback se `doc-sync.json` sumir. | ||
|
|
||
| --- | ||
|
|
||
| ## Gravar marco (após pipeline ou `--baseline`) | ||
|
|
||
| 1. Confirme que o diretório atual é um repositório git (`git rev-parse --is-inside-work-tree`). | ||
| 2. Obtenha o SHA: `git rev-parse HEAD`. | ||
| 3. Obtenha a branch (opcional): `git rev-parse --abbrev-ref HEAD`. | ||
| 4. Escreva/atualize `.reversa/doc-sync.json` com o schema acima. | ||
| 5. Garanta que `_reversa_sdd/README.md` existe (se não, rode o procedimento `indice` primeiro). | ||
| 6. **Append** uma linha na tabela `## Sincronização doc ↔ código` (nunca reescreva o histórico). | ||
| 7. Informe o usuário: marco gravado (`commit` curto + ação). | ||
|
|
||
| ### Fallback sem `doc-sync.json` | ||
|
|
||
| 1. Abra `_reversa_sdd/README.md`. | ||
| 2. Localize a última linha de dados da tabela de sincronização. | ||
| 3. Extraia o hash (com ou sem backticks). | ||
| 4. Resolva com `git rev-parse <hash>`. | ||
| 5. Se falhar: diga que não há marco e peça `atualizar --baseline`. | ||
|
|
||
| --- | ||
|
|
||
| ## `atualizar --baseline` | ||
|
|
||
| Só grava o marco. **Não** reescreve specs. | ||
|
|
||
| 1. Execute o procedimento **Gravar marco** com `action: "baseline"`. | ||
| 2. Notas da linha: `Marco inicial`. | ||
| 3. Responda: marco definido; próximos `atualizar` usarão esse SHA. | ||
|
|
||
| --- | ||
|
|
||
| ## `atualizar` (incremental) | ||
|
|
||
| 1. Leia o marco: `.reversa/doc-sync.json` → `commit`, ou fallback do README. | ||
| 2. Liste mudanças desde o marco: | ||
| ```bash | ||
| git log <marco>..HEAD --name-only --pretty=format: -- | ||
| git diff --name-only <marco>..HEAD | ||
| ``` | ||
| 3. Se não houver arquivos alterados: informe e **não** avance agentes. | ||
| 4. Mapeie paths alterados → unidades em `_reversa_sdd/` (pastas de módulo / organização em `.reversa/config.toml` `[specs]`). Ignore ruído (`node_modules`, `dist`, `.git`, lockfiles sem mudança de código). | ||
| 5. Apresente ao usuário as unidades afetadas e peça confirmação antes de re-rodar agentes. | ||
| 6. Após confirmação, reative os agentes necessários **só** nas unidades afetadas (tipicamente Archaeologist/Detective/Writer/Reviewer conforme o que existir no plano). | ||
| 7. Rode `indice` (preservando a tabela de sync). | ||
| 8. Grave o marco com `action: "atualizar"` e notas resumindo as unidades tocadas. | ||
|
|
||
| --- | ||
|
|
||
| ## `atualizar [unidade]` | ||
|
|
||
| Igual ao incremental, mas o escopo é a unidade nomeada (mesmo que o `git log` sugira mais arquivos). Ainda assim, cite os commits/arquivos relevantes como evidência. | ||
|
|
||
| --- | ||
|
|
||
| ## `indice` | ||
|
|
||
| 1. Se `_reversa_sdd/` não existir: avise e pare. | ||
| 2. Se `README.md` já existir: leia e **preserve** a seção `## Sincronização doc ↔ código` inteira. | ||
| 3. Regenere as demais seções a partir do template `references/README.indice.template.md` e do inventário real em `_reversa_sdd/`. | ||
| 4. Não acrescente rodapé `*Gerado em …*`. | ||
| 5. Se o pipeline acabou de alterar docs e ainda não houve append nesta sessão, faça o append do marco depois do `indice`. | ||
|
|
||
| --- | ||
|
|
||
| ## Anti-padrões | ||
|
|
||
| | ❌ Proibido | ✅ Correto | | ||
| |-------------|-----------| | ||
| | Frontmatter/`sourceCommit` em cada `design.md` | Marco em `.reversa/doc-sync.json` | | ||
| | Arquivo `doc-sync.md` | JSON + tabela no README | | ||
| | Rodapé `*Gerado em …*` | Tabela de sincronização | | ||
| | Usar slug do app como marco | SHA do `git rev-parse HEAD` | | ||
| | Apagar linhas antigas da tabela | Apenas append | | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For projects installed with a non-default specs folder, the installer stores that choice in
.reversa/state.json/config.toml(output_folder), but this newindiceprocedure only checks and inventories_reversa_sdd/. In that configuration,indice/atualizar --baselinewill either stop even though the real docs folder exists, or build the sync README from the wrong directory, so the doc↔code baseline is not recorded for the actual generated specs. Please resolve the output directory fromstate.output_folder(defaulting to_reversa_sdd) throughout this step.Useful? React with 👍 / 👎.