@bluealba/platform-cli 1.2.0-alpha.2 → 1.2.0-alpha.3

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bluealba/platform-cli",
3
- "version": "1.2.0-alpha.2",
3
+ "version": "1.2.0-alpha.3",
4
4
  "description": "Blue Alba Platform CLI",
5
5
  "license": "PolyForm-Noncommercial-1.0.0",
6
6
  "type": "module",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: platform-add-feature-flag
3
- description: Declares a feature flag in the bootstrap service and adds its usage in a React UI component or NestJS service. Use when the user wants to gate a feature behind a flag on a Blue Alba Platform app.
3
+ description: Declares a feature flag in a bootstrap service and gates a React component or NestJS endpoint behind it. Use when the user wants to gate a feature behind a flag on a Blue Alba Platform app.
4
4
  ---
5
5
 
6
6
  You are adding a feature flag to a Blue Alba Platform application. The project is a monorepo: UI modules live under `ui/`, services and bootstrap under `services/`.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: platform-add-menu-item
3
- description: Adds a new page and menu item to a Blue Alba Platform single-spa UI module. Creates the route component and wires it into menu.ts. Use when the user wants to add a new page, route, or section to a platform app.
3
+ description: Creates a new page component and wires it as a menu item/route in a single-spa UI module. Use when the user wants to add a new page, route, or section to a platform app.
4
4
  ---
5
5
 
6
6
  You are adding a new page and menu entry to a Blue Alba Platform single-spa UI application. The project is a monorepo where UI modules live under `ui/` and services under `services/`.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: platform-add-operation
3
- description: Defines a new authorization operation in the bootstrap service, assigns it to a role, and adds access guards in the React UI or NestJS backend. Use when the user wants to restrict a feature, page, or action to specific roles on a Blue Alba Platform app.
3
+ description: Adds an authorization operation (permission/RBAC guard) to a bootstrap service and enforces it in UI or backend routes. Use when the user wants to restrict a feature, page, or action to specific roles on a Blue Alba Platform app.
4
4
  ---
5
5
 
6
6
  You are adding an authorization operation to a Blue Alba Platform application. The project is a monorepo: UI modules under `ui/`, services and bootstrap under `services/`.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: platform-add-presence
3
- description: Adds real-time user presence (who is viewing this page/resource) to a component in a Blue Alba Platform app using the Rooms API. Use when the user wants to show live avatars or awareness of other users in a view.
3
+ description: Adds real-time user presence (live avatars, who-is-viewing) to a component using the Rooms API. Use when the user wants to show live avatars or awareness of other users in a view.
4
4
  ---
5
5
 
6
6
  You are adding real-time presence tracking to a Blue Alba Platform single-spa application using the Rooms API. The project is a monorepo: UI modules under `ui/`.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: platform-add-scheduled-job
3
- description: Adds a scheduled job to a Blue Alba Platform bootstrap service. Use when the user wants to run a backend endpoint on a cron schedule.
3
+ description: Adds a cron-scheduled job to a bootstrap service to run a backend endpoint on a recurring schedule. Use when the user wants to run a backend endpoint on a cron schedule.
4
4
  ---
5
5
 
6
6
  You are adding a scheduled job to a Blue Alba Platform application's bootstrap service. The project is a monorepo: bootstrap lives under `services/<app>-bootstrap-service/src/bootstrap/`.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: platform-cli
3
- description: Blue Alba Platform CLI commands and usage knowledge
3
+ description: Blue Alba Platform CLI commands, usage, installation, and headless mode reference
4
4
  ---
5
5
 
6
6
  # Blue Alba Platform CLI — Expert Knowledge
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: platform-extend-shell
3
- description: Injects a custom component into a Blue Alba Platform shell extension point (navbar, branding, user section, etc.). Use when the user wants to add a button, logo, or custom element to the platform shell from within their app.
3
+ description: Injects a custom component into a shell extension point (navbar, branding, user section). Use when the user wants to add a button, logo, or custom element to the platform shell from within their app.
4
4
  ---
5
5
 
