specleap-framework 2.0.8 β 2.0.9
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.
- package/CLAUDE.md +357 -0
- package/package.json +3 -2
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
# SpecLeap β Context for Claude Code & Claude API
|
|
2
|
+
|
|
3
|
+
**Methodology:** Spec-Driven Development (SDD). Spec first, never code first.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## π Default Language: SPANISH
|
|
8
|
+
|
|
9
|
+
**CRITICAL:** All feedback, messages, commit messages, and user-facing text MUST be in SPANISH.
|
|
10
|
+
|
|
11
|
+
This project is for Spanish-speaking teams. All agents, commands, and responses must use Spanish unless explicitly overridden.
|
|
12
|
+
|
|
13
|
+
**Examples:**
|
|
14
|
+
β "Generating plan..."
|
|
15
|
+
β
"Generando plan..."
|
|
16
|
+
|
|
17
|
+
β "Tests passed"
|
|
18
|
+
β
"Tests pasaron"
|
|
19
|
+
|
|
20
|
+
See individual agent files (`.agents/*.md`) for specific language directives.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Project Structure
|
|
25
|
+
|
|
26
|
+
This is **SpecLeap**, a development framework that combines:
|
|
27
|
+
- **Conversational agents** (specialized roles with commands)
|
|
28
|
+
- **Spec-Driven Development** (contracts first, code second)
|
|
29
|
+
- **Multi-project support** (independent projects with contracts)
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Core Principles
|
|
34
|
+
|
|
35
|
+
1. **CONTRATO.md is IMMUTABLE** β Once accepted, never modify. Use ANEXOS.md for improvements.
|
|
36
|
+
2. **Projects are independent** β Each project in `proyectos/` has its own contract and context.
|
|
37
|
+
3. **Commands are in Spanish** β `refinar`, `planificar`, `implementar`, `explicar`, `documentar`
|
|
38
|
+
4. **Agents have roles** β Backend, Frontend, Product Analyst (see `.agents/`)
|
|
39
|
+
5. **Standards are global** β `specs/*.mdc` apply to ALL projects
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Getting Started
|
|
44
|
+
|
|
45
|
+
### Trigger Word: "Hola"
|
|
46
|
+
|
|
47
|
+
When the user says **"Hola"** (case-insensitive), execute `.commands/inicio.md`:
|
|
48
|
+
1. List available projects in `proyectos/`
|
|
49
|
+
2. Ask which project to work on (or new project)
|
|
50
|
+
3. Load project context (CONTRATO.md + context/)
|
|
51
|
+
4. Ask what type of work (DESARROLLO / DOCUMENTACIΓN)
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Slash Command Detection (CRITICAL)
|
|
56
|
+
|
|
57
|
+
**When the user writes a SINGLE slash command** (e.g., just `refinar` or `crear-tickets`), **AUTOMATICALLY**:
|
|
58
|
+
|
|
59
|
+
1. **Detect the command** from the message
|
|
60
|
+
2. **Read the corresponding `.commands/*.md` file**
|
|
61
|
+
3. **Follow the instructions in that file step-by-step**
|
|
62
|
+
|
|
63
|
+
**Command-to-File Mapping:**
|
|
64
|
+
|
|
65
|
+
| User writes | Read this file | Then execute |
|
|
66
|
+
|-------------|----------------|--------------|
|
|
67
|
+
| `/inicio` or `Hola` | `.commands/inicio.md` | Start workflow |
|
|
68
|
+
| `ayuda`, `help`, `comandos` | `.commands/ayuda.md` | List ALL available commands |
|
|
69
|
+
| `refinar` | `.commands/refinar.md` | Refine user story |
|
|
70
|
+
| `planificar` | `.commands/planificar.md` | Generate backlog |
|
|
71
|
+
| `crear-tickets` | `.commands/crear-tickets.md` | Alias of `planificar` |
|
|
72
|
+
| `implementar` | `.commands/implementar.md` | Execute implementation |
|
|
73
|
+
| `explicar` | `.commands/explicar.md` | Explain concept |
|
|
74
|
+
| `documentar` | `.commands/documentar.md` | Update docs |
|
|
75
|
+
| `adoptar` | `.commands/adoptar.md` | Adopt legacy project |
|
|
76
|
+
|
|
77
|
+
**Rules:**
|
|
78
|
+
- If user writes `/comando` alone β read `.commands/comando.md` immediately
|
|
79
|
+
- If user writes `/comando` + context β read file + use context
|
|
80
|
+
- NEVER ask "should I read the file?" β just read it
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Commands Available
|
|
85
|
+
|
|
86
|
+
| Command | Description | Agente |
|
|
87
|
+
|---------|-------------|--------|
|
|
88
|
+
| `refinar SCRUM-XX` | Refine Jira user story | producto.md |
|
|
89
|
+
| `planificar SCRUM-XX` | Generate implementation plan | backend.md / frontend.md |
|
|
90
|
+
| `implementar @plan.md` | Execute plan: branch + code + tests + PR | backend.md / frontend.md |
|
|
91
|
+
| `explicar [concepto]` | Explain code/architecture/decisions | neutral |
|
|
92
|
+
| `documentar` | Update technical documentation | neutral |
|
|
93
|
+
|
|
94
|
+
**See:** `.commands/` for detailed command specifications.
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Agents
|
|
99
|
+
|
|
100
|
+
Adopt these roles when executing commands:
|
|
101
|
+
|
|
102
|
+
- **`.agents/backend.md`** β Laravel + PHP + API expert
|
|
103
|
+
- **`.agents/frontend.md`** β React + TypeScript + Vite expert
|
|
104
|
+
- **`.agents/producto.md`** β Product analyst + user story enrichment
|
|
105
|
+
|
|
106
|
+
**When to adopt:**
|
|
107
|
+
- `refinar` β producto.md
|
|
108
|
+
- `planificar` backend β backend.md
|
|
109
|
+
- `planificar` frontend β frontend.md
|
|
110
|
+
- `implementar` β backend.md or frontend.md (depending on plan)
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Standards (Always Apply)
|
|
115
|
+
|
|
116
|
+
Read and follow these standards for ALL code:
|
|
117
|
+
|
|
118
|
+
### Global Standards
|
|
119
|
+
1. **`specs/base-standards.mdc`** β Core principles (English only, TDD, small steps)
|
|
120
|
+
2. **`specs/backend-standards.mdc`** β Backend patterns (DDD, testing)
|
|
121
|
+
3. **`specs/frontend-standards.mdc`** β Frontend patterns (components, state)
|
|
122
|
+
4. **`specs/documentation-standards.mdc`** β Documentation structure
|
|
123
|
+
|
|
124
|
+
### Technology-Specific Standards
|
|
125
|
+
5. **`specs/laravel-standards.mdc`** β Laravel + PHP + Eloquent
|
|
126
|
+
6. **`specs/react-standards.mdc`** β React + TypeScript + hooks
|
|
127
|
+
|
|
128
|
+
**Always read relevant standards before implementing.**
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Agent Skills (Progressive Disclosure)
|
|
133
|
+
|
|
134
|
+
If **20 Agent Skills TIER 1** are installed (`~/.skills/`), they activate automatically:
|
|
135
|
+
|
|
136
|
+
### Activation Triggers
|
|
137
|
+
|
|
138
|
+
Skills load knowledge **only when needed** based on context:
|
|
139
|
+
|
|
140
|
+
```
|
|
141
|
+
User: "Crear endpoint POST /api/products con validaciΓ³n"
|
|
142
|
+
|
|
143
|
+
Auto-activates:
|
|
144
|
+
β api-design-principles
|
|
145
|
+
β backend-api-security
|
|
146
|
+
β laravel-specialist
|
|
147
|
+
β verification-before-completion
|
|
148
|
+
β postgresql-table-design
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Critical Skills
|
|
152
|
+
|
|
153
|
+
#### verification-before-completion β **MANDATORY**
|
|
154
|
+
|
|
155
|
+
**Before creating ANY function, class, or component:**
|
|
156
|
+
1. **SEARCH** existing code for similar functionality
|
|
157
|
+
2. **READ** conventions.md for naming patterns
|
|
158
|
+
3. **VERIFY** utilities/services don't already exist
|
|
159
|
+
4. **ONLY THEN** create if nothing similar exists
|
|
160
|
+
|
|
161
|
+
**Anti-Pattern (NEVER DO):**
|
|
162
|
+
- β Create `UserHelper` when `UserService` exists
|
|
163
|
+
- β Create `formatPrice()` when `formatCurrency()` exists
|
|
164
|
+
- β Create new HTTP client when axios instance exists
|
|
165
|
+
|
|
166
|
+
#### code-review-excellence
|
|
167
|
+
|
|
168
|
+
Before committing, verify:
|
|
169
|
+
- No duplicated code
|
|
170
|
+
- Follows conventions.md
|
|
171
|
+
- Tests coverage >= 90%
|
|
172
|
+
- Security best practices
|
|
173
|
+
|
|
174
|
+
#### backend-api-security
|
|
175
|
+
|
|
176
|
+
For all endpoints:
|
|
177
|
+
- Server-side validation
|
|
178
|
+
- Rate limiting
|
|
179
|
+
- CSRF protection
|
|
180
|
+
- SQL injection prevention
|
|
181
|
+
- XSS sanitization
|
|
182
|
+
|
|
183
|
+
#### frontend-design + web-design-guidelines
|
|
184
|
+
|
|
185
|
+
For all components:
|
|
186
|
+
- Professional design (Vercel/Linear style)
|
|
187
|
+
- Consistent spacing (4px grid)
|
|
188
|
+
- Responsive mobile-first
|
|
189
|
+
- Micro-interactions
|
|
190
|
+
- Design system coherence
|
|
191
|
+
|
|
192
|
+
### Skill Categories
|
|
193
|
+
|
|
194
|
+
**π Security (5):**
|
|
195
|
+
- sast-configuration
|
|
196
|
+
- stride-analysis-patterns
|
|
197
|
+
- security-requirement-extraction
|
|
198
|
+
- backend-api-security
|
|
199
|
+
- frontend-mobile-security
|
|
200
|
+
|
|
201
|
+
**π Consistency (3):**
|
|
202
|
+
- verification-before-completion β
|
|
203
|
+
- code-review-excellence
|
|
204
|
+
- systematic-debugging
|
|
205
|
+
|
|
206
|
+
**π¨ Design/Frontend (6):**
|
|
207
|
+
- web-design-guidelines
|
|
208
|
+
- frontend-design
|
|
209
|
+
- ui-ux-pro-max
|
|
210
|
+
- tailwind-design-system
|
|
211
|
+
- shadcn-ui
|
|
212
|
+
- responsive-design
|
|
213
|
+
|
|
214
|
+
**π οΈ Backend/Dev (6):**
|
|
215
|
+
- laravel-specialist
|
|
216
|
+
- vercel-react-best-practices
|
|
217
|
+
- test-driven-development
|
|
218
|
+
- api-design-principles
|
|
219
|
+
- postgresql-table-design
|
|
220
|
+
- error-handling-patterns
|
|
221
|
+
|
|
222
|
+
**See:** [SETUP.md](SETUP.md) for installation details.
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## Project Structure
|
|
227
|
+
|
|
228
|
+
```
|
|
229
|
+
proyectos/[project-name]/
|
|
230
|
+
βββ CONTRATO.md # π IMMUTABLE contract
|
|
231
|
+
βββ ANEXOS.md # βοΈ Improvements/modules
|
|
232
|
+
βββ context/ # Memory-bank
|
|
233
|
+
β βββ brief.md
|
|
234
|
+
β βββ architecture.md
|
|
235
|
+
β βββ tech-stack.md
|
|
236
|
+
β βββ conventions.md
|
|
237
|
+
β βββ decisions.md
|
|
238
|
+
βββ specs/ # Feature specs
|
|
239
|
+
βββ [TICKET-ID]_backend.md
|
|
240
|
+
βββ [TICKET-ID]_frontend.md
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
**Before working on a project:**
|
|
244
|
+
1. Read `CONTRATO.md` β Understand the contract
|
|
245
|
+
2. Read `context/architecture.md` β Understand architecture
|
|
246
|
+
3. Read `context/conventions.md` β Follow code patterns
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## Workflow Example
|
|
251
|
+
|
|
252
|
+
```
|
|
253
|
+
User: "Hola"
|
|
254
|
+
AI: [Execute .commands/inicio.md]
|
|
255
|
+
- List projects
|
|
256
|
+
- Ask which project + type of work
|
|
257
|
+
|
|
258
|
+
User: "app-tienda y desarrollo"
|
|
259
|
+
AI: [Load proyectos/app-tienda/CONTRATO.md + context/]
|
|
260
|
+
"β
Proyecto app-tienda cargado. ΒΏQuΓ© ticket trabajarΓ‘s?"
|
|
261
|
+
|
|
262
|
+
User: "SCRUM-23"
|
|
263
|
+
AI: "ΒΏRefinar o planificar directamente?"
|
|
264
|
+
|
|
265
|
+
User: "planificar SCRUM-23"
|
|
266
|
+
AI: [Adopt .agents/backend.md]
|
|
267
|
+
[Read CONTRATO + context + ticket]
|
|
268
|
+
[Generate plan in specs/SCRUM-23_backend.md]
|
|
269
|
+
"π Plan creado. Revisar antes de implementar."
|
|
270
|
+
|
|
271
|
+
User: "implementar @SCRUM-23_backend.md"
|
|
272
|
+
AI: [Adopt .agents/backend.md]
|
|
273
|
+
[Execute plan step by step]
|
|
274
|
+
[Tests, commit, push, PR]
|
|
275
|
+
"β
ImplementaciΓ³n completada. PR: [URL]"
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
## CLI Tools (Optional)
|
|
281
|
+
|
|
282
|
+
Besides conversational commands, the `openspec` CLI is available:
|
|
283
|
+
|
|
284
|
+
```bash
|
|
285
|
+
openspec enrich "user story" # Refine user story
|
|
286
|
+
openspec new --auto "feature" # Create proposal
|
|
287
|
+
openspec verify CHANGE-001 # Verify tests
|
|
288
|
+
openspec status # List proposals
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
See: `openspec/cli/README.md`
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
## MCP Integrations
|
|
296
|
+
|
|
297
|
+
### β οΈ Jira MCP (MANDATORY)
|
|
298
|
+
|
|
299
|
+
**Jira is MANDATORY for SpecLeap workflow.**
|
|
300
|
+
|
|
301
|
+
MUST use for:
|
|
302
|
+
- `crear-tickets` β Generate all tickets from CONTRATO.md
|
|
303
|
+
- `refinar SCRUM-XX` β Read and enrich ticket
|
|
304
|
+
- `planificar SCRUM-XX` β Read ticket for plan generation
|
|
305
|
+
- `implementar` β Update ticket status during implementation
|
|
306
|
+
- Automatic updates: "To Do" β "In Progress" β "In Review" β "Done"
|
|
307
|
+
|
|
308
|
+
**Without Jira MCP, the workflow DOES NOT WORK.**
|
|
309
|
+
|
|
310
|
+
### CodeRabbit (Recommended)
|
|
311
|
+
|
|
312
|
+
**Automatic code review on all PRs.**
|
|
313
|
+
|
|
314
|
+
- Install CodeRabbit GitHub App on repos
|
|
315
|
+
- Copy `.coderabbit.yaml` from `proyectos/_template/`
|
|
316
|
+
- Reviews in Spanish
|
|
317
|
+
- Checks: specs compliance, tests >= 90%, security, standards
|
|
318
|
+
- `implementar` waits for CodeRabbit approval before marking complete
|
|
319
|
+
|
|
320
|
+
### Context7 MCP (Optional)
|
|
321
|
+
|
|
322
|
+
If configured, use for:
|
|
323
|
+
- Fetching up-to-date library documentation (Laravel, React, etc.)
|
|
324
|
+
- Avoid outdated knowledge
|
|
325
|
+
|
|
326
|
+
---
|
|
327
|
+
|
|
328
|
+
## Critical Rules
|
|
329
|
+
|
|
330
|
+
1. **NEVER modify CONTRATO.md** after accepted β Only add to ANEXOS.md
|
|
331
|
+
2. **NEVER push to main directly** β Always via PR
|
|
332
|
+
3. **Tests must pass** β >= 90% coverage
|
|
333
|
+
4. **Follow conventions.md** β Each project has specific patterns
|
|
334
|
+
5. **All code in ENGLISH** β Variables, functions, comments, docs
|
|
335
|
+
6. **User-facing text in SPANISH** β Error messages, UI text
|
|
336
|
+
|
|
337
|
+
---
|
|
338
|
+
|
|
339
|
+
## References
|
|
340
|
+
|
|
341
|
+
- **Commands:** `.commands/*.md`
|
|
342
|
+
- **Agents:** `.agents/*.md`
|
|
343
|
+
- **Standards:** `specs/*.mdc`
|
|
344
|
+
- **Project Template:** `proyectos/_template/`
|
|
345
|
+
- **CLI Reference:** `openspec/cli/COMMAND_REFERENCE.md`
|
|
346
|
+
|
|
347
|
+
---
|
|
348
|
+
|
|
349
|
+
**When in doubt:**
|
|
350
|
+
1. Read the relevant `.commands/` file
|
|
351
|
+
2. Adopt the specified `.agents/` role
|
|
352
|
+
3. Follow `specs/` standards
|
|
353
|
+
4. Ask the user for clarification
|
|
354
|
+
|
|
355
|
+
---
|
|
356
|
+
|
|
357
|
+
*Made with β€οΈ by the SpecLeap Community*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "specleap-framework",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.9",
|
|
4
4
|
"description": "Spec-Driven Development Framework β Transform VSCode, Cursor, JetBrains into spec-first development machines",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"spec-driven-development",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"files": [
|
|
43
43
|
".agents/**",
|
|
44
|
-
".claude",
|
|
44
|
+
".claude/**",
|
|
45
45
|
".clinerules",
|
|
46
46
|
".coderabbit.yaml",
|
|
47
47
|
".commands/**",
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"scripts/**",
|
|
57
57
|
"setup.sh",
|
|
58
58
|
"install.sh",
|
|
59
|
+
"CLAUDE.md",
|
|
59
60
|
"README.md",
|
|
60
61
|
"SETUP.md",
|
|
61
62
|
"LICENSE"
|