@atlashub/smartstack-cli 1.36.0 → 2.0.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.
Files changed (103) hide show
  1. package/config/mcp-defaults.json +62 -0
  2. package/dist/index.js +57 -4
  3. package/dist/index.js.map +1 -1
  4. package/dist/mcp-entry.mjs +16984 -0
  5. package/dist/mcp-entry.mjs.map +1 -0
  6. package/package.json +14 -5
  7. package/templates/agents/gitflow/start.md +5 -4
  8. package/templates/agents/mcp-healthcheck.md +15 -13
  9. package/templates/mcp-scaffolding/component.tsx.hbs +298 -0
  10. package/templates/mcp-scaffolding/controller.cs.hbs +184 -0
  11. package/templates/mcp-scaffolding/entity-extension.cs.hbs +231 -0
  12. package/templates/mcp-scaffolding/frontend/api-client.ts.hbs +116 -0
  13. package/templates/mcp-scaffolding/frontend/nav-routes.ts.hbs +133 -0
  14. package/templates/mcp-scaffolding/frontend/routes.tsx.hbs +134 -0
  15. package/templates/mcp-scaffolding/migrations/seed-roles.cs.hbs +261 -0
  16. package/templates/mcp-scaffolding/service-extension.cs.hbs +53 -0
  17. package/templates/mcp-scaffolding/tests/controller.test.cs.hbs +413 -0
  18. package/templates/mcp-scaffolding/tests/entity.test.cs.hbs +239 -0
  19. package/templates/mcp-scaffolding/tests/repository.test.cs.hbs +441 -0
  20. package/templates/mcp-scaffolding/tests/security.test.cs.hbs +442 -0
  21. package/templates/mcp-scaffolding/tests/service.test.cs.hbs +390 -0
  22. package/templates/mcp-scaffolding/tests/validator.test.cs.hbs +428 -0
  23. package/templates/ralph/README.md +3 -3
  24. package/templates/ralph/ralph.config.yaml +2 -2
  25. package/templates/skills/admin/SKILL.md +42 -0
  26. package/templates/skills/application/steps/step-01-navigation.md +226 -43
  27. package/templates/skills/application/steps/step-03-roles.md +160 -38
  28. package/templates/skills/application/steps/step-04-backend.md +109 -2
  29. package/templates/skills/application/templates-seed.md +200 -1
  30. package/templates/skills/business-analyse/_shared.md +24 -1
  31. package/templates/skills/business-analyse/questionnaire/01-context.md +4 -4
  32. package/templates/skills/business-analyse/questionnaire/02-stakeholders.md +3 -3
  33. package/templates/skills/business-analyse/questionnaire/03-scope.md +4 -4
  34. package/templates/skills/business-analyse/questionnaire/04-data.md +7 -7
  35. package/templates/skills/business-analyse/questionnaire/05-integrations.md +1 -1
  36. package/templates/skills/business-analyse/questionnaire/06-security.md +3 -3
  37. package/templates/skills/business-analyse/questionnaire/07-ui.md +1 -1
  38. package/templates/skills/business-analyse/questionnaire/08-performance.md +3 -3
  39. package/templates/skills/business-analyse/questionnaire/09-constraints.md +4 -4
  40. package/templates/skills/business-analyse/questionnaire/10-documentation.md +2 -2
  41. package/templates/skills/business-analyse/questionnaire/11-data-lifecycle.md +2 -2
  42. package/templates/skills/business-analyse/questionnaire/12-migration.md +1 -1
  43. package/templates/skills/business-analyse/questionnaire/13-cross-module.md +2 -2
  44. package/templates/skills/business-analyse/steps/step-01-discover.md +50 -25
  45. package/templates/skills/business-analyse/steps/step-05-handoff.md +133 -34
  46. package/templates/skills/cc-agent/SKILL.md +129 -0
  47. package/templates/skills/cc-agent/references/agent-frontmatter.md +213 -0
  48. package/templates/skills/cc-agent/references/permission-modes.md +102 -0
  49. package/templates/skills/cc-agent/references/tools-reference.md +144 -0
  50. package/templates/skills/cc-agent/steps/step-00-init.md +134 -0
  51. package/templates/skills/cc-agent/steps/step-01-design.md +186 -0
  52. package/templates/skills/cc-agent/steps/step-02-generate.md +204 -0
  53. package/templates/skills/cc-agent/steps/step-03-validate.md +130 -0
  54. package/templates/skills/cc-agent/templates/agent-categorized.md +67 -0
  55. package/templates/skills/cc-agent/templates/agent-standalone.md +56 -0
  56. package/templates/skills/cc-agent/templates/agent-with-skills.md +94 -0
  57. package/templates/skills/cc-audit/SKILL.md +108 -0
  58. package/templates/skills/cc-audit/references/agent-checklist.md +91 -0
  59. package/templates/skills/cc-audit/references/hook-checklist.md +110 -0
  60. package/templates/skills/cc-audit/references/skill-checklist.md +70 -0
  61. package/templates/skills/cc-audit/steps/step-00-init.md +98 -0
  62. package/templates/skills/cc-audit/steps/step-01-scan.md +142 -0
  63. package/templates/skills/cc-audit/steps/step-02-analyze.md +158 -0
  64. package/templates/skills/cc-audit/steps/step-03-report.md +142 -0
  65. package/templates/skills/cc-skill/SKILL.md +134 -0
  66. package/templates/skills/cc-skill/references/best-practices.md +167 -0
  67. package/templates/skills/cc-skill/references/frontmatter-reference.md +182 -0
  68. package/templates/skills/cc-skill/references/skill-patterns.md +199 -0
  69. package/templates/skills/cc-skill/steps/step-00-init.md +119 -0
  70. package/templates/skills/cc-skill/steps/step-01-design.md +199 -0
  71. package/templates/skills/cc-skill/steps/step-02-generate.md +145 -0
  72. package/templates/skills/cc-skill/steps/step-03-steps.md +151 -0
  73. package/templates/skills/cc-skill/steps/step-04-validate.md +124 -0
  74. package/templates/skills/cc-skill/templates/skill-forked.md +85 -0
  75. package/templates/skills/cc-skill/templates/skill-progressive.md +102 -0
  76. package/templates/skills/cc-skill/templates/skill-simple.md +75 -0
  77. package/templates/skills/cc-skill/templates/step-template.md +82 -0
  78. package/templates/skills/check-version/SKILL.md +6 -0
  79. package/templates/skills/debug/SKILL.md +4 -0
  80. package/templates/skills/documentation/SKILL.md +1 -0
  81. package/templates/skills/efcore/SKILL.md +5 -0
  82. package/templates/skills/efcore/steps/db/step-deploy.md +26 -5
  83. package/templates/skills/efcore/steps/shared/step-00-init.md +21 -7
  84. package/templates/skills/explore/SKILL.md +28 -32
  85. package/templates/skills/feature-full/SKILL.md +1 -0
  86. package/templates/skills/gitflow/SKILL.md +8 -0
  87. package/templates/skills/gitflow/steps/step-start.md +45 -10
  88. package/templates/skills/mcp/SKILL.md +38 -18
  89. package/templates/skills/quick-search/SKILL.md +8 -1
  90. package/templates/skills/ralph-loop/SKILL.md +1 -1
  91. package/templates/skills/ralph-loop/steps/step-00-init.md +8 -68
  92. package/templates/skills/ralph-loop/steps/step-04-check.md +1 -1
  93. package/templates/skills/refactor/SKILL.md +1 -0
  94. package/templates/skills/review-code/SKILL.md +7 -1
  95. package/templates/skills/ui-components/SKILL.md +31 -438
  96. package/templates/skills/ui-components/accessibility.md +170 -0
  97. package/templates/skills/ui-components/patterns/data-table.md +39 -0
  98. package/templates/skills/ui-components/patterns/entity-card.md +77 -0
  99. package/templates/skills/ui-components/patterns/grid-layout.md +91 -0
  100. package/templates/skills/ui-components/patterns/kanban.md +43 -0
  101. package/templates/skills/ui-components/style-guide.md +86 -0
  102. package/templates/skills/utils/SKILL.md +1 -0
  103. package/templates/skills/validate/SKILL.md +1 -0
