@atlashub/smartstack-cli 4.31.0 → 4.32.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/package.json
CHANGED
|
@@ -98,14 +98,26 @@ Layer 2 (Backend) — if multiple entities:
|
|
|
98
98
|
# Launched in parallel in a single message
|
|
99
99
|
|
|
100
100
|
Layer 3 (Frontend) — if multiple entities:
|
|
101
|
+
# ⛔ AGENT BOUNDARY: Snipper agents do NOT have access to Skill().
|
|
102
|
+
# Pages (.tsx) MUST be generated by the principal agent via Skill("ui-components").
|
|
103
|
+
# Snipper agents handle ONLY: API clients, routes, wiring, i18n — NOT pages.
|
|
104
|
+
|
|
105
|
+
# PHASE A — Parallel: infrastructure (Snipper agents)
|
|
101
106
|
Agent(subagent_type='Snipper', model='opus',
|
|
102
|
-
prompt='Execute Layer 3
|
|
107
|
+
prompt='Execute Layer 3 INFRASTRUCTURE for {Entity1}: API client, routes, wiring, i18n.
|
|
108
|
+
DO NOT generate any .tsx page files — pages are handled by the principal agent.')
|
|
103
109
|
Agent(subagent_type='Snipper', model='opus',
|
|
104
|
-
prompt='Execute Layer 3
|
|
110
|
+
prompt='Execute Layer 3 INFRASTRUCTURE for {Entity2}: API client, routes, wiring, i18n.
|
|
111
|
+
DO NOT generate any .tsx page files — pages are handled by the principal agent.')
|
|
105
112
|
# Launched in parallel in a single message
|
|
113
|
+
|
|
114
|
+
# PHASE B — Sequential: pages (principal agent only)
|
|
115
|
+
# After all Snipper agents complete, principal generates pages via Skill("ui-components").
|
|
116
|
+
# See step-03-execute.md Layer 3 HARD RULE for full protocol.
|
|
106
117
|
```
|
|
107
118
|
|
|
108
119
|
Each agent has an **isolated scope**: handles one entity end-to-end within the layer.
|
|
120
|
+
**Exception:** Layer 3 pages are NOT delegated — see step-03 HARD RULE.
|
|
109
121
|
|
|
110
122
|
---
|
|
111
123
|
|
|
@@ -129,8 +141,9 @@ Each agent has an **isolated scope**: handles one entity end-to-end within the l
|
|
|
129
141
|
5. Layer 2: launch Snipper agents per entity (if multi-entity) OR agent principal (if single)
|
|
130
142
|
6. Build gate: dotnet build → MUST PASS
|
|
131
143
|
7. Backend tests inline (scaffold + run + fix max 3)
|
|
132
|
-
8. Layer 3: launch Snipper agents
|
|
133
|
-
9.
|
|
144
|
+
8. Layer 3 Phase A: launch Snipper agents for infra (api-client, routes, i18n) — NOT pages
|
|
145
|
+
9. Layer 3 Phase B: principal agent generates ALL pages via Skill("ui-components") — sequential
|
|
146
|
+
10. Compliance gate: 6 frontend checks → MUST PASS
|
|
134
147
|
10. Frontend tests inline (scaffold + run + fix max 3)
|
|
135
148
|
11. Layer 4 (optional): agent principal executes DevData
|
|
136
149
|
```
|
|
@@ -151,6 +164,6 @@ There is no idle state to manage — the agent principal simply waits for result
|
|
|
151
164
|
| economy_mode = true | NO parallel agents, all sequential |
|
|
152
165
|
| Single entity (any layer) | NO parallel agents, agent principal handles all |
|
|
153
166
|
| Multiple entities, Layer 2 | Parallel: one Snipper agent per entity (service + controller) |
|
|
154
|
-
| Multiple entities, Layer 3 | Parallel:
|
|
167
|
+
| Multiple entities, Layer 3 | Parallel: Snipper agents for infra (api-client, routes, i18n) — pages by principal via Skill("ui-components") |
|
|
155
168
|
| Layer 0, Layer 1, Layer 4 | NO parallel agents (sequential by nature) |
|
|
156
169
|
| Analysis phase (step-01) | Parallel: 2-3 Explore agents (backend + frontend + context) |
|
|
@@ -591,4 +591,26 @@ if [ -n "$PAGE_FILES" ]; then
|
|
|
591
591
|
fi
|
|
592
592
|
```
|
|
593
593
|
|
|
594
|
-
|
|
594
|
+
### Gate 6: SmartStack Components (no raw HTML tables)
|
|
595
|
+
|
|
596
|
+
```bash
|
|
597
|
+
PAGE_FILES=$(find src/pages/ -name "*.tsx" 2>/dev/null | grep -v "\.test\." | grep -v node_modules)
|
|
598
|
+
if [ -n "$PAGE_FILES" ]; then
|
|
599
|
+
FAIL=false
|
|
600
|
+
RAW_TABLE=$(grep -Pn '<table[> ]|<tr[> ]|<td[> ]|<th[> ]' $PAGE_FILES 2>/dev/null)
|
|
601
|
+
if [ -n "$RAW_TABLE" ]; then
|
|
602
|
+
echo "BLOCKING: Raw HTML <table>/<tr>/<td> found — pages MUST use DataTable component (invoke /ui-components)"
|
|
603
|
+
echo "$RAW_TABLE"
|
|
604
|
+
FAIL=true
|
|
605
|
+
fi
|
|
606
|
+
RAW_CSS=$(grep -Pn 'style=\{?\{|style="[^"]*"' $PAGE_FILES 2>/dev/null | grep -v "className")
|
|
607
|
+
if [ -n "$RAW_CSS" ]; then
|
|
608
|
+
echo "BLOCKING: Inline CSS style= found — pages MUST use Tailwind + CSS variables (invoke /ui-components)"
|
|
609
|
+
echo "$RAW_CSS"
|
|
610
|
+
FAIL=true
|
|
611
|
+
fi
|
|
612
|
+
if [ "$FAIL" = false ]; then echo "PASS: SmartStack components (no raw HTML)"; fi
|
|
613
|
+
fi
|
|
614
|
+
```
|
|
615
|
+
|
|
616
|
+
> **ALL 6 gates MUST pass before frontend commit.** When delegating to `/ui-components` skill, include explicit instructions: CSS variables only, forms as full pages, i18n with namespace + fallback.
|
|
@@ -454,6 +454,29 @@ test({module}): backend unit and integration tests
|
|
|
454
454
|
|
|
455
455
|
## Layer 3 — Frontend (Pages + I18n + Documentation)
|
|
456
456
|
|
|
457
|
+
### ⛔ HARD RULE — /ui-components is NON-NEGOTIABLE (read BEFORE any Layer 3 action)
|
|
458
|
+
|
|
459
|
+
> **VIOLATION CHECK:** If ANY .tsx page file was created by Write tool WITHOUT
|
|
460
|
+
> a prior Skill("ui-components") call in this execution, the frontend layer is INVALID.
|
|
461
|
+
>
|
|
462
|
+
> **You MUST NOT:**
|
|
463
|
+
> - Generate .tsx page code in Agent prompts and dispatch to Snipper agents
|
|
464
|
+
> - Write page content directly via the Write tool
|
|
465
|
+
> - Copy-paste page templates from your knowledge
|
|
466
|
+
>
|
|
467
|
+
> **You MUST:**
|
|
468
|
+
> - Call Skill("ui-components") which loads the style guide, responsive guidelines,
|
|
469
|
+
> accessibility rules, and pattern files (entity-card, data-table, dashboard-chart, grid-layout, kanban)
|
|
470
|
+
> - Let /ui-components generate all pages with correct conventions
|
|
471
|
+
>
|
|
472
|
+
> **Why this matters:** Without the skill, pages miss CSS variables, DataTable/EntityCard,
|
|
473
|
+
> memo()/useCallback, responsive mobile-first design, and accessibility patterns.
|
|
474
|
+
>
|
|
475
|
+
> **Agent boundary rule:** Snipper sub-agents DO NOT have access to the Skill tool.
|
|
476
|
+
> Therefore, .tsx page generation MUST NEVER be delegated to Snipper agents.
|
|
477
|
+
> Pages are ALWAYS generated by the principal agent via Skill("ui-components").
|
|
478
|
+
> Snipper agents handle: API clients, routes, wiring, i18n, tests — NOT pages.
|
|
479
|
+
|
|
457
480
|
### Load Frontend References (deferred from top of step)
|
|
458
481
|
|
|
459
482
|
- Read `references/smartstack-frontend.md` now — lazy loading, i18n, page structure, CSS variables, EntityLookup (sections 1-6)
|
|
@@ -668,43 +691,21 @@ When launching agents for multi-entity layers:
|
|
|
668
691
|
|
|
669
692
|
### Frontend Compliance Gate
|
|
670
693
|
|
|
671
|
-
> See `references/smartstack-frontend.md` section 9 "Compliance Gates" for all
|
|
694
|
+
> See `references/smartstack-frontend-compliance.md` section 9 "Compliance Gates" for all 6 required checks:
|
|
672
695
|
> 1. CSS Variables (theme system)
|
|
673
696
|
> 2. Forms as Pages (zero modals/drawers/slide-overs)
|
|
674
697
|
> 3. I18n File Structure (4 languages, separate JSON files)
|
|
675
698
|
> 4. Lazy Loading (React.lazy() — no static imports)
|
|
676
699
|
> 5. useTranslation in Pages (all text translated)
|
|
700
|
+
> 6. SmartStack Components (no raw HTML tables — DataTable/EntityCard required)
|
|
677
701
|
|
|
678
|
-
Do not commit frontend changes until all
|
|
702
|
+
Do not commit frontend changes until all 6 gates pass.
|
|
679
703
|
|
|
680
704
|
When delegating to `/ui-components` skill, include explicit instructions:
|
|
681
705
|
- "CSS: Use CSS variables ONLY — `bg-[var(--bg-card)]`, `text-[var(--text-primary)]`."
|
|
682
706
|
- "Forms: Create/Edit forms are FULL PAGES with own routes (e.g., `/create`, `/:id/edit`)."
|
|
683
707
|
- "I18n: ALL text must use `t('namespace:key', 'Fallback')`. Generate JSON files in `src/i18n/locales/`."
|
|
684
708
|
|
|
685
|
-
### HARD RULE — /ui-components is NON-NEGOTIABLE
|
|
686
|
-
|
|
687
|
-
> **VIOLATION CHECK:** If ANY .tsx page file was created by Write tool WITHOUT
|
|
688
|
-
> a prior Skill("ui-components") call in this execution, the frontend layer is INVALID.
|
|
689
|
-
>
|
|
690
|
-
> **You MUST NOT:**
|
|
691
|
-
> - Generate .tsx page code in Agent prompts and dispatch to Snipper agents
|
|
692
|
-
> - Write page content directly via the Write tool
|
|
693
|
-
> - Copy-paste page templates from your knowledge
|
|
694
|
-
>
|
|
695
|
-
> **You MUST:**
|
|
696
|
-
> - Call Skill("ui-components") which loads the style guide, responsive guidelines,
|
|
697
|
-
> accessibility rules, and pattern files (entity-card, data-table, dashboard-chart, grid-layout, kanban)
|
|
698
|
-
> - Let /ui-components generate all pages with correct conventions
|
|
699
|
-
>
|
|
700
|
-
> **Why this matters:** Without the skill, pages miss CSS variables, DataTable/EntityCard,
|
|
701
|
-
> memo()/useCallback, responsive mobile-first design, and accessibility patterns.
|
|
702
|
-
>
|
|
703
|
-
> **Agent boundary rule:** Snipper sub-agents DO NOT have access to the Skill tool.
|
|
704
|
-
> Therefore, .tsx page generation MUST NEVER be delegated to Snipper agents.
|
|
705
|
-
> Pages are ALWAYS generated by the principal agent via Skill("ui-components").
|
|
706
|
-
> Snipper agents handle: API clients, routes, wiring, i18n, tests — NOT pages.
|
|
707
|
-
|
|
708
709
|
### Frontend Tests Inline
|
|
709
710
|
|
|
710
711
|
> **Tests are scaffolded and run WITHIN Layer 3, not deferred to step-07.**
|