specleap-framework 2.1.0 → 2.1.5

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.
Files changed (75) hide show
  1. package/.agents/backend.md +3 -3
  2. package/.agents/frontend.md +2 -2
  3. package/.agents/producto.md +9 -11
  4. package/.claude/hooks/spec-guard.sh +132 -0
  5. package/.claude/settings.json.template +15 -0
  6. package/.clinerules +3 -3
  7. package/.coderabbit.yaml +2 -4
  8. package/.commands/compliance.md +89 -0
  9. package/.commands/inicio.md +15 -15
  10. package/.commands/nuevo/README.md +2 -2
  11. package/.commands/planificar.md +1 -1
  12. package/.continue/rules/04-git-workflow.md +5 -5
  13. package/.continuerules +3 -4
  14. package/.cursorrules +1 -1
  15. package/.github/copilot-instructions.md +1 -1
  16. package/.specleap/i18n/en.json +177 -0
  17. package/.specleap/i18n/es.json +177 -0
  18. package/.specleap/i18n.sh +63 -0
  19. package/CHANGELOG.md +276 -0
  20. package/CLAUDE.md +54 -13
  21. package/README.md +169 -528
  22. package/SETUP.md +16 -13
  23. package/openspec/INDEX.md +53 -0
  24. package/openspec/README.md +104 -0
  25. package/openspec/SPEC-FORMAT.md +168 -0
  26. package/openspec/changes/.gitkeep +0 -0
  27. package/openspec/cli/COMMAND_REFERENCE.md +817 -0
  28. package/openspec/cli/README.md +189 -0
  29. package/openspec/cli/apply.sh +229 -0
  30. package/openspec/cli/archive.sh +240 -0
  31. package/openspec/cli/code-review.sh +207 -0
  32. package/openspec/cli/common.sh +171 -0
  33. package/openspec/cli/enrich.sh +188 -0
  34. package/openspec/cli/ff.sh +329 -0
  35. package/openspec/cli/new.sh +260 -0
  36. package/openspec/cli/openspec +82 -0
  37. package/openspec/cli/report.sh +244 -0
  38. package/openspec/cli/status.sh +178 -0
  39. package/openspec/cli/verify.sh +246 -0
  40. package/openspec/config.yaml +76 -0
  41. package/openspec/examples/CHANGE-SAMPLE-001-user-authentication/00-original-user-story.md +5 -0
  42. package/openspec/examples/CHANGE-SAMPLE-001-user-authentication/01-refined-user-story.md +106 -0
  43. package/openspec/examples/CHANGE-SAMPLE-001-user-authentication/README.md +333 -0
  44. package/openspec/examples/CHANGE-SAMPLE-001-user-authentication/design.md +461 -0
  45. package/openspec/examples/CHANGE-SAMPLE-001-user-authentication/proposal.md +124 -0
  46. package/openspec/examples/CHANGE-SAMPLE-001-user-authentication/specs/functional/F001-authentication.spec.md +399 -0
  47. package/openspec/examples/CHANGE-SAMPLE-001-user-authentication/specs/technical/T001-jwt-implementation.spec.md +606 -0
  48. package/openspec/examples/CHANGE-SAMPLE-001-user-authentication/tasks.md +433 -0
  49. package/openspec/examples/MERMAID_DIAGRAMS.md +481 -0
  50. package/openspec/examples/README.md +334 -0
  51. package/openspec/specs/functional/.gitkeep +0 -0
  52. package/openspec/specs/integration/.gitkeep +0 -0
  53. package/openspec/specs/security/.gitkeep +0 -0
  54. package/openspec/specs/technical/.gitkeep +0 -0
  55. package/openspec/templates/.coderabbit.yaml +259 -0
  56. package/openspec/templates/design.md +181 -0
  57. package/openspec/templates/proposal.md +79 -0
  58. package/openspec/templates/tasks.md +193 -0
  59. package/package.json +10 -5
  60. package/rules/git-workflow.md +3 -3
  61. package/rules/session-protocol.md +3 -3
  62. package/scripts/README.md +13 -25
  63. package/scripts/compliance-audit.sh +325 -0
  64. package/scripts/generate-contract.sh +4 -4
  65. package/scripts/install-skills.sh +12 -11
  66. package/scripts/lib/render-contrato.py +1 -1
  67. package/scripts/quality-baseline.sh +210 -0
  68. package/scripts/quality-healing.sh +241 -0
  69. package/setup.sh +3 -3
  70. package/.claude/skills/ui-ux-pro-max/scripts/__pycache__/core.cpython-314.pyc +0 -0
  71. package/.claude/skills/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-314.pyc +0 -0
  72. package/.claude/skills/ui-ux-pro-max/scripts/__pycache__/search.cpython-314.pyc +0 -0
  73. package/scripts/lib/jira-project-utils.sh +0 -222
  74. package/scripts/setup-mcp.sh +0 -654
  75. package/scripts/test-cuestionario.sh +0 -428