@@ -25,9 +25,9 @@
25
25
 
26
26
  ---
27
27
 
28
- ## SmartStack Lifecycle Patterns
28
+ ## Lifecycle Patterns
29
29
 
30
- | Need | SmartStack Pattern | Impact |
30
+ | Need | Platform Pattern | Impact |
31
31
  |------|-------------------|--------|
32
32
  | Soft delete | `SoftDeletableEntity` | IsDeleted, DeletedBy, DeletedDate auto-managed |
33
33
  | Audit trail | `AuditableEntity` | CreatedBy/Date, ModifiedBy/Date auto-managed |
@@ -25,7 +25,7 @@
25
25
 
26
26
  ---
27
27
 
28
- ## SmartStack Migration Patterns
28
+ ## Migration Patterns
29
29
 
30
30
  | Need | Pattern | Tool |
31
31
  |------|---------|------|
@@ -25,7 +25,7 @@
25
25
 
26
26
  ---
27
27
 
28
- ## SmartStack Cross-Module Patterns
28
+ ## Cross-Module Patterns
29
29
 
30
30
  | Need | Pattern | Example |
31
31
  |------|---------|---------|
@@ -56,7 +56,7 @@
56
56
  | Module totalement isolé | **Silo de données** | Rare qu'un module métier n'ait aucune connexion. Vérifier avec le codebase context. |
