Skip to content
Open
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
72 changes: 44 additions & 28 deletions .opencode/skills/open-pr/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,18 @@ Open a Pull Request on GitHub comparing the current branch against `master`, gen
git diff master...HEAD --stat
```

4. **Categorize commits** by conventional commit type:
4. **Check for PR template** — look for a local PR template:

```bash
TEMPLATE_FILE=".github/PULL_REQUEST_TEMPLATE.md"
if [ -f "$TEMPLATE_FILE" ]; then
TEMPLATE_CONTENT=$(cat "$TEMPLATE_FILE")
else
TEMPLATE_CONTENT=""
fi
```

5. **Categorize commits** by conventional commit type:

| Type | Label |
|---|---|
Expand All @@ -33,50 +44,54 @@ Open a Pull Request on GitHub comparing the current branch against `master`, gen
| `build` | Build / CI |
| `BREAKING` | Mudança crítica |

5. **Identify affected modules** — from changed file paths, determine which modules were modified:
6. **Identify affected modules** — from changed file paths, determine which modules were modified:
- `composeApp`
- `feature-*`
- `core-*`
- `build-logic`
- `androidApp`
- `gradle` / config

6. **Generate PR body in pt-br** with the following structure:
7. **Generate PR body in pt-br** using the template if available:

```markdown
## O que foi feito?
- **If `TEMPLATE_CONTENT` is not empty:** use the template file as the base structure. Ensure all auto-generated content (commit summaries, module lists, etc.) is written in **pt-br**. If the template contains English section headers (e.g. `## What was done?`, `## How to test?`), translate them to pt-br equivalents (e.g. `## O que foi feito?`, `## Como testar?`). Inject the analyzed commits, affected modules, and test steps into the appropriate sections of the template.

[Resumo das alterações baseado nos commits]
- **If no template exists:** use the following hardcoded pt-br structure:

## Módulos afetados
```markdown
## O que foi feito?

- [lista de módulos]
[Resumo das alterações baseado nos commits]

## Tipo de mudança
## Módulos afetados

- [ ] Nova funcionalidade
- [ ] Correção de bug
- [ ] Refatoração
- [ ] Documentação
- [ ] Testes
- [ ] Build / CI
- [lista de módulos]

## Como testar?
## Tipo de mudança

1. [passos para testar]
2. [passos adicionais]
- [ ] Nova funcionalidade
- [ ] Correção de bug
- [ ] Refatoração
- [ ] Documentação
- [ ] Testes
- [ ] Build / CI

## Checklist
## Como testar?

- [ ] Build passa localmente
- [ ] Lint / Detekt não aponta erros novos
- [ ] Testes existentes continuam passando
- [ ] Testes novos foram adicionados (se aplicável)
```
1. [passos para testar]
2. [passos adicionais]

## Checklist

- [ ] Build passa localmente
- [ ] Lint / Detekt não aponta erros novos
- [ ] Testes existentes continuam passando
- [ ] Testes novos foram adicionados (se aplicável)
```

7. **Determine PR title** — use the first commit subject line or a concise summary derived from the branch name (e.g. `feat: adiciona tela de perfil`).
8. **Determine PR title** — use the first commit subject line or a concise summary derived from the branch name (e.g. `feat: adiciona tela de perfil`).

8. **Open the PR** using `gh`:
9. **Open the PR** using `gh`:

```bash
gh pr create \
Expand All @@ -86,11 +101,12 @@ Open a Pull Request on GitHub comparing the current branch against `master`, gen
--body "<body>"
```

9. If `gh` is not authenticated or available, print the full PR content to stdout with instructions.
10. If `gh` is not authenticated or available, print the full PR content to stdout with instructions.

## Notes

- All PR text MUST be in **pt-br** (Portuguese — Brazil).
- All PR text MUST be in **pt-br** (Portuguese — Brazil), regardless of whether a template is used.
- Follow the project's existing commit style (conventional commits).
- If the branch has only one commit, use its message as the PR title.
- If the PR would be empty (no diff), warn the user.
- The skill looks for `.github/PULL_REQUEST_TEMPLATE.md` in the repo root. If found, its section structure is preserved but all injected content is in pt-br. If not found, a hardcoded pt-br template is used.
13 changes: 13 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
| Kotlin | 2.3.20 |
| AGP | 9.1.0 |
| JDK | 21 |
| Kover | 0.9.1 |
| Version Catalog | `gradle/libs.versions.toml` |
| Convention Plugins | `build-logic/` (precompiled script plugins) |
| Application ID | `com.codandotv.streamplayerapp` |
Expand All @@ -38,6 +39,7 @@
- Navigation Compose 2.9.2
- Kotlinx Datetime 0.8.0
- Firebase (BOM 33.14.0, Crashlytics, Analytics)
- Kotzilla SDK 2.1.3
- Detekt 1.23.6
- Dokka 1.9.10

Expand Down Expand Up @@ -88,13 +90,23 @@
- Kotlinx Coroutines Test 1.8.1
- Koin Test
- Popcorn Guinea Pig (test fixtures)
- Kover 0.9.1 (coverage reporting)

### Documentation

- **Generator:** Dokka 1.9.10
- **Source:** API docs generated via `dokka` task
- **Project docs:** README.md, README_pt-br.md

## MCP Tools

| Tool | Type | Purpose |
|---|---|---|
| Kotzilla | Remote (`https://mcp.kotzilla.io/mcp`) | Performance monitoring, Koin diagnostics, app health reports |
| Maestro | Local (`maestro mcp`) | Mobile UI automation testing via Maestro flows |