6
6
  You are extending a shell UI extension point from within a Blue Alba Platform single-spa application. The project is a monorepo: UI modules under `ui/`, services under `services/`.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: platform-scaffold-module
3
- description: Scaffolds a new UI module or service module in a Blue Alba Platform monorepo using the platform CLI. Use when the user wants to add a new micro-frontend or backend service to an existing platform application.
3
+ description: Scaffolds a new UI module or NestJS service module in a platform monorepo using the CLI. Use when the user wants to add a new micro-frontend or backend service to an existing platform application.
4
4
  ---
5
5
 
6
6
  You are helping the user scaffold a new module in a Blue Alba Platform monorepo. The platform CLI handles all scaffolding, port allocation, modules.json registration, and docker-compose updates automatically. Your job is to gather the right inputs and then run the CLI.
@@ -1,15 +1,63 @@
1
1
  ---
2
2
  name: platform
3
- description: Comprehensive Blue Alba Platform architecture and concepts knowledge
3
+ description: Blue Alba Platform orchestrator — routes to the correct specialized skill or answers general architecture questions. Use this skill for ANY platform-related request.
4
4
  ---
5
5
 
6
- # Blue Alba Platform — Expert Knowledge
6
+ # Blue Alba Platform — Skill Orchestrator
7
7
 
8
- You are an expert on the Blue Alba Platform monorepo. Use the documentation files referenced below to answer questions accurately.
8
+ You are the entry point for all Blue Alba Platform tasks. Your first job is to **detect the project context**, then **route to the correct specialized skill** or answer directly for general knowledge questions.
9
9
 
10
- ## Documentation
10
+ ## Step 1 — Detect project context
11
11
 
12
- Read these files for comprehensive platform knowledge:
12
+ Before doing anything else, determine what kind of directory you are in. Run these checks in order:
13
+
14
+ 1. **Look for `CLAUDE.md`** in the current working directory. If it exists and mentions "Blue Alba Platform", read it for project context.
15
+
16
+ 2. **Check if this is a platform workspace root.** Look for a subdirectory matching `*-core/` that contains `product.manifest.json`:
17
+ ```
18
+ ls *-core/product.manifest.json
19
+ ```
20
+ If found, read the manifest to learn the platform name, organization, and list of applications.
21
+
22
+ 3. **Check if this is a core monorepo.** Look for `product.manifest.json` in the current directory:
23
+ ```
24
+ ls product.manifest.json
25
+ ```
26
+ If found, you are inside a `*-core/` directory. Read the manifest.
27
+
28
+ 4. **Check if this is an application monorepo.** Look for `docker-compose.yml` at the root alongside `services/` and `ui/` directories, but no `product.manifest.json`. Also check if `*-bootstrap-service/` exists under `services/`.
29
+
30
+ 5. **Check parent directories.** If none of the above matched, check one level up (`../`) for a `*-core/product.manifest.json` — you might be inside an application directory within a workspace.
31
+
32
+ Once you identify the context, briefly tell the user what you detected (e.g., "I detected this is the workspace root for the Acme platform with 2 applications.") and proceed to Step 2.
33
+
34
+ If no platform context is found, tell the user and still proceed — the skill catalog and documentation are still useful.
35
+
36
+ ## Step 2 — Route to the correct skill
37
+
38
+ Check if the user's request matches one of these specialized skills. If it does, invoke it using the Skill tool.
39
+
40
+ | Skill | When to use | Trigger keywords |
41
+ |-------|-------------|------------------|
42
+ | `platform-add-operation` | User wants to add an authorization operation, permission, or RBAC guard to a route, endpoint, component, or menu item | operation, permission, guard, restrict, gate, protect, RBAC, authorize |
43
+ | `platform-add-feature-flag` | User wants to gate a feature behind a flag (on/off toggle, gradual rollout) | feature flag, toggle, flag, rollout, canary |
44
+ | `platform-add-scheduled-job` | User wants to run something on a cron schedule | scheduled job, cron, recurring task, timer, schedule |
45
+ | `platform-add-menu-item` | User wants to add a new page, route, or navigation entry to a UI module | menu item, page, route, navigation, sidebar |
46
+ | `platform-extend-shell` | User wants to inject a custom component into the shell (navbar, branding, user section) | shell extension, navbar, branding, header, inject into shell |
47
+ | `platform-add-presence` | User wants to show real-time presence (who is viewing) using the Rooms API | presence, rooms, live avatars, who is online, real-time awareness |
48
+ | `platform-scaffold-module` | User wants to create a new UI module or service module from scratch | scaffold, create module, new service, new UI module, generate |
49
+ | `platform-cli` | User asks about CLI commands, usage, installation, or headless mode | CLI, platform command, terminal, headless, interactive mode |
50
+
51
+ ### Routing rules
52
+
53
+ 1. **Be specific** — always prefer a specialized skill over answering yourself. If the request involves *doing* something (adding, creating, configuring), there is almost certainly a matching skill above.
54
+ 2. **Compound requests** — if the user asks for multiple things (e.g., "add a page and restrict it to admins"), route to each skill sequentially: first `platform-add-menu-item`, then `platform-add-operation`.
55
+ 3. **When in doubt** — if the request is close to a skill but not exact, route to the skill anyway. The specialized skill has deeper instructions and will handle edge cases better.
56
+ 4. **Only answer directly** when the user is asking a pure knowledge question (e.g., "how does multi-tenancy work?", "explain the gateway architecture", "what auth strategies are supported?").
57
+
58
+ ## General Knowledge (for direct answers only)
59
+
60
+ When answering general architecture or concepts questions, read the relevant documentation:
13
61
 