57
57
  | Duplication d'entité existante | **Entité dupliquée** | Si `Client` existe déjà, ne pas créer `Customer`. Référencer l'existant. |
58
58
  | Modification d'entité d'un autre module | **Couplage fort** | Utiliser des événements (MediatR) plutôt que des modifications directes. |
59
- | Aucune mention de navigation | **Module orphelin dans l'UI** | Le module doit apparaître dans le menu SmartStack (NavRoute). |
59
+ | Aucune mention de navigation | **Module orphelin dans l'UI** | Le module doit apparaître dans le menu de l'application (NavRoute). |
60
60
 
61
61
  ### Using Pre-Research Context
62
62
 
@@ -40,6 +40,11 @@ Read `{output_dir}/digest-00.md` for compressed context from step-00.
40
40
  > doit être dans `{language}`. Les exemples ci-dessous sont en français — adapter si `{language}` ≠ `fr`.
41
41
  > Voir `_shared.md` → "Configuration Langue de Communication" pour les règles complètes.
42
42
 
43
+ > **⚠️ BRANDING :** Ne JAMAIS utiliser le mot "SmartStack" dans les communications utilisateur
44
+ > (questions, résumés, reformulations, synthèses). Utiliser "la plateforme", "l'application",
45
+ > ou "le système" à la place. SmartStack est le nom interne du framework — le projet client
46
+ > a son propre nom. Les références techniques internes (paths, MCP calls) restent inchangées.
47
+
43
48
  ---
44
49
 
45
50
  ### 2. Determine Feature Type
@@ -245,21 +250,21 @@ AskUserQuestion([
245
250
  { label: "Revenus", description: "Impact direct sur le chiffre d'affaires" },
246
251
  { label: "Qualitatif", description: "Satisfaction, conformité, image — non chiffrable" }
247
252
  ], multiSelect: true },
248
- { question: "Que se passe-t-il si ce module n'est PAS développé ?",
249
- header: "Sans module",
253
+ { question: "Quel est le déclencheur de ce besoin ?",
254
+ header: "Déclencheur",
250
255
  options: [
251
- { label: "Bloquant", description: "Impossible de continuer sans (réglementaire, technique)" },
252
- { label: "Dégradé", description: "On continue avec l'existant mais avec des inefficacités" },
253
- { label: "Risque", description: "Risque croissant (erreurs, perte de données, non-conformité)" },
254
- { label: "Confort", description: "Pas d'impact critique, amélioration de confort" }
256
+ { label: "Urgence opérationnelle", description: "Processus bloqué ou inefficace au quotidien" },
257
+ { label: "Obligation réglementaire", description: "Conformité imposée par une deadline externe" },
258
+ { label: "Évolution planifiée", description: "Amélioration prévue dans la roadmap" },
259
+ { label: "Opportunité", description: "Gain identifié, pas de contrainte immédiate" }
255
260
  ], multiSelect: false },
256
- { question: "Priorité par rapport aux autres besoins ?",
257
- header: "Priorité",
261
+ { question: "Quel est le délai souhaité de mise en production ?",
262
+ header: "Délai",
258
263
  options: [
259
- { label: "Critique", description: "Doit être livré en premier, bloque d'autres projets" },
260
- { label: "Haute", description: "Important mais pas bloquant" },
261
- { label: "Moyenne", description: "Souhaité mais peut attendre" },
262
- { label: "Basse", description: "Nice-to-have" }
264
+ { label: "Urgent (< 1 mois)", description: "Besoin immédiat, bloquant des opérations" },
265
+ { label: "Court terme (1-3 mois)", description: "Planifié pour le prochain cycle" },
266
+ { label: "Moyen terme (3-6 mois)", description: "Important mais pas immédiat" },
267
+ { label: "Flexible", description: "Pas de contrainte de délai définie" }
263
268
  ], multiSelect: false }
264
269
  ])
