@atlashub/smartstack-cli 4.35.0 → 4.37.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 (49) hide show
  1. package/dist/index.js +54 -100
  2. package/dist/index.js.map +1 -1
  3. package/dist/mcp-entry.mjs +54 -11
  4. package/dist/mcp-entry.mjs.map +1 -1
  5. package/package.json +1 -1
  6. package/templates/agents/efcore/migration.md +43 -0
  7. package/templates/agents/efcore/rebase-snapshot.md +36 -0
  8. package/templates/agents/efcore/squash.md +36 -0
  9. package/templates/skills/apex/references/checks/seed-checks.sh +1 -1
  10. package/templates/skills/apex/references/core-seed-data.md +39 -21
  11. package/templates/skills/application/references/application-roles-template.md +14 -8
  12. package/templates/skills/application/references/provider-template.md +32 -20
  13. package/templates/skills/application/templates-frontend.md +294 -2
  14. package/templates/skills/application/templates-seed.md +23 -11
  15. package/templates/skills/audit-route/SKILL.md +107 -0
  16. package/templates/skills/audit-route/references/routing-pattern.md +129 -0
  17. package/templates/skills/audit-route/steps/step-00-init.md +128 -0
  18. package/templates/skills/audit-route/steps/step-01-inventory.md +157 -0
  19. package/templates/skills/audit-route/steps/step-02-conformity.md +193 -0
  20. package/templates/skills/audit-route/steps/step-03-report.md +201 -0
  21. package/templates/skills/dev-start/SKILL.md +12 -2
  22. package/templates/skills/efcore/SKILL.md +219 -67
  23. package/templates/agents/efcore/conflicts.md +0 -114
  24. package/templates/agents/efcore/db-deploy.md +0 -86
  25. package/templates/agents/efcore/db-reset.md +0 -98
  26. package/templates/agents/efcore/db-seed.md +0 -73
  27. package/templates/agents/efcore/db-status.md +0 -97
  28. package/templates/agents/efcore/scan.md +0 -124
  29. package/templates/skills/efcore/references/both-contexts.md +0 -32
  30. package/templates/skills/efcore/references/destructive-operations.md +0 -38
  31. package/templates/skills/efcore/steps/db/step-deploy.md +0 -217
  32. package/templates/skills/efcore/steps/db/step-reset.md +0 -186
  33. package/templates/skills/efcore/steps/db/step-seed.md +0 -166
  34. package/templates/skills/efcore/steps/db/step-status.md +0 -173
  35. package/templates/skills/efcore/steps/migration/step-00-init.md +0 -102
  36. package/templates/skills/efcore/steps/migration/step-01-check.md +0 -164
  37. package/templates/skills/efcore/steps/migration/step-02-create.md +0 -160
  38. package/templates/skills/efcore/steps/migration/step-03-validate.md +0 -168
  39. package/templates/skills/efcore/steps/rebase-snapshot/step-00-init.md +0 -173
  40. package/templates/skills/efcore/steps/rebase-snapshot/step-01-backup.md +0 -100
  41. package/templates/skills/efcore/steps/rebase-snapshot/step-02-fetch.md +0 -115
  42. package/templates/skills/efcore/steps/rebase-snapshot/step-03-create.md +0 -112
  43. package/templates/skills/efcore/steps/rebase-snapshot/step-04-validate.md +0 -157
  44. package/templates/skills/efcore/steps/shared/step-00-init.md +0 -131
  45. package/templates/skills/efcore/steps/squash/step-00-init.md +0 -141
  46. package/templates/skills/efcore/steps/squash/step-01-backup.md +0 -120
  47. package/templates/skills/efcore/steps/squash/step-02-fetch.md +0 -168
  48. package/templates/skills/efcore/steps/squash/step-03-create.md +0 -184
  49. package/templates/skills/efcore/steps/squash/step-04-validate.md +0 -174