package/CHANGELOG.md ADDED
@@ -0,0 +1,276 @@
1
+ # SpecLeap Framework Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [2.1.5] - 2026-04-24
11
+
12
+ ### Fixed
13
+
14
+ - **npm tarball packaging** — the v2.1.4 tarball was missing critical files. Added `.specleap/i18n/**` (ES/EN translations used by `setup.sh` and runtime scripts), `.specleap/i18n.sh` (loader), `openspec/**` (optional formal CLI + templates + examples), and `CHANGELOG.md` to the `files` whitelist in `package.json`. Without `.specleap/i18n/`, the setup process would fall back to raw keys instead of localized messages. Without `openspec/**`, the documented formal CLI was unreachable from npm-installed copies.
15
+ - **`.npmignore`** — the overly broad `.specleap/` exclusion was replaced with a precise `.specleap/config.json` exclusion (only the actual secret). Added `**/__pycache__/` and `**/*.pyc` to prevent Python bytecode leaking into the published package.
16
+
17
+ ### Notes
18
+
19
+ - Version 2.1.4 was tagged locally and pushed to the private GitHub repo but **never published to npm**, so no user ever received the incomplete tarball. The tag `v2.1.4` remains in GitHub as historical marker of the install-skills.sh fix commit, while `v2.1.5` is the first release published to the npm registry after the ownership transfer to ConceptualCreative.
20
+
21
+ ## [2.1.4] - 2026-04-24
22
+
23
+ ### Fixed
24
+
25
+ - **`scripts/install-skills.sh`** — replaced four occurrences of `((VAR++))` counter increments with `VAR=$((VAR + 1))` plain assignments. The post-increment form returns exit code 1 when the variable starts at 0 (arithmetic expression evaluates to 0 → bash interprets as false), which under `set -e` killed the installer after the first skill. Installation now completes all 34 skills as expected on bash 3.2+ (macOS default) and newer shells. Reported by a collaborator during smoke testing.
26
+
27
+ ## [2.1.3] - 2026-04-23
28
+
29
+ ### Changed
30
+
31
+ - **Repository ownership transferred** from `iapanderson/specleap-framework` to `ConceptualCreative/specleap-framework`. Old URLs keep working via GitHub 301 redirect.
32
+ - Migrated residual Jira / SCRUM references to Asana / `[proyecto]-XXX` across `CLAUDE.md`, `AGENTS.md`, `GEMINI.md`, `codex.md`, `README.md`.
33
+ - Renamed "Slash Command Detection" section in `CLAUDE.md` to "Command Detection"; added a format note clarifying that commands are plain keywords with no `/` or `.` prefix to avoid collision with Claude Code native slash commands.
34
+ - Fixed 11 broken `.commandsXXX.md` paths in `.commands/inicio.md`.
35
+ - Updated `package.json` author metadata to `Styng Arias <developers@conceptualcreative.com>` and repository URLs to `ConceptualCreative/specleap-framework`.
36
+ - Renamed `generate-jira-structure.sh` reference to `generate-asana-structure.sh` in README tree diagram.
37
+ - Fixed TIER 2 comment in `scripts/install-skills.sh` (13 → 14 new skills).
38
+ - Redesigned `README.md` from 624 to 248 lines: removed all decorative emojis, added table of contents, consolidated validation pipeline into a single table, flat TIER 1 / TIER 2 skill tables.
39
+ - Fixed legacy i18n key typo: `scripts.creating_effort` → `scripts.creating_structure` in `en.json`.
40
+ - Updated Agent Skills count message in `setup.sh` (20 → 34).
41
+
42
+ ### Added
43
+
44
+ #### Quality infrastructure
45
+
46
+ - **`.quality/` directory** with versioned `baselines/baseline.json` (coverage min 80 / target 90, complexity 10 per function, duplicates max 3%) and per-feature `evidence/[slug]/` folder for audit trail (gitignored).
47
+ - **`scripts/quality-baseline.sh`** — helper with three verbs: `init`, `snapshot`, `new-evidence [slug]`. Populates `repo_snapshot` (LOC, files, agents, commands, skills) and creates evidence stubs for each feature.
48
+ - **`scripts/quality-healing.sh`** — healing telemetry log with three verbs: `log`, `show`, `stats`. JSONL format per feature at `.quality/evidence/[slug]/healing.jsonl` with fields `ts`, `phase`, `severity`, `action`, `detail`, `file`.
49
+
50
+ #### Spec-guard hook
51
+
52
+ - **`.claude/hooks/spec-guard.sh`** — `PreToolUse` hook that blocks `Write` / `Edit` / `NotebookEdit` on files under `src/`, `app/`, `tests/`, `test/`, `lib/` when the current git branch is `main`, `stage` or `develop`. Fail-open on internal errors (no git, no jq, malformed stdin). Pedagogical block message suggests creating a `feature/[proyecto]-[ticket]-[desc]` branch and recalls the `feature → stage → main` flow.
53
+ - **`.claude/settings.json.template`** — hook wiring snippet that consumer projects merge into their own `.claude/settings.json`.
54
+
55
+ #### Compliance audit
56
+
57
+ - **`compliance` command** (`.commands/compliance.md`) — conversational trigger (`compliance`, `auditoria`, `audit`) that runs the self-audit and reports back.
58
+ - **`scripts/compliance-audit.sh`** — six-dimension self-audit with 0–100 score per dimension and averaged total:
59
+ - *Version* — `package.json` version vs last git tag
60
+ - *Skills* — `~/.skills/` count vs README / baseline counters
61
+ - *i18n* — key parity between `es.json` and `en.json`
62
+ - *Hooks* — `spec-guard.sh` present, shebang, executable, referenced in settings template
63
+ - *Baseline* — `repo_snapshot` freshness (≤20% drift)
64
+ - *Docs* — no legacy brand residuals in root `*.md`
65
+ - Writes per-run JSON detail to `.quality/evidence/compliance/audit-TS.json` (gitignored).
66
+
67
+ #### Internationalisation
68
+
69
+ - New namespaces `quality.baseline`, `quality.healing`, `quality.spec_guard`, `quality.compliance` in `.specleap/i18n/es.json` and `en.json`. All new runtime messages go through the existing `t "key.path"` helper.
70
+
71
+ ### Removed
72
+
73
+ - **`scripts/setup-mcp.sh`** — obsolete Jira-MCP installer that contradicted the actual Asana-via-API flow handled by `setup.sh`. It claimed to install the Asana client but in practice prompted for Atlassian credentials and wrote a Jira MCP block into IDE config. Removed entirely; Asana is wired through `setup.sh` (direct API + token in `.env`), not through MCP.
74
+ - References to `openclaw` in `.commands/planificar.md` (legacy orchestration tool, no longer relevant to the public framework).
75
+ - Historical `CHANGELOG.md` entry no longer spells out the concrete personal emails that had been removed in v2.0; rewritten to "Legacy personal emails (removed)".
76
+
77
+ ### Fixed
78
+
79
+ - **`SETUP.md`** Agent Skills section: updated from "20 Skills" to "34 profesionales" (20 TIER 1 + 14 TIER 2), pointed to `scripts/install-skills.sh` (the real installer), removed decorative emojis and the reference to `docs/SKILLS-REFERENCE.md` (deleted in v2.0).
80
+ - **`scripts/README.md`**: removed the obsolete `setup-mcp.sh` section and updated `install-skills.sh` description to 34 skills with full category breakdown.
81
+ - **`.gitignore`**: added `.specleap/config.json` (generated per-user by `setup.sh`, contains `github_user` and `asana_workspace`; must never be committed).
82
+
83
+ ### Changed (deep cleanup pass)
84
+
85
+ A thorough pre-release audit revealed ~60 additional legacy references missed by the first cleanup pass. This round completes the migration:
86
+
87
+ - **`openspec/` CLI made tracker-agnostic** instead of Jira-coupled. The flag `--jira <key>` becomes `--ticket <id>`, variable `JIRA_KEY` becomes `TICKET_ID`, function `parse_jira_key()` becomes `parse_ticket_id()`. Regex updated from `[A-Z]+-[0-9]+` to `[a-zA-Z0-9-]+-[0-9]+` so it accepts the SpecLeap convention `app-tienda-23`, `channel-pms-107`, etc.
88
+ - Templates (`openspec/templates/proposal.md`, `tasks.md`, `.coderabbit.yaml`) now use `TICKET-XXX` as the neutral placeholder (git-friendly for branch names, no brackets).
89
+ - Examples in `openspec/examples/CHANGE-SAMPLE-001-user-authentication/` rewritten to use `app-tienda-NN` tickets instead of `PROJ-NNN`.
90
+ - `.agents/backend.md`, `.agents/frontend.md`, `.agents/producto.md` updated (13 Jira mentions across the three roles) to use Asana terminology and the real `ASANA_ACCESS_TOKEN` flow instead of a fictional "Jira MCP".
91
+ - `.cursorrules`, `.continuerules`, `.clinerules`, `.continue/rules/04-git-workflow.md`, `.github/copilot-instructions.md`, `.coderabbit.yaml` updated with Asana/ticket terminology and `app-tienda-23` example.
92
+ - `rules/git-workflow.md`, `rules/session-protocol.md` updated to mention Asana explicitly.
93
+ - `scripts/generate-contract.sh` YAML frontmatter block `jira: {...}` replaced with `asana: {...}` (workspace_id, section_count, task_count, synced_at).
94
+ - `scripts/lib/render-contrato.py` and `.continuerules` had residual "ArchSpec" branding in headers/titles; now "SpecLeap".
95
+ - `.quality/README.md` example `channel-pms-107` (a real internal project name leaked) replaced with neutral `api-backend-45`.
96
+
97
+ ### Removed (deep cleanup pass)
98
+
99
+ - **`scripts/lib/jira-project-utils.sh`** (222 lines) — Jira project utilities. No caller imported it (`grep -r` returned 0 usages).
100
+ - **`scripts/test-cuestionario.sh`** (428 lines) — Jira-oriented test harness that referenced the already-renamed `generate-jira-structure.sh` (now `generate-asana-structure.sh`) and had no invocations anywhere in the repo.
101
+
102
+ ### Fixed (deep cleanup pass)
103
+
104
+ - `.agents/producto.md` line 374: the word "Transiciona" was split across a blank line ("Transi\n\nciona"); restored as a single word.
105
+
106
+ ---
107
+
108
+ ## [2.1.1] - 2026-04-04
109
+
110
+ ### Added
111
+ - **GDPR/DSGVO expert** skill (alirezarezvani/claude-skills) — GDPR compliance validation
112
+
113
+ ### Changed
114
+ - Total skills: 33 → **34**
115
+
116
+ ## [2.1.0] - 2026-04-04
117
+
118
+ ### Added
119
+
120
+ #### 🎯 13 New Agent Skills (Total: 33)
121
+
122
+ **Design & Frontend (3):**
123
+ - `web-design-guidelines` (vercel-labs) — Vercel-style design patterns
124
+ - `vercel-composition-patterns` (vercel-labs) — React composition best practices
125
+ - `agent-browser` (vercel-labs) — Browser automation for testing
126
+
127
+ **Brainstorming & Documentation (2):**
128
+ - `brainstorming` (obra/superpowers) — Ideation techniques for spec refinement
129
+ - `pdf` (anthropics) — PDF analysis and manipulation
130
+
131
+ **DevOps & Infrastructure (2):**
132
+ - `terraform-engineer` (jeffallan) — Infrastructure as Code with Terraform
133
+ - `monitoring-expert` (jeffallan) — Performance profiling and monitoring
134
+
135
+ **Mobile Development (2):**
136
+ - `react-native-expert` (jeffallan) — React Native mobile development
137
+ - `flutter-expert` (jeffallan) — Flutter cross-platform development
138
+
139
+ **Documentation (1):**
140
+ - `code-documenter` (jeffallan) — Automatic code documentation generation
141
+
142
+ **Security (1):**
143
+ - `security-reviewer` (jeffallan) — Security review and pentesting patterns
144
+
145
+ **Testing Advanced (2):**
146
+ - `playwright-expert` (jeffallan) — E2E testing with Playwright
147
+ - `test-master` (jeffallan) — Advanced testing methodologies
148
+
149
+ **Total:** 20 → **33 skills** (+65% improvement)
150
+
151
+ ### Changed
152
+ - Updated `scripts/install-skills.sh` header to reflect 33 total skills
153
+ - Updated `README.md` skills section with complete categorization
154
+ - Bumped version to `2.1.0` (minor version: new features added)
155
+
156
+ ### Added - 2026-03-20
157
+
158
+ #### 🛡️ 3-Layer Validation System
159
+ - **Git hooks pre-commit** (`scripts/install-git-hooks.sh`) - Automatic validation in <5 seconds
160
+ - Validates syntax, linters, formatters
161
+ - Prevents CONTRATO.md modifications (immutable)
162
+ - Prevents debug code (console.log, var_dump)
163
+ - Rejects commits that fail validation
164
+ - **Full validation in `implementar` command** - Exhaustive checks (1-5 min)
165
+ - Unit tests + integration tests
166
+ - Validation vs CONTRATO.md and specs
167
+ - Coverage >= 80% requirement
168
+ - Only pushes if ALL tests pass
169
+ - **CodeRabbit integration** - Deep PR review (5-10 min)
170
+ - Architecture, security, business logic validation
171
+ - Automatic comments on PRs
172
+ - Profile "assertive" configured
173
+ - `.coderabbit.yaml` included
174
+
175
+ #### ❓ Help Command & Discoverability
176
+ - Created `.commands/ayuda.md` - Complete command reference
177
+ - Lists ALL available commands (conversational + CLI)
178
+ - Explains when to use each workflow
179
+ - Updated `CLAUDE.md` to auto-detect `ayuda`, `help`, `comandos`
180
+
181
+ #### 📚 Documentation & Clarity
182
+ - **OpenSpec vs Conversational workflows** - Clear distinction when to use each
183
+ - Conversational: Small teams, rapid development
184
+ - OpenSpec CLI: Enterprise, formal proposals, traceability
185
+ - Both can coexist and complement each other
186
+ - **CodeRabbit clarification** - Works with BOTH workflows, not just OpenSpec
187
+ - **README.md** - Complete system explanation with 3-layer validation
188
+ - **SETUP.md** - Git hooks installation as Step 4
189
+ - **scripts/README.md** - Scripts reference guide
190
+
191
+ ### Changed - 2026-03-20
192
+
193
+ #### URLs & Branding
194
+ - All repository URLs updated: `specleap` → `specleap-framework`
195
+ - "Conceptual Creative" → "SpecLeap Community/Contributors"
196
+ - "Pamela Anderson" → "SpecLeap Contributor" (in examples)
197
+ - Package.json repository URLs corrected
198
+
199
+ #### Documentation Links
200
+ - Fixed broken `docs/` references (directory was removed)
201
+ - Updated to point to actual existing files
202
+ - `.commands/`, `openspec/`, `.agents/` references
203
+
204
+ ### Removed - 2026-03-20
205
+
206
+ #### Security & Privacy
207
+ - `openspec/cli/jira.sh` - Private Jira credentials
208
+ - `docs/` directory (7 files, 2,630 lines) - Old ArchSpec landing with private references
209
+ - All mentions of:
210
+ - conceptualcreative.com domains
211
+ - Private Atlassian URLs
212
+ - Legacy personal emails (removed)
213
+ - Internal project names
214
+
215
+ ### Fixed - 2026-03-20
216
+
217
+ - Survey count corrected: 58 questions (not 56)
218
+ - Git ignore: Added `kofi-images/` to prevent accidental push
219
+
220
+ ---
221
+
222
+ ## Statistics - 2026-03-20
223
+
224
+ **Files changed:** 24
225
+ **Lines added:** ~2,500
226
+ **Lines removed:** ~2,650 (mostly private data cleanup)
227
+ **Commits:** 4
228
+
229
+ **Key improvements:**
230
+ - ✅ 100% private data removed
231
+ - ✅ Quality validation system implemented
232
+ - ✅ Complete discoverability (help command)
233
+ - ✅ Clear workflow distinction (conversational vs CLI)
234
+ - ✅ Professional documentation
235
+
236
+ ---
237
+
238
+ ## Migration Guide
239
+
240
+ ### For Existing Users
241
+
242
+ #### To enable git hooks:
243
+ ```bash
244
+ cd your-project
245
+ bash scripts/install-git-hooks.sh
246
+ ```
247
+
248
+ #### To discover all commands:
249
+ In chat with your AI assistant:
250
+ ```
251
+ ayuda
252
+ ```
253
+
254
+ Or in terminal:
255
+ ```bash
256
+ openspec --help
257
+ ```
258
+
259
+ #### To understand when to use CLI vs conversational:
260
+ - **Small team (1-3 devs):** Use conversational commands in chat
261
+ - **Large team (4+ devs):** Use OpenSpec CLI for formal proposals
262
+ - **Both:** Use conversational for daily work, CLI for big changes
263
+
264
+ ---
265
+
266
+ ## Coming Soon
267
+
268
+ - [ ] Integration tests for git hooks
269
+ - [ ] CI/CD templates
270
+ - [ ] More Agent Skills (TIER 2)
271
+ - [ ] Docker support
272
+ - [ ] VS Code extension
273
+
274
+ ---
275
+
276
+ **Full details:** See individual commit messages and PR descriptions.
package/CLAUDE.md CHANGED
@@ -52,9 +52,9 @@ When the user says **"Hola"** (case-insensitive), execute `.commands/inicio.md`:
52
52
 