265
270
  ```
@@ -301,7 +306,7 @@ AskUserQuestion([
301
306
 
302
307
  **ULTRATHINK checkpoint:**
303
308
  - If only 1-2 user types → probe with Technique 5: "Et les auditeurs, le support, les processus automatisés ?"
304
- - If no "Admin" → SmartStack requires admin role, clarify
309
+ - If no "Admin" → The platform requires an admin role, clarify
305
310
  - If "Externe" → follow-up: portal, API, or shared access?
306
311
 
307
312
  **Batch 2 — Needs per role (Q2.5-Q2.8):**
@@ -361,20 +366,20 @@ AskUserQuestion([
361
366
  { label: "Historique/Audit", description: "Historique détaillé des modifications" },
362
367
  { label: "Intégrations", description: "Connexion avec d'autres modules/systèmes" }
363
368
  ], multiSelect: true },
364
- { question: "Qu'est-ce qui est EXCLU du périmètre ?",
365
- header: "Exclusions",
369
+ { question: "Y a-t-il des limites connues pour la v1 ?",
370
+ header: "Limites v1",
366
371
  options: [
367
- { label: "Mobile", description: "Pas d'accès mobile pour la v1" },
368
- { label: "Reporting avancé", description: "Pas de rapports complexes ou BI" },
369
- { label: "Multi-langue contenu", description: "UI i18n, mais pas le contenu métier" },
370
- { label: "Rien d'exclu", description: "Pas d'exclusion explicite" }
372
+ { label: "Pas de limite identifiée", description: "Le périmètre sera défini par les Must-Have et Should-Have" },
373
+ { label: "Budget/temps limité", description: "Contrainte qui pourrait réduire le périmètre" },
374
+ { label: "Dépendance externe", description: "Certaines fonctions dépendent d'un autre système pas encore prêt" },
375
+ { label: "Complexité technique", description: "Certaines fonctions nécessitent une phase de R&D" }
371
376
  ], multiSelect: true }
372
377
  ])
373
378
  ```
374
379
 
375
380
  **ULTRATHINK checkpoint:**
376
- - If "Rien d'exclu" → anti-pattern "Scope illimité" probe exclusions
377
- - If > 5 Must-Have"Sans cette fonctionnalité, le module a ZÉRO valeur ?"
381
+ - If > 5 Must-Have "Parmi ces fonctionnalités, lesquelles apportent le plus de valeur pour la v1 ?"
382
+ - If "Pas de limite identifiée" accept as valid, scope will be naturally bounded by Must-Have/Should-Have
378
383
 
379
384
  **Batch 2 — Process flow (Q3.5-Q3.8):**
380
385
 
@@ -426,14 +431,28 @@ Document each response with:
426
431
  #### 5.5 Reformulation Loop (AFTER EACH CATEGORY)
427
432
 
428
433
  > **RULE: After each category, reformulate understanding and validate with user.**
434
+ > **IMPORTANT: The `question` field of `AskUserQuestion` does NOT support markdown or line breaks.**
435
+ > **NEVER put long summaries in the `question` field — it becomes an unreadable wall of text.**
436
+
437
+ After completing a category's batches:
438
+
439
+ **Step 1: Display the summary as regular text output** (supports markdown formatting):
440
+
441
+ ```
442
+ Output text directly to the user:
429
443
 
430
- After completing a category's batches, display a concise summary and ask for validation:
444
+ ## Synthèse - {category_name}
445
+
446
+ - **Point 1:** {résumé}
447
+ - **Point 2:** {résumé}
448
+ - **Point 3:** {résumé}
449
+ ```
450
+
451
+ **Step 2: Ask for validation with a SHORT question** (no summary in the question field):
431
452
 
432
453
  ```
433
454
  AskUserQuestion([
434
- { question: "Voici ce que j'ai compris pour {category_name}:
435
- {bullet_point_summary}
436
- Est-ce correct ?",
455
+ { question: "Cette synthèse est-elle correcte ?",
437
456
  header: "Validation",
438
457
  options: [
439
458
  { label: "Correct", description: "La compréhension est fidèle, on continue" },
@@ -443,6 +462,12 @@ AskUserQuestion([
443
462
  ])
444
463
  ```
445
464
 
465
+ > **⚠️ FORMATTING RULE for `AskUserQuestion`:**
466
+ > Le champ `question` ne supporte PAS le markdown ni les retours à la ligne.
467
+ > Une question simple reste lisible meme longue. Mais ne JAMAIS mettre de contenu
468
+ > structuré (listes à puces, résumés multi-points, tableaux) dans le champ `question`.
469
+ > Pour du contenu structuré → afficher en **texte direct** AVANT l'appel (voir `_shared.md`).
470
+
446
471
  - If **"Correct"** → proceed to next category