@@ -1,174 +0,0 @@
1
- ---
2
- name: step-04-validate
3
- description: Validate squash - build and generate script
4
- next_step: null
5
- ---
6
-
7
- # Step 4: Validate
8
-
9
- ## YOUR TASK:
10
-
11
- Validate the squash by building the project and generating an idempotent script.
12
-
13
- **Previous step:** `step-03-create.md`
14
-
15
- ---
16
-
17
- ## EXECUTION SEQUENCE:
18
-
19
- ### 1. Build Project
20
-
21
- ```bash
22
- echo "Building project..."
23
- echo ""
24
-
25
- dotnet build "$INFRA_PROJECT" --no-restore
26
-
27
- if [ $? -ne 0 ]; then
28
- echo ""
29
- echo "ERROR: Build FAILED"
30
- echo ""
31
- echo "Restoring from backup..."
32
- cp "$BACKUP_DIR"/*.cs "$MIGRATIONS_DIR/"
33
- echo "Restored. Please fix issues and retry."
34
- exit 1
35
- fi
36
-
37
- echo ""
38
- echo "Build: OK"
39
- ```
40
-
41
- ### 2. List Migrations
42
-
43
- ```bash
44
- echo ""
45
- echo "Migration list:"
46
- echo ""
47
-
48
- dotnet ef migrations list \
49
- --context "$DBCONTEXT" \
50
- --project "$INFRA_PROJECT" \
51
- --startup-project "$STARTUP_PROJECT" \
52
- --no-build
53
- ```
54
-
55
- ### 3. Generate Idempotent Script (Validation)
56
-
57
- ```bash
58
- echo ""
59
- echo "Generating idempotent script..."
60
- echo ""
61
-
62
- SCRIPT_FILE="$BACKUP_DIR/migration_script.sql"
63
-
64
- dotnet ef migrations script \
65
- --context "$DBCONTEXT" \
66
- --project "$INFRA_PROJECT" \
67
- --startup-project "$STARTUP_PROJECT" \
68
- --idempotent \
69
- --no-build \
70
- -o "$SCRIPT_FILE"
71
-
72
- if [ $? -ne 0 ]; then
73
- echo ""
74
- echo "ERROR: Script generation FAILED"
75
- echo ""
76
- echo "This indicates a migration problem."
77
- echo "Restoring from backup..."
78
- cp "$BACKUP_DIR"/*.cs "$MIGRATIONS_DIR/"
79
- exit 1
80
- fi
81
-
82
- echo "Script generated: $SCRIPT_FILE"
83
- ```
84
-
85
- ### 4. Final Summary
86
-
87
- ```bash
88
- # Count final migrations
89
- FINAL_MIGRATION_COUNT=$(find "$MIGRATIONS_DIR" -name "*.cs" 2>/dev/null | grep -v "Designer\|Snapshot" | wc -l)
90
-
91
- echo ""
92
- echo "==========================================="
93
- echo "SQUASH COMPLETE"
94
- echo "==========================================="
95
- echo ""
96
- echo "Branch: $CURRENT_BRANCH"
97
- echo "Parent: $BASE_BRANCH"
98
- echo "DbContext: $DBCONTEXT ($DBCONTEXT_TYPE)"
99
- echo ""
100
- echo "Recovered from $BASE_BRANCH:"
101
- echo " - ModelSnapshot"
102
- echo " - $BASE_MIGRATION_COUNT migrations"
103
- echo ""
104
- echo "Consolidated:"
105
- echo " - Before: $MIGRATION_COUNT migrations (branch-specific)"
106
- echo " - After: 1 migration ($MIGRATION_NAME)"
107
- echo ""
108
- echo "Total: $FINAL_MIGRATION_COUNT migrations"
109
- echo ""
110
- echo "Backup: $BACKUP_DIR"
111
- echo "Script: $SCRIPT_FILE"
112
- echo ""
113
- echo "==========================================="
114
- echo ""
115
- echo "Next steps:"
116
- echo " /efcore db-reset # Reset local database"
117
- echo " /efcore db-deploy # Apply migrations"
118
- echo " /gitflow commit # Commit changes"
119
- echo ""
120
- ```
121
-
122
- ---
123
-
124
- ## OUTPUT FORMAT:
125
-
126
- ```
127
- SQUASH COMPLETE
128
- ===============
129
- Branch: {current_branch}
130
- Parent: {base_branch}
131
- DbContext: {dbcontext} ({dbcontext_type})
132
-
133
- Recovered from {base_branch}:
134
- - ModelSnapshot
135
- - {base_migration_count} migrations
136
-
137
- Consolidated:
138
- - Before: {migration_count} migrations (branch-specific)
139
- - After: 1 migration ({migration_name})
140
-
141
- Total: {final_migration_count} migrations
142
-
143
- Backup: {backup_dir}
144
- Script: {backup_dir}/migration_script.sql
145
-
146
- Next: /efcore db-reset, /efcore db-deploy, /gitflow commit
147
- ```
148
-
149
- ---
150
-
151
- ## ERROR HANDLING:
152
-
153
- | Error | Action |
154
- |-------|--------|
155
- | Build fails | Restore backup, show errors |
156
- | Script fails | Restore backup, investigate |
157
-
158
- **Restore command:**
159
- ```bash
160
- cp "{BACKUP_DIR}"/*.cs "{MIGRATIONS_DIR}/"
161
- ```
162
-
163
- ---
164
-
165
- ## SUCCESS CRITERIA:
166
-
167
- - Build passes
168
- - Migration list shows correct migrations
169
- - Idempotent script generates successfully
170
- - Summary displayed
171
-
172
- ## COMPLETION:
173
-
174
- Squash workflow complete. Database not modified (use `/efcore db-deploy` to apply).