Imported from benandfrank/galileo-framework-ways-of-work (
AGENTS.md). Install upstream withnpx skills add benandfrank/galileo-framework-ways-of-work. Copyright stays with the author.
galileo-framework-ways-of-work Development Guidelines
Static HTML/CSS/JS microsite visualizing Galileo Platform's socio-technical operating system. No build tools, no package manager - runs directly in browser.
Auto-generated from all feature plans. Last updated: 2025-01-12
Tech Stack
- HTML5 semantic markup with ARIA accessibility
- CSS3 with custom properties + Tailwind CDN (utilities only)
- Vanilla JavaScript (ES6+) - config-driven SVG generation
- GSAP 3.12.2 (CDN) for animations
- Google Fonts: Space Grotesk, Inter, Material Symbols Outlined
Development Commands
Local Development
Start local server:
python3 -m http.server 8000
# Open: http://localhost:8000/index.html
Or direct file open:
open index.html
Validation & Quality
HTML validation:
Paste index.html into: https://validator.w3.org/
CSS validation:
Paste style.css into: https://jigsaw.w3.org/css-validator/
JavaScript validation:
Use browser DevTools console for runtime errors
Accessibility audit:
Browser extensions: axe DevTools, WAVE, or Lighthouse
Manual Testing Checklist
- All 4 views render correctly (WOW, POM, STA, POV)
- Keyboard navigation: Tab, Enter, Space work on all interactive elements
- Mode toggles function (insight/stability loops, team overlays, residuality)
- Context map interactions (hover, click, detail panel)
- Mobile responsive behavior (640px, 768px, 1024px breakpoints)
- Browser compatibility: Chrome 90+, Firefox 88+, Safari 14+, Edge 90+
Code Style Guidelines
HTML
- Use semantic HTML5 elements:
<section>,<article>,<nav>,<header> - Indentation: 4 spaces (enforce consistently)
- ARIA attributes for interactive elements:
role="button"for clickable non-button elementsaria-labelfor icon-only buttons or SVG diagramsdata-focusable="true"for keyboard-accessible custom elements
- Use
data-*attributes for JavaScript hooks, not classes - Inline event handlers for simple toggles:
onclick="switchView('wow', event)" - Complex event logic: use
addEventListenerin script.js - Close all tags properly; maintain consistent quote style (double quotes)
CSS
- Indentation: 4 spaces
- Define reusable values in
:rootcustom properties (see Color Palette below) - Use Tailwind CDN classes for layout/spacing; custom CSS for components
- Component naming:
.component-modifierpattern (e.g.,.view-btn.active) - State classes:
.active,.revealed,.hidden,.opacity-0 - Colors: Reference CSS variables (
var(--blue),var(--slate-200)) - Transitions:
0.2s easefor hover/focus;0.5sfor view changes - Focus states: Required - use
:focus-visiblewith 2px cyan outline - Avoid
!importantunless overriding CDN defaults - Media queries: Target 640px (mobile), 768px (tablet), 1024px (desktop)
- Group styles: layout → colors → typography → interactive states
- Maintain existing glass-morphism design system:
.glass-panel { background: rgba(15, 23, 42, 0.78); backdrop-filter: blur(16px); border: 1px solid rgba(148, 163, 184, 0.35); }
JavaScript
- Indentation: 4 spaces
- Semicolons: Required (enforce on all statements)
- Function naming:
verbNounpattern (e.g.,buildWowDiagram,renderContextStressGrid,staSetMode) - Constants:
SCREAMING_SNAKE_CASE(e.g.,TRACK_COLORS,ENABLE_FOCUS) - Config objects:
camelCase(e.g.,wowConfig,contextStressModel) - Use
constby default;letonly when reassignment needed; avoidvar - Template literals for HTML/SVG generation
- Arrow functions for callbacks; named functions for top-level/exported functions
- Comments: Explain "why" not "what"; use
// Section dividersliberally - Event handlers:
- Simple: inline
onclick="functionName()" - Complex:
element.addEventListener('click', handler);
- Simple: inline
- Async operations: Use promises, avoid callback hell
- Error handling: Defensive checks (
if (!container) return;)
Config-Driven Architecture Pattern
ALL diagram data lives in config objects. Never hardcode content in rendering functions.
wowConfig: Discovery/Delivery/Operations tracks, loops, residual zonespomConfig: POM tracks and feedback loopsstaLayers: 5-layer architecture model definitionscontextStressModel: Context cards with stress scores and behavioral modesctxLayers,ctxDependencies,ctxFrictionIndicators: Ownership & friction datajourneyStepDetails: Customer value stream journey stepsroleActivitiesData: POV model role contributions per DDO track
To modify content: Edit config objects at top of script.js, not rendering functions.
SVG Generation Pattern
- Define data structure (config object)
- Create
build*Diagram()function - Use template literals with
map()for repeated elements - Define
<defs>for reusable gradients, markers, filters - Add interactivity via
addEventListenerordata-focusable
Design System - Color Palette
CSS Custom Properties (:root)
--bg: #0b0f19; /* Background dark */
--panel: rgba(15, 23, 42, 0.78); /* Glass panel background */
--stroke: rgba(148, 163, 184, 0.35); /* Border/stroke */
--blue: #3b82f6; /* Discovery track */
--green: #10b981; /* Delivery track */
--rose: #ec4899; /* Operations track */
--cyan: #06b6d4; /* Platform, stability loop */
--amber: #fbbf24; /* Enabling teams, warnings */
--purple: #a855f7; /* Complicated subsystem */
--slate-100: #e2e8f0; /* Primary text */
--slate-200: #cbd5e1; /* Secondary text */
--slate-300: #94a3b8; /* Tertiary text */
JavaScript Color Constants (TRACK_COLORS)
const TRACK_COLORS = {
discovery: { base: '#3b82f6', light: '#60a5fa', text: '#bfdbfe' },
delivery: { base: '#10b981', light: '#34d399', text: '#bbf7d0' },
operations: { base: '#ec4899', light: '#f472b6', text: '#fbcfe8' }
};
Usage: Colors auto-propagate through SVG gradients, strokes, and text when referenced from config.
File Organization
Project Structure
index.html # Page structure, 4 view containers, CDN links
style.css # Custom properties, glass-panel system, component styles
script.js # Config objects → rendering → event handlers
specs/ # Feature planning documents (not loaded by app)
001-context-map-ownership/
spec.md
plan.md
data-model.md
contracts/
.specify/ # Spec system templates and scripts
index.html
- Semantic structure:
<nav>→ view containers → modals - 4 main views:
#wow-view,#pom-view,#sta-view,#pov-view - CDN links: Tailwind, GSAP, Google Fonts
- Modal/overlay markup for journey detail, context detail
style.css
:rootcustom properties (lines 1-14)- Utility classes:
.glass-panel,.text-gradient,.view-switcher - View switching:
.view-container,.view-btn - Component styles:
.journey-card,.ctx-card,.ctx-pill - Responsive:
@media (max-width: 640px)for mobile
script.js (organized in sequential sections)
- Lines 1-46: Tailwind config, utilities, view switcher
- Lines 88-321: WOW diagram (config, build, modes, sequences)
- Lines 323-586: POM diagram (tracks, loops, team overlays, behavior modes)
- Lines 588-895: STA diagram (5 layers, DDO/teams/residuality modes, context map)
- Lines 897+: POV system (role bubbles, activities, contributions)
- Bottom:
DOMContentLoadedinitialization
specs/ folder
- Feature plans following the Specify framework
- Each spec has:
spec.md,plan.md,tasks.md,checklists/,contracts/ - Not loaded by the application; for documentation and planning only
How to Extend
Adding a New View
-
HTML: Add view container in
index.html<div id="new-view" class="view-container"> <!-- content --> </div> -
Navigation: Add button to
.view-switcher<button class="view-btn" onclick="switchView('new', event)">New View</button> -
Config: Create config object in
script.jsconst newConfig = { items: [...], modes: [...] }; -
Build function: Generate SVG or HTML
function buildNewDiagram() { const container = document.getElementById('new-diagram'); if (!container) return; container.innerHTML = `<svg>...</svg>`; } -
Initialize: Call in
DOMContentLoadeddocument.addEventListener('DOMContentLoaded', () => { buildNewDiagram(); // ... other init });
Modifying Existing Diagrams
Change track labels or colors:
Edit the config object (e.g., wowConfig.tracks[0].label) - colors auto-propagate through gradients and markers.
Add feedback loops:
Add to loops array in config with path data (from, cp, to), color, and marker ID.
Update context data:
Edit contextStressModel or ctxLayers - rendering functions automatically update based on config.
Modify journey steps:
Edit journeyStepDetails object with new steps, perspectives, signals, exceptions.
Adding Interactive Overlays
- Add SVG
<g>layer in build function withopacity-0class - Create toggle function:
function diagramSetMode(mode) { document.querySelectorAll('.overlay-layer').forEach(l => l.classList.add('opacity-0')); const target = document.getElementById(`layer-${mode}`); if (target) target.classList.remove('opacity-0'); } - Add mode buttons in HTML
- Bind to button click events
Modifying the Context Map
- Contexts defined in
buildStaContextMap()function - Layout uses calculated positions:
y = startY + layerIndex * layerHeight - To add context: Extend config and add to appropriate layer
- Hover states bound via
.forEach()loop after render - Click handlers open detail panel with DDO contributions
Accessibility Guidelines
Follow WCAG 2.1 AA standards as minimum.
Keyboard Navigation
- All interactive elements must be keyboard-accessible
- SVG elements: use
data-focusable="true"attribute - Support Tab (focus), Enter (activate), Space (activate)
- Call
ENABLE_FOCUS()utility after rendering interactive diagrams - Ensure logical tab order (matches visual layout)
Focus States
- All buttons/links must have
:focus-visiblestyles - Standard: 2px cyan outline with 2px offset
- Never remove focus outlines with
outline: nonewithout custom replacement
ARIA & Semantic Markup
role="button"for clickable non-button elements (e.g., SVG groups)aria-labelfor icon-only buttons and SVG diagramsrole="img"for complex SVG visualizations- Maintain heading hierarchy: h1 → h2 → h3 (no skipping)
- Use
<section>witharia-labelledbyfor major page regions
Screen Readers
- Use descriptive labels: "Discovery track - Clarify problem and context"
- Avoid generic text like "Click here" - use descriptive link text
- Ensure dynamic content changes are announced (use
aria-liveif needed) - Test with VoiceOver (macOS), NVDA (Windows), or JAWS
Browser Compatibility
Supported Browsers (Modern evergreen)
- Chrome 90+ (recommended for development)
- Firefox 88+
- Safari 14+
- Edge 90+
Required Features
- CSS Custom Properties (variables) - no fallback
- ES6+ JavaScript:
const,let, arrow functions, template literals,Map,Set - SVG 1.1 with inline styles
- IntersectionObserver API (with scroll fallback)
Graceful Degradation
IntersectionObserverfallback: usescheckReveal()on scroll event- CSS animations degrade gracefully if not supported (no FOUC)
- GSAP animations are progressive enhancement (site works without)
Git Workflow: Ship - Show - Ask
Use Conventional Commits format.
Commit Message Format
<type>(<scope>): <subject>
<body>
<footer>
Types: feat, fix, docs, style, refactor, perf, test, chore
Examples:
feat(wow): add residuality overlay mode to continuous flow diagram
fix(sta): correct context map click handler for mobile touch events
docs(agents): document SVG generation patterns and config structure
style(css): update glass-panel opacity for better readability
refactor(script): extract common SVG gradient generation to utility
Decision Framework
- Ship: Small fixes, documentation updates, obvious improvements (commit & push)
- Show: New features, refactoring, style changes (commit, push, notify team)
- Ask: Breaking changes, architecture decisions, major features (discuss before implementing)
Code Review
- Another agent or team member should review before merging to main
- Review checklist:
- Code follows style guidelines (indentation, semicolons, naming)
- Accessibility requirements met (keyboard nav, ARIA, focus states)
- Browser compatibility maintained
- Config-driven pattern respected (no hardcoded content)
- Manual testing checklist completed
Spec System (Specify Framework)
This project uses the Specify framework for feature planning and documentation.
Structure
Each feature lives in specs/<feature-id>/:
spec.md: Feature specification (problem, solution, constraints)plan.md: Implementation plan (phases, tasks, risks)tasks.md: Granular task breakdownchecklists/requirements.md: Requirements checklistcontracts/: API contracts, data models (YAML/JSON)
Templates
Located in .specify/templates/:
spec-template.mdplan-template.mdtasks-template.mdchecklist-template.mdagent-file-template.md
Scripts
Located in .specify/scripts/bash/:
create-new-feature.sh: Scaffold new feature from templatessetup-plan.sh: Initialize planning artifactsupdate-agent-context.sh: Update AGENTS.md with plan insights
Usage
# Create new feature spec
./.specify/scripts/bash/create-new-feature.sh <feature-id>
Specs are documentation artifacts - they are not loaded or executed by the application.
Recent Changes
- 001-context-map-ownership: Added plan artifacts and static-stack guidance
- 2025-01-12: Enhanced AGENTS.md with comprehensive code style, accessibility, and extension guides