447
472
  - If **"Partiellement"** → ask: "Quelles corrections ou nuances souhaitez-vous apporter ?" (free text follow-up)
448
473
  - If **"Incorrect"** → re-ask the category with refined questions based on feedback
@@ -359,56 +359,125 @@ mkdir -p .ralph/reports
359
359
 
360
360
  **ULTRATHINK about task decomposition:**
361
361
  - Each task must be atomic (implementable in one Ralph iteration)
362
- - Tasks follow the SmartStack layer order: Domain → Application → Infrastructure → API → Frontend → Tests → Validation
362
+ - Tasks follow the SmartStack layer order: Domain → Application → Infrastructure → API → Frontend → i18n → Tests → Validation
363
363
  - Conditionally include tasks based on feature scope (skip layers not present in the handoff document)
364
+ - Each task MUST include `category`, `dependencies`, and `acceptance_criteria` (schema v2)
364
365
 
365
- **Conditional Task Generation Rules:**
366
+ **Granularity Rules:**
367
+ - 1 task per entity (domain, EF config, unit tests)
368
+ - 1 task per entity for CQRS (commands + queries + DTOs grouped per entity)
369
+ - 1 task per controller (API)
370
+ - 1 task per page (frontend)
371
+ - Max 1 entity per task — do NOT group multiple entities into a single task
372
+ - Enums and shared value objects can be grouped in 1 task if they belong to the same module
373
+
374
+ **Conditional Task Generation Rules (v2 schema):**
366
375
 
367
376
  For each layer, generate tasks ONLY if the handoff document contains specifications for that layer.
377
+ Each task must have: `id`, `description`, `status: "pending"`, `category`, `dependencies`, `acceptance_criteria`.
368
378
 
