@su-record/vibe 3.0.0 → 3.2.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 +2 -2
- package/README.en.md +6 -4
- package/README.md +5 -3
- package/dist/__tests__/wiring-integrity.test.d.ts +2 -0
- package/dist/__tests__/wiring-integrity.test.d.ts.map +1 -0
- package/dist/__tests__/wiring-integrity.test.js +160 -0
- package/dist/__tests__/wiring-integrity.test.js.map +1 -0
- package/dist/cli/commands/info.d.ts.map +1 -1
- package/dist/cli/commands/info.js +2 -1
- package/dist/cli/commands/info.js.map +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +4 -2
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/index.js +102 -128
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/postinstall/claude-agents.d.ts.map +1 -1
- package/dist/cli/postinstall/claude-agents.js +0 -5
- package/dist/cli/postinstall/claude-agents.js.map +1 -1
- package/dist/cli/postinstall/constants.d.ts +6 -0
- package/dist/cli/postinstall/constants.d.ts.map +1 -1
- package/dist/cli/postinstall/constants.js +42 -60
- package/dist/cli/postinstall/constants.js.map +1 -1
- package/dist/cli/postinstall/inline-skills.js +2 -2
- package/dist/cli/postinstall/inline-skills.js.map +1 -1
- package/dist/cli/postinstall/main.d.ts.map +1 -1
- package/dist/cli/postinstall/main.js +2 -0
- package/dist/cli/postinstall/main.js.map +1 -1
- package/dist/cli/postinstall.d.ts +6 -1
- package/dist/cli/postinstall.d.ts.map +1 -1
- package/dist/cli/postinstall.js +6 -1
- package/dist/cli/postinstall.js.map +1 -1
- package/dist/cli/setup/GlobalInstaller.d.ts +1 -15
- package/dist/cli/setup/GlobalInstaller.d.ts.map +1 -1
- package/dist/cli/setup/GlobalInstaller.js +16 -115
- package/dist/cli/setup/GlobalInstaller.js.map +1 -1
- package/dist/cli/setup/GlobalInstaller.test.d.ts +2 -0
- package/dist/cli/setup/GlobalInstaller.test.d.ts.map +1 -0
- package/dist/cli/setup/GlobalInstaller.test.js +16 -0
- package/dist/cli/setup/GlobalInstaller.test.js.map +1 -0
- package/dist/cli/setup/ProjectSetup.js +2 -2
- package/dist/cli/setup/ProjectSetup.js.map +1 -1
- package/dist/cli/setup.d.ts +1 -1
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +1 -1
- package/dist/cli/setup.js.map +1 -1
- package/dist/infra/lib/SkillRepository.js +1 -1
- package/dist/infra/lib/evolution/__tests__/integration.test.js +0 -42
- package/dist/infra/lib/evolution/__tests__/integration.test.js.map +1 -1
- package/hooks/scripts/__tests__/.vibe/command-log.txt +3 -78
- package/hooks/scripts/__tests__/clone-behaviors.test.js +97 -1
- package/hooks/scripts/__tests__/clone-merge-responsive.test.js +106 -0
- package/hooks/scripts/__tests__/code-check-memory-write.test.js +81 -0
- package/hooks/scripts/__tests__/step-counter.test.js +21 -0
- package/hooks/scripts/auto-format.js +2 -11
- package/hooks/scripts/auto-test.js +2 -11
- package/hooks/scripts/clone-extract.js +388 -38
- 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 +27 -55
- package/hooks/scripts/lib/glob.js +32 -0
- package/hooks/scripts/lib/hook-context.js +19 -2
- package/hooks/scripts/post-edit.js +2 -3
- package/hooks/scripts/prompt-dispatcher.js +1 -1
- package/hooks/scripts/scope-guard.js +3 -42
- package/hooks/scripts/sentinel-guard.js +5 -20
- package/hooks/scripts/session-start.js +2 -2
- package/hooks/scripts/step-counter.js +35 -57
- package/package.json +6 -4
- package/skills/clone/SKILL.md +74 -203
- package/skills/clone/references/capture-rules.md +48 -0
- package/skills/clone/references/legal-and-error-recovery.md +40 -0
- package/skills/clone/references/refine-rules.md +61 -0
- package/skills/clone/references/scaffold-phases.md +59 -0
- package/skills/clone/references/setup-and-layout.md +30 -0
- package/skills/docs/SKILL.md +39 -4
- package/skills/docs/references/api-docs-changelog.md +34 -0
- package/skills/docs/references/codemaps-output.md +23 -0
- package/{agents/diagrammer.md → skills/docs/references/diagram-spec.md} +2 -15
- package/skills/exec-plan/SKILL.md +1 -1
- package/skills/exec-plan/templates/plan.md +1 -1
- package/skills/handoff/SKILL.md +3 -3
- package/skills/handoff/templates/handoff.md +1 -1
- package/skills/vibe/SKILL.md +3 -2
- package/skills/vibe.analyze/SKILL.md +12 -249
- package/skills/vibe.analyze/references/output-templates.md +188 -0
- package/skills/vibe.analyze/references/quality-gate.md +93 -0
- package/skills/vibe.clone/SKILL.md +52 -19
- package/skills/vibe.continue/SKILL.md +32 -0
- package/skills/vibe.design/SKILL.md +23 -1
- package/skills/vibe.design/references/ui-preview.md +20 -0
- package/skills/vibe.docs/SKILL.md +4 -2
- package/skills/vibe.figma/SKILL.md +33 -260
- package/skills/vibe.figma/references/branch-phases.md +113 -0
- package/skills/vibe.figma/references/state-schema.md +42 -0
- package/skills/vibe.figma/references/step-algorithms.md +204 -0
- package/skills/vibe.image/SKILL.md +62 -0
- package/skills/vibe.image/references/image-generation-examples.md +39 -0
- package/skills/vibe.reason/SKILL.md +3 -183
- package/skills/vibe.reason/references/output-format-template.md +57 -0
- package/skills/vibe.reason/references/quality-rubrics.md +94 -0
- package/skills/vibe.reason/references/worked-example.md +45 -0
- package/skills/vibe.review/SKILL.md +13 -348
- package/skills/vibe.review/references/boundary-check.md +25 -0
- package/skills/vibe.review/references/output-template.md +74 -0
- package/skills/vibe.review/references/quality-gate.md +84 -0
- package/skills/vibe.review/references/race-mode.md +117 -0
- package/skills/vibe.review/references/worked-examples.md +94 -0
- package/vibe/templates/claudemd-template.md +1 -1
- package/agents/acceptance-tester.md +0 -56
- package/agents/documenter.md +0 -43
- package/agents/figma/figma-engineer.md +0 -76
- 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/cli/postinstall/index.d.ts +0 -23
- package/dist/cli/postinstall/index.d.ts.map +0 -1
- package/dist/cli/postinstall/index.js +0 -23
- package/dist/cli/postinstall/index.js.map +0 -1
- package/dist/cli/setup/index.d.ts +0 -9
- package/dist/cli/setup/index.d.ts.map +0 -1
- package/dist/cli/setup/index.js +0 -12
- package/dist/cli/setup/index.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__/.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/evolution-engine.js +0 -91
- package/hooks/scripts/hud-status.js +0 -321
- package/hooks/scripts/skill-injector.js +0 -83
- package/skills/vibe.utils/SKILL.md +0 -415
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* clone-merge-responsive.js — MO/PC per-BP SCSS → mobile-first responsive merge
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* node clone-merge-responsive.js --mo=<styles-dir> --pc=<styles-dir> --out=<dir> [--breakpoint=1024]
|
|
8
|
+
*
|
|
9
|
+
* Why this exists (clone Phase 3C):
|
|
10
|
+
* Phase 3A/3B produce two fixed-viewport SCSS trees (styles/{feature}/mo, /pc).
|
|
11
|
+
* This merges them mobile-first: MO declarations become the base, and only the
|
|
12
|
+
* declarations where PC differs go into a single @media (min-width: <bp>) block.
|
|
13
|
+
* Deterministic text merge — no value invention. Post-merge correctness is judged
|
|
14
|
+
* by Phase 5 (pixel + computed-CSS verification at BOTH viewports).
|
|
15
|
+
*
|
|
16
|
+
* Fail-open:
|
|
17
|
+
* - PC-only selectors → whole rule inside the media block
|
|
18
|
+
* - MO-only selectors → base as-is (reported)
|
|
19
|
+
* - unparseable/missing files → reported and skipped, never a hard abort
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
import fs from 'fs';
|
|
23
|
+
import path from 'path';
|
|
24
|
+
import { parseScss, normalize } from './clone-validate.js';
|
|
25
|
+
|
|
26
|
+
// ─── CLI ────────────────────────────────────────────────────────────
|
|
27
|
+
function parseArgs(argv) {
|
|
28
|
+
const opts = { breakpoint: 1024 };
|
|
29
|
+
for (const a of argv.slice(2)) {
|
|
30
|
+
if (a.startsWith('--mo=')) opts.mo = a.slice(5);
|
|
31
|
+
else if (a.startsWith('--pc=')) opts.pc = a.slice(5);
|
|
32
|
+
else if (a.startsWith('--out=')) opts.out = a.slice(6);
|
|
33
|
+
else if (a.startsWith('--breakpoint=')) opts.breakpoint = Number(a.slice(13)) || 1024;
|
|
34
|
+
}
|
|
35
|
+
return opts;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// ─── Merge core (pure — exported for tests) ─────────────────────────
|
|
39
|
+
// moRules/pcRules: Map<selector, {prop: value}> (parseScss output)
|
|
40
|
+
// → { base: Map, media: Map, stats }
|
|
41
|
+
function mergeRules(moRules, pcRules) {
|
|
42
|
+
const base = new Map();
|
|
43
|
+
const media = new Map();
|
|
44
|
+
const stats = { selectors: 0, moOnly: 0, pcOnly: 0, overrides: 0, shared: 0 };
|
|
45
|
+
|
|
46
|
+
const selectors = new Set([...moRules.keys(), ...pcRules.keys()]);
|
|
47
|
+
for (const sel of selectors) {
|
|
48
|
+
stats.selectors++;
|
|
49
|
+
const mo = moRules.get(sel);
|
|
50
|
+
const pc = pcRules.get(sel);
|
|
51
|
+
if (mo && Object.keys(mo).length) base.set(sel, mo);
|
|
52
|
+
|
|
53
|
+
if (!pc || !Object.keys(pc).length) { if (mo) stats.moOnly++; continue; }
|
|
54
|
+
if (!mo || !Object.keys(mo).length) {
|
|
55
|
+
// PC 전용 셀렉터 — 데스크탑에서만 존재하는 노드
|
|
56
|
+
media.set(sel, pc);
|
|
57
|
+
stats.pcOnly++;
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const diff = {};
|
|
62
|
+
for (const [prop, val] of Object.entries(pc)) {
|
|
63
|
+
if (mo[prop] === undefined || normalize(mo[prop]) !== normalize(val)) diff[prop] = val;
|
|
64
|
+
}
|
|
65
|
+
if (Object.keys(diff).length) { media.set(sel, diff); stats.overrides++; }
|
|
66
|
+
else stats.shared++;
|
|
67
|
+
}
|
|
68
|
+
return { base, media, stats };
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function emitRules(rules, indent) {
|
|
72
|
+
const out = [];
|
|
73
|
+
for (const [sel, decls] of rules) {
|
|
74
|
+
const body = Object.entries(decls).map(([p, v]) => `${indent} ${p}: ${v};`).join('\n');
|
|
75
|
+
if (!body) continue;
|
|
76
|
+
out.push(`${indent}${sel} {\n${body}\n${indent}}`);
|
|
77
|
+
}
|
|
78
|
+
return out.join('\n\n');
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Merged partial: MO base rules + one @media (min-width) block with PC diffs.
|
|
82
|
+
function emitMerged(moRules, pcRules, breakpoint, header) {
|
|
83
|
+
const { base, media, stats } = mergeRules(moRules, pcRules);
|
|
84
|
+
const parts = [header, '', emitRules(base, '')];
|
|
85
|
+
if (media.size) {
|
|
86
|
+
parts.push('');
|
|
87
|
+
parts.push(`@media (min-width: ${breakpoint}px) {`);
|
|
88
|
+
parts.push(emitRules(media, ' '));
|
|
89
|
+
parts.push('}');
|
|
90
|
+
}
|
|
91
|
+
return { scss: parts.filter((p) => p !== null).join('\n') + '\n', stats };
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// ─── File-level orchestration ───────────────────────────────────────
|
|
95
|
+
function readScssRules(file) {
|
|
96
|
+
if (!fs.existsSync(file)) return null;
|
|
97
|
+
try { return parseScss(fs.readFileSync(file, 'utf8')); }
|
|
98
|
+
catch (e) {
|
|
99
|
+
console.error(`[clone-merge] parse skipped (${e.message}): ${file}`);
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function listSections(dir) {
|
|
105
|
+
const d = path.join(dir, 'sections');
|
|
106
|
+
if (!fs.existsSync(d)) return [];
|
|
107
|
+
return fs.readdirSync(d).filter((f) => f.startsWith('_') && f.endsWith('.scss'));
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function mergeTokens(moDir, pcDir, outDir, breakpoint) {
|
|
111
|
+
const mo = readScssRules(path.join(moDir, '_tokens.scss')) || new Map();
|
|
112
|
+
const pc = readScssRules(path.join(pcDir, '_tokens.scss')) || new Map();
|
|
113
|
+
const { scss } = emitMerged(mo, pc, breakpoint, '// Auto-merged by clone-merge-responsive.js (mobile-first)');
|
|
114
|
+
fs.writeFileSync(path.join(outDir, '_tokens.scss'), scss);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function copyIfExists(src, dst) {
|
|
118
|
+
if (fs.existsSync(src)) fs.copyFileSync(src, dst);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function mergeClassPlans(moDir, pcDir, outDir) {
|
|
122
|
+
const read = (d) => {
|
|
123
|
+
const f = path.join(d, 'class-plan.json');
|
|
124
|
+
return fs.existsSync(f) ? JSON.parse(fs.readFileSync(f, 'utf8')) : {};
|
|
125
|
+
};
|
|
126
|
+
// MO 우선 — 동일 노드 id가 다른 클래스면 MO가 base이므로 MO를 채택
|
|
127
|
+
const merged = { ...read(pcDir), ...read(moDir) };
|
|
128
|
+
fs.writeFileSync(path.join(outDir, 'class-plan.json'), JSON.stringify(merged, null, 2));
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function main() {
|
|
132
|
+
const opts = parseArgs(process.argv);
|
|
133
|
+
if (!opts.mo || !opts.pc || !opts.out) {
|
|
134
|
+
console.error('Usage: node clone-merge-responsive.js --mo=<styles-dir> --pc=<styles-dir> --out=<dir> [--breakpoint=1024]');
|
|
135
|
+
process.exit(2);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
fs.mkdirSync(path.join(opts.out, 'sections'), { recursive: true });
|
|
139
|
+
|
|
140
|
+
const files = [...new Set([...listSections(opts.mo), ...listSections(opts.pc)])].sort();
|
|
141
|
+
const totals = { selectors: 0, moOnly: 0, pcOnly: 0, overrides: 0, shared: 0 };
|
|
142
|
+
const merged = [];
|
|
143
|
+
|
|
144
|
+
for (const f of files) {
|
|
145
|
+
const mo = readScssRules(path.join(opts.mo, 'sections', f)) || new Map();
|
|
146
|
+
const pc = readScssRules(path.join(opts.pc, 'sections', f)) || new Map();
|
|
147
|
+
if (!mo.size && !pc.size) { console.error(`[clone-merge] empty on both BPs, skipped: ${f}`); continue; }
|
|
148
|
+
const { scss, stats } = emitMerged(mo, pc, opts.breakpoint, `// Section: ${f} — merged mobile-first`);
|
|
149
|
+
fs.writeFileSync(path.join(opts.out, 'sections', f), scss);
|
|
150
|
+
for (const k of Object.keys(totals)) totals[k] += stats[k];
|
|
151
|
+
merged.push(f);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
mergeTokens(opts.mo, opts.pc, opts.out, opts.breakpoint);
|
|
155
|
+
copyIfExists(path.join(opts.mo, '_base.scss'), path.join(opts.out, '_base.scss'));
|
|
156
|
+
copyIfExists(path.join(opts.mo, '_shared.scss'), path.join(opts.out, '_shared.scss'));
|
|
157
|
+
mergeClassPlans(opts.mo, opts.pc, opts.out);
|
|
158
|
+
|
|
159
|
+
const index = [
|
|
160
|
+
'// Auto-merged by clone-merge-responsive.js — mobile-first responsive',
|
|
161
|
+
'',
|
|
162
|
+
`@use './tokens';`,
|
|
163
|
+
`@use './base';`,
|
|
164
|
+
`@use './shared';`,
|
|
165
|
+
...merged.map((f) => `@use './sections/${f.replace(/^_|\.scss$/g, '')}';`),
|
|
166
|
+
].join('\n') + '\n';
|
|
167
|
+
fs.writeFileSync(path.join(opts.out, 'index.scss'), index);
|
|
168
|
+
|
|
169
|
+
console.log(`[clone-merge] done → ${opts.out}`);
|
|
170
|
+
console.log(` sections: ${merged.length}, selectors: ${totals.selectors} (shared ${totals.shared}, overrides ${totals.overrides}, mo-only ${totals.moOnly}, pc-only ${totals.pcOnly})`);
|
|
171
|
+
console.log(` breakpoint: @media (min-width: ${opts.breakpoint}px)`);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
const isMain = process.argv[1] && process.argv[1].replace(/\\/g, '/').endsWith('clone-merge-responsive.js');
|
|
175
|
+
if (isMain) {
|
|
176
|
+
try { main(); }
|
|
177
|
+
catch (e) {
|
|
178
|
+
console.error(`[clone-merge] FAIL: ${e.message}`);
|
|
179
|
+
if (process.env.DEBUG) console.error(e.stack);
|
|
180
|
+
process.exit(1);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export { mergeRules, emitMerged };
|
|
@@ -28,6 +28,7 @@ function parseArgs(argv) {
|
|
|
28
28
|
else if (a.startsWith('--section=')) opts.section = a.slice(10);
|
|
29
29
|
else if (a.startsWith('--feature=')) opts.feature = a.slice(10);
|
|
30
30
|
else if (a.startsWith('--behaviors=')) opts.behaviors = a.slice(12);
|
|
31
|
+
else if (a === '--real-content') opts.realContent = true;
|
|
31
32
|
}
|
|
32
33
|
return { sectionsPath, opts };
|
|
33
34
|
}
|
|
@@ -101,20 +102,28 @@ function sectionHasNode(section, tag, cls) {
|
|
|
101
102
|
return (section.children || []).some(hit);
|
|
102
103
|
}
|
|
103
104
|
|
|
105
|
+
function diffLines(changed) {
|
|
106
|
+
return Object.entries(changed)
|
|
107
|
+
.map(([k, v]) => ` - ${k}: \`${v.from}\` → \`${v.to}\``).join('\n');
|
|
108
|
+
}
|
|
109
|
+
|
|
104
110
|
function behaviorsBlock(section, behaviors) {
|
|
105
111
|
if (!behaviors) return null;
|
|
106
|
-
const
|
|
112
|
+
const inSection = (list) => (list || []).filter((b) => sectionHasNode(section, b.tag, b.cls));
|
|
113
|
+
const scroll = inSection(behaviors.scroll);
|
|
114
|
+
const hover = inSection(behaviors.hover);
|
|
115
|
+
const inview = inSection(behaviors.inview);
|
|
116
|
+
const timed = inSection(behaviors.timeDriven);
|
|
107
117
|
// Tab groups aren't tag-keyed; attach to any section that contains a [role=tab]-ish node.
|
|
108
118
|
const tabs = (behaviors.interactive || []).filter(() =>
|
|
109
119
|
sectionHasNode(section, 'button') || sectionHasNode(section, 'li') || sectionHasNode(section, 'a'),
|
|
110
120
|
);
|
|
111
|
-
|
|
121
|
+
const lib = behaviors.scrollLib;
|
|
122
|
+
if (!scroll.length && !tabs.length && !hover.length && !inview.length && !timed.length && !lib) return null;
|
|
112
123
|
|
|
113
124
|
const lines = [];
|
|
114
125
|
for (const b of scroll) {
|
|
115
|
-
|
|
116
|
-
.map(([k, v]) => ` - ${k}: \`${v.from}\` → \`${v.to}\``).join('\n');
|
|
117
|
-
lines.push(`- **Scroll-triggered** on \`${b.label}\` (past ~${b.triggerScrollY}px scroll):\n${diffs}`);
|
|
126
|
+
lines.push(`- **Scroll-triggered** on \`${b.label}\` (past ~${b.triggerScrollY}px scroll):\n${diffLines(b.changed)}`);
|
|
118
127
|
}
|
|
119
128
|
for (const t of tabs) {
|
|
120
129
|
const labels = (t.tabLabels || []).map((l) => `"${l}"`).join(', ') || '(unlabeled)';
|
|
@@ -123,6 +132,19 @@ function behaviorsBlock(section, behaviors) {
|
|
|
123
132
|
: 'no content swap detected (styling-only tabs)';
|
|
124
133
|
lines.push(`- **Tab group** ×${t.count} [${labels}]: ${swap}`);
|
|
125
134
|
}
|
|
135
|
+
for (const b of hover) {
|
|
136
|
+
const tr = b.transition && b.transition !== 'all 0s ease 0s' ? ` (transition: \`${b.transition}\`)` : '';
|
|
137
|
+
lines.push(`- **Hover** on \`${b.label}\`${tr}:\n${diffLines(b.changed)}`);
|
|
138
|
+
}
|
|
139
|
+
for (const b of inview) {
|
|
140
|
+
lines.push(`- **In-view entrance** on \`${b.label}\` (enters at ~${b.triggerY}px):\n${diffLines(b.changed)}`);
|
|
141
|
+
}
|
|
142
|
+
for (const b of timed) {
|
|
143
|
+
lines.push(`- **Time-driven** \`${b.label}\` — ${b.mutations} mutations/3s [${(b.kinds || []).join(', ')}] → carousel/auto-cycle candidate`);
|
|
144
|
+
}
|
|
145
|
+
if (lib) {
|
|
146
|
+
lines.push(`- **Smooth-scroll library (page-level):** ${lib.name} (evidence: \`${lib.evidence}\`) → wire in globals, not per-section`);
|
|
147
|
+
}
|
|
126
148
|
return lines.join('\n');
|
|
127
149
|
}
|
|
128
150
|
|
|
@@ -171,7 +193,9 @@ ${cssBlock(section.css)}
|
|
|
171
193
|
## Assets (local paths only — never hotlink)
|
|
172
194
|
${assetsBlock(section.images)}
|
|
173
195
|
|
|
174
|
-
## Text content
|
|
196
|
+
## Text content ${meta.realContent
|
|
197
|
+
? '(verbatim — user confirmed rights to reuse this copy)'
|
|
198
|
+
: '(replace copyrighted copy with placeholders)'}
|
|
175
199
|
${textBlock}
|
|
176
200
|
|
|
177
201
|
## Component candidates
|
|
@@ -179,7 +203,7 @@ ${componentsBlock(section.components)}
|
|
|
179
203
|
|
|
180
204
|
## Build checklist
|
|
181
205
|
- [ ] HTML semantics + final tags chosen
|
|
182
|
-
- [ ] SCSS
|
|
206
|
+
- [ ] SCSS started from the clone-to-scss.js draft — value edits only with evidence cited from computed.json/states.json/behaviors.json (no eyeballing); clone-validate.js is the judge
|
|
183
207
|
- [ ] Every state above implemented
|
|
184
208
|
- [ ] Interaction model confirmed on live site & wired
|
|
185
209
|
- [ ] All assets local (public/images/${meta.feature}/) — no hotlinks
|
|
@@ -196,6 +220,7 @@ function main() {
|
|
|
196
220
|
url: data.meta && data.meta.url,
|
|
197
221
|
viewport: data.meta && data.meta.viewport,
|
|
198
222
|
bp: opts.section ? (data.meta && data.meta.bp) : (data.meta && data.meta.bp) || '?',
|
|
223
|
+
realContent: !!opts.realContent,
|
|
199
224
|
};
|
|
200
225
|
// behaviors.json (active interaction sweep) lives next to the source computed.json.
|
|
201
226
|
const behaviorsPath = opts.behaviors || path.join(path.dirname(sectionsPath), 'behaviors.json');
|
|
@@ -223,7 +248,7 @@ function main() {
|
|
|
223
248
|
const isMain = process.argv[1] && process.argv[1].replace(/\\/g, '/').endsWith('clone-spec.js');
|
|
224
249
|
if (isMain) {
|
|
225
250
|
if (!sectionsPath || !opts.out) {
|
|
226
|
-
console.error('Usage: node clone-spec.js <sections.json> --out=<dir> [--section=Name] [--feature=name] [--behaviors=path]');
|
|
251
|
+
console.error('Usage: node clone-spec.js <sections.json> --out=<dir> [--section=Name] [--feature=name] [--behaviors=path] [--real-content]');
|
|
227
252
|
process.exit(1);
|
|
228
253
|
}
|
|
229
254
|
try { main(); }
|
|
@@ -34,10 +34,6 @@ function parseArgs(argv) {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
const { stylesDir, sectionsPath, opts } = parseArgs(process.argv);
|
|
37
|
-
if (!stylesDir || !sectionsPath) {
|
|
38
|
-
console.error('Usage: node clone-validate.js <styles-dir> <sections.json> [--section=<name>]');
|
|
39
|
-
process.exit(2);
|
|
40
|
-
}
|
|
41
37
|
|
|
42
38
|
// ─── Minimal SCSS parser ────────────────────────────────────────────
|
|
43
39
|
// Strips comments, expands `&::pseudo` (one level), flattens nested rules.
|
|
@@ -272,9 +268,19 @@ function main() {
|
|
|
272
268
|
process.exit(0);
|
|
273
269
|
}
|
|
274
270
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
if (
|
|
279
|
-
|
|
271
|
+
// isMain 가드 — clone-merge-responsive.js가 parseScss를 import할 때 main()이 돌면 안 된다
|
|
272
|
+
const isMain = process.argv[1] && process.argv[1].replace(/\\/g, '/').endsWith('clone-validate.js');
|
|
273
|
+
if (isMain) {
|
|
274
|
+
if (!stylesDir || !sectionsPath) {
|
|
275
|
+
console.error('Usage: node clone-validate.js <styles-dir> <sections.json> [--section=<name>]');
|
|
276
|
+
process.exit(2);
|
|
277
|
+
}
|
|
278
|
+
try { main(); }
|
|
279
|
+
catch (e) {
|
|
280
|
+
console.error(`[clone-validate] FAIL: ${e.message}`);
|
|
281
|
+
if (process.env.DEBUG) console.error(e.stack);
|
|
282
|
+
process.exit(2);
|
|
283
|
+
}
|
|
280
284
|
}
|
|
285
|
+
|
|
286
|
+
export { parseScss, normalize, compareValue };
|
|
@@ -14,6 +14,7 @@ import { getToolsBaseUrl, PROJECT_DIR, readProjectConfig } from './utils.js';
|
|
|
14
14
|
import { readFileSync } from 'fs';
|
|
15
15
|
import path from 'path';
|
|
16
16
|
import { buildCliCtx, isDirectRun } from './lib/hook-context.js';
|
|
17
|
+
import { globToRegExp } from './lib/glob.js';
|
|
17
18
|
|
|
18
19
|
const BASE_URL = getToolsBaseUrl();
|
|
19
20
|
|
|
@@ -42,35 +43,6 @@ const DEFAULT_CONSOLE_ALLOW_GLOBS = [
|
|
|
42
43
|
'**/__tests__/**',
|
|
43
44
|
];
|
|
44
45
|
|
|
45
|
-
/**
|
|
46
|
-
* 경량 glob → RegExp 변환 (scope-guard와 동일 알고리즘, 독립 복사본).
|
|
47
|
-
* @param {string} glob
|
|
48
|
-
* @returns {RegExp}
|
|
49
|
-
*/
|
|
50
|
-
function globToRegExp(glob) {
|
|
51
|
-
const normalized = glob.replace(/\\/g, '/');
|
|
52
|
-
let out = '';
|
|
53
|
-
for (let i = 0; i < normalized.length; i++) {
|
|
54
|
-
const c = normalized[i];
|
|
55
|
-
if (c === '*') {
|
|
56
|
-
if (normalized[i + 1] === '*') {
|
|
57
|
-
out += '.*';
|
|
58
|
-
i++;
|
|
59
|
-
if (normalized[i + 1] === '/') i++;
|
|
60
|
-
} else {
|
|
61
|
-
out += '[^/]*';
|
|
62
|
-
}
|
|
63
|
-
} else if (c === '?') {
|
|
64
|
-
out += '[^/]';
|
|
65
|
-
} else if ('.+^$()|{}[]\\'.includes(c)) {
|
|
66
|
-
out += '\\' + c;
|
|
67
|
-
} else {
|
|
68
|
-
out += c;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
return new RegExp('^' + out + '$');
|
|
72
|
-
}
|
|
73
|
-
|
|
74
46
|
/**
|
|
75
47
|
* .vibe/config.json의 qualityCheck.consoleAllow 글로브 목록 로드.
|
|
76
48
|
* 기본 글로브와 병합하여 반환.
|
|
@@ -105,19 +77,12 @@ function isConsoleAllowed(filePath) {
|
|
|
105
77
|
}
|
|
106
78
|
|
|
107
79
|
/**
|
|
108
|
-
* hook
|
|
80
|
+
* hook ctx에서 수정된 파일 경로 추출.
|
|
109
81
|
* @param {object} ctx
|
|
110
82
|
* @returns {string[]}
|
|
111
83
|
*/
|
|
112
84
|
function getModifiedFiles(ctx) {
|
|
113
|
-
|
|
114
|
-
const parsed = ctx.payload || (ctx.hookInput ? JSON.parse(ctx.hookInput) : null);
|
|
115
|
-
const filePath = parsed?.tool_input?.file_path || parsed?.tool_input?.path;
|
|
116
|
-
return filePath ? [filePath] : [];
|
|
117
|
-
} catch {
|
|
118
|
-
// ignore
|
|
119
|
-
}
|
|
120
|
-
return [];
|
|
85
|
+
return ctx.filePath ? [ctx.filePath] : [];
|
|
121
86
|
}
|
|
122
87
|
|
|
123
88
|
/**
|
|
@@ -217,7 +182,7 @@ function runDetectors(filePath) {
|
|
|
217
182
|
/**
|
|
218
183
|
* in-process 진입점 — 품질 검사 + 관찰 캡처.
|
|
219
184
|
* findings 배열을 반환한다 (디스패처가 수집해 additionalContext에 주입).
|
|
220
|
-
* @param {{
|
|
185
|
+
* @param {{ filePath: string }} ctx
|
|
221
186
|
* @returns {Promise<{ exitCode: number, findings: string[] }>}
|
|
222
187
|
*/
|
|
223
188
|
export async function run(ctx) {
|
|
@@ -225,9 +190,10 @@ export async function run(ctx) {
|
|
|
225
190
|
const files = getModifiedFiles(ctx);
|
|
226
191
|
if (files.length === 0) return { exitCode: 0, findings };
|
|
227
192
|
|
|
228
|
-
// 1. 하드룰 탐지기 실행 (changed file only
|
|
229
|
-
// 커밋 게이트(verifyRequired)는 태우지 않는다:
|
|
230
|
-
// auto-commit을 차단하는 결합은 제거됨
|
|
193
|
+
// 1. 하드룰 탐지기 실행 (changed file only, regex only — 동적 import 없음) —
|
|
194
|
+
// additionalContext 주입만. 커밋 게이트(verifyRequired)는 태우지 않는다:
|
|
195
|
+
// 정규식 오탐 하나가 auto-commit을 차단하는 결합은 제거됨
|
|
196
|
+
// (harness-review-2026-07-01).
|
|
231
197
|
try {
|
|
232
198
|
const { p1 } = runDetectors(files[0]);
|
|
233
199
|
for (const msg of p1) findings.push(msg);
|
|
@@ -235,6 +201,10 @@ export async function run(ctx) {
|
|
|
235
201
|
// 탐지기 실패 → fail-open, 계속 진행
|
|
236
202
|
}
|
|
237
203
|
|
|
204
|
+
// validateCodeQuality가 처리하지 않는 확장자는 무거운 동적 import
|
|
205
|
+
// (convention/index.js·memory/index.js — 모듈 그래프 + SQLite 오픈) 전에 조기 반환.
|
|
206
|
+
if (!CODE_EXT_RE.test(files[0])) return { exitCode: 0, findings };
|
|
207
|
+
|
|
238
208
|
// 2. validateCodeQuality 호출 (P1/P2 필터)
|
|
239
209
|
try {
|
|
240
210
|
const module = await import(`${BASE_URL}convention/index.js`);
|
|
@@ -249,19 +219,21 @@ export async function run(ctx) {
|
|
|
249
219
|
// Silently continue on check failure
|
|
250
220
|
}
|
|
251
221
|
|
|
252
|
-
// 3. 관찰 자동 캡처
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
222
|
+
// 3. 관찰 자동 캡처 — 위반(findings)이 실제로 있을 때만 SQLite 기록 (clean edit은 write 생략)
|
|
223
|
+
if (findings.length > 0) {
|
|
224
|
+
try {
|
|
225
|
+
const memModule = await import(`${BASE_URL}memory/index.js`);
|
|
226
|
+
const { type, title } = classifyObservation(files);
|
|
227
|
+
|
|
228
|
+
await memModule.addObservation({
|
|
229
|
+
type,
|
|
230
|
+
title: `${title}: ${files.map(f => f.split(/[\\/]/).pop()).join(', ')}`,
|
|
231
|
+
filesModified: files,
|
|
232
|
+
projectPath: PROJECT_DIR,
|
|
233
|
+
});
|
|
234
|
+
} catch {
|
|
235
|
+
// 관찰 캡처 실패해도 무시
|
|
236
|
+
}
|
|
265
237
|
}
|
|
266
238
|
|
|
267
239
|
return { exitCode: 0, findings };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 경량 glob → RegExp 변환 — code-check.js·scope-guard.js 공용 (중복 제거).
|
|
3
|
+
* - `**` : 경로 구분자 포함 임의 문자열
|
|
4
|
+
* - `*` : 구분자 제외 임의 문자열
|
|
5
|
+
* - `?` : 구분자 제외 한 글자
|
|
6
|
+
* - 기타 정규식 메타문자는 이스케이프
|
|
7
|
+
* @param {string} glob
|
|
8
|
+
* @returns {RegExp}
|
|
9
|
+
*/
|
|
10
|
+
export function globToRegExp(glob) {
|
|
11
|
+
const normalized = glob.replace(/\\/g, '/');
|
|
12
|
+
let out = '';
|
|
13
|
+
for (let i = 0; i < normalized.length; i++) {
|
|
14
|
+
const c = normalized[i];
|
|
15
|
+
if (c === '*') {
|
|
16
|
+
if (normalized[i + 1] === '*') {
|
|
17
|
+
out += '.*';
|
|
18
|
+
i++;
|
|
19
|
+
if (normalized[i + 1] === '/') i++; // `**/` → `.*`
|
|
20
|
+
} else {
|
|
21
|
+
out += '[^/]*';
|
|
22
|
+
}
|
|
23
|
+
} else if (c === '?') {
|
|
24
|
+
out += '[^/]';
|
|
25
|
+
} else if ('.+^$()|{}[]\\'.includes(c)) {
|
|
26
|
+
out += '\\' + c;
|
|
27
|
+
} else {
|
|
28
|
+
out += c;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return new RegExp('^' + out + '$');
|
|
32
|
+
}
|
|
@@ -7,11 +7,13 @@
|
|
|
7
7
|
* 2. standalone CLI: antigravity-hooks.json / 기존 테스트가 스크립트를
|
|
8
8
|
* 직접 실행 — isDirectRun()으로 감지해 stdin/argv/env에서 ctx를 구성
|
|
9
9
|
*
|
|
10
|
-
* ctx 형태: { toolName, toolInput, payload, hookInput }
|
|
10
|
+
* ctx 형태: { toolName, toolInput, payload, hookInput, filePath }
|
|
11
11
|
* - toolName: payload.tool_name 우선, argv 폴백 (현행 각 스크립트와 동일 우선순위)
|
|
12
12
|
* - toolInput: 문자열 정규화된 tool_input (payload → argv[3] → env.TOOL_INPUT)
|
|
13
13
|
* - payload: 파싱된 stdin JSON 또는 null
|
|
14
14
|
* - hookInput: stdin 원문 문자열 (code-check의 HOOK_INPUT 사용처 대체)
|
|
15
|
+
* - filePath: toolInput 에서 뽑은 대상 파일 경로 (file_path → notebook_path →
|
|
16
|
+
* path 우선순위 — 각 스크립트의 인라인 추출 로직과 동일 규약)
|
|
15
17
|
*/
|
|
16
18
|
import fs from 'fs';
|
|
17
19
|
import { pathToFileURL } from 'url';
|
|
@@ -96,6 +98,21 @@ export function readStdinSync() {
|
|
|
96
98
|
return { raw: null, parsed: null, truncated: false };
|
|
97
99
|
}
|
|
98
100
|
|
|
101
|
+
/**
|
|
102
|
+
* toolInput(문자열화된 JSON)에서 대상 파일 경로 추출.
|
|
103
|
+
* 각 훅 스크립트의 인라인 추출과 동일 우선순위: file_path → notebook_path → path.
|
|
104
|
+
* @param {string} toolInput
|
|
105
|
+
* @returns {string}
|
|
106
|
+
*/
|
|
107
|
+
function extractFilePath(toolInput) {
|
|
108
|
+
try {
|
|
109
|
+
const parsed = JSON.parse(toolInput || '{}');
|
|
110
|
+
return parsed.file_path || parsed.notebook_path || parsed.path || '';
|
|
111
|
+
} catch {
|
|
112
|
+
return '';
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
99
116
|
/**
|
|
100
117
|
* 실행 컨텍스트 구성. 우선순위는 현행 스크립트들과 동일:
|
|
101
118
|
* toolName: payload.tool_name → argvToolName
|
|
@@ -106,7 +123,7 @@ export function buildCtx({ rawInput = null, payload = null, argvToolName = '', a
|
|
|
106
123
|
const toolInput = payload?.tool_input !== undefined && payload?.tool_input !== null
|
|
107
124
|
? (typeof payload.tool_input === 'string' ? payload.tool_input : JSON.stringify(payload.tool_input))
|
|
108
125
|
: (argvToolInput || process.env.TOOL_INPUT || '');
|
|
109
|
-
return { toolName, toolInput, payload, hookInput: rawInput };
|
|
126
|
+
return { toolName, toolInput, payload, hookInput: rawInput, filePath: extractFilePath(toolInput) };
|
|
110
127
|
}
|
|
111
128
|
|
|
112
129
|
/** standalone CLI 모드용 ctx — stdin/argv/env에서 구성 */
|
|
@@ -17,14 +17,13 @@ const CODE_EXT_RE = /\.(ts|tsx|js|jsx|mjs|cjs)$/;
|
|
|
17
17
|
/**
|
|
18
18
|
* in-process 진입점 — console.log 감지만 수행.
|
|
19
19
|
* findings 배열 반환 (디스패처가 수집해 additionalContext에 주입).
|
|
20
|
-
* @param {{
|
|
20
|
+
* @param {{ filePath: string }} ctx
|
|
21
21
|
* @returns {Promise<{ exitCode: number, findings: string[] }>}
|
|
22
22
|
*/
|
|
23
23
|
export async function run(ctx) {
|
|
24
24
|
const findings = [];
|
|
25
25
|
try {
|
|
26
|
-
const
|
|
27
|
-
const filePath = input.file_path || input.path || '';
|
|
26
|
+
const filePath = ctx.filePath;
|
|
28
27
|
|
|
29
28
|
if (filePath && CODE_EXT_RE.test(filePath)) {
|
|
30
29
|
const resolved = path.resolve(filePath);
|
|
@@ -76,7 +76,7 @@ const DISPATCH_RULES = [
|
|
|
76
76
|
{
|
|
77
77
|
pattern: /e2e.*테스트|e2e.*test|playwright|브라우저.*테스트|browser.*test/i,
|
|
78
78
|
script: null,
|
|
79
|
-
echo: '[E2E MODE] Use /vibe.
|
|
79
|
+
echo: '[E2E MODE] Use /vibe.verify --e2e for Playwright-based browser testing. Supports visual regression and video recording.',
|
|
80
80
|
label: 'e2e-echo',
|
|
81
81
|
},
|
|
82
82
|
|
|
@@ -23,6 +23,7 @@ import fs from 'fs';
|
|
|
23
23
|
import path from 'path';
|
|
24
24
|
import { PROJECT_DIR, logHookDecision, projectVibePath, projectVibeRoot } from './utils.js';
|
|
25
25
|
import { buildCliCtx, isDirectRun } from './lib/hook-context.js';
|
|
26
|
+
import { globToRegExp } from './lib/glob.js';
|
|
26
27
|
|
|
27
28
|
const SCOPE_PATH = projectVibePath(PROJECT_DIR, 'scope.json');
|
|
28
29
|
|
|
@@ -45,37 +46,6 @@ function readScope() {
|
|
|
45
46
|
}
|
|
46
47
|
}
|
|
47
48
|
|
|
48
|
-
/**
|
|
49
|
-
* 경량 glob → RegExp 변환.
|
|
50
|
-
* - `**` : 경로 구분자 포함 임의 문자열
|
|
51
|
-
* - `*` : 구분자 제외 임의 문자열
|
|
52
|
-
* - `?` : 구분자 제외 한 글자
|
|
53
|
-
* - 기타 정규식 메타문자는 이스케이프
|
|
54
|
-
*/
|
|
55
|
-
function globToRegExp(glob) {
|
|
56
|
-
const normalized = glob.replace(/\\/g, '/');
|
|
57
|
-
let out = '';
|
|
58
|
-
for (let i = 0; i < normalized.length; i++) {
|
|
59
|
-
const c = normalized[i];
|
|
60
|
-
if (c === '*') {
|
|
61
|
-
if (normalized[i + 1] === '*') {
|
|
62
|
-
out += '.*';
|
|
63
|
-
i++;
|
|
64
|
-
if (normalized[i + 1] === '/') i++; // `**/` → `.*`
|
|
65
|
-
} else {
|
|
66
|
-
out += '[^/]*';
|
|
67
|
-
}
|
|
68
|
-
} else if (c === '?') {
|
|
69
|
-
out += '[^/]';
|
|
70
|
-
} else if ('.+^$()|{}[]\\'.includes(c)) {
|
|
71
|
-
out += '\\' + c;
|
|
72
|
-
} else {
|
|
73
|
-
out += c;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
return new RegExp('^' + out + '$');
|
|
77
|
-
}
|
|
78
|
-
|
|
79
49
|
function matchesAny(relPath, patterns) {
|
|
80
50
|
return patterns.some(p => globToRegExp(p).test(relPath));
|
|
81
51
|
}
|
|
@@ -87,18 +57,9 @@ function toRelative(filePath) {
|
|
|
87
57
|
return rel || path.basename(filePath).replace(/\\/g, '/');
|
|
88
58
|
}
|
|
89
59
|
|
|
90
|
-
function extractFilePath(toolInput) {
|
|
91
|
-
if (!toolInput) return '';
|
|
92
|
-
if (typeof toolInput === 'string') {
|
|
93
|
-
try { return JSON.parse(toolInput).file_path || ''; }
|
|
94
|
-
catch { return toolInput; }
|
|
95
|
-
}
|
|
96
|
-
return typeof toolInput.file_path === 'string' ? toolInput.file_path : '';
|
|
97
|
-
}
|
|
98
|
-
|
|
99
60
|
/**
|
|
100
61
|
* in-process 진입점 — 디스패처가 ctx를 전달해 직접 호출.
|
|
101
|
-
* @param {{ toolName: string, toolInput: string }} ctx
|
|
62
|
+
* @param {{ toolName: string, toolInput: string, filePath: string }} ctx
|
|
102
63
|
* @returns {Promise<number>} exit code (0 = allow/no-op, 2 = block)
|
|
103
64
|
*/
|
|
104
65
|
export async function run(ctx) {
|
|
@@ -108,7 +69,7 @@ export async function run(ctx) {
|
|
|
108
69
|
const toolName = ctx.toolName;
|
|
109
70
|
if (toolName !== 'Edit' && toolName !== 'Write') return 0;
|
|
110
71
|
|
|
111
|
-
const filePath =
|
|
72
|
+
const filePath = ctx.filePath;
|
|
112
73
|
if (!filePath) return 0;
|
|
113
74
|
|
|
114
75
|
const rel = toRelative(filePath);
|