Configured in `opencode.json`.

## Version Management

Versions are managed in:
Expand All @@ -115,6 +127,7 @@ This is an application project and is **not** published as a library. No Maven C
|---|---|
| Default Branch | `main` |
| CI | GitHub Actions (`build.yml`, `linter.yaml`, `popcorn.yaml`) |
| Coverage | Kover HTML report deployed to GitHub Pages via `build.yml` |
| Versioning | SemVer (current: 3.2) |
| Tags | Standard Git tags |
| PR Language | pt-br |
Expand Down
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,38 @@ We have a section called `discussions`, this is hosted in our repository, so we
This project exists thanks to all the people who contribute.
<a href="https://github.com/CodandoTV/StreamPlayerApp"><img src="https://opencollective.com/stremplayerapp/contributors.svg?width=890&button=false" /></a>

## 🤖 AI-Assisted Development

This project uses [opencode](https://opencode.ai) as the AI coding assistant. The configuration is centralized in the following files:

### AGENTS.md

Referenced by `opencode.json` as the instructions file (`"instructions": ["AGENTS.md"]`), it provides the AI agent with comprehensive project context — including project overview, build system (Gradle 9.3.1, Kotlin 2.3.20), module structure, key dependencies, version management, CI workflow, and contribution conventions.

### opencode.json

The root configuration file that orchestrates AI assistance:

| Setting | Value |
|---|---|
| Instructions | `AGENTS.md` |
| Skills path | `.opencode/skills/` |

### Skills

Custom skills are located in `.opencode/skills/`. Currently available:

- **open-pr** — Automates GitHub PR creation comparing the current feature branch against `master`, generating the PR description in Brazilian Portuguese (pt-br).

### MCPs (Model Context Protocol)

MCPs extend the AI's capabilities with external tools. Currently configured:

| MCP | Type | Purpose |
|---|---|---|
| [Kotzilla](https://kotzilla.io) | Remote | Performance monitoring, dependency diagnosis (Koin), startup/ANR/crash analysis |
| [Maestro](https://maestro.mobile.dev) | Local (`maestro mcp`) | Mobile UI test automation and device interaction |

## License

Copyright 2023 Rodrigo Vianna
Expand Down
32 changes: 32 additions & 0 deletions README_pt-br.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,38 @@ Criei um `discussions` e la além de ficar no histórico, se quiser olhar o exem
Este projeto existe graças a todas as pessoas que contribuem.
<a href="https://github.com/CodandoTV/StreamPlayerApp"><img src="https://opencollective.com/stremplayerapp/contributors.svg?width=890&button=false" /></a>

## 🤖 Desenvolvimento Assistido por IA

Este projeto utiliza o [opencode](https://opencode.ai) como assistente de codificação com IA. A configuração está centralizada nos seguintes arquivos:

### AGENTS.md

Referenciado pelo `opencode.json` como arquivo de instruções (`"instructions": ["AGENTS.md"]`), fornece ao agente de IA o contexto completo do projeto — incluindo visão geral, sistema de build (Gradle 9.3.1, Kotlin 2.3.20), estrutura de módulos, dependências principais, gerenciamento de versão, CI e convenções de contribuição.

### opencode.json

Arquivo raiz de configuração que orquestra a assistência de IA:

| Configuração | Valor |
|---|---|
| Instructions | `AGENTS.md` |
| Skills path | `.opencode/skills/` |

### Skills (Habilidades)

Skills personalizadas estão em `.opencode/skills/`. Atualmente disponível:

- **open-pr** — Automatiza a criação de PRs no GitHub comparando a branch atual com a `master`, gerando a descrição do PR em português brasileiro.

### MCPs (Model Context Protocol)

MCPs estendem as capacidades da IA com ferramentas externas. Atualmente configurados:

| MCP | Tipo | Propósito |
|---|---|---|
| [Kotzilla](https://kotzilla.io) | Remoto | Monitoramento de performance, diagnóstico de dependências (Koin), análise de startup/ANR/crashes |
| [Maestro](https://maestro.mobile.dev) | Local (`maestro mcp`) | Automação de testes de UI mobile e interação com dispositivos |

## License

Copyright 2023 Rodrigo Vianna
Expand Down
13 changes: 13 additions & 0 deletions opencode.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,18 @@
"instructions": ["AGENTS.md"],
"skills": {
"paths": [".opencode/skills"]
},
"mcp": {
"kotzilla": {
"type": "remote",
"url": "https://mcp.kotzilla.io/mcp",
"enabled": true,
"oauth": {}
},
"maestro": {
"type": "local",
"command": ["maestro", "mcp"],
"enabled": true
}
}
}
Loading