369
379
  ```
370
380
  LAYER 1 - DOMAIN (if entities defined in handoff section 3/4):
371
- Task: "Create {Entity} entity in SmartStack.Domain/Entities/Business/ with properties: {property_list}"
372
- Task: "Create {Entity}Status enum if status workflow defined"
373
- (One task per entity)
381
+ Task per entity:
382
+ description: "Create {Entity} entity in Domain/Entities/Business/ with properties: {property_list}"
383
+ category: "domain"
384
+ dependencies: []
385
+ acceptance_criteria: "Entity compiles, properties match handoff spec, correct base class (SoftDeletableEntity/AuditableEntity)"
386
+ Task (if enums needed):
387
+ description: "Create domain enums for {Module}: {EnumList} in Domain/Enums/{Module}/"
388
+ category: "domain"
389
+ dependencies: []
390
+ acceptance_criteria: "Enums compile, values match handoff spec"
374
391
 
375
392
  LAYER 2 - APPLICATION (if CQRS handlers defined in handoff section 3/4):
376
- Task: "Create CQRS Commands for {Entity}: {Create/Update/Delete}Command + Handler + Validator"
377
- Task: "Create CQRS Queries for {Entity}: GetAll{Entity}Query, Get{Entity}ByIdQuery + Handlers"
378
- Task: "Create DTOs for {Entity}: {Entity}Dto, Create{Entity}Request, Update{Entity}Request"
379
- Task: "Register permissions in Permissions.cs and PermissionConfiguration.cs for business.{app}.{module}"
393
+ Task per entity:
394
+ description: "Create CQRS for {Entity}: Commands ({Create/Update/Delete}Command + Handlers), Queries (GetAll/GetById + Handlers), DTOs ({Entity}Dto, Create/UpdateRequest), Validator"
395
+ category: "application"
396
+ dependencies: [ID of corresponding DOMAIN task for this entity]
397
+ acceptance_criteria: "Handlers compile, validators defined with business rules, DTOs match handoff properties"
398
+ Task (once per module):
399
+ description: "Register permissions in Permissions.cs and PermissionConfiguration.cs for business.{app}.{module}"
400
+ category: "application"
401
+ dependencies: [IDs of ALL application tasks for this module]
402
+ acceptance_criteria: "Permissions compile, HasData seed includes all permissions from handoff"
380
403
 
381
404
  LAYER 3 - INFRASTRUCTURE (if EF Core config or services in handoff):
382
- Task: "Create EF Core configuration for {Entity} with HasData seed and migration"
383
- Task: "Register {Entity} DbSet in ApplicationDbContext"
384
- Task: "Create {Entity}Service implementing I{Entity}Service with DI registration" (if services needed)
405
+ Task per entity:
406
+ description: "Create EF Core configuration for {Entity} with indexes, relationships, and schema"
407
+ category: "infrastructure"
408
+ dependencies: [ID of corresponding DOMAIN task for this entity]
409
+ acceptance_criteria: "Configuration compiles, DbSet registered in DbContext, indexes match handoff"
410
+ Task (once per module):
411
+ description: "Create EF Core migration for {Module} entities"
412
+ category: "infrastructure"
413
+ dependencies: [IDs of ALL EF Core configuration tasks]
414
+ acceptance_criteria: "Migration applies without errors, 3 files present (Migration.cs, Designer.cs, ModelSnapshot.cs)"
415
+ Task per service (if services needed):
416
+ description: "Create {Service} implementing I{Service} with DI registration"
417
+ category: "infrastructure"
418
+ dependencies: [IDs of relevant DOMAIN + APPLICATION tasks]
419
+ acceptance_criteria: "Service compiles, registered in DI, follows existing patterns"
385
420
 
386
421
  LAYER 4 - API (if endpoints defined in handoff section 8):
387
- Task: "Create {Module}Controller with CRUD endpoints: GET, POST, GET/{id}, PUT/{id}, DELETE/{id}"
422
+ Task per controller:
423
+ description: "Create {Entity}Controller with endpoints: {endpoint list} and [NavRoute] + [Authorize] attributes"
424
+ category: "api"
425
+ dependencies: [IDs of APPLICATION tasks for this entity + INFRASTRUCTURE migration task]
426
+ acceptance_criteria: "Controller compiles, endpoints respond, Swagger displays all routes"
388
427
 
389
428
  LAYER 5 - FRONTEND (if frontend files in handoff section 5):
390
- Task: "Create {module}Api.ts API service with Axios calls"
391
- Task: "Create use{Module}.ts hook with React Query + SignalR"
392
- Task: "Create {Module}Page.tsx list page with EntityCard"
393
- Task: "Create {Module}Form.tsx create/edit form"
394
- Task: "Add routes in App.tsx for business/{app}/{module}"
429
+ Task (API service):
430
+ description: "Create {module}Api.ts API service with Axios calls for all endpoints"
431
+ category: "frontend"
432
+ dependencies: [IDs of ALL API controller tasks]
433
+ acceptance_criteria: "API service compiles, all endpoints covered, types match DTOs"
434
+ Task per page:
435
+ description: "Create {PageName}.tsx with {description of page content}"
436
+ category: "frontend"
437
+ dependencies: [ID of frontend API service task]
438
+ acceptance_criteria: "Page renders, API calls work, navigation functional"
439
+ Task (routes):
440
+ description: "Add routes in App.tsx for business/{app}/{module} and register in navigation"
441
+ category: "frontend"
442
+ dependencies: [IDs of ALL frontend page tasks]
443
+ acceptance_criteria: "Routes resolve, navigation links appear in menu"
395
444
 
396
445
  LAYER 6 - I18N (if i18n keys in handoff section 10):
397
- Task: "Create i18n translation files for {module} in 4 languages (fr, en, it, de)"
446
+ Task:
447
+ description: "Create i18n translation files for {module} in 4 languages (fr, en, it, de)"
448
+ category: "i18n"
449
+ dependencies: [IDs of frontend page tasks]
450
+ acceptance_criteria: "4 language files created, all keys from handoff present, no missing translations"
398
451
 
399
452
  LAYER 7 - TESTS (always included):
400
- Task: "Create unit tests: {Entity}ValidatorTests + {Entity}Tests"
401
- Task: "Create integration tests: {Module}ControllerTests with 200, 201, 400, 403, 404 scenarios"
453
+ Task per entity:
454
+ description: "Create unit tests for {Entity}: {Entity}ValidatorTests + {Entity}Tests (entity methods)"
455
+ category: "test"
456
+ dependencies: [ID of APPLICATION task for this entity]
457
+ acceptance_criteria: "Tests pass, validator rules covered, entity methods tested"
458
+ Task per controller:
459
+ description: "Create integration tests for {Entity}Controller: 200, 201, 400, 403, 404 scenarios"
460
+ category: "test"
461
+ dependencies: [ID of API task for this controller]
462
+ acceptance_criteria: "Tests pass, all status codes covered, permission denial tested"
402
463
 
403
464
  LAYER 8 - VALIDATION (always included):
404
- Task: "Run dotnet build, pnpm build, dotnet test - fix any failures"
405
- Task: "Run MCP validate_conventions to verify all naming conventions"
465
+ Task 1:
466
+ description: "Run dotnet build + dotnet test - fix any build errors or test failures"
467
+ category: "validation"
468
+ dependencies: [IDs of ALL test tasks]
469
+ acceptance_criteria: "Build succeeds, all tests pass"
470
+ Task 2:
471
+ description: "Run MCP validate_conventions to verify all naming and structural conventions"
472
+ category: "validation"
473
+ dependencies: [ID of validation task 1]
474
+ acceptance_criteria: "MCP validation clean, no convention violations"
406
475
  ```
