Empezar
Configuración del proyecto
Cada proyecto completa el contexto del plugin con dos ficheros locales. Los genera
/hanzo-web:init en el checkout principal y no se versionan.Fuente: plugins/hanzo-web/templates/CLAUDE.local.md, plugins/hanzo-web/templates/hanzo-project.example.json, plugins/hanzo-web/templates/worktree-cleanup.plist · hanzo-web v0.2.0
En esta página
Ficheros del proyecto
.claude/hanzo-project.json: Valores que leen los scripts y los skills. Esquema entemplates/hanzo-project.example.json.CLAUDE.local.md: Hechos del proyecto (arquitectura, content types, sitios, entornos) y notas locales.
Plantillas
Plantillas del plugin a partir de las que init genera los ficheros.
CLAUDE.local.md
markdown
# CLAUDE.local.md — {{PROJECT_NAME}}
The shared Hanzo web rules (Jira, worktrees, CodeClimate, MRs, releases, local preview, CI status, worktree cleanup) come from the **hanzo-web** plugin and are injected at session start, together with `.claude/hanzo-project.json`. This file only holds what is specific to this project. Where it contradicts the plugin rules, this file wins.
Generated by `/hanzo-web:init` on {{DATE}}. Re-run it to refresh the detected facts; hand-written notes below the "Local notes" heading are kept.
## Project management
- **Jira board:** {{JIRA_BOARD}} (key `{{JIRA_KEY}}`).
- **GitLab repository:** https://{{GITLAB_HOST}}/{{GITLAB_PROJECT}} (MR target: `{{DEVELOP}}`; production: `{{PRODUCTION}}`).
## Project facts
### Apps
- **Strapi** `{{STRAPI_DIR}}/` — Strapi {{STRAPI_VERSION}}{{STRAPI_DB_NOTE}}. Local plugins: {{STRAPI_LOCAL_PLUGINS}}. Generated typings: {{STRAPI_TYPES}}.
- **Next.js** `{{NEXT_DIR}}/` — Next {{NEXT_VERSION}}, {{NEXT_ROUTER}} router{{NEXT_EXPORT_NOTE}}. Node {{NODE_VERSION}}. Notable deps: {{NEXT_DEPS}}. Hanzo DS: {{HANZO_PACKAGES}}.
### Content model
- **Dynamic zones** (content type → field → number of blocks): {{DYNAMIC_ZONES}}.
- **Component categories**: {{COMPONENT_CATEGORIES}}.
- {{NEW_BLOCK_ZONES_NOTE}}
### Rendering
- Block map: {{DYNAMIC_MAP}} (`__component: "<category>.<kebab-name>"` → PascalCase key → `{{MODULES_DIR}}/<Name>`). New blocks need an entry there; it is a frequent merge-conflict point.
- {{CSS_CLASSES_NOTE}}
### Sites and locales
{{SITES}}
- Locales: {{LOCALES}} (default `{{DEFAULT_LOCALE}}`).
### Environments
- PRE: {{PRE_URL}} — {{PRE_DEPLOY_NOTE}}
- PRO: {{PRO_URL}}
### Local preview notes
- Strapi DB: `{{STRAPI_DB}}`. Dynamic-zone rows live in `<collection>_components` (e.g. `{{EXAMPLE_COMPONENTS_TABLE}}`).
{{SITE_ENV_NOTES}}
### CI
- `.gitlab-ci.yml` stages: {{CI_STAGES}}. Includes: {{CI_INCLUDES}}.
## Local notes
<!-- Hand-written, project-specific lessons go here (kept on re-init). -->hanzo-project.example.json
json
{
"schemaVersion": 1,
"project": {
"name": "Accumin",
"slug": "accumin"
},
"jira": {
"key": "AP2026",
"board": "https://codehanzo.atlassian.net/jira/software/projects/AP2026/boards/306"
},
"gitlab": {
"host": "repos.codehanzo.com",
"project": "accumin/web-accumin-strapi",
"remote": "origin"
},
"git": {
"develop": "develop",
"production": "master"
},
"apps": {
"next": "app-nextjs",
"strapi": "accumin"
},
"codeclimate": {
"srcDirs": ["app-nextjs/src", "accumin/src", "accumin/config"]
},
"release": {
"versionFile": "app-nextjs/src/pages/_document.js",
"versionConst": "RELEASE_VERSION"
},
"local": {
"strapiPort": 1337,
"nextPort": 3000,
"strapiDb": "accumin/.tmp/data.db"
},
"sites": [
{ "id": "main", "envFile": "support/cms/envs-build-main", "basePath": "/" },
{ "id": "intelligence", "envFile": "support/cms/envs-build-intelligence", "basePath": "/intelligence" }
],
"locales": ["en", "es", "fr", "de", "nl"],
"defaultLocale": "en",
"environments": {
"pre": "https://pre.accumin.com/",
"pro": "https://www.accumin.com/"
},
"worktrees": {
"dir": ".claude/worktrees",
"dailyCleanup": { "enabled": true, "hour": 18 }
}
}worktree-cleanup.plist
xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!-- Installed by /hanzo-web:clean-worktrees (or /hanzo-web:init). Placeholders: {{SLUG}} {{SCRIPT}} {{REPO}} {{HOME}} {{HOUR}}.
{{SCRIPT}} is a stable copy of the plugin script in ~/.claude/hanzo-web/, because the plugin cache path changes on every update. -->
<plist version="1.0">
<dict>
<key>Label</key><string>com.hanzo.{{SLUG}}.worktree-cleanup</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>{{SCRIPT}}</string>
<string>--repo</string>
<string>{{REPO}}</string>
</array>
<key>StartCalendarInterval</key>
<dict><key>Hour</key><integer>{{HOUR}}</integer><key>Minute</key><integer>0</integer></dict>
<key>StandardOutPath</key><string>{{HOME}}/Library/Logs/hanzo-{{SLUG}}-worktree-cleanup.launchd.log</string>
<key>StandardErrorPath</key><string>{{HOME}}/Library/Logs/hanzo-{{SLUG}}-worktree-cleanup.launchd.log</string>
</dict>
</plist>