-
Notifications
You must be signed in to change notification settings - Fork 0
Command Workspace Architecture Migration - Foundation Tests & Governance Compliance #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
8d33684
5ba7f8b
acc1340
b9c1a45
8439bdc
2a56b0b
620268d
e169e96
7ac0d00
b9798af
24edae1
41360c2
87c4f91
4bf4936
53ccfd5
0c20533
18f20d6
60977ef
10cc1e4
9c5c617
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| .node_modules | ||
| .next | ||
| .playwright-report | ||
| coverage | ||
| public | ||
| .taskmaster | ||
| .idea | ||
| .vscode | ||
| **/_archive/** | ||
| **/dist/** | ||
| **/build/** | ||
| **/*.min.* | ||
| **/*.generated.* | ||
| **/*.d.ts | ||
| **/*.md | ||
| **/*.png | ||
| **/*.jpg | ||
| **/*.svg | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,127 @@ | ||
| { | ||
| "$schema": "https://json.schemastore.org/governance", | ||
| "version": "1.0.0", | ||
| "description": "Command Center development governance - streamlined for rapid iteration while maintaining quality", | ||
| "governance": { | ||
| "enabled": true, | ||
| "level": "development", | ||
| "autoFix": false, | ||
| "autoRollback": false, | ||
| "failureThreshold": 60, | ||
| "warningThreshold": 75 | ||
| }, | ||
| "qualityGates": { | ||
| "foundationProtection": { | ||
| "enabled": true, | ||
| "weight": 0.40, | ||
| "priority": "critical", | ||
| "rules": { | ||
| "preserveCommandCenterCalendar": true, | ||
| "maintainPerformance": true, | ||
| "noBreakingChanges": true | ||
| } | ||
| }, | ||
| "cheatcalFeatures": { | ||
| "enabled": true, | ||
| "weight": 0.25, | ||
| "rules": { | ||
| "controversialThemes": { | ||
| "implemented": true, | ||
| "professionalQuality": true | ||
| }, | ||
| "aiIntegration": { | ||
| "contextEngine": true, | ||
| "computerVision": true, | ||
| "performanceOptimized": true | ||
| }, | ||
| "marketplaceFeatures": { | ||
| "valueTracking": true, | ||
| "revenueSharing": true | ||
| } | ||
| } | ||
| }, | ||
| "designTokens": { | ||
| "enabled": true, | ||
| "weight": 0.15, | ||
| "rules": { | ||
| "coverage": { | ||
| "minimum": 70, | ||
| "target": 85 | ||
| }, | ||
| "violations": { | ||
| "maximum": 10, | ||
| "warning": 20 | ||
| }, | ||
| "naming": { | ||
| "enforceConventions": false, | ||
| "allowedPatterns": ["camelCase", "kebab-case", "design-system", "numeric"] | ||
| } | ||
| } | ||
| }, | ||
|
Comment on lines
+43
to
+60
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π οΈ Refactor suggestion Unify design token and performance gates with top-level governance. This fileβs thresholds conflict with .governancerc.json (naming enforcement off here vs on there; bundle/memory limits looser here). Divergence will create flaky gates across branches. Apply to align with top-level (.governancerc.json): - "naming": {
- "enforceConventions": false,
- "allowedPatterns": ["camelCase", "kebab-case", "design-system", "numeric"]
- }
+ "naming": {
+ "enforceConventions": true,
+ "allowedPatterns": ["camelCase", "kebab-case", "design-system"]
+ }
...
- "memoryUsage": {
- "maximum": "120MB",
- "baseline": "100MB"
- },
- "bundleSize": {
- "initial": "600KB",
- "total": "3MB",
- "component": "75KB"
- }
+ "memoryUsage": {
+ "maximum": "100MB",
+ "baseline": "100MB"
+ },
+ "bundleSize": {
+ "initial": "500KB",
+ "total": "2MB",
+ "component": "50KB"
+ }Also applies to: 61-79 π€ Prompt for AI Agents |
||
| "performance": { | ||
| "enabled": true, | ||
| "weight": 0.20, | ||
| "rules": { | ||
| "fps": { | ||
| "minimum": 60, | ||
| "target": 112, | ||
| "baseline": "preserve_existing" | ||
| }, | ||
| "memoryUsage": { | ||
| "maximum": "120MB", | ||
| "baseline": "100MB" | ||
| }, | ||
| "bundleSize": { | ||
| "initial": "600KB", | ||
| "total": "3MB", | ||
| "component": "75KB" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "enforcement": { | ||
| "preCommit": { | ||
| "enabled": true, | ||
| "skipOn": ["wip", "draft", "cheatcal-dev"], | ||
| "hooks": [ | ||
| "test:foundation" | ||
| ] | ||
| }, | ||
| "prePush": { | ||
| "enabled": true, | ||
| "hooks": [ | ||
| "test:foundation", | ||
| "pnpm build" | ||
| ] | ||
| } | ||
| }, | ||
| "exemptions": { | ||
| "files": [ | ||
| "*.test.ts", | ||
| "*.spec.ts", | ||
| "*.stories.ts", | ||
| "docs/**/*", | ||
| "scripts/**/*", | ||
| "design/**/*", | ||
| "lib/computer-vision/**/*", | ||
| "electron/**/*", | ||
| "lib/marketplace/**/*", | ||
| "lib/community/**/*", | ||
| "lib/viral/**/*", | ||
| "components/cheatcal/**/*", | ||
| "components/viral/**/*", | ||
| "app/cheatcal/**/*" | ||
| ], | ||
|
Comment on lines
+99
to
+114
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π οΈ Refactor suggestion Exemptions too broad; overrides lack approval. Large path globs effectively bypass gates; overrides without approval increase risk. "files": [
- "*.test.ts",
- "*.spec.ts",
- "*.stories.ts",
- "docs/**/*",
- "scripts/**/*",
- "design/**/*",
- "lib/computer-vision/**/*",
- "electron/**/*",
- "lib/marketplace/**/*",
- "lib/community/**/*",
- "lib/viral/**/*",
- "components/cheatcal/**/*",
- "components/viral/**/*",
- "app/cheatcal/**/*"
+ "*.test.ts",
+ "*.spec.ts",
+ "*.stories.ts",
+ "docs/**/*"
],
...
- "temporaryOverrides": {
+ "temporaryOverrides": {
"enabled": true,
- "approvalRequired": false,
- "maxDuration": "30d",
+ "approvalRequired": true,
+ "maxDuration": "14d",
"reason": "Command Center rapid development phase"
}Also applies to: 120-125 π€ Prompt for AI Agents |
||
| "branches": [ | ||
| "feature/cheatcal-*", | ||
| "experimental/*", | ||
| "prototype/*" | ||
| ], | ||
| "temporaryOverrides": { | ||
| "enabled": true, | ||
| "approvalRequired": false, | ||
| "maxDuration": "30d", | ||
| "reason": "Command Center rapid development phase" | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,217 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # ποΈ Command Workspace Development Rules for Cursor IDE | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Research-validated patterns for optimal Command Workspace implementation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## π― ARCHITECTURE FUNDAMENTALS | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| You are working on **LinearTime Command Workspace** - an AI-powered productivity platform with three-pane architecture (Sidebar + Tabs + Context Dock). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### PRIMARY ARCHITECTURE (USE THESE ONLY): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Shell**: `components/shell/AppShell.tsx` - Three-pane layout with react-resizable-panels | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Commands**: `components/commands/CommandPalette.tsx` - fuzzysort + Ctrl+P/Cmd+P (Obsidian patterns) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Views**: `views/week/WeekView.tsx` etc. - ViewScaffold contract (Header + Content + Context) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Context Dock**: `components/dock/ContextDock.tsx` - AI agents + contextual panels | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **State**: Zustand for workspace state, React Context for component state | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### π¨ DEPRECATED & BANNED (DO NOT USE): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - β `LinearCalendarHorizontal` outside `views/year-lens/` (ARCHITECTURAL VIOLATION) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - β Calendar-centric routing or layouts as primary interface | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - β Direct calendar foundation imports in shell components | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - β Hardcoded colors (use semantic tokens: bg-background, text-foreground, etc.) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+15
to
+20
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π οΈ Refactor suggestion Governance: make the βbannedβ rules enforceable in CI. Documented constraints wonβt stick without static rules. Add import/no-restricted-paths and no-restricted-imports entries and wire them to governance:workspace. Example ESLint config to reference here (and in .governancerc.json): +// .eslintrc.cjs (snippet)
+rules: {
+ 'no-restricted-imports': ['error', {
+ paths: [{
+ name: '@/components/calendar/LinearCalendarHorizontal',
+ message: 'Use only from views/year-lens/*'
+ }],
+ patterns: ['**/components/calendar/**']
+ }],
+ 'import/no-restricted-paths': ['error', {
+ zones: [
+ { target: './components/shell', from: './components/calendar' }
+ ]
+ }],
+}
π€ Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## π RESEARCH-VALIDATED PATTERNS | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### Command System (Obsidian + Schedule X patterns): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Command Palette**: Use fuzzysort for fuzzy search, Ctrl+P/Cmd+P shortcuts | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Keyboard Navigation**: Double-click event creation <120ms, escape key handling, focus management | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Intent Classification**: Vercel AI SDK with β₯0.8 confidence auto-execute, <0.8 confirm | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### AI Integration (Rasa + Timefold patterns): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Conversation Management**: Slot-based state with multi-turn context (max_history pattern) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Constraint Solving**: forEachUniquePair analysis for conflict detection (Timefold pattern) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Tool Safety**: Auto-approval lists, scoped permissions, audit logging | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### State Management (Research-optimized): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Workspace State**: Zustand with persist middleware for layouts, tabs, dock panels | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Component State**: React Context for view-specific state | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **AI State**: Separate Zustand store for conversation context and agent state | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## π οΈ IMPLEMENTATION GUIDELINES | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### Component Development: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ```typescript | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // β CORRECT: View implementation with scaffold | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const WeekView = () => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const { events } = useCalendarEvents() // Backend integration preserved | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <ViewScaffold | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| header={<WeekViewHeader />} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| content={<WeekGrid events={events} />} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| contextPanels={['conflicts', 'capacity']} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // β WRONG: Direct calendar foundation usage | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import LinearCalendarHorizontal from '@/components/calendar/LinearCalendarHorizontal' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### State Management Patterns: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ```typescript | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // β CORRECT: Zustand for workspace state | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const useAppShell = create<AppShellState>()( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| persist( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| (set) => ({ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| activeView: 'week', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| dockPanels: ['ai'], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| setActiveView: (view) => set({ activeView: view }) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { name: 'workspace-storage' } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+60
to
+71
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π οΈ Refactor suggestion Persisted Zustand store needs versioning/migrations. Persist without version and migrate leads to brittle restores after schema changes. Add version/migrate/partialize: - persist(
- (set) => ({
+ persist(
+ (set, get) => ({
activeView: 'week',
dockPanels: ['ai'],
setActiveView: (view) => set({ activeView: view })
- }),
- { name: 'workspace-storage' }
+ }),
+ {
+ name: 'workspace-storage',
+ version: 2,
+ migrate: (state, version) => version < 2 ? { ...state, dockPanels: state.dockPanels ?? [] } : state,
+ partialize: (state) => ({ activeView: state.activeView, dockPanels: state.dockPanels })
+ }
)π Committable suggestion
Suggested change
π€ Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // β CORRECT: Feature flag usage | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const { shouldShowShell } = useCommandWorkspaceShell() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (!shouldShowShell) return <LegacyCalendarFallback /> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### Command Registration: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ```typescript | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // β CORRECT: Type-safe command registration | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const COMMANDS = { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| NAVIGATE_WEEK: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| id: 'navigate.week', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| title: 'Navigate to Week View', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| shortcut: 'mod+1', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| category: 'navigation', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| execute: () => router.push('/app?view=week') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } as const | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## π¨ DESIGN SYSTEM INTEGRATION | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### Typography (Vercel Geist fonts): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ```typescript | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // app/layout.tsx | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import { GeistSans } from 'geist/font/sans' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import { GeistMono } from 'geist/font/mono' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <html className={`${GeistSans.variable} ${GeistMono.variable}`}> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <body className="font-sans bg-background text-foreground"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+94
to
+103
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π οΈ Refactor suggestion Design tokens: specify required tailwind preset and token map. You ban hardcoded colors, but donβt show where tokens (bg-background, text-foreground, border-border) come from. Add the tailwind preset/plugin and the CSS vars source of truth. π€ Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### Styling Guidelines: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Typography**: `font-sans` (Geist Sans), `font-mono` (Geist Mono) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Colors**: ONLY semantic tokens (bg-background, text-foreground, border-border) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Components**: Use shadcn/ui components with proper semantic tokens | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Responsive**: 700px breakpoint for mobile adaptation (Schedule X research) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## π§ͺ TESTING REQUIREMENTS | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### Component Testing: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ```typescript | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Required tests for each component | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| describe('ComponentName', () => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| test('renders without errors', () => {}) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| test('handles keyboard navigation', () => {}) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| test('integrates with feature flags', () => {}) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| test('maintains performance budgets', () => {}) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### E2E Testing with Playwright: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Shell Tests**: Three-pane layout, panel resizing, tab navigation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Keyboard Tests**: Command palette (Ctrl+P), double-click creation (<120ms) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **AI Tests**: Agent responses (<2s), tool safety, conversation context | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Performance Tests**: Bundle sizes (<150KB shell), render times (<500ms) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## π SAFETY & VALIDATION | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### Before Every Commit: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pnpm run test:shell # Command Workspace validation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pnpm run governance:workspace # Architecture compliance | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pnpm run test:governance # Full governance check | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pnpm run build # Build validation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+133
to
+137
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Script runner inconsistency (pnpm vs npm). PR summary says npm run governance:workspace; here you prescribe pnpm. Align to one to avoid broken contributor workflows. -pnpm run test:shell
-pnpm run governance:workspace
-pnpm run test:governance
-pnpm run build
+npm run test:shell
+npm run governance:workspace
+npm run test:governance
+npm run buildπ Committable suggestion
Suggested change
π€ Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### Emergency Procedures: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pnpm run emergency:disable-shell # Instant shell disable | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pnpm run emergency:rollback # Complete rollback to calendar | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pnpm run emergency:gradual-rollback # Phase-by-phase rollback | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### Development Validation: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Feature Flags**: Always check flag status before implementing features | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Architecture**: Use governance validation before PR creation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Performance**: Monitor bundle sizes and render performance continuously | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Accessibility**: WCAG 2.1 AA compliance for all new components | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## π FILE STRUCTURE GUIDANCE | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### NEW Components (Command Workspace): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| components/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| βββ shell/ # π PRIMARY: Three-pane shell components | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| βββ commands/ # π PRIMARY: Command palette, omnibox, keyboard | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| βββ dock/ # π PRIMARY: Context dock panels and management | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| βββ calendar/ # π¨ LEGACY: Only for year-lens view integration | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### NEW Views (Research-validated): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| views/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| βββ week/ # Primary view with calendar integration | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| βββ planner/ # Kanban + time-blocking with drag & drop | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| βββ notes/ # Markdown editing with entity linking | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| βββ mailbox/ # Email triage with entity conversion | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| βββ year-lens/ # π¨ LEGACY: Only allowed LinearCalendarHorizontal usage | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### State & Hooks: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| contexts/ # Workspace providers (AppShell, Command, Omnibox) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| hooks/ # Workspace hooks (useAppShell, useCommands, etc.) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| lib/ai/ # AI agents and MCP tool integration | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| lib/emergency/ # Rollback systems and safety procedures | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## π DEVELOPMENT WORKFLOW | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### Daily Development Cycle: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1. **Morning**: `pnpm run governance:workspace` (validate compliance) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2. **Development**: Build features with Storybook documentation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3. **Testing**: Component + E2E testing for each change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4. **Integration**: Feature flag testing + performance monitoring | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5. **Evening**: Bundle analysis + performance regression check | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### Quality Gates: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Architecture**: No LinearCalendarHorizontal imports outside year-lens/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Performance**: Shell <150KB, Views <100KB, Panels <50KB | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Accessibility**: Keyboard-only navigation, WCAG 2.1 AA compliance | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **AI Safety**: Tool permissions, auto-approval lists, audit logging | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## π‘ BEST PRACTICES | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### Component Creation: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1. Start with Storybook story for isolated development | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2. Implement ViewScaffold contract for views | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3. Use feature flags for gradual rollout | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4. Add comprehensive keyboard navigation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5. Integrate with Context Dock for contextual information | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### AI Agent Development: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1. Use research-validated patterns (Rasa conversation, Timefold constraint solving) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2. Implement tool safety with auto-approval lists | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3. Add streaming responses with confidence thresholds | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4. Maintain conversation context with state persistence | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### Performance Optimization: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1. Monitor bundle sizes continuously with webpack-bundle-analyzer | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2. Use React.memo for expensive components | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3. Implement virtualization for large lists | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4. Code-split by view and dock panel | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Remember: **Preserve all existing functionality** while implementing Command Workspace architecture. The goal is **enhancement, not replacement** of working systems. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix incorrect ignore for node_modules
".node_modules" wonβt match the standard folder. Use "node_modules".
π Committable suggestion
π€ Prompt for AI Agents