407
476
 
408
477
  **Sizing rules:**
409
- - Simple feature (1 entity, CRUD only): ~8-12 tasks
410
- - Medium feature (2-3 entities, business rules): ~15-20 tasks
411
- - Complex feature (multiple entities, integrations): ~20-30 tasks
478
+ - Simple feature (1 entity, CRUD only): ~10-15 tasks
479
+ - Medium feature (2-3 entities, business rules): ~18-25 tasks
480
+ - Complex feature (multiple entities, integrations): ~25-35 tasks
412
481
 
413
482
  #### 12bis.3 Write prd.json
414
483
 
@@ -416,20 +485,50 @@ Write to: `.ralph/prd.json`
416
485
 
417
486
  ```json
418
487
  {
488
+ "$version": "2.0.0",
419
489
  "feature": "{feature_id} - {feature_description}",
490
+ "status": "pending",
420
491
  "created": "{ISO 8601 timestamp}",
421
- "max_iterations": 30,
422
- "completion_promise": "IMPLEMENTATION COMPLETE",
423
- "current_iteration": 1,
424
- "source": "{output_dir}/4-development-handoff.md",
492
+ "updated_at": "{ISO 8601 timestamp}",
493
+ "metadata": {
494
+ "cli_version": "{version from package.json}",
495
+ "branch": "{current git branch}",
496
+ "project_path": "{cwd}",
497
+ "mcp_servers": { "smartstack": true, "context7": true }
498
+ },
499
+ "config": {
500
+ "max_iterations": 30,
501
+ "completion_promise": "IMPLEMENTATION COMPLETE",
502
+ "current_iteration": 1
503
+ },
504
+ "source": {
505
+ "type": "ba-handoff",
506
+ "handoff_path": "{output_dir}/4-development-handoff.md",
507
+ "frd_path": "{output_dir}/3-functional-specification.md",
508
+ "brd_path": "{output_dir}/2-business-requirements.md"
509
+ },
425
510
  "tasks": [
426
- { "id": 1, "description": "...", "passes": false },
427
- { "id": 2, "description": "...", "passes": false }
428
- ]
511
+ {
512
+ "id": 1,
513
+ "description": "Create {Entity} entity in Domain layer with properties: {list}",
514
+ "status": "pending",
515
+ "category": "domain",
516
+ "dependencies": [],
517
+ "acceptance_criteria": "Entity compiles, properties match handoff spec",
518
+ "started_at": null,
519
+ "completed_at": null,
520
+ "iteration": null,
521
+ "commit_hash": null,
522
+ "files_changed": { "created": [], "modified": [] },
523
+ "validation": null,
524
+ "error": null
525
+ }
526
+ ],
527
+ "history": []
429
528
  }
430
529
  ```
431
530
 
432
- > **Note:** The `source` field links back to the handoff document for reference. It is not read by Ralph's execution engine and is backward-compatible.
531
+ > **Schema v2.0.0** Compatible avec ralph-loop step-01 sans migration. Chaque tache inclut `category`, `dependencies` et `acceptance_criteria` pour un pilotage precis de l'execution.
433
532
 
434
533
  #### 12bis.4 Initialize progress.txt
435
534
 