53
53
  ---
54
54
 
55
- ## Slash Command Detection (CRITICAL)
55
+ ## Command Detection (CRITICAL)
56
56
 
57
- **When the user writes a SINGLE slash command** (e.g., just `refinar` or `crear-tickets`), **AUTOMATICALLY**:
57
+ **When the user writes a SINGLE command keyword** (e.g., just `refinar` or `crear-tickets`), **AUTOMATICALLY**:
58
58
 
59
59
  1. **Detect the command** from the message
60
60
  2. **Read the corresponding `.commands/*.md` file**
@@ -64,7 +64,7 @@ When the user says **"Hola"** (case-insensitive), execute `.commands/inicio.md`:
64
64
 
65
65
  | User writes | Read this file | Then execute |
66
66
  |-------------|----------------|--------------|
67
- | `/inicio` or `Hola` | `.commands/inicio.md` | Start workflow |
67
+ | `inicio` or `Hola` | `.commands/inicio.md` | Start workflow |
68
68
  | `ayuda`, `help`, `comandos` | `.commands/ayuda.md` | List ALL available commands |
69
69
  | `refinar` | `.commands/refinar.md` | Refine user story |
70
70
  | `planificar` | `.commands/planificar.md` | Generate backlog |
@@ -73,20 +73,23 @@ When the user says **"Hola"** (case-insensitive), execute `.commands/inicio.md`:
73
73
  | `explicar` | `.commands/explicar.md` | Explain concept |
