Spaces:
Sleeping
Download docs/demo-script.md from ccjulia/zero_friction: direct link, hf CLI and curl.
- Browser
- Download file 6.75 kB
-
https://huggingface.co/spaces/ccjulia/zero_friction/resolve/main/docs/demo-script.md
- Command line
-
hf download hf://spaces/ccjulia/zero_friction/docs/demo-script.md
-
curl -L -o demo-script.md https://huggingface.co/spaces/ccjulia/zero_friction/resolve/main/docs/demo-script.md
Demo Script β PulseFabric Monitor
This script contains 3 live demo scenarios. Each scenario is designed to be executed in Copilot Chat during a presentation.
Prerequisites:
- Codespace is running (or local dev with
npm run dev) - Both servers are up: Angular on port 4200, json-server on port 3000
- Dashboard is visible in the browser at
http://localhost:4200
Scenario 1: Add a KPI Card β "Active Sessions"
Story
"Our operations team wants to see how many users are currently connected. Let's add an Active Sessions KPI card to the dashboard β live, using only a Copilot Chat prompt."
Copilot Chat Prompt
Copy and paste this into Copilot Chat:
Add a new KPI card called Active Sessions showing the number 14,200 with a trending up indicator. Put it next to the existing KPI cards. Follow all repo rules in copilot-instructions.md.
Expected AI Actions
- db.json β Add a new entry to the
kpisarray:{ "id": "active-sessions", "title": "Active Sessions", "value": "14,200", "trend": "up", "trendLabel": "+8.3% from last hour", "icon": "group" } - api.models.ts β No change needed (KpiDto already covers the shape)
- dashboard-api.service.ts β No change needed (getKpis already returns the array)
- UI β No change needed (the
@forloop renders it automatically)
Expected Result
- A fifth KPI card appears in the grid: "Active Sessions β 14,200 β trending up"
- The card uses the same
<app-kpi-card>component as existing cards ng buildstill passes
What to Point Out
- Only
db.jsonwas changed β the AI understood the data-first pattern - No new component was created β the existing KPI card is input-driven
- The AI followed the implementation order: db.json β model β service β UI
Scenario 2: Add a CPU Load Chart to AI Drop Zone
Story
"We have a drop zone at the bottom of the dashboard reserved for AI-generated widgets. Let's ask Copilot to fill it with a CPU Load by Device bar chart."
Copilot Chat Prompt
Copy and paste this into Copilot Chat:
Add a CPU Load by Device bar chart to the AI Widget Drop Zone at the bottom of the dashboard. Show 5 devices with fake CPU percentage data. Add the data to db.json first, then create the chart. Follow all repo rules in copilot-instructions.md.
Expected AI Actions
- db.json β Add a new
cpuLoadcollection (replacing the empty array):"cpuLoad": [ { "device": "Server-A1", "load": 72 }, { "device": "Server-B2", "load": 85 }, { "device": "Router-C3", "load": 45 }, { "device": "Switch-D4", "load": 91 }, { "device": "Gateway-E5", "load": 63 } ] - api.models.ts β Add
CpuLoadDtointerface:export interface CpuLoadDto { device: string; load: number; } - dashboard-api.service.ts β Add
getCpuLoad()method - chart-config.factory.ts β Add
buildCpuLoadOption()factory function using PALETTE colors - dashboard.ts β Add signal + service call in forkJoin
- dashboard.html β Add
<app-chart-widget>inside or near#ai-dropzone
Expected Result
- A bar chart titled "CPU Load by Device" appears in the AI Widget Drop Zone area
- 5 bars showing percentage values for each device
- Colors come from the PALETTE constant (no raw hex in factory function)
ng buildstill passes
What to Point Out
- The AI followed all 6 steps of the implementation order
- No new component was created β the existing
ChartWidgetwas reused - Chart colors use the PALETTE constant, not hardcoded hex values
- The factory function is pure (no side effects)
Fallback
If this scenario fails live, switch to the demo-completed branch:
git stash && git checkout demo-completed
Then restart the dev servers with npm run dev.
Scenario 3: Add an AI Security Recommendations Widget
Story
"The security team wants an AI-powered recommendations panel. This requires a brand new component since it doesn't fit the KPI card or chart widget pattern. Let's see if Copilot can build it from scratch while following all 20 rules."
Copilot Chat Prompt
Copy and paste this into Copilot Chat:
Add a new AI Security Recommendations widget to the dashboard. It should show 3 recommendations, each with a priority level (High, Medium, Low) and a short description. Add the data to db.json first, then build the component. Follow all repo rules in copilot-instructions.md.
Expected AI Actions
- db.json β Add a
securityRecommendationscollection:"securityRecommendations": [ { "id": 1, "priority": "high", "description": "Rotate API keys for production cluster β last rotated 90+ days ago" }, { "id": 2, "priority": "medium", "description": "Enable MFA for 3 service accounts in US-East region" }, { "id": 3, "priority": "low", "description": "Update TLS certificates to use SHA-256 on staging endpoints" } ] - api.models.ts β Add
SecurityRecommendationDtointerface - dashboard-api.service.ts β Add
getSecurityRecommendations()method - New component β Create
security-recommendations/underdashboard/:security-recommendations.tsβ standalone, input-drivensecurity-recommendations.htmlβ flat HTML with Material componentssecurity-recommendations.scssβ uses--mat-sys-*and--pf-*tokens
- dashboard.ts β Import component, fetch data, store in signal
- dashboard.html β Add
<app-security-recommendations>tag
Expected Result
- A new card-style widget appears showing 3 security recommendations
- Each item shows a priority badge (High/Medium/Low) with appropriate color
- The component uses Material 3 tokens for all styling
ng buildstill passes
What to Point Out
- The AI created a new component because the data doesn't fit existing patterns
- It still followed the strict order: db.json β model β service β UI
- TS, HTML, SCSS are in separate files (Rule 1)
- The component is standalone and input-driven (Rules 4, 11)
- No
anytype anywhere (Rule 3/19)
Tips for Presenters
- Keep the terminal visible β the audience should see file changes in real time
- Show the Source Control diff β highlight which files Copilot changed
- Run
ng buildafter each scenario to prove the code compiles - Refresh the browser after scenario 1 (db.json change may need a server restart)
- Have the
demo-completedbranch ready as a fallback for scenario 2 - Point out the rules β open
copilot-instructions.mdto show what the AI is following