@su-record/vibe 2.16.4 → 3.1.0
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/CLAUDE.md +8 -8
- package/README.en.md +46 -29
- package/README.md +41 -24
- package/agents/acceptance-tester.md +56 -0
- package/agents/architect.md +25 -67
- package/agents/build-error-resolver.md +28 -97
- package/agents/code-reviewer.md +89 -0
- package/agents/diagrammer.md +34 -169
- package/agents/documenter.md +43 -0
- package/agents/e2e-tester.md +46 -281
- package/agents/event/event-ops.md +54 -77
- package/agents/event/event-planner.md +63 -0
- package/agents/figma/figma-engineer.md +76 -0
- package/agents/implementer.md +26 -41
- package/agents/security-reviewer.md +56 -0
- package/agents/tester.md +37 -33
- package/agents/ui/design-reviewer.md +62 -0
- package/agents/ui/design-system-gen.md +63 -0
- package/dist/cli/commands/remove.d.ts.map +1 -1
- package/dist/cli/commands/remove.js +8 -10
- package/dist/cli/commands/remove.js.map +1 -1
- package/dist/cli/index.d.ts +0 -4
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +0 -4
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/llm/model-refresh.js +1 -1
- package/dist/cli/llm/model-refresh.js.map +1 -1
- package/dist/cli/postinstall/claude-agents.d.ts.map +1 -1
- package/dist/cli/postinstall/claude-agents.js +16 -77
- package/dist/cli/postinstall/claude-agents.js.map +1 -1
- package/dist/cli/postinstall/constants.d.ts.map +1 -1
- package/dist/cli/postinstall/constants.js +80 -296
- package/dist/cli/postinstall/constants.js.map +1 -1
- package/dist/cli/postinstall/cursor-agents.d.ts +5 -0
- package/dist/cli/postinstall/cursor-agents.d.ts.map +1 -1
- package/dist/cli/postinstall/cursor-agents.js +26 -68
- package/dist/cli/postinstall/cursor-agents.js.map +1 -1
- package/dist/cli/postinstall/cursor-skills.d.ts.map +1 -1
- package/dist/cli/postinstall/cursor-skills.js +26 -30
- package/dist/cli/postinstall/cursor-skills.js.map +1 -1
- package/dist/cli/postinstall/main.d.ts.map +1 -1
- package/dist/cli/postinstall/main.js +0 -2
- package/dist/cli/postinstall/main.js.map +1 -1
- package/dist/cli/setup/Provisioner.d.ts.map +1 -1
- package/dist/cli/setup/Provisioner.js +19 -21
- package/dist/cli/setup/Provisioner.js.map +1 -1
- package/dist/cli/utils.d.ts +4 -1
- package/dist/cli/utils.d.ts.map +1 -1
- package/dist/cli/utils.js +4 -1
- package/dist/cli/utils.js.map +1 -1
- package/dist/infra/lib/FrameworkDetector.js +4 -4
- package/dist/infra/lib/FrameworkDetector.js.map +1 -1
- package/dist/infra/lib/OrchestrateWorkflow.js +2 -2
- package/dist/infra/lib/OrchestrateWorkflow.js.map +1 -1
- package/dist/infra/lib/browser/launch.js +1 -1
- package/dist/infra/lib/browser/launch.js.map +1 -1
- package/dist/infra/lib/browser/types.d.ts +1 -1
- package/dist/infra/lib/browser/types.js +1 -1
- package/dist/infra/lib/constants.d.ts +1 -1
- package/dist/infra/lib/constants.d.ts.map +1 -1
- package/dist/infra/lib/constants.js +4 -5
- package/dist/infra/lib/constants.js.map +1 -1
- package/dist/infra/lib/evolution/__tests__/integration.test.js +7 -7
- package/dist/infra/lib/evolution/__tests__/integration.test.js.map +1 -1
- package/dist/infra/lib/memory/index.d.ts +0 -2
- package/dist/infra/lib/memory/index.d.ts.map +1 -1
- package/dist/infra/lib/memory/index.js +0 -2
- package/dist/infra/lib/memory/index.js.map +1 -1
- package/dist/infra/lib/telemetry/SkillTelemetry.test.js +1 -1
- package/dist/infra/lib/telemetry/SkillTelemetry.test.js.map +1 -1
- package/dist/tools/index.d.ts +0 -4
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +0 -4
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/memory/autoSaveContext.d.ts +0 -1
- package/dist/tools/memory/autoSaveContext.d.ts.map +1 -1
- package/dist/tools/memory/autoSaveContext.js +13 -27
- package/dist/tools/memory/autoSaveContext.js.map +1 -1
- package/hooks/scripts/__tests__/.vibe/command-log.txt +3 -78
- package/hooks/scripts/__tests__/.vibe/memories/memories.db +0 -0
- package/hooks/scripts/__tests__/.vibe/memories/memories.db-shm +0 -0
- package/hooks/scripts/__tests__/.vibe/memories/memories.db-wal +0 -0
- package/hooks/scripts/__tests__/clone-behaviors.test.js +64 -0
- package/hooks/scripts/__tests__/clone-merge-responsive.test.js +106 -0
- package/hooks/scripts/__tests__/code-check-detectors.test.js +2 -2
- package/hooks/scripts/__tests__/run-ledger.test.js +1 -1
- package/hooks/scripts/__tests__/scope-from-spec.test.js +12 -12
- package/hooks/scripts/__tests__/step-counter.test.js +1 -1
- package/hooks/scripts/clone-extract.js +242 -28
- package/hooks/scripts/clone-merge-responsive.js +184 -0
- package/hooks/scripts/clone-spec.js +33 -8
- package/hooks/scripts/clone-validate.js +15 -9
- package/hooks/scripts/code-check.js +16 -203
- package/hooks/scripts/context-save.js +0 -11
- package/hooks/scripts/lib/scope-from-spec.js +9 -6
- package/hooks/scripts/post-edit-dispatcher.js +1 -1
- package/hooks/scripts/prompt-dispatcher.js +7 -18
- package/hooks/scripts/session-start.js +25 -35
- package/package.json +6 -5
- package/skills/agents-md/SKILL.md +62 -15
- package/skills/arch-guard/SKILL.md +1 -1
- package/skills/brand-assets/SKILL.md +2 -2
- package/skills/capability-loop/SKILL.md +1 -1
- package/skills/chub-usage/SKILL.md +1 -1
- package/skills/clone/SKILL.md +132 -55
- package/skills/commerce-patterns/SKILL.md +2 -2
- package/skills/commit-push-pr/SKILL.md +0 -1
- package/skills/context7-usage/SKILL.md +1 -1
- package/skills/design-refine/SKILL.md +140 -0
- package/skills/{design-polish → design-refine}/templates/polish-report.md +1 -1
- package/skills/{design-normalize → design-refine}/templates/token-audit.md +3 -3
- package/skills/design-review/SKILL.md +143 -0
- package/skills/{design-audit → design-review}/agents/a11y-auditor.md +1 -1
- package/skills/{design-audit → design-review}/agents/performance-auditor.md +1 -1
- package/skills/{design-audit → design-review}/agents/responsive-auditor.md +1 -1
- package/skills/{design-audit → design-review}/agents/slop-detector.md +1 -1
- package/skills/{design-audit → design-review}/frameworks/core-web-vitals.md +1 -1
- package/skills/{design-audit → design-review}/frameworks/wcag-checklist.md +1 -1
- package/skills/{design-audit → design-review}/orchestrator.md +3 -3
- package/skills/{design-critique → design-review}/templates/critique-report.md +3 -3
- package/skills/{design-audit → design-review}/templates/report.md +3 -3
- package/skills/design-teach/SKILL.md +11 -11
- package/skills/docs/SKILL.md +14 -16
- package/skills/e2e-commerce/SKILL.md +1 -1
- package/skills/event-comms/SKILL.md +1 -1
- package/skills/event-ops/SKILL.md +2 -2
- package/skills/event-planning/SKILL.md +1 -1
- package/skills/exec-plan/SKILL.md +2 -2
- package/skills/figma/SKILL.md +240 -148
- package/skills/figma/rubrics/css-mapping.md +125 -0
- package/skills/git-worktree/SKILL.md +1 -1
- package/skills/handoff/SKILL.md +1 -1
- package/skills/parallel-research/SKILL.md +14 -28
- package/skills/priority-todos/SKILL.md +1 -1
- package/skills/regress/SKILL.md +11 -0
- package/skills/restraint/SKILL.md +72 -0
- package/skills/seo-checklist/SKILL.md +2 -2
- package/skills/spec/SKILL.md +65 -836
- package/skills/test/SKILL.md +3 -3
- package/skills/tool-fallback/SKILL.md +2 -2
- package/skills/vercel-react-best-practices/SKILL.md +1 -1
- package/skills/vibe/SKILL.md +20 -35
- package/skills/vibe.analyze/SKILL.md +7 -9
- package/skills/vibe.clone/SKILL.md +39 -19
- package/skills/vibe.docs/SKILL.md +1 -1
- package/skills/vibe.event/SKILL.md +27 -27
- package/skills/vibe.figma/SKILL.md +14 -18
- package/skills/vibe.harness/SKILL.md +5 -5
- package/skills/vibe.reason/SKILL.md +0 -2
- package/skills/vibe.review/SKILL.md +45 -49
- package/skills/vibe.run/SKILL.md +2 -5
- package/skills/vibe.run/references/parallel-agents.md +33 -98
- package/skills/vibe.spec/SKILL.md +38 -535
- package/skills/vibe.utils/SKILL.md +3 -3
- package/skills/vibe.verify/SKILL.md +70 -542
- package/skills/video-production/SKILL.md +1 -1
- package/vibe/rules/orchestrator-contract.md +5 -4
- package/vibe/rules/quality/performance.md +1 -1
- package/vibe/templates/claudemd-template.md +1 -1
- package/vibe/templates/spec-template.md +35 -185
- package/agents/architect-low.md +0 -41
- package/agents/architect-medium.md +0 -59
- package/agents/compounder.md +0 -265
- package/agents/docs/api-documenter.md +0 -99
- package/agents/docs/changelog-writer.md +0 -93
- package/agents/event/event-comms.md +0 -78
- package/agents/event/event-content.md +0 -68
- package/agents/event/event-image.md +0 -95
- package/agents/event/event-scheduler.md +0 -69
- package/agents/event/event-speaker.md +0 -86
- package/agents/explorer-low.md +0 -42
- package/agents/explorer-medium.md +0 -59
- package/agents/explorer.md +0 -48
- package/agents/figma/figma-analyst.md +0 -56
- package/agents/figma/figma-architect.md +0 -116
- package/agents/figma/figma-auditor.md +0 -86
- package/agents/figma/figma-builder.md +0 -104
- package/agents/implementer-low.md +0 -43
- package/agents/implementer-medium.md +0 -52
- package/agents/junior-mentor.md +0 -141
- package/agents/planning/requirements-analyst.md +0 -84
- package/agents/planning/ux-advisor.md +0 -83
- package/agents/qa/acceptance-tester.md +0 -86
- package/agents/qa/edge-case-finder.md +0 -93
- package/agents/qa/qa-coordinator.md +0 -131
- package/agents/refactor-cleaner.md +0 -143
- package/agents/research/best-practices.md +0 -199
- package/agents/research/codebase-patterns.md +0 -157
- package/agents/research/framework-docs.md +0 -188
- package/agents/research/security-advisory.md +0 -213
- package/agents/review/architecture-reviewer.md +0 -107
- package/agents/review/complexity-reviewer.md +0 -116
- package/agents/review/data-integrity-reviewer.md +0 -88
- package/agents/review/git-history-reviewer.md +0 -103
- package/agents/review/performance-reviewer.md +0 -86
- package/agents/review/python-reviewer.md +0 -150
- package/agents/review/rails-reviewer.md +0 -139
- package/agents/review/react-reviewer.md +0 -144
- package/agents/review/security-reviewer.md +0 -80
- package/agents/review/simplicity-reviewer.md +0 -140
- package/agents/review/test-coverage-reviewer.md +0 -116
- package/agents/review/typescript-reviewer.md +0 -127
- package/agents/searcher.md +0 -54
- package/agents/simplifier.md +0 -124
- package/agents/teams/debug-team.md +0 -74
- package/agents/teams/dev-team.md +0 -92
- package/agents/teams/docs-team.md +0 -84
- package/agents/teams/figma-team.md +0 -89
- package/agents/teams/fullstack-team.md +0 -87
- package/agents/teams/lite-team.md +0 -73
- package/agents/teams/migration-team.md +0 -82
- package/agents/teams/refactor-team.md +0 -98
- package/agents/teams/research-team.md +0 -90
- package/agents/teams/review-debate-team.md +0 -129
- package/agents/teams/security-team.md +0 -85
- package/agents/ui/ui-a11y-auditor.md +0 -93
- package/agents/ui/ui-antipattern-detector.md +0 -102
- package/agents/ui/ui-dataviz-advisor.md +0 -69
- package/agents/ui/ui-design-system-gen.md +0 -57
- package/agents/ui/ui-industry-analyzer.md +0 -49
- package/agents/ui/ui-layout-architect.md +0 -65
- package/agents/ui/ui-stack-implementer.md +0 -68
- package/agents/ui/ux-compliance-reviewer.md +0 -81
- package/agents/ui-previewer.md +0 -262
- package/dist/cli/llm/gemini-commands.d.ts +0 -25
- package/dist/cli/llm/gemini-commands.d.ts.map +0 -1
- package/dist/cli/llm/gemini-commands.js +0 -143
- package/dist/cli/llm/gemini-commands.js.map +0 -1
- package/dist/cli/postinstall/codex-agents.d.ts +0 -24
- package/dist/cli/postinstall/codex-agents.d.ts.map +0 -1
- package/dist/cli/postinstall/codex-agents.js +0 -114
- package/dist/cli/postinstall/codex-agents.js.map +0 -1
- package/dist/cli/postinstall/codex-instruction.d.ts +0 -10
- package/dist/cli/postinstall/codex-instruction.d.ts.map +0 -1
- package/dist/cli/postinstall/codex-instruction.js +0 -56
- package/dist/cli/postinstall/codex-instruction.js.map +0 -1
- package/dist/cli/postinstall/gemini-agents.d.ts +0 -12
- package/dist/cli/postinstall/gemini-agents.d.ts.map +0 -1
- package/dist/cli/postinstall/gemini-agents.js +0 -80
- package/dist/cli/postinstall/gemini-agents.js.map +0 -1
- package/dist/cli/postinstall/gemini-instruction.d.ts +0 -10
- package/dist/cli/postinstall/gemini-instruction.d.ts.map +0 -1
- package/dist/cli/postinstall/gemini-instruction.js +0 -59
- package/dist/cli/postinstall/gemini-instruction.js.map +0 -1
- package/dist/infra/lib/ContextCompressor.d.ts +0 -104
- package/dist/infra/lib/ContextCompressor.d.ts.map +0 -1
- package/dist/infra/lib/ContextCompressor.js +0 -297
- package/dist/infra/lib/ContextCompressor.js.map +0 -1
- package/dist/infra/lib/ContextCompressor.test.d.ts +0 -2
- package/dist/infra/lib/ContextCompressor.test.d.ts.map +0 -1
- package/dist/infra/lib/ContextCompressor.test.js +0 -25
- package/dist/infra/lib/ContextCompressor.test.js.map +0 -1
- package/dist/infra/lib/ProgressTracker.d.ts +0 -73
- package/dist/infra/lib/ProgressTracker.d.ts.map +0 -1
- package/dist/infra/lib/ProgressTracker.js +0 -267
- package/dist/infra/lib/ProgressTracker.js.map +0 -1
- package/dist/infra/lib/TokenBudgetTracker.d.ts +0 -68
- package/dist/infra/lib/TokenBudgetTracker.d.ts.map +0 -1
- package/dist/infra/lib/TokenBudgetTracker.js +0 -191
- package/dist/infra/lib/TokenBudgetTracker.js.map +0 -1
- package/dist/infra/lib/autonomy/AuditStore.d.ts +0 -63
- package/dist/infra/lib/autonomy/AuditStore.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/AuditStore.js +0 -185
- package/dist/infra/lib/autonomy/AuditStore.js.map +0 -1
- package/dist/infra/lib/autonomy/AutonomyConfig.d.ts +0 -84
- package/dist/infra/lib/autonomy/AutonomyConfig.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/AutonomyConfig.js +0 -49
- package/dist/infra/lib/autonomy/AutonomyConfig.js.map +0 -1
- package/dist/infra/lib/autonomy/AutonomyOrchestrator.d.ts +0 -78
- package/dist/infra/lib/autonomy/AutonomyOrchestrator.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/AutonomyOrchestrator.js +0 -246
- package/dist/infra/lib/autonomy/AutonomyOrchestrator.js.map +0 -1
- package/dist/infra/lib/autonomy/BackgroundMonitor.d.ts +0 -36
- package/dist/infra/lib/autonomy/BackgroundMonitor.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/BackgroundMonitor.js +0 -138
- package/dist/infra/lib/autonomy/BackgroundMonitor.js.map +0 -1
- package/dist/infra/lib/autonomy/CollaborationProtocol.d.ts +0 -56
- package/dist/infra/lib/autonomy/CollaborationProtocol.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/CollaborationProtocol.js +0 -122
- package/dist/infra/lib/autonomy/CollaborationProtocol.js.map +0 -1
- package/dist/infra/lib/autonomy/ConfirmationManager.d.ts +0 -42
- package/dist/infra/lib/autonomy/ConfirmationManager.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/ConfirmationManager.js +0 -200
- package/dist/infra/lib/autonomy/ConfirmationManager.js.map +0 -1
- package/dist/infra/lib/autonomy/ConfirmationStore.d.ts +0 -55
- package/dist/infra/lib/autonomy/ConfirmationStore.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/ConfirmationStore.js +0 -130
- package/dist/infra/lib/autonomy/ConfirmationStore.js.map +0 -1
- package/dist/infra/lib/autonomy/EventBus.d.ts +0 -20
- package/dist/infra/lib/autonomy/EventBus.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/EventBus.js +0 -119
- package/dist/infra/lib/autonomy/EventBus.js.map +0 -1
- package/dist/infra/lib/autonomy/EventOutbox.d.ts +0 -32
- package/dist/infra/lib/autonomy/EventOutbox.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/EventOutbox.js +0 -152
- package/dist/infra/lib/autonomy/EventOutbox.js.map +0 -1
- package/dist/infra/lib/autonomy/NotificationDispatcher.d.ts +0 -24
- package/dist/infra/lib/autonomy/NotificationDispatcher.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/NotificationDispatcher.js +0 -112
- package/dist/infra/lib/autonomy/NotificationDispatcher.js.map +0 -1
- package/dist/infra/lib/autonomy/PolicyEngine.d.ts +0 -76
- package/dist/infra/lib/autonomy/PolicyEngine.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/PolicyEngine.js +0 -208
- package/dist/infra/lib/autonomy/PolicyEngine.js.map +0 -1
- package/dist/infra/lib/autonomy/ProactiveAnalyzer.d.ts +0 -61
- package/dist/infra/lib/autonomy/ProactiveAnalyzer.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/ProactiveAnalyzer.js +0 -236
- package/dist/infra/lib/autonomy/ProactiveAnalyzer.js.map +0 -1
- package/dist/infra/lib/autonomy/RiskClassifier.d.ts +0 -35
- package/dist/infra/lib/autonomy/RiskClassifier.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/RiskClassifier.js +0 -147
- package/dist/infra/lib/autonomy/RiskClassifier.js.map +0 -1
- package/dist/infra/lib/autonomy/SecuritySentinel.d.ts +0 -51
- package/dist/infra/lib/autonomy/SecuritySentinel.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/SecuritySentinel.js +0 -162
- package/dist/infra/lib/autonomy/SecuritySentinel.js.map +0 -1
- package/dist/infra/lib/autonomy/SuggestionStore.d.ts +0 -54
- package/dist/infra/lib/autonomy/SuggestionStore.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/SuggestionStore.js +0 -144
- package/dist/infra/lib/autonomy/SuggestionStore.js.map +0 -1
- package/dist/infra/lib/autonomy/TaskDecomposer.d.ts +0 -38
- package/dist/infra/lib/autonomy/TaskDecomposer.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/TaskDecomposer.js +0 -175
- package/dist/infra/lib/autonomy/TaskDecomposer.js.map +0 -1
- package/dist/infra/lib/autonomy/__tests__/audit-store.test.d.ts +0 -2
- package/dist/infra/lib/autonomy/__tests__/audit-store.test.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/__tests__/audit-store.test.js +0 -198
- package/dist/infra/lib/autonomy/__tests__/audit-store.test.js.map +0 -1
- package/dist/infra/lib/autonomy/__tests__/event-bus.test.d.ts +0 -2
- package/dist/infra/lib/autonomy/__tests__/event-bus.test.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/__tests__/event-bus.test.js +0 -225
- package/dist/infra/lib/autonomy/__tests__/event-bus.test.js.map +0 -1
- package/dist/infra/lib/autonomy/__tests__/event-core.test.d.ts +0 -2
- package/dist/infra/lib/autonomy/__tests__/event-core.test.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/__tests__/event-core.test.js +0 -194
- package/dist/infra/lib/autonomy/__tests__/event-core.test.js.map +0 -1
- package/dist/infra/lib/autonomy/__tests__/governance.test.d.ts +0 -2
- package/dist/infra/lib/autonomy/__tests__/governance.test.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/__tests__/governance.test.js +0 -540
- package/dist/infra/lib/autonomy/__tests__/governance.test.js.map +0 -1
- package/dist/infra/lib/autonomy/__tests__/integration.test.d.ts +0 -2
- package/dist/infra/lib/autonomy/__tests__/integration.test.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/__tests__/integration.test.js +0 -480
- package/dist/infra/lib/autonomy/__tests__/integration.test.js.map +0 -1
- package/dist/infra/lib/autonomy/__tests__/proactive.test.d.ts +0 -2
- package/dist/infra/lib/autonomy/__tests__/proactive.test.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/__tests__/proactive.test.js +0 -410
- package/dist/infra/lib/autonomy/__tests__/proactive.test.js.map +0 -1
- package/dist/infra/lib/autonomy/__tests__/sentinel.test.d.ts +0 -2
- package/dist/infra/lib/autonomy/__tests__/sentinel.test.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/__tests__/sentinel.test.js +0 -486
- package/dist/infra/lib/autonomy/__tests__/sentinel.test.js.map +0 -1
- package/dist/infra/lib/autonomy/index.d.ts +0 -18
- package/dist/infra/lib/autonomy/index.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/index.js +0 -22
- package/dist/infra/lib/autonomy/index.js.map +0 -1
- package/dist/infra/lib/autonomy/schemas.d.ts +0 -317
- package/dist/infra/lib/autonomy/schemas.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/schemas.js +0 -90
- package/dist/infra/lib/autonomy/schemas.js.map +0 -1
- package/dist/infra/lib/claude/index.d.ts +0 -5
- package/dist/infra/lib/claude/index.d.ts.map +0 -1
- package/dist/infra/lib/claude/index.js +0 -5
- package/dist/infra/lib/claude/index.js.map +0 -1
- package/dist/infra/lib/claude/storage.d.ts +0 -12
- package/dist/infra/lib/claude/storage.d.ts.map +0 -1
- package/dist/infra/lib/claude/storage.js +0 -54
- package/dist/infra/lib/claude/storage.js.map +0 -1
- package/dist/infra/lib/gemini/auth.d.ts +0 -18
- package/dist/infra/lib/gemini/auth.d.ts.map +0 -1
- package/dist/infra/lib/gemini/auth.js +0 -32
- package/dist/infra/lib/gemini/auth.js.map +0 -1
- package/dist/infra/lib/gemini/capabilities.d.ts +0 -28
- package/dist/infra/lib/gemini/capabilities.d.ts.map +0 -1
- package/dist/infra/lib/gemini/capabilities.js +0 -178
- package/dist/infra/lib/gemini/capabilities.js.map +0 -1
- package/dist/infra/lib/gemini/chat.d.ts +0 -35
- package/dist/infra/lib/gemini/chat.d.ts.map +0 -1
- package/dist/infra/lib/gemini/chat.js +0 -161
- package/dist/infra/lib/gemini/chat.js.map +0 -1
- package/dist/infra/lib/gemini/completion.d.ts +0 -12
- package/dist/infra/lib/gemini/completion.d.ts.map +0 -1
- package/dist/infra/lib/gemini/completion.js +0 -13
- package/dist/infra/lib/gemini/completion.js.map +0 -1
- package/dist/infra/lib/gemini/constants.d.ts +0 -8
- package/dist/infra/lib/gemini/constants.d.ts.map +0 -1
- package/dist/infra/lib/gemini/constants.js +0 -11
- package/dist/infra/lib/gemini/constants.js.map +0 -1
- package/dist/infra/lib/gemini/index.d.ts +0 -13
- package/dist/infra/lib/gemini/index.d.ts.map +0 -1
- package/dist/infra/lib/gemini/index.js +0 -12
- package/dist/infra/lib/gemini/index.js.map +0 -1
- package/dist/infra/lib/gemini/models.d.ts +0 -11
- package/dist/infra/lib/gemini/models.d.ts.map +0 -1
- package/dist/infra/lib/gemini/models.js +0 -38
- package/dist/infra/lib/gemini/models.js.map +0 -1
- package/dist/infra/lib/gemini/orchestration.d.ts +0 -33
- package/dist/infra/lib/gemini/orchestration.d.ts.map +0 -1
- package/dist/infra/lib/gemini/orchestration.js +0 -62
- package/dist/infra/lib/gemini/orchestration.js.map +0 -1
- package/dist/infra/lib/gemini/types.d.ts +0 -115
- package/dist/infra/lib/gemini/types.d.ts.map +0 -1
- package/dist/infra/lib/gemini/types.js +0 -5
- package/dist/infra/lib/gemini/types.js.map +0 -1
- package/dist/infra/orchestrator/AgentAnnouncer.d.ts +0 -64
- package/dist/infra/orchestrator/AgentAnnouncer.d.ts.map +0 -1
- package/dist/infra/orchestrator/AgentAnnouncer.js +0 -127
- package/dist/infra/orchestrator/AgentAnnouncer.js.map +0 -1
- package/dist/infra/orchestrator/AgentAnnouncer.test.d.ts +0 -5
- package/dist/infra/orchestrator/AgentAnnouncer.test.d.ts.map +0 -1
- package/dist/infra/orchestrator/AgentAnnouncer.test.js +0 -119
- package/dist/infra/orchestrator/AgentAnnouncer.test.js.map +0 -1
- package/dist/infra/orchestrator/AgentExecutor.d.ts +0 -22
- package/dist/infra/orchestrator/AgentExecutor.d.ts.map +0 -1
- package/dist/infra/orchestrator/AgentExecutor.js +0 -272
- package/dist/infra/orchestrator/AgentExecutor.js.map +0 -1
- package/dist/infra/orchestrator/AgentManager.d.ts +0 -72
- package/dist/infra/orchestrator/AgentManager.d.ts.map +0 -1
- package/dist/infra/orchestrator/AgentManager.js +0 -183
- package/dist/infra/orchestrator/AgentManager.js.map +0 -1
- package/dist/infra/orchestrator/AgentManifestCache.d.ts +0 -54
- package/dist/infra/orchestrator/AgentManifestCache.d.ts.map +0 -1
- package/dist/infra/orchestrator/AgentManifestCache.js +0 -191
- package/dist/infra/orchestrator/AgentManifestCache.js.map +0 -1
- package/dist/infra/orchestrator/AgentRegistry.d.ts +0 -76
- package/dist/infra/orchestrator/AgentRegistry.d.ts.map +0 -1
- package/dist/infra/orchestrator/AgentRegistry.js +0 -217
- package/dist/infra/orchestrator/AgentRegistry.js.map +0 -1
- package/dist/infra/orchestrator/AgentRegistry.test.d.ts +0 -5
- package/dist/infra/orchestrator/AgentRegistry.test.d.ts.map +0 -1
- package/dist/infra/orchestrator/AgentRegistry.test.js +0 -122
- package/dist/infra/orchestrator/AgentRegistry.test.js.map +0 -1
- package/dist/infra/orchestrator/BackgroundManager.d.ts +0 -128
- package/dist/infra/orchestrator/BackgroundManager.d.ts.map +0 -1
- package/dist/infra/orchestrator/BackgroundManager.js +0 -620
- package/dist/infra/orchestrator/BackgroundManager.js.map +0 -1
- package/dist/infra/orchestrator/BackgroundManager.test.d.ts +0 -6
- package/dist/infra/orchestrator/BackgroundManager.test.d.ts.map +0 -1
- package/dist/infra/orchestrator/BackgroundManager.test.js +0 -162
- package/dist/infra/orchestrator/BackgroundManager.test.js.map +0 -1
- package/dist/infra/orchestrator/CheckpointManager.d.ts +0 -54
- package/dist/infra/orchestrator/CheckpointManager.d.ts.map +0 -1
- package/dist/infra/orchestrator/CheckpointManager.js +0 -121
- package/dist/infra/orchestrator/CheckpointManager.js.map +0 -1
- package/dist/infra/orchestrator/CodexAgentRuntime.d.ts +0 -12
- package/dist/infra/orchestrator/CodexAgentRuntime.d.ts.map +0 -1
- package/dist/infra/orchestrator/CodexAgentRuntime.js +0 -94
- package/dist/infra/orchestrator/CodexAgentRuntime.js.map +0 -1
- package/dist/infra/orchestrator/CodexAgentRuntime.test.d.ts +0 -2
- package/dist/infra/orchestrator/CodexAgentRuntime.test.d.ts.map +0 -1
- package/dist/infra/orchestrator/CodexAgentRuntime.test.js +0 -37
- package/dist/infra/orchestrator/CodexAgentRuntime.test.js.map +0 -1
- package/dist/infra/orchestrator/LLMCluster.d.ts +0 -82
- package/dist/infra/orchestrator/LLMCluster.d.ts.map +0 -1
- package/dist/infra/orchestrator/LLMCluster.js +0 -146
- package/dist/infra/orchestrator/LLMCluster.js.map +0 -1
- package/dist/infra/orchestrator/MultiLlmResearch.d.ts +0 -31
- package/dist/infra/orchestrator/MultiLlmResearch.d.ts.map +0 -1
- package/dist/infra/orchestrator/MultiLlmResearch.js +0 -160
- package/dist/infra/orchestrator/MultiLlmResearch.js.map +0 -1
- package/dist/infra/orchestrator/PhasePipeline.d.ts +0 -122
- package/dist/infra/orchestrator/PhasePipeline.d.ts.map +0 -1
- package/dist/infra/orchestrator/PhasePipeline.js +0 -385
- package/dist/infra/orchestrator/PhasePipeline.js.map +0 -1
- package/dist/infra/orchestrator/PhaseResultStore.d.ts +0 -39
- package/dist/infra/orchestrator/PhaseResultStore.d.ts.map +0 -1
- package/dist/infra/orchestrator/PhaseResultStore.js +0 -151
- package/dist/infra/orchestrator/PhaseResultStore.js.map +0 -1
- package/dist/infra/orchestrator/SessionStore.d.ts +0 -40
- package/dist/infra/orchestrator/SessionStore.d.ts.map +0 -1
- package/dist/infra/orchestrator/SessionStore.js +0 -116
- package/dist/infra/orchestrator/SessionStore.js.map +0 -1
- package/dist/infra/orchestrator/SmartRouter.d.ts +0 -90
- package/dist/infra/orchestrator/SmartRouter.d.ts.map +0 -1
- package/dist/infra/orchestrator/SmartRouter.js +0 -277
- package/dist/infra/orchestrator/SmartRouter.js.map +0 -1
- package/dist/infra/orchestrator/SmartRouter.test.d.ts +0 -5
- package/dist/infra/orchestrator/SmartRouter.test.d.ts.map +0 -1
- package/dist/infra/orchestrator/SmartRouter.test.js +0 -484
- package/dist/infra/orchestrator/SmartRouter.test.js.map +0 -1
- package/dist/infra/orchestrator/SwarmOrchestrator.d.ts +0 -143
- package/dist/infra/orchestrator/SwarmOrchestrator.d.ts.map +0 -1
- package/dist/infra/orchestrator/SwarmOrchestrator.js +0 -378
- package/dist/infra/orchestrator/SwarmOrchestrator.js.map +0 -1
- package/dist/infra/orchestrator/SwarmOrchestrator.test.d.ts +0 -5
- package/dist/infra/orchestrator/SwarmOrchestrator.test.d.ts.map +0 -1
- package/dist/infra/orchestrator/SwarmOrchestrator.test.js +0 -95
- package/dist/infra/orchestrator/SwarmOrchestrator.test.js.map +0 -1
- package/dist/infra/orchestrator/agentDiscovery.d.ts +0 -26
- package/dist/infra/orchestrator/agentDiscovery.d.ts.map +0 -1
- package/dist/infra/orchestrator/agentDiscovery.js +0 -175
- package/dist/infra/orchestrator/agentDiscovery.js.map +0 -1
- package/dist/infra/orchestrator/backgroundAgent.d.ts +0 -9
- package/dist/infra/orchestrator/backgroundAgent.d.ts.map +0 -1
- package/dist/infra/orchestrator/backgroundAgent.js +0 -10
- package/dist/infra/orchestrator/backgroundAgent.js.map +0 -1
- package/dist/infra/orchestrator/index.d.ts +0 -207
- package/dist/infra/orchestrator/index.d.ts.map +0 -1
- package/dist/infra/orchestrator/index.js +0 -362
- package/dist/infra/orchestrator/index.js.map +0 -1
- package/dist/infra/orchestrator/orchestrator.d.ts +0 -60
- package/dist/infra/orchestrator/orchestrator.d.ts.map +0 -1
- package/dist/infra/orchestrator/orchestrator.js +0 -214
- package/dist/infra/orchestrator/orchestrator.js.map +0 -1
- package/dist/infra/orchestrator/parallelResearch.d.ts +0 -27
- package/dist/infra/orchestrator/parallelResearch.d.ts.map +0 -1
- package/dist/infra/orchestrator/parallelResearch.js +0 -285
- package/dist/infra/orchestrator/parallelResearch.js.map +0 -1
- package/dist/infra/orchestrator/types.d.ts +0 -205
- package/dist/infra/orchestrator/types.d.ts.map +0 -1
- package/dist/infra/orchestrator/types.js +0 -87
- package/dist/infra/orchestrator/types.js.map +0 -1
- package/dist/infra/orchestrator/types.test.d.ts +0 -2
- package/dist/infra/orchestrator/types.test.d.ts.map +0 -1
- package/dist/infra/orchestrator/types.test.js +0 -57
- package/dist/infra/orchestrator/types.test.js.map +0 -1
- package/dist/tools/semantic/analyzeDependencyGraph.d.ts +0 -12
- package/dist/tools/semantic/analyzeDependencyGraph.d.ts.map +0 -1
- package/dist/tools/semantic/analyzeDependencyGraph.js +0 -359
- package/dist/tools/semantic/analyzeDependencyGraph.js.map +0 -1
- package/dist/tools/semantic/astGrep.d.ts +0 -25
- package/dist/tools/semantic/astGrep.d.ts.map +0 -1
- package/dist/tools/semantic/astGrep.js +0 -324
- package/dist/tools/semantic/astGrep.js.map +0 -1
- package/dist/tools/semantic/astGrep.test.d.ts +0 -2
- package/dist/tools/semantic/astGrep.test.d.ts.map +0 -1
- package/dist/tools/semantic/astGrep.test.js +0 -74
- package/dist/tools/semantic/astGrep.test.js.map +0 -1
- package/dist/tools/semantic/findReferences.d.ts +0 -9
- package/dist/tools/semantic/findReferences.d.ts.map +0 -1
- package/dist/tools/semantic/findReferences.js +0 -200
- package/dist/tools/semantic/findReferences.js.map +0 -1
- package/dist/tools/semantic/findSymbol.d.ts +0 -8
- package/dist/tools/semantic/findSymbol.d.ts.map +0 -1
- package/dist/tools/semantic/findSymbol.js +0 -204
- package/dist/tools/semantic/findSymbol.js.map +0 -1
- package/dist/tools/semantic/index.d.ts +0 -9
- package/dist/tools/semantic/index.d.ts.map +0 -1
- package/dist/tools/semantic/index.js +0 -11
- package/dist/tools/semantic/index.js.map +0 -1
- package/dist/tools/semantic/lsp.d.ts +0 -68
- package/dist/tools/semantic/lsp.d.ts.map +0 -1
- package/dist/tools/semantic/lsp.js +0 -561
- package/dist/tools/semantic/lsp.js.map +0 -1
- package/dist/tools/spec/e2eTestGenerator.d.ts +0 -61
- package/dist/tools/spec/e2eTestGenerator.d.ts.map +0 -1
- package/dist/tools/spec/e2eTestGenerator.js +0 -255
- package/dist/tools/spec/e2eTestGenerator.js.map +0 -1
- package/dist/tools/spec/specVersioning.d.ts +0 -76
- package/dist/tools/spec/specVersioning.d.ts.map +0 -1
- package/dist/tools/spec/specVersioning.js +0 -236
- package/dist/tools/spec/specVersioning.js.map +0 -1
- package/hooks/scripts/__tests__/keyword-detector.test.js +0 -242
- package/hooks/scripts/keyword-detector.js +0 -226
- package/skills/characterization-test/SKILL.md +0 -209
- package/skills/characterization-test/agents/behavior-capturer.md +0 -50
- package/skills/characterization-test/agents/coverage-checker.md +0 -54
- package/skills/characterization-test/agents/reporter.md +0 -50
- package/skills/characterization-test/agents/test-writer.md +0 -49
- package/skills/characterization-test/rubrics/coverage-criteria.md +0 -53
- package/skills/characterization-test/templates/test-template.ts +0 -101
- package/skills/claude-md-guide/SKILL.md +0 -353
- package/skills/claude-md-guide/rubrics/anti-patterns.md +0 -88
- package/skills/design-audit/SKILL.md +0 -154
- package/skills/design-critique/SKILL.md +0 -140
- package/skills/design-distill/SKILL.md +0 -131
- package/skills/design-normalize/SKILL.md +0 -135
- package/skills/design-polish/SKILL.md +0 -132
- package/skills/figma-convert/SKILL.md +0 -236
- package/skills/figma-extract/SKILL.md +0 -242
- package/skills/interview/SKILL.md +0 -358
- package/skills/interview/checklists/api.md +0 -101
- package/skills/interview/checklists/feature.md +0 -88
- package/skills/interview/checklists/library.md +0 -95
- package/skills/interview/checklists/mobile.md +0 -89
- package/skills/interview/checklists/webapp.md +0 -97
- package/skills/interview/checklists/website.md +0 -99
- package/skills/plan/SKILL.md +0 -254
- package/skills/rob-pike/SKILL.md +0 -66
- package/skills/spec/references/askuser-examples.md +0 -57
- package/skills/spec/references/example-session.md +0 -87
- package/skills/spec/references/templates.md +0 -194
- package/skills/spec-review/SKILL.md +0 -725
- package/skills/systematic-debugging/SKILL.md +0 -142
- package/skills/techdebt/SKILL.md +0 -126
- package/skills/techdebt/agents/analyzer.md +0 -50
- package/skills/techdebt/agents/fixer.md +0 -41
- package/skills/techdebt/agents/reviewer.md +0 -47
- package/skills/techdebt/agents/scanner.md +0 -44
- package/skills/techdebt/orchestrator.md +0 -72
- package/skills/techdebt/rubrics/severity.md +0 -51
- package/skills/techdebt/scripts/scan.js +0 -90
- package/skills/techdebt/templates/report.md +0 -86
- package/skills/typescript-advanced-types/SKILL.md +0 -68
- package/skills/typescript-advanced-types/rubrics/type-patterns.md +0 -109
- package/skills/yagni-ladder/SKILL.md +0 -90
- /package/skills/{claude-md-guide → agents-md}/templates/claude-md.md +0 -0
- /package/skills/{design-polish → design-refine}/rubrics/polish-checklist.md +0 -0
- /package/skills/{design-normalize → design-refine}/rubrics/token-naming.md +0 -0
- /package/skills/{design-distill → design-refine}/templates/design-system.md +0 -0
- /package/skills/{design-audit → design-review}/agents/scorer.md +0 -0
- /package/skills/{design-audit → design-review}/rubrics/ai-slop-patterns.md +0 -0
- /package/skills/{design-audit → design-review}/rubrics/scoring.md +0 -0
- /package/skills/{design-critique → design-review}/rubrics/ux-heuristics.md +0 -0
- /package/skills/{figma-convert → figma}/rubrics/conversion-rules.md +0 -0
- /package/skills/{figma-extract → figma}/rubrics/image-rules.md +0 -0
- /package/skills/{figma-convert → figma}/templates/component.md +0 -0
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from 'vitest';
|
|
2
|
-
import { execFileSync } from 'child_process';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
import { fileURLToPath } from 'url';
|
|
5
|
-
|
|
6
|
-
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
7
|
-
const SCRIPT = path.resolve(__dirname, '..', 'keyword-detector.js');
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Run keyword-detector.js with given text as argv.
|
|
11
|
-
* Returns { stdout, exitCode }.
|
|
12
|
-
*/
|
|
13
|
-
function runDetector(text) {
|
|
14
|
-
try {
|
|
15
|
-
const stdout = execFileSync('node', [SCRIPT, text], {
|
|
16
|
-
encoding: 'utf-8',
|
|
17
|
-
timeout: 5000,
|
|
18
|
-
});
|
|
19
|
-
return { stdout: stdout.trim(), exitCode: 0 };
|
|
20
|
-
} catch (err) {
|
|
21
|
-
return { stdout: (err.stdout || '').trim(), exitCode: err.status };
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// ══════════════════════════════════════════════════
|
|
26
|
-
// Individual keyword detection
|
|
27
|
-
// ══════════════════════════════════════════════════
|
|
28
|
-
describe('keyword-detector', () => {
|
|
29
|
-
describe('ralph keyword', () => {
|
|
30
|
-
it('should detect ralph keyword and emit deprecation hint', () => {
|
|
31
|
-
const result = runDetector('implement the login feature ralph');
|
|
32
|
-
expect(result.stdout).toContain('[vibe]');
|
|
33
|
-
expect(result.stdout).toContain('deprecated');
|
|
34
|
-
expect(result.stdout).toContain('persistence');
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
it('should detect ralph case-insensitively', () => {
|
|
38
|
-
const result = runDetector('RALPH fix all the bugs');
|
|
39
|
-
expect(result.stdout).toContain('[vibe]');
|
|
40
|
-
expect(result.stdout).toContain('deprecated');
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
describe('ultrawork keyword', () => {
|
|
45
|
-
it('should detect ultrawork keyword and emit automationLevel banner', () => {
|
|
46
|
-
const result = runDetector('ultrawork build the entire app');
|
|
47
|
-
expect(result.stdout).toContain('[ULTRAWORK]');
|
|
48
|
-
expect(result.stdout).toContain('parallel');
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
it('should detect ulw alias', () => {
|
|
52
|
-
const result = runDetector('ulw refactor the codebase');
|
|
53
|
-
expect(result.stdout).toContain('[ULTRAWORK]');
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
it('should detect Korean alias when word boundary matches', () => {
|
|
57
|
-
// Note: \\b word boundary may not match Korean characters reliably
|
|
58
|
-
// because \\b is designed for ASCII word boundaries.
|
|
59
|
-
// This test documents the current behavior.
|
|
60
|
-
const result = runDetector('울트라워크');
|
|
61
|
-
// Korean chars lack ASCII word boundaries, so regex may not match
|
|
62
|
-
// If it does match, great; if not, this documents the limitation
|
|
63
|
-
expect(typeof result.stdout).toBe('string');
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
describe('ralplan keyword', () => {
|
|
68
|
-
it('should detect ralplan keyword', () => {
|
|
69
|
-
const result = runDetector('ralplan design the architecture');
|
|
70
|
-
expect(result.stdout).toContain('[RALPLAN MODE]');
|
|
71
|
-
expect(result.stdout).toContain('persistence');
|
|
72
|
-
expect(result.stdout).toContain('planning');
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
// strict 키워드(일상어): 명령 끝 위치 또는 --flag 에서만 발동.
|
|
77
|
-
// 일상 영어("please verify", "quick question")의 오탐을 막기 위함.
|
|
78
|
-
describe('verify keyword (strict)', () => {
|
|
79
|
-
it('should detect verify at command tail and emit deprecation hint', () => {
|
|
80
|
-
const result = runDetector('make the implementation correct, verify');
|
|
81
|
-
expect(result.stdout).toContain('[vibe]');
|
|
82
|
-
expect(result.stdout).toContain('deprecated');
|
|
83
|
-
expect(result.stdout).toContain('verification');
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
it('should detect --verify flag', () => {
|
|
87
|
-
const result = runDetector('fix the bug --verify');
|
|
88
|
-
expect(result.stdout).toContain('[vibe]');
|
|
89
|
-
expect(result.stdout).toContain('deprecated');
|
|
90
|
-
});
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
describe('quick keyword (strict)', () => {
|
|
94
|
-
it('should detect quick at command tail and emit --max-iter 1 hint', () => {
|
|
95
|
-
const result = runDetector('fix this typo quick');
|
|
96
|
-
expect(result.stdout).toContain('[vibe]');
|
|
97
|
-
expect(result.stdout).toContain('--max-iter 1');
|
|
98
|
-
expect(result.stdout).toContain('fast');
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
it('should detect --quick flag', () => {
|
|
102
|
-
const result = runDetector('build the payment API --quick');
|
|
103
|
-
expect(result.stdout).toContain('[vibe]');
|
|
104
|
-
expect(result.stdout).toContain('--max-iter 1');
|
|
105
|
-
});
|
|
106
|
-
});
|
|
107
|
-
|
|
108
|
-
describe('explore keyword (strict)', () => {
|
|
109
|
-
it('should detect --explore flag', () => {
|
|
110
|
-
const result = runDetector('analyze the codebase --explore');
|
|
111
|
-
expect(result.stdout).toContain('[EXPLORE MODE]');
|
|
112
|
-
expect(result.stdout).toContain('exploration');
|
|
113
|
-
});
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
describe('plan keyword (strict)', () => {
|
|
117
|
-
it('should detect --plan flag', () => {
|
|
118
|
-
const result = runDetector('the new feature --plan');
|
|
119
|
-
expect(result.stdout).toContain('[PLAN MODE]');
|
|
120
|
-
expect(result.stdout).toContain('planning');
|
|
121
|
-
});
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
// ══════════════════════════════════════════════════
|
|
125
|
-
// 오탐 방지 회귀 테스트 — 일상어가 명령 중간/시작에 올 때 발동 금지
|
|
126
|
-
// ══════════════════════════════════════════════════
|
|
127
|
-
describe('strict keyword false-positive guard', () => {
|
|
128
|
-
it('should NOT trigger on "quick question on auth"', () => {
|
|
129
|
-
expect(runDetector('quick question on auth').stdout).toBe('');
|
|
130
|
-
});
|
|
131
|
-
|
|
132
|
-
it('should NOT trigger on "please verify the fix works"', () => {
|
|
133
|
-
expect(runDetector('please verify the fix works').stdout).toBe('');
|
|
134
|
-
});
|
|
135
|
-
|
|
136
|
-
it('should NOT trigger on "I plan to refactor later"', () => {
|
|
137
|
-
expect(runDetector('I plan to refactor later').stdout).toBe('');
|
|
138
|
-
});
|
|
139
|
-
|
|
140
|
-
it('should NOT trigger on "let me explore the options first"', () => {
|
|
141
|
-
expect(runDetector('let me explore the options first').stdout).toBe('');
|
|
142
|
-
});
|
|
143
|
-
});
|
|
144
|
-
|
|
145
|
-
// ══════════════════════════════════════════════════
|
|
146
|
-
// Keyword combinations / synergies
|
|
147
|
-
// ══════════════════════════════════════════════════
|
|
148
|
-
describe('keyword combinations', () => {
|
|
149
|
-
it('should detect ralph+ultrawork synergy and emit deprecation hint', () => {
|
|
150
|
-
const result = runDetector('ralph ultrawork build everything from scratch');
|
|
151
|
-
expect(result.stdout).toContain('[vibe]');
|
|
152
|
-
expect(result.stdout).toContain('deprecated');
|
|
153
|
-
expect(result.stdout).toContain('persistence');
|
|
154
|
-
expect(result.stdout).toContain('parallel');
|
|
155
|
-
});
|
|
156
|
-
|
|
157
|
-
it('should detect ralph+verify synergy and emit deprecation hint', () => {
|
|
158
|
-
// verify is strict → use --verify flag (ralph stays bare)
|
|
159
|
-
const result = runDetector('ralph fix each step --verify');
|
|
160
|
-
expect(result.stdout).toContain('[vibe]');
|
|
161
|
-
expect(result.stdout).toContain('deprecated');
|
|
162
|
-
});
|
|
163
|
-
|
|
164
|
-
it('should output both keywords when no synergy key matches sorted order', () => {
|
|
165
|
-
// KEYWORD_SYNERGIES defines 'ultrawork+explore' but processCombinations
|
|
166
|
-
// sorts keywords alphabetically → tries 'explore+ultrawork' which has no match.
|
|
167
|
-
// So individual outputs are emitted instead. explore is strict → --explore.
|
|
168
|
-
const result = runDetector('ultrawork analyze the entire project --explore');
|
|
169
|
-
expect(result.stdout).toContain('[ULTRAWORK]');
|
|
170
|
-
expect(result.stdout).toContain('[EXPLORE MODE]');
|
|
171
|
-
expect(result.stdout).toContain('[FLAGS]');
|
|
172
|
-
});
|
|
173
|
-
});
|
|
174
|
-
|
|
175
|
-
// ══════════════════════════════════════════════════
|
|
176
|
-
// No keywords
|
|
177
|
-
// ══════════════════════════════════════════════════
|
|
178
|
-
describe('no keywords detected', () => {
|
|
179
|
-
it('should output nothing when no keywords present', () => {
|
|
180
|
-
const result = runDetector('just a normal prompt with no magic words');
|
|
181
|
-
expect(result.stdout).toBe('');
|
|
182
|
-
});
|
|
183
|
-
|
|
184
|
-
it('should not match partial words', () => {
|
|
185
|
-
// "verify" inside "verifying" — depends on word boundary regex
|
|
186
|
-
// The regex uses \b so "verifying" would NOT match "verify" as a whole word
|
|
187
|
-
// Actually \bverify\b would match "verify" in "verifying"? No — "verifying" has
|
|
188
|
-
// chars after "verify" that are word chars, so \bverify\b won't match.
|
|
189
|
-
const result = runDetector('verifying the output looks good');
|
|
190
|
-
expect(result.stdout).toBe('');
|
|
191
|
-
});
|
|
192
|
-
|
|
193
|
-
it('should not match keywords embedded in other words', () => {
|
|
194
|
-
const result = runDetector('exploration of quickly planning');
|
|
195
|
-
// "explore" should NOT match "exploration" (word boundary)
|
|
196
|
-
// "quick" should NOT match "quickly"
|
|
197
|
-
// "plan" should NOT match "planning"
|
|
198
|
-
expect(result.stdout).toBe('');
|
|
199
|
-
});
|
|
200
|
-
});
|
|
201
|
-
|
|
202
|
-
// ══════════════════════════════════════════════════
|
|
203
|
-
// Empty input — shows help
|
|
204
|
-
// ══════════════════════════════════════════════════
|
|
205
|
-
describe('help output', () => {
|
|
206
|
-
it('should show usage info with no input', () => {
|
|
207
|
-
const result = runDetector('');
|
|
208
|
-
// Empty string arg is still truthy, pass no args instead
|
|
209
|
-
try {
|
|
210
|
-
const stdout = execFileSync('node', [SCRIPT], {
|
|
211
|
-
encoding: 'utf-8',
|
|
212
|
-
timeout: 5000,
|
|
213
|
-
});
|
|
214
|
-
expect(stdout).toContain('Available magic keywords');
|
|
215
|
-
expect(stdout).toContain('Keyword combinations');
|
|
216
|
-
} catch (err) {
|
|
217
|
-
// Should exit 0, but just in case
|
|
218
|
-
expect(err.stdout || '').toContain('Available magic keywords');
|
|
219
|
-
}
|
|
220
|
-
});
|
|
221
|
-
});
|
|
222
|
-
|
|
223
|
-
// ══════════════════════════════════════════════════
|
|
224
|
-
// Flags collection
|
|
225
|
-
// ══════════════════════════════════════════════════
|
|
226
|
-
describe('flags output', () => {
|
|
227
|
-
it('should output collected flags for single keyword', () => {
|
|
228
|
-
const result = runDetector('ralph do the thing');
|
|
229
|
-
expect(result.stdout).toContain('[FLAGS]');
|
|
230
|
-
expect(result.stdout).toContain('persistence');
|
|
231
|
-
expect(result.stdout).toContain('verification');
|
|
232
|
-
});
|
|
233
|
-
|
|
234
|
-
it('should merge flags from multiple keywords', () => {
|
|
235
|
-
// quick is strict → place at command tail; ralph stays bare
|
|
236
|
-
const result = runDetector('ralph finish this quick');
|
|
237
|
-
expect(result.stdout).toContain('[FLAGS]');
|
|
238
|
-
expect(result.stdout).toContain('persistence');
|
|
239
|
-
expect(result.stdout).toContain('fast');
|
|
240
|
-
});
|
|
241
|
-
});
|
|
242
|
-
});
|
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* Keyword Detector & Combiner
|
|
4
|
-
* 매직 키워드 감지 및 조합 처리
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { VIBE_PATH, PROJECT_DIR } from './utils.js';
|
|
8
|
-
|
|
9
|
-
// 매직 키워드 정의
|
|
10
|
-
const MAGIC_KEYWORDS = {
|
|
11
|
-
// Deprecated: 기본 루프 동작과 동일 (no-op). exit=coverage-100으로 해석.
|
|
12
|
-
ralph: {
|
|
13
|
-
name: 'Ralph (deprecated alias)',
|
|
14
|
-
description: '[deprecated] Looping to convergence is the default; alias mapped',
|
|
15
|
-
flags: ['persistence', 'verification'],
|
|
16
|
-
output: '[vibe] \'ralph\' is deprecated — looping to convergence is the default; alias mapped.',
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
// 울트라워크 모드 (automationLevel: autonomous + 병렬 ACT)
|
|
20
|
-
ultrawork: {
|
|
21
|
-
name: 'Ultrawork',
|
|
22
|
-
description: 'automationLevel: autonomous + parallel ACT (deprecated alias)',
|
|
23
|
-
flags: ['parallel', 'auto_continue', 'no_confirmation'],
|
|
24
|
-
output: '[ULTRAWORK] automationLevel: autonomous + parallel ACT. Loop runs to convergence; stuck → auto-TODO (no confirmation).',
|
|
25
|
-
},
|
|
26
|
-
ulw: {
|
|
27
|
-
alias: 'ultrawork',
|
|
28
|
-
},
|
|
29
|
-
울트라워크: {
|
|
30
|
-
alias: 'ultrawork',
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
// 계획 모드
|
|
34
|
-
plan: {
|
|
35
|
-
name: 'Plan Mode',
|
|
36
|
-
description: 'Planning interview mode',
|
|
37
|
-
flags: ['planning', 'interview'],
|
|
38
|
-
output: '[PLAN MODE] Enter planning interview mode. Gather requirements before implementation.',
|
|
39
|
-
strict: true, // 일상어 — 명령 끝 위치 또는 --plan 플래그에서만 (오탐 방지)
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
// Ralph + Plan 조합
|
|
43
|
-
ralplan: {
|
|
44
|
-
name: 'Ralph Plan',
|
|
45
|
-
description: 'Iterative planning with persistence',
|
|
46
|
-
flags: ['persistence', 'planning', 'iteration'],
|
|
47
|
-
output: '[RALPLAN MODE] Iterative planning with consensus. Will refine plan until approved, then execute with Ralph persistence.',
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
// Deprecated: 기본 JUDGE는 항상 결정론 검증 (no-op)
|
|
51
|
-
verify: {
|
|
52
|
-
name: 'Verify (deprecated alias)',
|
|
53
|
-
description: '[deprecated] Deterministic verification is the default; alias mapped',
|
|
54
|
-
flags: ['verification', 'strict'],
|
|
55
|
-
output: '[vibe] \'verify\' is deprecated — deterministic JUDGE is the default; alias mapped.',
|
|
56
|
-
strict: true, // 일상어 ("please verify the fix" 오탐 방지)
|
|
57
|
-
},
|
|
58
|
-
|
|
59
|
-
// 탐색 모드
|
|
60
|
-
explore: {
|
|
61
|
-
name: 'Explore Mode',
|
|
62
|
-
description: 'Deep codebase exploration',
|
|
63
|
-
flags: ['exploration', 'thorough'],
|
|
64
|
-
output: '[EXPLORE MODE] Deep exploration enabled. Use multiple Explore agents for thorough codebase analysis.',
|
|
65
|
-
strict: true, // 일상어 ("let me explore the options" 오탐 방지)
|
|
66
|
-
},
|
|
67
|
-
|
|
68
|
-
// Deprecated: --max-iter 1 매핑
|
|
69
|
-
quick: {
|
|
70
|
-
name: 'Quick (deprecated alias)',
|
|
71
|
-
description: '[deprecated] Maps to --max-iter 1; use --max-iter 1 explicitly',
|
|
72
|
-
flags: ['fast', 'minimal_verification'],
|
|
73
|
-
output: '[vibe] \'quick\' maps to --max-iter 1 (single-pass, minimal JUDGE).',
|
|
74
|
-
strict: true, // 일상어 ("quick question on auth" 오탐 방지)
|
|
75
|
-
},
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
// 키워드 조합 시너지 (deprecated alias 조합도 매핑 유지)
|
|
79
|
-
const KEYWORD_SYNERGIES = {
|
|
80
|
-
'ralph+ultrawork': {
|
|
81
|
-
name: 'Ralph+Ultrawork (deprecated)',
|
|
82
|
-
output: '[vibe] \'ralph\'+\'ultrawork\' deprecated: automationLevel: autonomous + parallel ACT, exit=coverage-100.',
|
|
83
|
-
},
|
|
84
|
-
'ralph+verify': {
|
|
85
|
-
name: 'Ralph+Verify (deprecated)',
|
|
86
|
-
output: '[vibe] \'ralph\'+\'verify\' deprecated: both are default behavior; alias mapped.',
|
|
87
|
-
},
|
|
88
|
-
'ultrawork+explore': {
|
|
89
|
-
name: 'Ultrawork+Explore',
|
|
90
|
-
output: '[ULTRAWORK+EXPLORE] automationLevel: autonomous + parallel exploration agents.',
|
|
91
|
-
},
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* 텍스트에서 키워드 추출
|
|
96
|
-
*/
|
|
97
|
-
function detectKeywords(text) {
|
|
98
|
-
const lowerText = text.toLowerCase();
|
|
99
|
-
const detected = [];
|
|
100
|
-
const resolvedKeywords = new Map();
|
|
101
|
-
|
|
102
|
-
for (const [keyword, config] of Object.entries(MAGIC_KEYWORDS)) {
|
|
103
|
-
// alias는 본체의 strict 설정을 따른다.
|
|
104
|
-
const target = config.alias ? MAGIC_KEYWORDS[config.alias] : config;
|
|
105
|
-
// strict 키워드(일상어: quick/plan/verify/explore)는 단어경계만으로는
|
|
106
|
-
// "quick question", "please verify" 등에 오탐한다. 따라서
|
|
107
|
-
// ① 명령 끝 위치의 독립 토큰 ("... 만들어줘 quick") 또는
|
|
108
|
-
// ② 명시 플래그 ("--quick", "-quick", "/quick")
|
|
109
|
-
// 에서만 매칭한다. 조어(ralph/ultrawork)는 오탐이 거의 없어 단어경계 유지.
|
|
110
|
-
const regex = target.strict
|
|
111
|
-
? new RegExp(`(?:(?:^|\\s)--?${keyword}\\b)|(?:(?:^|\\s)${keyword}\\s*$)`, 'i')
|
|
112
|
-
: new RegExp(`\\b${keyword}\\b`, 'i');
|
|
113
|
-
if (regex.test(lowerText)) {
|
|
114
|
-
// alias 해결
|
|
115
|
-
const resolved = config.alias ? MAGIC_KEYWORDS[config.alias] : config;
|
|
116
|
-
const resolvedName = config.alias || keyword;
|
|
117
|
-
|
|
118
|
-
if (!resolvedKeywords.has(resolvedName)) {
|
|
119
|
-
resolvedKeywords.set(resolvedName, resolved);
|
|
120
|
-
detected.push({
|
|
121
|
-
keyword: resolvedName,
|
|
122
|
-
original: keyword,
|
|
123
|
-
...resolved,
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
return detected;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* 키워드 조합 처리
|
|
134
|
-
*/
|
|
135
|
-
function processCombinations(detected) {
|
|
136
|
-
if (detected.length <= 1) {
|
|
137
|
-
return null;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
// 키워드 이름 정렬하여 조합 키 생성
|
|
141
|
-
const keywordNames = detected.map(d => d.keyword).sort();
|
|
142
|
-
|
|
143
|
-
// 모든 2-조합 확인
|
|
144
|
-
for (let i = 0; i < keywordNames.length; i++) {
|
|
145
|
-
for (let j = i + 1; j < keywordNames.length; j++) {
|
|
146
|
-
const comboKey = `${keywordNames[i]}+${keywordNames[j]}`;
|
|
147
|
-
if (KEYWORD_SYNERGIES[comboKey]) {
|
|
148
|
-
return KEYWORD_SYNERGIES[comboKey];
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
return null;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* 모든 플래그 수집
|
|
158
|
-
*/
|
|
159
|
-
function collectFlags(detected) {
|
|
160
|
-
const flags = new Set();
|
|
161
|
-
for (const d of detected) {
|
|
162
|
-
if (d.flags) {
|
|
163
|
-
d.flags.forEach(f => flags.add(f));
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
return Array.from(flags);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* 출력 생성
|
|
171
|
-
*/
|
|
172
|
-
function generateOutput(detected, combination) {
|
|
173
|
-
const outputs = [];
|
|
174
|
-
|
|
175
|
-
// 시너지 조합 우선
|
|
176
|
-
if (combination) {
|
|
177
|
-
outputs.push(combination.output);
|
|
178
|
-
} else {
|
|
179
|
-
// 개별 키워드 출력
|
|
180
|
-
for (const d of detected) {
|
|
181
|
-
if (d.output) {
|
|
182
|
-
outputs.push(d.output);
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
// 모든 플래그 수집
|
|
188
|
-
const flags = collectFlags(detected);
|
|
189
|
-
if (flags.length > 0) {
|
|
190
|
-
outputs.push(`[FLAGS] ${flags.join(', ')}`);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
return outputs.join('\n');
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
// 메인 실행
|
|
197
|
-
const input = process.argv.slice(2).join(' ') || process.env.USER_PROMPT || '';
|
|
198
|
-
|
|
199
|
-
if (!input) {
|
|
200
|
-
console.log(`
|
|
201
|
-
VIBE Keyword Detector
|
|
202
|
-
|
|
203
|
-
Available magic keywords:
|
|
204
|
-
${Object.entries(MAGIC_KEYWORDS)
|
|
205
|
-
.filter(([_, v]) => !v.alias)
|
|
206
|
-
.map(([k, v]) => ` ${k.padEnd(12)} - ${v.description}`)
|
|
207
|
-
.join('\n')}
|
|
208
|
-
|
|
209
|
-
Keyword combinations:
|
|
210
|
-
${Object.entries(KEYWORD_SYNERGIES)
|
|
211
|
-
.map(([k, v]) => ` ${k.padEnd(20)} - ${v.name}`)
|
|
212
|
-
.join('\n')}
|
|
213
|
-
|
|
214
|
-
Usage:
|
|
215
|
-
node keyword-detector.js "implement login ralph ultrawork"
|
|
216
|
-
`);
|
|
217
|
-
process.exit(0);
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
const detected = detectKeywords(input);
|
|
221
|
-
|
|
222
|
-
if (detected.length > 0) {
|
|
223
|
-
const combination = processCombinations(detected);
|
|
224
|
-
const output = generateOutput(detected, combination);
|
|
225
|
-
console.log(output);
|
|
226
|
-
}
|
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: characterization-test
|
|
3
|
-
user-invocable: false
|
|
4
|
-
invocation: [auto]
|
|
5
|
-
tier: core
|
|
6
|
-
description: "Lock existing behavior with characterization tests BEFORE refactoring or modifying legacy/untested code (files >200 lines without tests)."
|
|
7
|
-
triggers: [legacy, characterization test, lock behavior, regression prevention, before refactor, large file, refactor, rewrite, modernize, clean up]
|
|
8
|
-
priority: 65
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Characterization Test Skill
|
|
12
|
-
|
|
13
|
-
> **Philosophy: "Never change what you cannot verify"**
|
|
14
|
-
|
|
15
|
-
Lock existing behavior with snapshot/characterization tests before modifying code. This prevents regressions in legacy, complex, or unfamiliar codebases.
|
|
16
|
-
|
|
17
|
-
## Pre-check (K1)
|
|
18
|
-
|
|
19
|
-
> Are you modifying existing code with uncertain behavior? If the code is new (you just wrote it), well-tested, or trivially simple, skip characterization tests and write regular unit tests instead.
|
|
20
|
-
|
|
21
|
-
## When to Use
|
|
22
|
-
|
|
23
|
-
| Scenario | Signal |
|
|
24
|
-
|----------|--------|
|
|
25
|
-
| Legacy file (>500 lines) | Large files with accumulated behavior |
|
|
26
|
-
| Complex branching | Multiple if/else, switch, ternary chains |
|
|
27
|
-
| API endpoint modification | Request/response contract must be preserved |
|
|
28
|
-
| Database schema change | Migration must preserve existing data semantics |
|
|
29
|
-
| Refactoring request | "refactor", "clean up", "simplify" keywords |
|
|
30
|
-
| Unfamiliar code | No prior context about the module |
|
|
31
|
-
|
|
32
|
-
## Core Workflow
|
|
33
|
-
|
|
34
|
-
```
|
|
35
|
-
ANALYZE → GENERATE → VERIFY → CHANGE → REGRESS → RECONCILE
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
### Step 1: ANALYZE
|
|
39
|
-
|
|
40
|
-
Explore the target code to understand its current behavior.
|
|
41
|
-
|
|
42
|
-
**Parallel exploration** (use sub-agents when available):
|
|
43
|
-
- Read the target file(s)
|
|
44
|
-
- Identify all public exports / API surface
|
|
45
|
-
- Map branching paths (if/else, switch, try/catch)
|
|
46
|
-
- List external dependencies and side effects
|
|
47
|
-
- Check for existing tests
|
|
48
|
-
|
|
49
|
-
**Analysis checklist:**
|
|
50
|
-
- [ ] All public functions identified
|
|
51
|
-
- [ ] Input parameter ranges documented
|
|
52
|
-
- [ ] Edge cases listed (null, empty, boundary values)
|
|
53
|
-
- [ ] Side effects cataloged (DB writes, file I/O, network calls)
|
|
54
|
-
- [ ] Error paths mapped
|
|
55
|
-
|
|
56
|
-
### Step 2: GENERATE
|
|
57
|
-
|
|
58
|
-
Create characterization tests that capture current behavior as-is.
|
|
59
|
-
|
|
60
|
-
**TypeScript template:**
|
|
61
|
-
```typescript
|
|
62
|
-
import { describe, it, expect } from 'vitest';
|
|
63
|
-
|
|
64
|
-
describe('[ModuleName] characterization tests', () => {
|
|
65
|
-
// Happy path - capture normal behavior
|
|
66
|
-
it('should [describe current behavior]', () => {
|
|
67
|
-
const result = targetFunction(normalInput);
|
|
68
|
-
// Snapshot the ACTUAL output, not what you THINK it should be
|
|
69
|
-
expect(result).toMatchSnapshot();
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
// Edge cases - capture boundary behavior
|
|
73
|
-
it('should handle empty input', () => {
|
|
74
|
-
const result = targetFunction('');
|
|
75
|
-
expect(result).toMatchSnapshot();
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
// Error paths - capture failure modes
|
|
79
|
-
it('should handle invalid input', () => {
|
|
80
|
-
expect(() => targetFunction(null)).toThrowErrorMatchingSnapshot();
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
**Python template:**
|
|
86
|
-
```python
|
|
87
|
-
import pytest
|
|
88
|
-
|
|
89
|
-
class TestModuleNameCharacterization:
|
|
90
|
-
"""Lock existing behavior before modification."""
|
|
91
|
-
|
|
92
|
-
def test_normal_behavior(self, snapshot):
|
|
93
|
-
result = target_function(normal_input)
|
|
94
|
-
assert result == snapshot
|
|
95
|
-
|
|
96
|
-
def test_empty_input(self, snapshot):
|
|
97
|
-
result = target_function("")
|
|
98
|
-
assert result == snapshot
|
|
99
|
-
|
|
100
|
-
def test_invalid_input(self):
|
|
101
|
-
with pytest.raises(Exception) as exc_info:
|
|
102
|
-
target_function(None)
|
|
103
|
-
assert str(exc_info.value) # Capture error message
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
**Key principles:**
|
|
107
|
-
- Test ACTUAL behavior, not expected behavior
|
|
108
|
-
- Use `toMatchSnapshot()` / snapshot assertions
|
|
109
|
-
- Cover every public function
|
|
110
|
-
- Include edge cases and error paths
|
|
111
|
-
- Do NOT fix bugs in characterization tests
|
|
112
|
-
|
|
113
|
-
### Step 3: VERIFY
|
|
114
|
-
|
|
115
|
-
Run the characterization tests to confirm they pass with current code.
|
|
116
|
-
|
|
117
|
-
```bash
|
|
118
|
-
# TypeScript
|
|
119
|
-
npx vitest run --reporter=verbose [test-file]
|
|
120
|
-
|
|
121
|
-
# Python
|
|
122
|
-
pytest -v [test-file]
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
- All tests MUST pass before proceeding
|
|
126
|
-
- If any test fails, the characterization is wrong — fix the test, not the code
|
|
127
|
-
- Update snapshots if needed: `npx vitest run -u [test-file]`
|
|
128
|
-
|
|
129
|
-
### Step 4: CHANGE
|
|
130
|
-
|
|
131
|
-
Now implement the requested modification.
|
|
132
|
-
|
|
133
|
-
- Make changes incrementally
|
|
134
|
-
- Run characterization tests after each change
|
|
135
|
-
- Any unexpected test failure = potential regression
|
|
136
|
-
|
|
137
|
-
### Step 5: REGRESS
|
|
138
|
-
|
|
139
|
-
Run full characterization test suite after all changes.
|
|
140
|
-
|
|
141
|
-
```bash
|
|
142
|
-
npx vitest run [characterization-test-file]
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
- **All passing**: Changes preserve existing behavior
|
|
146
|
-
- **Expected failures**: Tests for intentionally changed behavior
|
|
147
|
-
- **Unexpected failures**: STOP — investigate regression
|
|
148
|
-
|
|
149
|
-
### Step 6: RECONCILE
|
|
150
|
-
|
|
151
|
-
Update characterization tests to match new intended behavior.
|
|
152
|
-
|
|
153
|
-
- Review each failing test individually
|
|
154
|
-
- Confirm the failure is due to intentional change
|
|
155
|
-
- Update snapshot: `npx vitest run -u`
|
|
156
|
-
- Add NEW tests for new behavior
|
|
157
|
-
- Document why each test changed
|
|
158
|
-
|
|
159
|
-
## Scenario-Specific Workflows
|
|
160
|
-
|
|
161
|
-
### Legacy File (>500 lines)
|
|
162
|
-
|
|
163
|
-
1. Generate function-level characterization tests
|
|
164
|
-
2. Focus on public API surface first
|
|
165
|
-
3. Add integration tests for cross-function flows
|
|
166
|
-
4. Refactor in small increments
|
|
167
|
-
|
|
168
|
-
### Complex Branching
|
|
169
|
-
|
|
170
|
-
1. Map all branches with a decision tree
|
|
171
|
-
2. Write one test per branch path
|
|
172
|
-
3. Include boundary values for each condition
|
|
173
|
-
4. Test combinations of related conditions
|
|
174
|
-
|
|
175
|
-
### API Endpoint
|
|
176
|
-
|
|
177
|
-
1. Capture request/response pairs for all routes
|
|
178
|
-
2. Test all HTTP methods, status codes, headers
|
|
179
|
-
3. Include authentication/authorization paths
|
|
180
|
-
4. Test error responses and validation messages
|
|
181
|
-
|
|
182
|
-
### Database Schema
|
|
183
|
-
|
|
184
|
-
1. Create fixtures with representative data
|
|
185
|
-
2. Test queries before and after migration
|
|
186
|
-
3. Verify data integrity post-migration
|
|
187
|
-
4. Test rollback scenarios
|
|
188
|
-
|
|
189
|
-
## Integration with VIBE Workflow
|
|
190
|
-
|
|
191
|
-
### With `/vibe.spec`
|
|
192
|
-
Add characterization test phase to SPEC before implementation:
|
|
193
|
-
```
|
|
194
|
-
## Pre-Implementation
|
|
195
|
-
- [ ] Characterization tests written for affected modules
|
|
196
|
-
- [ ] All characterization tests passing
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
### With `/vibe.run`
|
|
200
|
-
The implementation agent should:
|
|
201
|
-
1. Check for characterization tests before modifying files
|
|
202
|
-
2. Run them before and after changes
|
|
203
|
-
3. Flag any unexpected failures
|
|
204
|
-
|
|
205
|
-
### With `/vibe.review`
|
|
206
|
-
Review agents verify:
|
|
207
|
-
- Characterization tests exist for modified legacy code
|
|
208
|
-
- No regressions in existing behavior
|
|
209
|
-
- New behavior has corresponding new tests
|