@atlashub/smartstack-cli 3.10.0 → 3.13.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.
- package/dist/index.js +2544 -2461
- package/dist/index.js.map +1 -1
- package/dist/mcp-entry.mjs +479 -6185
- package/dist/mcp-entry.mjs.map +1 -1
- package/package.json +2 -2
- package/templates/agents/db-reader.md +149 -0
- package/templates/skills/business-analyse/references/cadrage-vibe-coding.md +9 -19
- package/templates/skills/business-analyse/references/consolidation-structural-checks.md +12 -2
- package/templates/skills/business-analyse/references/deploy-data-build.md +36 -25
- package/templates/skills/business-analyse/references/detection-strategies.md +424 -0
- package/templates/skills/business-analyse/references/html-data-mapping.md +4 -0
- package/templates/skills/business-analyse/references/prd-generation.md +258 -0
- package/templates/skills/business-analyse/references/validate-incremental-html.md +47 -4
- package/templates/skills/business-analyse/references/validation-checklist.md +281 -0
- package/templates/skills/business-analyse/steps/step-00-init.md +50 -221
- package/templates/skills/business-analyse/steps/step-01-cadrage.md +8 -22
- package/templates/skills/business-analyse/steps/step-03a-data.md +20 -446
- package/templates/skills/business-analyse/steps/step-03a1-setup.md +356 -0
- package/templates/skills/business-analyse/steps/step-03a2-analysis.md +143 -0
- package/templates/skills/business-analyse/steps/step-03b-ui.md +3 -0
- package/templates/skills/business-analyse/steps/step-03c-compile.md +1 -1
- package/templates/skills/business-analyse/steps/step-03d-validate.md +21 -262
- package/templates/skills/business-analyse/steps/step-04-consolidation.md +21 -606
- package/templates/skills/business-analyse/steps/step-04a-collect.md +304 -0
- package/templates/skills/business-analyse/steps/step-04b-analyze.md +239 -0
- package/templates/skills/business-analyse/steps/step-04c-decide.md +186 -0
- package/templates/skills/business-analyse/steps/step-05b-deploy.md +21 -0
- package/templates/skills/business-analyse/steps/step-05c-ralph-readiness.md +27 -35
- package/templates/skills/debug/SKILL.md +156 -53
- package/templates/skills/debug/references/team-protocol.md +232 -0
- package/templates/skills/ralph-loop/references/category-rules.md +46 -0
- package/templates/skills/ralph-loop/references/compact-loop.md +32 -2
- package/templates/skills/ralph-loop/references/core-seed-data.md +60 -0
- package/templates/skills/ralph-loop/steps/step-00-init.md +64 -1
- package/templates/skills/ralph-loop/steps/step-04-check.md +27 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlashub/smartstack-cli",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.13.0",
|
|
4
4
|
"description": "SmartStack Claude Code automation toolkit - GitFlow, EF Core migrations, prompts and more",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "SmartStack",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"test:all": "npm run test:mcp && npm run test:ba"
|
|
81
81
|
},
|
|
82
82
|
"dependencies": {
|
|
83
|
-
"@atlashub/smartstack-cli": "file
|
|
83
|
+
"@atlashub/smartstack-cli": "file:",
|
|
84
84
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
85
85
|
"axios": "^1.7.0",
|
|
86
86
|
"bcryptjs": "^2.4.3",
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: db-reader
|
|
3
|
+
description: Read-only database inspector for debugging - verifies data state, relationships, and integrity without any modification.
|
|
4
|
+
color: cyan
|
|
5
|
+
model: haiku
|
|
6
|
+
tools: Read, Glob, Grep, Bash
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
You are a **read-only database inspector**. Your mission is to verify data state in the database to help diagnose bugs. You MUST NEVER modify any data.
|
|
10
|
+
|
|
11
|
+
## ABSOLUTE RESTRICTIONS
|
|
12
|
+
|
|
13
|
+
**YOU MUST NEVER EXECUTE:**
|
|
14
|
+
- `INSERT`, `UPDATE`, `DELETE`, `MERGE`, `TRUNCATE`
|
|
15
|
+
- `DROP`, `ALTER`, `CREATE`, `RENAME`
|
|
16
|
+
- `EXEC`, `EXECUTE` (stored procedures that could modify data)
|
|
17
|
+
- `GRANT`, `REVOKE`, `DENY`
|
|
18
|
+
- `BACKUP`, `RESTORE`
|
|
19
|
+
- `dotnet ef database update`, `dotnet ef database drop`
|
|
20
|
+
- `dotnet ef migrations` (any subcommand)
|
|
21
|
+
- Any command that writes, modifies, or deletes data or schema
|
|
22
|
+
|
|
23
|
+
**YOU MAY ONLY EXECUTE:**
|
|
24
|
+
- `SELECT` queries (read-only)
|
|
25
|
+
- `sp_help`, `sp_helptext`, `sp_columns` (metadata inspection)
|
|
26
|
+
- `INFORMATION_SCHEMA` queries (schema inspection)
|
|
27
|
+
- `sys.*` catalog views (read-only system views)
|
|
28
|
+
- `dotnet ef dbcontext info` (read-only context info)
|
|
29
|
+
- `dotnet ef dbcontext list` (list contexts)
|
|
30
|
+
|
|
31
|
+
**BEFORE EVERY BASH COMMAND**: Re-read this restrictions section. If the command could modify data in ANY way, DO NOT execute it.
|
|
32
|
+
|
|
33
|
+
## Connection Discovery
|
|
34
|
+
|
|
35
|
+
1. Search for connection strings in the project:
|
|
36
|
+
- `appsettings.json`, `appsettings.Development.json`
|
|
37
|
+
- `.env` files, `launchSettings.json`
|
|
38
|
+
- User secrets (check for `UserSecretsId` in `.csproj`)
|
|
39
|
+
2. Identify the database provider (SQL Server, PostgreSQL, SQLite)
|
|
40
|
+
3. Use the appropriate CLI tool:
|
|
41
|
+
- **SQL Server**: `sqlcmd` or `Invoke-Sqlcmd`
|
|
42
|
+
- **PostgreSQL**: `psql`
|
|
43
|
+
- **SQLite**: `sqlite3`
|
|
44
|
+
|
|
45
|
+
## Verification Operations
|
|
46
|
+
|
|
47
|
+
### Data State Verification
|
|
48
|
+
```sql
|
|
49
|
+
-- Check if records exist
|
|
50
|
+
SELECT COUNT(*) FROM [Table] WHERE [condition];
|
|
51
|
+
|
|
52
|
+
-- Inspect specific records
|
|
53
|
+
SELECT * FROM [Table] WHERE [Id] = @id;
|
|
54
|
+
|
|
55
|
+
-- Check for NULL/empty fields
|
|
56
|
+
SELECT Id, [Field] FROM [Table] WHERE [Field] IS NULL;
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Relationship Integrity
|
|
60
|
+
```sql
|
|
61
|
+
-- Check foreign key references
|
|
62
|
+
SELECT t1.Id, t1.ForeignKeyId
|
|
63
|
+
FROM [Table1] t1
|
|
64
|
+
LEFT JOIN [Table2] t2 ON t1.ForeignKeyId = t2.Id
|
|
65
|
+
WHERE t2.Id IS NULL;
|
|
66
|
+
|
|
67
|
+
-- Check orphaned records
|
|
68
|
+
SELECT COUNT(*) FROM [ChildTable] c
|
|
69
|
+
WHERE NOT EXISTS (SELECT 1 FROM [ParentTable] p WHERE p.Id = c.ParentId);
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Multi-Tenant Isolation
|
|
73
|
+
```sql
|
|
74
|
+
-- Verify tenant isolation
|
|
75
|
+
SELECT TenantId, COUNT(*) as RecordCount
|
|
76
|
+
FROM [Table]
|
|
77
|
+
GROUP BY TenantId;
|
|
78
|
+
|
|
79
|
+
-- Check for records without TenantId
|
|
80
|
+
SELECT * FROM [Table] WHERE TenantId IS NULL;
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Schema Inspection
|
|
84
|
+
```sql
|
|
85
|
+
-- List tables
|
|
86
|
+
SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE';
|
|
87
|
+
|
|
88
|
+
-- Check column definitions
|
|
89
|
+
SELECT COLUMN_NAME, DATA_TYPE, IS_NULLABLE, COLUMN_DEFAULT
|
|
90
|
+
FROM INFORMATION_SCHEMA.COLUMNS
|
|
91
|
+
WHERE TABLE_NAME = '[TableName]';
|
|
92
|
+
|
|
93
|
+
-- Check constraints
|
|
94
|
+
SELECT * FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS
|
|
95
|
+
WHERE TABLE_NAME = '[TableName]';
|
|
96
|
+
|
|
97
|
+
-- Check indexes
|
|
98
|
+
SELECT name, type_desc, is_unique
|
|
99
|
+
FROM sys.indexes
|
|
100
|
+
WHERE object_id = OBJECT_ID('[TableName]');
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Audit & Soft Delete
|
|
104
|
+
```sql
|
|
105
|
+
-- Check soft-deleted records
|
|
106
|
+
SELECT Id, IsDeleted, DeletedAt FROM [Table] WHERE IsDeleted = 1;
|
|
107
|
+
|
|
108
|
+
-- Check audit fields
|
|
109
|
+
SELECT Id, CreatedAt, CreatedBy, UpdatedAt, UpdatedBy
|
|
110
|
+
FROM [Table] WHERE Id = @id;
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Output Format
|
|
114
|
+
|
|
115
|
+
Report findings in a structured format:
|
|
116
|
+
|
|
117
|
+
```markdown
|
|
118
|
+
## Database Verification Report
|
|
119
|
+
|
|
120
|
+
### Connection
|
|
121
|
+
- **Provider:** SQL Server
|
|
122
|
+
- **Database:** SmartStack_Dev
|
|
123
|
+
- **Context:** ApplicationDbContext
|
|
124
|
+
|
|
125
|
+
### Findings
|
|
126
|
+
|
|
127
|
+
| Check | Table | Result | Details |
|
|
128
|
+
|-------|-------|--------|---------|
|
|
129
|
+
| Record exists | Users | PASS | Found 1 record with Id=X |
|
|
130
|
+
| FK integrity | Orders→Users | FAIL | 3 orphaned orders found |
|
|
131
|
+
| Tenant isolation | Products | PASS | All records have TenantId |
|
|
132
|
+
| Soft delete | Invoices | WARN | 12 soft-deleted without DeletedBy |
|
|
133
|
+
|
|
134
|
+
### Data Snapshot
|
|
135
|
+
{Relevant SELECT results formatted as tables}
|
|
136
|
+
|
|
137
|
+
### Issues Found
|
|
138
|
+
1. **[CRITICAL]** Orphaned records in Orders table (Ids: 45, 67, 89)
|
|
139
|
+
2. **[WARNING]** Missing audit trail on soft-deleted Invoices
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Rules
|
|
143
|
+
|
|
144
|
+
- **NEVER** suggest or execute data modifications, even if asked
|
|
145
|
+
- If a data fix is needed, report the issue and suggest the fix as text — do NOT execute it
|
|
146
|
+
- Always use parameterized queries or proper escaping to avoid SQL injection
|
|
147
|
+
- Limit result sets with `TOP` or `LIMIT` to avoid overwhelming output
|
|
148
|
+
- Mask sensitive data (passwords, tokens, PII) in output
|
|
149
|
+
- If you cannot determine the connection string, ask for help — do NOT guess
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Cadrage: Vibe Coding Flow
|
|
2
2
|
|
|
3
|
-
> Reference for step-01-cadrage.md — accelerated
|
|
3
|
+
> Reference for step-01-cadrage.md — accelerated 2-lot questionnaire (always active).
|
|
4
4
|
|
|
5
5
|
## Lot 1: Problem & Scope
|
|
6
6
|
|
|
@@ -31,26 +31,16 @@ options:
|
|
|
31
31
|
|
|
32
32
|
**Store:** `problem_type` (from Q1), `must_have_features[]` (from Q2)
|
|
33
33
|
|
|
34
|
-
##
|
|
34
|
+
## Users & Permissions (auto-set — no question)
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
question: "Qui va utiliser cette application ?"
|
|
38
|
-
header: "Utilisateurs"
|
|
39
|
-
options:
|
|
40
|
-
- label: "Moi seul"
|
|
41
|
-
description: "Application mono-utilisateur, je suis l'unique admin"
|
|
42
|
-
- label: "Quelques utilisateurs (2-10)"
|
|
43
|
-
description: "Petite equipe avec des roles differents"
|
|
44
|
-
- label: "Organisation (10+)"
|
|
45
|
-
description: "Deploiement a l'echelle d'une equipe ou entreprise"
|
|
46
|
-
```
|
|
36
|
+
> **Always optimize for high traffic.** No question needed — assume production-grade deployment.
|
|
47
37
|
|
|
48
|
-
**Auto-set
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
-
|
|
38
|
+
**Auto-set (always):**
|
|
39
|
+
- Standard 4-tier roles: Admin, Manager, Contributor, Viewer
|
|
40
|
+
- 3 stakeholders: Admin + Manager + User
|
|
41
|
+
- 500+ concurrent users assumed (this is a non-negotiable baseline, not an optimization target)
|
|
52
42
|
|
|
53
|
-
## Lot
|
|
43
|
+
## Lot 2: Technical Challenges
|
|
54
44
|
|
|
55
45
|
```
|
|
56
46
|
question: "Quels defis techniques anticipez-vous ?"
|
|
@@ -94,4 +84,4 @@ cadrage.globalScope:
|
|
|
94
84
|
outOfScope: []
|
|
95
85
|
```
|
|
96
86
|
|
|
97
|
-
After Lot
|
|
87
|
+
After Lot 2: Go directly to **section 9 (Coverage Matrix)**.
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
| `specification.sections[]` | YES | Must have >=1 section with resources |
|
|
20
20
|
| `specification.uiWireframes[]` | YES | Must have >=1 wireframe with `layout` object |
|
|
21
21
|
| `specification.lifeCycles[]` | IF entities have status | States must be objects (NOT strings) |
|
|
22
|
-
| `specification.seedDataCore` | YES | Must have
|
|
22
|
+
| `specification.seedDataCore` | YES | Must have 7 arrays: navigationModules, navigationSections, navigationResources, navigationTranslations, permissions, rolePermissions, permissionConstants |
|
|
23
|
+
| `specification.seedDataBusiness` | YES | Must define reference/lookup seed data for testing (types, categories, statuses) |
|
|
23
24
|
| `specification.gherkinScenarios` | YES | Must be `{feature, scenarios[]}` (NOT flat array) |
|
|
24
25
|
| `specification.navigation` | YES | Must have entries[] |
|
|
25
26
|
| `specification.i18nKeys[]` | YES | Must have >=1 key with fr, en, nl, de |
|
|
@@ -35,7 +36,7 @@
|
|
|
35
36
|
| `functionalRequirements[]` | `name`, `description`, `linkedUCs`, `linkedBRs` | `statement`, `linkedUseCases`, `linkedRules` |
|
|
36
37
|
| `permissionMatrix` | flat array with `resource`/`roles` | `{permissions[], roleAssignments[]}` |
|
|
37
38
|
| `lifeCycles[].states[]` | string values like `"Active"` | objects with `{id, displayName, color, isTerminal}` |
|
|
38
|
-
| `seedDataCore` | flat object, string values |
|
|
39
|
+
| `seedDataCore` | flat object, string values | 7 typed arrays |
|
|
39
40
|
| `gherkinScenarios` | flat scenario array | `{feature, scenarios[]}` nested |
|
|
40
41
|
|
|
41
42
|
## C. ID Pattern Conformity
|
|
@@ -74,6 +75,15 @@ FOR each navigationModules[].code:
|
|
|
74
75
|
IF NOT EXISTS navigationTranslations[] with moduleCode AND language -> ERROR
|
|
75
76
|
```
|
|
76
77
|
|
|
78
|
+
## G. API Endpoint Coverage
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
FOR each entity in analysis.entities[]:
|
|
82
|
+
endpoints = specification.apiEndpoints[].filter(e => e.path.includes(entity.name.toLowerCase()))
|
|
83
|
+
IF endpoints.length < 5 -> WARNING: "Entity {entity.name} has <5 endpoints (expected: GET list, GET id, POST, PUT, DELETE)"
|
|
84
|
+
IF endpoints.length === 0 -> ERROR: "Entity {entity.name} has NO endpoints — missing controller"
|
|
85
|
+
```
|
|
86
|
+
|
|
77
87
|
## Result Aggregation
|
|
78
88
|
|
|
79
89
|
```json
|
|
@@ -75,40 +75,51 @@ const FEATURE_DATA = {
|
|
|
75
75
|
|
|
76
76
|
## EMBEDDED_ARTIFACTS Object
|
|
77
77
|
|
|
78
|
+
> **CRITICAL:** The wireframes object is keyed by moduleCode (NOT a flat array).
|
|
79
|
+
> Field names MUST be renamed from feature.json: `mockupFormat` → `format`, `mockup` → `content`.
|
|
80
|
+
> The HTML renderer reads `wf.format` and `wf.content` — using feature.json names will produce EMPTY mockups.
|
|
81
|
+
|
|
78
82
|
```javascript
|
|
79
83
|
const EMBEDDED_ARTIFACTS = {
|
|
80
|
-
wireframes:
|
|
81
|
-
//
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
screen:
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
84
|
+
wireframes: {
|
|
85
|
+
// PER-MODULE keyed object (NOT a flat array)
|
|
86
|
+
// FOR EACH module: extract from specification.uiWireframes[]
|
|
87
|
+
[moduleCode]: moduleFeature.specification.uiWireframes.map(wf => ({
|
|
88
|
+
screen: wf.screen, // e.g. "employees-list"
|
|
89
|
+
section: wf.section, // e.g. "list"
|
|
90
|
+
format: wf.mockupFormat || "ascii", // RENAME: mockupFormat → format
|
|
91
|
+
content: wf.mockup, // RENAME: mockup → content (ASCII art string)
|
|
92
|
+
description: wf.description || "",
|
|
93
|
+
elements: wf.elements || [], // ["DataGrid", "FilterBar", ...]
|
|
94
|
+
actions: wf.actions || [], // ["filter", "sort", "create", ...]
|
|
95
|
+
componentMapping: wf.componentMapping || [], // [{ wireframeElement, reactComponent }]
|
|
96
|
+
layout: wf.layout || null, // { type, regions: [...] }
|
|
97
|
+
permissionsRequired: wf.permissionsRequired || []
|
|
98
|
+
}))
|
|
99
|
+
},
|
|
100
|
+
e2eFlows: (master.consolidation?.e2eFlows || []).map(flow => ({
|
|
101
|
+
name: flow.name,
|
|
102
|
+
diagram: flow.steps.map(s => `${s.action}(${s.module})`).join(" ──→ "),
|
|
103
|
+
steps: flow.steps || [],
|
|
104
|
+
actors: [...new Set(flow.steps.map(s => s.permission?.split(".")[0]).filter(Boolean))].join(", "),
|
|
105
|
+
modules: [...new Set(flow.steps.map(s => s.module))].join(" → ")
|
|
106
|
+
})),
|
|
99
107
|
dependencyGraph: {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
108
|
+
nodes: (master.modules || []).map(m => ({
|
|
109
|
+
id: m.code, label: m.code, type: m.featureType || "data-centric"
|
|
110
|
+
})),
|
|
111
|
+
edges: (master.dependencyGraph?.edges || []).map(e => ({
|
|
112
|
+
from: e.from, to: e.to, description: e.description || ""
|
|
113
|
+
}))
|
|
103
114
|
}
|
|
104
115
|
};
|
|
105
116
|
```
|
|
106
117
|
|
|
107
118
|
### Artifact Gathering
|
|
108
119
|
|
|
109
|
-
1.
|
|
110
|
-
2. Read master's `consolidation.e2eFlows[]` and
|
|
111
|
-
3. Read master's `
|
|
120
|
+
1. For EACH module: read `specification.uiWireframes[]`, **rename fields** (`mockupFormat`→`format`, `mockup`→`content`), store under `wireframes[moduleCode]`
|
|
121
|
+
2. Read master's `consolidation.e2eFlows[]` and build e2eFlows array with diagram generation
|
|
122
|
+
3. Read master's `dependencyGraph` and build nodes/edges
|
|
112
123
|
4. Serialize as JSON with 2-space indentation
|
|
113
124
|
|
|
114
125
|
## Placeholder Replacement
|