74
74
  | `documentar` | `.commands/documentar.md` | Update docs |
75
75
  | `adoptar` | `.commands/adoptar.md` | Adopt legacy project |
76
+ | `compliance`, `auditoria`, `audit` | `.commands/compliance.md` | Run framework self-audit (6 dimensions, 0-100 score) |
76
77
 
77
78
  **Rules:**
78
- - If user writes `/comando` alone → read `.commands/comando.md` immediately
79
- - If user writes `/comando` + context → read file + use context
79
+ - If user writes `comando` alone → read `.commands/comando.md` immediately
80
+ - If user writes `comando` + context → read file + use context
80
81
  - NEVER ask "should I read the file?" — just read it
81
82
 
83
+ **Format note:** Commands are plain keywords (no `/`, no `.`). The `/` prefix is reserved by Claude Code for its own native slash commands (`/help`, `/clear`, `/model`, etc.), so SpecLeap commands must be written without it to avoid collision. The `.commands/file.md` path is an internal file reference, not a command syntax.
84
+
82
85
  ---
83
86
 
84
87
  ## Commands Available
85
88
 
86
89
  | Command | Description | Agente |
87
90
  |---------|-------------|--------|
88
- | `refinar PROJ-XXX` | Refine Asana user story | producto.md |
89
- | `planificar PROJ-XXX` | Generate implementation plan | backend.md / frontend.md |
91
+ | `refinar [proyecto]-XXX` | Refine Asana user story | producto.md |
92
+ | `planificar [proyecto]-XXX` | Generate implementation plan | backend.md / frontend.md |
90
93
  | `implementar @plan.md` | Execute plan: branch + code + tests + PR | backend.md / frontend.md |
