- Alinhado o aplicador Python de plano de edição (aplicador_de_plano_de_edicao.py) com o script apply-editorial-actions.mjs de referência: no-op de split restrito aos padrões reais do bridge, pausa entre chamadas ao MCP, tolerância de borda de corte usa a posição real em vez de rejeitar desvio; adicionado backup automático da sequência (duplicate_sequence) e documentado o comando python code/engine/aplicar_plano_de_edicao.py como via alternativa ao painel CEP. Resumo: - 18 arquivos alterados - 5 novos - 13 modificados - 0 removidos 13 files changed, 704 insertions(+), 133 deletions(-) Arquivos: - .jhonny/analises.db - CLAUDE.md - code/engine/aplicar_plano_de_edicao.py - code/engine/editor/__init__.py - code/engine/editor/aplicador_de_plano_de_edicao.py - code/engine/editor/escrita/escrita_no_editor.py - code/engine/integracoes/premiere/__init__.py - code/engine/integracoes/premiere/cliente_mcp.py - code/engine/testes/duplos_de_premiere.py - code/engine/testes/test_aplicador_de_plano_de_edicao.py - code/scripts/apply-editorial-actions.mjs - code/src/tools/discovery.ts - code/src/tools/timeline.ts - code/engine/editor/backup_de_sequencia.py - code/engine/integracoes/premiere/cliente_mcp_com_pausa.py - code/engine/testes/test_backup_de_sequencia.py - code/engine/testes/test_cliente_mcp_com_pausa.py - code/engine/testes/test_escrita_no_editor.py
101 lines
4.5 KiB
Markdown
101 lines
4.5 KiB
Markdown
# CLAUDE.md
|
|
|
|
## Project Context
|
|
|
|
## Registro obrigatório de alterações
|
|
|
|
Ao concluir qualquer implementação, acrescentar uma única linha em
|
|
`admin/COMMIT-DETAILS.md` descrevendo resumidamente o que foi alterado. A
|
|
linha deve ser adicionada ao final do arquivo, sem apagar os registros
|
|
anteriores do lote. O resumo não pode conter segredos ou tokens. O
|
|
`admin/deploy.command` usa essas linhas na mensagem do commit e limpa o
|
|
arquivo somente depois de um commit bem-sucedido.
|
|
|
|
This is a software engineering project that uses mattpocock/skills for code quality and organization.
|
|
|
|
## Code Search: use the RAG first
|
|
|
|
This project has a code RAG at `rag/` (see [rag/README.md](rag/README.md)),
|
|
already indexed and kept in sync automatically (a `PostToolUse` hook
|
|
reindexes any edited file). Before grepping or reading whole files to find
|
|
something in `code/`, run:
|
|
|
|
```bash
|
|
rag/search_jhonny.sh "your query in natural language"
|
|
```
|
|
|
|
This returns exact `file:line-range` hits instead of forcing a full read of
|
|
large files — much cheaper in tokens. Use `--snippet` or `--full` when you
|
|
need to see the matched code, `--map` for a file inventory, and `--path`/
|
|
`--ext` to scope the search. Fall back to Grep/Glob only when the RAG has no
|
|
tunnel available (`rag/ensure_tunnel.sh` failed) or for exact-string
|
|
searches it isn't built for (e.g. searching non-code config not indexed).
|
|
|
|
## Mandatory skill — read before writing any Python in code/engine/
|
|
|
|
**`.agents/skills/boas-praticas-oo/SKILL.md` is not optional.** It is not
|
|
triggered by a request — apply it automatically on every Python file created,
|
|
edited, fixed, refactored or reviewed under `code/engine/`: PT-BR identifiers
|
|
for everything internal, docstrings on every module/class/public method,
|
|
single-responsibility classes, explicit dependency injection, specific
|
|
exceptions (never bare `except Exception`), input validation, and tests for
|
|
the behavior touched. See [CODING_STANDARDS.md](CODING_STANDARDS.md) for the
|
|
normative summary, and run its checklist (skill section 41) before calling
|
|
any Python change in `code/engine/` done.
|
|
|
|
## Available Skills
|
|
|
|
The following skills are available in this project (located in `.agents/skills/`):
|
|
|
|
### Code Quality & Architecture
|
|
- **`boas-praticas-oo`** - **Mandatory**, always-on. OO standards + PT-BR naming for all `code/engine/` Python (see above)
|
|
- **`/improve-codebase-architecture`** - Scan codebase for deepening opportunities
|
|
- **`/codebase-design`** - Design deep modules with simple interfaces
|
|
- **`/domain-modeling`** - Build shared vocabulary and domain model
|
|
|
|
### Testing & Code Review
|
|
- **`/tdd`** - Test-driven development with red-green-refactor loop
|
|
- **`/code-review`** - Two-axis review: Standards + Spec
|
|
- **`/diagnosing-bugs`** - Disciplined bug diagnosis loop
|
|
- **`/resolving-merge-conflicts`** - Resolve git conflicts hunk by hunk
|
|
|
|
### Global Skills (available via ~/.agents/skills/)
|
|
- 29 additional skills for engineering and productivity
|
|
|
|
## Usage
|
|
|
|
When working on this project, use these skills to:
|
|
1. **Improve architecture**: Run `/improve-codebase-architecture` to scan for improvements
|
|
2. **Design modules**: Use `/codebase-design` when creating new modules
|
|
3. **Model domain**: Use `/domain-modeling` to build shared vocabulary
|
|
|
|
## Aplicar um plano de edição sem o painel CEP
|
|
|
|
O painel CEP (aba "Editar Vídeo", botão "Aplicar plano na timeline") chama
|
|
`code/scripts/apply-editorial-actions.mjs` — esse é o caminho de produção,
|
|
comprovado, e continua sendo o padrão.
|
|
|
|
Existe uma segunda via em Python, para quando o painel não estiver aberto:
|
|
|
|
```bash
|
|
python code/engine/aplicar_plano_de_edicao.py "/caminho/plano_de_acoes.json"
|
|
```
|
|
|
|
Pré-requisito: o Premiere aberto, com a sequência correta **ativa** (o
|
|
script nunca troca de sequência — opera sobre a que estiver ativa no
|
|
momento), e o bridge MCP (`dist/index.js`) disponível. Cria backup
|
|
automático da sequência (`duplicate_sequence`) antes de aplicar qualquer
|
|
corte, igual ao painel — se o backup falhar, avisa em stderr e segue
|
|
aplicando mesmo assim, sem bloquear.
|
|
|
|
Ver [code/engine/editor/aplicador_de_plano_de_edicao.py](code/engine/editor/aplicador_de_plano_de_edicao.py)
|
|
para as diferenças deliberadas entre essa implementação e o `.mjs` do
|
|
painel (documentadas no docstring da classe `AplicadorDePlanoDeEdicao`).
|
|
|
|
## Code Standards
|
|
|
|
- Python in `code/engine/`: follow `.agents/skills/boas-praticas-oo/SKILL.md` and [CODING_STANDARDS.md](CODING_STANDARDS.md) — mandatory, not a suggestion
|
|
- Use shared domain vocabulary from CONTEXT.md
|
|
- Write tests before code (TDD)
|
|
- Review code changes with `/code-review`
|