@codigodoleo/wp-kit 3.4.0 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,8 +21,16 @@ export async function runPrompts({ defaults = false } = {}) {
21
21
  {
22
22
  type: 'input',
23
23
  name: 'projectName',
24
- message: 'Project name:',
24
+ message: 'Project name (lowercase, hyphens only):',
25
25
  default: 'wordpress-dev',
26
+ filter: (val) =>
27
+ val
28
+ .trim()
29
+ .toLowerCase()
30
+ .replace(/\s+/g, '-')
31
+ .replace(/[^a-z0-9-]/g, ''),
32
+ validate: (val) =>
33
+ /^[a-z0-9][a-z0-9-]*$/.test(val) || 'Use only lowercase letters, numbers and hyphens.',
26
34
  },
27
35
  {
28
36
  type: 'input',
package/lib/utils/git.js CHANGED
@@ -6,6 +6,9 @@ import fs from 'fs-extra';
6
6
 
7
7
  import { log, color } from './logger.js';
8
8
 
9
+ const CLAUDE_PLUGIN_SUPERPOWERS_SAGE = '.claude/plugins/superpowers-sage';
10
+ const CLAUDE_PLUGIN_SUPERPOWERS = '.claude/plugins/superpowers';
11
+
9
12
  export function getGitUserDefaults() {
10
13
  const exec = (cmd) => {
11
14
  try {
@@ -28,7 +31,7 @@ export function getGitUserDefaults() {
28
31
  */
29
32
  const TARGET_CONFIG = {
30
33
  claude: {
31
- dest: '.claude/plugins/superpowers-sage',
34
+ dest: CLAUDE_PLUGIN_SUPERPOWERS_SAGE,
32
35
  dirs: ['.claude-plugin', 'skills', 'agents', 'hooks'],
33
36
  label: 'Claude Code (.claude/)',
34
37
  },
@@ -44,6 +47,78 @@ const TARGET_CONFIG = {
44
47
  },
45
48
  };
46
49
 
50
+ const CLAUDE_SETTINGS_BASELINE = {
51
+ $schema: 'https://json.schemastore.org/claude-code-settings.json',
52
+ permissions: {
53
+ deny: [
54
+ 'Read(./.env)',
55
+ 'Read(./.env.*)',
56
+ 'Read(./secrets/**)',
57
+ 'Read(./config/credentials.json)',
58
+ ],
59
+ },
60
+ };
61
+
62
+ function mergeUnique(base = [], extra = []) {
63
+ return [...new Set([...(Array.isArray(base) ? base : []), ...extra])];
64
+ }
65
+
66
+ function mergeClaudeSettings(existing = {}, incoming = {}) {
67
+ const merged = { ...existing, ...incoming };
68
+
69
+ const existingPermissions = existing.permissions ?? {};
70
+ const incomingPermissions = incoming.permissions ?? {};
71
+
72
+ merged.permissions = {
73
+ ...existingPermissions,
74
+ ...incomingPermissions,
75
+ deny: mergeUnique(existingPermissions.deny, incomingPermissions.deny),
76
+ };
77
+
78
+ merged.enabledPlugins = {
79
+ ...(existing.enabledPlugins ?? {}),
80
+ ...(incoming.enabledPlugins ?? {}),
81
+ };
82
+
83
+ return merged;
84
+ }
85
+
86
+ async function updateClaudeProjectSettings(targetDir, enabledPlugins = {}) {
87
+ const claudeDir = path.join(targetDir, '.claude');
88
+ const settingsPath = path.join(claudeDir, 'settings.json');
89
+
90
+ await fs.ensureDir(claudeDir);
91
+
92
+ let existing = {};
93
+ if (await fs.pathExists(settingsPath)) {
94
+ try {
95
+ existing = await fs.readJson(settingsPath);
96
+ } catch {
97
+ log(
98
+ color.orange,
99
+ '[skills] .claude/settings.json invalido. Recriando com baseline seguro + plugins instalados.'
100
+ );
101
+ }
102
+ }
103
+
104
+ const nextSettings = mergeClaudeSettings(existing, {
105
+ ...CLAUDE_SETTINGS_BASELINE,
106
+ enabledPlugins,
107
+ });
108
+
109
+ await fs.writeJson(settingsPath, nextSettings, { spaces: 2 });
110
+ log(
111
+ color.green,
112
+ '✅ .claude/settings.json atualizado com plugins locais e baseline de seguranca.'
113
+ );
114
+ }
115
+
116
+ function cloneRepo(repo, tmpDir) {
117
+ return spawnSync('git', ['clone', '--depth=1', repo, tmpDir], {
118
+ stdio: 'inherit',
119
+ });
120
+ }
121
+
47
122
  /**
48
123
  * Clona codigodoleo/superpowers-sage e copia o conteúdo para os destinos selecionados.
49
124
  * Requer git instalado no host.
@@ -52,8 +127,10 @@ const TARGET_CONFIG = {
52
127
  * @param {string[]} targets - Lista de destinos: 'claude' | 'cursor' | 'ai'
53
128
  */
54
129
  export async function installSuperpowersSage(targetDir, targets = ['claude']) {
55
- const repo = 'https://github.com/codigodoleo/superpowers-sage.git';
130
+ const sageRepo = 'https://github.com/codigodoleo/superpowers-sage.git';
131
+ const baseRepo = 'https://github.com/obra/superpowers.git';
56
132
  const tmpDir = path.join(os.tmpdir(), `superpowers-sage-${Date.now()}`);
133
+ const tmpBaseDir = path.join(os.tmpdir(), `superpowers-base-${Date.now()}`);
57
134
 
58
135
  const validTargets = targets.filter((t) => TARGET_CONFIG[t]);
59
136
  if (validTargets.length === 0) {
@@ -63,9 +140,7 @@ export async function installSuperpowersSage(targetDir, targets = ['claude']) {
63
140
 
64
141
  log(color.blue, `🔌 Clonando superpowers-sage para: ${validTargets.join(', ')}...`);
65
142
 
66
- const result = spawnSync('git', ['clone', '--depth=1', repo, tmpDir], {
67
- stdio: 'inherit',
68
- });
143
+ const result = cloneRepo(sageRepo, tmpDir);
69
144
 
70
145
  if (result.status !== 0) {
71
146
  log(
@@ -92,5 +167,34 @@ export async function installSuperpowersSage(targetDir, targets = ['claude']) {
92
167
  log(color.green, `✅ superpowers-sage instalado em ${cfg.dest}`);
93
168
  }
94
169
 
170
+ const claudeEnabledPlugins = {
171
+ 'superpowers-sage@superpowers-sage-marketplace': true,
172
+ };
173
+
174
+ if (validTargets.includes('claude')) {
175
+ log(color.blue, '🔌 Clonando superpowers (base) para Claude Code...');
176
+
177
+ const baseResult = cloneRepo(baseRepo, tmpBaseDir);
178
+ if (baseResult.status !== 0) {
179
+ log(
180
+ color.orange,
181
+ '⚠️ Nao foi possivel clonar obra/superpowers. O plugin base nao foi instalado localmente.'
182
+ );
183
+ } else {
184
+ const baseDest = path.join(targetDir, CLAUDE_PLUGIN_SUPERPOWERS);
185
+ await fs.ensureDir(baseDest);
186
+ await fs.copy(tmpBaseDir, baseDest, {
187
+ overwrite: true,
188
+ filter: (src) =>
189
+ !src.includes(`${path.sep}.git${path.sep}`) && !src.endsWith(`${path.sep}.git`),
190
+ });
191
+ claudeEnabledPlugins['superpowers@superpowers-dev'] = true;
192
+ log(color.green, `✅ superpowers instalado em ${CLAUDE_PLUGIN_SUPERPOWERS}`);
193
+ }
194
+
195
+ await updateClaudeProjectSettings(targetDir, claudeEnabledPlugins);
196
+ }
197
+
95
198
  await fs.remove(tmpDir);
199
+ await fs.remove(tmpBaseDir);
96
200
  }
@@ -1,67 +1,160 @@
1
- # 🏠 Pipefy WordPress Website Bem-vindo à documentação oficial do site **pipefy.com** - um projeto
2
- WordPress robusto e moderno da Pipefy. ## 🎯 **Visão Geral** Este é o repositório principal do site
3
- institucional da Pipefy, construído com **WordPress** e uma infraestrutura cloud-native moderna. O
4
- projeto utiliza tecnologias de ponta para garantir performance, escalabilidade e facilidade de
5
- manutenção. ### 📊 **Status do Projeto** - **Versão Atual**: `1.1.7` (2025-05-23) - **WordPress**:
6
- Customizado com tema Pipefy 2020 - **Ambiente**: Multi-ambiente (Local, Development, Staging,
7
- Production) - **Deploy**: Automatizado via GitLab CI/CD + Kubernetes ## 🚀 **Quick Start** ###
8
- Pré-requisitos - [Lando](https://lando.dev/) (para desenvolvimento local) -
9
- [Docker](https://docker.com/) - [Git](https://git-scm.com/) - [Node.js](https://nodejs.org/) (versão
10
- especificada em `.nvmrc`) ### Setup Rápido ```bash # 1. Clone o repositório git clone
11
- git@gitlab.com:pipefy/wordpress/pipefy-website.git cd pipefy-website # 2. Inicie o ambiente local
12
- lando start # 3. Configure WordPress lando ssh -c "development/scripts/init-wp.sh
13
- --user=seu-email@pipefy.com" # 4. Acesse o site # Frontend: https://pipefy.lndo.site # Admin:
14
- https://pipefy.lndo.site/wp-admin ``` ## 🏗️ **Arquitetura** ``` ┌─────────────────┐
15
- ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │ Local │────│ Development │────│
16
- Staging │────│ Production │ │ pipefy.lndo.site│ │development-www │ │ staging-www │ │ www.pipefy.com
17
- │ │ │ │ .pipefy.com │ │ .pipefy.com │ │ │ └─────────────────┘ └─────────────────┘
18
- └─────────────────┘ └─────────────────┘ │ │ │ │
19
- └───────────────────────┼───────────────────────┼───────────────────────┘ │ │ ┌─────────────────┐
20
- ┌─────────────────┐ │ GitLab CI/CD │ │ Kubernetes │ │ Pipelines │ │ + CloudFlare │
21
- └─────────────────┘ └─────────────────┘ ``` ### 🛠️ **Stack Tecnológico** | Categoria | Tecnologia |
22
- |-----------|------------| | **CMS** | WordPress (customizado) | | **Tema** | Pipefy 2020 (custom
23
- theme) | | **Frontend** | PHP, JavaScript, Sass, Gutenberg Blocks | | **Containerização** | Docker,
24
- Lando | | **Orquestração** | Kubernetes, Helm | | **CI/CD** | GitLab CI/CD | | **Infraestrutura** |
25
- Terraform, OCI (Oracle Cloud) | | **CDN/DNS** | CloudFlare | | **Monitoramento** | Custom health
26
- checks | ## 📁 **Estrutura do Projeto** ``` pipefy-website/ ├── 📂 dist/ # WordPress core +
27
- customizações │ └── 📂 wp-content/ │ ├── 📂 themes/pipefy-2020/ # Tema principal │ ├── 📂 plugins/ #
28
- Plugins WordPress │ └── 📂 mu-plugins/ # Must-use plugins ├── 📂 development/ # Scripts e config.
29
- desenvolvimento ├── 📂 helm/ # Charts Kubernetes ├── 📂 k8s/ # Manifests Kubernetes ├── 📂
30
- terraform/ # Infraestrutura como código ├── 📂 .gitlab/ # Templates GitLab CI/CD ├── 📄 .lando.yml #
31
- Configuração ambiente local ├── 📄 .gitlab-ci.yml # Pipeline CI/CD └── 📄 CHANGELOG.md # Histórico
32
- de mudanças ``` ## 🌍 **Ambientes** | Ambiente | URL | Branch | Namespace K8s | Finalidade |
33
- |----------|-----|--------|---------------|------------| | **Local** | `pipefy.lndo.site` |
34
- `feature/*` | - | Desenvolvimento local | | **Development** | `development-www.pipefy.com` |
35
- `development` | `website-dev` | Testes contínuos | | **Staging** | `staging-www.pipefy.com` |
36
- `staging` | `website-stg` | Homologação | | **Production** | `www.pipefy.com` | `master` |
37
- `website-prod` | Site oficial | ## 🔄 **Workflow de Desenvolvimento** ```mermaid graph LR A[Feature
38
- Branch] --> B[Pull Request] B --> C[Code Review] C --> D[Merge to Development] D --> E["🚀
39
- development-www.pipefy.com"] E --> F[Merge to Staging] F --> G["🔍 staging-www.pipefy.com"] G -->
40
- H[Tests + QA] H --> I[Merge to Master] I --> J["✅ www.pipefy.com"] ``` ## 📚 **Documentação
41
- Principal** ### 🚀 **Para Desenvolvedores** - [Getting Started](Getting-Started) - Setup completo do
42
- ambiente - [Arquitetura](Arquitetura) - Estrutura técnica detalhada -
43
- [Desenvolvimento](Desenvolvimento) - Guias de desenvolvimento - [Deploy Pipeline](Deploy-Pipeline) -
44
- Processo de deploy ### 🔧 **Para DevOps** - [Infraestrutura](Infraestrutura) - Kubernetes,
45
- Terraform, AWS - [Monitoramento](Monitoramento) - Health checks e observabilidade -
46
- [Troubleshooting](Troubleshooting) - Resolução de problemas ### 📦 **Para Gestão** - [Plugins &
47
- Integrações](Plugins-Integracoes) - Componentes externos -
48
- [Changelog](https://gitlab.com/pipefy/wordpress/pipefy-website/-/blob/master/CHANGELOG.md) -
49
- Histórico de versões -
50
- [CODEOWNERS](https://gitlab.com/pipefy/wordpress/pipefy-website/-/blob/master/CODEOWNERS) -
51
- Responsabilidades ## 🆘 **Precisa de Ajuda?** ### 🐛 **Problemas Comuns** -
52
- [Troubleshooting](Troubleshooting) - Guia de resolução - [FAQ](FAQ) - Perguntas frequentes ### 📞
53
- **Contatos** - **Equipe**: @Approvers (conforme
54
- [CODEOWNERS](https://gitlab.com/pipefy/wordpress/pipefy-website/-/blob/master/CODEOWNERS)) -
55
- **Issues**: [GitLab Issues](https://gitlab.com/pipefy/wordpress/pipefy-website/-/issues) - **Pipefy
56
- Cards**: Vinculados no
57
- [CHANGELOG.md](https://gitlab.com/pipefy/wordpress/pipefy-website/-/blob/master/CHANGELOG.md) ## 🎯
58
- **Links Importantes** | Recurso | Link | Ambiente | |---------|------|----------| | **Site
59
- Produção** | [www.pipefy.com](https://www.pipefy.com) | 🔴 Production | | **Site Staging** |
60
- [staging-www.pipefy.com](https://staging-www.pipefy.com) | 🟡 Staging | | **Site Development** |
61
- [development-www.pipefy.com](https://development-www.pipefy.com) | 🟠 Development | | **Site Local**
62
- | [pipefy.lndo.site](https://pipefy.lndo.site) | 🔵 Local | | **GitLab Project** |
63
- [pipefy/wordpress/pipefy-website](https://gitlab.com/pipefy/wordpress/pipefy-website) | - | |
64
- **CI/CD Pipelines** | [Pipelines](https://gitlab.com/pipefy/wordpress/pipefy-website/-/pipelines) |
65
- - | | **Kubernetes Dashboards** | *[Links internos conforme ambiente]* | - | --- 📝 **Última
66
- atualização**: Junho 2025 🔄 **Versão da documentação**: 1.1 ✨ **Criado com**: Análise automatizada
67
- do projeto + GitHub Copilot 🌐 **Ambientes atualizados**: Local, Development, Staging, Production
1
+ # 🏠 Pipefy WordPress Website
2
+
3
+ Bem-vindo à documentação oficial do site **pipefy.com** - um projeto WordPress robusto e moderno da Pipefy.
4
+
5
+ ## 🎯 **Visão Geral**
6
+
7
+ Este é o repositório principal do site institucional da Pipefy, construído com **WordPress** e uma infraestrutura cloud-native moderna. O projeto utiliza tecnologias de ponta para garantir performance, escalabilidade e facilidade de manutenção.
8
+
9
+ ### 📊 **Status do Projeto**
10
+ - **Versão Atual**: `1.1.7` (2025-05-23)
11
+ - **WordPress**: Customizado com tema Pipefy 2020
12
+ - **Ambiente**: Multi-ambiente (Local, Development, Staging, Production)
13
+ - **Deploy**: Automatizado via GitLab CI/CD + Kubernetes
14
+
15
+ ## 🚀 **Quick Start**
16
+
17
+ ### Pré-requisitos
18
+ - [Lando](https://lando.dev/) (para desenvolvimento local)
19
+ - [Docker](https://docker.com/)
20
+ - [Git](https://git-scm.com/)
21
+ - [Node.js](https://nodejs.org/) (versão especificada em `.nvmrc`)
22
+
23
+ ### Setup Rápido
24
+ ```bash
25
+ # 1. Clone o repositório
26
+ git clone git@gitlab.com:pipefy/wordpress/pipefy-website.git
27
+ cd pipefy-website
28
+
29
+ # 2. Inicie o ambiente local
30
+ lando start
31
+
32
+ # 3. Configure WordPress
33
+ lando ssh -c "development/scripts/init-wp.sh --user=seu-email@pipefy.com"
34
+
35
+ # 4. Acesse o site
36
+ # Frontend: https://pipefy.lndo.site
37
+ # Admin: https://pipefy.lndo.site/wp-admin
38
+ ```
39
+
40
+ ## 🏗️ **Arquitetura**
41
+
42
+ ```
43
+ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
44
+ │ Local │────│ Development │────│ Staging │────│ Production │
45
+ │ pipefy.lndo.site│ │development-www │ │ staging-www │ │ www.pipefy.com │
46
+ │ │ │ .pipefy.com │ │ .pipefy.com │ │ │
47
+ └─────────────────┘ └─────────────────┘ └─────────────────┘ └─────────────────┘
48
+ │ │ │ │
49
+ └───────────────────────┼───────────────────────┼───────────────────────┘
50
+ │ │
51
+ ┌─────────────────┐ ┌─────────────────┐
52
+ │ GitLab CI/CD │ │ Kubernetes │
53
+ │ Pipelines │ │ + CloudFlare │
54
+ └─────────────────┘ └─────────────────┘
55
+ ```
56
+
57
+ ### 🛠️ **Stack Tecnológico**
58
+
59
+ | Categoria | Tecnologia |
60
+ |-----------|------------|
61
+ | **CMS** | WordPress (customizado) |
62
+ | **Tema** | Pipefy 2020 (custom theme) |
63
+ | **Frontend** | PHP, JavaScript, Sass, Gutenberg Blocks |
64
+ | **Containerização** | Docker, Lando |
65
+ | **Orquestração** | Kubernetes, Helm |
66
+ | **CI/CD** | GitLab CI/CD |
67
+ | **Infraestrutura** | Terraform, OCI (Oracle Cloud) |
68
+ | **CDN/DNS** | CloudFlare |
69
+ | **Monitoramento** | Custom health checks |
70
+
71
+ ## 📁 **Estrutura do Projeto**
72
+
73
+ ```
74
+ pipefy-website/
75
+ ├── 📂 dist/ # WordPress core + customizações
76
+ │ └── 📂 wp-content/
77
+ │ ├── 📂 themes/pipefy-2020/ # Tema principal
78
+ │ ├── 📂 plugins/ # Plugins WordPress
79
+ │ └── 📂 mu-plugins/ # Must-use plugins
80
+ ├── 📂 development/ # Scripts e config. desenvolvimento
81
+ ├── 📂 helm/ # Charts Kubernetes
82
+ ├── 📂 k8s/ # Manifests Kubernetes
83
+ ├── 📂 terraform/ # Infraestrutura como código
84
+ ├── 📂 .gitlab/ # Templates GitLab CI/CD
85
+ ├── 📄 .lando.yml # Configuração ambiente local
86
+ ├── 📄 .gitlab-ci.yml # Pipeline CI/CD
87
+ └── 📄 CHANGELOG.md # Histórico de mudanças
88
+ ```
89
+
90
+ ## 🌍 **Ambientes**
91
+
92
+ | Ambiente | URL | Branch | Namespace K8s | Finalidade |
93
+ |----------|-----|--------|---------------|------------|
94
+ | **Local** | `pipefy.lndo.site` | `feature/*` | - | Desenvolvimento local |
95
+ | **Development** | `development-www.pipefy.com` | `development` | `website-dev` | Testes contínuos |
96
+ | **Staging** | `staging-www.pipefy.com` | `staging` | `website-stg` | Homologação |
97
+ | **Production** | `www.pipefy.com` | `master` | `website-prod` | Site oficial |
98
+
99
+ ## 🔄 **Workflow de Desenvolvimento**
100
+
101
+ ```mermaid
102
+ graph LR
103
+ A[Feature Branch] --> B[Pull Request]
104
+ B --> C[Code Review]
105
+ C --> D[Merge to Development]
106
+ D --> E["🚀 development-www.pipefy.com"]
107
+ E --> F[Merge to Staging]
108
+ F --> G["🔍 staging-www.pipefy.com"]
109
+ G --> H[Tests + QA]
110
+ H --> I[Merge to Master]
111
+ I --> J["✅ www.pipefy.com"]
112
+ ```
113
+
114
+ ## 📚 **Documentação Principal**
115
+
116
+ ### 🚀 **Para Desenvolvedores**
117
+ - [Getting Started](Getting-Started) - Setup completo do ambiente
118
+ - [Arquitetura](Arquitetura) - Estrutura técnica detalhada
119
+ - [Desenvolvimento](Desenvolvimento) - Guias de desenvolvimento
120
+ - [Deploy Pipeline](Deploy-Pipeline) - Processo de deploy
121
+
122
+ ### 🔧 **Para DevOps**
123
+ - [Infraestrutura](Infraestrutura) - Kubernetes, Terraform, AWS
124
+ - [Monitoramento](Monitoramento) - Health checks e observabilidade
125
+ - [Troubleshooting](Troubleshooting) - Resolução de problemas
126
+
127
+ ### 📦 **Para Gestão**
128
+ - [Plugins & Integrações](Plugins-Integracoes) - Componentes externos
129
+ - [Changelog](https://gitlab.com/pipefy/wordpress/pipefy-website/-/blob/master/CHANGELOG.md) - Histórico de versões
130
+ - [CODEOWNERS](https://gitlab.com/pipefy/wordpress/pipefy-website/-/blob/master/CODEOWNERS) - Responsabilidades
131
+
132
+ ## 🆘 **Precisa de Ajuda?**
133
+
134
+ ### 🐛 **Problemas Comuns**
135
+ - [Troubleshooting](Troubleshooting) - Guia de resolução
136
+ - [FAQ](FAQ) - Perguntas frequentes
137
+
138
+ ### 📞 **Contatos**
139
+ - **Equipe**: @Approvers (conforme [CODEOWNERS](https://gitlab.com/pipefy/wordpress/pipefy-website/-/blob/master/CODEOWNERS))
140
+ - **Issues**: [GitLab Issues](https://gitlab.com/pipefy/wordpress/pipefy-website/-/issues)
141
+ - **Pipefy Cards**: Vinculados no [CHANGELOG.md](https://gitlab.com/pipefy/wordpress/pipefy-website/-/blob/master/CHANGELOG.md)
142
+
143
+ ## 🎯 **Links Importantes**
144
+
145
+ | Recurso | Link | Ambiente |
146
+ |---------|------|----------|
147
+ | **Site Produção** | [www.pipefy.com](https://www.pipefy.com) | 🔴 Production |
148
+ | **Site Staging** | [staging-www.pipefy.com](https://staging-www.pipefy.com) | 🟡 Staging |
149
+ | **Site Development** | [development-www.pipefy.com](https://development-www.pipefy.com) | 🟠 Development |
150
+ | **Site Local** | [pipefy.lndo.site](https://pipefy.lndo.site) | 🔵 Local |
151
+ | **GitLab Project** | [pipefy/wordpress/pipefy-website](https://gitlab.com/pipefy/wordpress/pipefy-website) | - |
152
+ | **CI/CD Pipelines** | [Pipelines](https://gitlab.com/pipefy/wordpress/pipefy-website/-/pipelines) | - |
153
+ | **Kubernetes Dashboards** | *[Links internos conforme ambiente]* | - |
154
+
155
+ ---
156
+
157
+ 📝 **Última atualização**: Junho 2025
158
+ 🔄 **Versão da documentação**: 1.1
159
+ ✨ **Criado com**: Análise automatizada do projeto + GitHub Copilot
160
+ 🌐 **Ambientes atualizados**: Local, Development, Staging, Production
@@ -1,4 +1,14 @@
1
- { "scripts": { "prepare": "husky", "commit": "lando git-cz" }, "devDependencies": {
2
- "@commitlint/cli": "^19.7.1", "@commitlint/config-conventional": "^19.7.1", "@commitlint/prompt":
3
- "^19.5.0", "commitizen": "^4.3.1", "husky": "^9.0.11",
4
- "lint-staged": "^15.5.0" } }
1
+ {
2
+ "scripts": {
3
+ "prepare": "husky",
4
+ "commit": "lando git-cz"
5
+ },
6
+ "devDependencies": {
7
+ "@commitlint/cli": "^19.7.1",
8
+ "@commitlint/config-conventional": "^19.7.1",
9
+ "@commitlint/prompt": "^19.5.0",
10
+ "commitizen": "^4.3.1",
11
+ "husky": "^9.0.11",
12
+ "lint-staged": "^15.5.0"
13
+ }
14
+ }
@@ -1,4 +1,16 @@
1
- { "scripts": { "format": "prettier --write .", "lint": "lando eslint .", "lint:fix":
2
- "lando eslint . --fix" }, "devDependencies": { "globals": "^16.3.0",
3
- "@eslint/eslintrc": "^3.3.1", "@eslint/js": "^9.30.1", "eslint": "^9.30.1",
4
- "eslint-config-prettier": "^10.1.5", "eslint-plugin-prettier": "^5.3.1", "prettier": "^3.6.2" } }
1
+ {
2
+ "scripts": {
3
+ "format": "prettier --write .",
4
+ "lint": "lando eslint .",
5
+ "lint:fix": "lando eslint . --fix"
6
+ },
7
+ "devDependencies": {
8
+ "globals": "^16.3.0",
9
+ "@eslint/eslintrc": "^3.3.1",
10
+ "@eslint/js": "^9.30.1",
11
+ "eslint": "^9.30.1",
12
+ "eslint-config-prettier": "^10.1.5",
13
+ "eslint-plugin-prettier": "^5.3.1",
14
+ "prettier": "^3.6.2"
15
+ }
16
+ }
@@ -16,6 +16,17 @@ tooling:
16
16
  service: build
17
17
  description: Run the Sage/Vite development server
18
18
  cmd: npm run dev --prefix /app/content/themes/{{projectName}}
19
+ flush:
20
+ service: appserver
21
+ description: Flush WordPress, Acorn and Redis caches
22
+ cmd:
23
+ - appserver: wp acorn optimize:clear
24
+ - appserver: wp acorn cache:clear
25
+ - appserver: wp acorn view:clear
26
+ - appserver: wp acorn route:clear
27
+ - appserver: wp rewrite flush
28
+ - appserver: wp cache flush
29
+ - cache: redis-cli FLUSHDB
19
30
  theme-bootstrap:
20
31
  service: appserver
21
32
  description: Install theme dependencies
@@ -43,19 +54,3 @@ tooling:
43
54
  cmd: npx stylelint --fix "resources/**/*.{css,scss}" --config /app/content/themes/{{projectName}}/.stylelintrc.json
44
55
  dir: /app/content/themes/{{projectName}}
45
56
  {{/if}}
46
- acorn:
47
- service: appserver
48
- description: Run Acorn artisan commands
49
- dir: /app/content/themes/{{projectName}}
50
- cmd: wp acorn $ACORN_COMMAND
51
- options:
52
- command:
53
- passthrough: true
54
- alias:
55
- - c
56
- describe: Acorn command to execute
57
- interactive:
58
- type: input
59
- message: "Acorn command (example: make:component Hero)"
60
- weight: 100
61
- env: ACORN_COMMAND
@@ -2,7 +2,7 @@ export default [
2
2
  {
3
3
  type: 'confirm',
4
4
  name: 'enable_skills',
5
- message: 'Instalar AI skills (superpowers-sage) no projeto?',
5
+ message: 'Instalar AI skills no projeto (superpowers-sage + dependencias)?',
6
6
  default: true,
7
7
  },
8
8
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codigodoleo/wp-kit",
3
- "version": "3.4.0",
3
+ "version": "3.5.0",
4
4
  "description": "Kit opinativo para padronizar projetos WordPress com CI/CD dinâmico.",
5
5
  "main": "bin/index.js",
6
6
  "bin": {
@@ -1,5 +1,39 @@
1
- root = true [*] charset = utf-8 indent_style = space indent_size = 2 end_of_line = lf
2
- insert_final_newline = true trim_trailing_whitespace = true [*.php] indent_size = 4 max_line_length
3
- = 120 [*.blade.php] indent_size = 4 insert_final_newline = true trim_trailing_whitespace = true
4
- [*.js] indent_size = 2 [*.json] indent_size = 2 [*.css] indent_size = 2 [*.scss] indent_size = 2
5
- [*.md] trim_trailing_whitespace = false [*.yml] indent_size = 2 [*.yaml] indent_size = 2
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ indent_style = space
6
+ indent_size = 2
7
+ end_of_line = lf
8
+ insert_final_newline = true
9
+ trim_trailing_whitespace = true
10
+
11
+ [*.php]
12
+ indent_size = 4
13
+ max_line_length = 120
14
+
15
+ [*.blade.php]
16
+ indent_size = 4
17
+ insert_final_newline = true
18
+ trim_trailing_whitespace = true
19
+
20
+ [*.js]
21
+ indent_size = 2
22
+
23
+ [*.json]
24
+ indent_size = 2
25
+
26
+ [*.css]
27
+ indent_size = 2
28
+
29
+ [*.scss]
30
+ indent_size = 2
31
+
32
+ [*.md]
33
+ trim_trailing_whitespace = false
34
+
35
+ [*.yml]
36
+ indent_size = 2
37
+
38
+ [*.yaml]
39
+ indent_size = 2
@@ -1,28 +1,53 @@
1
- #
2
- {{projectName}}
1
+ # {{projectName}}
3
2
 
4
3
  > WordPress project scaffolded by [wp-kit](https://github.com/codigodoleo/wp-kit), using the
5
- [Roots](https://roots.io/) ecosystem: Bedrock, Sage, Acorn, and Lando. ## Stack - PHP
6
- {{phpVersion}}
7
- - Node.js
8
- {{nodeVersion}}
9
- - WordPress
10
- {{wpCoreVersion}}
11
- {{#if useSage}}- Sage
12
- {{sageVersion}}
13
- + Acorn
14
- {{/if}}- Lando (local development) ## Local Development ```bash lando start lando vite # HMR dev
15
- server lando vite-build # Production build ``` ## AI Co-Pilot This project includes
16
- [superpowers-sage](https://github.com/codigodoleo/superpowers-sage) skills in `.claude/`. Start a
17
- session with: ``` /sage-onboard ``` Available commands: | Command | Purpose | |---|---| |
18
- `/sage-onboard` | Project analysis and overview | | `/sage-plan` | Architecture decision for a new
19
- feature | | `/sage-scaffold` | Run generators and create stubs | | `/sage-review` | Review code
20
- against conventions | | `/sage-debug` | Guided troubleshooting | ## Theme
4
+ > [Roots](https://roots.io/) ecosystem: Bedrock, Sage, Acorn, and Lando.
5
+
6
+ ## Stack
7
+
8
+ - PHP {{phpVersion}}
9
+ - Node.js {{nodeVersion}}
10
+ - WordPress {{wpCoreVersion}}
11
+ {{#if useSage}}- Sage {{sageVersion}} + Acorn
12
+ {{/if}}- Lando (local development)
13
+
14
+ ## Local Development
15
+
16
+ ```bash
17
+ lando start
18
+ lando dev # HMR dev server (Vite)
19
+ lando theme-build # Production build
20
+ ```
21
+
22
+ ## AI Co-Pilot
23
+
24
+ This project includes [superpowers](https://github.com/obra/superpowers) and [superpowers-sage](https://github.com/codigodoleo/superpowers-sage) in `.claude/`.
25
+ Start a session with:
26
+
27
+ ```
28
+ /sage-onboard
29
+ ```
30
+
31
+ Available commands:
32
+
33
+ | Command | Purpose |
34
+ |---|---|
35
+ | `/sage-onboard` | Project analysis and overview |
36
+ | `/sage-plan` | Architecture decision for a new feature |
37
+ | `/sage-scaffold` | Run generators and create stubs |
38
+ | `/sage-review` | Review code against conventions |
39
+ | `/sage-debug` | Guided troubleshooting |
40
+
41
+ ## Theme
21
42
 
22
43
  {{#if useSage}}
23
- Theme located at `content/themes/{{themeName}}/`. ```bash lando theme-composer require
24
- vendor/package lando theme-yarn add package-name lando acorn make:component ComponentName lando
25
- acorn acf:block BlockName ```
44
+ Theme located at `content/themes/{{themeName}}/`.
45
+
46
+ ```bash
47
+ lando theme-bootstrap # Install theme dependencies
48
+ lando acorn make:component ComponentName
49
+ lando acorn acf:block BlockName
50
+ ```
26
51
  {{else}}
27
- No Sage theme configured.
28
- {{/if}}
52
+ No Sage theme configured.
53
+ {{/if}}