91
94
  | `explicar [concepto]` | Explain code/architecture/decisions | neutral |
92
95
  | `documentar` | Update technical documentation | neutral |
@@ -111,6 +114,44 @@ Adopt these roles when executing commands:
111
114
 
112
115
  ---
113
116
 
117
+ ## Quality Baseline and Evidence
118
+
119
+ SpecLeap versions quality thresholds and preserves audit evidence per feature:
120
+
121
+ - **`.quality/baselines/baseline.json`** — shared thresholds (coverage 80/90%, complexity 10, duplicates 3%) plus a repo snapshot. Versioned.
122
+ - **`.quality/evidence/[feature-slug]/`** — per-feature audit trail (ticket metadata, test outputs, security scans, decision log, healing telemetry). NOT versioned; regenerated per feature.
123
+ - **`scripts/quality-baseline.sh`** — helper with three verbs: `init`, `snapshot`, `new-evidence [slug]`.
124
+ - **`scripts/quality-healing.sh`** — helper that appends JSONL healing entries to `.quality/evidence/[slug]/healing.jsonl`. Verbs: `log`, `show`, `stats`.
125
+
126
+ See `.quality/README.md` for usage details.
127
+
128
+ ---
129
+
130
+ ## Spec-guard Hook
131
+
132
+ A Claude Code `PreToolUse` hook blocks `Write`/`Edit`/`NotebookEdit` on files under `src/`, `app/`, `tests/`, `test/` or `lib/` when the current git branch is one of the protected ones (`main`, `stage`, `develop`). This enforces the "no code without an active feature branch" rule.
133
+
134
+ - **Hook:** `.claude/hooks/spec-guard.sh`
135
+ - **Template config:** `.claude/settings.json.template`
136
+ - **Philosophy:** fail-open — if the hook hits an internal error (no git repo, no jq, malformed stdin), it exits 0 (allow). It only blocks when it is certain the rule applies.
137
+ - **Bypass for framework maintenance:** docs (`*.md`), root configs (`package.json`, `.env`), `scripts/` and framework context files (`CLAUDE.md`, `AGENTS.md`, `GEMINI.md`, `codex.md`) are never blocked.
138
+
139
+ ### Manual activation in a consumer project
140
+
141
+ Copy these two files into the consumer project root:
142
+
143
+ ```bash
144
+ mkdir -p .claude/hooks
145
+ cp /path/to/specleap-framework/.claude/hooks/spec-guard.sh .claude/hooks/spec-guard.sh
146
+ chmod +x .claude/hooks/spec-guard.sh
147
+ ```
148
+
149
+ Then merge `.claude/settings.json.template` content into the project's `.claude/settings.json` (create the file if it doesn't exist). If the file already has `hooks.PreToolUse` entries, append the new matcher rather than overwrite.
150
+
151
+ Automatic integration via `setup.sh` is planned for a later release.
152
+
153
+ ---
154
+
114
155
  ## Standards (Always Apply)