14
62
  - `{{docsPath}}/getting-started/overview.mdx` — Platform overview and core concepts
15
63
  - `{{docsPath}}/getting-started/core-concepts.mdx` — Core concepts explained in depth
@@ -22,22 +70,17 @@ Read these files for comprehensive platform knowledge:
22
70
  - `{{docsPath}}/architecture/shell.mdx` — Shell UI architecture and extension points
23
71
  - `{{docsPath}}/architecture/scheduler.mdx` — Job scheduling system
24
72
  - `{{docsPath}}/development/workflow.mdx` — Development workflow, git branching, changesets, testing
25
- - `{{docsPath}}/guides/using-feature-flags.mdx` — Feature flags system: declaration, targeting rules, React and NestJS usage
26
- - `{{docsPath}}/guides/working-with-rooms.mdx` — Real-time presence with Rooms API: WebSocket architecture, hooks, components
27
- - `{{docsPath}}/architecture/ui-extension-points.mdx` — Shell extension point mechanism, lifecycle, and customization
28
- - `{{docsPath}}/platform-cli/overview.mdx` — Platform CLI tool: installation, interactive mode, headless mode
73
+ - `{{docsPath}}/guides/using-feature-flags.mdx` — Feature flags system
74
+ - `{{docsPath}}/guides/working-with-rooms.mdx` — Real-time presence with Rooms API
75
+ - `{{docsPath}}/architecture/ui-extension-points.mdx` — Shell extension point mechanism
76
+ - `{{docsPath}}/platform-cli/overview.mdx` — Platform CLI tool overview
29
77
  - `{{docsPath}}/platform-cli/commands.mdx` — All CLI commands reference
30
78
 
31
- ## When to Use This Knowledge
32
-
33
- - When the user asks about the platform's architecture, services, or conventions
34
- - When explaining how the gateway, microservices, or UI applications work
35
- - When guiding development decisions that must align with platform patterns
36
- - When reviewing code against platform conventions
37
-
38
79
  ## Instructions
39
80
 
