@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
|
@@ -2,14 +2,18 @@
|
|
|
2
2
|
* PostToolUse Hook - Write/Edit 후 코드 품질 검사 + 관찰 자동 캡처
|
|
3
3
|
*
|
|
4
4
|
* findings를 console.log가 아닌 반환값으로 전달 — 디스패처가 수집해 additionalContext에 주입.
|
|
5
|
-
*
|
|
5
|
+
*
|
|
6
|
+
* 범위 (harness-review-2026-07-01 P1-4):
|
|
7
|
+
* 오탐률이 낮은 결정론적 하드룰(any/@ts-ignore, console.log)만 탐지한다.
|
|
8
|
+
* 함수 길이·중첩 깊이·매직 넘버 같은 휴리스틱은 모델이 컨텍스트 안에서 더
|
|
9
|
+
* 정확히 판단하므로 주입하지 않으며, 정규식 발견은 커밋 게이트
|
|
10
|
+
* (run-ledger verifyRequired)를 태우지 않는다 — 그 게이트는 결정론적
|
|
11
|
+
* 검증 흐름(vibe.verify) 전용이다.
|
|
6
12
|
*/
|
|
7
13
|
import { getToolsBaseUrl, PROJECT_DIR, readProjectConfig } from './utils.js';
|
|
8
|
-
import { readFileSync
|
|
14
|
+
import { readFileSync } from 'fs';
|
|
9
15
|
import path from 'path';
|
|
10
|
-
import os from 'os';
|
|
11
16
|
import { buildCliCtx, isDirectRun } from './lib/hook-context.js';
|
|
12
|
-
import { recordVerifyRequired } from './lib/run-ledger.js';
|
|
13
17
|
|
|
14
18
|
const BASE_URL = getToolsBaseUrl();
|
|
15
19
|
|
|
@@ -176,180 +180,22 @@ function detectConsoleLogs(lines, filePath) {
|
|
|
176
180
|
}
|
|
177
181
|
|
|
178
182
|
/**
|
|
179
|
-
*
|
|
180
|
-
* @param {string[]} lines
|
|
181
|
-
* @returns {Array<{ line: number, match: string, severity: 'P2' }>}
|
|
182
|
-
*/
|
|
183
|
-
function detectLongFunctions(lines) {
|
|
184
|
-
const findings = [];
|
|
185
|
-
let fnStart = -1;
|
|
186
|
-
let fnName = '';
|
|
187
|
-
let depth = 0;
|
|
188
|
-
|
|
189
|
-
for (let i = 0; i < lines.length; i++) {
|
|
190
|
-
const line = lines[i];
|
|
191
|
-
const fnMatch = line.match(/(?:function\s+(\w+)|(?:const|let|var)\s+(\w+)\s*=\s*(?:async\s*)?\()/);
|
|
192
|
-
if (fnMatch && depth === 0) {
|
|
193
|
-
fnStart = i;
|
|
194
|
-
fnName = fnMatch[1] || fnMatch[2] || 'anonymous';
|
|
195
|
-
}
|
|
196
|
-
depth += (line.match(/\{/g) || []).length - (line.match(/\}/g) || []).length;
|
|
197
|
-
if (fnStart !== -1 && depth <= 0) {
|
|
198
|
-
const length = i - fnStart + 1;
|
|
199
|
-
if (length > 50) {
|
|
200
|
-
findings.push({
|
|
201
|
-
line: fnStart + 1,
|
|
202
|
-
match: `function '${fnName}' is ${length} lines`,
|
|
203
|
-
severity: 'P2',
|
|
204
|
-
suggestion: `Extract lines ${fnStart + 20}–${i + 1} into a separate helper function`,
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
fnStart = -1;
|
|
208
|
-
depth = 0;
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
return findings;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
/**
|
|
215
|
-
* P2: 중첩 깊이 초과 탐지.
|
|
216
|
-
* @param {string[]} lines
|
|
217
|
-
* @returns {Array<{ line: number, match: string, severity: 'P2' }>}
|
|
218
|
-
*/
|
|
219
|
-
function detectDeepNesting(lines) {
|
|
220
|
-
const findings = [];
|
|
221
|
-
let depth = 0;
|
|
222
|
-
let reported = false;
|
|
223
|
-
|
|
224
|
-
lines.forEach((line, i) => {
|
|
225
|
-
depth += (line.match(/\{/g) || []).length - (line.match(/\}/g) || []).length;
|
|
226
|
-
if (depth > 3 && !reported) {
|
|
227
|
-
findings.push({
|
|
228
|
-
line: i + 1,
|
|
229
|
-
match: `nesting depth ${depth} at line ${i + 1}`,
|
|
230
|
-
severity: 'P2',
|
|
231
|
-
suggestion: 'Use early return pattern: if (!condition) return; — instead of wrapping in else',
|
|
232
|
-
});
|
|
233
|
-
reported = true;
|
|
234
|
-
}
|
|
235
|
-
if (depth <= 3) reported = false;
|
|
236
|
-
});
|
|
237
|
-
return findings;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
// magic number 무시 값 목록 (0, 1, -1, 2, 10, 100, 1000)
|
|
241
|
-
const MAGIC_NUMBER_IGNORE = new Set(['10', '100', '1000']);
|
|
242
|
-
|
|
243
|
-
/**
|
|
244
|
-
* advisory: 매직 넘버 탐지 (P3, 스팸 방지 적용).
|
|
245
|
-
* 무시 조건: 0/1/-1/2 (단일 digit), ALLCAPS const 선언, 테스트 파일, 배열 인덱스
|
|
246
|
-
* @param {string[]} lines
|
|
247
|
-
* @param {string} filePath
|
|
248
|
-
* @returns {Array<{ line: number, match: string, severity: 'P3' }>}
|
|
249
|
-
*/
|
|
250
|
-
function detectMagicNumbers(lines, filePath) {
|
|
251
|
-
// 테스트 파일은 스킵
|
|
252
|
-
if (/\.(test|spec)\.[jt]sx?$/.test(filePath) || /\/__tests__\//.test(filePath)) {
|
|
253
|
-
return [];
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
const findings = [];
|
|
257
|
-
lines.forEach((line, i) => {
|
|
258
|
-
// ALL_CAPS const 선언 줄은 스킵 (예: const LIMIT = 500)
|
|
259
|
-
if (/^\s*(?:export\s+)?const\s+[A-Z][A-Z0-9_]+\s*=/.test(line)) return;
|
|
260
|
-
|
|
261
|
-
const stripped = line.replace(/\/\/.*$/, '').replace(/(['"`]).*?\1/g, '""');
|
|
262
|
-
const nums = (stripped.match(/\b\d{2,}\b/g) || []).filter(n => MAGIC_NUMBER_IGNORE.has(n));
|
|
263
|
-
// 배열 인덱스: [NN] 패턴 제외
|
|
264
|
-
const nonIndexNums = (stripped.match(/\b\d{2,}\b/g) || []).filter(n => {
|
|
265
|
-
if (MAGIC_NUMBER_IGNORE.has(n)) return false;
|
|
266
|
-
// 배열 인덱스 [NN] 체크
|
|
267
|
-
const idx = stripped.indexOf(n);
|
|
268
|
-
if (idx > 0 && stripped[idx - 1] === '[') return false;
|
|
269
|
-
return true;
|
|
270
|
-
});
|
|
271
|
-
|
|
272
|
-
if (nonIndexNums.length > 0) {
|
|
273
|
-
findings.push({
|
|
274
|
-
line: i + 1,
|
|
275
|
-
match: `magic number(s): ${nonIndexNums.join(', ')}`,
|
|
276
|
-
severity: 'P3',
|
|
277
|
-
suggestion: `Extract to named constant: const LIMIT = ${nonIndexNums[0]};`,
|
|
278
|
-
});
|
|
279
|
-
}
|
|
280
|
-
});
|
|
281
|
-
return findings;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
// ─── Failure Escalation Tracking ───
|
|
285
|
-
|
|
286
|
-
const ESCALATION_THRESHOLD = 3;
|
|
287
|
-
const ESCALATION_FILE = path.join(os.homedir(), '.vibe', 'failure-tracker.json');
|
|
288
|
-
|
|
289
|
-
function loadFailureTracker() {
|
|
290
|
-
try {
|
|
291
|
-
if (existsSync(ESCALATION_FILE)) {
|
|
292
|
-
return JSON.parse(readFileSync(ESCALATION_FILE, 'utf8'));
|
|
293
|
-
}
|
|
294
|
-
} catch { /* ignore */ }
|
|
295
|
-
return {};
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
function saveFailureTracker(tracker) {
|
|
299
|
-
try {
|
|
300
|
-
writeFileSync(ESCALATION_FILE, JSON.stringify(tracker));
|
|
301
|
-
} catch { /* ignore */ }
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
/**
|
|
305
|
-
* 실패 추적 — 동일 파일에 P1 이슈가 반복되면 에스컬레이션 메시지 반환.
|
|
183
|
+
* 하드룰 탐지기 실행. findings 배열 반환.
|
|
306
184
|
* @param {string} filePath
|
|
307
|
-
* @
|
|
308
|
-
* @returns {string|null} 에스컬레이션 메시지 (없으면 null)
|
|
309
|
-
*/
|
|
310
|
-
function trackFailure(filePath, issues) {
|
|
311
|
-
const tracker = loadFailureTracker();
|
|
312
|
-
const key = filePath;
|
|
313
|
-
const entry = tracker[key] || { count: 0, issues: [] };
|
|
314
|
-
entry.count += 1;
|
|
315
|
-
entry.issues = issues.slice(0, 3);
|
|
316
|
-
entry.lastSeen = new Date().toISOString();
|
|
317
|
-
tracker[key] = entry;
|
|
318
|
-
saveFailureTracker(tracker);
|
|
319
|
-
|
|
320
|
-
if (entry.count >= ESCALATION_THRESHOLD) {
|
|
321
|
-
const msg = `[ESCALATION] ${path.basename(filePath)}: 동일 이슈 ${entry.count}회 반복 — 수동 개입 필요`;
|
|
322
|
-
entry.count = 0;
|
|
323
|
-
saveFailureTracker(tracker);
|
|
324
|
-
return msg;
|
|
325
|
-
}
|
|
326
|
-
return null;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
function clearFailure(filePath) {
|
|
330
|
-
const tracker = loadFailureTracker();
|
|
331
|
-
delete tracker[filePath];
|
|
332
|
-
saveFailureTracker(tracker);
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
/**
|
|
336
|
-
* 모든 self-heal 탐지기 실행. findings 배열 반환.
|
|
337
|
-
* @param {string} filePath
|
|
338
|
-
* @returns {{ p1: string[], advisory: string[], escalation: string|null }}
|
|
185
|
+
* @returns {{ p1: string[] }}
|
|
339
186
|
*/
|
|
340
187
|
function runDetectors(filePath) {
|
|
341
188
|
let content;
|
|
342
189
|
try {
|
|
343
190
|
content = readFileSync(filePath, 'utf-8');
|
|
344
191
|
} catch {
|
|
345
|
-
return { p1: []
|
|
192
|
+
return { p1: [] };
|
|
346
193
|
}
|
|
347
194
|
|
|
348
195
|
const lines = content.split('\n');
|
|
349
196
|
const isTs = TS_EXT_RE.test(filePath);
|
|
350
197
|
|
|
351
198
|
const p1Findings = [];
|
|
352
|
-
const advisoryFindings = [];
|
|
353
199
|
|
|
354
200
|
// P1: any 탐지 — TS 파일만
|
|
355
201
|
if (isTs) {
|
|
@@ -365,32 +211,7 @@ function runDetectors(filePath) {
|
|
|
365
211
|
p1Findings.push(`P1 console.log line ${f.line}: ${f.match.substring(0, 60)}`);
|
|
366
212
|
}
|
|
367
213
|
|
|
368
|
-
|
|
369
|
-
const fnHits = detectLongFunctions(lines).slice(0, 1);
|
|
370
|
-
for (const f of fnHits) {
|
|
371
|
-
advisoryFindings.push(`P2 ${f.match}`);
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
// P2: 중첩 깊이
|
|
375
|
-
const nestHits = detectDeepNesting(lines).slice(0, 1);
|
|
376
|
-
for (const f of nestHits) {
|
|
377
|
-
advisoryFindings.push(`P2 ${f.match}`);
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
// P3: 매직 넘버 (advisory, 스팸 방지)
|
|
381
|
-
const magicHits = detectMagicNumbers(lines, filePath).slice(0, 1);
|
|
382
|
-
for (const f of magicHits) {
|
|
383
|
-
advisoryFindings.push(`P3 ${f.match}`);
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
let escalation = null;
|
|
387
|
-
if (p1Findings.length > 0) {
|
|
388
|
-
escalation = trackFailure(filePath, p1Findings);
|
|
389
|
-
} else {
|
|
390
|
-
clearFailure(filePath);
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
return { p1: p1Findings, advisory: advisoryFindings, escalation };
|
|
214
|
+
return { p1: p1Findings };
|
|
394
215
|
}
|
|
395
216
|
|
|
396
217
|
/**
|
|
@@ -404,20 +225,12 @@ export async function run(ctx) {
|
|
|
404
225
|
const files = getModifiedFiles(ctx);
|
|
405
226
|
if (files.length === 0) return { exitCode: 0, findings };
|
|
406
227
|
|
|
407
|
-
// 1.
|
|
228
|
+
// 1. 하드룰 탐지기 실행 (changed file only) — additionalContext 주입만.
|
|
229
|
+
// 커밋 게이트(verifyRequired)는 태우지 않는다: 정규식 오탐 하나가
|
|
230
|
+
// auto-commit을 차단하는 결합은 제거됨 (harness-review-2026-07-01).
|
|
408
231
|
try {
|
|
409
|
-
const { p1
|
|
410
|
-
|
|
232
|
+
const { p1 } = runDetectors(files[0]);
|
|
411
233
|
for (const msg of p1) findings.push(msg);
|
|
412
|
-
for (const msg of advisory) findings.push(msg);
|
|
413
|
-
if (escalation) findings.push(escalation);
|
|
414
|
-
|
|
415
|
-
// P1 이슈 → run-ledger에 verifyRequired 기록
|
|
416
|
-
if (p1.length > 0) {
|
|
417
|
-
try {
|
|
418
|
-
recordVerifyRequired(PROJECT_DIR, p1[0]);
|
|
419
|
-
} catch { /* fail-open */ }
|
|
420
|
-
}
|
|
421
234
|
} catch {
|
|
422
235
|
// 탐지기 실패 → fail-open, 계속 진행
|
|
423
236
|
}
|
|
@@ -162,17 +162,6 @@ async function main() {
|
|
|
162
162
|
// Mark this urgency level as recently saved
|
|
163
163
|
setDebounceLock(urgency);
|
|
164
164
|
|
|
165
|
-
// Sync TokenBudgetTracker with current context usage
|
|
166
|
-
try {
|
|
167
|
-
const { TokenBudgetTracker } = await import(`${LIB_URL}TokenBudgetTracker.js`);
|
|
168
|
-
const tracker = TokenBudgetTracker.getInstance(PROJECT_DIR);
|
|
169
|
-
const numPercent = Number(percent);
|
|
170
|
-
if (!isNaN(numPercent)) {
|
|
171
|
-
tracker.syncToPercent(numPercent);
|
|
172
|
-
}
|
|
173
|
-
} catch {
|
|
174
|
-
// TokenBudgetTracker sync is non-critical
|
|
175
|
-
}
|
|
176
165
|
} catch {
|
|
177
166
|
// 무시
|
|
178
167
|
}
|
|
@@ -28,10 +28,13 @@ function isRecentlyModified(file) {
|
|
|
28
28
|
/**
|
|
29
29
|
* scope-guard auto-derive 활성 여부.
|
|
30
30
|
*
|
|
31
|
-
* 기본값은 **
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
31
|
+
* 기본값은 **off** — `.vibe/config.json` 의 `scopeGuard.enabled = true` 로
|
|
32
|
+
* 명시적 opt-in 했을 때만 SPEC → scope.json 자동 합성을 실행한다.
|
|
33
|
+
* (자동 ON 은 SPEC 외 편집에 노이즈 경고 회귀를 유발해 CLI 쪽에서 이미
|
|
34
|
+
* 기본 off 로 수정됐다. 이 훅이 기본 on 으로 남아 init/update 와
|
|
35
|
+
* SessionStart 가 서로 다른 scope 상태를 만들던 불일치를 통일 —
|
|
36
|
+
* harness-review-2026-07-01 P1-6. SSOT: src/cli/utils.ts `isScopeGuardOptedIn`
|
|
37
|
+
* 과 반드시 같은 기본값 유지.)
|
|
35
38
|
*
|
|
36
39
|
* 이미 `auto: false` scope.json 을 직접 만들어 둔 사용자는 영향 없음 — scope-guard.js
|
|
37
40
|
* 자체는 scope.json 존재 여부만 본다.
|
|
@@ -45,10 +48,10 @@ export function isScopeGuardEnabled(projectDir) {
|
|
|
45
48
|
for (const p of candidates) {
|
|
46
49
|
if (!fs.existsSync(p)) continue;
|
|
47
50
|
const cfg = JSON.parse(fs.readFileSync(p, 'utf-8'));
|
|
48
|
-
if (cfg && cfg.scopeGuard && cfg.scopeGuard.enabled ===
|
|
51
|
+
if (cfg && cfg.scopeGuard && cfg.scopeGuard.enabled === true) return true;
|
|
49
52
|
}
|
|
50
53
|
} catch { /* ignore */ }
|
|
51
|
-
return
|
|
54
|
+
return false;
|
|
52
55
|
}
|
|
53
56
|
|
|
54
57
|
/**
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* 실행 step (모두 비차단, config.hooks.{name}.enabled로 개별 토글):
|
|
10
10
|
* auto-format — 코드 스타일 정규화 (변경 시 finding 반환)
|
|
11
|
-
* code-check —
|
|
11
|
+
* code-check — 하드룰(any/console.log) 탐지 (additionalContext 주입만, 커밋 게이트 미연동)
|
|
12
12
|
* auto-test — 관련 테스트 실행 (debounce 지원)
|
|
13
13
|
* post-edit — console.log 감지
|
|
14
14
|
*
|
|
@@ -69,21 +69,9 @@ if (/^\s*\/vibe\b/i.test(prompt)) {
|
|
|
69
69
|
|
|
70
70
|
// 패턴 → 실행할 스크립트 매핑
|
|
71
71
|
// 각 항목: { pattern, script, args, label }
|
|
72
|
+
// (참고: 매직 키워드 배너 주입(keyword-detector)은 제거됨 — deprecated 별칭
|
|
73
|
+
// 매핑은 CLAUDE.md 의 "Deprecated aliases" 표가 SSOT이며 모델이 직접 해석한다.)
|
|
72
74
|
const DISPATCH_RULES = [
|
|
73
|
-
// 항상 실행 (경량 스크립트)
|
|
74
|
-
{
|
|
75
|
-
pattern: null, // always
|
|
76
|
-
script: 'keyword-detector.js',
|
|
77
|
-
args: [prompt],
|
|
78
|
-
label: 'keyword',
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
// 패턴 매칭이 필요한 스크립트
|
|
82
|
-
{
|
|
83
|
-
pattern: /ultrawork|ulw|울트라워크|ralph|ralplan/i,
|
|
84
|
-
script: null, // keyword-detector가 이미 처리
|
|
85
|
-
label: 'skip',
|
|
86
|
-
},
|
|
87
75
|
// echo 전용 (stdout으로 직접 출력)
|
|
88
76
|
{
|
|
89
77
|
pattern: /e2e.*테스트|e2e.*test|playwright|브라우저.*테스트|browser.*test/i,
|
|
@@ -176,7 +164,7 @@ for (const rule of DISPATCH_RULES) {
|
|
|
176
164
|
// 외부 LLM 호출(llm-orchestrate)은 부모/자식 timeout 을 정합시킨다 (B-2):
|
|
177
165
|
// 자식은 hook 모드(primary 45s, fallback 없음, retry 없음)로 단일 시도 후 스스로
|
|
178
166
|
// 정리하고, 부모는 그보다 약간 긴 50s 로 감싸 hard-kill 을 피한다.
|
|
179
|
-
// 경량
|
|
167
|
+
// 경량 스크립트는 기존 30s 유지.
|
|
180
168
|
const isLlm = rule.script === 'llm-orchestrate.js';
|
|
181
169
|
const execTimeout = isLlm ? 50000 : 30000;
|
|
182
170
|
const childEnv = isLlm
|
|
@@ -207,7 +195,6 @@ await Promise.all(execPromises);
|
|
|
207
195
|
|
|
208
196
|
// Evolution: Gap detection — log unmatched prompts for skill gap analysis
|
|
209
197
|
const matched = DISPATCH_RULES.some(r =>
|
|
210
|
-
r.label !== 'skip' && r.label !== 'keyword' &&
|
|
211
198
|
r.pattern !== null && r.pattern.test(prompt) &&
|
|
212
199
|
(r.script || r.echo)
|
|
213
200
|
);
|
|
@@ -218,12 +205,14 @@ if (!matched) {
|
|
|
218
205
|
const utils = await import('./utils.js');
|
|
219
206
|
const projectDir = process.env.CLAUDE_PROJECT_DIR || '.';
|
|
220
207
|
const configPath = utils.projectVibePath(projectDir, 'config.json');
|
|
221
|
-
|
|
208
|
+
// Evolution 은 동결(opt-in) — evolution.enabled === true 로 명시했을 때만
|
|
209
|
+
// gap 로깅을 수행한다 (기본 OFF, P3-3).
|
|
210
|
+
let gapEnabled = false;
|
|
222
211
|
try {
|
|
223
212
|
const fs = await import('fs');
|
|
224
213
|
if (fs.existsSync(configPath)) {
|
|
225
214
|
const config = JSON.parse(fs.readFileSync(configPath, 'utf8'));
|
|
226
|
-
gapEnabled = config.evolution?.
|
|
215
|
+
gapEnabled = config.evolution?.enabled === true && config.evolution?.gapDetection !== false;
|
|
227
216
|
}
|
|
228
217
|
} catch { /* ignore */ }
|
|
229
218
|
|
|
@@ -86,16 +86,29 @@ async function main() {
|
|
|
86
86
|
import(`${BASE_URL}time/index.js`),
|
|
87
87
|
]);
|
|
88
88
|
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
// 인덱스만 주입 (harness-review-2026-07-01 P1-5):
|
|
90
|
+
// 이전에는 startSession 전체 요약(git log·테스트 상태·관찰·리플렉션·RAG
|
|
91
|
+
// goals/constraints/decisions)을 매 세션 덤프했다. 이제는 1줄 인덱스만
|
|
92
|
+
// 주입하고, 전체 컨텍스트 복원은 명시적 `/vibe.utils --continue` 전용.
|
|
93
|
+
const [time, memories, latestVersion] = await Promise.all([
|
|
91
94
|
timeModule.getCurrentTime({ format: 'human', timezone: 'Asia/Seoul' }),
|
|
92
95
|
memoryModule.listMemories({ limit: 5, projectPath: PROJECT_DIR }),
|
|
93
96
|
getLatestVersionCached(),
|
|
94
97
|
]);
|
|
95
98
|
|
|
96
|
-
console.log(
|
|
97
|
-
|
|
98
|
-
|
|
99
|
+
console.log(time.content[0].text);
|
|
100
|
+
|
|
101
|
+
// Active feature 1줄 인덱스
|
|
102
|
+
try {
|
|
103
|
+
const LIB_BASE_P = (await import('./utils.js')).getLibBaseUrl();
|
|
104
|
+
const iterMod = await import(`${LIB_BASE_P}IterationTracker.js`);
|
|
105
|
+
const progressLine = iterMod.getProgressSummary(PROJECT_DIR);
|
|
106
|
+
if (progressLine) {
|
|
107
|
+
console.log(`\n📋 ${progressLine} — resume full context: /vibe.utils --continue`);
|
|
108
|
+
}
|
|
109
|
+
} catch { /* progress index is best-effort */ }
|
|
110
|
+
|
|
111
|
+
console.log('\n[Memory Index — bodies on demand via recall_memory]');
|
|
99
112
|
console.log(memories.content[0].text);
|
|
100
113
|
|
|
101
114
|
// Phase 3 — Recipes + anti-patterns 인덱스 (post-task curation)
|
|
@@ -126,16 +139,17 @@ async function main() {
|
|
|
126
139
|
}
|
|
127
140
|
}
|
|
128
141
|
|
|
129
|
-
// Scope sync — 기본
|
|
142
|
+
// Scope sync — 기본 OFF (opt-in: scopeGuard.enabled=true). SSOT: scope-from-spec.js.
|
|
130
143
|
try {
|
|
131
144
|
const { syncScopeFile, isScopeGuardEnabled } = await import('./lib/scope-from-spec.js');
|
|
132
|
-
|
|
145
|
+
const guardOn = isScopeGuardEnabled(PROJECT_DIR);
|
|
146
|
+
if (guardOn) {
|
|
133
147
|
const result = syncScopeFile(PROJECT_DIR);
|
|
134
148
|
if (result.action === 'created' || result.action === 'updated' || result.action === 'removed') {
|
|
135
149
|
console.log(`\n🚧 Scope ${result.action} from active SPECs (${path.relative(PROJECT_DIR, path.join(projectVibeRoot(PROJECT_DIR), 'scope.json'))})`);
|
|
136
150
|
}
|
|
137
151
|
}
|
|
138
|
-
// scope 상태 1줄 알림 —
|
|
152
|
+
// scope 상태 1줄 알림 — 활성 scope.json 이 있을 때만 (opt-out 사용자에게 노이즈 금지)
|
|
139
153
|
const scopeJsonPath = path.join(projectVibeRoot(PROJECT_DIR), 'scope.json');
|
|
140
154
|
if (fs.existsSync(scopeJsonPath)) {
|
|
141
155
|
try {
|
|
@@ -144,7 +158,7 @@ async function main() {
|
|
|
144
158
|
const modeLabel = scopeData.mode || 'warn';
|
|
145
159
|
console.log(`\nscope-guard: ${featureLabel} (${modeLabel})`);
|
|
146
160
|
} catch { /* ignore */ }
|
|
147
|
-
} else {
|
|
161
|
+
} else if (guardOn) {
|
|
148
162
|
console.log('\nscope-guard: no active scope (no active SPEC or no derivable paths) — out-of-scope edits are not monitored');
|
|
149
163
|
}
|
|
150
164
|
} catch { /* scope sync is best-effort */ }
|
|
@@ -198,32 +212,8 @@ async function main() {
|
|
|
198
212
|
storageA.close();
|
|
199
213
|
} catch { /* autonomy not yet initialized, skip */ }
|
|
200
214
|
|
|
201
|
-
// Evolution
|
|
202
|
-
|
|
203
|
-
const LIB_BASE = (await import('./utils.js')).getLibBaseUrl();
|
|
204
|
-
const [memMod, regMod, insMod] = await Promise.all([
|
|
205
|
-
import(`${LIB_BASE}memory/MemoryStorage.js`),
|
|
206
|
-
import(`${LIB_BASE}evolution/GenerationRegistry.js`),
|
|
207
|
-
import(`${LIB_BASE}evolution/InsightStore.js`),
|
|
208
|
-
]);
|
|
209
|
-
const storage = new memMod.MemoryStorage(PROJECT_DIR);
|
|
210
|
-
const registry = new regMod.GenerationRegistry(storage);
|
|
211
|
-
const insightStore = new insMod.InsightStore(storage);
|
|
212
|
-
|
|
213
|
-
const genStats = registry.getStats();
|
|
214
|
-
const active = genStats.byStatus?.active || 0;
|
|
215
|
-
const drafts = genStats.byStatus?.draft || 0;
|
|
216
|
-
const gaps = insightStore.getByType('skill_gap').length;
|
|
217
|
-
|
|
218
|
-
if (active > 0 || drafts > 0 || gaps > 0) {
|
|
219
|
-
const parts = [];
|
|
220
|
-
if (active > 0) parts.push(`${active} active skills`);
|
|
221
|
-
if (drafts > 0) parts.push(`${drafts} pending approval`);
|
|
222
|
-
if (gaps > 0) parts.push(`${gaps} gaps detected`);
|
|
223
|
-
console.log(`\n🧬 Evolution: ${parts.join(', ')}`);
|
|
224
|
-
}
|
|
225
|
-
storage.close();
|
|
226
|
-
} catch { /* evolution not yet initialized, skip */ }
|
|
215
|
+
// Evolution 상태 요약은 제거 — evolution 은 동결(opt-in) 상태이며
|
|
216
|
+
// 사용자는 `vibe evolution` CLI 로 명시적으로 조회한다 (P3-3).
|
|
227
217
|
} catch (e) {
|
|
228
218
|
console.log('[Session] Error:', e.message);
|
|
229
219
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@su-record/vibe",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "AI Coding Framework for Claude Code —
|
|
3
|
+
"version": "3.1.0",
|
|
4
|
+
"description": "AI Coding Framework for Claude Code — 10+ agents, 59 skills, multi-LLM orchestration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/cli/index.js",
|
|
7
7
|
"exports": {
|
|
@@ -9,11 +9,9 @@
|
|
|
9
9
|
"./tools": "./dist/tools/index.js",
|
|
10
10
|
"./tools/memory": "./dist/tools/memory/index.js",
|
|
11
11
|
"./tools/convention": "./dist/tools/convention/index.js",
|
|
12
|
-
"./tools/semantic": "./dist/tools/semantic/index.js",
|
|
13
12
|
"./tools/ui": "./dist/tools/ui/index.js",
|
|
14
13
|
"./tools/time": "./dist/tools/time/index.js",
|
|
15
14
|
"./tools/interaction": "./dist/tools/interaction/index.js",
|
|
16
|
-
"./orchestrator": "./dist/infra/orchestrator/index.js",
|
|
17
15
|
"./memory": {
|
|
18
16
|
"types": "./dist/infra/lib/memory/index.d.ts",
|
|
19
17
|
"default": "./dist/infra/lib/memory/index.js"
|
|
@@ -35,7 +33,7 @@
|
|
|
35
33
|
"test:watch": "vitest",
|
|
36
34
|
"prepublishOnly": "pnpm build",
|
|
37
35
|
"postinstall": "node -e \"import('./dist/cli/postinstall/main.js').then(m=>m.main()).catch(()=>{})\"",
|
|
38
|
-
"release": "pnpm version patch &&
|
|
36
|
+
"release": "pnpm version patch && git push origin main --follow-tags"
|
|
39
37
|
},
|
|
40
38
|
"keywords": [
|
|
41
39
|
"ai",
|
|
@@ -60,6 +58,9 @@
|
|
|
60
58
|
"type": "git",
|
|
61
59
|
"url": "git+https://github.com/su-record/vibe.git"
|
|
62
60
|
},
|
|
61
|
+
"bugs": {
|
|
62
|
+
"url": "https://github.com/su-record/vibe/issues"
|
|
63
|
+
},
|
|
63
64
|
"homepage": "https://github.com/su-record/vibe#readme",
|
|
64
65
|
"publishConfig": {
|
|
65
66
|
"access": "public"
|
|
@@ -3,20 +3,29 @@ name: agents-md
|
|
|
3
3
|
user-invocable: false
|
|
4
4
|
invocation: [auto, chain]
|
|
5
5
|
tier: standard
|
|
6
|
-
description: "
|
|
7
|
-
triggers: [agents.md, claude.md, context file, optimize agents, optimize claude]
|
|
6
|
+
description: "Author and optimize AGENTS.md / CLAUDE.md (same doctrine, different filenames): write new context files from scratch, or strip discoverable info and keep only gotchas. Based on Addy Osmani's AGENTS.md principles + Curse of Instructions research. Activates on agents.md, claude.md, context file authoring/optimization."
|
|
7
|
+
triggers: [agents.md, claude.md, context file, optimize agents, optimize claude, write claude.md, create claude.md, project instructions]
|
|
8
8
|
priority: 50
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
# agents-md — Context File Optimizer
|
|
11
|
+
# agents-md — Context File Author & Optimizer
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Author and optimize AGENTS.md / CLAUDE.md files. They are the **same doctrine
|
|
14
|
+
under different filenames** — everything below applies to both.
|
|
14
15
|
Reference: https://addyosmani.com/blog/agents-md/
|
|
15
16
|
|
|
16
|
-
## Core
|
|
17
|
+
## Core Principles
|
|
17
18
|
|
|
18
19
|
**One-line test**: "Can the agent discover this by reading the code?" → Yes = delete.
|
|
19
20
|
|
|
21
|
+
**Every line has a cost** (Curse of Instructions): LLM compliance drops
|
|
22
|
+
exponentially with instruction count — roughly 90% at 1 instruction, ~59% at 5,
|
|
23
|
+
~44% at 10, ~15% at 15+. A short, precise file beats a long, comprehensive one.
|
|
24
|
+
|
|
25
|
+
**Lost in the Middle**: LLMs attend to the beginning and end of a document and
|
|
26
|
+
under-weight the middle. Most important rules → top. Frequently violated rules
|
|
27
|
+
→ bottom. Background context → middle (OK if ignored).
|
|
28
|
+
|
|
20
29
|
## Step 1: Find Target Files
|
|
21
30
|
|
|
22
31
|
Search project root for these files:
|
|
@@ -29,7 +38,32 @@ Glob: pattern=".github/copilot-instructions.md"
|
|
|
29
38
|
Glob: pattern=".windsurfrules"
|
|
30
39
|
```
|
|
31
40
|
|
|
32
|
-
If
|
|
41
|
+
If a target exists → optimize it (Steps 2–3). If none exists and the user wants
|
|
42
|
+
one → author it (Step 1b), then run the same optimization pass on the draft.
|
|
43
|
+
|
|
44
|
+
## Step 1b: Authoring From Scratch
|
|
45
|
+
|
|
46
|
+
Explore before writing: `package.json` (stack, scripts), `*.config.*`,
|
|
47
|
+
`tsconfig.json`, `.env.example`, `Makefile`, `docker-compose.*`. Everything
|
|
48
|
+
found this way is **discoverable — leave it out**.
|
|
49
|
+
|
|
50
|
+
Then interview for what exploration cannot reveal (one question at a time,
|
|
51
|
+
multiple-choice when possible):
|
|
52
|
+
|
|
53
|
+
1. **Runtime traps** — differences invisible in code (Bun vs Node, ESM vs CJS)
|
|
54
|
+
2. **Forbidden patterns** — libraries/approaches that burned the team before
|
|
55
|
+
3. **Non-standard conventions** — naming/structure rules that differ from defaults
|
|
56
|
+
4. **Architecture decisions** — business context the code can't explain
|
|
57
|
+
5. **Boundaries** — files never to touch, changes requiring approval first
|
|
58
|
+
|
|
59
|
+
Draft using `templates/claude-md.md`. Keep per-feature detail out — that
|
|
60
|
+
belongs in SPEC files (`.vibe/specs/`), loaded only when relevant, not in the
|
|
61
|
+
always-loaded context file. For large monorepos: one shared root file plus a
|
|
62
|
+
small per-package file, instead of one giant root.
|
|
63
|
+
|
|
64
|
+
Don't aim for perfect on day one: start minimal (30–50 lines), observe where
|
|
65
|
+
the agent actually errs, add one line per *recurring* mistake. If the root
|
|
66
|
+
cause is code structure, fix the code instead of adding a rule.
|
|
33
67
|
|
|
34
68
|
## Step 2: Classify Current Content
|
|
35
69
|
|
|
@@ -48,6 +82,7 @@ Information the agent can find by exploring the code:
|
|
|
48
82
|
| API endpoint lists | "POST /api/users" | Router code |
|
|
49
83
|
| Feature descriptions | "Phase 3 implements circuit breaker" | Readable from the code itself |
|
|
50
84
|
| Architecture diagrams | ASCII box diagrams | Conceptual only, no mistake prevention |
|
|
85
|
+
| Code style rules | Indentation, semicolons | Linter/formatter enforces them |
|
|
51
86
|
|
|
52
87
|
### Keep (Non-discoverable)
|
|
53
88
|
|
|
@@ -67,7 +102,13 @@ Traps and rules the agent cannot know from code alone:
|
|
|
67
102
|
|
|
68
103
|
### Anchoring Warning
|
|
69
104
|
|
|
70
|
-
Mentioning a technology name anchors the agent toward it. "Don't use X" is
|
|
105
|
+
Mentioning a technology name anchors the agent toward it. "Don't use X" is
|
|
106
|
+
useful, but "We use X" is unnecessary if already visible in code.
|
|
107
|
+
|
|
108
|
+
### Emphasis Budget
|
|
109
|
+
|
|
110
|
+
`**IMPORTANT**` / `**MUST**` / `**NEVER**` work only while rare. Reserve them
|
|
111
|
+
for P1 rules; emphasis on every line nullifies all of it.
|
|
71
112
|
|
|
72
113
|
## Step 3: Restructure
|
|
73
114
|
|
|
@@ -92,17 +133,15 @@ Rules:
|
|
|
92
133
|
- Maximum 3 sections (Intro, Gotchas, Naming)
|
|
93
134
|
- Each gotcha has **bold title + specific do/don't**
|
|
94
135
|
- "Don't use X" is more useful than "We use X"
|
|
95
|
-
- Target under 50 lines total
|
|
136
|
+
- Target under 50 lines total; 60–150 acceptable for complex projects; at 300+ the agent ignores half of it
|
|
137
|
+
- Don't inline everything — Claude Code follows `@docs/FILE.md` references and loads them on demand (progressive disclosure)
|
|
96
138
|
|
|
97
139
|
## Step 4: CLAUDE.md Separation (if applicable)
|
|
98
140
|
|
|
99
|
-
If
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
Put common rules in AGENTS.md. Claude Code reads both.
|
|
141
|
+
If both files exist, put common rules in AGENTS.md and keep only
|
|
142
|
+
Claude-specific directives (e.g., "Always respond in Korean") in CLAUDE.md.
|
|
143
|
+
Claude Code reads both. If only one file exists, it carries everything —
|
|
144
|
+
same content rules apply.
|
|
106
145
|
|
|
107
146
|
## Step 5: Report Results
|
|
108
147
|
|
|
@@ -121,3 +160,11 @@ Put common rules in AGENTS.md. Claude Code reads both.
|
|
|
121
160
|
### Kept/Added Items
|
|
122
161
|
- {Item}: {Reason for keeping}
|
|
123
162
|
```
|
|
163
|
+
|
|
164
|
+
## Maintenance Signals
|
|
165
|
+
|
|
166
|
+
| Signal | Meaning | Response |
|
|
167
|
+
|--------|---------|----------|
|
|
168
|
+
| Over 300 lines | Information overload | Split or trim |
|
|
169
|
+
| Same mistake repeats | Rule is lost in noise | Emphasize or consolidate |
|
|
170
|
+
| Adding rules has no effect | File is too long | Fix root cause |
|
|
@@ -180,4 +180,4 @@ The test generator reads this file and adds custom rules to the test suite.
|
|
|
180
180
|
- `vibe init` → auto-detect and generate initial arch-guard tests
|
|
181
181
|
- `vibe update` → refresh rules if directory structure changed
|
|
182
182
|
- Pre-commit hook → run arch-guard tests before commit
|
|
183
|
-
- `vibe.review` (skill) →
|
|
183
|
+
- `vibe.review` (skill) → code-reviewer (focus: architecture) checks against arch-rules.json
|
|
@@ -3,8 +3,8 @@ name: brand-assets
|
|
|
3
3
|
invocation: [auto]
|
|
4
4
|
tier: standard
|
|
5
5
|
description: "Auto-generate app icons (iOS/Android/PWA), favicons, and OG images from SPEC brand information using the Antigravity image backend. Use when the project needs visual brand assets, when user mentions 'icon', 'favicon', 'logo', or 'brand assets', or when a SPEC defines brand colors/identity but no assets exist yet. Outputs multiple sizes and formats ready for deployment. Not for complex illustration or marketing graphics — focused on app identity assets."
|
|
6
|
-
triggers: [
|
|
7
|
-
priority:
|
|
6
|
+
triggers: [favicon, logo, app icon, brand assets, branding, og image]
|
|
7
|
+
priority: 60
|
|
8
8
|
---
|
|
9
9
|
# Brand Assets Generation Skill
|
|
10
10
|
|