115
156
 
116
157
  Read and follow these standards for ALL code:
@@ -259,16 +300,16 @@ User: "app-tienda y desarrollo"
259
300
  AI: [Load proyectos/app-tienda/CONTRATO.md + context/]
260
301
  "✅ Proyecto app-tienda cargado. ¿Qué ticket trabajarás?"
261
302
 
262
- User: "PROJ-123"
303
+ User: "app-tienda-23"
263
304
  AI: "¿Refinar o planificar directamente?"
264
305
 
265
- User: "planificar PROJ-123"
306
+ User: "planificar app-tienda-23"
266
307
  AI: [Adopt .agents/backend.md]
267
308
  [Read CONTRATO + context + ticket]
268
- [Generate plan in specs/PROJ-123_backend.md]
309
+ [Generate plan in specs/app-tienda-23_backend.md]
269
310
  "📋 Plan creado. Revisar antes de implementar."
270
311
 
271
- User: "implementar @PROJ-123_backend.md"
312
+ User: "implementar @app-tienda-23_backend.md"
272
313
  AI: [Adopt .agents/backend.md]
273
314
  [Execute plan step by step]
274
315
  [Tests, commit, push, PR]
@@ -300,8 +341,8 @@ See: `openspec/cli/README.md`
300
341
 
301
342
  MUST use for:
302
343
  - `crear-tickets` — Generate all tickets from CONTRATO.md
303
- - `refinar PROJ-XXX` — Read and enrich ticket
304
- - `planificar PROJ-XXX` — Read ticket for plan generation
344
+ - `refinar [proyecto]-XXX` — Read and enrich ticket
345
+ - `planificar [proyecto]-XXX` — Read ticket for plan generation
305
346
  - `implementar` — Update ticket status during implementation
306
347
  - Automatic updates: "To Do" → "In Progress" → "In Review" → "Done"
307
348