oh-my-claude-sisyphus 3.7.3 → 3.7.5
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/agents/build-fixer-low.md +2 -2
- package/agents/build-fixer.md +74 -19
- package/agents/code-reviewer.md +7 -7
- package/agents/designer-high.md +2 -2
- package/agents/designer-low.md +1 -1
- package/agents/designer.md +17 -2
- package/agents/security-reviewer.md +86 -17
- package/agents/tdd-guide.md +151 -12
- package/commands/hud.md +3 -1
- package/dist/__tests__/analytics/analytics-summary.test.d.ts +2 -0
- package/dist/__tests__/analytics/analytics-summary.test.d.ts.map +1 -0
- package/dist/__tests__/analytics/analytics-summary.test.js +267 -0
- package/dist/__tests__/analytics/analytics-summary.test.js.map +1 -0
- package/dist/__tests__/analytics/cost-estimator.test.d.ts +2 -0
- package/dist/__tests__/analytics/cost-estimator.test.d.ts.map +1 -0
- package/dist/__tests__/analytics/cost-estimator.test.js +212 -0
- package/dist/__tests__/analytics/cost-estimator.test.js.map +1 -0
- package/dist/__tests__/analytics/output-estimator.test.js +18 -0
- package/dist/__tests__/analytics/output-estimator.test.js.map +1 -1
- package/dist/__tests__/analytics/token-extractor.test.js +44 -0
- package/dist/__tests__/analytics/token-extractor.test.js.map +1 -1
- package/dist/__tests__/analytics/token-tracker.test.d.ts +2 -0
- package/dist/__tests__/analytics/token-tracker.test.d.ts.map +1 -0
- package/dist/__tests__/analytics/token-tracker.test.js +189 -0
- package/dist/__tests__/analytics/token-tracker.test.js.map +1 -0
- package/dist/__tests__/hooks/auto-slash-command/executor.test.d.ts +7 -0
- package/dist/__tests__/hooks/auto-slash-command/executor.test.d.ts.map +1 -0
- package/dist/__tests__/hooks/auto-slash-command/executor.test.js +374 -0
- package/dist/__tests__/hooks/auto-slash-command/executor.test.js.map +1 -0
- package/dist/__tests__/hud/analytics-display.test.js +3 -8
- package/dist/__tests__/hud/analytics-display.test.js.map +1 -1
- package/dist/__tests__/hud/auto-tracking.integration.test.d.ts +2 -0
- package/dist/__tests__/hud/auto-tracking.integration.test.d.ts.map +1 -0
- package/dist/__tests__/hud/auto-tracking.integration.test.js +12 -0
- package/dist/__tests__/hud/auto-tracking.integration.test.js.map +1 -0
- package/dist/__tests__/hud/top-agents.test.d.ts +8 -0
- package/dist/__tests__/hud/top-agents.test.d.ts.map +1 -0
- package/dist/__tests__/hud/top-agents.test.js +157 -0
- package/dist/__tests__/hud/top-agents.test.js.map +1 -0
- package/dist/__tests__/installer.test.js +1 -1
- package/dist/__tests__/learned-skills/config.test.d.ts +2 -0
- package/dist/__tests__/learned-skills/config.test.d.ts.map +1 -0
- package/dist/__tests__/learned-skills/config.test.js +37 -0
- package/dist/__tests__/learned-skills/config.test.js.map +1 -0
- package/dist/__tests__/learned-skills/detector.test.d.ts +2 -0
- package/dist/__tests__/learned-skills/detector.test.d.ts.map +1 -0
- package/dist/__tests__/learned-skills/detector.test.js +99 -0
- package/dist/__tests__/learned-skills/detector.test.js.map +1 -0
- package/dist/__tests__/learned-skills/finder.test.d.ts +2 -0
- package/dist/__tests__/learned-skills/finder.test.d.ts.map +1 -0
- package/dist/__tests__/learned-skills/finder.test.js +59 -0
- package/dist/__tests__/learned-skills/finder.test.js.map +1 -0
- package/dist/__tests__/learned-skills/loader.test.d.ts +2 -0
- package/dist/__tests__/learned-skills/loader.test.d.ts.map +1 -0
- package/dist/__tests__/learned-skills/loader.test.js +69 -0
- package/dist/__tests__/learned-skills/loader.test.js.map +1 -0
- package/dist/__tests__/learned-skills/parser.test.d.ts +2 -0
- package/dist/__tests__/learned-skills/parser.test.d.ts.map +1 -0
- package/dist/__tests__/learned-skills/parser.test.js +81 -0
- package/dist/__tests__/learned-skills/parser.test.js.map +1 -0
- package/dist/__tests__/learned-skills/validator.test.d.ts +2 -0
- package/dist/__tests__/learned-skills/validator.test.d.ts.map +1 -0
- package/dist/__tests__/learned-skills/validator.test.js +85 -0
- package/dist/__tests__/learned-skills/validator.test.js.map +1 -0
- package/dist/__tests__/skills.test.js +6 -5
- package/dist/__tests__/skills.test.js.map +1 -1
- package/dist/agents/codex-agents.d.ts +20 -0
- package/dist/agents/codex-agents.d.ts.map +1 -0
- package/dist/agents/codex-agents.js +36 -0
- package/dist/agents/codex-agents.js.map +1 -0
- package/dist/agents/definitions.js +1 -1
- package/dist/agents/definitions.js.map +1 -1
- package/dist/agents/document-writer.d.ts +11 -0
- package/dist/agents/document-writer.d.ts.map +1 -0
- package/dist/agents/document-writer.js +209 -0
- package/dist/agents/document-writer.js.map +1 -0
- package/dist/agents/frontend-engineer.d.ts +11 -0
- package/dist/agents/frontend-engineer.d.ts.map +1 -0
- package/dist/agents/frontend-engineer.js +115 -0
- package/dist/agents/frontend-engineer.js.map +1 -0
- package/dist/agents/librarian.d.ts +12 -0
- package/dist/agents/librarian.d.ts.map +1 -0
- package/dist/agents/librarian.js +103 -0
- package/dist/agents/librarian.js.map +1 -0
- package/dist/agents/metis.d.ts +12 -0
- package/dist/agents/metis.d.ts.map +1 -0
- package/dist/agents/metis.js +117 -0
- package/dist/agents/metis.js.map +1 -0
- package/dist/agents/momus.d.ts +12 -0
- package/dist/agents/momus.d.ts.map +1 -0
- package/dist/agents/momus.js +128 -0
- package/dist/agents/momus.js.map +1 -0
- package/dist/agents/multimodal-looker.d.ts +11 -0
- package/dist/agents/multimodal-looker.d.ts.map +1 -0
- package/dist/agents/multimodal-looker.js +70 -0
- package/dist/agents/multimodal-looker.js.map +1 -0
- package/dist/agents/oracle.d.ts +13 -0
- package/dist/agents/oracle.d.ts.map +1 -0
- package/dist/agents/oracle.js +191 -0
- package/dist/agents/oracle.js.map +1 -0
- package/dist/agents/orchestrator-sisyphus.d.ts +11 -0
- package/dist/agents/orchestrator-sisyphus.d.ts.map +1 -0
- package/dist/agents/orchestrator-sisyphus.js +115 -0
- package/dist/agents/orchestrator-sisyphus.js.map +1 -0
- package/dist/agents/prometheus.d.ts +12 -0
- package/dist/agents/prometheus.d.ts.map +1 -0
- package/dist/agents/prometheus.js +195 -0
- package/dist/agents/prometheus.js.map +1 -0
- package/dist/agents/sisyphus-junior.d.ts +12 -0
- package/dist/agents/sisyphus-junior.d.ts.map +1 -0
- package/dist/agents/sisyphus-junior.js +93 -0
- package/dist/agents/sisyphus-junior.js.map +1 -0
- package/dist/analytics/output-estimator.d.ts.map +1 -1
- package/dist/analytics/output-estimator.js +5 -1
- package/dist/analytics/output-estimator.js.map +1 -1
- package/dist/analytics/token-extractor.js +2 -2
- package/dist/analytics/token-extractor.js.map +1 -1
- package/dist/cli/analytics.js +0 -0
- package/dist/cli/components/CostDashboard.d.ts +15 -0
- package/dist/cli/components/CostDashboard.d.ts.map +1 -0
- package/dist/cli/components/CostDashboard.js +15 -0
- package/dist/cli/components/CostDashboard.js.map +1 -0
- package/dist/cli/components/LiveStats.d.ts +16 -0
- package/dist/cli/components/LiveStats.d.ts.map +1 -0
- package/dist/cli/components/LiveStats.js +16 -0
- package/dist/cli/components/LiveStats.js.map +1 -0
- package/dist/cli/components/SessionBrowser.d.ts +14 -0
- package/dist/cli/components/SessionBrowser.d.ts.map +1 -0
- package/dist/cli/components/SessionBrowser.js +14 -0
- package/dist/cli/components/SessionBrowser.js.map +1 -0
- package/dist/cli/index.js +0 -0
- package/dist/cli/tui.d.ts +21 -0
- package/dist/cli/tui.d.ts.map +1 -0
- package/dist/cli/tui.js +21 -0
- package/dist/cli/tui.js.map +1 -0
- package/dist/compatibility/discovery.d.ts.map +1 -1
- package/dist/compatibility/discovery.js +3 -1
- package/dist/compatibility/discovery.js.map +1 -1
- package/dist/hooks/autopilot/prompts.d.ts.map +1 -1
- package/dist/hooks/autopilot/prompts.js +17 -3
- package/dist/hooks/autopilot/prompts.js.map +1 -1
- package/dist/hooks/autopilot/signals.d.ts +20 -0
- package/dist/hooks/autopilot/signals.d.ts.map +1 -0
- package/dist/hooks/autopilot/signals.js +75 -0
- package/dist/hooks/autopilot/signals.js.map +1 -0
- package/dist/hooks/autopilot/summary.d.ts +27 -0
- package/dist/hooks/autopilot/summary.d.ts.map +1 -0
- package/dist/hooks/autopilot/summary.js +160 -0
- package/dist/hooks/autopilot/summary.js.map +1 -0
- package/dist/hooks/autopilot/transition.d.ts +39 -0
- package/dist/hooks/autopilot/transition.d.ts.map +1 -0
- package/dist/hooks/autopilot/transition.js +216 -0
- package/dist/hooks/autopilot/transition.js.map +1 -0
- package/dist/hooks/context-window-limit-recovery/constants.d.ts +28 -0
- package/dist/hooks/context-window-limit-recovery/constants.d.ts.map +1 -0
- package/dist/hooks/context-window-limit-recovery/constants.js +85 -0
- package/dist/hooks/context-window-limit-recovery/constants.js.map +1 -0
- package/dist/hooks/context-window-limit-recovery/index.d.ts +62 -0
- package/dist/hooks/context-window-limit-recovery/index.d.ts.map +1 -0
- package/dist/hooks/context-window-limit-recovery/index.js +201 -0
- package/dist/hooks/context-window-limit-recovery/index.js.map +1 -0
- package/dist/hooks/context-window-limit-recovery/parser.d.ts +31 -0
- package/dist/hooks/context-window-limit-recovery/parser.d.ts.map +1 -0
- package/dist/hooks/context-window-limit-recovery/parser.js +241 -0
- package/dist/hooks/context-window-limit-recovery/parser.js.map +1 -0
- package/dist/hooks/context-window-limit-recovery/types.d.ts +84 -0
- package/dist/hooks/context-window-limit-recovery/types.d.ts.map +1 -0
- package/dist/hooks/context-window-limit-recovery/types.js +34 -0
- package/dist/hooks/context-window-limit-recovery/types.js.map +1 -0
- package/dist/hooks/edit-error-recovery/index.d.ts +62 -0
- package/dist/hooks/edit-error-recovery/index.d.ts.map +1 -0
- package/dist/hooks/edit-error-recovery/index.js +89 -0
- package/dist/hooks/edit-error-recovery/index.js.map +1 -0
- package/dist/hooks/github-auto-responder/classifier.d.ts +43 -0
- package/dist/hooks/github-auto-responder/classifier.d.ts.map +1 -0
- package/dist/hooks/github-auto-responder/classifier.js +150 -0
- package/dist/hooks/github-auto-responder/classifier.js.map +1 -0
- package/dist/hooks/github-auto-responder/config.d.ts +109 -0
- package/dist/hooks/github-auto-responder/config.d.ts.map +1 -0
- package/dist/hooks/github-auto-responder/config.js +69 -0
- package/dist/hooks/github-auto-responder/config.js.map +1 -0
- package/dist/hooks/github-auto-responder/constants.d.ts +45 -0
- package/dist/hooks/github-auto-responder/constants.d.ts.map +1 -0
- package/dist/hooks/github-auto-responder/constants.js +60 -0
- package/dist/hooks/github-auto-responder/constants.js.map +1 -0
- package/dist/hooks/github-auto-responder/filters.d.ts +95 -0
- package/dist/hooks/github-auto-responder/filters.d.ts.map +1 -0
- package/dist/hooks/github-auto-responder/filters.js +174 -0
- package/dist/hooks/github-auto-responder/filters.js.map +1 -0
- package/dist/hooks/github-auto-responder/github-client.d.ts +65 -0
- package/dist/hooks/github-auto-responder/github-client.d.ts.map +1 -0
- package/dist/hooks/github-auto-responder/github-client.js +128 -0
- package/dist/hooks/github-auto-responder/github-client.js.map +1 -0
- package/dist/hooks/github-auto-responder/idempotency.d.ts +68 -0
- package/dist/hooks/github-auto-responder/idempotency.d.ts.map +1 -0
- package/dist/hooks/github-auto-responder/idempotency.js +147 -0
- package/dist/hooks/github-auto-responder/idempotency.js.map +1 -0
- package/dist/hooks/github-auto-responder/index.d.ts +140 -0
- package/dist/hooks/github-auto-responder/index.d.ts.map +1 -0
- package/dist/hooks/github-auto-responder/index.js +145 -0
- package/dist/hooks/github-auto-responder/index.js.map +1 -0
- package/dist/hooks/github-auto-responder/persona.d.ts +40 -0
- package/dist/hooks/github-auto-responder/persona.d.ts.map +1 -0
- package/dist/hooks/github-auto-responder/persona.js +99 -0
- package/dist/hooks/github-auto-responder/persona.js.map +1 -0
- package/dist/hooks/github-auto-responder/responder.d.ts +122 -0
- package/dist/hooks/github-auto-responder/responder.d.ts.map +1 -0
- package/dist/hooks/github-auto-responder/responder.js +264 -0
- package/dist/hooks/github-auto-responder/responder.js.map +1 -0
- package/dist/hooks/github-auto-responder/server.d.ts +140 -0
- package/dist/hooks/github-auto-responder/server.d.ts.map +1 -0
- package/dist/hooks/github-auto-responder/server.js +301 -0
- package/dist/hooks/github-auto-responder/server.js.map +1 -0
- package/dist/hooks/github-auto-responder/signature.d.ts +34 -0
- package/dist/hooks/github-auto-responder/signature.d.ts.map +1 -0
- package/dist/hooks/github-auto-responder/signature.js +79 -0
- package/dist/hooks/github-auto-responder/signature.js.map +1 -0
- package/dist/hooks/github-auto-responder/templates.d.ts +16 -0
- package/dist/hooks/github-auto-responder/templates.d.ts.map +1 -0
- package/dist/hooks/github-auto-responder/templates.js +93 -0
- package/dist/hooks/github-auto-responder/templates.js.map +1 -0
- package/dist/hooks/github-auto-responder/types.d.ts +246 -0
- package/dist/hooks/github-auto-responder/types.d.ts.map +1 -0
- package/dist/hooks/github-auto-responder/types.js +7 -0
- package/dist/hooks/github-auto-responder/types.js.map +1 -0
- package/dist/hooks/learned-skills/config.d.ts +53 -0
- package/dist/hooks/learned-skills/config.d.ts.map +1 -0
- package/dist/hooks/learned-skills/config.js +103 -0
- package/dist/hooks/learned-skills/config.js.map +1 -0
- package/dist/hooks/learned-skills/constants.d.ts +24 -0
- package/dist/hooks/learned-skills/constants.d.ts.map +1 -0
- package/dist/hooks/learned-skills/constants.js +26 -0
- package/dist/hooks/learned-skills/constants.js.map +1 -0
- package/dist/hooks/learned-skills/detection-hook.d.ts +39 -0
- package/dist/hooks/learned-skills/detection-hook.d.ts.map +1 -0
- package/dist/hooks/learned-skills/detection-hook.js +83 -0
- package/dist/hooks/learned-skills/detection-hook.js.map +1 -0
- package/dist/hooks/learned-skills/detector.d.ts +30 -0
- package/dist/hooks/learned-skills/detector.d.ts.map +1 -0
- package/dist/hooks/learned-skills/detector.js +150 -0
- package/dist/hooks/learned-skills/detector.js.map +1 -0
- package/dist/hooks/learned-skills/finder.d.ts +21 -0
- package/dist/hooks/learned-skills/finder.d.ts.map +1 -0
- package/dist/hooks/learned-skills/finder.js +117 -0
- package/dist/hooks/learned-skills/finder.js.map +1 -0
- package/dist/hooks/learned-skills/index.d.ts +62 -0
- package/dist/hooks/learned-skills/index.d.ts.map +1 -0
- package/dist/hooks/learned-skills/index.js +137 -0
- package/dist/hooks/learned-skills/index.js.map +1 -0
- package/dist/hooks/learned-skills/loader.d.ts +20 -0
- package/dist/hooks/learned-skills/loader.d.ts.map +1 -0
- package/dist/hooks/learned-skills/loader.js +107 -0
- package/dist/hooks/learned-skills/loader.js.map +1 -0
- package/dist/hooks/learned-skills/parser.d.ts +21 -0
- package/dist/hooks/learned-skills/parser.d.ts.map +1 -0
- package/dist/hooks/learned-skills/parser.js +190 -0
- package/dist/hooks/learned-skills/parser.js.map +1 -0
- package/dist/hooks/learned-skills/promotion.d.ts +29 -0
- package/dist/hooks/learned-skills/promotion.d.ts.map +1 -0
- package/dist/hooks/learned-skills/promotion.js +87 -0
- package/dist/hooks/learned-skills/promotion.js.map +1 -0
- package/dist/hooks/learned-skills/types.d.ts +109 -0
- package/dist/hooks/learned-skills/types.d.ts.map +1 -0
- package/dist/hooks/learned-skills/types.js +8 -0
- package/dist/hooks/learned-skills/types.js.map +1 -0
- package/dist/hooks/learned-skills/validator.d.ts +15 -0
- package/dist/hooks/learned-skills/validator.d.ts.map +1 -0
- package/dist/hooks/learned-skills/validator.js +87 -0
- package/dist/hooks/learned-skills/validator.js.map +1 -0
- package/dist/hooks/learned-skills/writer.d.ts +27 -0
- package/dist/hooks/learned-skills/writer.d.ts.map +1 -0
- package/dist/hooks/learned-skills/writer.js +126 -0
- package/dist/hooks/learned-skills/writer.js.map +1 -0
- package/dist/hooks/mnemosyne/config.d.ts +53 -0
- package/dist/hooks/mnemosyne/config.d.ts.map +1 -0
- package/dist/hooks/mnemosyne/config.js +103 -0
- package/dist/hooks/mnemosyne/config.js.map +1 -0
- package/dist/hooks/mnemosyne/constants.d.ts +24 -0
- package/dist/hooks/mnemosyne/constants.d.ts.map +1 -0
- package/dist/hooks/mnemosyne/constants.js +26 -0
- package/dist/hooks/mnemosyne/constants.js.map +1 -0
- package/dist/hooks/mnemosyne/detection-hook.d.ts +39 -0
- package/dist/hooks/mnemosyne/detection-hook.d.ts.map +1 -0
- package/dist/hooks/mnemosyne/detection-hook.js +83 -0
- package/dist/hooks/mnemosyne/detection-hook.js.map +1 -0
- package/dist/hooks/mnemosyne/detector.d.ts +30 -0
- package/dist/hooks/mnemosyne/detector.d.ts.map +1 -0
- package/dist/hooks/mnemosyne/detector.js +150 -0
- package/dist/hooks/mnemosyne/detector.js.map +1 -0
- package/dist/hooks/mnemosyne/finder.d.ts +21 -0
- package/dist/hooks/mnemosyne/finder.d.ts.map +1 -0
- package/dist/hooks/mnemosyne/finder.js +117 -0
- package/dist/hooks/mnemosyne/finder.js.map +1 -0
- package/dist/hooks/mnemosyne/index.d.ts +62 -0
- package/dist/hooks/mnemosyne/index.d.ts.map +1 -0
- package/dist/hooks/mnemosyne/index.js +137 -0
- package/dist/hooks/mnemosyne/index.js.map +1 -0
- package/dist/hooks/mnemosyne/loader.d.ts +20 -0
- package/dist/hooks/mnemosyne/loader.d.ts.map +1 -0
- package/dist/hooks/mnemosyne/loader.js +113 -0
- package/dist/hooks/mnemosyne/loader.js.map +1 -0
- package/dist/hooks/mnemosyne/parser.d.ts +21 -0
- package/dist/hooks/mnemosyne/parser.d.ts.map +1 -0
- package/dist/hooks/mnemosyne/parser.js +190 -0
- package/dist/hooks/mnemosyne/parser.js.map +1 -0
- package/dist/hooks/mnemosyne/promotion.d.ts +29 -0
- package/dist/hooks/mnemosyne/promotion.d.ts.map +1 -0
- package/dist/hooks/mnemosyne/promotion.js +87 -0
- package/dist/hooks/mnemosyne/promotion.js.map +1 -0
- package/dist/hooks/mnemosyne/types.d.ts +109 -0
- package/dist/hooks/mnemosyne/types.d.ts.map +1 -0
- package/dist/hooks/mnemosyne/types.js +8 -0
- package/dist/hooks/mnemosyne/types.js.map +1 -0
- package/dist/hooks/mnemosyne/validator.d.ts +15 -0
- package/dist/hooks/mnemosyne/validator.d.ts.map +1 -0
- package/dist/hooks/mnemosyne/validator.js +87 -0
- package/dist/hooks/mnemosyne/validator.js.map +1 -0
- package/dist/hooks/mnemosyne/writer.d.ts +27 -0
- package/dist/hooks/mnemosyne/writer.d.ts.map +1 -0
- package/dist/hooks/mnemosyne/writer.js +126 -0
- package/dist/hooks/mnemosyne/writer.js.map +1 -0
- package/dist/hooks/pre-compact/index.d.ts +2 -4
- package/dist/hooks/pre-compact/index.d.ts.map +1 -1
- package/dist/hooks/pre-compact/index.js +3 -4
- package/dist/hooks/pre-compact/index.js.map +1 -1
- package/dist/hooks/ralph-loop/index.d.ts +116 -0
- package/dist/hooks/ralph-loop/index.d.ts.map +1 -0
- package/dist/hooks/ralph-loop/index.js +322 -0
- package/dist/hooks/ralph-loop/index.js.map +1 -0
- package/dist/hooks/ralph-prd/index.d.ts +130 -0
- package/dist/hooks/ralph-prd/index.d.ts.map +1 -0
- package/dist/hooks/ralph-prd/index.js +310 -0
- package/dist/hooks/ralph-prd/index.js.map +1 -0
- package/dist/hooks/ralph-progress/index.d.ts +102 -0
- package/dist/hooks/ralph-progress/index.d.ts.map +1 -0
- package/dist/hooks/ralph-progress/index.js +408 -0
- package/dist/hooks/ralph-progress/index.js.map +1 -0
- package/dist/hooks/ralph-verifier/index.d.ts +72 -0
- package/dist/hooks/ralph-verifier/index.d.ts.map +1 -0
- package/dist/hooks/ralph-verifier/index.js +223 -0
- package/dist/hooks/ralph-verifier/index.js.map +1 -0
- package/dist/hooks/session-recovery/constants.d.ts +56 -0
- package/dist/hooks/session-recovery/constants.d.ts.map +1 -0
- package/dist/hooks/session-recovery/constants.js +78 -0
- package/dist/hooks/session-recovery/constants.js.map +1 -0
- package/dist/hooks/session-recovery/index.d.ts +53 -0
- package/dist/hooks/session-recovery/index.d.ts.map +1 -0
- package/dist/hooks/session-recovery/index.js +321 -0
- package/dist/hooks/session-recovery/index.js.map +1 -0
- package/dist/hooks/session-recovery/storage.d.ts +76 -0
- package/dist/hooks/session-recovery/storage.d.ts.map +1 -0
- package/dist/hooks/session-recovery/storage.js +383 -0
- package/dist/hooks/session-recovery/storage.js.map +1 -0
- package/dist/hooks/session-recovery/types.d.ts +145 -0
- package/dist/hooks/session-recovery/types.d.ts.map +1 -0
- package/dist/hooks/session-recovery/types.js +8 -0
- package/dist/hooks/session-recovery/types.js.map +1 -0
- package/dist/hooks/sisyphus-orchestrator/constants.d.ts +23 -0
- package/dist/hooks/sisyphus-orchestrator/constants.d.ts.map +1 -0
- package/dist/hooks/sisyphus-orchestrator/constants.js +142 -0
- package/dist/hooks/sisyphus-orchestrator/constants.js.map +1 -0
- package/dist/hooks/sisyphus-orchestrator/index.d.ts +113 -0
- package/dist/hooks/sisyphus-orchestrator/index.d.ts.map +1 -0
- package/dist/hooks/sisyphus-orchestrator/index.js +309 -0
- package/dist/hooks/sisyphus-orchestrator/index.js.map +1 -0
- package/dist/hooks/ultraqa-loop/index.d.ts +94 -0
- package/dist/hooks/ultraqa-loop/index.d.ts.map +1 -0
- package/dist/hooks/ultraqa-loop/index.js +216 -0
- package/dist/hooks/ultraqa-loop/index.js.map +1 -0
- package/dist/hooks/ultrawork-state/index.d.ts +62 -0
- package/dist/hooks/ultrawork-state/index.d.ts.map +1 -0
- package/dist/hooks/ultrawork-state/index.js +208 -0
- package/dist/hooks/ultrawork-state/index.js.map +1 -0
- package/dist/hud/analytics-display.d.ts.map +1 -1
- package/dist/hud/analytics-display.js +0 -1
- package/dist/hud/analytics-display.js.map +1 -1
- package/dist/hud/index.js +52 -3
- package/dist/hud/index.js.map +1 -1
- package/dist/hud/sisyphus-state.d.ts +31 -0
- package/dist/hud/sisyphus-state.d.ts.map +1 -0
- package/dist/hud/sisyphus-state.js +163 -0
- package/dist/hud/sisyphus-state.js.map +1 -0
- package/dist/installer/index.d.ts +1 -1
- package/dist/installer/index.js +1 -1
- package/package.json +1 -1
- package/scripts/github-webhook-server.ts +141 -0
- package/skills/hud/SKILL.md +3 -1
|
@@ -6,7 +6,7 @@ model: haiku
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
<Inherits_From>
|
|
9
|
-
Base: build-fixer.md - Build and
|
|
9
|
+
Base: build-fixer.md - Build and Compilation Error Resolution Specialist
|
|
10
10
|
</Inherits_From>
|
|
11
11
|
|
|
12
12
|
<Tier_Identity>
|
|
@@ -46,7 +46,7 @@ You fix ONE thing. Keep it minimal.
|
|
|
46
46
|
1. **Read** the error message
|
|
47
47
|
2. **Find** the single fix needed
|
|
48
48
|
3. **Edit** with minimal change
|
|
49
|
-
4. **Verify** with `
|
|
49
|
+
4. **Verify** with the appropriate type check command (e.g., `tsc --noEmit`, `mypy`, `cargo check`, `go vet`)
|
|
50
50
|
</Workflow>
|
|
51
51
|
|
|
52
52
|
<Output_Format>
|
package/agents/build-fixer.md
CHANGED
|
@@ -1,40 +1,71 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: build-fixer
|
|
3
|
-
description: Build and
|
|
3
|
+
description: Build and compilation error resolution specialist. Use PROACTIVELY when build fails or type errors occur. Fixes build/type errors with minimal diffs, no architectural edits. Focuses on getting the build green quickly.
|
|
4
4
|
model: sonnet
|
|
5
5
|
tools: Read, Grep, Glob, Edit, Write, Bash
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Build Error Fixer
|
|
9
9
|
|
|
10
|
-
You are an expert build error resolution specialist focused on fixing
|
|
10
|
+
You are an expert build error resolution specialist focused on fixing compilation, type, and build errors across any language or framework quickly and efficiently. Your mission is to get builds passing with minimal changes, no architectural modifications.
|
|
11
11
|
|
|
12
12
|
## Core Responsibilities
|
|
13
13
|
|
|
14
|
-
1. **
|
|
14
|
+
1. **Type/Compilation Error Resolution** - Fix type errors, inference issues, generic constraints
|
|
15
15
|
2. **Build Error Fixing** - Resolve compilation failures, module resolution
|
|
16
16
|
3. **Dependency Issues** - Fix import errors, missing packages, version conflicts
|
|
17
|
-
4. **Configuration Errors** - Resolve tsconfig.json,
|
|
17
|
+
4. **Configuration Errors** - Resolve build configuration issues (tsconfig.json, Cargo.toml, go.mod, pyproject.toml, etc.)
|
|
18
18
|
5. **Minimal Diffs** - Make smallest possible changes to fix errors
|
|
19
19
|
6. **No Architecture Changes** - Only fix errors, don't refactor or redesign
|
|
20
20
|
|
|
21
|
+
## Language Detection
|
|
22
|
+
|
|
23
|
+
FIRST: Detect project type by checking for manifest files:
|
|
24
|
+
- `package.json` + `tsconfig.json` → TypeScript (use tsc, npm/yarn/pnpm)
|
|
25
|
+
- `package.json` only → JavaScript (use node, npm/yarn/pnpm)
|
|
26
|
+
- `Cargo.toml` → Rust (use cargo)
|
|
27
|
+
- `go.mod` → Go (use go build)
|
|
28
|
+
- `pyproject.toml` or `requirements.txt` → Python (use mypy, ruff)
|
|
29
|
+
- `pom.xml` or `build.gradle` → Java (use javac, maven/gradle)
|
|
30
|
+
- None found → Use generic approach, ask user
|
|
31
|
+
|
|
21
32
|
## Diagnostic Commands
|
|
22
33
|
|
|
34
|
+
### TypeScript/JavaScript
|
|
23
35
|
```bash
|
|
24
|
-
#
|
|
25
|
-
npx tsc --noEmit
|
|
36
|
+
npx tsc --noEmit # Type check
|
|
37
|
+
npx tsc --noEmit --pretty # Pretty output
|
|
38
|
+
npx eslint . --ext .ts,.tsx,.js,.jsx # Lint
|
|
39
|
+
npm run build # Production build
|
|
40
|
+
```
|
|
26
41
|
|
|
27
|
-
|
|
28
|
-
|
|
42
|
+
### Python
|
|
43
|
+
```bash
|
|
44
|
+
mypy . # Type check
|
|
45
|
+
ruff check . # Lint
|
|
46
|
+
python -m py_compile # Syntax check
|
|
47
|
+
python -m build # Build (if applicable)
|
|
48
|
+
```
|
|
29
49
|
|
|
30
|
-
|
|
31
|
-
|
|
50
|
+
### Go
|
|
51
|
+
```bash
|
|
52
|
+
go build ./... # Build + type check
|
|
53
|
+
go vet ./... # Static analysis
|
|
54
|
+
golangci-lint run # Lint
|
|
55
|
+
```
|
|
32
56
|
|
|
33
|
-
|
|
34
|
-
|
|
57
|
+
### Rust
|
|
58
|
+
```bash
|
|
59
|
+
cargo check # Type check (fast)
|
|
60
|
+
cargo build # Full build
|
|
61
|
+
cargo clippy # Lint
|
|
62
|
+
```
|
|
35
63
|
|
|
36
|
-
|
|
37
|
-
|
|
64
|
+
### Java
|
|
65
|
+
```bash
|
|
66
|
+
mvn compile # Build (Maven)
|
|
67
|
+
gradle build # Build (Gradle)
|
|
68
|
+
mvn checkstyle:check # Lint
|
|
38
69
|
```
|
|
39
70
|
|
|
40
71
|
## Error Resolution Workflow
|
|
@@ -78,6 +109,30 @@ const name = user.name.toUpperCase()
|
|
|
78
109
|
const name = user?.name?.toUpperCase()
|
|
79
110
|
```
|
|
80
111
|
|
|
112
|
+
**Python:**
|
|
113
|
+
```python
|
|
114
|
+
# ERROR: AttributeError: 'NoneType' object has no attribute 'upper'
|
|
115
|
+
name = user.name.upper()
|
|
116
|
+
# FIX: Guard clause
|
|
117
|
+
name = user.name.upper() if user and user.name else None
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**Go:**
|
|
121
|
+
```go
|
|
122
|
+
// ERROR: invalid memory address or nil pointer dereference
|
|
123
|
+
name := user.Name
|
|
124
|
+
// FIX: Nil check
|
|
125
|
+
if user != nil { name = user.Name }
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
**Rust:**
|
|
129
|
+
```rust
|
|
130
|
+
// ERROR: cannot move out of borrowed content
|
|
131
|
+
let name = user.name;
|
|
132
|
+
// FIX: Use Option handling
|
|
133
|
+
let name = user.name.as_deref().unwrap_or_default();
|
|
134
|
+
```
|
|
135
|
+
|
|
81
136
|
### Missing Properties
|
|
82
137
|
```typescript
|
|
83
138
|
// ERROR: Property 'age' does not exist on type 'User'
|
|
@@ -129,7 +184,7 @@ function getLength<T extends { length: number }>(item: T): number {
|
|
|
129
184
|
```markdown
|
|
130
185
|
# Build Error Resolution Report
|
|
131
186
|
|
|
132
|
-
**Build Target:**
|
|
187
|
+
**Build Target:** Type Check / Production Build
|
|
133
188
|
**Initial Errors:** X
|
|
134
189
|
**Errors Fixed:** Y
|
|
135
190
|
**Build Status:** PASSING / FAILING
|
|
@@ -143,7 +198,7 @@ function getLength<T extends { length: number }>(item: T): number {
|
|
|
143
198
|
**Lines Changed:** 1
|
|
144
199
|
|
|
145
200
|
## Verification
|
|
146
|
-
- [ ]
|
|
201
|
+
- [ ] Type check passes
|
|
147
202
|
- [ ] Build succeeds
|
|
148
203
|
- [ ] No new errors introduced
|
|
149
204
|
```
|
|
@@ -151,10 +206,10 @@ function getLength<T extends { length: number }>(item: T): number {
|
|
|
151
206
|
## Success Metrics
|
|
152
207
|
|
|
153
208
|
After build error resolution:
|
|
154
|
-
- `
|
|
155
|
-
- `npm run build`
|
|
209
|
+
- Type check command exits with code 0 (e.g., `tsc --noEmit`, `mypy .`, `go vet`, `cargo check`)
|
|
210
|
+
- Build command completes successfully (e.g., `npm run build`, `cargo build`, `go build`, `mvn compile`)
|
|
156
211
|
- No new errors introduced
|
|
157
212
|
- Minimal lines changed (< 5% of affected file)
|
|
158
213
|
- Development server runs without errors
|
|
159
214
|
|
|
160
|
-
|
|
215
|
+
Fix errors quickly with minimal changes. Don't refactor, don't optimize, don't redesign. Fix the error, verify the build passes, move on.
|
package/agents/code-reviewer.md
CHANGED
|
@@ -74,22 +74,22 @@ Now review for quality (see Review Checklist below).
|
|
|
74
74
|
- Large files (>800 lines)
|
|
75
75
|
- Deep nesting (>4 levels)
|
|
76
76
|
- Missing error handling (try/catch)
|
|
77
|
-
- console.log
|
|
77
|
+
- Debug logging statements (console.log, print(), fmt.Println, etc.)
|
|
78
78
|
- Mutation patterns
|
|
79
79
|
- Missing tests for new code
|
|
80
80
|
|
|
81
81
|
### Performance (MEDIUM)
|
|
82
82
|
- Inefficient algorithms (O(n^2) when O(n log n) possible)
|
|
83
|
-
-
|
|
84
|
-
- Missing memoization
|
|
83
|
+
- Framework-specific performance issues (e.g., unnecessary re-renders in React, N+1 queries in ORMs)
|
|
84
|
+
- Missing caching/memoization
|
|
85
85
|
- Large bundle sizes
|
|
86
86
|
- Missing caching
|
|
87
87
|
- N+1 queries
|
|
88
88
|
|
|
89
89
|
### Best Practices (LOW)
|
|
90
90
|
- Untracked task comments (TODO, etc) without tickets
|
|
91
|
-
- Missing
|
|
92
|
-
- Accessibility issues (missing ARIA labels)
|
|
91
|
+
- Missing documentation for public APIs (JSDoc, docstrings, godoc, etc.)
|
|
92
|
+
- Accessibility issues (missing ARIA labels, if applicable)
|
|
93
93
|
- Poor variable naming (x, tmp, data)
|
|
94
94
|
- Magic numbers without explanation
|
|
95
95
|
- Inconsistent formatting
|
|
@@ -103,8 +103,8 @@ File: src/api/client.ts:42
|
|
|
103
103
|
Issue: API key exposed in source code
|
|
104
104
|
Fix: Move to environment variable
|
|
105
105
|
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
apiKey = "sk-abc123" // BAD (any language)
|
|
107
|
+
apiKey = env("API_KEY") // GOOD: Use environment variables
|
|
108
108
|
```
|
|
109
109
|
|
|
110
110
|
## Severity Levels
|
package/agents/designer-high.md
CHANGED
|
@@ -41,7 +41,7 @@ Before coding, commit to a **BOLD aesthetic direction**:
|
|
|
41
41
|
|
|
42
42
|
1. **Purpose**: What problem does this solve? Who uses it?
|
|
43
43
|
2. **Tone**: Pick an extreme—brutally minimal, maximalist, retro-futuristic, organic, luxury, playful, editorial, brutalist, art deco, soft, industrial
|
|
44
|
-
3. **Constraints**: Technical requirements (framework,
|
|
44
|
+
3. **Constraints**: Technical requirements (detect framework from project files: React, Vue, Angular, Svelte, or vanilla — adapt component patterns accordingly)
|
|
45
45
|
4. **Differentiation**: What's the ONE thing someone will remember?
|
|
46
46
|
|
|
47
47
|
**Key**: Choose a clear direction and execute with precision.
|
|
@@ -64,7 +64,7 @@ Choose distinctive fonts. **Avoid**: Arial, Inter, Roboto, system fonts, Space G
|
|
|
64
64
|
Commit to a cohesive palette. Use CSS variables. Dominant colors with sharp accents outperform timid, evenly-distributed palettes. **Avoid**: purple gradients on white (AI slop).
|
|
65
65
|
|
|
66
66
|
## Motion
|
|
67
|
-
Focus on high-impact moments. One well-orchestrated page load with staggered reveals > scattered micro-interactions. Use scroll-triggering and hover states that surprise. CSS-only preferred.
|
|
67
|
+
Focus on high-impact moments. One well-orchestrated page load with staggered reveals > scattered micro-interactions. Use scroll-triggering and hover states that surprise. CSS-only preferred. Use the project's animation library when available.
|
|
68
68
|
|
|
69
69
|
## Spatial Composition
|
|
70
70
|
Unexpected layouts. Asymmetry. Overlap. Diagonal flow. Grid-breaking elements. Generous negative space OR controlled density.
|
package/agents/designer-low.md
CHANGED
|
@@ -56,7 +56,7 @@ No lengthy planning needed for simple tweaks.
|
|
|
56
56
|
<Output_Format>
|
|
57
57
|
Keep responses minimal:
|
|
58
58
|
|
|
59
|
-
Changed `component
|
|
59
|
+
Changed `component file:42`: [what changed]
|
|
60
60
|
- Updated [property]: [old] → [new]
|
|
61
61
|
- Verified: [visual check status]
|
|
62
62
|
|
package/agents/designer.md
CHANGED
|
@@ -23,6 +23,21 @@ You are a designer who learned to code. You see what pure developers miss—spac
|
|
|
23
23
|
|
|
24
24
|
---
|
|
25
25
|
|
|
26
|
+
# Framework Detection
|
|
27
|
+
|
|
28
|
+
Before implementing, detect the frontend framework from project files:
|
|
29
|
+
- `package.json` with `react` or `next` → **React/Next.js**
|
|
30
|
+
- `package.json` with `vue` → **Vue**
|
|
31
|
+
- `package.json` with `@angular/core` → **Angular**
|
|
32
|
+
- `package.json` with `svelte` → **Svelte/SvelteKit**
|
|
33
|
+
- `package.json` with `solid-js` → **Solid**
|
|
34
|
+
- `.html` files without framework → **Vanilla HTML/CSS/JS**
|
|
35
|
+
- No frontend files detected → Provide generic guidance
|
|
36
|
+
|
|
37
|
+
Use the detected framework's idioms, component patterns, and styling conventions throughout.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
26
41
|
# Design Process
|
|
27
42
|
|
|
28
43
|
Before coding, commit to a **BOLD aesthetic direction**:
|
|
@@ -34,7 +49,7 @@ Before coding, commit to a **BOLD aesthetic direction**:
|
|
|
34
49
|
|
|
35
50
|
**Key**: Choose a clear direction and execute with precision. Intentionality > intensity.
|
|
36
51
|
|
|
37
|
-
Then implement working code
|
|
52
|
+
Then implement working code using the project's detected frontend framework that is:
|
|
38
53
|
- Production-grade and functional
|
|
39
54
|
- Visually striking and memorable
|
|
40
55
|
- Cohesive with a clear aesthetic point-of-view
|
|
@@ -51,7 +66,7 @@ Choose distinctive fonts. **Avoid**: Arial, Inter, Roboto, system fonts, Space G
|
|
|
51
66
|
Commit to a cohesive palette. Use CSS variables. Dominant colors with sharp accents outperform timid, evenly-distributed palettes. **Avoid**: purple gradients on white (AI slop).
|
|
52
67
|
|
|
53
68
|
## Motion
|
|
54
|
-
Focus on high-impact moments. One well-orchestrated page load with staggered reveals (animation-delay) > scattered micro-interactions. Use scroll-triggering and hover states that surprise. Prioritize CSS-only. Use
|
|
69
|
+
Focus on high-impact moments. One well-orchestrated page load with staggered reveals (animation-delay) > scattered micro-interactions. Use scroll-triggering and hover states that surprise. Prioritize CSS-only. Use the project's animation library when available (e.g., Motion for React, vue-animate for Vue, svelte/transition for Svelte).
|
|
55
70
|
|
|
56
71
|
## Spatial Composition
|
|
57
72
|
Unexpected layouts. Asymmetry. Overlap. Diagonal flow. Grid-breaking elements. Generous negative space OR controlled density.
|
|
@@ -15,22 +15,37 @@ You are an expert security specialist focused on identifying and remediating vul
|
|
|
15
15
|
2. **Secrets Detection** - Find hardcoded API keys, passwords, tokens
|
|
16
16
|
3. **Input Validation** - Ensure all user inputs are properly sanitized
|
|
17
17
|
4. **Authentication/Authorization** - Verify proper access controls
|
|
18
|
-
5. **Dependency Security** - Check for vulnerable
|
|
18
|
+
5. **Dependency Security** - Check for vulnerable dependencies
|
|
19
19
|
6. **Security Best Practices** - Enforce secure coding patterns
|
|
20
20
|
|
|
21
21
|
## Security Analysis Commands
|
|
22
22
|
|
|
23
|
+
### Dependency Audit
|
|
23
24
|
```bash
|
|
24
|
-
#
|
|
25
|
-
npm audit
|
|
26
|
-
|
|
27
|
-
# High severity only
|
|
25
|
+
# JavaScript/TypeScript
|
|
26
|
+
npm audit # or: yarn audit, pnpm audit
|
|
28
27
|
npm audit --audit-level=high
|
|
29
28
|
|
|
30
|
-
#
|
|
31
|
-
|
|
29
|
+
# Python
|
|
30
|
+
pip-audit # or: safety check
|
|
31
|
+
pip-audit --strict
|
|
32
|
+
|
|
33
|
+
# Go
|
|
34
|
+
govulncheck ./...
|
|
35
|
+
|
|
36
|
+
# Rust
|
|
37
|
+
cargo audit
|
|
38
|
+
|
|
39
|
+
# Java
|
|
40
|
+
mvn dependency-check:check # or: gradle dependencyCheckAnalyze
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Secrets Scan
|
|
44
|
+
```bash
|
|
45
|
+
# Universal (all languages)
|
|
46
|
+
grep -rn "api[_-]?key\|password\|secret\|token" --include="*.{js,ts,py,go,rs,java,json,yaml,yml,env}" .
|
|
32
47
|
|
|
33
|
-
# Check git history
|
|
48
|
+
# Check git history
|
|
34
49
|
git log -p | grep -i "password\|api_key\|secret"
|
|
35
50
|
```
|
|
36
51
|
|
|
@@ -81,7 +96,7 @@ For each category, check:
|
|
|
81
96
|
|
|
82
97
|
### 9. Using Components with Known Vulnerabilities
|
|
83
98
|
- Are all dependencies up to date?
|
|
84
|
-
- Is
|
|
99
|
+
- Is dependency audit clean?
|
|
85
100
|
- Are CVEs monitored?
|
|
86
101
|
|
|
87
102
|
### 10. Insufficient Logging & Monitoring
|
|
@@ -93,32 +108,86 @@ For each category, check:
|
|
|
93
108
|
|
|
94
109
|
### Hardcoded Secrets (CRITICAL)
|
|
95
110
|
```javascript
|
|
96
|
-
// BAD: Hardcoded secrets
|
|
111
|
+
// BAD: Hardcoded secrets (JavaScript/TypeScript)
|
|
97
112
|
const apiKey = "sk-proj-xxxxx"
|
|
98
|
-
|
|
99
113
|
// GOOD: Environment variables
|
|
100
114
|
const apiKey = process.env.OPENAI_API_KEY
|
|
101
|
-
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
```python
|
|
118
|
+
# BAD: Hardcoded secrets (Python)
|
|
119
|
+
api_key = "sk-proj-xxxxx"
|
|
120
|
+
# GOOD: Environment variables
|
|
121
|
+
import os
|
|
122
|
+
api_key = os.environ["OPENAI_API_KEY"]
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
```go
|
|
126
|
+
// BAD: Hardcoded secrets (Go)
|
|
127
|
+
apiKey := "sk-proj-xxxxx"
|
|
128
|
+
// GOOD: Environment variables
|
|
129
|
+
apiKey := os.Getenv("OPENAI_API_KEY")
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
```rust
|
|
133
|
+
// BAD: Hardcoded secrets (Rust)
|
|
134
|
+
let api_key = "sk-proj-xxxxx";
|
|
135
|
+
// GOOD: Environment variables
|
|
136
|
+
let api_key = std::env::var("OPENAI_API_KEY").expect("OPENAI_API_KEY not set");
|
|
102
137
|
```
|
|
103
138
|
|
|
104
139
|
### SQL Injection (CRITICAL)
|
|
105
140
|
```javascript
|
|
106
|
-
// BAD
|
|
141
|
+
// BAD (JavaScript)
|
|
107
142
|
const query = `SELECT * FROM users WHERE id = ${userId}`
|
|
108
|
-
|
|
109
143
|
// GOOD: Parameterized queries
|
|
110
144
|
const { data } = await db.query('SELECT * FROM users WHERE id = $1', [userId])
|
|
111
145
|
```
|
|
112
146
|
|
|
147
|
+
```python
|
|
148
|
+
# BAD (Python)
|
|
149
|
+
cursor.execute(f"SELECT * FROM users WHERE id = {user_id}")
|
|
150
|
+
# GOOD: Parameterized queries
|
|
151
|
+
cursor.execute("SELECT * FROM users WHERE id = %s", (user_id,))
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
```go
|
|
155
|
+
// BAD (Go)
|
|
156
|
+
query := fmt.Sprintf("SELECT * FROM users WHERE id = %s", userId)
|
|
157
|
+
// GOOD: Parameterized queries
|
|
158
|
+
db.Query("SELECT * FROM users WHERE id = $1", userId)
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
```java
|
|
162
|
+
// BAD (Java)
|
|
163
|
+
String query = "SELECT * FROM users WHERE id = " + userId;
|
|
164
|
+
// GOOD: PreparedStatement
|
|
165
|
+
PreparedStatement stmt = conn.prepareStatement("SELECT * FROM users WHERE id = ?");
|
|
166
|
+
stmt.setString(1, userId);
|
|
167
|
+
```
|
|
168
|
+
|
|
113
169
|
### Command Injection (CRITICAL)
|
|
114
170
|
```javascript
|
|
115
|
-
// BAD
|
|
171
|
+
// BAD (JavaScript)
|
|
116
172
|
exec(`ping ${userInput}`, callback)
|
|
117
|
-
|
|
118
|
-
// GOOD: Use libraries, not shell commands
|
|
173
|
+
// GOOD: Use libraries, avoid shell
|
|
119
174
|
dns.lookup(userInput, callback)
|
|
120
175
|
```
|
|
121
176
|
|
|
177
|
+
```python
|
|
178
|
+
# BAD (Python)
|
|
179
|
+
os.system(f"ping {user_input}")
|
|
180
|
+
# GOOD: Use subprocess with list args
|
|
181
|
+
subprocess.run(["ping", user_input], check=True)
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
```go
|
|
185
|
+
// BAD (Go)
|
|
186
|
+
exec.Command("sh", "-c", "ping " + userInput).Run()
|
|
187
|
+
// GOOD: Pass args separately
|
|
188
|
+
exec.Command("ping", userInput).Run()
|
|
189
|
+
```
|
|
190
|
+
|
|
122
191
|
### Cross-Site Scripting (XSS) (HIGH)
|
|
123
192
|
```javascript
|
|
124
193
|
// BAD: XSS vulnerability
|
package/agents/tdd-guide.md
CHANGED
|
@@ -43,6 +43,17 @@ If you observe code-before-test:
|
|
|
43
43
|
4. **VERIFY** it fails for the right reason
|
|
44
44
|
5. **THEN** implement
|
|
45
45
|
|
|
46
|
+
## Test Framework Detection
|
|
47
|
+
|
|
48
|
+
Detect the project's test framework before writing tests:
|
|
49
|
+
- `jest.config.*` or `vitest.config.*` or `package.json` with jest/vitest → **Jest/Vitest** (JavaScript/TypeScript)
|
|
50
|
+
- `pytest.ini`, `pyproject.toml` with `[tool.pytest]`, `conftest.py` → **Pytest** (Python)
|
|
51
|
+
- `*_test.go` files or `go.mod` → **Go testing** (built-in)
|
|
52
|
+
- `Cargo.toml` → **Rust testing** (built-in `cargo test`)
|
|
53
|
+
- `pom.xml` or `build.gradle` with JUnit → **JUnit** (Java)
|
|
54
|
+
|
|
55
|
+
Use the detected framework for all test commands and patterns below.
|
|
56
|
+
|
|
46
57
|
## TDD Workflow
|
|
47
58
|
|
|
48
59
|
### Step 1: Write Test First (RED)
|
|
@@ -56,11 +67,51 @@ describe('calculateTotal', () => {
|
|
|
56
67
|
})
|
|
57
68
|
```
|
|
58
69
|
|
|
70
|
+
**Python (Pytest):**
|
|
71
|
+
```python
|
|
72
|
+
def test_calculate_total_returns_sum():
|
|
73
|
+
items = [{"price": 10}, {"price": 20}]
|
|
74
|
+
assert calculate_total(items) == 30
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**Go:**
|
|
78
|
+
```go
|
|
79
|
+
func TestCalculateTotal(t *testing.T) {
|
|
80
|
+
items := []Item{{Price: 10}, {Price: 20}}
|
|
81
|
+
got := CalculateTotal(items)
|
|
82
|
+
if got != 30 {
|
|
83
|
+
t.Errorf("CalculateTotal() = %d, want 30", got)
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**Rust:**
|
|
89
|
+
```rust
|
|
90
|
+
#[test]
|
|
91
|
+
fn test_calculate_total() {
|
|
92
|
+
let items = vec![Item { price: 10 }, Item { price: 20 }];
|
|
93
|
+
assert_eq!(calculate_total(&items), 30);
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
59
97
|
### Step 2: Run Test (Verify it FAILS)
|
|
60
98
|
```bash
|
|
61
|
-
|
|
62
|
-
#
|
|
99
|
+
# JavaScript/TypeScript
|
|
100
|
+
npm test # or: npx vitest run
|
|
101
|
+
|
|
102
|
+
# Python
|
|
103
|
+
pytest # or: python -m pytest
|
|
104
|
+
|
|
105
|
+
# Go
|
|
106
|
+
go test ./...
|
|
107
|
+
|
|
108
|
+
# Rust
|
|
109
|
+
cargo test
|
|
110
|
+
|
|
111
|
+
# Java
|
|
112
|
+
mvn test # or: gradle test
|
|
63
113
|
```
|
|
114
|
+
# Test should fail - we haven't implemented yet
|
|
64
115
|
|
|
65
116
|
### Step 3: Write Minimal Implementation (GREEN)
|
|
66
117
|
```typescript
|
|
@@ -71,9 +122,22 @@ export function calculateTotal(items: { price: number }[]): number {
|
|
|
71
122
|
|
|
72
123
|
### Step 4: Run Test (Verify it PASSES)
|
|
73
124
|
```bash
|
|
74
|
-
|
|
75
|
-
#
|
|
125
|
+
# JavaScript/TypeScript
|
|
126
|
+
npm test # or: npx vitest run
|
|
127
|
+
|
|
128
|
+
# Python
|
|
129
|
+
pytest # or: python -m pytest
|
|
130
|
+
|
|
131
|
+
# Go
|
|
132
|
+
go test ./...
|
|
133
|
+
|
|
134
|
+
# Rust
|
|
135
|
+
cargo test
|
|
136
|
+
|
|
137
|
+
# Java
|
|
138
|
+
mvn test # or: gradle test
|
|
76
139
|
```
|
|
140
|
+
# Test should now pass
|
|
77
141
|
|
|
78
142
|
### Step 5: Refactor (IMPROVE)
|
|
79
143
|
- Remove duplication
|
|
@@ -83,9 +147,22 @@ npm test
|
|
|
83
147
|
|
|
84
148
|
### Step 6: Verify Coverage
|
|
85
149
|
```bash
|
|
86
|
-
|
|
87
|
-
#
|
|
150
|
+
# JavaScript/TypeScript
|
|
151
|
+
npm run test:coverage # or: npx vitest run --coverage
|
|
152
|
+
|
|
153
|
+
# Python
|
|
154
|
+
pytest --cov=. --cov-report=term-missing
|
|
155
|
+
|
|
156
|
+
# Go
|
|
157
|
+
go test -cover ./... # or: go test -coverprofile=coverage.out ./...
|
|
158
|
+
|
|
159
|
+
# Rust
|
|
160
|
+
cargo tarpaulin # or: cargo llvm-cov
|
|
161
|
+
|
|
162
|
+
# Java
|
|
163
|
+
mvn test jacoco:report # or: gradle test jacocoTestReport
|
|
88
164
|
```
|
|
165
|
+
# Verify 80%+ coverage
|
|
89
166
|
|
|
90
167
|
## Test Types You Must Write
|
|
91
168
|
|
|
@@ -107,6 +184,35 @@ describe('formatCurrency', () => {
|
|
|
107
184
|
})
|
|
108
185
|
```
|
|
109
186
|
|
|
187
|
+
**Python (Pytest):**
|
|
188
|
+
```python
|
|
189
|
+
def test_format_currency_positive():
|
|
190
|
+
assert format_currency(1234.56) == "$1,234.56"
|
|
191
|
+
|
|
192
|
+
def test_format_currency_zero():
|
|
193
|
+
assert format_currency(0) == "$0.00"
|
|
194
|
+
|
|
195
|
+
def test_format_currency_null_raises():
|
|
196
|
+
with pytest.raises(TypeError):
|
|
197
|
+
format_currency(None)
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
**Go:**
|
|
201
|
+
```go
|
|
202
|
+
func TestFormatCurrency(t *testing.T) {
|
|
203
|
+
tests := []struct{ input float64; want string }{
|
|
204
|
+
{1234.56, "$1,234.56"},
|
|
205
|
+
{0, "$0.00"},
|
|
206
|
+
}
|
|
207
|
+
for _, tt := range tests {
|
|
208
|
+
got := FormatCurrency(tt.input)
|
|
209
|
+
if got != tt.want {
|
|
210
|
+
t.Errorf("FormatCurrency(%v) = %q, want %q", tt.input, got, tt.want)
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
```
|
|
215
|
+
|
|
110
216
|
### 2. Integration Tests (Mandatory)
|
|
111
217
|
Test API endpoints and database operations:
|
|
112
218
|
```typescript
|
|
@@ -175,17 +281,50 @@ jest.mock('./db', () => ({
|
|
|
175
281
|
}))
|
|
176
282
|
```
|
|
177
283
|
|
|
284
|
+
**Python (Pytest):**
|
|
285
|
+
```python
|
|
286
|
+
from unittest.mock import patch, MagicMock
|
|
287
|
+
|
|
288
|
+
@patch('module.api.fetch_user')
|
|
289
|
+
def test_with_mock(mock_fetch):
|
|
290
|
+
mock_fetch.return_value = {"id": 1, "name": "Test"}
|
|
291
|
+
# test code
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
**Go:**
|
|
295
|
+
```go
|
|
296
|
+
type MockAPI struct {
|
|
297
|
+
FetchUserFunc func() (*User, error)
|
|
298
|
+
}
|
|
299
|
+
func (m *MockAPI) FetchUser() (*User, error) {
|
|
300
|
+
return m.FetchUserFunc()
|
|
301
|
+
}
|
|
302
|
+
```
|
|
303
|
+
|
|
178
304
|
## Coverage Report
|
|
179
305
|
|
|
180
306
|
```bash
|
|
181
|
-
#
|
|
307
|
+
# JavaScript/TypeScript
|
|
182
308
|
npm run test:coverage
|
|
183
309
|
|
|
184
|
-
#
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
#
|
|
188
|
-
|
|
310
|
+
# Python
|
|
311
|
+
pytest --cov=. --cov-report=html
|
|
312
|
+
|
|
313
|
+
# Go
|
|
314
|
+
go test -coverprofile=coverage.out ./...
|
|
315
|
+
go tool cover -html=coverage.out
|
|
316
|
+
|
|
317
|
+
# Rust
|
|
318
|
+
cargo tarpaulin --out Html
|
|
319
|
+
|
|
320
|
+
# Java
|
|
321
|
+
mvn test jacoco:report
|
|
189
322
|
```
|
|
190
323
|
|
|
324
|
+
Required thresholds (all languages):
|
|
325
|
+
- Branches: 80%
|
|
326
|
+
- Functions: 80%
|
|
327
|
+
- Lines: 80%
|
|
328
|
+
- Statements: 80%
|
|
329
|
+
|
|
191
330
|
**Remember**: No code without tests. Tests are not optional. They are the safety net that enables confident refactoring, rapid development, and production reliability.
|
package/commands/hud.md
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analytics-summary.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/analytics/analytics-summary.test.ts"],"names":[],"mappings":""}
|