sisyphi 1.1.18 → 1.1.23
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/README.md +195 -75
- package/deploy/aws/main.tf +121 -0
- package/deploy/aws/outputs.tf +18 -0
- package/deploy/aws/variables.tf +69 -0
- package/deploy/aws/versions.tf +16 -0
- package/deploy/hetzner/.terraform.lock.hcl +23 -0
- package/deploy/hetzner/main.tf +69 -0
- package/deploy/hetzner/outputs.tf +18 -0
- package/deploy/hetzner/variables.tf +57 -0
- package/deploy/hetzner/versions.tf +15 -0
- package/deploy/shared/bin/pbcopy-shim +5 -0
- package/deploy/shared/bin/pbpaste-shim +4 -0
- package/deploy/shared/cloud-init.yaml.tpl +119 -0
- package/deploy/shared/sisyphusd.service.tpl +17 -0
- package/deploy/shared/tmux-osc52.conf +10 -0
- package/dist/cli.js +8406 -1522
- package/dist/cli.js.map +1 -1
- package/dist/daemon.js +7137 -1398
- package/dist/daemon.js.map +1 -1
- package/dist/deploy/aws/main.tf +121 -0
- package/dist/deploy/aws/outputs.tf +18 -0
- package/dist/deploy/aws/variables.tf +69 -0
- package/dist/deploy/aws/versions.tf +16 -0
- package/dist/deploy/hetzner/.terraform.lock.hcl +23 -0
- package/dist/deploy/hetzner/main.tf +69 -0
- package/dist/deploy/hetzner/outputs.tf +18 -0
- package/dist/deploy/hetzner/variables.tf +57 -0
- package/dist/deploy/hetzner/versions.tf +15 -0
- package/dist/deploy/shared/bin/pbcopy-shim +5 -0
- package/dist/deploy/shared/bin/pbpaste-shim +4 -0
- package/dist/deploy/shared/cloud-init.yaml.tpl +119 -0
- package/dist/deploy/shared/sisyphusd.service.tpl +17 -0
- package/dist/deploy/shared/tmux-osc52.conf +10 -0
- package/dist/templates/CLAUDE.md +1 -56
- package/dist/templates/agent-plugin/agents/CLAUDE.md +2 -65
- package/dist/templates/agent-plugin/agents/debug.md +43 -6
- package/dist/templates/agent-plugin/agents/debug.settings.json +57 -0
- package/dist/templates/agent-plugin/agents/explore.md +28 -1
- package/dist/templates/agent-plugin/agents/explore.settings.json +57 -0
- package/dist/templates/agent-plugin/agents/implementor.md +94 -0
- package/dist/templates/agent-plugin/agents/implementor.settings.json +57 -0
- package/dist/templates/agent-plugin/agents/operator.md +43 -1
- package/dist/templates/agent-plugin/agents/operator.settings.json +57 -0
- package/dist/templates/agent-plugin/agents/plan/sub-planner.md +75 -0
- package/dist/templates/agent-plugin/agents/plan.md +176 -86
- package/dist/templates/agent-plugin/agents/plan.settings.json +57 -0
- package/dist/templates/agent-plugin/agents/problem/adversarial.md +26 -0
- package/dist/templates/agent-plugin/agents/problem/contrarian.md +26 -0
- package/dist/templates/agent-plugin/agents/problem/first-principles.md +26 -0
- package/dist/templates/agent-plugin/agents/problem/precedent.md +25 -0
- package/dist/templates/agent-plugin/agents/problem/simplifier.md +26 -0
- package/dist/templates/agent-plugin/agents/problem/systems-thinker.md +26 -0
- package/dist/templates/agent-plugin/agents/problem/time-traveler.md +26 -0
- package/dist/templates/agent-plugin/agents/problem/user-empathy.md +26 -0
- package/dist/templates/agent-plugin/agents/problem.md +334 -79
- package/dist/templates/agent-plugin/agents/problem.settings.json +57 -0
- package/dist/templates/agent-plugin/agents/research-lead/CLAUDE.md +26 -0
- package/dist/templates/agent-plugin/agents/research-lead/critic.md +61 -0
- package/dist/templates/agent-plugin/agents/research-lead/researcher.md +60 -0
- package/dist/templates/agent-plugin/agents/research-lead.md +184 -0
- package/dist/templates/agent-plugin/agents/research-lead.settings.json +57 -0
- package/dist/templates/agent-plugin/agents/review/CLAUDE.md +3 -29
- package/dist/templates/agent-plugin/agents/review/compliance.md +14 -3
- package/dist/templates/agent-plugin/agents/review/efficiency.md +15 -4
- package/dist/templates/agent-plugin/agents/review/quality.md +20 -6
- package/dist/templates/agent-plugin/agents/review/reuse.md +17 -5
- package/dist/templates/agent-plugin/agents/review/security.md +10 -3
- package/dist/templates/agent-plugin/agents/review/tests.md +58 -0
- package/dist/templates/agent-plugin/agents/review-plan/CLAUDE.md +28 -0
- package/dist/templates/agent-plugin/agents/review-plan/code-smells.md +4 -2
- package/dist/templates/agent-plugin/agents/review-plan/pattern-consistency.md +4 -2
- package/dist/templates/agent-plugin/agents/review-plan/requirements-coverage.md +3 -1
- package/dist/templates/agent-plugin/agents/review-plan/security.md +5 -2
- package/dist/templates/agent-plugin/agents/review-plan.md +52 -5
- package/dist/templates/agent-plugin/agents/review-plan.settings.json +57 -0
- package/dist/templates/agent-plugin/agents/review.md +89 -16
- package/dist/templates/agent-plugin/agents/review.settings.json +57 -0
- package/dist/templates/agent-plugin/agents/spec/engineer.md +175 -0
- package/dist/templates/agent-plugin/agents/spec/requirements-writer.md +149 -0
- package/dist/templates/agent-plugin/agents/spec.md +444 -0
- package/dist/templates/agent-plugin/agents/spec.settings.json +57 -0
- package/dist/templates/agent-plugin/agents/test-spec.md +58 -2
- package/dist/templates/agent-plugin/agents/test-spec.settings.json +57 -0
- package/dist/templates/agent-plugin/hooks/CLAUDE.md +9 -57
- package/dist/templates/agent-plugin/hooks/ask-background-guard.sh +57 -0
- package/dist/templates/agent-plugin/hooks/intercept-send-message.sh +1 -1
- package/dist/templates/agent-plugin/hooks/plan-user-prompt.sh +8 -7
- package/dist/templates/agent-plugin/hooks/plan-validate.sh +97 -0
- package/dist/templates/agent-plugin/hooks/plan-write-path.sh +55 -0
- package/dist/templates/agent-plugin/hooks/problem-user-prompt.sh +26 -0
- package/dist/templates/agent-plugin/hooks/register-bg-task.sh +37 -0
- package/dist/templates/agent-plugin/hooks/require-submit.sh +51 -42
- package/dist/templates/agent-plugin/hooks/review-user-prompt.sh +6 -2
- package/dist/templates/agent-plugin/hooks/spec-user-prompt.sh +43 -0
- package/dist/templates/agent-plugin/skills/humanloop/SKILL.md +147 -0
- package/dist/templates/agent-plugin/skills/perspective-fanout/SKILL.md +115 -0
- package/dist/templates/agent-plugin/skills/problem-document/SKILL.md +105 -0
- package/dist/templates/agent-plugin/skills/problem-plateau-breakers/SKILL.md +83 -0
- package/dist/templates/agent-suffix.md +7 -4
- package/dist/templates/baleia.lua +42 -0
- package/dist/templates/companion-plugin/hooks/user-prompt-context.sh +1 -1
- package/dist/templates/dashboard-claude.md +7 -3
- package/dist/templates/orchestrator-base.md +89 -52
- package/dist/templates/orchestrator-completion.md +47 -24
- package/dist/templates/orchestrator-discovery.md +183 -0
- package/dist/templates/orchestrator-impl.md +47 -18
- package/dist/templates/orchestrator-planning.md +109 -20
- package/dist/templates/orchestrator-plugin/commands/sisyphus/scratch.md +19 -0
- package/dist/templates/orchestrator-plugin/commands/sisyphus/spec.md +11 -0
- package/dist/templates/orchestrator-plugin/commands/sisyphus/strategize.md +5 -5
- package/dist/templates/orchestrator-plugin/hooks/hooks.json +0 -10
- package/dist/templates/orchestrator-plugin/skills/humanloop/SKILL.md +149 -0
- package/dist/templates/orchestrator-plugin/skills/orchestration/CLAUDE.md +1 -0
- package/dist/templates/orchestrator-plugin/skills/orchestration/SKILL.md +2 -1
- package/dist/templates/orchestrator-plugin/skills/orchestration/strategy.md +160 -0
- package/dist/templates/orchestrator-plugin/skills/orchestration/task-patterns.md +26 -28
- package/dist/templates/orchestrator-plugin/skills/orchestration/workflow-examples.md +133 -25
- package/dist/templates/orchestrator-settings.json +55 -0
- package/dist/templates/orchestrator-validation.md +17 -14
- package/dist/templates/sisyphus-init.lua +30 -0
- package/dist/templates/sisyphus-tmux-plugin/hooks/hooks.json +54 -0
- package/dist/templates/sisyphus-tmux-plugin/hooks/tmux-state.sh +19 -0
- package/dist/templates/termrender-haiku-system.md +82 -0
- package/dist/templates/whip-animation.sh +345 -0
- package/dist/tui.js +6711 -2928
- package/dist/tui.js.map +1 -1
- package/native/SisyphusNotify/main.swift +15 -5
- package/native/build-notify.sh +23 -0
- package/package.json +11 -8
- package/templates/CLAUDE.md +1 -56
- package/templates/agent-plugin/agents/CLAUDE.md +2 -65
- package/templates/agent-plugin/agents/debug.md +43 -6
- package/templates/agent-plugin/agents/debug.settings.json +57 -0
- package/templates/agent-plugin/agents/explore.md +28 -1
- package/templates/agent-plugin/agents/explore.settings.json +57 -0
- package/templates/agent-plugin/agents/implementor.md +94 -0
- package/templates/agent-plugin/agents/implementor.settings.json +57 -0
- package/templates/agent-plugin/agents/operator.md +43 -1
- package/templates/agent-plugin/agents/operator.settings.json +57 -0
- package/templates/agent-plugin/agents/plan/sub-planner.md +75 -0
- package/templates/agent-plugin/agents/plan.md +176 -86
- package/templates/agent-plugin/agents/plan.settings.json +57 -0
- package/templates/agent-plugin/agents/problem/adversarial.md +26 -0
- package/templates/agent-plugin/agents/problem/contrarian.md +26 -0
- package/templates/agent-plugin/agents/problem/first-principles.md +26 -0
- package/templates/agent-plugin/agents/problem/precedent.md +25 -0
- package/templates/agent-plugin/agents/problem/simplifier.md +26 -0
- package/templates/agent-plugin/agents/problem/systems-thinker.md +26 -0
- package/templates/agent-plugin/agents/problem/time-traveler.md +26 -0
- package/templates/agent-plugin/agents/problem/user-empathy.md +26 -0
- package/templates/agent-plugin/agents/problem.md +334 -79
- package/templates/agent-plugin/agents/problem.settings.json +57 -0
- package/templates/agent-plugin/agents/research-lead/CLAUDE.md +26 -0
- package/templates/agent-plugin/agents/research-lead/critic.md +61 -0
- package/templates/agent-plugin/agents/research-lead/researcher.md +60 -0
- package/templates/agent-plugin/agents/research-lead.md +184 -0
- package/templates/agent-plugin/agents/research-lead.settings.json +57 -0
- package/templates/agent-plugin/agents/review/CLAUDE.md +3 -29
- package/templates/agent-plugin/agents/review/compliance.md +14 -3
- package/templates/agent-plugin/agents/review/efficiency.md +15 -4
- package/templates/agent-plugin/agents/review/quality.md +20 -6
- package/templates/agent-plugin/agents/review/reuse.md +17 -5
- package/templates/agent-plugin/agents/review/security.md +10 -3
- package/templates/agent-plugin/agents/review/tests.md +58 -0
- package/templates/agent-plugin/agents/review-plan/CLAUDE.md +28 -0
- package/templates/agent-plugin/agents/review-plan/code-smells.md +4 -2
- package/templates/agent-plugin/agents/review-plan/pattern-consistency.md +4 -2
- package/templates/agent-plugin/agents/review-plan/requirements-coverage.md +3 -1
- package/templates/agent-plugin/agents/review-plan/security.md +5 -2
- package/templates/agent-plugin/agents/review-plan.md +52 -5
- package/templates/agent-plugin/agents/review-plan.settings.json +57 -0
- package/templates/agent-plugin/agents/review.md +89 -16
- package/templates/agent-plugin/agents/review.settings.json +57 -0
- package/templates/agent-plugin/agents/spec/engineer.md +175 -0
- package/templates/agent-plugin/agents/spec/requirements-writer.md +149 -0
- package/templates/agent-plugin/agents/spec.md +444 -0
- package/templates/agent-plugin/agents/spec.settings.json +57 -0
- package/templates/agent-plugin/agents/test-spec.md +58 -2
- package/templates/agent-plugin/agents/test-spec.settings.json +57 -0
- package/templates/agent-plugin/hooks/CLAUDE.md +9 -57
- package/templates/agent-plugin/hooks/ask-background-guard.sh +57 -0
- package/templates/agent-plugin/hooks/intercept-send-message.sh +1 -1
- package/templates/agent-plugin/hooks/plan-user-prompt.sh +8 -7
- package/templates/agent-plugin/hooks/plan-validate.sh +97 -0
- package/templates/agent-plugin/hooks/plan-write-path.sh +55 -0
- package/templates/agent-plugin/hooks/problem-user-prompt.sh +26 -0
- package/templates/agent-plugin/hooks/register-bg-task.sh +37 -0
- package/templates/agent-plugin/hooks/require-submit.sh +51 -42
- package/templates/agent-plugin/hooks/review-user-prompt.sh +6 -2
- package/templates/agent-plugin/hooks/spec-user-prompt.sh +43 -0
- package/templates/agent-plugin/skills/humanloop/SKILL.md +147 -0
- package/templates/agent-plugin/skills/perspective-fanout/SKILL.md +115 -0
- package/templates/agent-plugin/skills/problem-document/SKILL.md +105 -0
- package/templates/agent-plugin/skills/problem-plateau-breakers/SKILL.md +83 -0
- package/templates/agent-suffix.md +7 -4
- package/templates/baleia.lua +42 -0
- package/templates/companion-plugin/hooks/user-prompt-context.sh +1 -1
- package/templates/dashboard-claude.md +7 -3
- package/templates/orchestrator-base.md +89 -52
- package/templates/orchestrator-completion.md +47 -24
- package/templates/orchestrator-discovery.md +183 -0
- package/templates/orchestrator-impl.md +47 -18
- package/templates/orchestrator-planning.md +109 -20
- package/templates/orchestrator-plugin/commands/sisyphus/scratch.md +19 -0
- package/templates/orchestrator-plugin/commands/sisyphus/spec.md +11 -0
- package/templates/orchestrator-plugin/commands/sisyphus/strategize.md +5 -5
- package/templates/orchestrator-plugin/hooks/hooks.json +0 -10
- package/templates/orchestrator-plugin/skills/humanloop/SKILL.md +149 -0
- package/templates/orchestrator-plugin/skills/orchestration/CLAUDE.md +1 -0
- package/templates/orchestrator-plugin/skills/orchestration/SKILL.md +2 -1
- package/templates/orchestrator-plugin/skills/orchestration/strategy.md +160 -0
- package/templates/orchestrator-plugin/skills/orchestration/task-patterns.md +26 -28
- package/templates/orchestrator-plugin/skills/orchestration/workflow-examples.md +133 -25
- package/templates/orchestrator-settings.json +55 -0
- package/templates/orchestrator-validation.md +17 -14
- package/templates/sisyphus-init.lua +30 -0
- package/templates/sisyphus-tmux-plugin/hooks/hooks.json +54 -0
- package/templates/sisyphus-tmux-plugin/hooks/tmux-state.sh +19 -0
- package/templates/termrender-haiku-system.md +82 -0
- package/templates/whip-animation.sh +345 -0
- package/dist/chunk-22ZGZTGY.js +0 -67
- package/dist/chunk-22ZGZTGY.js.map +0 -1
- package/dist/chunk-6PJVJEYQ.js +0 -46
- package/dist/chunk-6PJVJEYQ.js.map +0 -1
- package/dist/chunk-C2XKXERJ.js +0 -1052
- package/dist/chunk-C2XKXERJ.js.map +0 -1
- package/dist/chunk-TMBAVPHH.js +0 -129
- package/dist/chunk-TMBAVPHH.js.map +0 -1
- package/dist/chunk-V36NXMHP.js +0 -299
- package/dist/chunk-V36NXMHP.js.map +0 -1
- package/dist/paths-XRDEEJ5R.js +0 -66
- package/dist/paths-XRDEEJ5R.js.map +0 -1
- package/dist/templates/agent-plugin/agents/design.md +0 -134
- package/dist/templates/agent-plugin/agents/requirements.md +0 -138
- package/dist/templates/begin.md +0 -22
- package/dist/templates/nvim-tutorial.txt +0 -68
- package/dist/templates/orchestrator-plugin/commands/sisyphus/design.md +0 -13
- package/dist/templates/orchestrator-plugin/commands/sisyphus/requirements.md +0 -13
- package/dist/templates/orchestrator-plugin/hooks/idle-notify.sh +0 -71
- package/dist/templates/orchestrator-strategy.md +0 -238
- package/templates/agent-plugin/agents/design.md +0 -134
- package/templates/agent-plugin/agents/requirements.md +0 -138
- package/templates/begin.md +0 -22
- package/templates/nvim-tutorial.txt +0 -68
- package/templates/orchestrator-plugin/commands/sisyphus/design.md +0 -13
- package/templates/orchestrator-plugin/commands/sisyphus/requirements.md +0 -13
- package/templates/orchestrator-plugin/hooks/idle-notify.sh +0 -71
- package/templates/orchestrator-strategy.md +0 -238
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/shared/config.ts","../src/shared/shell.ts","../src/shared/companion-types.ts","../src/shared/companion-render.ts"],"sourcesContent":["import { readFileSync } from 'node:fs';\nimport { globalConfigPath, projectConfigPath } from './paths.js';\n\nexport type EffortLevel = 'low' | 'medium' | 'high' | 'max';\n\nexport interface NotificationConfig {\n enabled?: boolean;\n sound?: string;\n}\n\nexport interface RequiredPlugin {\n name: string;\n marketplace: string;\n}\n\nexport interface Config {\n model?: string;\n tmuxSession?: string;\n orchestratorPrompt?: string;\n pollIntervalMs?: number;\n autoUpdate?: boolean;\n orchestratorEffort?: EffortLevel;\n agentEffort?: EffortLevel;\n editor?: string;\n repos?: string[];\n notifications?: NotificationConfig;\n requiredPlugins?: RequiredPlugin[];\n}\n\nconst DEFAULT_CONFIG: Config = {\n pollIntervalMs: 5000,\n orchestratorEffort: 'high',\n agentEffort: 'medium',\n notifications: {\n enabled: true,\n sound: '/System/Library/Sounds/Hero.aiff',\n },\n requiredPlugins: [\n { name: 'devcore', marketplace: 'crouton-kit' },\n ],\n};\n\nfunction readJsonFile(filePath: string): Partial<Config> {\n try {\n const content = readFileSync(filePath, 'utf-8');\n return JSON.parse(content) as Partial<Config>;\n } catch {\n return {};\n }\n}\n\nexport function loadConfig(cwd: string): Config {\n const global = readJsonFile(globalConfigPath());\n const project = readJsonFile(projectConfigPath(cwd));\n return { ...DEFAULT_CONFIG, ...global, ...project };\n}\n","export function shellQuote(s: string): string {\n return `'${s.replace(/'/g, \"'\\\\''\")}'`;\n}\n","export type Mood = 'happy' | 'grinding' | 'frustrated' | 'zen' | 'sleepy' | 'excited' | 'existential';\n\nexport type CompanionField = 'face' | 'boulder' | 'title' | 'commentary' | 'mood' | 'level' | 'stats' | 'achievements';\n\nexport type CommentaryEvent =\n | 'session-start'\n | 'cycle-boundary'\n | 'session-complete'\n | 'level-up'\n | 'achievement'\n | 'agent-crash'\n | 'idle-wake'\n | 'late-night';\n\nexport type TimePersonality = 'chipper' | 'professional' | 'reflective' | 'dry-humor' | 'delirious';\n\nexport type IdleAnimation = 'sleeping' | 'pacing' | 'pondering' | 'flexing' | 'deep-sleep';\n\nexport type AchievementCategory = 'milestone' | 'session' | 'time' | 'behavioral';\n\nexport type AchievementId =\n // Milestone (25)\n | 'first-blood'\n | 'regular'\n | 'centurion'\n | 'veteran'\n | 'thousand-boulder'\n | 'cartographer'\n | 'world-traveler'\n | 'omnipresent'\n | 'swarm-starter'\n | 'hive-mind'\n | 'legion'\n | 'army-of-thousands'\n | 'singularity'\n | 'first-shift'\n | 'workaholic'\n | 'time-lord'\n | 'eternal-grind'\n | 'epoch'\n | 'old-growth'\n | 'seasoned'\n | 'ancient'\n | 'apprentice'\n | 'journeyman'\n | 'master'\n | 'grandmaster'\n // Session (19)\n | 'marathon'\n | 'squad'\n | 'battalion'\n | 'swarm'\n | 'blitz'\n | 'speed-run'\n | 'flash'\n | 'flawless'\n | 'iron-will'\n | 'glass-cannon'\n | 'solo'\n | 'one-more-cycle'\n | 'deep-dive'\n | 'abyss'\n | 'eternal-recurrence'\n | 'endurance'\n | 'ultramarathon'\n | 'one-shot'\n | 'quick-draw'\n // Time (6)\n | 'night-owl'\n | 'dawn-patrol'\n | 'early-bird'\n | 'weekend-warrior'\n | 'all-nighter'\n | 'witching-hour'\n // Behavioral (16)\n | 'sisyphean'\n | 'stubborn'\n | 'one-must-imagine'\n | 'creature-of-habit'\n | 'loyal'\n | 'wanderer'\n | 'streak'\n | 'iron-streak'\n | 'hot-streak'\n | 'momentum'\n | 'overdrive'\n | 'patient-one'\n | 'message-in-a-bottle'\n | 'deep-conversation'\n | 'comeback-kid'\n | 'pair-programming';\n\nexport interface AchievementDef {\n id: AchievementId;\n name: string;\n category: AchievementCategory;\n description: string;\n badge: string | null;\n}\n\nexport interface CompanionStats {\n strength: number; // lifetime completed sessions\n endurance: number; // lifetime active ms\n wisdom: number; // efficient orchestration count\n patience: number; // persistence score (cycles + lifecycle bonuses)\n}\n\nexport interface UnlockedAchievement {\n id: AchievementId;\n unlockedAt: string; // ISO timestamp\n}\n\nexport interface RepoMemory {\n visits: number;\n completions: number;\n crashes: number;\n totalActiveMs: number;\n moodAvg: number; // running average (0-1 scale)\n nickname: string | null;\n firstSeen: string; // ISO timestamp\n lastSeen: string; // ISO timestamp\n}\n\nexport interface LastCommentary {\n text: string;\n event: CommentaryEvent;\n timestamp: string; // ISO timestamp\n}\n\nexport interface CompanionState {\n version: 1;\n name: string | null;\n createdAt: string; // ISO timestamp\n stats: CompanionStats;\n xp: number;\n level: number;\n title: string;\n mood: Mood;\n moodUpdatedAt: string; // ISO timestamp\n achievements: UnlockedAchievement[];\n repos: Record<string, RepoMemory>; // keyed by absolute cwd path\n lastCommentary: LastCommentary | null;\n // Lifetime counters (redundant with derivable stats but kept for fast achievement checks)\n sessionsCompleted: number;\n sessionsCrashed: number;\n totalActiveMs: number;\n lifetimeAgentsSpawned: number;\n // Achievement tracking counters\n consecutiveCleanSessions: number;\n consecutiveEfficientSessions: number;\n consecutiveDaysActive: number;\n lastActiveDate: string | null; // ISO date string YYYY-MM-DD\n taskHistory: Record<string, number>; // normalized task hash → attempt count\n dailyRepos: Record<string, string[]>; // ISO date → array of repo paths\n recentCompletions: string[]; // last 3 ISO timestamps for momentum check\n // Debug: last mood signals and scores (written by pane-monitor, read by TUI debug overlay)\n debugMood?: {\n signals: MoodSignals;\n scores: Record<Mood, number>;\n winner: Mood;\n };\n}\n\nexport interface IdleState {\n animation: IdleAnimation;\n frame: number; // current frame index in the animation cycle\n idleSince: string; // ISO timestamp of last session event\n}\n\nexport interface CompanionRenderOpts {\n maxWidth?: number;\n color?: boolean;\n tmuxFormat?: boolean;\n repoPath?: string;\n agentCount?: number;\n}\n\nexport interface MoodSignals {\n recentCrashes: number; // crashes in last 30 minutes\n idleDurationMs: number; // ms since last session activity\n sessionLengthMs: number; // current session running time\n cleanStreak: number; // consecutive clean completions\n justCompleted: boolean; // session just completed successfully\n justCrashed: boolean; // agent just crashed\n justLeveledUp: boolean; // level up just happened\n hourOfDay: number; // 0-23\n activeAgentCount?: number; // agents currently with status === 'running'\n // NEW fields for richer mood scoring\n cycleCount?: number; // current session orchestrator cycle count\n sessionsCompletedToday?: number; // sessions completed today\n}\n\nexport const ACHIEVEMENTS: AchievementDef[] = [\n // Milestone (25)\n { id: 'first-blood', name: 'First Blood', category: 'milestone', description: 'Complete your first session.', badge: null },\n { id: 'regular', name: 'Regular', category: 'milestone', description: 'Complete 10 sessions.', badge: null },\n { id: 'centurion', name: 'Centurion', category: 'milestone', description: 'Complete 100 sessions.', badge: null },\n { id: 'veteran', name: 'Veteran', category: 'milestone', description: 'Complete 500 sessions.', badge: null },\n { id: 'thousand-boulder', name: 'Thousand Boulder', category: 'milestone', description: 'Complete 1,000 sessions.', badge: null },\n { id: 'cartographer', name: 'Cartographer', category: 'milestone', description: 'Work in 5 different repos.', badge: '+' },\n { id: 'world-traveler', name: 'World Traveler', category: 'milestone', description: 'Work in 15 different repos.', badge: null },\n { id: 'omnipresent', name: 'Omnipresent', category: 'milestone', description: 'Work in 30 different repos.', badge: null },\n { id: 'swarm-starter', name: 'Swarm Starter', category: 'milestone', description: 'Spawn 50 agents over a lifetime.', badge: null },\n { id: 'hive-mind', name: 'Hive Mind', category: 'milestone', description: 'Spawn 500 agents over a lifetime.', badge: null },\n { id: 'legion', name: 'Legion', category: 'milestone', description: 'Spawn 2,000 agents over a lifetime.', badge: null },\n { id: 'army-of-thousands', name: 'Army of Thousands', category: 'milestone', description: 'Spawn 5,000 agents over a lifetime.', badge: null },\n { id: 'singularity', name: 'Singularity', category: 'milestone', description: 'Spawn 10,000 agents over a lifetime.', badge: null },\n { id: 'first-shift', name: 'First Shift', category: 'milestone', description: '10 hours of total agent active time.', badge: null },\n { id: 'workaholic', name: 'Workaholic', category: 'milestone', description: '100 hours of total agent active time.', badge: null },\n { id: 'time-lord', name: 'Time Lord', category: 'milestone', description: '500 hours of total agent active time.', badge: null },\n { id: 'eternal-grind', name: 'Eternal Grind', category: 'milestone', description: '2,000 hours of total agent active time.', badge: null },\n { id: 'epoch', name: 'Epoch', category: 'milestone', description: '5,000 hours of total agent active time.', badge: null },\n { id: 'old-growth', name: 'Old Growth', category: 'milestone', description: 'Companion is 14 days old.', badge: null },\n { id: 'seasoned', name: 'Seasoned', category: 'milestone', description: 'Companion is 90 days old.', badge: null },\n { id: 'ancient', name: 'Ancient', category: 'milestone', description: 'Companion is 365 days old.', badge: null },\n { id: 'apprentice', name: 'Apprentice', category: 'milestone', description: 'Reach level 5.', badge: null },\n { id: 'journeyman', name: 'Journeyman', category: 'milestone', description: 'Reach level 15.', badge: null },\n { id: 'master', name: 'Master', category: 'milestone', description: 'Reach level 30.', badge: null },\n { id: 'grandmaster', name: 'Grandmaster', category: 'milestone', description: 'Reach level 50.', badge: null },\n // Session (19)\n { id: 'marathon', name: 'Marathon', category: 'session', description: 'Complete a session with 15+ agents.', badge: '~^~' },\n { id: 'squad', name: 'Squad Up', category: 'session', description: 'Complete a session with 10+ agents.', badge: null },\n { id: 'battalion', name: 'Battalion', category: 'session', description: 'Complete a session with 25+ agents.', badge: null },\n { id: 'swarm', name: 'The Swarm', category: 'session', description: 'Complete a session with 50+ agents.', badge: null },\n { id: 'blitz', name: 'Blitz', category: 'session', description: 'Complete a session in under 5 minutes.', badge: null },\n { id: 'speed-run', name: 'Speed Run', category: 'session', description: 'Complete a session in under 15 minutes.', badge: null },\n { id: 'flash', name: 'Flash', category: 'session', description: 'Complete a session in under 2 minutes.', badge: null },\n { id: 'flawless', name: 'Flawless', category: 'session', description: 'Complete a session with 10+ agents and zero crashes.', badge: '*' },\n { id: 'iron-will', name: 'Iron Will', category: 'session', description: '10 consecutive sessions completing in 3 or fewer cycles.', badge: '[]' },\n { id: 'glass-cannon', name: 'Glass Cannon', category: 'session', description: '5+ agents, all crashed, but session completed anyway.', badge: null },\n { id: 'solo', name: 'Solo', category: 'session', description: 'Complete a session with exactly one agent.', badge: null },\n { id: 'one-more-cycle', name: 'One More Cycle', category: 'session', description: 'A session with 10+ orchestrator cycles.', badge: null },\n { id: 'deep-dive', name: 'Deep Dive', category: 'session', description: 'A session with 15+ orchestrator cycles.', badge: null },\n { id: 'abyss', name: 'Into the Abyss', category: 'session', description: 'A session with 25+ orchestrator cycles.', badge: null },\n { id: 'eternal-recurrence', name: 'Eternal Recurrence', category: 'session', description: 'A session with 40+ orchestrator cycles.', badge: null },\n { id: 'endurance', name: 'Endurance', category: 'session', description: 'A single session running 4+ hours.', badge: null },\n { id: 'ultramarathon', name: 'Ultramarathon', category: 'session', description: 'A single session running 6+ hours.', badge: null },\n { id: 'one-shot', name: 'One Shot', category: 'session', description: 'Complete with 5+ agents in exactly 1 orchestrator cycle.', badge: null },\n { id: 'quick-draw', name: 'Quick Draw', category: 'session', description: 'First agent spawned within 20s of session start.', badge: null },\n // Time (6)\n { id: 'night-owl', name: 'Night Owl', category: 'time', description: 'Complete a session started between 1am and 5am.', badge: ')' },\n { id: 'dawn-patrol', name: 'Dawn Patrol', category: 'time', description: 'Session running 3+ hours that spans midnight to 6am.', badge: null },\n { id: 'early-bird', name: 'Early Bird', category: 'time', description: 'Start a session before 6am.', badge: null },\n { id: 'weekend-warrior', name: 'Weekend Warrior', category: 'time', description: 'Complete a session on a Saturday or Sunday.', badge: null },\n { id: 'all-nighter', name: 'All-Nighter', category: 'time', description: 'Single session running 5+ hours.', badge: null },\n { id: 'witching-hour', name: 'Witching Hour', category: 'time', description: 'Start a session between 3am and 4am.', badge: null },\n // Behavioral (16)\n { id: 'sisyphean', name: 'Sisyphean', category: 'behavioral', description: 'Restart the same task 3+ times.', badge: ';' },\n { id: 'stubborn', name: 'Stubborn', category: 'behavioral', description: 'Restart the same task 5+ times and eventually complete it.', badge: null },\n { id: 'one-must-imagine', name: 'One Must Imagine', category: 'behavioral', description: 'Restart the same task 10+ times.', badge: null },\n { id: 'creature-of-habit', name: 'Creature of Habit', category: 'behavioral', description: 'Visit the same repo 10 times.', badge: null },\n { id: 'loyal', name: 'Loyal', category: 'behavioral', description: 'Visit the same repo 30 times.', badge: null },\n { id: 'wanderer', name: 'Wanderer', category: 'behavioral', description: '3+ different repos in a single calendar day.', badge: null },\n { id: 'streak', name: 'Streak', category: 'behavioral', description: '7 consecutive days with at least one session.', badge: null },\n { id: 'iron-streak', name: 'Iron Streak', category: 'behavioral', description: '14 consecutive days with at least one session.', badge: null },\n { id: 'hot-streak', name: 'Hot Streak', category: 'behavioral', description: '15 consecutive clean sessions.', badge: null },\n { id: 'momentum', name: 'Momentum', category: 'behavioral', description: '5 sessions completed within 4 hours.', badge: null },\n { id: 'overdrive', name: 'Overdrive', category: 'behavioral', description: 'Complete 6+ sessions in a single calendar day.', badge: null },\n { id: 'patient-one', name: 'Patient One', category: 'behavioral', description: 'Idle 30+ minutes between cycles in a session.', badge: null },\n { id: 'message-in-a-bottle', name: 'Message in a Bottle', category: 'behavioral', description: '10+ messages sent to a single session.', badge: null },\n { id: 'deep-conversation', name: 'Deep Conversation', category: 'behavioral', description: 'Send 20+ messages to a single session.', badge: null },\n { id: 'comeback-kid', name: 'Comeback Kid', category: 'behavioral', description: 'Resume a paused/killed session and complete it.', badge: null },\n { id: 'pair-programming', name: 'Pair Programming', category: 'behavioral', description: '8+ user messages during a single active session.', badge: null },\n];\n","import type {\n CompanionState,\n CompanionField,\n CompanionRenderOpts,\n CompanionStats,\n Mood,\n} from './companion-types.js';\n\n// --- Base form ---\n//\n// Returns a template with two placeholders:\n// FACE — replaced by getMoodFace() in renderCompanion\n// {BOULDER} — replaced by composeLine() with the agent-count-driven boulder\n//\n// No literal boulder characters are embedded here. The previous design embedded\n// them (`.`, `o`, `O`, `OO`, `@`) which caused splitBodyAndBoulder to either\n// discard multi-char boulders (OO) or corrupt output when the dynamic boulder\n// didn't match the embedded one.\n\nexport function getBaseForm(level: number): string {\n if (level <= 2) return '(FACE) {BOULDER}';\n if (level <= 4) return '(FACE)/ {BOULDER}';\n if (level <= 7) return '/(FACE)/ {BOULDER}';\n if (level <= 11) return '\\\\(FACE)/ {BOULDER}';\n if (level <= 19) return 'ᕦ(FACE)ᕤ {BOULDER}';\n return '♛ᕦ(FACE)ᕤ {BOULDER}';\n}\n\n// --- Mood face ---\n\nexport function getMoodFace(mood: Mood): string {\n switch (mood) {\n case 'happy': return '^.^';\n case 'grinding': return '>.<';\n case 'frustrated': return '>.<#';\n case 'zen': return '‾.‾';\n case 'sleepy': return '-.-)zzZ';\n case 'excited': return '*o*';\n case 'existential': return '◉_◉';\n default: throw new Error(`Unknown mood: ${mood as string}`);\n }\n}\n\n// --- Stat cosmetics ---\n\nexport function getStatCosmetics(stats: CompanionStats): string[] {\n const cosmetics: string[] = [];\n if (stats.wisdom > 5) cosmetics.push('wisps');\n if (stats.endurance > 36_000_000) cosmetics.push('trail');\n if (stats.patience > 50) cosmetics.push('zen-prefix');\n return cosmetics;\n}\n\n// --- Boulder form ---\n\nexport function getBoulderForm(agentCount?: number, repoNickname?: string): string {\n let boulder: string;\n if (agentCount === undefined || agentCount <= 0) {\n boulder = '.';\n } else if (agentCount <= 1) {\n boulder = 'o';\n } else if (agentCount <= 4) {\n boulder = 'O';\n } else if (agentCount <= 9) {\n boulder = '◉';\n } else if (agentCount <= 20) {\n boulder = '@';\n } else {\n boulder = '@@';\n }\n if (repoNickname !== undefined) {\n boulder = `${boulder} \"${repoNickname}\"`;\n }\n return boulder;\n}\n\n// --- composeLine ---\n//\n// body has already had FACE replaced with the mood face, and still contains\n// the {BOULDER} placeholder from getBaseForm.\n// composeLine applies cosmetics to `boulder`, then substitutes {BOULDER}.\n\nexport function composeLine(\n body: string,\n cosmetics: string[],\n boulder: string,\n): string {\n let b = boulder;\n\n let hasSparkle = false;\n let hasZenPrefix = false;\n\n for (const c of cosmetics) {\n switch (c) {\n case 'wisps':\n b = `~${b}~`;\n break;\n case 'trail':\n b = `${b} ...`;\n break;\n case 'sparkle':\n hasSparkle = true;\n break;\n case 'zen-prefix':\n hasZenPrefix = true;\n break;\n }\n }\n\n let line = body.replace('{BOULDER}', b);\n\n if (hasZenPrefix) line = `o ${line}`;\n if (hasSparkle) line = `* ${line} *`;\n\n return line;\n}\n\n// --- Color helpers ---\n\ntype AnsiCode = number;\ntype TmuxColor = string;\n\ninterface MoodColor {\n ansi: AnsiCode;\n tmux: TmuxColor;\n}\n\nconst MOOD_COLORS: Record<Mood, MoodColor> = {\n happy: { ansi: 32, tmux: 'green' },\n grinding: { ansi: 33, tmux: 'yellow' },\n frustrated: { ansi: 31, tmux: 'red' },\n zen: { ansi: 36, tmux: 'cyan' },\n sleepy: { ansi: 90, tmux: 'colour245' },\n excited: { ansi: 97, tmux: 'white' },\n existential: { ansi: 35, tmux: 'magenta' },\n};\n\nfunction colorize(text: string, mood: Mood, tmux: boolean): string {\n const { ansi, tmux: tmuxColor } = MOOD_COLORS[mood];\n if (tmux) {\n return `#[fg=${tmuxColor}]${text}#[fg=default]`;\n }\n return `\\x1b[${ansi}m${text}\\x1b[0m`;\n}\n\n// --- Stat summary string ---\n\nfunction statSummary(stats: CompanionStats): string {\n const endH = Math.floor(stats.endurance / 3_600_000);\n return `STR:${stats.strength} END:${endH}h WIS:${stats.wisdom} PAT:${stats.patience}`;\n}\n\n// --- Main renderer ---\n\nexport function renderCompanion(\n companion: CompanionState,\n fields: CompanionField[],\n opts?: CompanionRenderOpts,\n): string {\n const hasFace = fields.includes('face');\n const hasBoulder = fields.includes('boulder');\n\n const repoNickname = opts?.repoPath !== undefined\n ? companion.repos[opts.repoPath]?.nickname ?? undefined\n : undefined;\n\n const boulder = getBoulderForm(opts?.agentCount, repoNickname);\n const cosmetics = getStatCosmetics(companion.stats);\n\n let facePart: string | null = null;\n let boulderOnlyPart: string | null = null;\n\n if (hasFace) {\n const baseForm = getBaseForm(companion.level);\n const face = getMoodFace(companion.mood);\n const bodyWithFace = baseForm.replace('FACE', face);\n facePart = composeLine(bodyWithFace, cosmetics, boulder);\n } else if (hasBoulder) {\n // Boulder standalone (unusual)\n boulderOnlyPart = boulder;\n }\n\n let commentary = fields.includes('commentary')\n ? (companion.lastCommentary?.text ?? '')\n : null;\n\n const parts: string[] = [];\n\n for (const field of fields) {\n switch (field) {\n case 'face':\n if (facePart !== null) parts.push(facePart);\n break;\n case 'boulder':\n if (!hasFace && boulderOnlyPart !== null) parts.push(boulderOnlyPart);\n // If face included, boulder is already embedded — skip\n break;\n case 'title':\n parts.push(companion.title);\n break;\n case 'commentary':\n if (commentary !== null) parts.push(commentary);\n break;\n case 'mood':\n parts.push(`[${companion.mood}]`);\n break;\n case 'level':\n parts.push(`Lv ${companion.level}`);\n break;\n case 'stats':\n parts.push(statSummary(companion.stats));\n break;\n case 'achievements':\n parts.push(`${companion.achievements.length} achievements`);\n break;\n }\n }\n\n // Apply maxWidth: truncate commentary first, then right-truncate\n if (opts?.maxWidth !== undefined) {\n const maxWidth = opts.maxWidth;\n const joined = parts.join(' ');\n if (joined.length > maxWidth && commentary !== null && commentary.length > 0) {\n // Shorten commentary progressively\n const commentaryIdx = parts.indexOf(commentary);\n if (commentaryIdx !== -1) {\n const overhead = joined.length - commentary.length;\n const available = maxWidth - overhead - 2; // account for double-space\n if (available < 0) {\n parts[commentaryIdx] = '';\n } else {\n parts[commentaryIdx] = commentary.slice(0, available);\n }\n commentary = parts[commentaryIdx];\n }\n }\n const result = parts.filter(p => p.length > 0).join(' ');\n const final = result.length > maxWidth\n ? result.slice(0, maxWidth - 1) + '…'\n : result;\n\n return applyColor(final, fields, facePart, companion.mood, opts);\n }\n\n const result = parts.filter(p => p.length > 0).join(' ');\n return applyColor(result, fields, facePart, companion.mood, opts);\n}\n\nfunction applyColor(\n result: string,\n fields: CompanionField[],\n facePart: string | null,\n mood: Mood,\n opts?: CompanionRenderOpts,\n): string {\n const useColor = opts?.color === true || opts?.tmuxFormat === true;\n if (!useColor || facePart === null || !fields.includes('face')) return result;\n\n const tmux = opts?.tmuxFormat === true;\n const coloredFace = colorize(facePart, mood, tmux);\n return result.replace(facePart, coloredFace);\n}\n"],"mappings":";;;;;;;AAAA,SAAS,oBAAoB;AA6B7B,IAAM,iBAAyB;AAAA,EAC7B,gBAAgB;AAAA,EAChB,oBAAoB;AAAA,EACpB,aAAa;AAAA,EACb,eAAe;AAAA,IACb,SAAS;AAAA,IACT,OAAO;AAAA,EACT;AAAA,EACA,iBAAiB;AAAA,IACf,EAAE,MAAM,WAAW,aAAa,cAAc;AAAA,EAChD;AACF;AAEA,SAAS,aAAa,UAAmC;AACvD,MAAI;AACF,UAAM,UAAU,aAAa,UAAU,OAAO;AAC9C,WAAO,KAAK,MAAM,OAAO;AAAA,EAC3B,QAAQ;AACN,WAAO,CAAC;AAAA,EACV;AACF;AAEO,SAAS,WAAW,KAAqB;AAC9C,QAAM,SAAS,aAAa,iBAAiB,CAAC;AAC9C,QAAM,UAAU,aAAa,kBAAkB,GAAG,CAAC;AACnD,SAAO,EAAE,GAAG,gBAAgB,GAAG,QAAQ,GAAG,QAAQ;AACpD;;;ACvDO,SAAS,WAAW,GAAmB;AAC5C,SAAO,IAAI,EAAE,QAAQ,MAAM,OAAO,CAAC;AACrC;;;AC8LO,IAAM,eAAiC;AAAA;AAAA,EAE5C,EAAE,IAAI,eAAe,MAAM,eAAe,UAAU,aAAa,aAAa,gCAAgC,OAAO,KAAK;AAAA,EAC1H,EAAE,IAAI,WAAW,MAAM,WAAW,UAAU,aAAa,a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AAS,MAAM,EAAG,QAAO;AAEvE,QAAM,OAAO,MAAM,eAAe;AAClC,QAAM,cAAc,SAAS,UAAU,MAAM,IAAI;AACjD,SAAO,OAAO,QAAQ,UAAU,WAAW;AAC7C;","names":["result"]}
|
package/dist/paths-XRDEEJ5R.js
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
companionPath,
|
|
4
|
-
contextDir,
|
|
5
|
-
cycleLogPath,
|
|
6
|
-
daemonLogPath,
|
|
7
|
-
daemonPidPath,
|
|
8
|
-
daemonUpdatingPath,
|
|
9
|
-
globalConfigPath,
|
|
10
|
-
globalDir,
|
|
11
|
-
goalPath,
|
|
12
|
-
isSisyphusSession,
|
|
13
|
-
legacyLogsPath,
|
|
14
|
-
logsDir,
|
|
15
|
-
messagesDir,
|
|
16
|
-
projectConfigPath,
|
|
17
|
-
projectDir,
|
|
18
|
-
projectOrchestratorPromptPath,
|
|
19
|
-
promptsDir,
|
|
20
|
-
reportFilePath,
|
|
21
|
-
reportsDir,
|
|
22
|
-
roadmapPath,
|
|
23
|
-
sessionDir,
|
|
24
|
-
sessionsDir,
|
|
25
|
-
snapshotDir,
|
|
26
|
-
snapshotsDir,
|
|
27
|
-
socketPath,
|
|
28
|
-
statePath,
|
|
29
|
-
strategyPath,
|
|
30
|
-
tmuxSessionDisplayName,
|
|
31
|
-
tmuxSessionName,
|
|
32
|
-
tuiScratchDir
|
|
33
|
-
} from "./chunk-TMBAVPHH.js";
|
|
34
|
-
export {
|
|
35
|
-
companionPath,
|
|
36
|
-
contextDir,
|
|
37
|
-
cycleLogPath,
|
|
38
|
-
daemonLogPath,
|
|
39
|
-
daemonPidPath,
|
|
40
|
-
daemonUpdatingPath,
|
|
41
|
-
globalConfigPath,
|
|
42
|
-
globalDir,
|
|
43
|
-
goalPath,
|
|
44
|
-
isSisyphusSession,
|
|
45
|
-
legacyLogsPath,
|
|
46
|
-
logsDir,
|
|
47
|
-
messagesDir,
|
|
48
|
-
projectConfigPath,
|
|
49
|
-
projectDir,
|
|
50
|
-
projectOrchestratorPromptPath,
|
|
51
|
-
promptsDir,
|
|
52
|
-
reportFilePath,
|
|
53
|
-
reportsDir,
|
|
54
|
-
roadmapPath,
|
|
55
|
-
sessionDir,
|
|
56
|
-
sessionsDir,
|
|
57
|
-
snapshotDir,
|
|
58
|
-
snapshotsDir,
|
|
59
|
-
socketPath,
|
|
60
|
-
statePath,
|
|
61
|
-
strategyPath,
|
|
62
|
-
tmuxSessionDisplayName,
|
|
63
|
-
tmuxSessionName,
|
|
64
|
-
tuiScratchDir
|
|
65
|
-
};
|
|
66
|
-
//# sourceMappingURL=paths-XRDEEJ5R.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: design
|
|
3
|
-
description: Technical designer — creates a technical design from requirements through codebase investigation, trade-off analysis, flow tracing, and user iteration. Produces architecture, component boundaries, and data models without writing code.
|
|
4
|
-
model: opus
|
|
5
|
-
color: cyan
|
|
6
|
-
effort: max
|
|
7
|
-
interactive: true
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
You are a **technical designer**. Your job is to define *how* the system will be built — architecture, component boundaries, data models, contracts — without writing code. The design captures technical decisions. All trade-offs resolved before saving.
|
|
11
|
-
|
|
12
|
-
You are a **collaborator**, not a document generator. Design with the user, not for them.
|
|
13
|
-
|
|
14
|
-
## Your Role: Lead, Not Solo Explorer
|
|
15
|
-
|
|
16
|
-
Assess the scope and delegate when appropriate:
|
|
17
|
-
|
|
18
|
-
- **Small** (single domain, 1-5 files) — Investigate and design it yourself.
|
|
19
|
-
- **Medium+** (multiple domains, 6+ files) — Spawn explore agents to probe different areas in parallel. Synthesize findings before proposing. For large designs, spawn adversarial reviewers (feasibility, scope) before presenting to the user.
|
|
20
|
-
|
|
21
|
-
## Inputs
|
|
22
|
-
|
|
23
|
-
Check `$SISYPHUS_SESSION_DIR/context/` for:
|
|
24
|
-
- **requirements.md** — Required. Defines what to build.
|
|
25
|
-
- **problem.md** — Goals and UX context.
|
|
26
|
-
- **explore-*.md** — Codebase exploration findings.
|
|
27
|
-
|
|
28
|
-
## Communication Style
|
|
29
|
-
|
|
30
|
-
**Lead with diagrams. Work in pieces. Keep messages short.**
|
|
31
|
-
|
|
32
|
-
- **One design decision per turn.** Don't present the full architecture at once — walk through it component by component or layer by layer.
|
|
33
|
-
- **Lead with ASCII diagrams**, then explain. The diagram is the primary artifact; prose supports it.
|
|
34
|
-
- **Use tables** for trade-off comparisons, interface contracts, and data model fields.
|
|
35
|
-
- **Ask one focused question** per turn to drive the design forward.
|
|
36
|
-
- **No walls of text.** If the user has to scroll to find your question, the message is too long.
|
|
37
|
-
|
|
38
|
-
Example of a good design turn:
|
|
39
|
-
```
|
|
40
|
-
For the state management layer, I see two options:
|
|
41
|
-
|
|
42
|
-
Option A: Single file Option B: Write-ahead log
|
|
43
|
-
┌──────────┐ ┌──────────┐
|
|
44
|
-
│state.json │◄── atomic write │ wal.log │──► compact ──► state.json
|
|
45
|
-
└──────────┘ └──────────┘
|
|
46
|
-
|
|
47
|
-
| Aspect | Option A | Option B |
|
|
48
|
-
|-------------|-------------------|---------------------|
|
|
49
|
-
| Complexity | Simple | Moderate |
|
|
50
|
-
| Durability | Risk on crash | Recoverable |
|
|
51
|
-
| Performance | Single write | Append + periodic |
|
|
52
|
-
|
|
53
|
-
Given the current write frequency (~1/sec), I'd lean Option A.
|
|
54
|
-
What's your read on crash recovery importance here?
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
## Process
|
|
58
|
-
|
|
59
|
-
### 1. Investigate Codebase
|
|
60
|
-
|
|
61
|
-
Explore areas relevant to the requirements:
|
|
62
|
-
- Existing architectural patterns and conventions
|
|
63
|
-
- Data models and schemas involved
|
|
64
|
-
- Services and APIs that will be extended or created
|
|
65
|
-
- Frontend components and styling (if applicable)
|
|
66
|
-
|
|
67
|
-
### 2. Present Design Incrementally
|
|
68
|
-
|
|
69
|
-
Don't dump a complete design. Walk through it in layers:
|
|
70
|
-
|
|
71
|
-
1. **Start with the big picture** — one ASCII diagram showing the major components and their relationships. Get alignment on the shape before going deeper.
|
|
72
|
-
2. **Drill into each component** — one at a time. Show its interfaces, data model, and how it connects to neighbors. Ask for feedback before moving on.
|
|
73
|
-
3. **Surface trade-offs as they arise** — use comparison tables. Make a recommendation, explain why, ask if the user agrees.
|
|
74
|
-
|
|
75
|
-
Iterate through conversation to resolve ambiguity. **Wait for user input before proceeding.**
|
|
76
|
-
|
|
77
|
-
### 3. Frontend/Visual Components
|
|
78
|
-
|
|
79
|
-
If the feature has a frontend or visual component:
|
|
80
|
-
- Discuss the visual design and interaction patterns
|
|
81
|
-
- Create HTML mockups using the application's real styling (actual CSS classes, design tokens, component library)
|
|
82
|
-
- Reference existing UI patterns in the codebase
|
|
83
|
-
|
|
84
|
-
### 4. Flow Trace
|
|
85
|
-
|
|
86
|
-
Before saving, simulate the design end-to-end with the user — present it as a walkthrough they can follow and challenge:
|
|
87
|
-
|
|
88
|
-
```
|
|
89
|
-
Let's trace the happy path:
|
|
90
|
-
|
|
91
|
-
1. User runs `start "task"`
|
|
92
|
-
├─ Pre: daemon running, tmux session exists
|
|
93
|
-
└─ Action: CLI sends CreateSession request
|
|
94
|
-
│
|
|
95
|
-
2. Daemon receives ─┘
|
|
96
|
-
├─ Pre: no duplicate session
|
|
97
|
-
└─ Action: creates state.json, spawns orchestrator
|
|
98
|
-
│
|
|
99
|
-
3. Orchestrator starts ─┘
|
|
100
|
-
├─ Pre: state.json exists, prompt files written
|
|
101
|
-
└─ Action: reads state, updates roadmap, spawns agents
|
|
102
|
-
|
|
103
|
-
Any step where you see a gap?
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
At each step, verify:
|
|
107
|
-
- **Preconditions**: What must be true? Is it guaranteed by the design?
|
|
108
|
-
- **State consistency**: Does the system interpret state correctly at each point?
|
|
109
|
-
- **Failure**: What happens if this step fails? Is recovery defined?
|
|
110
|
-
- **Handoff**: Does this step's output match the next step's expected input?
|
|
111
|
-
|
|
112
|
-
If gaps found, discuss with user before saving.
|
|
113
|
-
|
|
114
|
-
### 5. Save Design Document
|
|
115
|
-
|
|
116
|
-
Once all components and trade-offs are resolved, assemble and save to `$SISYPHUS_SESSION_DIR/context/design.md`:
|
|
117
|
-
|
|
118
|
-
- **Overview** — Solution approach, key technical decisions (3-5 sentences)
|
|
119
|
-
- **Architecture** — Component boundaries, data flow, service interactions. Include an ASCII diagram. Add a state machine diagram when stateful transitions are involved.
|
|
120
|
-
- **Components** — Key modules/classes with responsibilities and interfaces
|
|
121
|
-
- **Data Models** — Schema definitions, type interfaces, validation rules
|
|
122
|
-
- **Error Handling** — Error types, conditions, recovery strategies
|
|
123
|
-
- **Related Files** — Paths to relevant existing code. Do NOT annotate with implementation instructions.
|
|
124
|
-
|
|
125
|
-
**The line**: If it narrows the solution space to one reasonable approach, it belongs. If it prescribes exact code paths, it doesn't.
|
|
126
|
-
|
|
127
|
-
### 6. Research for Large Features
|
|
128
|
-
|
|
129
|
-
**Small features** (touches ~10 or fewer files):
|
|
130
|
-
- The design's "Related files" section is sufficient context.
|
|
131
|
-
|
|
132
|
-
**Large features** (touches 10+ files across multiple domains):
|
|
133
|
-
- Offer to create dedicated context documents for planning.
|
|
134
|
-
- If yes, spawn explore agents per domain, save to `$SISYPHUS_SESSION_DIR/context/explore-{domain}.md`.
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: requirements
|
|
3
|
-
description: Requirements analyst — drafts behavioral requirements using EARS acceptance criteria, iterates with the user until approved. Produces a requirements document that defines what the system should do without prescribing how.
|
|
4
|
-
model: opus
|
|
5
|
-
color: cyan
|
|
6
|
-
effort: max
|
|
7
|
-
interactive: true
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
You are a **requirements analyst**. Your job is to define *what* the system should do — observable behavior, acceptance criteria, edge cases — without prescribing *how* it should be built.
|
|
11
|
-
|
|
12
|
-
You are a **collaborator**, not a document generator. Work with the user to get the requirements right — in small, digestible pieces.
|
|
13
|
-
|
|
14
|
-
## Inputs
|
|
15
|
-
|
|
16
|
-
Check `$SISYPHUS_SESSION_DIR/context/` for:
|
|
17
|
-
- **problem.md** — Problem statement, goals, UX expectations. If it exists, read it — it's your primary input.
|
|
18
|
-
- **explore-*.md** — Codebase exploration findings.
|
|
19
|
-
|
|
20
|
-
If none exist, work directly from the instruction.
|
|
21
|
-
|
|
22
|
-
## Communication Style
|
|
23
|
-
|
|
24
|
-
**Work in chunks. No walls of text.**
|
|
25
|
-
|
|
26
|
-
- **Present one requirement at a time** (or a small group of 2-3 related ones). Get feedback before moving to the next.
|
|
27
|
-
- **Use tables** to make requirements scannable — a table of acceptance criteria is easier to review than a numbered list buried in prose.
|
|
28
|
-
- **Use ASCII flow diagrams** to show user journeys and state transitions before writing formal criteria. Let the user react to the flow, then formalize.
|
|
29
|
-
- **Keep messages short.** Lead with the visual, follow with the criteria, end with a focused question.
|
|
30
|
-
- **Summarize progress** with a compact tracker as you go.
|
|
31
|
-
|
|
32
|
-
Example of a good requirement turn:
|
|
33
|
-
```
|
|
34
|
-
Here's the user journey for session creation:
|
|
35
|
-
|
|
36
|
-
User ──► "start task" ──► Daemon creates session
|
|
37
|
-
│
|
|
38
|
-
┌───────┴───────┐
|
|
39
|
-
▼ ▼
|
|
40
|
-
Orchestrator State file
|
|
41
|
-
spawned initialized
|
|
42
|
-
|
|
43
|
-
Proposed requirement:
|
|
44
|
-
|
|
45
|
-
| # | Criterion | Pattern |
|
|
46
|
-
|---|-----------|---------|
|
|
47
|
-
| 1 | WHEN user runs `start`, THE Daemon SHALL create a session and spawn orchestrator | Event |
|
|
48
|
-
| 2 | IF daemon socket is unavailable, THEN THE CLI SHALL report connection error | Unwanted |
|
|
49
|
-
|
|
50
|
-
Does this match your expectations for the happy path?
|
|
51
|
-
Any edge cases I'm missing here?
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
## Process
|
|
55
|
-
|
|
56
|
-
### 1. Investigate Context
|
|
57
|
-
|
|
58
|
-
Briefly explore the codebase to understand:
|
|
59
|
-
- Relevant existing behavior
|
|
60
|
-
- Constraints that affect requirements
|
|
61
|
-
- User-facing patterns and conventions
|
|
62
|
-
|
|
63
|
-
### 2. Map the Territory
|
|
64
|
-
|
|
65
|
-
Before drafting formal requirements, sketch the landscape for the user:
|
|
66
|
-
- Draw an ASCII diagram of the user journey or system flow
|
|
67
|
-
- Identify the key areas that need requirements (3-7 areas typically)
|
|
68
|
-
- Present the map and get alignment on scope before diving in
|
|
69
|
-
|
|
70
|
-
```
|
|
71
|
-
I see ~4 areas that need requirements:
|
|
72
|
-
|
|
73
|
-
1. Session creation ← let's start here
|
|
74
|
-
2. Agent lifecycle
|
|
75
|
-
3. Error recovery
|
|
76
|
-
4. State persistence
|
|
77
|
-
|
|
78
|
-
Sound right, or should we adjust the scope?
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
### 3. Draft Requirements Incrementally
|
|
82
|
-
|
|
83
|
-
Work through one area at a time. For each:
|
|
84
|
-
|
|
85
|
-
1. Show a quick flow diagram of the behavior
|
|
86
|
-
2. Present acceptance criteria in a table
|
|
87
|
-
3. Ask for feedback
|
|
88
|
-
4. Move to the next area after sign-off
|
|
89
|
-
|
|
90
|
-
Use EARS (Easy Approach to Requirements Syntax) for all acceptance criteria:
|
|
91
|
-
- **Event-driven:** WHEN [trigger], THE [System] SHALL [response]
|
|
92
|
-
- **State-driven:** WHILE [condition], THE [System] SHALL [response]
|
|
93
|
-
- **Unwanted behavior:** IF [condition], THEN THE [System] SHALL [response]
|
|
94
|
-
- **Optional features:** WHERE [option], THE [System] SHALL [response]
|
|
95
|
-
|
|
96
|
-
**Guidelines:**
|
|
97
|
-
- Non-technical — describe observable behavior, not implementation
|
|
98
|
-
- Cover error states and edge cases where they matter
|
|
99
|
-
- Every acceptance criterion must use an EARS pattern
|
|
100
|
-
|
|
101
|
-
### 4. Assemble and Confirm
|
|
102
|
-
|
|
103
|
-
Once all areas are approved, assemble the full document and present a summary view:
|
|
104
|
-
|
|
105
|
-
```
|
|
106
|
-
Requirements complete. Here's the overview:
|
|
107
|
-
|
|
108
|
-
| Area | Stories | Criteria | Status |
|
|
109
|
-
|------|---------|----------|--------|
|
|
110
|
-
| Session creation | 2 | 5 | ✓ approved |
|
|
111
|
-
| Agent lifecycle | 2 | 4 | ✓ approved |
|
|
112
|
-
| Error recovery | 1 | 3 | ✓ approved |
|
|
113
|
-
| State persistence | 2 | 4 | ✓ approved |
|
|
114
|
-
|
|
115
|
-
Saving to context/requirements.md. Ready for design?
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
Save to `$SISYPHUS_SESSION_DIR/context/requirements.md` with this format:
|
|
119
|
-
|
|
120
|
-
```markdown
|
|
121
|
-
# Requirements: {Topic}
|
|
122
|
-
|
|
123
|
-
## Introduction
|
|
124
|
-
2-3 sentences describing the feature and its purpose.
|
|
125
|
-
|
|
126
|
-
## Glossary
|
|
127
|
-
Define system names and domain terms used in acceptance criteria.
|
|
128
|
-
|
|
129
|
-
## Requirements
|
|
130
|
-
|
|
131
|
-
### Requirement 1
|
|
132
|
-
**User Story:** As a [role], I want [capability], so that [benefit].
|
|
133
|
-
|
|
134
|
-
#### Acceptance Criteria
|
|
135
|
-
| # | Criterion | Pattern |
|
|
136
|
-
|---|-----------|---------|
|
|
137
|
-
| 1 | WHEN [trigger], THE [System] SHALL [response] | Event |
|
|
138
|
-
```
|
package/dist/templates/begin.md
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Hand off a task to sisyphus multi-agent orchestration
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
!`sisyphus -h`
|
|
6
|
-
|
|
7
|
-
Run `sisyphus start` with a concise task/goal and optional background context:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
sisyphus start "your task description" -c "background context"
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
**Task description** — the goal. Keep it focused: what needs to be built or fixed and what done looks like. This is the persistent objective the orchestrator sees every cycle.
|
|
14
|
-
|
|
15
|
-
**Context (`-c`)** — background info that informs the work but isn't the goal itself: relevant file paths, constraints, specs, adjacent concerns, prior findings. Rendered separately so the orchestrator can reference it without confusing it with the task.
|
|
16
|
-
|
|
17
|
-
**Context should be factual, not diagnostic.** Point to relevant files, areas of the codebase, and constraints — don't speculate on root causes or solutions, which can bias the orchestrator down the wrong path.
|
|
18
|
-
|
|
19
|
-
**Example:**
|
|
20
|
-
```bash
|
|
21
|
-
sisyphus start "Fix the JWT refresh bug — app shows blank screen on token expiry instead of redirecting to login" -c "Auth system lives in src/auth/. Key files: interceptor.ts (HTTP interceptor), token-store.ts (token persistence), refresh.ts (refresh flow). Tests in src/auth/__tests__/. Don't break the logout flow."
|
|
22
|
-
```
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
Welcome to Neovim!
|
|
2
|
-
===================
|
|
3
|
-
|
|
4
|
-
You're looking at this file in nvim. Right now you're in NORMAL MODE.
|
|
5
|
-
That means keys are commands, not text. Let's learn the basics.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
--- MOVING AROUND (Normal Mode) ---
|
|
9
|
-
|
|
10
|
-
Try these now:
|
|
11
|
-
gg Jump to the top of this file
|
|
12
|
-
G Jump to the bottom of this file
|
|
13
|
-
Ctrl+u Scroll up half a page
|
|
14
|
-
Ctrl+d Scroll down half a page
|
|
15
|
-
/Welcome Search for "Welcome" (press Enter, then n for next match)
|
|
16
|
-
|
|
17
|
-
Arrow keys work too, but h/j/k/l are the vim way:
|
|
18
|
-
h = left j = down k = up l = right
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
--- ENTERING INSERT MODE ---
|
|
22
|
-
|
|
23
|
-
Press i right now. You should see -- INSERT -- at the bottom.
|
|
24
|
-
Now you can type normally! Try typing something on the line below:
|
|
25
|
-
|
|
26
|
-
> [type here]
|
|
27
|
-
|
|
28
|
-
Press Esc when you're done to go back to normal mode.
|
|
29
|
-
|
|
30
|
-
Other ways to enter insert mode:
|
|
31
|
-
i Insert at cursor
|
|
32
|
-
a Insert after cursor
|
|
33
|
-
o Open new line below and insert
|
|
34
|
-
O Open new line above and insert
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
--- PRACTICE: EDIT THIS SECTION ---
|
|
38
|
-
|
|
39
|
-
Fix the typos below (hint: navigate to the typo, press i, fix it, press Esc):
|
|
40
|
-
|
|
41
|
-
1. The quikc brown fox jumps over the lazy dog.
|
|
42
|
-
2. Sisyphus is a multi-agnet orchestrator.
|
|
43
|
-
3. Tmux lets you spilt your terminal into panes.
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
--- SAVING AND QUITTING ---
|
|
47
|
-
|
|
48
|
-
You're almost done! Here's how to get out:
|
|
49
|
-
|
|
50
|
-
:w Enter Save the file (write)
|
|
51
|
-
:q Enter Quit (fails if unsaved changes)
|
|
52
|
-
:wq Enter Save and quit
|
|
53
|
-
:q! Enter Quit WITHOUT saving
|
|
54
|
-
ZZ Shortcut for save and quit (Shift+z twice)
|
|
55
|
-
|
|
56
|
-
Try it now: type :wq and press Enter to save your changes and close nvim.
|
|
57
|
-
The pane will close automatically and you'll be back in Claude.
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
--- BONUS (optional) ---
|
|
61
|
-
|
|
62
|
-
u Undo last change
|
|
63
|
-
Ctrl+r Redo
|
|
64
|
-
dd Delete entire line
|
|
65
|
-
yy Copy (yank) entire line
|
|
66
|
-
p Paste below cursor
|
|
67
|
-
:123 Jump to line 123
|
|
68
|
-
* Search for the word under cursor
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Create technical design from requirements through investigation and user iteration
|
|
3
|
-
argument-hint: <topic or description>
|
|
4
|
-
---
|
|
5
|
-
# Technical Design
|
|
6
|
-
|
|
7
|
-
**Input:** $ARGUMENTS
|
|
8
|
-
|
|
9
|
-
The user wants a technical design before implementation begins.
|
|
10
|
-
|
|
11
|
-
Spawn a `sisyphus:design` agent to lead this — it's interactive, investigates the codebase, proposes architecture, and iterates with the user. Output goes to `context/design.md`. It expects `context/requirements.md` to exist; if it doesn't, flag that to the user or run requirements first.
|
|
12
|
-
|
|
13
|
-
If the current strategy doesn't include a design stage, update it before spawning. Don't do the design work yourself.
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Define behavioral requirements with EARS acceptance criteria
|
|
3
|
-
argument-hint: <topic or description>
|
|
4
|
-
---
|
|
5
|
-
# Requirements
|
|
6
|
-
|
|
7
|
-
**Input:** $ARGUMENTS
|
|
8
|
-
|
|
9
|
-
The user wants formal requirements defined before design or implementation proceeds.
|
|
10
|
-
|
|
11
|
-
Spawn a `sisyphus:requirements` agent to lead this — it's interactive, drafts EARS-format requirements, and iterates with the user until approved. Output goes to `context/requirements.md`. If the current strategy doesn't include a requirements stage, update it before spawning.
|
|
12
|
-
|
|
13
|
-
Don't draft requirements yourself. The `sisyphus:requirements` agent handles the full process: codebase investigation, drafting, and user iteration.
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# Stop hook: notify user when orchestrator is idle and tmux window not attended.
|
|
3
|
-
# If terminal-notifier is available, clicking the notification switches tmux to
|
|
4
|
-
# the orchestrator's window. Falls back to osascript (no click action).
|
|
5
|
-
# Always exits 0 with no stdout — never blocks stop.
|
|
6
|
-
|
|
7
|
-
[ "$SISYPHUS_NOTIFY_ENABLED" = "0" ] && exit 0
|
|
8
|
-
[ -z "$TMUX_PANE" ] && exit 0
|
|
9
|
-
|
|
10
|
-
WINDOW_ACTIVE=$(tmux display-message -t "$TMUX_PANE" -p "#{window_active}" 2>/dev/null)
|
|
11
|
-
SESSION_ATTACHED=$(tmux display-message -t "$TMUX_PANE" -p "#{session_attached}" 2>/dev/null)
|
|
12
|
-
|
|
13
|
-
# User is watching — no notification needed
|
|
14
|
-
[ "$WINDOW_ACTIVE" = "1" ] && [ -n "$SESSION_ATTACHED" ] && [ "$SESSION_ATTACHED" != "0" ] && exit 0
|
|
15
|
-
|
|
16
|
-
SOUND="${SISYPHUS_NOTIFY_SOUND:-/System/Library/Sounds/Hero.aiff}"
|
|
17
|
-
LABEL="${SISYPHUS_SESSION_NAME:-orchestrator}"
|
|
18
|
-
|
|
19
|
-
# Resolve session/window for click-to-switch
|
|
20
|
-
SESSION_NAME=$(tmux display-message -t "$TMUX_PANE" -p "#{session_name}" 2>/dev/null)
|
|
21
|
-
WINDOW_ID=$(tmux display-message -t "$TMUX_PANE" -p "#{window_index}" 2>/dev/null)
|
|
22
|
-
|
|
23
|
-
if [ -n "$SESSION_NAME" ] && [ -n "$WINDOW_ID" ] && command -v terminal-notifier &>/dev/null; then
|
|
24
|
-
# Write a one-shot switch script (self-deleting on execution)
|
|
25
|
-
# terminal-notifier -execute runs with minimal PATH, so resolve paths now
|
|
26
|
-
TMUX_BIN=$(command -v tmux)
|
|
27
|
-
# Find the tmux client tty attached to this session (for iTerm2 tab lookup)
|
|
28
|
-
CLIENT_TTY=$("$TMUX_BIN" list-clients -t "$SESSION_NAME" -F "#{client_tty}" 2>/dev/null | head -1)
|
|
29
|
-
SWITCH_SCRIPT=$(mktemp /tmp/sisyphus-switch.XXXXXX.sh)
|
|
30
|
-
cat > "$SWITCH_SCRIPT" <<EOF
|
|
31
|
-
#!/bin/bash
|
|
32
|
-
# Activate the correct iTerm2 window+tab (matched by tty), or fall back to generic activate
|
|
33
|
-
osascript -e '
|
|
34
|
-
tell application "iTerm"
|
|
35
|
-
activate
|
|
36
|
-
repeat with w in windows
|
|
37
|
-
repeat with t in tabs of w
|
|
38
|
-
repeat with s in sessions of t
|
|
39
|
-
if tty of s is "${CLIENT_TTY}" then
|
|
40
|
-
select w
|
|
41
|
-
tell w to select t
|
|
42
|
-
return
|
|
43
|
-
end if
|
|
44
|
-
end repeat
|
|
45
|
-
end repeat
|
|
46
|
-
end repeat
|
|
47
|
-
end tell' 2>/dev/null || osascript -e 'tell application "Terminal" to activate' 2>/dev/null
|
|
48
|
-
# Switch tmux to the orchestrator window
|
|
49
|
-
"${TMUX_BIN}" switch-client -c "${CLIENT_TTY}" -t "${SESSION_NAME}:${WINDOW_ID}" 2>/dev/null
|
|
50
|
-
"${TMUX_BIN}" select-window -t "${SESSION_NAME}:${WINDOW_ID}" 2>/dev/null
|
|
51
|
-
rm -f "\$0"
|
|
52
|
-
EOF
|
|
53
|
-
chmod +x "$SWITCH_SCRIPT"
|
|
54
|
-
|
|
55
|
-
SOUND_NAME=$(basename "${SOUND}" .aiff)
|
|
56
|
-
(
|
|
57
|
-
terminal-notifier \
|
|
58
|
-
-title "Sisyphus: ${LABEL}" \
|
|
59
|
-
-message "Orchestrator waiting for input" \
|
|
60
|
-
-sound "$SOUND_NAME" \
|
|
61
|
-
-execute "$SWITCH_SCRIPT" 2>/dev/null
|
|
62
|
-
) &
|
|
63
|
-
else
|
|
64
|
-
# Fallback: osascript notification + sound (no click-to-switch)
|
|
65
|
-
(
|
|
66
|
-
osascript -e "display notification \"Orchestrator waiting for input\" with title \"Sisyphus: ${LABEL}\"" 2>/dev/null
|
|
67
|
-
[ -f "$SOUND" ] && afplay "$SOUND" 2>/dev/null
|
|
68
|
-
) &
|
|
69
|
-
fi
|
|
70
|
-
|
|
71
|
-
exit 0
|