40
- 1. Always read the relevant documentation files above before answering platform-specific questions
41
- 2. Reference specific sections from the docs when explaining concepts
42
- 3. Follow the conventions and patterns described in the architecture documentation
43
- 4. When uncertain, prefer the documented approach over assumptions
81
+ 1. **Always run Step 1 (context detection) first** even if the user's request seems simple
82
+ 2. **Always check the skill catalog (Step 2)** before answering any platform-related request
83
+ 3. If a specialized skill matches, invoke it — do not attempt to answer from the documentation references above
84
+ 4. When routing to a specialized skill, pass along the project context you detected (platform name, org, directory paths) so the skill can use it
85
+ 5. For general knowledge questions, read the relevant docs before answering
86
+ 6. Reference specific sections from the docs when explaining concepts
@@ -0,0 +1,36 @@
1
+ # {{platformName}}-{{applicationName}} — Application
2
+
3
+ This is an **application monorepo** for `{{applicationName}}` (`@{{organizationName}}`), built on the Blue Alba Platform.
4
+
5
+ For any platform-related task, use the `/platform` skill — it routes to the correct specialized skill automatically.
6
+
7
+ ## Project Structure
8
+
9
+ - `services/` — Backend NestJS services
10
+ - `{{platformName}}-{{applicationName}}-bootstrap-service/` — App bootstrap service (registers this app's modules, operations, and menus with the gateway)
11
+ - Additional service modules may exist here
12
+ - `ui/` — React micro-frontend modules (single-spa)
13
+ - `docker-compose.yml` — Docker Compose for this application's services (at repo root)
14
+
15
+ ## Docker Compose
16
+
17
+ The `docker-compose.yml` at the repo root defines this application's containers. It references environment variables (`PAE_GATEWAY_URL`, `PAE_GATEWAY_SERVICE_ACCESS_SECRET`) from the core monorepo's `local/.env`.
18
+
19
+ To run this app in isolation: `platform standalone`
20
+
21
+ ## Common Commands
22
+
23
+ ```sh
24
+ npm install # Install dependencies
25
+ npm run dev # Start all services in dev mode
26
+ npm run build # Build all packages
27
+ npm run test # Run all tests
28
+ npm run changeset # Create a changeset before merging PRs
29
+ ```
30
+
31
+ ## Conventions
32
+
33
+ - Monorepo managed with Turborepo and npm workspaces
34
+ - NestJS services use `@bluealba/pae-service-nestjs-sdk`
35
+ - UI modules use `@bluealba/pae-ui-react-sdk` (webpack, single-spa)
36
+ - Tests: `*.spec.ts` for unit, `*.test.ts` for integration
@@ -0,0 +1,34 @@
1
+ # {{platformTitle}} Platform — Core
2
+
3
+ This is the **core monorepo** for the `{{platformDisplayName}}` platform (`@{{organizationName}}`), built on the Blue Alba Platform.
4
+
5
+ For any platform-related task, use the `/platform` skill — it routes to the correct specialized skill automatically.
6
+
7
+ ## Project Structure
8
+
9
+ - `services/` — Backend NestJS services
10
+ - `{{bootstrapServiceName}}/` — Core bootstrap service (registers modules, operations, and menus with the gateway)
11
+ - `ui/` — React micro-frontend modules (single-spa)
12
+ - `{{customizationUiName}}/` — Platform customization UI
13
+ - `local/` — Local development environment
14
+ - `.env` — Environment variables (secrets, DB credentials, gateway URLs)
15
+ - `platform-docker-compose.yml` — Platform infrastructure (nginx, postgres, gateway, shell-ui, admin-ui)
16
+ - `{{platformName}}-core-docker-compose.yml` — Core application services
17
+ - `ssl/` — Self-signed SSL certificates for local HTTPS
18
+
19
+ ## Common Commands
20
+
21
+ ```sh
22
+ npm install # Install dependencies
23
+ npm run dev # Start all services in dev mode
24
+ npm run build # Build all packages
25
+ npm run test # Run all tests
26
+ npm run changeset # Create a changeset before merging PRs
27
+ ```
28
+
29
+ ## Conventions
30
+
31
+ - Monorepo managed with Turborepo and npm workspaces
32
+ - NestJS services use `@bluealba/pae-service-nestjs-sdk`
33
+ - UI modules use `@bluealba/pae-ui-react-sdk` (webpack, single-spa)
34
+ - Tests: `*.spec.ts` for unit, `*.test.ts` for integration