@@ -0,0 +1,129 @@
1
+ ---
2
+ name: cc-agent
3
+ description: |
4
+ Create or update Claude Code agents (subagents) based on official documentation.
5
+ Use this skill when:
6
+ - Creating a new specialized agent
7
+ - Updating an agent's tools, model, or permissions
8
+ - Adding skills to an agent
9
+ argument-hint: "<create|update> [name] [--scope project|global|templates]"
10
+ disable-model-invocation: true
11
+ ---
12
+
13
+ <objective>
14
+ Create or update Claude Code agents (subagents) following official conventions. Guides the user through agent design, generates properly structured .md files, and validates the result.
15
+ </objective>
16
+
17
+ <quick_start>
18
+
19
+ ```bash
20
+ # Create a new agent
21
+ /cc-agent create my-agent
22
+ /cc-agent create my-agent --scope project
23
+ /cc-agent create my-agent --scope global
24
+ /cc-agent create my-agent --scope templates
25
+
26
+ # Update an existing agent
27
+ /cc-agent update my-agent
28
+ /cc-agent update my-agent --scope global
29
+ ```
30
+
31
+ </quick_start>
32
+
33
+ <parameters>
34
+
35
+ <subcommands>
36
+ | Command | Description | Workflow |
37
+ |---------|-------------|----------|
38
+ | `create` | Create a new agent from scratch | init → design → generate → validate |
39
+ | `update` | Update an existing agent | init → analyze → apply → validate |
40
+ </subcommands>
41
+
42
+ <flags>
43
+ | Flag | Description |
44
+ |------|-------------|
45
+ | `--scope project` | Target `.claude/agents/` (default) |
46
+ | `--scope global` | Target `~/.claude/agents/` |
47
+ | `--scope templates` | Target `templates/agents/` (SmartStack CLI) |
48
+ | `--category <name>` | Place in subdirectory (e.g., efcore, gitflow) |
49
+ </flags>
50
+
51
+ <examples>
52
+ ```bash
53
+ # Create a standalone agent
54
+ /cc-agent create test-runner
55
+
56
+ # Create a categorized agent
57
+ /cc-agent create migration --category efcore --scope templates
58
+
59
+ # Update an existing agent
60
+ /cc-agent update code-reviewer
61
+
62
+ # Create agent for SmartStack templates
63
+ /cc-agent create my-validator --scope templates
64
+ ```
65
+ </examples>
66
+
67
+ </parameters>
68
+
69
+ <workflow>
70
+ **Create flow:**
71
+ 1. Parse subcommand, name, scope, category
72
+ 2. Design agent (model, tools, permissions, skills)
73
+ 3. Generate agent .md file
74
+ 4. Validate structure and conventions
75
+
76
+ **Update flow:**
77
+ 1. Parse subcommand, name, scope
78
+ 2. Read and analyze existing agent
79
+ 3. Apply requested changes
80
+ 4. Validate structure and conventions
81
+ </workflow>
82
+
83
+ <state_variables>
84
+ | Variable | Type | Description |
85
+ |----------|------|-------------|
86
+ | `{subcommand}` | string | create or update |
87
+ | `{agent_name}` | string | Agent name (unique identifier) |
88
+ | `{scope}` | string | project, global, or templates |
89
+ | `{target_dir}` | string | Resolved target directory |
90
+ | `{category}` | string | Subdirectory (null for standalone) |
91
+ | `{description}` | string | Agent description |
92
+ | `{model}` | string | haiku, sonnet, opus, or inherit |
93
+ | `{tools}` | string | Comma-separated tool list |
94
+ | `{disallowed_tools}` | string | Blocked tools |
95
+ | `{permission_mode}` | string | Permission handling mode |
96
+ | `{preloaded_skills}` | string[] | Skills to inject at startup |
97
+ | `{system_prompt}` | string | Agent's system prompt content |
98
+ </state_variables>
99
+
100
+ <entry_point>
101
+
102
+ **FIRST ACTION:** Load `steps/step-00-init.md`
103
+
104
+ </entry_point>
105
+
106
+ <step_files>
107
+ | Step | File | Purpose |
108
+ |------|------|---------|
109
+ | 00 | `steps/step-00-init.md` | Parse subcommand, name, scope, resolve target |
110
+ | 01 | `steps/step-01-design.md` | Design agent (model, tools, permissions, skills) |
111
+ | 02 | `steps/step-02-generate.md` | Generate agent .md file from template |
112
+ | 03 | `steps/step-03-validate.md` | Validate format and display summary |
113
+ </step_files>
114
+
115
+ <execution_rules>
116
+ - **Load one step at a time** - Progressive loading
117
+ - **Ask before generating** - Confirm design choices with user
118
+ - **Use templates** - Load from `templates/` directory for generation
119
+ - **Follow official conventions** - Based on Claude Code documentation
120
+ - **Validate at the end** - Check generated file
121
+ </execution_rules>
122
+
123
+ <success_criteria>
124
+ - Agent .md file created with valid frontmatter
125
+ - Description is clear enough for Claude to decide when to delegate
126
+ - Tools are appropriate for the agent's purpose
127
+ - Permission mode matches the agent's risk level
128
+ - Agent follows official Claude Code conventions
129
+ </success_criteria>