This skill provides the automated setup for a lightweight, build-less web dashboard. It relies entirely on Alpine.js for state management and Vanilla CSS for styling. It eschews complex frameworks (like SvelteKit) and utility-class libraries in favor of a "Single-Scroll Artifact" or a "Static Triad".
This dashboard is designed to present the user's Fulcra data, which can be viewed locally or published publicly. By default, it runs on localhost using a simple Python static server. Please note that the dashboard includes and relies on scripts fetched from public CDNs (such as Alpine.js, D3.js, Plotly, etc.) for visualizing and presenting the data.
Important: The local working application root must never be published to the public internet directly, as it often contains intermediate files and full datasets. If the user wishes to share a dashboard, you must deploy only the isolated public/ directory that contains only the specific data and files intended for publication.
The primary and preferred method for delivering this view is generating a robust HTML application locally (via the static triad) and optionally publishing it (e.g., via Surge). Our goal is to make something impressive.
However, you must be aware of the user's intent:
fulcra-get-started flow), give faster delivery more weight.If the primary static triad and deployment routes are truly not viable in the current environment, you must gracefully fall back to alternative delivery mechanisms. Alternative options include (but are not limited to):
https://gofastmcp.com/apps/prefab): Using an external rapid-UI generator if configured.matplotlib) to render a static image chart summarizing the data.When constructing this dashboard, you must follow these strict architectural rules to prevent the file from becoming a tangled, unmaintainable monolith:
Monumental Landmarks (Banner Comments): Divide the HTML file into distinct provinces using highly visible comments. This ensures you (the agent) can navigate and edit surgical blocks safely. html
<!-- ========================================== -->
<!-- 🏛️ PROVINCE: DASHBOARD LAYOUT & UI -->
<!-- ========================================== -->
<main> ... </main>
<!-- ========================================== -->
<!-- 🧠 PROVINCE: ALPINE.JS STATE & LOGIC -->
<!-- ========================================== -->
<script> ... </script>
<!-- ========================================== -->
<!-- 🎨 PROVINCE: D3.js VISUALIZATIONS -->
<!-- ========================================== -->
<script> ... </script>
The Separation of Domains: Do not write massive inline Alpine logic (e.g., x-data="{ huge object }"). You must use Alpine.data() within the "Alpine.js State & Logic" province to extract the logic into a clean script block. The HTML should only contain the bindings ( x-data="dashboard()", x-text, x-show, etc.).
The Static Triad (Escape Hatch): While a single index.html is preferred, if the dashboard grows too vast, you may split it into three files:
index.html (Structure & Semantic HTML)app.js (Alpine Alpine.data() and D3 functions)styles.css (Custom overriding aesthetics)
No build step is allowed.When the user requests more complex or varied visualizations, you have two primary avenues:
The default template includes basic charts, but the "Static Triad" architecture gracefully supports highly advanced, multi-dimensional visualizations—including interactive 3D WebGL scenes—without ever needing a build step.
Workflow: Include the required CDN library (e.g., d3.js, plotly.js, d3-cloud) in index.html. Add a new rendering method inside the Alpine.data() block (or the script tag) to bind the .jsonl timeline data to the DOM.
Supported Paradigms & Chart Types: You can expand the dashboard with various chart types tailored to the user's data. Do not restrict yourself to these examples; you are encouraged to pull in any chart type or lightweight CDN library that best fits the specific data. Examples include:
d3-cloud or similar lightweight libraries) or Tag Clouds to show the frequency of text terms, keywords, or activity logs natively in the browser.Styling Integration: Ensure advanced charting libraries blend seamlessly with the user's chosen theme. Explicitly configure library backgrounds and grid lines to be transparent or translucent so the CSS glassmorphism, gradients, and custom themes shine through. Increase container dimensions (e.g., .chart-tall { height: 400px; }) to give 3D scenes enough physical space to be comfortably rotated by the user.
Constraint: Keep the rendering code clean and modular. Isolate chart rendering functions so they can be easily re-rendered on window resize or data updates.
For highly complex, compute-intensive, or specialized visual outputs (like word clouds, network graphs, or composite rasterized images), leverage the Python backend.
server.py (or create a secondary Python worker script) to read the local Fulcra .jsonl data, process it using libraries like matplotlib, seaborn, or networkx, and output a static image (e.g., .png, .svg) or pre-calculated JSON structure into the dashboard directory.index.html to reference the generated image (e.g., <img src="/generated-network.png">) or have the Alpine state fetch the advanced JSON artifact.Before proceeding with the initial dashboard generation, you must explicitly declare your intentions and request the user's permission for the following actions:
Wait for the user's explicit consent before proceeding with data ingestion or dashboard scaffolding. Once consent is granted for a specific project or workspace, you do not need to ask again for subsequent data updates or regenerations.
When a user requests to "set up the web app" or "create a dashboard for the Fulcra skills" (or if they are transitioning from the fulcradynamics/agent-skills/fulcra-get-started skill), you should execute the setup script provided by this skill.
bash
# Run the setup script to scaffold the Alpine dashboard
./scripts/setup-dashboard.sh <target-directory>
If no <target-directory> is provided, it defaults to creating a fulcra-dashboard folder in the current working directory.
Contextual Awareness (Standalone vs. Post-Onboarding):
Do not assume this skill is always run immediately after fulcra-get-started.
uv tool run fulcra-api catalog to check for user annotations and discuss options before proceeding).Scaffold: The script copies a clean, un-styled Alpine.js dashboard template into the target directory.
Data Ingestion: Automatically fetch the user's relevant Fulcra data using the fulcra-api CLI (after securing the permissions mentioned above).
uv tool run fulcra-api catalog to discover available data. Note: Prioritize user-configured data over passive metrics (like step count). Explicitly filter for items where categories includes "user_configured", or where the id follows the format *Annotation/<UUID> (e.g., ScaleAnnotation/1234-abcd...).uv tool run fulcra-api get-records "ScaleAnnotation/<UUID>" "30 days" > timeline_name.jsonl).data.json timelines array so your background work is visualized alongside their personal data.data-updates CLI command for the timeline (e.g., uv tool run fulcra-api data-updates "30 days" > data_updates.json), explicitly move it to public/data_updates.json, and link it as "recordsProcessed": "data_updates.json" in your config to populate the "Your data" chart. Do not skip this step..jsonl and .json files to the public/ directory so the frontend can read them.public/data.json config file acts as a manifest. It should map your layout to the .jsonl files in the public/ directory, and you must include the annotation description in the timeline block, like this: {"summary": "An entertaining, thematic overview of the current data...", "timelines": [{"id": "...", "title": "...", "description": "The description from the catalog...", "icon": "...", "color": "...", "data": "timeline_name.jsonl"}], "recordsProcessed": "records_processed.jsonl"}. Crucial: For the "summary" field, you must read the downloaded .jsonl data and write an interesting, entertaining, and highly thematic text summary of the actual real-world activity. Adopt the persona of the dashboard's theme (e.g., an observatory log, a captain's entry, a baker's notes) to make the data narrative fun and engaging. Do not write boring meta-descriptions or dry analytical text..jsonl files and aggregate records for the charts natively on init().Theming & Visualization:
index.html directly to rewrite the main title, subtitle, and all component headers to fit the theme (e.g., change "Fulcra Dashboard" to "The Cybernetic Core" and "Records Processed" to "Baguettes Baked"). Replace all default emojis (like 📊 or 🛰️) with theme-appropriate icons..layout-container for spacing. Keep this structure intact. Limit your CSS edits to colors (by updating the root variables), fonts, borders, box-shadows, and backgrounds.image_generate tool. Save it to the folder and reference it via an <img> tag in the dashboard header. Style Directive: The image must be extremely high-quality and perfectly cohesive with the user's chosen theme. Whether the vibe calls for retro 2D pixel art, a minimalist vector illustration, or a sleek 3D render, ensure the specific art style, color palette, and lighting strictly match the CSS variables and overall aesthetic you are building.min-height: 250px to 350px) so the core telemetry data remains visible "above the fold."tsparticles for rich particle systems like starfields or embers) or author complex, multi-layered CSS/SVG animations that genuinely delight the user.Git Repository Initialization:
git is installed. Suggest 1 or 2 fun repository names based on their theme.git init && git add . && git commit -m "Initial commit"). Do not push to GitHub yet.Run & Verify:
Start the local Python server to preview the dashboard: bash
cd <target-directory>
python3 server.py 8081 > dev.log 2>&1 &
Provide the user with the localhost link.
Public Publication (Requires Consent & Preview):
The user may wish to publish a version of their dashboard to the public internet.
The built-in public directory: Because the dashboard is already structured with a public/ directory that only contains the UI and explicitly copied data files, you do not need to create a new folder from scratch.
public/ contains only the specific data files needed by the frontend, and that any raw data dumps, dev.log, or python scripts remain safely outside it in the root directory.Crucial Warning & Confirmation: Directly at the point of publishing (before running any deployment tools), you must present a clear warning to the user. State exactly which data files are inside the public/ directory and will be made public, and explicitly ask for their final confirmation to proceed with the deployment.
Wait for their explicit confirmation before proceeding.
If they agree, offer them three deployment options, ordered by ease of use:
npm install -g surge<meta name="robots" content="noindex, nofollow"> into the <head> of public/index.html to prevent search engine indexing. (Surge subdomains are not publicly indexed or discoverable by default, so this combination provides security through obscurity and explicit opt-out).surge . <project-name>-<random-suffix>.surge.sh inside the public/ directory.https:// URL.gh (GitHub CLI) is installed and authenticated ( gh auth status).public/ directory, initialize git, create the repository, and push ( git init && git add . && git commit -m "Initial public export" && gh repo create <name> --public --source=. --remote=origin --push).gh api repos/{owner}/{repo}/pages -X POST -f "source[branch]=main" -f "source[path]=/".https://<username>.github.io/<repo>/.npm i -g vercelvercel deploy --prod inside the public/ directory.Execute the chosen deployment path and provide the user with the final public URL.
Handoff & Next Steps:
server.py) to analyze their data before sending it to the frontend.