@slycode/slycode 0.1.14 → 0.1.15
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/dist/bridge/session-manager.js +1 -8
- package/dist/bridge/session-manager.js.map +1 -1
- package/dist/store/skills/context-priming/references/area-index.md +121 -68
- package/{templates/store/skills/context-priming/references → dist/store/skills/context-priming}/references/areas/feature-guide.md +44 -18
- package/dist/store/skills/context-priming/references/areas/messaging.md +108 -34
- package/dist/store/skills/context-priming/references/areas/scripts-deployment.md +61 -16
- package/dist/store/skills/context-priming/references/areas/skills.md +99 -38
- package/{templates/updates/skills/context-priming/references → dist/store/skills/context-priming}/references/areas/terminal-actions.md +1 -1
- package/dist/store/skills/context-priming/references/areas/terminal-bridge.md +74 -42
- package/dist/store/skills/context-priming/references/areas/web-frontend.md +259 -74
- package/dist/web/.next/BUILD_ID +1 -1
- package/dist/web/.next/build-manifest.json +2 -2
- package/dist/web/.next/server/app/_global-error.html +2 -2
- package/dist/web/.next/server/app/_global-error.rsc +1 -1
- package/dist/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/dist/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dist/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dist/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/web/.next/server/app/_not-found.html +1 -1
- package/dist/web/.next/server/app/_not-found.rsc +1 -1
- package/dist/web/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/dist/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/dist/web/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/dist/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/dist/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/dist/web/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/dist/web/.next/server/pages/404.html +1 -1
- package/dist/web/.next/server/pages/500.html +2 -2
- package/lib/cli/sync.d.ts +7 -0
- package/lib/cli/sync.d.ts.map +1 -1
- package/lib/cli/sync.js +32 -0
- package/lib/cli/sync.js.map +1 -1
- package/lib/cli/update.d.ts.map +1 -1
- package/lib/cli/update.js +9 -0
- package/lib/cli/update.js.map +1 -1
- package/package.json +1 -1
- package/templates/kanban-seed.json +1 -1
- package/templates/store/skills/context-priming/references/area-index.md +121 -68
- package/templates/{updates/skills/context-priming/references → store/skills/context-priming}/references/areas/feature-guide.md +44 -18
- package/templates/store/skills/context-priming/references/areas/messaging.md +108 -34
- package/templates/store/skills/context-priming/references/areas/scripts-deployment.md +61 -16
- package/templates/store/skills/context-priming/references/areas/skills.md +99 -38
- package/{dist/store/skills/context-priming/references → templates/store/skills/context-priming}/references/areas/terminal-actions.md +1 -1
- package/templates/store/skills/context-priming/references/areas/terminal-bridge.md +74 -42
- package/templates/store/skills/context-priming/references/areas/web-frontend.md +259 -74
- package/templates/updates/skills/context-priming/references/area-index.md +121 -68
- package/{dist/store/skills/context-priming/references → templates/updates/skills/context-priming}/references/areas/feature-guide.md +44 -18
- package/templates/updates/skills/context-priming/references/areas/messaging.md +108 -34
- package/templates/updates/skills/context-priming/references/areas/scripts-deployment.md +61 -16
- package/templates/updates/skills/context-priming/references/areas/skills.md +99 -38
- package/templates/{store/skills/context-priming/references → updates/skills/context-priming}/references/areas/terminal-actions.md +1 -1
- package/templates/updates/skills/context-priming/references/areas/terminal-bridge.md +74 -42
- package/templates/updates/skills/context-priming/references/areas/web-frontend.md +259 -74
- package/dist/store/skills/context-priming/references/areas/claude-actions.md +0 -120
- package/dist/store/skills/context-priming/references/references/area-index.md +0 -152
- package/dist/store/skills/context-priming/references/references/areas/messaging.md +0 -251
- package/dist/store/skills/context-priming/references/references/areas/scripts-deployment.md +0 -183
- package/dist/store/skills/context-priming/references/references/areas/skills.md +0 -196
- package/dist/store/skills/context-priming/references/references/areas/terminal-bridge.md +0 -263
- package/dist/store/skills/context-priming/references/references/areas/web-frontend.md +0 -437
- package/dist/store/skills/context-priming/references/references/maintenance.md +0 -128
- package/templates/store/skills/context-priming/references/areas/claude-actions.md +0 -120
- package/templates/store/skills/context-priming/references/references/area-index.md +0 -152
- package/templates/store/skills/context-priming/references/references/areas/messaging.md +0 -251
- package/templates/store/skills/context-priming/references/references/areas/scripts-deployment.md +0 -183
- package/templates/store/skills/context-priming/references/references/areas/skills.md +0 -196
- package/templates/store/skills/context-priming/references/references/areas/terminal-bridge.md +0 -263
- package/templates/store/skills/context-priming/references/references/areas/web-frontend.md +0 -437
- package/templates/store/skills/context-priming/references/references/maintenance.md +0 -128
- package/templates/updates/skills/context-priming/references/areas/claude-actions.md +0 -120
- package/templates/updates/skills/context-priming/references/references/area-index.md +0 -152
- package/templates/updates/skills/context-priming/references/references/areas/messaging.md +0 -251
- package/templates/updates/skills/context-priming/references/references/areas/scripts-deployment.md +0 -183
- package/templates/updates/skills/context-priming/references/references/areas/skills.md +0 -196
- package/templates/updates/skills/context-priming/references/references/areas/terminal-bridge.md +0 -263
- package/templates/updates/skills/context-priming/references/references/areas/web-frontend.md +0 -437
- package/templates/updates/skills/context-priming/references/references/maintenance.md +0 -128
- /package/dist/web/.next/static/{wMUaNt62q8VYjpVs4m1_t → sAL_sqPSOaOIrKiwdPzL2}/_buildManifest.js +0 -0
- /package/dist/web/.next/static/{wMUaNt62q8VYjpVs4m1_t → sAL_sqPSOaOIrKiwdPzL2}/_clientMiddlewareManifest.json +0 -0
- /package/dist/web/.next/static/{wMUaNt62q8VYjpVs4m1_t → sAL_sqPSOaOIrKiwdPzL2}/_ssgManifest.js +0 -0
|
@@ -1,437 +0,0 @@
|
|
|
1
|
-
# Web Frontend
|
|
2
|
-
|
|
3
|
-
Updated: 2026-03-13
|
|
4
|
-
|
|
5
|
-
## Overview
|
|
6
|
-
|
|
7
|
-
Next.js 16 command center for project management. Features project cards with health scoring, kanban boards with drag-drop, card modals with agent notes and automation config, command configuration, system health monitoring, cross-project toolkit/asset management, global search, activity feed, project scaffolding, server-side automation scheduler, voice-to-text input, image paste to terminal, responsive mobile layout, and graceful reconnection handling. Neon-minimalist theme (SlyCode Neon) with Tailwind CSS v4, featuring lane-colored gradients, SVG noise textures, shadow depth system, glassmorphism cards, priority-colored glows, and theme-aware terminal styling. JetBrains Mono font (`--font-jetbrains-mono`) for card numbers and checklist counts.
|
|
8
|
-
|
|
9
|
-
## Key Files
|
|
10
|
-
|
|
11
|
-
### Pages & Layout
|
|
12
|
-
- `web/src/app/page.tsx` - Home dashboard, lists projects from registry
|
|
13
|
-
- `web/src/app/project/[id]/page.tsx` - Project detail page with kanban
|
|
14
|
-
- `web/src/components/ProjectPageClient.tsx` - Client wrapper for project pages, global terminal activity polling
|
|
15
|
-
- `web/src/components/ProjectView.tsx` - Project view wrapper, manages archive toggle and active-automation-indicator state
|
|
16
|
-
|
|
17
|
-
### Core Components
|
|
18
|
-
- `web/src/components/Dashboard.tsx` - "Code Den" + CLI Assets tabs (with description subtitles), project card grid, global search, number-key shortcuts, footer with version display
|
|
19
|
-
- `web/src/components/ProjectKanban.tsx` - Kanban board container, drag-drop logic, context menu state, onActiveAutomationsChange callback to ProjectView
|
|
20
|
-
- `web/src/components/KanbanColumn.tsx` - Stage columns, flex-grow layout (min-w-72 max-w-96) for wide viewports
|
|
21
|
-
- `web/src/components/KanbanCardItem.tsx` - Individual card with glassmorphic style, priority-colored hover glow, card numbers, type emojis, compact mode for done stage, right-click onContextMenu trigger
|
|
22
|
-
- `web/src/components/CardModal.tsx` - Full card editor with dynamic tabs, agent notes, automation toggle (disabled for archived cards), archive toggle (disabled for automation cards), copy title button, edit session protection, suppressAutoTerminal prop
|
|
23
|
-
- `web/src/components/AutomationConfig.tsx` - Cron builder UI for card automation settings (schedule, provider, fresh session, report toggle, Run Now button with loading/success/error feedback). No prompt field — card description is the automation prompt. All nextRun calculation server-side: `refreshNextRun()` POSTs to /api/scheduler `nextRun` action on enable toggle, schedule type switch, builder changes, and raw cron input.
|
|
24
|
-
- `web/src/components/AutomationsScreen.tsx` - Full-screen automations view (max-w-5xl, 2-col grid), countdown timers, tag grouping, chevron texture cards with hazard stripe
|
|
25
|
-
- `web/src/components/ProjectHeader.tsx` - Header with Commands (badge for action updates), Archive toggle, Automations toggle (pulses when automations active), HealthMonitor. Polls /api/cli-assets/updates for actionEntries count. Invalidates actions cache on SlyActionConfigModal close.
|
|
26
|
-
- `web/src/components/ContextMenu.tsx` - Portal-based context menu with keyboard navigation (Arrow keys, Enter, Escape), submenus (150ms hover delay), viewport-aware positioning, lane-colored accent bar
|
|
27
|
-
- `web/src/components/ConfirmDialog.tsx` - Confirmation dialog for destructive actions (delete), z-60 overlay
|
|
28
|
-
|
|
29
|
-
### Project Management
|
|
30
|
-
- `web/src/components/ProjectCard.tsx` - Compact project card with drag handle, truncated title, health dot, platform badges, edit/delete
|
|
31
|
-
- `web/src/components/AddProjectModal.tsx` - Multi-phase project creation wizard (details → providers → review → creating → summary) with scaffold preview grouped by purpose
|
|
32
|
-
- `web/src/components/HealthDot.tsx` - Health score indicator with tooltip (green/amber/red)
|
|
33
|
-
- `web/src/components/PlatformBadges.tsx` - Detected AI platform badges (Claude, Gemini, Codex)
|
|
34
|
-
- `web/src/components/SearchBar.tsx` - Global search across cards, active session display when query empty
|
|
35
|
-
|
|
36
|
-
### Terminal & Commands
|
|
37
|
-
- `web/src/components/ClaudeTerminalPanel.tsx` - Reusable terminal with provider button group, single actions prop (splits by placement), card area filtering, image paste handling with screenshot toast, instruction file warning with opt-out checkbox
|
|
38
|
-
- `web/src/components/Terminal.tsx` - xterm.js terminal with ConnectionManager integration, Ctrl+V interception for image paste (falls back to text paste), resize broadcast with echo-loop suppression
|
|
39
|
-
- `web/src/components/SlyActionConfigModal.tsx` - Two-tab command config: Commands tab (edit definitions + placement) and Classes tab (assign + reorder per class), with Action Assistant terminal. Voice-integrated, Escape passes through to terminal when assistant is expanded. Shows "Updates" tab (with badge count) when action updates available.
|
|
40
|
-
- `web/src/components/ActionUpdatesModal.tsx` - Dedicated modal for action update delivery: accept/dismiss/preview with inline diff viewer (reuses SkillDiffViewer patterns)
|
|
41
|
-
- `web/src/components/GlobalClaudePanel.tsx` - Floating panel for project-wide session, handles terminal prompt events (auto-start/send), voice-aware click-outside (prevents collapse during recording)
|
|
42
|
-
|
|
43
|
-
### Voice Input
|
|
44
|
-
- `web/src/contexts/VoiceContext.tsx` - Centralized voice state via React Context (`useVoice()` hook). Voice claim system (claimant model), settings management, terminal registry, floating widget rendering. VoiceProvider wraps entire app in layout.tsx.
|
|
45
|
-
- `web/src/components/VoiceControlBar.tsx` - Voice recording UI in CardModal header (mic button, timer, controls, state machine)
|
|
46
|
-
- `web/src/components/VoiceSettingsPopover.tsx` - Settings gear popover (keyboard shortcuts, auto-submit toggle, max recording length)
|
|
47
|
-
- `web/src/components/VoiceErrorPopup.tsx` - Error popup with retry/clear when transcription fails
|
|
48
|
-
- `web/src/components/FloatingVoiceWidget.tsx` - Floating portal-based voice widget shown at bottom-right when no modal claims voice control (recording/paused/transcribing states)
|
|
49
|
-
- `web/src/components/ThemeToggle.tsx` - Light/dark theme toggle using localStorage (`slycode-theme`), imported by Dashboard
|
|
50
|
-
|
|
51
|
-
### CLI Assets
|
|
52
|
-
- `web/src/components/CliAssetsTab.tsx` - Asset management with Projects/Store/Updates views, provider sub-tabs, pending changes bar, 60s update polling, ImportDialog for skill imports (SKILL.md-only vs full folder)
|
|
53
|
-
- `web/src/components/AssetMatrix.tsx` - Cross-project asset deployment matrix with Fix/Ignore actions
|
|
54
|
-
- `web/src/components/AssetViewer.tsx` - Modal viewer for asset content with frontmatter display (version, updated, description — no provider field), project-aware loading
|
|
55
|
-
- `web/src/components/StoreView.tsx` - Store tab: flat canonical store (store/skills/, store/agents/), Delete/Fix/Modify actions
|
|
56
|
-
- `web/src/components/UpdatesView.tsx` - Update delivery: shows available updates from updates/ folder, accept/dismiss/preview workflow
|
|
57
|
-
- `web/src/components/SkillDiffViewer.tsx` - Side-by-side diff modal for comparing skill versions with line-level highlighting
|
|
58
|
-
- `web/src/components/AssetAssistant.tsx` - Modal for LLM-guided asset creation/modification via terminal prompts
|
|
59
|
-
|
|
60
|
-
### Version Updates
|
|
61
|
-
- `web/src/components/VersionUpdateToast.tsx` - Bottom-left toast for npm version updates (6-hour poll, daily dismiss)
|
|
62
|
-
- `web/src/app/api/version-check/route.ts` - npm version check endpoint
|
|
63
|
-
|
|
64
|
-
### Automation & Scheduling
|
|
65
|
-
- `web/src/lib/scheduler.ts` - Server-side cron engine (croner), 30s check interval, triggerAutomation() bridge integration, timezone-aware via TZ env var, buildRunHeader() for rich automation context, loadParentEnv() for .env loading (skips BRIDGE_URL/BRIDGE_PORT to avoid dev/prod port mismatch), updateCardAutomation() exported for manual trigger persistence. Split fresh/resume paths: fresh sessions use checkSessionAlive() (20s liveness check, no retry), resume sessions use waitForActivity() with retry. fetchWithTimeout() (10s) wraps all bridge calls. Soft failure handling: only sends Telegram notification on hard failures (crash, HTTP error), not detection uncertainty. Grace window (GRACE_WINDOW_MS = 60s): isDue() clamps lastRun reference to at most 60s ago, preventing stale ticks from long-disabled automations firing immediately on re-enable. New automations (no lastRun) always wait for first tick. HMR-safe: state + timer stored in `globalThis` via `__scheduler_state__`/`__scheduler_timer__` keys, `startScheduler()` clears stale intervals before creating new one. `getNextRun()` exported for use by kanban API and scheduler route.
|
|
66
|
-
- `web/src/lib/cron-utils.ts` - Shared cronToHumanReadable() utility (extracted from duplicate code in AutomationConfig + AutomationsScreen), timezone abbreviation suffix support. `getNextRunISO()` removed — all nextRun calculation now server-side via scheduler.ts `getNextRun()`.
|
|
67
|
-
- `web/src/instrumentation.ts` - Next.js instrumentation hook, auto-starts scheduler on server boot
|
|
68
|
-
- `web/src/app/api/scheduler/route.ts` - GET status + timezone info (auto-start), POST start/stop/trigger/nextRun. Manual trigger now persists lastRun/lastResult via updateCardAutomation(). `nextRun` action computes next cron run on demand (used by AutomationConfig `refreshNextRun()`).
|
|
69
|
-
|
|
70
|
-
### Activity & Content
|
|
71
|
-
- `web/src/components/ActivityFeed.tsx` - Collapsible event log with day grouping and stage indicators
|
|
72
|
-
- `web/src/components/MarkdownContent.tsx` - Markdown renderer using react-markdown with GFM support
|
|
73
|
-
|
|
74
|
-
### Health & Connection
|
|
75
|
-
- `web/src/components/HealthMonitor.tsx` - System stats widget (CPU, memory, terminals), click-to-toggle expand (mobile: compact dot + count, desktop: full bars)
|
|
76
|
-
- `web/src/components/ConnectionStatusIndicator.tsx` - Reconnection toast indicator with debounced disconnect and success timeout cleanup (unmount-safe refs)
|
|
77
|
-
- `web/src/lib/connection-manager.ts` - Centralized SSE reconnection with Page Visibility API
|
|
78
|
-
|
|
79
|
-
### Hooks
|
|
80
|
-
- `web/src/hooks/useConnectionStatus.ts` - Hook for connection state subscription
|
|
81
|
-
- `web/src/hooks/useKeyboardShortcuts.ts` - Keyboard navigation (1-9 project jump, Escape)
|
|
82
|
-
- `web/src/hooks/useSlyActionsConfig.ts` - Polling-based commands config loader (30s intervals, serves v3 format with classAssignments)
|
|
83
|
-
- `web/src/hooks/useVoiceRecorder.ts` - Core voice hook: MediaRecorder lifecycle, state machine, timer, pause/resume, max-length auto-pause, audio blob management
|
|
84
|
-
- `web/src/hooks/useVoiceShortcuts.ts` - Voice keyboard shortcuts (context-dependent: idle vs recording states), configurable via settings
|
|
85
|
-
- `web/src/hooks/useSettings.ts` - Generic settings hook for reading/writing data/settings.json via API (on-demand fetch, optimistic updates)
|
|
86
|
-
- `web/src/hooks/usePolling.ts` - Generic polling hook
|
|
87
|
-
|
|
88
|
-
### Utilities
|
|
89
|
-
- `web/src/lib/types.ts` - All shared types (see Data Models)
|
|
90
|
-
- `web/src/lib/sly-actions.ts` - getActionsForClass(), renderTemplate(), buildPrompt(), CONTEXT_TEMPLATES (hardcoded), types
|
|
91
|
-
- `web/src/lib/action-scanner.ts` - Action .md file scanner: parse YAML frontmatter, assemble SlyActionsConfig, 30s cache, write support, update scanning (content-hash based), accept with additive class merge
|
|
92
|
-
- `web/src/lib/registry.ts` - Project registry loader with kanban, health scoring, platform detection. Exports `getRepoRoot()` for workspace root resolution.
|
|
93
|
-
- `web/src/lib/paths.ts` - Dynamic path resolution: getSlycodeRoot() (workspace), getPackageDir() (package assets — dev: repo root, prod: node_modules/slycode/dist/)
|
|
94
|
-
- `web/src/lib/kanban-paths.ts` - Project-aware kanban file path resolution with tiered backup. Workspace ID derived via `path.basename(getRepoRoot())` with underscore→hyphen normalization.
|
|
95
|
-
- `web/src/lib/asset-scanner.ts` - Asset scanning, frontmatter parsing, version comparison, store matrix building, update scanning (scanUpdatesFolder, acceptUpdate, getIgnoredUpdates). MASTER_PROJECT_ID derived via `path.basename()` — no hardcoded project name.
|
|
96
|
-
- `web/src/lib/store-scanner.ts` - Flat canonical store scanning (store/skills/ dirs, store/agents/ files)
|
|
97
|
-
- `web/src/lib/provider-paths.ts` - Provider-specific asset directory conventions (Claude/Codex/Gemini)
|
|
98
|
-
- `web/src/lib/mcp-common.ts` - Provider-neutral MCP config format with per-provider transformers
|
|
99
|
-
- `web/src/lib/terminal-events.ts` - Custom event system for pushing prompts to global terminal (pushToTerminal)
|
|
100
|
-
- `web/src/lib/event-log.ts` - Append-only activity log with filtering/querying (500 event cap)
|
|
101
|
-
- `web/src/lib/health-score.ts` - Health score calculator with configurable weights
|
|
102
|
-
- `web/src/lib/tab-sync.ts` - Cross-tab synchronization using BroadcastChannel API
|
|
103
|
-
|
|
104
|
-
### API Routes
|
|
105
|
-
- `web/src/app/api/kanban/route.ts` - Kanban CRUD. GET dynamically computes nextRun for all enabled recurring automation cards (server-side single source of truth for timezone via scheduler.ts getNextRun).
|
|
106
|
-
- `web/src/app/api/bridge/[...path]/route.ts` - Bridge proxy
|
|
107
|
-
- `web/src/app/api/sly-actions/route.ts` - GET assembled config from action-scanner / PUT writes back to .md files
|
|
108
|
-
- `web/src/app/api/sly-actions/stream/route.ts` - SSE watching store/actions/ directory for changes
|
|
109
|
-
- `web/src/app/api/sly-actions/invalidate/route.ts` - POST cache invalidation for actions
|
|
110
|
-
- `web/src/app/api/system-stats/route.ts` - CPU/memory metrics
|
|
111
|
-
- `web/src/app/api/areas/route.ts` - Available areas list
|
|
112
|
-
- `web/src/app/api/terminal-classes/route.ts` - Terminal class definitions
|
|
113
|
-
- `web/src/app/api/sly-actions/config/route.ts` - Actions in SlyActionsConfig format
|
|
114
|
-
- `web/src/app/api/cli-assets/route.ts` - Scan project assets, build matrix using flat canonical store as master
|
|
115
|
-
- `web/src/app/api/cli-assets/import/route.ts` - Import asset from project into workspace (uses getRepoRoot(), not registry lookup)
|
|
116
|
-
- `web/src/app/api/cli-assets/sync/route.ts` - Batch deploy/remove assets from canonical store to project provider dirs (uses getRepoRoot())
|
|
117
|
-
- `web/src/app/api/cli-assets/store/route.ts` - Flat store CRUD (GET scan, POST import with skillMainOnly option, DELETE remove)
|
|
118
|
-
- `web/src/app/api/cli-assets/store/preview/route.ts` - Import preview: lists files in project skill directory before importing
|
|
119
|
-
- `web/src/app/api/cli-assets/updates/route.ts` - Update delivery for skills + actions (GET scan both, POST accept with type routing, DELETE dismiss with contentHash for actions)
|
|
120
|
-
- `web/src/app/api/cli-assets/fix/route.ts` - Generate compliance fix prompts for non-compliant frontmatter
|
|
121
|
-
- `web/src/app/api/cli-assets/assistant/route.ts` - Generate asset creation/modification prompts
|
|
122
|
-
- `web/src/app/api/events/route.ts` - Query activity log with filters
|
|
123
|
-
- `web/src/app/api/search/route.ts` - Cross-project card search
|
|
124
|
-
- `web/src/app/api/projects/route.ts` - List/create projects
|
|
125
|
-
- `web/src/app/api/projects/[id]/route.ts` - GET/PUT/DELETE individual project
|
|
126
|
-
- `web/src/app/api/projects/analyze/route.ts` - Analyze directory before scaffolding (returns groups and detected providers)
|
|
127
|
-
- `web/src/app/api/projects/reorder/route.ts` - Persist project display order
|
|
128
|
-
- `web/src/app/api/version-check/route.ts` - npm version check for update toast
|
|
129
|
-
- `web/src/app/api/transcribe/route.ts` - POST audio upload → dual-backend STT. Checks `STT_BACKEND` env var (from process.env or parent .env). Local backend: writes temp file → ffmpeg WAV conversion → whisper-cli execution. OpenAI backend: Whisper API. Generic `loadEnv()` caches all env vars from parent .env.
|
|
130
|
-
- `web/src/app/api/settings/route.ts` - GET/PUT for data/settings.json (voice settings, keyboard shortcuts)
|
|
131
|
-
- `web/src/app/api/providers/route.ts` - GET/PUT for providers.json (provider list + stage defaults)
|
|
132
|
-
- `web/src/app/api/file/route.ts` - Read files from approved directories
|
|
133
|
-
- `web/src/app/api/git-status/route.ts` - Git status for projects
|
|
134
|
-
- `web/src/app/api/dashboard/route.ts` - Dashboard data: loads registry, enriches with bridge session counts
|
|
135
|
-
|
|
136
|
-
## Key Functions
|
|
137
|
-
|
|
138
|
-
- `ProjectKanban.handleDragEnd()` - Reorders cards, handles cross-column moves
|
|
139
|
-
- `ProjectKanban.handleCardContextMenu()` - Right-click context menu with stage/priority submenus, archive, delete
|
|
140
|
-
- `ProjectKanban.buildKanbanMenuGroups()` / `buildAutomationMenuGroups()` - Build context menu items per card type
|
|
141
|
-
- `ConnectionManager.createManagedEventSource()` - Auto-reconnecting SSE with backoff
|
|
142
|
-
- `getActionsForClass(commands, classAssignments, terminalClass, options?)` - Single getter: class → ordered IDs → filter by project/cardType
|
|
143
|
-
- `scanProjectAssets()` - Scan commands/skills/agents across projects, build matrix
|
|
144
|
-
- `scanStoreAssets()` - Scan store directory for cross-provider asset variants
|
|
145
|
-
- `pushToTerminal()` - Dispatch prompt to global terminal via custom events
|
|
146
|
-
- `calculateHealthScore()` - Score 0-100 based on configurable weighted factors
|
|
147
|
-
- `startScheduler()` / `stopScheduler()` - Automation scheduler lifecycle
|
|
148
|
-
- `triggerAutomation()` - Execute card automation: build prompt with run header, create/reuse bridge session. Fresh sessions: checkSessionAlive() after 20s (no retry, prompt delivered via CLI args). Resume sessions: waitForActivity() differential check + retry via bracketed paste if no activity. Accepts TriggerOptions (scheduled/manual). Returns KickoffResult with sessionName.
|
|
149
|
-
- `buildRunHeader()` - Formats === AUTOMATION RUN === block with timestamp, card info, trigger type, last run time
|
|
150
|
-
- `getConfiguredTimezone()` - Returns IANA timezone + abbreviation from TZ env var
|
|
151
|
-
- `loadParentEnv()` - Reads .env from workspace root (Next.js only loads from web/). Skips BRIDGE_URL/BRIDGE_PORT (port-dependent, differs dev vs prod) to avoid routing scheduler requests to wrong bridge.
|
|
152
|
-
- `next.config.ts` reads `DEV_HOSTNAME` from parent .env via inline `getParentEnv()` for `allowedDevOrigins` (Tailscale dev access). Dashboard footer shows slycode version fetched from `/api/version-check`.
|
|
153
|
-
- `cronToHumanReadable()` - Cron to human-readable text (shared utility in cron-utils.ts)
|
|
154
|
-
- `getNextRun()` - Calculate next cron run as Date (exported from scheduler.ts, server-side only). Used by GET /api/kanban (dynamic nextRun on all enabled recurring cards) and POST /api/scheduler `nextRun` action (on-demand for AutomationConfig UI). Client-side `getNextRunISO()` removed from cron-utils.ts — no croner dependency on client.
|
|
155
|
-
|
|
156
|
-
## CardModal Tabs
|
|
157
|
-
|
|
158
|
-
- **Details** - Edit fields, dropdowns for stage/priority, editable areas/tags chips, delete button. Automation cards show "Description / Automation Instructions" label and AutomationConfig panel (with Run Now button) instead of problems section.
|
|
159
|
-
- **Notes** - Agent notes (AgentNote[]) with scroll shadows, add/delete/clear, purple accent. Empty state shows CLI hint.
|
|
160
|
-
- **Design** - Shows if `design_ref` exists, renders markdown with copy path button
|
|
161
|
-
- **Feature** - Shows if `feature_ref` exists, renders markdown
|
|
162
|
-
- **Test** - Shows if `test_ref` exists, renders markdown
|
|
163
|
-
- **Checklist** - Interactive checkboxes with progress bar (uses ref-based state for rapid clicks)
|
|
164
|
-
- **Terminal** - AI session with provider selector, auto-connect, single actions prop split by placement
|
|
165
|
-
|
|
166
|
-
CardModal uses edit session protection: last-known-value tracking, 2000ms grace period for field editing, prevents overwriting active edits from external updates.
|
|
167
|
-
|
|
168
|
-
### Voice-to-Text
|
|
169
|
-
Voice is a **global system** using React Context (`VoiceContext.tsx`). VoiceProvider wraps the app in layout.tsx. Components use `useVoice()` hook instead of managing voice locally. Voice claim system: components register as claimants (CardModal, GlobalClaudePanel) via `claimVoice()`/`releaseVoice()`. When no modal claims voice, FloatingVoiceWidget appears at bottom-right for global voice control. Records audio via browser MediaRecorder, sends to /api/transcribe (Whisper STT), inserts transcription at claimant's target. Focus targets: input/textarea fields (via execCommand('insertText') for undo support) or terminal (via sendInput). VoiceSettingsPopover (gear icon) configures shortcuts, auto-submit, max recording length. Settings persisted in data/settings.json via /api/settings. VoicePopoverPortal renders popovers via createPortal to escape CardModal stacking context.
|
|
170
|
-
|
|
171
|
-
### Automation Cards
|
|
172
|
-
Cards with `card.automation` set get orange-themed header/tabs (instead of stage color). Automation toggle in card header enables/disables automation mode (disabled for archived cards). Archive toggle is disabled for automation cards ("Automation cards cannot be archived"). Automation cards are filtered from normal kanban columns and shown in AutomationsScreen instead.
|
|
173
|
-
|
|
174
|
-
## Health Scoring
|
|
175
|
-
|
|
176
|
-
- **Factors**: outdated assets, stale cards, unresolved problems, missing CLAUDE.md, non-compliant frontmatter
|
|
177
|
-
- **Levels**: green (≥80), amber (≥50), red (<50)
|
|
178
|
-
- **Display**: HealthDot component with tooltip showing score breakdown
|
|
179
|
-
- Located on ProjectCard in Dashboard
|
|
180
|
-
|
|
181
|
-
## CLI Assets (Asset Management)
|
|
182
|
-
|
|
183
|
-
Three views: **Projects**, **Store**, and **Updates**.
|
|
184
|
-
|
|
185
|
-
### Projects View
|
|
186
|
-
- Provider sub-tabs (Claude/Codex/Gemini) filter which provider's assets are shown
|
|
187
|
-
- Matrix view: rows=assets, columns=projects, cells=status (current/outdated/missing)
|
|
188
|
-
- Canonical store is master source of truth (store/skills/, store/agents/)
|
|
189
|
-
- Batch deploy/remove with pending changes bar
|
|
190
|
-
- "Not in Store" section for importing untracked project assets
|
|
191
|
-
- Fix action for non-compliant frontmatter (generates LLM prompt)
|
|
192
|
-
- Ignore/Unignore for assets that shouldn't be tracked
|
|
193
|
-
|
|
194
|
-
### Store View
|
|
195
|
-
- Flat canonical layout: skills and agents listed from store/
|
|
196
|
-
- Delete, Fix, and Modify actions per asset
|
|
197
|
-
- New Asset button → AssetAssistant modal → terminal prompt
|
|
198
|
-
- Modify action on existing assets → pre-filled AssetAssistant
|
|
199
|
-
|
|
200
|
-
### Updates View
|
|
201
|
-
- Scans updates/ folder against store/ for available updates
|
|
202
|
-
- Shows status per update: "new" (skill not in store) or "update" (newer version)
|
|
203
|
-
- Preview button opens SkillDiffViewer with side-by-side diff
|
|
204
|
-
- Accept: copies from updates/ → store/ with backup of old version
|
|
205
|
-
- Dismiss: records version in store/.ignored-updates.json (skipped on future scans)
|
|
206
|
-
- Post-accept: shows push-to-projects options
|
|
207
|
-
- 60s polling interval via usePolling hook
|
|
208
|
-
|
|
209
|
-
## Connection Management
|
|
210
|
-
|
|
211
|
-
- `ConnectionManager` - Singleton managing all SSE connections
|
|
212
|
-
- Page Visibility API detection for sleep/wake cycles
|
|
213
|
-
- Exponential backoff with jitter (1s initial, 30s max)
|
|
214
|
-
- `ConnectionStatusIndicator` - Toast showing "Reconnecting..." during recovery
|
|
215
|
-
|
|
216
|
-
## Data Models
|
|
217
|
-
|
|
218
|
-
- `KanbanCard` - id, number?, title, description, type, priority, order, areas[], tags[], problems[], checklist[], archived?, design_ref?, feature_ref?, test_ref?, claude_session?, agentNotes?, automation?, last_modified_by?
|
|
219
|
-
- `AgentNote` - id (sequential int), agent? (Claude/Codex/Gemini/User), text, timestamp, summary? (bool), summarizedCount?, dateRange?
|
|
220
|
-
- `AutomationConfig` - enabled, schedule, scheduleType (recurring|one-shot), provider, freshSession, workingDirectory?, reportViaMessaging, lastRun?, lastResult?, nextRun? (no prompt field — card description is the execution prompt). Manual triggers now persist lastRun/lastResult via scheduler API route.
|
|
221
|
-
- `KickoffResult` - cardId, projectId, success, error?, sessionName?
|
|
222
|
-
- `SlyAction` - label, description, group, cardTypes[], placement, prompt, scope, projects[]
|
|
223
|
-
- `BridgeStats` - bridgeTerminals, connectedClients, activelyWorking, sessions[]
|
|
224
|
-
- `SystemStats` - cpu (0-100), memory {used, total}, swap {used, total}
|
|
225
|
-
- `SessionActivity` - name, status, lastOutputAt, isActive, activityStartedAt?, lastOutputSnippet?
|
|
226
|
-
- `ProviderId` - 'claude' | 'agents' | 'codex' | 'gemini'
|
|
227
|
-
- `AssetType` - 'skill' | 'agent' | 'mcp' (no 'command' — all commands converted to skills)
|
|
228
|
-
- `AssetInfo` - name, type, version, updated, description, filePath, frontmatter, isValid
|
|
229
|
-
- `AssetCell` - status (current|outdated|missing), masterVersion?, projectVersion?
|
|
230
|
-
- `CliAssetsData` - skills (AssetRow[]), agents (AssetRow[]), nonImported (AssetRow[])
|
|
231
|
-
- `StoreData` - skills[], agents[], mcp[] (StoreAssetInfo arrays, flat canonical layout)
|
|
232
|
-
- `UpdateEntry` - name, assetType, status (update|new), currentVersion?, availableVersion, description?, updatesPath, storePath, filesAffected[], skillMdOnly
|
|
233
|
-
- `UpdatesData` - entries[], totalAvailable
|
|
234
|
-
- `IgnoredUpdates` - Record<string, string> (key: "skills/{name}", value: ignored version)
|
|
235
|
-
- `ProviderAssetPaths` - commands, skills, agents, mcpConfig paths per provider
|
|
236
|
-
- `PendingChange` - action, asset, project, provider, source for batch operations
|
|
237
|
-
- `HealthScore` - score (0-100), level (green|amber|red), factors[]
|
|
238
|
-
- `ActivityEvent` - type, timestamp, project, detail, cardId?
|
|
239
|
-
- `SearchResult` - cardId, cardTitle, projectId, projectName, stage, matchField, snippet, isArchived?
|
|
240
|
-
- `ProjectWithBacklog` - extends Project with backlog, designs, features, accessible, assets?, gitUncommitted?, healthScore?, platforms?, lastActivity?, activeSessions?
|
|
241
|
-
- `DashboardData` - projects (ProjectWithBacklog[]), totalBacklogItems, activeItems, totalOutdatedAssets?, totalUncommitted?, lastRefresh, slycodeRoot, projectsDir
|
|
242
|
-
- `VoiceClaimant` - id, onRecordStart?, onTranscriptionComplete, onRelease?
|
|
243
|
-
- `VoiceState` - 'disabled' | 'idle' | 'recording' | 'paused' | 'transcribing' | 'error'
|
|
244
|
-
- `VoiceSettings` - autoSubmitTerminal, maxRecordingSeconds, shortcuts (VoiceShortcuts)
|
|
245
|
-
- `VoiceShortcuts` - startRecording, pauseResume, submit, submitPasteOnly, clear (configurable key combos)
|
|
246
|
-
- `AppSettings` - voice (VoiceSettings); persisted server-side in data/settings.json
|
|
247
|
-
|
|
248
|
-
## Design System — SlyCode Neon Theme
|
|
249
|
-
|
|
250
|
-
### Philosophy
|
|
251
|
-
Neon-minimalist aesthetic. Clean surfaces with subtle texture for life and depth. Never sterile/flat, never over-the-top. The theme should feel like a premium tool — atmospheric but professional. Light mode is clean with solid colors (no gradients or grain textures on headers); dark mode is moody with glow and gradient textures.
|
|
252
|
-
|
|
253
|
-
### Color Palette
|
|
254
|
-
- **Neon Blue** (`--neon-blue: #00bfff`) — Primary accent, design/implementation lanes, links, active states
|
|
255
|
-
- **Neon Orange** (`--neon-orange: #ff8c00`) — Automation cards, warnings
|
|
256
|
-
- **Red-Orange** (`#ff6a33`) — Testing lane (NOT standard orange, which looks brown in dark mode)
|
|
257
|
-
- **Green** — Done lane, success states, running indicators
|
|
258
|
-
- **Void** — Neutral grey scale for backgrounds, borders, muted text
|
|
259
|
-
- **Red** (`#ff3b5c`) — Critical/bug indicators, stop buttons
|
|
260
|
-
|
|
261
|
-
### Critical Color Lesson
|
|
262
|
-
Dark-end scale colors (e.g. `neon-orange-950 = #2b1700`) are inherently brown. For vibrant dark mode colors, use the BRIGHT color at LOW OPACITY (e.g. `neon-orange-400/15`) instead of dark scale values.
|
|
263
|
-
|
|
264
|
-
### Shadow Depth System (globals.css)
|
|
265
|
-
Three CSS custom property tiers, defined on `:root` (light) and `.dark` (dark), providing consistent elevation across all components:
|
|
266
|
-
|
|
267
|
-
- `--shadow-surface` — Flat elements (column wrappers, panels). Light: subtle outward shadow. Dark: inset highlight + deep outward shadow + faint border ring.
|
|
268
|
-
- `--shadow-card` — Elevated cards, active elements. Light: medium spread. Dark: inset highlight + heavy spread + neon-blue edge ring.
|
|
269
|
-
- `--shadow-overlay` — Modals, overlays. Light: deep multi-layer. Dark: extreme depth + inset highlight + neon-blue ring.
|
|
270
|
-
|
|
271
|
-
Usage: `shadow-(--shadow-card)` in Tailwind classes, or `var(--shadow-card)` in keyframe animations. All neon-pulse keyframes layer glow effects ON TOP of the appropriate shadow var (e.g., `box-shadow: var(--shadow-card), 0 0 8px 2px rgba(...)`) to preserve depth while glowing.
|
|
272
|
-
|
|
273
|
-
### Texture System (globals.css)
|
|
274
|
-
Three-layer texture approach for gradient surfaces, plus lane and automation-specific textures:
|
|
275
|
-
|
|
276
|
-
1. **Fine grain** (`.grain`) — High-frequency SVG feTurbulence noise (`baseFrequency: 0.65`), overlay blend. Desaturate with `feColorMatrix type='saturate' values='0'` when color neutrality matters.
|
|
277
|
-
2. **Perlin noise** (`.depth-glow`) — Low-frequency organic texture (`baseFrequency: 0.015` light, `0.012` dark), large 400px tiles. Light mode uses `screen` blend (lightens), dark mode uses `soft-light`. Masked with left-to-right gradient fade.
|
|
278
|
-
3. **Terminal texture** (`.terminal-texture`) — CRT-like grain + vignette + lane-colored tint via `--terminal-tint` CSS variable. Box-shaped mask (edges visible, centre clear). Light: `soft-light` blend. Dark: `screen` blend (avoids warm/red cast from `soft-light` on dark backgrounds).
|
|
279
|
-
4. **Lane texture** (`.lane-texture`) — 18px grid-line background (subtle crosshatch). Light: rgba(40,80,200,0.12) blue-tinted, dark: rgba(255,255,255,0.015). Applied to KanbanColumn card scroll areas via `colorClasses.texture`.
|
|
280
|
-
5. **Light-clean suppression** (`.light-clean`) — Add to elements that use `.grain` and `.depth-glow` to suppress texture in light mode only. Hides `::after` (grain) and `::before` (depth-glow) via `display: none` in `:root:not(.dark)`. Used on column headers and global terminal header for clean light mode appearance.
|
|
281
|
-
6. **Automation chevron** (`.automation-chevron`) — Right-pointing filled SVG chevron arrows (3 copies per 50px tile for seamless wrap), fading left-to-right via mask. Orange fill in light mode, white fill at 0.08 opacity in dark mode. `.automation-chevron-muted` drops to 0.02 opacity for disabled cards.
|
|
282
|
-
7. **Hazard stripe** (`.hazard-stripe`) — Industrial diagonal amber/dark repeating stripe (8px bands at -45deg). Dark mode uses semi-transparent orange. `.hazard-stripe-muted` uses grey stripes at low opacity for disabled cards.
|
|
283
|
-
|
|
284
|
-
### Blend Mode Rules
|
|
285
|
-
- `soft-light` on dark backgrounds produces warm/red cast — avoid for dark mode textures
|
|
286
|
-
- `overlay` is neutral but can be invisible on very dark surfaces
|
|
287
|
-
- `screen` always adds light — use for dark mode when you need visible texture
|
|
288
|
-
- `mix-blend-multiply` makes white backgrounds transparent (light mode logos)
|
|
289
|
-
- `mix-blend-lighten` makes black backgrounds transparent (dark mode logos)
|
|
290
|
-
- `filter: drop-shadow()` traces the ALPHA boundary — creates rectangular glow on images with opaque backgrounds. Incompatible with blend-mode logo transparency.
|
|
291
|
-
|
|
292
|
-
### Logo Handling
|
|
293
|
-
Logos have opaque backgrounds (white for light, black for dark). Two `<img>` tags per location:
|
|
294
|
-
- Light: `mix-blend-multiply dark:hidden`
|
|
295
|
-
- Dark: `mix-blend-lighten hidden dark:block`
|
|
296
|
-
- All CSS drop-shadow/filter glow DISABLED (creates rectangular artifacts with blend modes). Logos have baked-in glow.
|
|
297
|
-
- Files: `slycode_light.webp` / `slycode.webp` (hero), `slycode_logo_light.webp` / `slycode_logo.webp` (nav)
|
|
298
|
-
- Favicon: `web/public/favicon.png` (64×64 rounded SlyCode logo, referenced via metadata in layout.tsx)
|
|
299
|
-
|
|
300
|
-
### Lane-Colored Theming
|
|
301
|
-
Stage colors flow through multiple layers:
|
|
302
|
-
- **KanbanColumn headers** — `colorClasses` map (includes `texture` key for lane-texture): light mode uses flat bg colors (e.g., `bg-neon-blue-100/80`), dark mode uses gradients. Inset shadows on headers (color-matched per lane). Thicker bottom borders (`border-b-[3px]`). Header text has drop-shadow for legibility. Text colors: light mode uses `text-void-500/600`, dark mode uses lane colors. Light mode column wrappers: `bg-[#d8e1f0]` blue-tinted background with complex inset shadows (top/left white highlights, bottom/right blue shadows) and blue-tinted borders. Dark mode column wrappers use standard `shadow-(--shadow-surface)` variant.
|
|
303
|
-
- **CardModal header/tabs** — `stageModalStyles` map with gradients, borders per stage. Uses transparency (85% → 50%) for subtle glass quality
|
|
304
|
-
- **CardModal footer** — `stageTerminalColors` with colored top border
|
|
305
|
-
- **Terminal tint** — `stageTerminalTint` map provides rgba color → passed as `tintColor` prop → sets `--terminal-tint` CSS variable on terminal overlay
|
|
306
|
-
|
|
307
|
-
### Gradient Direction Convention
|
|
308
|
-
Left-to-right, vibrant-to-soft. The left/start side is always the stronger color, fading lighter toward the right. Never center-out fades (looks artificial).
|
|
309
|
-
|
|
310
|
-
### Button Aesthetic — Neon Glass
|
|
311
|
-
Terminal/action buttons use neon-blue semi-transparent backgrounds with colored borders and hover glow:
|
|
312
|
-
```
|
|
313
|
-
border border-neon-blue-400/40 bg-neon-blue-400/15 text-neon-blue-400
|
|
314
|
-
hover:bg-neon-blue-400/25 hover:shadow-[0_0_12px_rgba(0,191,255,0.3)]
|
|
315
|
-
```
|
|
316
|
-
|
|
317
|
-
### Health Monitor
|
|
318
|
-
Uses inline gradient fills + glow shadows (not flat CSS classes):
|
|
319
|
-
- Normal: `linear-gradient(90deg, #00e676, #00bfff)` + blue glow
|
|
320
|
-
- Warning: `linear-gradient(90deg, #ff8c00, #ffaa00)` + orange glow
|
|
321
|
-
- Critical: `linear-gradient(90deg, #ff3b5c, #ff6b81)` + red glow
|
|
322
|
-
|
|
323
|
-
### Terminal Background
|
|
324
|
-
Theme-aware: `#222228` (light mode, slightly lighter) / `#1a1a1a` (dark mode). Detected at xterm mount via `document.documentElement.classList.contains('dark')`. Wrapper divs use `bg-[#222228] dark:bg-[#1a1a1a]`.
|
|
325
|
-
|
|
326
|
-
### Dark Mode Borders
|
|
327
|
-
Card modals get colored outer borders in dark mode (`dark:border dark:border-{color}/25-30`). Section dividers (header/tabs/terminal) use lane colors in both modes.
|
|
328
|
-
|
|
329
|
-
## Patterns & Invariants
|
|
330
|
-
|
|
331
|
-
- Cards auto-save on changes via `/api/kanban` POST with `changedCardIds` for surgical merge
|
|
332
|
-
- Surgical save: only changed cards sent in payload, server merges against disk state, preserves concurrent CLI/agent edits
|
|
333
|
-
- Kanban data stored in `documentation/kanban.json` per project
|
|
334
|
-
- Stage order: backlog → design → implementation → testing → done
|
|
335
|
-
- Active glow: `active-glow-card` CSS class with `neon-pulse-priority` animation uses `--glow-color` CSS var (from card's priority color, not hardcoded blue). Automation toggle button in header gets `active-glow-automation-btn` pulse when any automation card has an active session. All glow effects have light/dark mode variants.
|
|
336
|
-
- Commands use single `actions` prop split by placement (startup/toolbar/both) at the component level
|
|
337
|
-
- SSE connections managed centrally via ConnectionManager for reconnection
|
|
338
|
-
- Dynamic path resolution via paths.ts: getSlycodeRoot() (SLYCODE_HOME → cwd, no legacy root env var fallback), getPackageDir() for package assets (scripts/, scaffold-templates/). All API routes use centralized path functions — no local getRepoRoot() helpers. CLI assets import/sync use registry.ts getRepoRoot() instead of looking up project by ID.
|
|
339
|
-
- Cross-tab sync via BroadcastChannel API
|
|
340
|
-
- Number keys 1-9 jump to projects, Escape closes modals
|
|
341
|
-
- Event log capped at 500 entries, append-only
|
|
342
|
-
- Session names include provider segment: `{projectId}:{provider}:card:{cardId}`
|
|
343
|
-
- Provider button group (not dropdown) on no-session screen, pre-filled from stage defaults
|
|
344
|
-
- CardModal detects existing session's provider from session name for pre-selection
|
|
345
|
-
- ProjectKanban/ProjectPageClient use regex patterns to match both new and legacy session names
|
|
346
|
-
- Terminal prompt events: pushToTerminal() → GlobalClaudePanel handler → auto-start or send input
|
|
347
|
-
- 300ms delay before Enter on multi-line pastes (bracket paste mode handling)
|
|
348
|
-
- Store is master source of truth for assets (not SlyCode's .claude/)
|
|
349
|
-
- Dashboard tabs: "Code Den" (projects) and "CLI Assets" (assets) with description subtitles
|
|
350
|
-
- Dashboard projects support drag-and-drop reordering with drop indicators, persisted via displayOrder field
|
|
351
|
-
- Right-click context menu on kanban cards: move stage, set priority, copy title/ID/description, archive, delete (with ConfirmDialog)
|
|
352
|
-
- Context menu uses portal rendering (z-51, submenus z-52) with viewport-aware positioning and lane-colored accent bars
|
|
353
|
-
- Z-index layers: BackdropModal z-50, ContextMenu z-51, Submenu z-52, ConfirmDialog z-60
|
|
354
|
-
- suppressAutoTerminal: context menu "Open details" sets flag to prevent CardModal from auto-switching to terminal tab
|
|
355
|
-
- onActiveAutomationsChange: ProjectKanban reports to ProjectView whether any automation cards have active sessions (drives header pulse indicator)
|
|
356
|
-
- Instruction file check: ClaudeTerminalPanel fetches `/check-instruction-file` on provider/cwd change, shows amber warning with opt-out checkbox if instruction file is missing but a sibling exists. `createInstructionFile` state passed to session creation.
|
|
357
|
-
- Resize broadcast: Terminal.tsx guards resize POST to visible tabs only (document.visibilityState), uses `suppressResizePost` flag to prevent echo loop when handling SSE resize events from other tabs. Skips resize post on reconnect.
|
|
358
|
-
- Image paste: Ctrl+V in terminal intercepted at keydown level (before xterm.js), checks clipboard.read() for images, falls back to text paste via sendInput
|
|
359
|
-
- Screenshot toast: uploading/done/error states with thumbnail preview, auto-dismiss after 2s, double-fire guard
|
|
360
|
-
- Voice recording: state machine (disabled → idle → recording → paused → transcribing), configurable shortcuts, max-length auto-pause
|
|
361
|
-
- Voice focus tracking: captures last-focused field (input/textarea/terminal) before recording starts, inserts transcription there
|
|
362
|
-
- Voice-aware click-outside: GlobalClaudePanel and SlyActionConfigModal prevent closing while voice is busy (recording/transcribing) to ensure transcription lands in the correct terminal
|
|
363
|
-
- SlyActionConfigModal Escape handling: when assistant terminal is expanded, Escape passes through to terminal (not intercepted by modal)
|
|
364
|
-
- Settings persisted server-side: data/settings.json via GET/PUT /api/settings (voice section with VoiceSettings)
|
|
365
|
-
- Automation safeguards: automation cards cannot be archived (CLI rejects + web disables toggle), archived cards cannot enable automation (web disables toggle). Mutual exclusion enforced in CardModal header toggles.
|
|
366
|
-
- Automation cards filtered from normal kanban columns, shown in AutomationsScreen
|
|
367
|
-
- AutomationsScreen: max-w-5xl centered, 2-col grid (was 3-col), cards have chevron texture background + hazard stripe bottom bar + orange left border accent. Countdown timers are large (text-2xl), show "idle" label when disabled. Collapsible tag groups via `<details open>`.
|
|
368
|
-
- Scheduler auto-starts via instrumentation.ts on Next.js boot, checks every 30s, timezone-aware (TZ env var). Scheduler state and timer stored on globalThis to survive HMR reloads (prevents duplicate setInterval instances causing multiple schedulers to fight over kanban.json writes). loadParentEnv() reads .env from workspace root at module load (Next.js only loads .env from web/). nextRun computed dynamically by GET /api/kanban (server-side single source of truth for timezone) — no longer recalculated in checkAutomations loop. Grace window: isDue() clamps lastRun to max 60s ago so stale automations don't fire immediately on re-enable; new automations (no lastRun) wait for their first cron tick.
|
|
369
|
-
- Fresh session path: prompt delivered via CLI args (OS-level guarantee), checkSessionAlive() after 20s confirms session didn't crash, no retry needed.
|
|
370
|
-
- Resume session path: prompt pasted via bracketed paste (unreliable delivery), waitForActivity() takes baseline+5s differential, retries via re-paste on failure.
|
|
371
|
-
- fetchWithTimeout(10s) wraps all bridge HTTP calls to prevent hung bridge from blocking activeKickoffs indefinitely.
|
|
372
|
-
- Soft failure notifications: only Telegram-notifies on hard failures (Session create failed, Session stopped, Input failed, No automation config). Detection uncertainty logged but not notified.
|
|
373
|
-
- Automation run header: rich context block (=== AUTOMATION RUN ===) with time, card, trigger type (scheduled/manual with cron description), last run + relative time
|
|
374
|
-
- AutomationsScreen shows timezone abbreviation badge in header
|
|
375
|
-
- AutomationConfig shows timezone abbreviation next to one-shot date picker
|
|
376
|
-
- Notes tab shows amber "Summary" badge for summary notes (with summarizedCount/dateRange tooltip)
|
|
377
|
-
- last_modified_by tracks source of card changes: 'web', 'cli', or 'agent'
|
|
378
|
-
- KanbanColumn uses flex-grow (min-w-72 max-w-96) + justify-center for wide viewport scaling
|
|
379
|
-
- KanbanCardItem visual polish: glassmorphism (bg-white/55 + backdrop-blur-lg, dark: bg-[#20232a]/55 + backdrop-blur-xl), top hairline border (border-t-white/50), priority-colored left border with inset glow on hover (uses `--glow-color` CSS var set inline from priorityIndicators map), `::before` pseudo-element for hover highlight stripe on left edge
|
|
380
|
-
- Card numbers: sequential `number` field on KanbanCard (zero-padded #0001 format), displayed top-right in JetBrains Mono. Backfilled by CLI on first write (ensureCardNumbers/backfillCardNumbers in kanban.js), tracked via kanban.nextCardNumber
|
|
381
|
-
- Session status dots: running/activelyWorking show green ping dot, detached/resumable show orange dot, no-session shows grey dot. Type color dots replaced by type emojis (bug/feature/chore)
|
|
382
|
-
- Done column compact mode: `isCompact` when stage='done' hides tags/areas section to reduce visual clutter
|
|
383
|
-
- ChecklistProgress: smaller SVG ring (13px, 1.5 stroke), completed state uses void-400/void-500 (not green), count text in JetBrains Mono 10px
|
|
384
|
-
- Skill import preview: ImportDialog in CliAssetsTab shows file listing for skill directories, defaults to SKILL.md-only import (avoids overwriting store references/). Full folder option available. Non-skill assets import directly (single file).
|
|
385
|
-
- Activity ring: uses `isActive` (not `status=running`) to prevent flash on reconnect. Global terminal sessions included in activity counts (not just card sessions).
|
|
386
|
-
|
|
387
|
-
### Responsive Mobile Layout
|
|
388
|
-
- **Breakpoint strategy**: `sm:` (640px) is the mobile/desktop threshold. Mobile-first classes with `sm:` overrides for desktop.
|
|
389
|
-
- **CardModal**: fullscreen on mobile (`p-0 overflow-hidden h-full rounded-none`), windowed on desktop (`lg:p-4 lg:rounded-xl lg:h-auto lg:max-w-4xl`). Tabs scroll horizontally with `overflow-x-auto scrollbar-hide`. Smaller text/padding on mobile (`text-base sm:text-xl`, `p-3 sm:p-4`). Automation/Archive labels hidden on mobile (`hidden sm:inline`).
|
|
390
|
-
- **GlobalClaudePanel**: fullscreen on mobile when expanded (`inset-0 h-svh w-screen`), windowed on desktop (`sm:inset-auto sm:bottom-0 sm:right-4 sm:h-[500px] sm:w-[700px]`). Rounded corners removed on mobile when expanded.
|
|
391
|
-
- **HealthMonitor**: click-to-toggle (replaced hover-expand with 500ms delay). Click-outside dismiss. Mobile: compact status dot (worst-metric colored) + terminal count + activity ping. Desktop: full metric bars.
|
|
392
|
-
- **Terminal**: touch-to-scroll handler (manual `touchstart`/`touchmove`/`touchend` because xterm viewport is sibling not ancestor of canvas). Debounced resize (150ms timeout) prevents ResizeObserver feedback loop on mobile. Container has `touch-none` CSS.
|
|
393
|
-
- **ProjectHeader**: responsive layout — mobile hides project name/description, shows search icon button (opens full-width overlay), Actions button hidden on mobile (`hidden sm:flex`). All buttons use min-h/w-[44px] touch targets. Logo scales down on mobile (40px vs 52px).
|
|
394
|
-
- **KanbanColumn**: mobile snap-scroll columns (`min-w-[85vw] sm:min-w-72 max-w-[85vw] sm:max-w-96 snap-start`). Parent uses `snap-x snap-mandatory` for horizontal swiping.
|
|
395
|
-
- **globals.css**: `.scrollbar-hide` utility (hides scrollbars via `-ms-overflow-style: none`, `scrollbar-width: none`, `::-webkit-scrollbar display: none`)
|
|
396
|
-
|
|
397
|
-
## When to Expand
|
|
398
|
-
|
|
399
|
-
- Editing card behavior → CardModal.tsx
|
|
400
|
-
- Kanban drag/drop issues → ProjectKanban.tsx, KanbanColumn.tsx
|
|
401
|
-
- Context menu actions → ContextMenu.tsx, ProjectKanban.tsx (buildKanbanMenuGroups/buildAutomationMenuGroups)
|
|
402
|
-
- Confirmation dialogs → ConfirmDialog.tsx
|
|
403
|
-
- Adding new card fields → types.ts, CardModal.tsx
|
|
404
|
-
- Command configuration → SlyActionConfigModal.tsx (Commands tab + Classes tab), data/sly-actions.json (v3 format)
|
|
405
|
-
- Health monitoring → HealthMonitor.tsx, /api/system-stats
|
|
406
|
-
- Connection issues → connection-manager.ts, ConnectionStatusIndicator.tsx
|
|
407
|
-
- Terminal panel behavior → ClaudeTerminalPanel.tsx
|
|
408
|
-
- Provider selection → ClaudeTerminalPanel.tsx, /api/providers, data/providers.json
|
|
409
|
-
- Provider detection for existing sessions → CardModal.tsx (session name parsing)
|
|
410
|
-
- Asset management → asset-scanner.ts, CliAssetsTab.tsx, AssetMatrix.tsx, StoreView.tsx
|
|
411
|
-
- Store management → store-scanner.ts, StoreView.tsx, /api/cli-assets/store
|
|
412
|
-
- Update delivery → asset-scanner.ts (scanUpdatesFolder), UpdatesView.tsx, SkillDiffViewer.tsx, /api/cli-assets/updates
|
|
413
|
-
- Asset assistant → AssetAssistant.tsx, /api/cli-assets/assistant
|
|
414
|
-
- Version updates → VersionUpdateToast.tsx, /api/version-check
|
|
415
|
-
- Project reordering → Dashboard.tsx (drag-drop), /api/projects/reorder, registry.ts
|
|
416
|
-
- Terminal prompt flow → terminal-events.ts, GlobalClaudePanel.tsx
|
|
417
|
-
- Provider paths → provider-paths.ts, mcp-common.ts
|
|
418
|
-
- Health scoring → health-score.ts, HealthDot.tsx
|
|
419
|
-
- Activity feed → event-log.ts, ActivityFeed.tsx
|
|
420
|
-
- Project scaffolding → AddProjectModal.tsx, /api/projects
|
|
421
|
-
- Search → SearchBar.tsx, /api/search
|
|
422
|
-
- Agent notes → CardModal.tsx (notes tab), types.ts (AgentNote)
|
|
423
|
-
- Automation config → AutomationConfig.tsx, CardModal.tsx (automation toggle + panel)
|
|
424
|
-
- Automations screen → AutomationsScreen.tsx, ProjectKanban.tsx (showAutomations), ProjectView.tsx
|
|
425
|
-
- Scheduler → scheduler.ts, instrumentation.ts, /api/scheduler
|
|
426
|
-
- Surgical save → /api/kanban route.ts (changedCardIds merge), ProjectKanban.tsx (saveStages)
|
|
427
|
-
- Path resolution → paths.ts, kanban-paths.ts
|
|
428
|
-
- Keyboard shortcuts → useKeyboardShortcuts.ts
|
|
429
|
-
- Voice input → VoiceContext.tsx (global state), VoiceControlBar.tsx, FloatingVoiceWidget.tsx, useVoiceRecorder.ts, useVoiceShortcuts.ts, CardModal.tsx (voice claim)
|
|
430
|
-
- Voice settings → VoiceSettingsPopover.tsx, useSettings.ts, /api/settings
|
|
431
|
-
- Image paste → Terminal.tsx (Ctrl+V interception), ClaudeTerminalPanel.tsx (handleImagePaste, screenshot toast)
|
|
432
|
-
- App settings → useSettings.ts, /api/settings, data/settings.json
|
|
433
|
-
- Theme/design system → globals.css (texture classes), CardModal.tsx (stageModalStyles), KanbanColumn.tsx (colorClasses), GlobalClaudePanel.tsx (terminal header), Terminal.tsx (tintColor, terminal-texture)
|
|
434
|
-
- Responsive/mobile → CardModal.tsx (fullscreen), GlobalClaudePanel.tsx (fullscreen), HealthMonitor.tsx (click-toggle), Terminal.tsx (touch scroll), ProjectHeader.tsx (mobile search), KanbanColumn.tsx (snap-scroll)
|
|
435
|
-
- Skill import → CliAssetsTab.tsx (ImportDialog), /api/cli-assets/store/preview, /api/cli-assets/store (skillMainOnly)
|
|
436
|
-
- Instruction file warning → ClaudeTerminalPanel.tsx (instructionFileCheck state, createInstructionFile checkbox)
|
|
437
|
-
- Terminal resize sync → Terminal.tsx (sendResize visibility guard, suppressResizePost, SSE resize event)
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
# Maintenance Doctrine
|
|
2
|
-
|
|
3
|
-
Rules for maintaining context-priming references. Changes to this file require user approval.
|
|
4
|
-
|
|
5
|
-
## Area File Structure
|
|
6
|
-
|
|
7
|
-
Area files should be as lean as the area requires. Include sections that add value; omit those that don't.
|
|
8
|
-
|
|
9
|
-
**Always include:**
|
|
10
|
-
```markdown
|
|
11
|
-
# [Area Name]
|
|
12
|
-
|
|
13
|
-
Updated: YYYY-MM-DD
|
|
14
|
-
|
|
15
|
-
## Overview
|
|
16
|
-
What this area does, boundaries. 2-3 sentences.
|
|
17
|
-
|
|
18
|
-
## Key Files
|
|
19
|
-
- `file.py` - purpose
|
|
20
|
-
[Most important files/modules]
|
|
21
|
-
|
|
22
|
-
## When to Expand
|
|
23
|
-
- [task] → [files to open]
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
**Include when relevant:**
|
|
27
|
-
|
|
28
|
-
| Section | When to include |
|
|
29
|
-
|---------|-----------------|
|
|
30
|
-
| Key Functions | Area has important entry points, APIs, or non-obvious control flow |
|
|
31
|
-
| Data Models | Area defines data structures used internally or externally |
|
|
32
|
-
| Shared Objects | Area defines or consumes objects used across multiple areas |
|
|
33
|
-
| Patterns & Invariants | Area has critical rules that must hold |
|
|
34
|
-
| Interfaces | Area connects to other areas with data flow |
|
|
35
|
-
|
|
36
|
-
**Section formats (when used):**
|
|
37
|
-
|
|
38
|
-
```markdown
|
|
39
|
-
## Key Functions
|
|
40
|
-
- `process_message()` in handlers.py - entry point for incoming messages
|
|
41
|
-
|
|
42
|
-
## Data Models
|
|
43
|
-
- `Message` (models.py) - id, content, sender_id, timestamp | core envelope
|
|
44
|
-
|
|
45
|
-
## Shared Objects
|
|
46
|
-
- `Message` - DEFINED HERE, used by: frontend, api, workers
|
|
47
|
-
- `Config` - defined in core, IMPORTED HERE
|
|
48
|
-
|
|
49
|
-
## Patterns & Invariants
|
|
50
|
-
- Auth middleware runs before handlers
|
|
51
|
-
|
|
52
|
-
## Interfaces
|
|
53
|
-
- → frontend: sends Message via WebSocket
|
|
54
|
-
- ← api: receives Request, returns Response
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
Keep area files under 200 lines. Simple areas may be 20-30 lines; complex areas will be longer.
|
|
58
|
-
|
|
59
|
-
**Shared Objects note**: When present, prevents duplicate definitions. Mark canonical location.
|
|
60
|
-
|
|
61
|
-
## Defragmentation
|
|
62
|
-
|
|
63
|
-
**When to defrag an area:**
|
|
64
|
-
- Information is scattered/duplicated within the file
|
|
65
|
-
- Sections contain outdated content mixed with current
|
|
66
|
-
- File has grown beyond 200 lines
|
|
67
|
-
- Reading the file doesn't quickly answer "what do I need to know?"
|
|
68
|
-
|
|
69
|
-
**Defrag process:**
|
|
70
|
-
1. Read the entire area file
|
|
71
|
-
2. Identify: duplicates, outdated info, poor organization
|
|
72
|
-
3. Consolidate related information
|
|
73
|
-
4. Remove obsolete content (don't comment it out - delete)
|
|
74
|
-
5. Verify remaining content is accurate against current code
|
|
75
|
-
6. Update the `Updated` date
|
|
76
|
-
|
|
77
|
-
**Consult user before defragging if:**
|
|
78
|
-
- Multiple areas need simultaneous restructuring
|
|
79
|
-
- Unsure whether information is obsolete or still relevant
|
|
80
|
-
- Defrag would take significant time
|
|
81
|
-
|
|
82
|
-
## Area Separation
|
|
83
|
-
|
|
84
|
-
**Heuristics for deciding areas:**
|
|
85
|
-
- Group by logical module/subsystem, not by file type
|
|
86
|
-
- An area should be loadable and useful independently
|
|
87
|
-
- If two areas are always loaded together, consider merging
|
|
88
|
-
- If an area covers unrelated concerns, consider splitting
|
|
89
|
-
|
|
90
|
-
**When to split an area:**
|
|
91
|
-
- File exceeds 200 lines despite being concise
|
|
92
|
-
- Contains distinct subsystems that don't interact
|
|
93
|
-
- Load-when triggers have diverged (some tasks need part A, others need part B)
|
|
94
|
-
|
|
95
|
-
**When to merge areas:**
|
|
96
|
-
- Two areas are nearly always loaded together
|
|
97
|
-
- Combined size would still be under 150 lines
|
|
98
|
-
- Separation creates artificial boundaries
|
|
99
|
-
|
|
100
|
-
**Cross-references:**
|
|
101
|
-
- Areas can note "see also: [other-area]" for related context
|
|
102
|
-
- Don't auto-load chains - let the index's load-when guide loading
|
|
103
|
-
- If area A heavily depends on area B, note this in A's Interfaces section
|
|
104
|
-
|
|
105
|
-
## Note Pruning
|
|
106
|
-
|
|
107
|
-
Notes in area-index.md capture learnings. Prune when:
|
|
108
|
-
- Note contradicts newer information (keep newer)
|
|
109
|
-
- Code changed and note no longer applies
|
|
110
|
-
- Note is vague or not actionable
|
|
111
|
-
- Area exceeds 10 notes
|
|
112
|
-
|
|
113
|
-
**Pruning is lightweight** - remove stale notes during routine updates, don't treat as separate task.
|
|
114
|
-
|
|
115
|
-
## New Project Initialization
|
|
116
|
-
|
|
117
|
-
When skill is introduced to a new codebase:
|
|
118
|
-
|
|
119
|
-
1. Clear `areas/` directory
|
|
120
|
-
2. Reset area-index.md to template state
|
|
121
|
-
3. Keep SKILL.md and maintenance.md intact
|
|
122
|
-
4. Scan project structure:
|
|
123
|
-
- Look for obvious module boundaries (directories, packages)
|
|
124
|
-
- Check build configs (package.json, pyproject.toml, etc.)
|
|
125
|
-
- Read CLAUDE.md for existing documentation pointers
|
|
126
|
-
5. Propose 3-6 initial areas to user
|
|
127
|
-
6. After approval, create area files with initial discovery
|
|
128
|
-
7. Mark all as freshly created - validate through actual use
|