oh-my-claude-sisyphus 3.7.0 → 3.7.3
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 +24 -1
- package/commands/hud.md +37 -5
- package/commands/omc-setup.md +105 -0
- package/dist/__tests__/compatibility-security.test.d.ts +13 -0
- package/dist/__tests__/compatibility-security.test.d.ts.map +1 -0
- package/dist/__tests__/compatibility-security.test.js +403 -0
- package/dist/__tests__/compatibility-security.test.js.map +1 -0
- package/dist/__tests__/compatibility.test.d.ts +7 -0
- package/dist/__tests__/compatibility.test.d.ts.map +1 -0
- package/dist/__tests__/compatibility.test.js +484 -0
- package/dist/__tests__/compatibility.test.js.map +1 -0
- package/dist/__tests__/hud/analytics-display.test.js +141 -1
- package/dist/__tests__/hud/analytics-display.test.js.map +1 -1
- package/dist/__tests__/hud-windows.test.d.ts +2 -0
- package/dist/__tests__/hud-windows.test.d.ts.map +1 -0
- package/dist/__tests__/hud-windows.test.js +91 -0
- package/dist/__tests__/hud-windows.test.js.map +1 -0
- package/dist/cli/analytics.js +0 -0
- package/dist/cli/index.js +0 -0
- package/dist/compatibility/discovery.d.ts +58 -0
- package/dist/compatibility/discovery.d.ts.map +1 -0
- package/dist/compatibility/discovery.js +619 -0
- package/dist/compatibility/discovery.js.map +1 -0
- package/dist/compatibility/index.d.ts +51 -0
- package/dist/compatibility/index.d.ts.map +1 -0
- package/dist/compatibility/index.js +72 -0
- package/dist/compatibility/index.js.map +1 -0
- package/dist/compatibility/mcp-bridge.d.ts +138 -0
- package/dist/compatibility/mcp-bridge.d.ts.map +1 -0
- package/dist/compatibility/mcp-bridge.js +524 -0
- package/dist/compatibility/mcp-bridge.js.map +1 -0
- package/dist/compatibility/permission-adapter.d.ts +79 -0
- package/dist/compatibility/permission-adapter.d.ts.map +1 -0
- package/dist/compatibility/permission-adapter.js +369 -0
- package/dist/compatibility/permission-adapter.js.map +1 -0
- package/dist/compatibility/registry.d.ts +161 -0
- package/dist/compatibility/registry.d.ts.map +1 -0
- package/dist/compatibility/registry.js +389 -0
- package/dist/compatibility/registry.js.map +1 -0
- package/dist/compatibility/types.d.ts +249 -0
- package/dist/compatibility/types.d.ts.map +1 -0
- package/dist/compatibility/types.js +8 -0
- package/dist/compatibility/types.js.map +1 -0
- package/dist/features/rate-limit-wait/daemon.d.ts.map +1 -1
- package/dist/features/rate-limit-wait/daemon.js +44 -1
- package/dist/features/rate-limit-wait/daemon.js.map +1 -1
- package/dist/features/state-manager/index.d.ts.map +1 -1
- package/dist/features/state-manager/index.js +4 -1
- package/dist/features/state-manager/index.js.map +1 -1
- package/dist/hooks/permission-handler/__tests__/index.test.js +47 -0
- package/dist/hooks/permission-handler/__tests__/index.test.js.map +1 -1
- package/dist/hooks/permission-handler/index.d.ts +1 -1
- package/dist/hooks/permission-handler/index.d.ts.map +1 -1
- package/dist/hooks/permission-handler/index.js +11 -15
- package/dist/hooks/permission-handler/index.js.map +1 -1
- package/dist/hooks/plugin-patterns/index.d.ts +5 -0
- package/dist/hooks/plugin-patterns/index.d.ts.map +1 -1
- package/dist/hooks/plugin-patterns/index.js +26 -1
- package/dist/hooks/plugin-patterns/index.js.map +1 -1
- package/dist/hooks/session-end/index.d.ts +0 -8
- package/dist/hooks/session-end/index.d.ts.map +1 -1
- package/dist/hooks/session-end/index.js +5 -12
- package/dist/hooks/session-end/index.js.map +1 -1
- package/dist/hooks/subagent-tracker/index.d.ts.map +1 -1
- package/dist/hooks/subagent-tracker/index.js +32 -17
- package/dist/hooks/subagent-tracker/index.js.map +1 -1
- package/dist/hud/analytics-display.d.ts +17 -1
- package/dist/hud/analytics-display.d.ts.map +1 -1
- package/dist/hud/analytics-display.js +55 -12
- package/dist/hud/analytics-display.js.map +1 -1
- package/dist/hud/render.d.ts.map +1 -1
- package/dist/hud/render.js +49 -18
- package/dist/hud/render.js.map +1 -1
- package/dist/hud/types.d.ts +2 -0
- package/dist/hud/types.d.ts.map +1 -1
- package/dist/hud/types.js +14 -0
- package/dist/hud/types.js.map +1 -1
- package/dist/installer/index.d.ts.map +1 -1
- package/dist/installer/index.js +3 -2
- package/dist/installer/index.js.map +1 -1
- package/docs/COMPATIBILITY.md +1051 -0
- package/hooks/keyword-detector.sh +4 -4
- package/hooks/persistent-mode.sh +10 -10
- package/hooks/session-start.sh +4 -4
- package/package.json +3 -1
- package/scripts/keyword-detector.mjs +4 -4
- package/scripts/persistent-mode.mjs +6 -6
- package/scripts/persistent-mode.sh +10 -10
- package/scripts/session-start.mjs +4 -4
- package/skills/hud/SKILL.md +37 -5
- package/skills/omc-setup/SKILL.md +162 -4
- package/skills/writer-memory/SKILL.md +443 -0
- package/skills/writer-memory/lib/character-tracker.ts +338 -0
- package/skills/writer-memory/lib/memory-manager.ts +804 -0
- package/skills/writer-memory/lib/relationship-graph.ts +400 -0
- package/skills/writer-memory/lib/scene-organizer.ts +544 -0
- package/skills/writer-memory/lib/synopsis-builder.ts +339 -0
- package/skills/writer-memory/templates/synopsis-template.md +46 -0
- package/templates/hooks/keyword-detector.sh +4 -4
- package/templates/hooks/persistent-mode.sh +10 -10
- package/templates/hooks/session-start.sh +4 -4
- package/dist/__tests__/analytics/analytics-summary.test.d.ts +0 -2
- package/dist/__tests__/analytics/analytics-summary.test.d.ts.map +0 -1
- package/dist/__tests__/analytics/analytics-summary.test.js +0 -267
- package/dist/__tests__/analytics/analytics-summary.test.js.map +0 -1
- package/dist/__tests__/analytics/cost-estimator.test.d.ts +0 -2
- package/dist/__tests__/analytics/cost-estimator.test.d.ts.map +0 -1
- package/dist/__tests__/analytics/cost-estimator.test.js +0 -212
- package/dist/__tests__/analytics/cost-estimator.test.js.map +0 -1
- package/dist/__tests__/hooks/auto-slash-command/executor.test.d.ts +0 -7
- package/dist/__tests__/hooks/auto-slash-command/executor.test.d.ts.map +0 -1
- package/dist/__tests__/hooks/auto-slash-command/executor.test.js +0 -374
- package/dist/__tests__/hooks/auto-slash-command/executor.test.js.map +0 -1
- package/dist/__tests__/hud/auto-tracking.integration.test.d.ts +0 -2
- package/dist/__tests__/hud/auto-tracking.integration.test.d.ts.map +0 -1
- package/dist/__tests__/hud/auto-tracking.integration.test.js +0 -12
- package/dist/__tests__/hud/auto-tracking.integration.test.js.map +0 -1
- package/dist/__tests__/learned-skills/config.test.d.ts +0 -2
- package/dist/__tests__/learned-skills/config.test.d.ts.map +0 -1
- package/dist/__tests__/learned-skills/config.test.js +0 -37
- package/dist/__tests__/learned-skills/config.test.js.map +0 -1
- package/dist/__tests__/learned-skills/detector.test.d.ts +0 -2
- package/dist/__tests__/learned-skills/detector.test.d.ts.map +0 -1
- package/dist/__tests__/learned-skills/detector.test.js +0 -99
- package/dist/__tests__/learned-skills/detector.test.js.map +0 -1
- package/dist/__tests__/learned-skills/finder.test.d.ts +0 -2
- package/dist/__tests__/learned-skills/finder.test.d.ts.map +0 -1
- package/dist/__tests__/learned-skills/finder.test.js +0 -59
- package/dist/__tests__/learned-skills/finder.test.js.map +0 -1
- package/dist/__tests__/learned-skills/loader.test.d.ts +0 -2
- package/dist/__tests__/learned-skills/loader.test.d.ts.map +0 -1
- package/dist/__tests__/learned-skills/loader.test.js +0 -69
- package/dist/__tests__/learned-skills/loader.test.js.map +0 -1
- package/dist/__tests__/learned-skills/parser.test.d.ts +0 -2
- package/dist/__tests__/learned-skills/parser.test.d.ts.map +0 -1
- package/dist/__tests__/learned-skills/parser.test.js +0 -81
- package/dist/__tests__/learned-skills/parser.test.js.map +0 -1
- package/dist/__tests__/learned-skills/validator.test.d.ts +0 -2
- package/dist/__tests__/learned-skills/validator.test.d.ts.map +0 -1
- package/dist/__tests__/learned-skills/validator.test.js +0 -85
- package/dist/__tests__/learned-skills/validator.test.js.map +0 -1
- package/dist/agents/codex-agents.d.ts +0 -20
- package/dist/agents/codex-agents.d.ts.map +0 -1
- package/dist/agents/codex-agents.js +0 -36
- package/dist/agents/codex-agents.js.map +0 -1
- package/dist/agents/document-writer.d.ts +0 -11
- package/dist/agents/document-writer.d.ts.map +0 -1
- package/dist/agents/document-writer.js +0 -209
- package/dist/agents/document-writer.js.map +0 -1
- package/dist/agents/frontend-engineer.d.ts +0 -11
- package/dist/agents/frontend-engineer.d.ts.map +0 -1
- package/dist/agents/frontend-engineer.js +0 -115
- package/dist/agents/frontend-engineer.js.map +0 -1
- package/dist/agents/librarian.d.ts +0 -12
- package/dist/agents/librarian.d.ts.map +0 -1
- package/dist/agents/librarian.js +0 -103
- package/dist/agents/librarian.js.map +0 -1
- package/dist/agents/metis.d.ts +0 -12
- package/dist/agents/metis.d.ts.map +0 -1
- package/dist/agents/metis.js +0 -117
- package/dist/agents/metis.js.map +0 -1
- package/dist/agents/momus.d.ts +0 -12
- package/dist/agents/momus.d.ts.map +0 -1
- package/dist/agents/momus.js +0 -128
- package/dist/agents/momus.js.map +0 -1
- package/dist/agents/multimodal-looker.d.ts +0 -11
- package/dist/agents/multimodal-looker.d.ts.map +0 -1
- package/dist/agents/multimodal-looker.js +0 -70
- package/dist/agents/multimodal-looker.js.map +0 -1
- package/dist/agents/oracle.d.ts +0 -13
- package/dist/agents/oracle.d.ts.map +0 -1
- package/dist/agents/oracle.js +0 -191
- package/dist/agents/oracle.js.map +0 -1
- package/dist/agents/orchestrator-sisyphus.d.ts +0 -11
- package/dist/agents/orchestrator-sisyphus.d.ts.map +0 -1
- package/dist/agents/orchestrator-sisyphus.js +0 -115
- package/dist/agents/orchestrator-sisyphus.js.map +0 -1
- package/dist/agents/prometheus.d.ts +0 -12
- package/dist/agents/prometheus.d.ts.map +0 -1
- package/dist/agents/prometheus.js +0 -195
- package/dist/agents/prometheus.js.map +0 -1
- package/dist/agents/sisyphus-junior.d.ts +0 -12
- package/dist/agents/sisyphus-junior.d.ts.map +0 -1
- package/dist/agents/sisyphus-junior.js +0 -93
- package/dist/agents/sisyphus-junior.js.map +0 -1
- package/dist/cli/components/CostDashboard.d.ts +0 -15
- package/dist/cli/components/CostDashboard.d.ts.map +0 -1
- package/dist/cli/components/CostDashboard.js +0 -15
- package/dist/cli/components/CostDashboard.js.map +0 -1
- package/dist/cli/components/LiveStats.d.ts +0 -16
- package/dist/cli/components/LiveStats.d.ts.map +0 -1
- package/dist/cli/components/LiveStats.js +0 -16
- package/dist/cli/components/LiveStats.js.map +0 -1
- package/dist/cli/components/SessionBrowser.d.ts +0 -14
- package/dist/cli/components/SessionBrowser.d.ts.map +0 -1
- package/dist/cli/components/SessionBrowser.js +0 -14
- package/dist/cli/components/SessionBrowser.js.map +0 -1
- package/dist/cli/tui.d.ts +0 -21
- package/dist/cli/tui.d.ts.map +0 -1
- package/dist/cli/tui.js +0 -21
- package/dist/cli/tui.js.map +0 -1
- package/dist/hooks/autopilot/signals.d.ts +0 -20
- package/dist/hooks/autopilot/signals.d.ts.map +0 -1
- package/dist/hooks/autopilot/signals.js +0 -75
- package/dist/hooks/autopilot/signals.js.map +0 -1
- package/dist/hooks/autopilot/summary.d.ts +0 -27
- package/dist/hooks/autopilot/summary.d.ts.map +0 -1
- package/dist/hooks/autopilot/summary.js +0 -160
- package/dist/hooks/autopilot/summary.js.map +0 -1
- package/dist/hooks/autopilot/transition.d.ts +0 -39
- package/dist/hooks/autopilot/transition.d.ts.map +0 -1
- package/dist/hooks/autopilot/transition.js +0 -216
- package/dist/hooks/autopilot/transition.js.map +0 -1
- package/dist/hooks/context-window-limit-recovery/constants.d.ts +0 -28
- package/dist/hooks/context-window-limit-recovery/constants.d.ts.map +0 -1
- package/dist/hooks/context-window-limit-recovery/constants.js +0 -85
- package/dist/hooks/context-window-limit-recovery/constants.js.map +0 -1
- package/dist/hooks/context-window-limit-recovery/index.d.ts +0 -62
- package/dist/hooks/context-window-limit-recovery/index.d.ts.map +0 -1
- package/dist/hooks/context-window-limit-recovery/index.js +0 -201
- package/dist/hooks/context-window-limit-recovery/index.js.map +0 -1
- package/dist/hooks/context-window-limit-recovery/parser.d.ts +0 -31
- package/dist/hooks/context-window-limit-recovery/parser.d.ts.map +0 -1
- package/dist/hooks/context-window-limit-recovery/parser.js +0 -241
- package/dist/hooks/context-window-limit-recovery/parser.js.map +0 -1
- package/dist/hooks/context-window-limit-recovery/types.d.ts +0 -84
- package/dist/hooks/context-window-limit-recovery/types.d.ts.map +0 -1
- package/dist/hooks/context-window-limit-recovery/types.js +0 -34
- package/dist/hooks/context-window-limit-recovery/types.js.map +0 -1
- package/dist/hooks/edit-error-recovery/index.d.ts +0 -62
- package/dist/hooks/edit-error-recovery/index.d.ts.map +0 -1
- package/dist/hooks/edit-error-recovery/index.js +0 -89
- package/dist/hooks/edit-error-recovery/index.js.map +0 -1
- package/dist/hooks/learned-skills/config.d.ts +0 -53
- package/dist/hooks/learned-skills/config.d.ts.map +0 -1
- package/dist/hooks/learned-skills/config.js +0 -103
- package/dist/hooks/learned-skills/config.js.map +0 -1
- package/dist/hooks/learned-skills/constants.d.ts +0 -24
- package/dist/hooks/learned-skills/constants.d.ts.map +0 -1
- package/dist/hooks/learned-skills/constants.js +0 -26
- package/dist/hooks/learned-skills/constants.js.map +0 -1
- package/dist/hooks/learned-skills/detection-hook.d.ts +0 -39
- package/dist/hooks/learned-skills/detection-hook.d.ts.map +0 -1
- package/dist/hooks/learned-skills/detection-hook.js +0 -83
- package/dist/hooks/learned-skills/detection-hook.js.map +0 -1
- package/dist/hooks/learned-skills/detector.d.ts +0 -30
- package/dist/hooks/learned-skills/detector.d.ts.map +0 -1
- package/dist/hooks/learned-skills/detector.js +0 -150
- package/dist/hooks/learned-skills/detector.js.map +0 -1
- package/dist/hooks/learned-skills/finder.d.ts +0 -21
- package/dist/hooks/learned-skills/finder.d.ts.map +0 -1
- package/dist/hooks/learned-skills/finder.js +0 -117
- package/dist/hooks/learned-skills/finder.js.map +0 -1
- package/dist/hooks/learned-skills/index.d.ts +0 -62
- package/dist/hooks/learned-skills/index.d.ts.map +0 -1
- package/dist/hooks/learned-skills/index.js +0 -137
- package/dist/hooks/learned-skills/index.js.map +0 -1
- package/dist/hooks/learned-skills/loader.d.ts +0 -20
- package/dist/hooks/learned-skills/loader.d.ts.map +0 -1
- package/dist/hooks/learned-skills/loader.js +0 -107
- package/dist/hooks/learned-skills/loader.js.map +0 -1
- package/dist/hooks/learned-skills/parser.d.ts +0 -21
- package/dist/hooks/learned-skills/parser.d.ts.map +0 -1
- package/dist/hooks/learned-skills/parser.js +0 -190
- package/dist/hooks/learned-skills/parser.js.map +0 -1
- package/dist/hooks/learned-skills/promotion.d.ts +0 -29
- package/dist/hooks/learned-skills/promotion.d.ts.map +0 -1
- package/dist/hooks/learned-skills/promotion.js +0 -87
- package/dist/hooks/learned-skills/promotion.js.map +0 -1
- package/dist/hooks/learned-skills/types.d.ts +0 -109
- package/dist/hooks/learned-skills/types.d.ts.map +0 -1
- package/dist/hooks/learned-skills/types.js +0 -8
- package/dist/hooks/learned-skills/types.js.map +0 -1
- package/dist/hooks/learned-skills/validator.d.ts +0 -15
- package/dist/hooks/learned-skills/validator.d.ts.map +0 -1
- package/dist/hooks/learned-skills/validator.js +0 -87
- package/dist/hooks/learned-skills/validator.js.map +0 -1
- package/dist/hooks/learned-skills/writer.d.ts +0 -27
- package/dist/hooks/learned-skills/writer.d.ts.map +0 -1
- package/dist/hooks/learned-skills/writer.js +0 -126
- package/dist/hooks/learned-skills/writer.js.map +0 -1
- package/dist/hooks/mnemosyne/config.d.ts +0 -53
- package/dist/hooks/mnemosyne/config.d.ts.map +0 -1
- package/dist/hooks/mnemosyne/config.js +0 -103
- package/dist/hooks/mnemosyne/config.js.map +0 -1
- package/dist/hooks/mnemosyne/constants.d.ts +0 -24
- package/dist/hooks/mnemosyne/constants.d.ts.map +0 -1
- package/dist/hooks/mnemosyne/constants.js +0 -26
- package/dist/hooks/mnemosyne/constants.js.map +0 -1
- package/dist/hooks/mnemosyne/detection-hook.d.ts +0 -39
- package/dist/hooks/mnemosyne/detection-hook.d.ts.map +0 -1
- package/dist/hooks/mnemosyne/detection-hook.js +0 -83
- package/dist/hooks/mnemosyne/detection-hook.js.map +0 -1
- package/dist/hooks/mnemosyne/detector.d.ts +0 -30
- package/dist/hooks/mnemosyne/detector.d.ts.map +0 -1
- package/dist/hooks/mnemosyne/detector.js +0 -150
- package/dist/hooks/mnemosyne/detector.js.map +0 -1
- package/dist/hooks/mnemosyne/finder.d.ts +0 -21
- package/dist/hooks/mnemosyne/finder.d.ts.map +0 -1
- package/dist/hooks/mnemosyne/finder.js +0 -117
- package/dist/hooks/mnemosyne/finder.js.map +0 -1
- package/dist/hooks/mnemosyne/index.d.ts +0 -62
- package/dist/hooks/mnemosyne/index.d.ts.map +0 -1
- package/dist/hooks/mnemosyne/index.js +0 -137
- package/dist/hooks/mnemosyne/index.js.map +0 -1
- package/dist/hooks/mnemosyne/loader.d.ts +0 -20
- package/dist/hooks/mnemosyne/loader.d.ts.map +0 -1
- package/dist/hooks/mnemosyne/loader.js +0 -113
- package/dist/hooks/mnemosyne/loader.js.map +0 -1
- package/dist/hooks/mnemosyne/parser.d.ts +0 -21
- package/dist/hooks/mnemosyne/parser.d.ts.map +0 -1
- package/dist/hooks/mnemosyne/parser.js +0 -190
- package/dist/hooks/mnemosyne/parser.js.map +0 -1
- package/dist/hooks/mnemosyne/promotion.d.ts +0 -29
- package/dist/hooks/mnemosyne/promotion.d.ts.map +0 -1
- package/dist/hooks/mnemosyne/promotion.js +0 -87
- package/dist/hooks/mnemosyne/promotion.js.map +0 -1
- package/dist/hooks/mnemosyne/types.d.ts +0 -109
- package/dist/hooks/mnemosyne/types.d.ts.map +0 -1
- package/dist/hooks/mnemosyne/types.js +0 -8
- package/dist/hooks/mnemosyne/types.js.map +0 -1
- package/dist/hooks/mnemosyne/validator.d.ts +0 -15
- package/dist/hooks/mnemosyne/validator.d.ts.map +0 -1
- package/dist/hooks/mnemosyne/validator.js +0 -87
- package/dist/hooks/mnemosyne/validator.js.map +0 -1
- package/dist/hooks/mnemosyne/writer.d.ts +0 -27
- package/dist/hooks/mnemosyne/writer.d.ts.map +0 -1
- package/dist/hooks/mnemosyne/writer.js +0 -126
- package/dist/hooks/mnemosyne/writer.js.map +0 -1
- package/dist/hooks/ralph-loop/index.d.ts +0 -116
- package/dist/hooks/ralph-loop/index.d.ts.map +0 -1
- package/dist/hooks/ralph-loop/index.js +0 -322
- package/dist/hooks/ralph-loop/index.js.map +0 -1
- package/dist/hooks/ralph-prd/index.d.ts +0 -130
- package/dist/hooks/ralph-prd/index.d.ts.map +0 -1
- package/dist/hooks/ralph-prd/index.js +0 -310
- package/dist/hooks/ralph-prd/index.js.map +0 -1
- package/dist/hooks/ralph-progress/index.d.ts +0 -102
- package/dist/hooks/ralph-progress/index.d.ts.map +0 -1
- package/dist/hooks/ralph-progress/index.js +0 -408
- package/dist/hooks/ralph-progress/index.js.map +0 -1
- package/dist/hooks/ralph-verifier/index.d.ts +0 -72
- package/dist/hooks/ralph-verifier/index.d.ts.map +0 -1
- package/dist/hooks/ralph-verifier/index.js +0 -223
- package/dist/hooks/ralph-verifier/index.js.map +0 -1
- package/dist/hooks/session-recovery/constants.d.ts +0 -56
- package/dist/hooks/session-recovery/constants.d.ts.map +0 -1
- package/dist/hooks/session-recovery/constants.js +0 -78
- package/dist/hooks/session-recovery/constants.js.map +0 -1
- package/dist/hooks/session-recovery/index.d.ts +0 -53
- package/dist/hooks/session-recovery/index.d.ts.map +0 -1
- package/dist/hooks/session-recovery/index.js +0 -321
- package/dist/hooks/session-recovery/index.js.map +0 -1
- package/dist/hooks/session-recovery/storage.d.ts +0 -76
- package/dist/hooks/session-recovery/storage.d.ts.map +0 -1
- package/dist/hooks/session-recovery/storage.js +0 -383
- package/dist/hooks/session-recovery/storage.js.map +0 -1
- package/dist/hooks/session-recovery/types.d.ts +0 -145
- package/dist/hooks/session-recovery/types.d.ts.map +0 -1
- package/dist/hooks/session-recovery/types.js +0 -8
- package/dist/hooks/session-recovery/types.js.map +0 -1
- package/dist/hooks/sisyphus-orchestrator/constants.d.ts +0 -23
- package/dist/hooks/sisyphus-orchestrator/constants.d.ts.map +0 -1
- package/dist/hooks/sisyphus-orchestrator/constants.js +0 -142
- package/dist/hooks/sisyphus-orchestrator/constants.js.map +0 -1
- package/dist/hooks/sisyphus-orchestrator/index.d.ts +0 -113
- package/dist/hooks/sisyphus-orchestrator/index.d.ts.map +0 -1
- package/dist/hooks/sisyphus-orchestrator/index.js +0 -309
- package/dist/hooks/sisyphus-orchestrator/index.js.map +0 -1
- package/dist/hooks/ultraqa-loop/index.d.ts +0 -94
- package/dist/hooks/ultraqa-loop/index.d.ts.map +0 -1
- package/dist/hooks/ultraqa-loop/index.js +0 -216
- package/dist/hooks/ultraqa-loop/index.js.map +0 -1
- package/dist/hooks/ultrawork-state/index.d.ts +0 -62
- package/dist/hooks/ultrawork-state/index.d.ts.map +0 -1
- package/dist/hooks/ultrawork-state/index.js +0 -208
- package/dist/hooks/ultrawork-state/index.js.map +0 -1
- package/dist/hud/sisyphus-state.d.ts +0 -31
- package/dist/hud/sisyphus-state.d.ts.map +0 -1
- package/dist/hud/sisyphus-state.js +0 -163
- package/dist/hud/sisyphus-state.js.map +0 -1
|
@@ -1,322 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Ralph Hook
|
|
3
|
-
*
|
|
4
|
-
* Self-referential work loop that continues until a completion promise is detected.
|
|
5
|
-
* Named after the character who keeps working until the job is done.
|
|
6
|
-
*
|
|
7
|
-
* Enhanced with PRD (Product Requirements Document) support for structured task tracking.
|
|
8
|
-
* When a prd.json exists, completion is based on all stories having passes: true.
|
|
9
|
-
*
|
|
10
|
-
* Ported from oh-my-opencode's ralph hook.
|
|
11
|
-
*/
|
|
12
|
-
import { existsSync, readFileSync, writeFileSync, mkdirSync, unlinkSync } from 'fs';
|
|
13
|
-
import { join } from 'path';
|
|
14
|
-
import { homedir } from 'os';
|
|
15
|
-
import { readPrd, getPrdStatus, formatNextStoryPrompt, formatPrdStatus } from '../ralph-prd/index.js';
|
|
16
|
-
import { getProgressContext, appendProgress, initProgress, addPattern } from '../ralph-progress/index.js';
|
|
17
|
-
import { readUltraworkState as readUltraworkStateFromModule, writeUltraworkState as writeUltraworkStateFromModule } from '../ultrawork-state/index.js';
|
|
18
|
-
// Forward declaration to avoid circular import - check ultraqa state file directly
|
|
19
|
-
export function isUltraQAActive(directory) {
|
|
20
|
-
const omcDir = join(directory, '.omc');
|
|
21
|
-
const stateFile = join(omcDir, 'ultraqa-state.json');
|
|
22
|
-
if (!existsSync(stateFile)) {
|
|
23
|
-
return false;
|
|
24
|
-
}
|
|
25
|
-
try {
|
|
26
|
-
const content = readFileSync(stateFile, 'utf-8');
|
|
27
|
-
const state = JSON.parse(content);
|
|
28
|
-
return state && state.active === true;
|
|
29
|
-
}
|
|
30
|
-
catch {
|
|
31
|
-
return false;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
const DEFAULT_MAX_ITERATIONS = 10;
|
|
35
|
-
const DEFAULT_COMPLETION_PROMISE = 'TASK_COMPLETE';
|
|
36
|
-
/**
|
|
37
|
-
* Get the state file path for Ralph Loop
|
|
38
|
-
*/
|
|
39
|
-
function getStateFilePath(directory) {
|
|
40
|
-
const omcDir = join(directory, '.omc');
|
|
41
|
-
return join(omcDir, 'ralph-state.json');
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Ensure the .omc directory exists
|
|
45
|
-
*/
|
|
46
|
-
function ensureStateDir(directory) {
|
|
47
|
-
const omcDir = join(directory, '.omc');
|
|
48
|
-
if (!existsSync(omcDir)) {
|
|
49
|
-
mkdirSync(omcDir, { recursive: true });
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Read Ralph Loop state from disk
|
|
54
|
-
*/
|
|
55
|
-
export function readRalphState(directory) {
|
|
56
|
-
const stateFile = getStateFilePath(directory);
|
|
57
|
-
if (!existsSync(stateFile)) {
|
|
58
|
-
return null;
|
|
59
|
-
}
|
|
60
|
-
try {
|
|
61
|
-
const content = readFileSync(stateFile, 'utf-8');
|
|
62
|
-
return JSON.parse(content);
|
|
63
|
-
}
|
|
64
|
-
catch {
|
|
65
|
-
return null;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Write Ralph Loop state to disk
|
|
70
|
-
*/
|
|
71
|
-
export function writeRalphState(directory, state) {
|
|
72
|
-
try {
|
|
73
|
-
ensureStateDir(directory);
|
|
74
|
-
const stateFile = getStateFilePath(directory);
|
|
75
|
-
writeFileSync(stateFile, JSON.stringify(state, null, 2));
|
|
76
|
-
return true;
|
|
77
|
-
}
|
|
78
|
-
catch {
|
|
79
|
-
return false;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Clear Ralph Loop state
|
|
84
|
-
*/
|
|
85
|
-
export function clearRalphState(directory) {
|
|
86
|
-
const stateFile = getStateFilePath(directory);
|
|
87
|
-
if (!existsSync(stateFile)) {
|
|
88
|
-
return true;
|
|
89
|
-
}
|
|
90
|
-
try {
|
|
91
|
-
unlinkSync(stateFile);
|
|
92
|
-
return true;
|
|
93
|
-
}
|
|
94
|
-
catch {
|
|
95
|
-
return false;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Clear ultrawork state (only if linked to ralph)
|
|
100
|
-
*/
|
|
101
|
-
export function clearLinkedUltraworkState(directory) {
|
|
102
|
-
const state = readUltraworkStateFromModule(directory);
|
|
103
|
-
// Only clear if it was linked to ralph (auto-activated)
|
|
104
|
-
if (!state || !state.linked_to_ralph) {
|
|
105
|
-
return true;
|
|
106
|
-
}
|
|
107
|
-
const omcDir = join(directory, '.omc');
|
|
108
|
-
const stateFile = join(omcDir, 'ultrawork-state.json');
|
|
109
|
-
try {
|
|
110
|
-
unlinkSync(stateFile);
|
|
111
|
-
return true;
|
|
112
|
-
}
|
|
113
|
-
catch {
|
|
114
|
-
return false;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Increment Ralph Loop iteration
|
|
119
|
-
*/
|
|
120
|
-
export function incrementRalphIteration(directory) {
|
|
121
|
-
const state = readRalphState(directory);
|
|
122
|
-
if (!state || !state.active) {
|
|
123
|
-
return null;
|
|
124
|
-
}
|
|
125
|
-
state.iteration += 1;
|
|
126
|
-
if (writeRalphState(directory, state)) {
|
|
127
|
-
return state;
|
|
128
|
-
}
|
|
129
|
-
return null;
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* Detect completion promise in session transcript
|
|
133
|
-
*/
|
|
134
|
-
export function detectCompletionPromise(sessionId, promise) {
|
|
135
|
-
// Try to find transcript in Claude's session directory
|
|
136
|
-
const claudeDir = join(homedir(), '.claude');
|
|
137
|
-
const possiblePaths = [
|
|
138
|
-
join(claudeDir, 'sessions', sessionId, 'transcript.md'),
|
|
139
|
-
join(claudeDir, 'sessions', sessionId, 'messages.json'),
|
|
140
|
-
join(claudeDir, 'transcripts', `${sessionId}.md`)
|
|
141
|
-
];
|
|
142
|
-
for (const transcriptPath of possiblePaths) {
|
|
143
|
-
if (existsSync(transcriptPath)) {
|
|
144
|
-
try {
|
|
145
|
-
const content = readFileSync(transcriptPath, 'utf-8');
|
|
146
|
-
const pattern = new RegExp(`<promise>\\s*${escapeRegex(promise)}\\s*</promise>`, 'is');
|
|
147
|
-
if (pattern.test(content)) {
|
|
148
|
-
return true;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
catch {
|
|
152
|
-
continue;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
return false;
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* Escape regex special characters
|
|
160
|
-
*/
|
|
161
|
-
function escapeRegex(str) {
|
|
162
|
-
return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* Create a Ralph Loop hook instance
|
|
166
|
-
*/
|
|
167
|
-
export function createRalphLoopHook(directory) {
|
|
168
|
-
const startLoop = (sessionId, prompt, options) => {
|
|
169
|
-
// Mutual exclusion check: cannot start Ralph Loop if UltraQA is active
|
|
170
|
-
if (isUltraQAActive(directory)) {
|
|
171
|
-
console.error('Cannot start Ralph Loop while UltraQA is active. Cancel UltraQA first with /oh-my-claudecode:cancel-ultraqa.');
|
|
172
|
-
return false;
|
|
173
|
-
}
|
|
174
|
-
const enableUltrawork = !options?.disableUltrawork;
|
|
175
|
-
const now = new Date().toISOString();
|
|
176
|
-
const state = {
|
|
177
|
-
active: true,
|
|
178
|
-
iteration: 1,
|
|
179
|
-
max_iterations: options?.maxIterations ?? DEFAULT_MAX_ITERATIONS,
|
|
180
|
-
completion_promise: options?.completionPromise ?? DEFAULT_COMPLETION_PROMISE,
|
|
181
|
-
started_at: now,
|
|
182
|
-
prompt,
|
|
183
|
-
session_id: sessionId,
|
|
184
|
-
linked_ultrawork: enableUltrawork
|
|
185
|
-
};
|
|
186
|
-
const ralphSuccess = writeRalphState(directory, state);
|
|
187
|
-
// Auto-activate ultrawork (linked to ralph) by default
|
|
188
|
-
if (ralphSuccess && enableUltrawork) {
|
|
189
|
-
const ultraworkState = {
|
|
190
|
-
active: true,
|
|
191
|
-
reinforcement_count: 0,
|
|
192
|
-
original_prompt: prompt,
|
|
193
|
-
started_at: now,
|
|
194
|
-
last_checked_at: now,
|
|
195
|
-
linked_to_ralph: true
|
|
196
|
-
};
|
|
197
|
-
writeUltraworkStateFromModule(ultraworkState, directory);
|
|
198
|
-
}
|
|
199
|
-
return ralphSuccess;
|
|
200
|
-
};
|
|
201
|
-
const cancelLoop = (sessionId) => {
|
|
202
|
-
const state = readRalphState(directory);
|
|
203
|
-
if (!state || state.session_id !== sessionId) {
|
|
204
|
-
return false;
|
|
205
|
-
}
|
|
206
|
-
// Also clear linked ultrawork state if it was auto-activated
|
|
207
|
-
if (state.linked_ultrawork) {
|
|
208
|
-
clearLinkedUltraworkState(directory);
|
|
209
|
-
}
|
|
210
|
-
return clearRalphState(directory);
|
|
211
|
-
};
|
|
212
|
-
const getState = () => {
|
|
213
|
-
return readRalphState(directory);
|
|
214
|
-
};
|
|
215
|
-
return {
|
|
216
|
-
startLoop,
|
|
217
|
-
cancelLoop,
|
|
218
|
-
getState
|
|
219
|
-
};
|
|
220
|
-
}
|
|
221
|
-
// ============================================================================
|
|
222
|
-
// PRD Integration
|
|
223
|
-
// ============================================================================
|
|
224
|
-
/**
|
|
225
|
-
* Check if PRD mode is available (prd.json exists)
|
|
226
|
-
*/
|
|
227
|
-
export function hasPrd(directory) {
|
|
228
|
-
const prd = readPrd(directory);
|
|
229
|
-
return prd !== null;
|
|
230
|
-
}
|
|
231
|
-
/**
|
|
232
|
-
* Get PRD completion status for ralph
|
|
233
|
-
*/
|
|
234
|
-
export function getPrdCompletionStatus(directory) {
|
|
235
|
-
const prd = readPrd(directory);
|
|
236
|
-
if (!prd) {
|
|
237
|
-
return {
|
|
238
|
-
hasPrd: false,
|
|
239
|
-
allComplete: false,
|
|
240
|
-
status: null,
|
|
241
|
-
nextStory: null
|
|
242
|
-
};
|
|
243
|
-
}
|
|
244
|
-
const status = getPrdStatus(prd);
|
|
245
|
-
return {
|
|
246
|
-
hasPrd: true,
|
|
247
|
-
allComplete: status.allComplete,
|
|
248
|
-
status,
|
|
249
|
-
nextStory: status.nextStory
|
|
250
|
-
};
|
|
251
|
-
}
|
|
252
|
-
/**
|
|
253
|
-
* Get context injection for ralph continuation
|
|
254
|
-
* Includes PRD current story and progress memory
|
|
255
|
-
*/
|
|
256
|
-
export function getRalphContext(directory) {
|
|
257
|
-
const parts = [];
|
|
258
|
-
// Add progress context (patterns, learnings)
|
|
259
|
-
const progressContext = getProgressContext(directory);
|
|
260
|
-
if (progressContext) {
|
|
261
|
-
parts.push(progressContext);
|
|
262
|
-
}
|
|
263
|
-
// Add current story from PRD
|
|
264
|
-
const prdStatus = getPrdCompletionStatus(directory);
|
|
265
|
-
if (prdStatus.hasPrd && prdStatus.nextStory) {
|
|
266
|
-
parts.push(formatNextStoryPrompt(prdStatus.nextStory));
|
|
267
|
-
}
|
|
268
|
-
// Add PRD status summary
|
|
269
|
-
if (prdStatus.status) {
|
|
270
|
-
parts.push(`<prd-status>\n${formatPrdStatus(prdStatus.status)}\n</prd-status>\n`);
|
|
271
|
-
}
|
|
272
|
-
return parts.join('\n');
|
|
273
|
-
}
|
|
274
|
-
/**
|
|
275
|
-
* Update ralph state with current story
|
|
276
|
-
*/
|
|
277
|
-
export function setCurrentStory(directory, storyId) {
|
|
278
|
-
const state = readRalphState(directory);
|
|
279
|
-
if (!state) {
|
|
280
|
-
return false;
|
|
281
|
-
}
|
|
282
|
-
state.current_story_id = storyId;
|
|
283
|
-
return writeRalphState(directory, state);
|
|
284
|
-
}
|
|
285
|
-
/**
|
|
286
|
-
* Enable PRD mode in ralph state
|
|
287
|
-
*/
|
|
288
|
-
export function enablePrdMode(directory) {
|
|
289
|
-
const state = readRalphState(directory);
|
|
290
|
-
if (!state) {
|
|
291
|
-
return false;
|
|
292
|
-
}
|
|
293
|
-
state.prd_mode = true;
|
|
294
|
-
// Initialize progress.txt if it doesn't exist
|
|
295
|
-
initProgress(directory);
|
|
296
|
-
return writeRalphState(directory, state);
|
|
297
|
-
}
|
|
298
|
-
/**
|
|
299
|
-
* Record progress after completing a story
|
|
300
|
-
*/
|
|
301
|
-
export function recordStoryProgress(directory, storyId, implementation, filesChanged, learnings) {
|
|
302
|
-
return appendProgress(directory, {
|
|
303
|
-
storyId,
|
|
304
|
-
implementation,
|
|
305
|
-
filesChanged,
|
|
306
|
-
learnings
|
|
307
|
-
});
|
|
308
|
-
}
|
|
309
|
-
/**
|
|
310
|
-
* Add a codebase pattern discovered during work
|
|
311
|
-
*/
|
|
312
|
-
export function recordPattern(directory, pattern) {
|
|
313
|
-
return addPattern(directory, pattern);
|
|
314
|
-
}
|
|
315
|
-
/**
|
|
316
|
-
* Check if ralph should complete based on PRD status
|
|
317
|
-
*/
|
|
318
|
-
export function shouldCompleteByPrd(directory) {
|
|
319
|
-
const status = getPrdCompletionStatus(directory);
|
|
320
|
-
return status.hasPrd && status.allComplete;
|
|
321
|
-
}
|
|
322
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/hooks/ralph-loop/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AACpF,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EACL,OAAO,EACP,YAAY,EACZ,qBAAqB,EACrB,eAAe,EAGhB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,UAAU,EACX,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAEL,kBAAkB,IAAI,4BAA4B,EAClD,mBAAmB,IAAI,6BAA6B,EACrD,MAAM,6BAA6B,CAAC;AAErC,mFAAmF;AACnF,MAAM,UAAU,eAAe,CAAC,SAAiB;IAC/C,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACvC,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;IACrD,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QAC3B,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QACjD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAClC,OAAO,KAAK,IAAI,KAAK,CAAC,MAAM,KAAK,IAAI,CAAC;IACxC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAyCD,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAClC,MAAM,0BAA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EAAE,OAAe;IAC9D,OAAO,UAAU,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AACxC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,SAAiB;IACnD,MAAM,MAAM,GAAG,sBAAsB,CAAC,SAAS,CAAC,CAAC;IACjD,OAAO,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,WAAW,CAAC;AAC7C,CAAC"}
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Ralph PRD (Product Requirements Document) Support
|
|
3
|
-
*
|
|
4
|
-
* Implements structured task tracking using prd.json format from the original Ralph.
|
|
5
|
-
* Each user story has:
|
|
6
|
-
* - id: Unique identifier (e.g., "US-001")
|
|
7
|
-
* - title: Short description
|
|
8
|
-
* - description: User story format
|
|
9
|
-
* - acceptanceCriteria: List of criteria to pass
|
|
10
|
-
* - priority: Execution order (1 = highest)
|
|
11
|
-
* - passes: Boolean indicating completion
|
|
12
|
-
* - notes: Optional notes from implementation
|
|
13
|
-
*/
|
|
14
|
-
export interface UserStory {
|
|
15
|
-
/** Unique identifier (e.g., "US-001") */
|
|
16
|
-
id: string;
|
|
17
|
-
/** Short title for the story */
|
|
18
|
-
title: string;
|
|
19
|
-
/** Full user story description */
|
|
20
|
-
description: string;
|
|
21
|
-
/** List of acceptance criteria that must be met */
|
|
22
|
-
acceptanceCriteria: string[];
|
|
23
|
-
/** Execution priority (1 = highest) */
|
|
24
|
-
priority: number;
|
|
25
|
-
/** Whether this story passes (complete and verified) */
|
|
26
|
-
passes: boolean;
|
|
27
|
-
/** Optional notes from implementation */
|
|
28
|
-
notes?: string;
|
|
29
|
-
}
|
|
30
|
-
export interface PRD {
|
|
31
|
-
/** Project name */
|
|
32
|
-
project: string;
|
|
33
|
-
/** Git branch name for this work */
|
|
34
|
-
branchName: string;
|
|
35
|
-
/** Overall description of the feature/task */
|
|
36
|
-
description: string;
|
|
37
|
-
/** List of user stories */
|
|
38
|
-
userStories: UserStory[];
|
|
39
|
-
}
|
|
40
|
-
export interface PRDStatus {
|
|
41
|
-
/** Total number of stories */
|
|
42
|
-
total: number;
|
|
43
|
-
/** Number of completed (passes: true) stories */
|
|
44
|
-
completed: number;
|
|
45
|
-
/** Number of pending (passes: false) stories */
|
|
46
|
-
pending: number;
|
|
47
|
-
/** Whether all stories are complete */
|
|
48
|
-
allComplete: boolean;
|
|
49
|
-
/** The highest priority incomplete story, if any */
|
|
50
|
-
nextStory: UserStory | null;
|
|
51
|
-
/** List of incomplete story IDs */
|
|
52
|
-
incompleteIds: string[];
|
|
53
|
-
}
|
|
54
|
-
export declare const PRD_FILENAME = "prd.json";
|
|
55
|
-
export declare const PRD_EXAMPLE_FILENAME = "prd.example.json";
|
|
56
|
-
/**
|
|
57
|
-
* Get the path to the prd.json file in a directory
|
|
58
|
-
*/
|
|
59
|
-
export declare function getPrdPath(directory: string): string;
|
|
60
|
-
/**
|
|
61
|
-
* Get the path to the prd.json in .omc subdirectory
|
|
62
|
-
*/
|
|
63
|
-
export declare function getOmcPrdPath(directory: string): string;
|
|
64
|
-
/**
|
|
65
|
-
* Find prd.json in a directory (checks both root and .omc)
|
|
66
|
-
*/
|
|
67
|
-
export declare function findPrdPath(directory: string): string | null;
|
|
68
|
-
/**
|
|
69
|
-
* Read PRD from disk
|
|
70
|
-
*/
|
|
71
|
-
export declare function readPrd(directory: string): PRD | null;
|
|
72
|
-
/**
|
|
73
|
-
* Write PRD to disk
|
|
74
|
-
*/
|
|
75
|
-
export declare function writePrd(directory: string, prd: PRD): boolean;
|
|
76
|
-
/**
|
|
77
|
-
* Get the status of a PRD
|
|
78
|
-
*/
|
|
79
|
-
export declare function getPrdStatus(prd: PRD): PRDStatus;
|
|
80
|
-
/**
|
|
81
|
-
* Mark a story as complete (passes: true)
|
|
82
|
-
*/
|
|
83
|
-
export declare function markStoryComplete(directory: string, storyId: string, notes?: string): boolean;
|
|
84
|
-
/**
|
|
85
|
-
* Mark a story as incomplete (passes: false)
|
|
86
|
-
*/
|
|
87
|
-
export declare function markStoryIncomplete(directory: string, storyId: string, notes?: string): boolean;
|
|
88
|
-
/**
|
|
89
|
-
* Get a specific story by ID
|
|
90
|
-
*/
|
|
91
|
-
export declare function getStory(directory: string, storyId: string): UserStory | null;
|
|
92
|
-
/**
|
|
93
|
-
* Get the next incomplete story (highest priority)
|
|
94
|
-
*/
|
|
95
|
-
export declare function getNextStory(directory: string): UserStory | null;
|
|
96
|
-
/**
|
|
97
|
-
* Input type for creating user stories (priority is optional)
|
|
98
|
-
*/
|
|
99
|
-
export type UserStoryInput = Omit<UserStory, 'passes' | 'priority'> & {
|
|
100
|
-
priority?: number;
|
|
101
|
-
};
|
|
102
|
-
/**
|
|
103
|
-
* Create a new PRD with user stories from a task description
|
|
104
|
-
*/
|
|
105
|
-
export declare function createPrd(project: string, branchName: string, description: string, stories: UserStoryInput[]): PRD;
|
|
106
|
-
/**
|
|
107
|
-
* Create a simple PRD from a task description (single story)
|
|
108
|
-
*/
|
|
109
|
-
export declare function createSimplePrd(project: string, branchName: string, taskDescription: string): PRD;
|
|
110
|
-
/**
|
|
111
|
-
* Initialize a PRD in a directory
|
|
112
|
-
*/
|
|
113
|
-
export declare function initPrd(directory: string, project: string, branchName: string, description: string, stories?: UserStoryInput[]): boolean;
|
|
114
|
-
/**
|
|
115
|
-
* Format PRD status as a string for display
|
|
116
|
-
*/
|
|
117
|
-
export declare function formatPrdStatus(status: PRDStatus): string;
|
|
118
|
-
/**
|
|
119
|
-
* Format a story for display
|
|
120
|
-
*/
|
|
121
|
-
export declare function formatStory(story: UserStory): string;
|
|
122
|
-
/**
|
|
123
|
-
* Format entire PRD for display
|
|
124
|
-
*/
|
|
125
|
-
export declare function formatPrd(prd: PRD): string;
|
|
126
|
-
/**
|
|
127
|
-
* Format next story prompt for injection into ralph
|
|
128
|
-
*/
|
|
129
|
-
export declare function formatNextStoryPrompt(story: UserStory): string;
|
|
130
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1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