Files
Emanuel Almeida 692475a315 feat(v1.5.2): Execute database migrations and complete setup
- Execute all 6 migrations on Desk CRM production database
- Create missing tables: cr_lsps, cr_agent_lsps, cr_lsp_usage
- Create archive tables: cr_*_usage_archive (4 tables)
- Create system tables: cr_migrations, cr_maintenance_log
- Make all scripts executable (chmod +x)
- Total cr_* tables: 38

Migration files:
- 001_initial_schema.sql
- 002_add_lsps.sql
- 003_add_relationships.sql
- 004_add_telemetry.sql
- 005_add_archive_tables.sql
- 006_add_maintenance_log.sql

Scripts:
- session-init.sh, session-end.sh
- inject-context.sh, inject-agent-context.sh
- record-usage.sh, db-backup.sh, sync-to-mysql.sh

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 16:18:02 +00:00

10 KiB

name, description, argument-hint
name description argument-hint
release Prepara e executa release do meta-plugin. Valida qualidade, bump versão, gera CHANGELOG, git tag. [major|minor|patch] [--dry-run] [--force]

/descomplicar:release

Prepara e executa release do meta-plugin com quality gates.

Objectivo

Executar release controlado com:

  • Validação de todos os componentes (score >= 90)
  • Bump de versão semântica
  • Actualização de CHANGELOG.md
  • Git commit + tag
  • Push para Gitea

Sintaxe

/descomplicar:release [version-bump] [options]

Version Bump

Tipo Descrição Exemplo
patch Bug fixes 1.3.0 → 1.3.1
minor New features (default) 1.3.0 → 1.4.0
major Breaking changes 1.3.0 → 2.0.0

Opções

Opção Descrição
--dry-run Simular sem executar
--force Ignorar quality gates
--no-git Não criar commit/tag
--no-push Não fazer push

Workflow de Release

VALIDATE → BUMP VERSION → UPDATE CHANGELOG → COMMIT → TAG → PUSH
    ↓           ↓              ↓              ↓       ↓      ↓
 Score>=90   plugin.json   CHANGELOG.md    git add   v1.4.0  origin

Acções Disponíveis

1. Release Minor (Default)

/descomplicar:release

Processo:

  1. Validar todos os componentes (score >= 90)
  2. Se falhar: BLOQUEAR e listar componentes
  3. Ler versão actual de plugin.json
  4. Incrementar minor (1.3.0 → 1.4.0)
  5. Actualizar plugin.json
  6. Actualizar CHANGELOG.md
  7. Git commit: "chore: release v1.4.0"
  8. Git tag: v1.4.0
  9. Git push + push tags

Output:

╔══════════════════════════════════════════════════════════════════════╗
║  RELEASE: descomplicar-meta-plugin                                   ║
╠══════════════════════════════════════════════════════════════════════╣
║  PRE-RELEASE VALIDATION                                              ║
║  ─────────────────────────────────────────────────────────────────── ║
║  ✓ Skills validated: 7/7 (avg: 88/100)                               ║
║  ✓ Agents validated: 2/2 (avg: 86/100)                               ║
║  ✓ Commands validated: 11/11 (avg: 85/100)                           ║
║  ✓ All components >= 70                                              ║
╠══════════════════════════════════════════════════════════════════════╣
║  VERSION BUMP                                                        ║
║  ─────────────────────────────────────────────────────────────────── ║
║  Previous: 1.3.0                                                     ║
║  New:      1.4.0 (minor)                                             ║
║  File:     .claude-plugin/plugin.json ✓                              ║
╠══════════════════════════════════════════════════════════════════════╣
║  CHANGELOG                                                           ║
║  ─────────────────────────────────────────────────────────────────── ║
║  ✓ Added entry for v1.4.0                                            ║
║  ✓ Listed 2 new skills, 3 new commands                               ║
╠══════════════════════════════════════════════════════════════════════╣
║  GIT OPERATIONS                                                      ║
║  ─────────────────────────────────────────────────────────────────── ║
║  ✓ Staged: plugin.json, CHANGELOG.md                                 ║
║  ✓ Commit: chore: release v1.4.0                                     ║
║  ✓ Tag: v1.4.0                                                       ║
║  ✓ Push: origin/main                                                 ║
║  ✓ Push tags: v1.4.0                                                 ║
╠══════════════════════════════════════════════════════════════════════╣
║  RELEASE COMPLETE: v1.4.0 ✓                                          ║
║  URL: https://git.descomplicar.pt/descomplicar/descomplicar-meta-plugin/releases/tag/v1.4.0
╚══════════════════════════════════════════════════════════════════════╝

2. Dry Run

/descomplicar:release --dry-run

Comportamento:

  • Executa todas as validações
  • Mostra o que seria feito
  • Não modifica ficheiros
  • Não executa git

3. Force Release

/descomplicar:release --force

Comportamento:

  • Ignora quality gates (score >= 70 aceite)
  • Útil para hotfixes urgentes
  • Adiciona WARNING no CHANGELOG

4. Release com Quality Gate Falhado

/descomplicar:release

Output:
╔══════════════════════════════════════════════════════════════════════╗
║  RELEASE BLOCKED                                                     ║
╠══════════════════════════════════════════════════════════════════════╣
║  Quality gate failed: 2 components below threshold                   ║
║  ─────────────────────────────────────────────────────────────────── ║
║  ✗ component-generator     65/100  (need 70)                         ║
║  ✗ old-command             58/100  (need 70)                         ║
╠══════════════════════════════════════════════════════════════════════╣
║  ACTIONS                                                             ║
║  1. Run /descomplicar:validate <path> --fix                          ║
║  2. Or use /descomplicar:release --force                             ║
╚══════════════════════════════════════════════════════════════════════╝

CHANGELOG Generation

Formato automático:

## [1.4.0] - 2026-02-04

### Added
- New skill: component-generator
- New skill: quality-validator
- New commands: create, validate, release

### Changed
- Updated hooks with timeout and statusMessage
- Improved .mcp.json with MCP mappings

### Fixed
- Frontmatter validation in all components

Git Commands

# Stage changes
git add .claude-plugin/plugin.json CHANGELOG.md

# Commit
git commit -m "chore: release v1.4.0

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>"

# Tag
git tag -a v1.4.0 -m "Release v1.4.0"

# Push
git push origin main
git push origin v1.4.0

Quality Gates

Componente Threshold Normal Threshold Force
Skills >= 90 >= 70
Agents >= 90 >= 70
Commands >= 90 >= 70

Exemplo de Uso

User: Prepara release com as novas funcionalidades

/descomplicar:release minor

Output:
Validando componentes...
✓ 20/20 passaram quality gate
Bump versão: 1.3.0 → 1.4.0
CHANGELOG actualizado
Git commit + tag criados
Push para origin completo

Release v1.4.0 publicado com sucesso!

Output Esperado

╔══════════════════════════════════════════════════════════════════════╗
║  RELEASE: descomplicar-meta-plugin                                   ║
╠══════════════════════════════════════════════════════════════════════╣
║  VALIDATION: Skills 8/8 ✓ | Agents 2/2 ✓ | Commands 15/15 ✓          ║
╠══════════════════════════════════════════════════════════════════════╣
║  VERSION: 1.4.0 → 1.5.0 (minor)                                      ║
║  CHANGELOG: ✓ Updated                                                ║
║  GIT: ✓ Commit + Tag v1.5.0 + Push                                   ║
╠══════════════════════════════════════════════════════════════════════╣
║  RELEASE COMPLETE: v1.5.0 ✓                                          ║
╚══════════════════════════════════════════════════════════════════════╝