@atlashub/smartstack-cli 3.26.0 → 3.28.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 +3 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -4
- package/templates/skills/business-analyse/steps/step-05a-handoff.md +1 -1
- package/templates/skills/business-analyse/steps/step-05c-ralph-readiness.md +2 -2
- package/templates/skills/ralph-loop/references/category-rules.md +54 -3
- package/templates/skills/ralph-loop/references/compact-loop.md +108 -2
- package/templates/skills/ralph-loop/steps/step-02-execute.md +202 -14
- package/templates/skills/ralph-loop/steps/step-03-commit.md +2 -2
- package/templates/skills/ralph-loop/steps/step-04-check.md +4 -3
- package/templates/skills/ralph-loop/steps/step-05-report.md +51 -1
|
@@ -70,7 +70,57 @@ if [ -d "$TEST_PROJECT" ]; then
|
|
|
70
70
|
fi
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
-
### 1e.
|
|
73
|
+
### 1e. Frontend Quality Metrics (if frontend tasks were executed)
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
WEB_SRC=$(find . -name "App.tsx" -not -path "*/node_modules/*" -exec dirname {} \; 2>/dev/null | head -1)
|
|
77
|
+
if [ -n "$WEB_SRC" ]; then
|
|
78
|
+
PAGE_DIR="$WEB_SRC/pages"
|
|
79
|
+
HOOK_DIR="$WEB_SRC/hooks"
|
|
80
|
+
COMP_DIR="$WEB_SRC/components"
|
|
81
|
+
I18N_DIR="$WEB_SRC/i18n/locales"
|
|
82
|
+
|
|
83
|
+
# Count metrics
|
|
84
|
+
PAGE_COUNT=$(find "$PAGE_DIR" -name "*.tsx" ! -name "*.test.tsx" 2>/dev/null | wc -l)
|
|
85
|
+
TEST_COUNT=$(find "$PAGE_DIR" -name "*.test.tsx" 2>/dev/null | wc -l)
|
|
86
|
+
HOOK_COUNT=$(find "$HOOK_DIR" -name "*.ts" -o -name "*.tsx" 2>/dev/null | wc -l)
|
|
87
|
+
|
|
88
|
+
# Quality checks
|
|
89
|
+
RAW_TABLES=$(grep -rl '<table[\s>]' "$PAGE_DIR" --include="*.tsx" 2>/dev/null | wc -l)
|
|
90
|
+
HARDCODED_COLORS=$(grep -rl '(?:bg|text|border)-(?:red|blue|green|gray|slate)-\d{2,3}' "$PAGE_DIR" "$COMP_DIR" --include="*.tsx" 2>/dev/null | wc -l)
|
|
91
|
+
CSS_VARS=$(grep -rl 'var(--' "$PAGE_DIR" "$COMP_DIR" --include="*.tsx" 2>/dev/null | wc -l)
|
|
92
|
+
WINDOW_CONFIRM=$(grep -rl 'window\.confirm' "$PAGE_DIR" --include="*.tsx" 2>/dev/null | wc -l)
|
|
93
|
+
HARDCODED_TEXT=$(grep -rl '>\s*\(Create\|Edit\|Delete\|Save\|Cancel\)\s*<' "$PAGE_DIR" --include="*.tsx" 2>/dev/null | wc -l)
|
|
94
|
+
USE_TRANSLATION=$(grep -rl 'useTranslation' "$PAGE_DIR" --include="*.tsx" 2>/dev/null | wc -l)
|
|
95
|
+
SMART_TABLE=$(grep -rl 'SmartTable\|DataTable' "$PAGE_DIR" --include="*.tsx" 2>/dev/null | wc -l)
|
|
96
|
+
|
|
97
|
+
# i18n coverage
|
|
98
|
+
I18N_LANGS=0
|
|
99
|
+
for LANG in fr en it de; do
|
|
100
|
+
[ -d "$I18N_DIR/$LANG" ] && I18N_LANGS=$((I18N_LANGS + 1))
|
|
101
|
+
done
|
|
102
|
+
fi
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Include frontend metrics in report section:
|
|
106
|
+
```markdown
|
|
107
|
+
## Frontend Quality
|
|
108
|
+
| Metric | Value | Target |
|
|
109
|
+
|--------|-------|--------|
|
|
110
|
+
| Pages | {PAGE_COUNT} | — |
|
|
111
|
+
| Tests | {TEST_COUNT} | ≥ {PAGE_COUNT/3} |
|
|
112
|
+
| Hooks | {HOOK_COUNT} | — |
|
|
113
|
+
| SmartTable/DataTable usage | {SMART_TABLE} files | All list pages |
|
|
114
|
+
| Raw HTML tables | {RAW_TABLES} files | 0 |
|
|
115
|
+
| CSS variable usage | {CSS_VARS} files | All TSX files |
|
|
116
|
+
| Hardcoded colors | {HARDCODED_COLORS} files | 0 |
|
|
117
|
+
| useTranslation() usage | {USE_TRANSLATION} files | All page files |
|
|
118
|
+
| Hardcoded English text | {HARDCODED_TEXT} files | 0 |
|
|
119
|
+
| window.confirm() usage | {WINDOW_CONFIRM} files | 0 |
|
|
120
|
+
| i18n languages | {I18N_LANGS}/4 | 4 |
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### 1f. Final DB Validation (if infrastructure/migration tasks were executed)
|
|
74
124
|
|
|
75
125
|
```bash
|
|
76
126
|
INFRA_PROJECT=$(ls src/*Infrastructure*/*.csproj 2>/dev/null | head -1)
|