@su-record/vibe 2.7.18 → 2.7.20
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/.env.example +37 -37
- package/CLAUDE.md +153 -153
- package/LICENSE +21 -21
- package/README.md +451 -449
- package/agents/architect-low.md +41 -41
- package/agents/architect-medium.md +59 -59
- package/agents/architect.md +80 -80
- package/agents/build-error-resolver.md +115 -115
- package/agents/compounder.md +261 -261
- package/agents/diagrammer.md +178 -178
- package/agents/docs/api-documenter.md +99 -99
- package/agents/docs/changelog-writer.md +93 -93
- package/agents/e2e-tester.md +294 -294
- package/agents/event/event-comms.md +78 -0
- package/agents/event/event-content.md +68 -0
- package/agents/event/event-image.md +95 -0
- package/agents/event/event-ops.md +84 -0
- package/agents/event/event-scheduler.md +69 -0
- package/agents/event/event-speaker.md +86 -0
- package/agents/explorer-low.md +42 -42
- package/agents/explorer-medium.md +59 -59
- package/agents/explorer.md +48 -48
- package/agents/implementer-low.md +43 -43
- package/agents/implementer-medium.md +52 -52
- package/agents/implementer.md +54 -54
- package/agents/junior-mentor.md +141 -141
- package/agents/planning/requirements-analyst.md +84 -84
- package/agents/planning/ux-advisor.md +83 -83
- package/agents/qa/acceptance-tester.md +86 -86
- package/agents/qa/edge-case-finder.md +93 -93
- package/agents/refactor-cleaner.md +143 -143
- package/agents/research/best-practices-agent.md +199 -199
- package/agents/research/codebase-patterns-agent.md +157 -157
- package/agents/research/framework-docs-agent.md +188 -188
- package/agents/research/security-advisory-agent.md +213 -213
- package/agents/review/architecture-reviewer.md +107 -107
- package/agents/review/complexity-reviewer.md +116 -116
- package/agents/review/data-integrity-reviewer.md +88 -88
- package/agents/review/git-history-reviewer.md +103 -103
- package/agents/review/performance-reviewer.md +86 -86
- package/agents/review/python-reviewer.md +150 -150
- package/agents/review/rails-reviewer.md +139 -139
- package/agents/review/react-reviewer.md +144 -144
- package/agents/review/security-reviewer.md +80 -80
- package/agents/review/simplicity-reviewer.md +140 -140
- package/agents/review/test-coverage-reviewer.md +116 -116
- package/agents/review/typescript-reviewer.md +127 -127
- package/agents/searcher.md +54 -54
- package/agents/simplifier.md +120 -120
- package/agents/tester.md +49 -49
- package/agents/ui/ui-a11y-auditor.md +93 -93
- package/agents/ui/ui-antipattern-detector.md +94 -94
- package/agents/ui/ui-dataviz-advisor.md +69 -69
- package/agents/ui/ui-design-system-gen.md +57 -57
- package/agents/ui/ui-industry-analyzer.md +49 -49
- package/agents/ui/ui-layout-architect.md +65 -65
- package/agents/ui/ui-stack-implementer.md +68 -68
- package/agents/ui/ux-compliance-reviewer.md +81 -81
- package/agents/ui-previewer.md +258 -258
- package/commands/vibe.analyze.md +379 -379
- package/commands/vibe.event.md +163 -0
- package/commands/vibe.review.md +607 -607
- package/commands/vibe.run.md +2217 -2124
- package/commands/vibe.spec.md +1195 -1195
- package/commands/vibe.spec.review.md +569 -569
- package/commands/vibe.trace.md +50 -0
- package/commands/vibe.utils.md +413 -413
- package/commands/vibe.verify.md +484 -484
- package/dist/__tests__/architecture.test.d.ts +2 -0
- package/dist/__tests__/architecture.test.d.ts.map +1 -0
- package/dist/__tests__/architecture.test.js +207 -0
- package/dist/__tests__/architecture.test.js.map +1 -0
- package/dist/cli/auth.js +3 -3
- package/dist/cli/auth.js.map +1 -1
- package/dist/cli/collaborator.js +52 -52
- package/dist/cli/commands/evolution.js +12 -12
- package/dist/cli/commands/info.d.ts.map +1 -1
- package/dist/cli/commands/info.js +45 -81
- package/dist/cli/commands/info.js.map +1 -1
- package/dist/cli/commands/init.js +5 -5
- package/dist/cli/commands/remove.js +14 -14
- package/dist/cli/commands/sentinel.js +27 -27
- package/dist/cli/commands/skills.js +5 -5
- package/dist/cli/commands/slack.js +10 -10
- package/dist/cli/commands/telegram.js +12 -12
- package/dist/cli/detect.d.ts.map +1 -1
- package/dist/cli/detect.js +55 -32
- package/dist/cli/detect.js.map +1 -1
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +52 -52
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/llm/claude-commands.js +16 -16
- package/dist/cli/llm/config.js +18 -18
- package/dist/cli/llm/gemini-commands.js +16 -16
- package/dist/cli/llm/gpt-commands.js +19 -19
- package/dist/cli/llm/help.js +21 -21
- package/dist/cli/postinstall/constants.d.ts.map +1 -1
- package/dist/cli/postinstall/constants.js +24 -0
- package/dist/cli/postinstall/constants.js.map +1 -1
- package/dist/cli/postinstall/cursor-agents.js +32 -32
- package/dist/cli/postinstall/cursor-rules.js +83 -83
- package/dist/cli/postinstall/cursor-skills.js +743 -743
- package/dist/cli/setup/Provisioner.js +42 -42
- package/dist/infra/lib/AutomationLevel.d.ts +48 -0
- package/dist/infra/lib/AutomationLevel.d.ts.map +1 -0
- package/dist/infra/lib/AutomationLevel.js +157 -0
- package/dist/infra/lib/AutomationLevel.js.map +1 -0
- package/dist/infra/lib/DecisionTracer.d.ts +81 -0
- package/dist/infra/lib/DecisionTracer.d.ts.map +1 -0
- package/dist/infra/lib/DecisionTracer.js +135 -0
- package/dist/infra/lib/DecisionTracer.js.map +1 -0
- package/dist/infra/lib/DeepInit.js +24 -24
- package/dist/infra/lib/InteractiveCheckpoint.d.ts +75 -0
- package/dist/infra/lib/InteractiveCheckpoint.d.ts.map +1 -0
- package/dist/infra/lib/InteractiveCheckpoint.js +179 -0
- package/dist/infra/lib/InteractiveCheckpoint.js.map +1 -0
- package/dist/infra/lib/IterationTracker.d.ts +44 -0
- package/dist/infra/lib/IterationTracker.d.ts.map +1 -1
- package/dist/infra/lib/IterationTracker.js +267 -12
- package/dist/infra/lib/IterationTracker.js.map +1 -1
- package/dist/infra/lib/LoopBreaker.d.ts +56 -0
- package/dist/infra/lib/LoopBreaker.d.ts.map +1 -0
- package/dist/infra/lib/LoopBreaker.js +109 -0
- package/dist/infra/lib/LoopBreaker.js.map +1 -0
- package/dist/infra/lib/PythonParser.js +108 -108
- package/dist/infra/lib/ReviewRace.js +96 -96
- package/dist/infra/lib/SkillFrontmatter.js +28 -28
- package/dist/infra/lib/SkillQualityGate.js +9 -9
- package/dist/infra/lib/SkillRepository.js +159 -159
- package/dist/infra/lib/UltraQA.js +99 -99
- package/dist/infra/lib/VerificationLoop.d.ts +105 -0
- package/dist/infra/lib/VerificationLoop.d.ts.map +1 -0
- package/dist/infra/lib/VerificationLoop.js +189 -0
- package/dist/infra/lib/VerificationLoop.js.map +1 -0
- package/dist/infra/lib/__tests__/AutomationLevel.test.d.ts +2 -0
- package/dist/infra/lib/__tests__/AutomationLevel.test.d.ts.map +1 -0
- package/dist/infra/lib/__tests__/AutomationLevel.test.js +297 -0
- package/dist/infra/lib/__tests__/AutomationLevel.test.js.map +1 -0
- package/dist/infra/lib/__tests__/DecisionTracer.test.d.ts +2 -0
- package/dist/infra/lib/__tests__/DecisionTracer.test.d.ts.map +1 -0
- package/dist/infra/lib/__tests__/DecisionTracer.test.js +274 -0
- package/dist/infra/lib/__tests__/DecisionTracer.test.js.map +1 -0
- package/dist/infra/lib/__tests__/InteractiveCheckpoint.test.d.ts +2 -0
- package/dist/infra/lib/__tests__/InteractiveCheckpoint.test.d.ts.map +1 -0
- package/dist/infra/lib/__tests__/InteractiveCheckpoint.test.js +350 -0
- package/dist/infra/lib/__tests__/InteractiveCheckpoint.test.js.map +1 -0
- package/dist/infra/lib/__tests__/LoopBreaker.test.d.ts +2 -0
- package/dist/infra/lib/__tests__/LoopBreaker.test.d.ts.map +1 -0
- package/dist/infra/lib/__tests__/LoopBreaker.test.js +340 -0
- package/dist/infra/lib/__tests__/LoopBreaker.test.js.map +1 -0
- package/dist/infra/lib/__tests__/VerificationLoop.test.d.ts +2 -0
- package/dist/infra/lib/__tests__/VerificationLoop.test.d.ts.map +1 -0
- package/dist/infra/lib/__tests__/VerificationLoop.test.js +486 -0
- package/dist/infra/lib/__tests__/VerificationLoop.test.js.map +1 -0
- package/dist/infra/lib/autonomy/AuditStore.js +41 -41
- package/dist/infra/lib/autonomy/ConfirmationStore.js +30 -30
- package/dist/infra/lib/autonomy/EventOutbox.js +38 -38
- package/dist/infra/lib/autonomy/PolicyEngine.d.ts +3 -3
- package/dist/infra/lib/autonomy/PolicyEngine.js +18 -18
- package/dist/infra/lib/autonomy/SecuritySentinel.js +1 -1
- package/dist/infra/lib/autonomy/SuggestionStore.js +33 -33
- package/dist/infra/lib/embedding/VectorStore.js +22 -22
- package/dist/infra/lib/embedding/__tests__/EmbeddingProvider.test.js +4 -0
- package/dist/infra/lib/embedding/__tests__/EmbeddingProvider.test.js.map +1 -1
- package/dist/infra/lib/evolution/AgentAnalyzer.js +10 -10
- package/dist/infra/lib/evolution/DeprecationDetector.d.ts +68 -0
- package/dist/infra/lib/evolution/DeprecationDetector.d.ts.map +1 -0
- package/dist/infra/lib/evolution/DeprecationDetector.js +207 -0
- package/dist/infra/lib/evolution/DeprecationDetector.js.map +1 -0
- package/dist/infra/lib/evolution/DescriptionOptimizer.js +21 -21
- package/dist/infra/lib/evolution/GenerationRegistry.js +36 -36
- package/dist/infra/lib/evolution/InsightStore.js +90 -90
- package/dist/infra/lib/evolution/ParityTester.d.ts +74 -0
- package/dist/infra/lib/evolution/ParityTester.d.ts.map +1 -0
- package/dist/infra/lib/evolution/ParityTester.js +238 -0
- package/dist/infra/lib/evolution/ParityTester.js.map +1 -0
- package/dist/infra/lib/evolution/RollbackManager.js +5 -5
- package/dist/infra/lib/evolution/SkillBenchmark.js +23 -23
- package/dist/infra/lib/evolution/SkillEvalRunner.js +50 -50
- package/dist/infra/lib/evolution/SkillGapDetector.js +10 -10
- package/dist/infra/lib/evolution/UsageTracker.js +28 -28
- package/dist/infra/lib/evolution/__tests__/deprecation.test.d.ts +2 -0
- package/dist/infra/lib/evolution/__tests__/deprecation.test.d.ts.map +1 -0
- package/dist/infra/lib/evolution/__tests__/deprecation.test.js +251 -0
- package/dist/infra/lib/evolution/__tests__/deprecation.test.js.map +1 -0
- package/dist/infra/lib/evolution/__tests__/parity.test.d.ts +2 -0
- package/dist/infra/lib/evolution/__tests__/parity.test.d.ts.map +1 -0
- package/dist/infra/lib/evolution/__tests__/parity.test.js +319 -0
- package/dist/infra/lib/evolution/__tests__/parity.test.js.map +1 -0
- package/dist/infra/lib/evolution/index.d.ts +4 -0
- package/dist/infra/lib/evolution/index.d.ts.map +1 -1
- package/dist/infra/lib/evolution/index.js +3 -0
- package/dist/infra/lib/evolution/index.js.map +1 -1
- package/dist/infra/lib/gemini/orchestration.js +5 -5
- package/dist/infra/lib/gpt/orchestration.js +4 -4
- package/dist/infra/lib/gpt/specializations.d.ts +1 -1
- package/dist/infra/lib/gpt/specializations.js +1 -1
- package/dist/infra/lib/memory/KnowledgeGraph.js +4 -4
- package/dist/infra/lib/memory/MemorySearch.js +57 -57
- package/dist/infra/lib/memory/MemoryStorage.js +181 -181
- package/dist/infra/lib/memory/ObservationStore.js +28 -28
- package/dist/infra/lib/memory/ReflectionStore.js +30 -30
- package/dist/infra/lib/memory/SessionRAGRetriever.js +7 -7
- package/dist/infra/lib/memory/SessionRAGStore.js +225 -225
- package/dist/infra/lib/memory/SessionSummarizer.js +9 -9
- package/dist/infra/lib/telemetry/SkillTelemetry.d.ts +6 -0
- package/dist/infra/lib/telemetry/SkillTelemetry.d.ts.map +1 -1
- package/dist/infra/lib/telemetry/SkillTelemetry.js +11 -0
- package/dist/infra/lib/telemetry/SkillTelemetry.js.map +1 -1
- package/dist/infra/orchestrator/AgentManager.js +12 -12
- package/dist/infra/orchestrator/AgentRegistry.js +65 -65
- package/dist/infra/orchestrator/BackgroundManager.d.ts.map +1 -1
- package/dist/infra/orchestrator/BackgroundManager.js +2 -0
- package/dist/infra/orchestrator/BackgroundManager.js.map +1 -1
- package/dist/infra/orchestrator/MultiLlmResearch.js +8 -8
- package/dist/infra/orchestrator/PhasePipeline.js +1 -1
- package/dist/infra/orchestrator/PhasePipeline.js.map +1 -1
- package/dist/infra/orchestrator/SwarmOrchestrator.test.js +16 -16
- package/dist/infra/orchestrator/parallelResearch.js +24 -24
- package/dist/tools/convention/analyzeComplexity.test.js +115 -115
- package/dist/tools/convention/validateCodeQuality.test.js +104 -104
- package/dist/tools/index.d.ts +16 -19
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +15 -27
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/memory/createMemoryTimeline.js +10 -10
- package/dist/tools/memory/getMemoryGraph.js +12 -12
- package/dist/tools/memory/getSessionContext.js +9 -9
- package/dist/tools/memory/linkMemories.js +14 -14
- package/dist/tools/memory/listMemories.js +4 -4
- package/dist/tools/memory/recallMemory.js +4 -4
- package/dist/tools/memory/saveMemory.js +4 -4
- package/dist/tools/memory/searchMemoriesAdvanced.js +23 -23
- package/dist/tools/memory/startSession.js +1 -1
- package/dist/tools/memory/startSession.js.map +1 -1
- package/dist/tools/semantic/analyzeDependencyGraph.js +12 -12
- package/dist/tools/semantic/astGrep.test.js +6 -6
- package/dist/tools/spec/index.d.ts +0 -4
- package/dist/tools/spec/index.d.ts.map +1 -1
- package/dist/tools/spec/index.js +0 -4
- package/dist/tools/spec/index.js.map +1 -1
- package/dist/tools/spec/prdParser.test.js +171 -171
- package/dist/tools/spec/specGenerator.js +169 -169
- package/dist/tools/spec/traceabilityMatrix.js +64 -64
- package/dist/tools/spec/traceabilityMatrix.test.js +28 -28
- package/hooks/gemini-hooks.json +73 -73
- package/hooks/hooks.json +137 -137
- package/hooks/scripts/code-check.js +77 -77
- package/hooks/scripts/context-save.js +212 -212
- package/hooks/scripts/evolution-engine.js +69 -0
- package/hooks/scripts/hud-status.js +291 -291
- package/hooks/scripts/keyword-detector.js +214 -214
- package/hooks/scripts/llm-orchestrate.js +475 -475
- package/hooks/scripts/post-edit.js +32 -32
- package/hooks/scripts/pre-tool-guard.js +125 -125
- package/hooks/scripts/prompt-dispatcher.js +185 -185
- package/hooks/scripts/sentinel-guard.js +104 -104
- package/hooks/scripts/session-start.js +106 -106
- package/hooks/scripts/skill-injector.js +83 -0
- package/hooks/scripts/stop-notify.js +209 -209
- package/hooks/scripts/utils.js +100 -100
- package/languages/csharp-unity.md +515 -515
- package/languages/gdscript-godot.md +470 -470
- package/languages/ruby-rails.md +489 -489
- package/languages/typescript-angular.md +433 -433
- package/languages/typescript-astro.md +416 -416
- package/languages/typescript-electron.md +406 -406
- package/languages/typescript-nestjs.md +524 -524
- package/languages/typescript-svelte.md +407 -407
- package/languages/typescript-tauri.md +365 -365
- package/package.json +101 -123
- package/skills/agents-md/SKILL.md +120 -120
- package/skills/arch-guard/SKILL.md +180 -180
- package/skills/brand-assets/SKILL.md +146 -146
- package/skills/capability-loop/SKILL.md +167 -167
- package/skills/characterization-test/SKILL.md +206 -206
- package/skills/commerce-patterns/SKILL.md +63 -63
- package/skills/commit-push-pr/SKILL.md +75 -75
- package/skills/context7-usage/SKILL.md +105 -105
- package/skills/core-capabilities/SKILL.md +13 -13
- package/skills/e2e-commerce/SKILL.md +61 -61
- package/skills/event-comms/SKILL.md +161 -0
- package/skills/event-ops/SKILL.md +197 -0
- package/skills/event-planning/SKILL.md +131 -0
- package/skills/exec-plan/SKILL.md +147 -147
- package/skills/frontend-design/SKILL.md +12 -12
- package/skills/git-worktree/SKILL.md +72 -72
- package/skills/handoff/SKILL.md +109 -109
- package/skills/parallel-research/SKILL.md +87 -87
- package/skills/priority-todos/SKILL.md +63 -63
- package/skills/seo-checklist/SKILL.md +57 -57
- package/skills/techdebt/SKILL.md +122 -122
- package/skills/tool-fallback/SKILL.md +103 -103
- package/skills/typescript-advanced-types/SKILL.md +66 -66
- package/skills/ui-ux-pro-max/SKILL.md +221 -221
- package/skills/vercel-react-best-practices/SKILL.md +59 -59
- package/skills/video-production/SKILL.md +51 -51
- package/vibe/config.json +29 -29
- package/vibe/constitution.md +227 -227
- package/vibe/rules/principles/communication-guide.md +98 -98
- package/vibe/rules/principles/development-philosophy.md +52 -52
- package/vibe/rules/principles/quick-start.md +102 -102
- package/vibe/rules/quality/bdd-contract-testing.md +393 -393
- package/vibe/rules/quality/checklist.md +276 -276
- package/vibe/rules/quality/performance.md +236 -236
- package/vibe/rules/quality/testing-strategy.md +440 -440
- package/vibe/rules/standards/anti-patterns.md +541 -541
- package/vibe/rules/standards/code-structure.md +291 -291
- package/vibe/rules/standards/complexity-metrics.md +313 -313
- package/vibe/rules/standards/git-workflow.md +237 -237
- package/vibe/rules/standards/naming-conventions.md +198 -198
- package/vibe/rules/standards/security.md +305 -305
- package/vibe/rules/writing/document-style.md +74 -74
- package/vibe/setup.sh +31 -31
- package/vibe/templates/constitution-template.md +252 -252
- package/vibe/templates/contract-backend-template.md +526 -526
- package/vibe/templates/contract-frontend-template.md +599 -599
- package/vibe/templates/feature-template.md +96 -96
- package/vibe/templates/spec-template.md +221 -221
- package/vibe/ui-ux-data/charts.csv +26 -26
- package/vibe/ui-ux-data/colors.csv +97 -97
- package/vibe/ui-ux-data/icons.csv +101 -101
- package/vibe/ui-ux-data/landing.csv +31 -31
- package/vibe/ui-ux-data/products.csv +96 -96
- package/vibe/ui-ux-data/react-performance.csv +45 -45
- package/vibe/ui-ux-data/stacks/astro.csv +54 -54
- package/vibe/ui-ux-data/stacks/flutter.csv +53 -53
- package/vibe/ui-ux-data/stacks/html-tailwind.csv +56 -56
- package/vibe/ui-ux-data/stacks/jetpack-compose.csv +53 -53
- package/vibe/ui-ux-data/stacks/nextjs.csv +53 -53
- package/vibe/ui-ux-data/stacks/nuxt-ui.csv +51 -51
- package/vibe/ui-ux-data/stacks/nuxtjs.csv +59 -59
- package/vibe/ui-ux-data/stacks/react-native.csv +52 -52
- package/vibe/ui-ux-data/stacks/react.csv +54 -54
- package/vibe/ui-ux-data/stacks/shadcn.csv +61 -61
- package/vibe/ui-ux-data/stacks/svelte.csv +54 -54
- package/vibe/ui-ux-data/stacks/swiftui.csv +51 -51
- package/vibe/ui-ux-data/stacks/vue.csv +50 -50
- package/vibe/ui-ux-data/styles.csv +68 -68
- package/vibe/ui-ux-data/typography.csv +57 -57
- package/vibe/ui-ux-data/ui-reasoning.csv +101 -101
- package/vibe/ui-ux-data/ux-guidelines.csv +99 -99
- package/vibe/ui-ux-data/version.json +31 -31
- package/vibe/ui-ux-data/web-interface.csv +31 -31
|
@@ -153,48 +153,48 @@ export class Provisioner {
|
|
|
153
153
|
const stateSection = details.stateManagement.length > 0
|
|
154
154
|
? details.stateManagement.join(', ')
|
|
155
155
|
: 'N/A';
|
|
156
|
-
return `# [Feature Name] SPEC
|
|
157
|
-
|
|
158
|
-
## Overview
|
|
159
|
-
<!-- Brief description of the feature -->
|
|
160
|
-
|
|
161
|
-
## Tech Stack
|
|
162
|
-
${stackList}
|
|
163
|
-
|
|
164
|
-
### Infrastructure
|
|
165
|
-
- **Databases**: ${dbSection}
|
|
166
|
-
- **State Management**: ${stateSection}
|
|
167
|
-
|
|
168
|
-
## Problem Statement
|
|
169
|
-
<!-- What problem does this solve? -->
|
|
170
|
-
|
|
171
|
-
## Proposed Solution
|
|
172
|
-
<!-- High-level approach -->
|
|
173
|
-
|
|
174
|
-
## Requirements
|
|
175
|
-
|
|
176
|
-
### Functional
|
|
177
|
-
1. <!-- Requirement 1 -->
|
|
178
|
-
|
|
179
|
-
### Non-Functional
|
|
180
|
-
1. <!-- Performance, security, accessibility -->
|
|
181
|
-
|
|
182
|
-
## API Design
|
|
183
|
-
<!-- Endpoints, request/response schemas -->
|
|
184
|
-
|
|
185
|
-
## Data Model
|
|
186
|
-
<!-- Schema changes, migrations -->
|
|
187
|
-
|
|
188
|
-
## Test Strategy
|
|
189
|
-
- Unit tests: <!-- scope -->
|
|
190
|
-
- Integration tests: <!-- scope -->
|
|
191
|
-
- E2E tests: <!-- scope -->
|
|
192
|
-
|
|
193
|
-
## Acceptance Criteria
|
|
194
|
-
- [ ] <!-- Criterion 1 -->
|
|
195
|
-
|
|
196
|
-
## References
|
|
197
|
-
<!-- Links to relevant docs, designs, PRs -->
|
|
156
|
+
return `# [Feature Name] SPEC
|
|
157
|
+
|
|
158
|
+
## Overview
|
|
159
|
+
<!-- Brief description of the feature -->
|
|
160
|
+
|
|
161
|
+
## Tech Stack
|
|
162
|
+
${stackList}
|
|
163
|
+
|
|
164
|
+
### Infrastructure
|
|
165
|
+
- **Databases**: ${dbSection}
|
|
166
|
+
- **State Management**: ${stateSection}
|
|
167
|
+
|
|
168
|
+
## Problem Statement
|
|
169
|
+
<!-- What problem does this solve? -->
|
|
170
|
+
|
|
171
|
+
## Proposed Solution
|
|
172
|
+
<!-- High-level approach -->
|
|
173
|
+
|
|
174
|
+
## Requirements
|
|
175
|
+
|
|
176
|
+
### Functional
|
|
177
|
+
1. <!-- Requirement 1 -->
|
|
178
|
+
|
|
179
|
+
### Non-Functional
|
|
180
|
+
1. <!-- Performance, security, accessibility -->
|
|
181
|
+
|
|
182
|
+
## API Design
|
|
183
|
+
<!-- Endpoints, request/response schemas -->
|
|
184
|
+
|
|
185
|
+
## Data Model
|
|
186
|
+
<!-- Schema changes, migrations -->
|
|
187
|
+
|
|
188
|
+
## Test Strategy
|
|
189
|
+
- Unit tests: <!-- scope -->
|
|
190
|
+
- Integration tests: <!-- scope -->
|
|
191
|
+
- E2E tests: <!-- scope -->
|
|
192
|
+
|
|
193
|
+
## Acceptance Criteria
|
|
194
|
+
- [ ] <!-- Criterion 1 -->
|
|
195
|
+
|
|
196
|
+
## References
|
|
197
|
+
<!-- Links to relevant docs, designs, PRs -->
|
|
198
198
|
`;
|
|
199
199
|
}
|
|
200
200
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AutomationLevel — 자동화 레벨 시스템
|
|
3
|
+
*
|
|
4
|
+
* L0: Manual — 모든 단계에서 사용자 확인
|
|
5
|
+
* L1: Guided — AI 제안, 사용자 결정
|
|
6
|
+
* L2: Semi-auto — 기본값, 주요 지점에서 확인
|
|
7
|
+
* L3: Auto — 자동 진행, 체크포인트만 확인 (ultrawork)
|
|
8
|
+
* L4: Full-auto — 완전 자동, 달성률 기반 반복 (ralph)
|
|
9
|
+
*/
|
|
10
|
+
export type AutomationLevelNumber = 0 | 1 | 2 | 3 | 4;
|
|
11
|
+
export interface AutomationLevel {
|
|
12
|
+
level: AutomationLevelNumber;
|
|
13
|
+
name: string;
|
|
14
|
+
description: string;
|
|
15
|
+
/** Whether to auto-advance between phases */
|
|
16
|
+
autoAdvance: boolean;
|
|
17
|
+
/** Whether to auto-retry on failure */
|
|
18
|
+
autoRetry: boolean;
|
|
19
|
+
/** Max retries (0 = no retry) */
|
|
20
|
+
maxRetries: number;
|
|
21
|
+
/** Whether to require user confirmation at checkpoints */
|
|
22
|
+
requireCheckpoints: boolean;
|
|
23
|
+
/** Whether to use parallel agents */
|
|
24
|
+
parallelAgents: boolean;
|
|
25
|
+
}
|
|
26
|
+
export type AutomationAction = 'phase_advance' | 'architecture_choice' | 'implementation_scope' | 'fix_strategy' | 'retry' | 'destructive';
|
|
27
|
+
export interface TrustScore {
|
|
28
|
+
score: number;
|
|
29
|
+
level: AutomationLevelNumber;
|
|
30
|
+
consecutiveSuccesses: number;
|
|
31
|
+
consecutiveFailures: number;
|
|
32
|
+
totalActions: number;
|
|
33
|
+
}
|
|
34
|
+
export declare const AUTOMATION_LEVELS: Record<AutomationLevelNumber, AutomationLevel>;
|
|
35
|
+
/** Magic keyword → level mapping */
|
|
36
|
+
export declare const KEYWORD_LEVEL_MAP: Record<string, AutomationLevelNumber>;
|
|
37
|
+
/** Detect automation level from user input text */
|
|
38
|
+
export declare function detectAutomationLevel(input: string): AutomationLevel;
|
|
39
|
+
/** Get level by number */
|
|
40
|
+
export declare function getAutomationLevel(level: AutomationLevelNumber): AutomationLevel;
|
|
41
|
+
/** Check if a specific action needs user confirmation at the given level */
|
|
42
|
+
export declare function needsConfirmation(level: AutomationLevelNumber, action: AutomationAction): boolean;
|
|
43
|
+
export declare function createTrustScore(): TrustScore;
|
|
44
|
+
export declare function recordTrustSuccess(trust: TrustScore): TrustScore;
|
|
45
|
+
export declare function recordTrustFailure(trust: TrustScore): TrustScore;
|
|
46
|
+
/** Get recommended level based on trust score */
|
|
47
|
+
export declare function getRecommendedLevel(trust: TrustScore): AutomationLevelNumber;
|
|
48
|
+
//# sourceMappingURL=AutomationLevel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutomationLevel.d.ts","sourceRoot":"","sources":["../../../src/infra/lib/AutomationLevel.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAEtD,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,qBAAqB,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,6CAA6C;IAC7C,WAAW,EAAE,OAAO,CAAC;IACrB,uCAAuC;IACvC,SAAS,EAAE,OAAO,CAAC;IACnB,iCAAiC;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,0DAA0D;IAC1D,kBAAkB,EAAE,OAAO,CAAC;IAC5B,qCAAqC;IACrC,cAAc,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,MAAM,gBAAgB,GACxB,eAAe,GACf,qBAAqB,GACrB,sBAAsB,GACtB,cAAc,GACd,OAAO,GACP,aAAa,CAAC;AAElB,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,qBAAqB,CAAC;IAC7B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,qBAAqB,EAAE,eAAe,CAmD5E,CAAC;AAEF,oCAAoC;AACpC,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CASnE,CAAC;AA2BF,mDAAmD;AACnD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,eAAe,CASpE;AAED,0BAA0B;AAC1B,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,qBAAqB,GAAG,eAAe,CAEhF;AAED,4EAA4E;AAC5E,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,qBAAqB,EAC5B,MAAM,EAAE,gBAAgB,GACvB,OAAO,CAET;AAED,wBAAgB,gBAAgB,IAAI,UAAU,CAQ7C;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,CAahE;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,CAahE;AAED,iDAAiD;AACjD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,UAAU,GAAG,qBAAqB,CAE5E"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AutomationLevel — 자동화 레벨 시스템
|
|
3
|
+
*
|
|
4
|
+
* L0: Manual — 모든 단계에서 사용자 확인
|
|
5
|
+
* L1: Guided — AI 제안, 사용자 결정
|
|
6
|
+
* L2: Semi-auto — 기본값, 주요 지점에서 확인
|
|
7
|
+
* L3: Auto — 자동 진행, 체크포인트만 확인 (ultrawork)
|
|
8
|
+
* L4: Full-auto — 완전 자동, 달성률 기반 반복 (ralph)
|
|
9
|
+
*/
|
|
10
|
+
export const AUTOMATION_LEVELS = {
|
|
11
|
+
0: {
|
|
12
|
+
level: 0,
|
|
13
|
+
name: 'Manual',
|
|
14
|
+
description: 'Every step requires user confirmation',
|
|
15
|
+
autoAdvance: false,
|
|
16
|
+
autoRetry: false,
|
|
17
|
+
maxRetries: 0,
|
|
18
|
+
requireCheckpoints: true,
|
|
19
|
+
parallelAgents: false,
|
|
20
|
+
},
|
|
21
|
+
1: {
|
|
22
|
+
level: 1,
|
|
23
|
+
name: 'Guided',
|
|
24
|
+
description: 'AI suggests, user decides',
|
|
25
|
+
autoAdvance: false,
|
|
26
|
+
autoRetry: false,
|
|
27
|
+
maxRetries: 0,
|
|
28
|
+
requireCheckpoints: true,
|
|
29
|
+
parallelAgents: false,
|
|
30
|
+
},
|
|
31
|
+
2: {
|
|
32
|
+
level: 2,
|
|
33
|
+
name: 'Semi-auto',
|
|
34
|
+
description: 'Auto-execute with key checkpoints',
|
|
35
|
+
autoAdvance: true,
|
|
36
|
+
autoRetry: true,
|
|
37
|
+
maxRetries: 2,
|
|
38
|
+
requireCheckpoints: true,
|
|
39
|
+
parallelAgents: false,
|
|
40
|
+
},
|
|
41
|
+
3: {
|
|
42
|
+
level: 3,
|
|
43
|
+
name: 'Auto',
|
|
44
|
+
description: 'Auto-advance, checkpoint-only review',
|
|
45
|
+
autoAdvance: true,
|
|
46
|
+
autoRetry: true,
|
|
47
|
+
maxRetries: 3,
|
|
48
|
+
requireCheckpoints: true,
|
|
49
|
+
parallelAgents: true,
|
|
50
|
+
},
|
|
51
|
+
4: {
|
|
52
|
+
level: 4,
|
|
53
|
+
name: 'Full-auto',
|
|
54
|
+
description: 'Fully autonomous, metric-driven iteration',
|
|
55
|
+
autoAdvance: true,
|
|
56
|
+
autoRetry: true,
|
|
57
|
+
maxRetries: 5,
|
|
58
|
+
requireCheckpoints: false,
|
|
59
|
+
parallelAgents: true,
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
/** Magic keyword → level mapping */
|
|
63
|
+
export const KEYWORD_LEVEL_MAP = {
|
|
64
|
+
manual: 0,
|
|
65
|
+
guided: 1,
|
|
66
|
+
quick: 2,
|
|
67
|
+
ultrawork: 3,
|
|
68
|
+
ulw: 3,
|
|
69
|
+
ralph: 4,
|
|
70
|
+
ralplan: 4,
|
|
71
|
+
verify: 1,
|
|
72
|
+
};
|
|
73
|
+
const CONFIRMATION_MATRIX = {
|
|
74
|
+
destructive: [0, 1, 2, 3],
|
|
75
|
+
phase_advance: [0, 1],
|
|
76
|
+
architecture_choice: [0, 1, 2],
|
|
77
|
+
implementation_scope: [0, 1, 2],
|
|
78
|
+
fix_strategy: [0, 1],
|
|
79
|
+
retry: [0],
|
|
80
|
+
};
|
|
81
|
+
const TRUST_SCORE_DEFAULTS = {
|
|
82
|
+
INITIAL: 50,
|
|
83
|
+
SUCCESS_DELTA: 5,
|
|
84
|
+
FAILURE_DELTA: 15,
|
|
85
|
+
MAX: 100,
|
|
86
|
+
MIN: 0,
|
|
87
|
+
};
|
|
88
|
+
const TRUST_LEVEL_THRESHOLDS = [
|
|
89
|
+
{ max: 20, level: 0 },
|
|
90
|
+
{ max: 40, level: 1 },
|
|
91
|
+
{ max: 60, level: 2 },
|
|
92
|
+
{ max: 80, level: 3 },
|
|
93
|
+
{ max: 100, level: 4 },
|
|
94
|
+
];
|
|
95
|
+
/** Detect automation level from user input text */
|
|
96
|
+
export function detectAutomationLevel(input) {
|
|
97
|
+
const lower = input.toLowerCase();
|
|
98
|
+
for (const [keyword, levelNum] of Object.entries(KEYWORD_LEVEL_MAP)) {
|
|
99
|
+
const pattern = new RegExp(`\\b${keyword}\\b`);
|
|
100
|
+
if (pattern.test(lower)) {
|
|
101
|
+
return AUTOMATION_LEVELS[levelNum];
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return AUTOMATION_LEVELS[2];
|
|
105
|
+
}
|
|
106
|
+
/** Get level by number */
|
|
107
|
+
export function getAutomationLevel(level) {
|
|
108
|
+
return AUTOMATION_LEVELS[level];
|
|
109
|
+
}
|
|
110
|
+
/** Check if a specific action needs user confirmation at the given level */
|
|
111
|
+
export function needsConfirmation(level, action) {
|
|
112
|
+
return CONFIRMATION_MATRIX[action].includes(level);
|
|
113
|
+
}
|
|
114
|
+
export function createTrustScore() {
|
|
115
|
+
return {
|
|
116
|
+
score: TRUST_SCORE_DEFAULTS.INITIAL,
|
|
117
|
+
level: 2,
|
|
118
|
+
consecutiveSuccesses: 0,
|
|
119
|
+
consecutiveFailures: 0,
|
|
120
|
+
totalActions: 0,
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
export function recordTrustSuccess(trust) {
|
|
124
|
+
const score = Math.min(TRUST_SCORE_DEFAULTS.MAX, trust.score + TRUST_SCORE_DEFAULTS.SUCCESS_DELTA);
|
|
125
|
+
const updated = {
|
|
126
|
+
score,
|
|
127
|
+
level: scorToLevel(score),
|
|
128
|
+
consecutiveSuccesses: trust.consecutiveSuccesses + 1,
|
|
129
|
+
consecutiveFailures: 0,
|
|
130
|
+
totalActions: trust.totalActions + 1,
|
|
131
|
+
};
|
|
132
|
+
return updated;
|
|
133
|
+
}
|
|
134
|
+
export function recordTrustFailure(trust) {
|
|
135
|
+
const score = Math.max(TRUST_SCORE_DEFAULTS.MIN, trust.score - TRUST_SCORE_DEFAULTS.FAILURE_DELTA);
|
|
136
|
+
const updated = {
|
|
137
|
+
score,
|
|
138
|
+
level: scorToLevel(score),
|
|
139
|
+
consecutiveSuccesses: 0,
|
|
140
|
+
consecutiveFailures: trust.consecutiveFailures + 1,
|
|
141
|
+
totalActions: trust.totalActions + 1,
|
|
142
|
+
};
|
|
143
|
+
return updated;
|
|
144
|
+
}
|
|
145
|
+
/** Get recommended level based on trust score */
|
|
146
|
+
export function getRecommendedLevel(trust) {
|
|
147
|
+
return scorToLevel(trust.score);
|
|
148
|
+
}
|
|
149
|
+
function scorToLevel(score) {
|
|
150
|
+
for (const { max, level } of TRUST_LEVEL_THRESHOLDS) {
|
|
151
|
+
if (score <= max) {
|
|
152
|
+
return level;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return 4;
|
|
156
|
+
}
|
|
157
|
+
//# sourceMappingURL=AutomationLevel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutomationLevel.js","sourceRoot":"","sources":["../../../src/infra/lib/AutomationLevel.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAoCH,MAAM,CAAC,MAAM,iBAAiB,GAAmD;IAC/E,CAAC,EAAE;QACD,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,uCAAuC;QACpD,WAAW,EAAE,KAAK;QAClB,SAAS,EAAE,KAAK;QACh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AE,CAAC;QACvB,mBAAmB,EAAE,KAAK,CAAC,mBAAmB,GAAG,CAAC;QAClD,YAAY,EAAE,KAAK,CAAC,YAAY,GAAG,CAAC;KACrC,CAAC;IACF,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,iDAAiD;AACjD,MAAM,UAAU,mBAAmB,CAAC,KAAiB;IACnD,OAAO,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAClC,CAAC;AAED,SAAS,WAAW,CAAC,KAAa;IAChC,KAAK,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,sBAAsB,EAAE,CAAC;QACpD,IAAI,KAAK,IAAI,GAAG,EAAE,CAAC;YACjB,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DecisionTracer — AI decision audit trail
|
|
3
|
+
*
|
|
4
|
+
* All data is stored locally only (JSONL).
|
|
5
|
+
* File: ~/.vibe/analytics/decisions.jsonl
|
|
6
|
+
*/
|
|
7
|
+
export interface DecisionRecord {
|
|
8
|
+
/** Schema version */
|
|
9
|
+
v: 1;
|
|
10
|
+
/** ISO 8601 timestamp */
|
|
11
|
+
ts: string;
|
|
12
|
+
/** Decision category */
|
|
13
|
+
category: DecisionCategory;
|
|
14
|
+
/** What was decided */
|
|
15
|
+
decision: string;
|
|
16
|
+
/** Why this was chosen (rationale) */
|
|
17
|
+
rationale: string;
|
|
18
|
+
/** What alternatives were considered */
|
|
19
|
+
alternatives: string[];
|
|
20
|
+
/** Context that informed the decision */
|
|
21
|
+
context: DecisionContext;
|
|
22
|
+
/** Outcome (filled later via updateOutcome) */
|
|
23
|
+
outcome?: DecisionOutcome;
|
|
24
|
+
/** Unique decision ID */
|
|
25
|
+
id: string;
|
|
26
|
+
}
|
|
27
|
+
export type DecisionCategory = 'architecture' | 'implementation' | 'fix_strategy' | 'verification' | 'retry' | 'scope_change' | 'tool_selection';
|
|
28
|
+
export interface DecisionContext {
|
|
29
|
+
/** Feature/SPEC being worked on */
|
|
30
|
+
feature?: string;
|
|
31
|
+
/** Current phase */
|
|
32
|
+
phase?: string;
|
|
33
|
+
/** Related file paths */
|
|
34
|
+
files: string[];
|
|
35
|
+
/** Automation level at time of decision */
|
|
36
|
+
automationLevel?: number;
|
|
37
|
+
}
|
|
38
|
+
export interface DecisionOutcome {
|
|
39
|
+
/** Whether the decision led to success */
|
|
40
|
+
success: boolean;
|
|
41
|
+
/** Impact description */
|
|
42
|
+
impact: string;
|
|
43
|
+
/** Timestamp of outcome recording */
|
|
44
|
+
recordedAt: string;
|
|
45
|
+
}
|
|
46
|
+
export interface DecisionInput {
|
|
47
|
+
category: DecisionCategory;
|
|
48
|
+
decision: string;
|
|
49
|
+
rationale: string;
|
|
50
|
+
alternatives?: string[];
|
|
51
|
+
context?: Partial<DecisionContext>;
|
|
52
|
+
}
|
|
53
|
+
export interface FeatureSummary {
|
|
54
|
+
feature: string;
|
|
55
|
+
totalDecisions: number;
|
|
56
|
+
byCategory: Record<string, number>;
|
|
57
|
+
successRate: number | null;
|
|
58
|
+
decisions: DecisionRecord[];
|
|
59
|
+
}
|
|
60
|
+
export declare class DecisionTracer {
|
|
61
|
+
private readonly logPath;
|
|
62
|
+
private readonly enabled;
|
|
63
|
+
constructor(analyticsDir: string, enabled?: boolean);
|
|
64
|
+
/** Record a new decision */
|
|
65
|
+
record(input: DecisionInput): DecisionRecord;
|
|
66
|
+
/** Update outcome for a previous decision */
|
|
67
|
+
updateOutcome(decisionId: string, outcome: Omit<DecisionOutcome, 'recordedAt'>): boolean;
|
|
68
|
+
/** Read all decisions */
|
|
69
|
+
readAll(): DecisionRecord[];
|
|
70
|
+
/** Query decisions by category */
|
|
71
|
+
queryByCategory(category: DecisionCategory): DecisionRecord[];
|
|
72
|
+
/** Query decisions by feature */
|
|
73
|
+
queryByFeature(feature: string): DecisionRecord[];
|
|
74
|
+
/** Get recent decisions (last N) */
|
|
75
|
+
getRecent(count: number): DecisionRecord[];
|
|
76
|
+
/** Summarize decisions for a feature */
|
|
77
|
+
summarizeFeature(feature: string): FeatureSummary;
|
|
78
|
+
/** Get log path */
|
|
79
|
+
getLogPath(): string;
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=DecisionTracer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DecisionTracer.d.ts","sourceRoot":"","sources":["../../../src/infra/lib/DecisionTracer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,MAAM,WAAW,cAAc;IAC7B,qBAAqB;IACrB,CAAC,EAAE,CAAC,CAAC;IACL,yBAAyB;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,wBAAwB;IACxB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,uBAAuB;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,sCAAsC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,wCAAwC;IACxC,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,yCAAyC;IACzC,OAAO,EAAE,eAAe,CAAC;IACzB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,yBAAyB;IACzB,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,MAAM,gBAAgB,GACxB,cAAc,GACd,gBAAgB,GAChB,cAAc,GACd,cAAc,GACd,OAAO,GACP,cAAc,GACd,gBAAgB,CAAC;AAErB,MAAM,WAAW,eAAe;IAC9B,mCAAmC;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oBAAoB;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yBAAyB;IACzB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,2CAA2C;IAC3C,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,eAAe;IAC9B,0CAA0C;IAC1C,OAAO,EAAE,OAAO,CAAC;IACjB,y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I,MAAM;CAGrB"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DecisionTracer — AI decision audit trail
|
|
3
|
+
*
|
|
4
|
+
* All data is stored locally only (JSONL).
|
|
5
|
+
* File: ~/.vibe/analytics/decisions.jsonl
|
|
6
|
+
*/
|
|
7
|
+
import fs from 'fs';
|
|
8
|
+
import path from 'path';
|
|
9
|
+
import crypto from 'crypto';
|
|
10
|
+
function buildRecord(input) {
|
|
11
|
+
return {
|
|
12
|
+
v: 1,
|
|
13
|
+
id: crypto.randomUUID(),
|
|
14
|
+
ts: new Date().toISOString(),
|
|
15
|
+
category: input.category,
|
|
16
|
+
decision: input.decision,
|
|
17
|
+
rationale: input.rationale,
|
|
18
|
+
alternatives: input.alternatives ?? [],
|
|
19
|
+
context: {
|
|
20
|
+
files: [],
|
|
21
|
+
...input.context,
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function parseLines(content) {
|
|
26
|
+
return content
|
|
27
|
+
.trim()
|
|
28
|
+
.split('\n')
|
|
29
|
+
.filter(line => line.trim().length > 0)
|
|
30
|
+
.flatMap(line => {
|
|
31
|
+
try {
|
|
32
|
+
return [JSON.parse(line)];
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
return [];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function computeSuccessRate(decisions) {
|
|
40
|
+
const withOutcome = decisions.filter(d => d.outcome !== undefined);
|
|
41
|
+
if (withOutcome.length === 0)
|
|
42
|
+
return null;
|
|
43
|
+
const successes = withOutcome.filter(d => d.outcome.success).length;
|
|
44
|
+
return successes / withOutcome.length;
|
|
45
|
+
}
|
|
46
|
+
export class DecisionTracer {
|
|
47
|
+
logPath;
|
|
48
|
+
enabled;
|
|
49
|
+
constructor(analyticsDir, enabled = true) {
|
|
50
|
+
this.logPath = path.join(analyticsDir, 'decisions.jsonl');
|
|
51
|
+
this.enabled = enabled;
|
|
52
|
+
if (enabled) {
|
|
53
|
+
fs.mkdirSync(analyticsDir, { recursive: true });
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/** Record a new decision */
|
|
57
|
+
record(input) {
|
|
58
|
+
const record = buildRecord(input);
|
|
59
|
+
if (this.enabled) {
|
|
60
|
+
try {
|
|
61
|
+
fs.appendFileSync(this.logPath, JSON.stringify(record) + '\n');
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
// Silent fail — tracing should never break the tool
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return record;
|
|
68
|
+
}
|
|
69
|
+
/** Update outcome for a previous decision */
|
|
70
|
+
updateOutcome(decisionId, outcome) {
|
|
71
|
+
if (!this.enabled)
|
|
72
|
+
return false;
|
|
73
|
+
const records = this.readAll();
|
|
74
|
+
const index = records.findIndex(r => r.id === decisionId);
|
|
75
|
+
if (index === -1)
|
|
76
|
+
return false;
|
|
77
|
+
records[index] = {
|
|
78
|
+
...records[index],
|
|
79
|
+
outcome: { ...outcome, recordedAt: new Date().toISOString() },
|
|
80
|
+
};
|
|
81
|
+
try {
|
|
82
|
+
const content = records.map(r => JSON.stringify(r)).join('\n') + '\n';
|
|
83
|
+
fs.writeFileSync(this.logPath, content);
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
/** Read all decisions */
|
|
91
|
+
readAll() {
|
|
92
|
+
if (!fs.existsSync(this.logPath))
|
|
93
|
+
return [];
|
|
94
|
+
try {
|
|
95
|
+
const content = fs.readFileSync(this.logPath, 'utf-8');
|
|
96
|
+
return parseLines(content);
|
|
97
|
+
}
|
|
98
|
+
catch {
|
|
99
|
+
return [];
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
/** Query decisions by category */
|
|
103
|
+
queryByCategory(category) {
|
|
104
|
+
return this.readAll().filter(r => r.category === category);
|
|
105
|
+
}
|
|
106
|
+
/** Query decisions by feature */
|
|
107
|
+
queryByFeature(feature) {
|
|
108
|
+
return this.readAll().filter(r => r.context.feature === feature);
|
|
109
|
+
}
|
|
110
|
+
/** Get recent decisions (last N) */
|
|
111
|
+
getRecent(count) {
|
|
112
|
+
const all = this.readAll();
|
|
113
|
+
return all.slice(Math.max(0, all.length - count));
|
|
114
|
+
}
|
|
115
|
+
/** Summarize decisions for a feature */
|
|
116
|
+
summarizeFeature(feature) {
|
|
117
|
+
const decisions = this.queryByFeature(feature);
|
|
118
|
+
const byCategory = {};
|
|
119
|
+
for (const d of decisions) {
|
|
120
|
+
byCategory[d.category] = (byCategory[d.category] ?? 0) + 1;
|
|
121
|
+
}
|
|
122
|
+
return {
|
|
123
|
+
feature,
|
|
124
|
+
totalDecisions: decisions.length,
|
|
125
|
+
byCategory,
|
|
126
|
+
successRate: computeSuccessRate(decisions),
|
|
127
|
+
decisions,
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
/** Get log path */
|
|
131
|
+
getLogPath() {
|
|
132
|
+
return this.logPath;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
//# sourceMappingURL=DecisionTracer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DecisionTracer.js","sourceRoot":"","sources":["../../../src/infra/lib/DecisionTracer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,QAAQ,CAAC;AAoE5B,SAAS,WAAW,CAAC,KAAoB;IACvC,OAAO;QACL,CAAC,EAAE,CAAC;QACJ,EAAE,EAAE,MAAM,CAAC,UAAU,EAAE;QACvB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QAC5B,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,SAAS,EAAE,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S,EAAE,CAAC;YAC1B,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QAC7D,CAAC;QAED,OAAO;YACL,OAAO;YACP,cAAc,EAAE,SAAS,CAAC,MAAM;YAChC,UAAU;YACV,WAAW,EAAE,kBAAkB,CAAC,SAAS,CAAC;YAC1C,SAAS;SACV,CAAC;IACJ,CAAC;IAED,mBAAmB;IACnB,UAAU;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;CACF"}
|
|
@@ -216,30 +216,30 @@ export function generateNavigationHeader(dir, rootPath) {
|
|
|
216
216
|
* Describe DeepInit workflow
|
|
217
217
|
*/
|
|
218
218
|
export function describeDeepInitWorkflow() {
|
|
219
|
-
return `
|
|
220
|
-
## DeepInit Workflow
|
|
221
|
-
|
|
222
|
-
Hierarchical AI-readable documentation generation:
|
|
223
|
-
|
|
224
|
-
\`\`\`
|
|
225
|
-
project/
|
|
226
|
-
├── AGENTS.md ← Root documentation
|
|
227
|
-
├── src/
|
|
228
|
-
│ ├── AGENTS.md ← <!-- Parent: ../AGENTS.md -->
|
|
229
|
-
│ ├── components/
|
|
230
|
-
│ │ └── AGENTS.md ← <!-- Parent: ../AGENTS.md -->
|
|
231
|
-
│ └── services/
|
|
232
|
-
│ └── AGENTS.md ← <!-- Parent: ../AGENTS.md -->
|
|
233
|
-
└── tests/
|
|
234
|
-
└── AGENTS.md ← <!-- Parent: ../AGENTS.md -->
|
|
235
|
-
\`\`\`
|
|
236
|
-
|
|
237
|
-
Features:
|
|
238
|
-
- Parent references for navigation
|
|
239
|
-
- Auto-detected purpose and conventions
|
|
240
|
-
- Preserved manual notes on regeneration
|
|
241
|
-
- Entry point identification
|
|
242
|
-
- Child module linking
|
|
219
|
+
return `
|
|
220
|
+
## DeepInit Workflow
|
|
221
|
+
|
|
222
|
+
Hierarchical AI-readable documentation generation:
|
|
223
|
+
|
|
224
|
+
\`\`\`
|
|
225
|
+
project/
|
|
226
|
+
├── AGENTS.md ← Root documentation
|
|
227
|
+
├── src/
|
|
228
|
+
│ ├── AGENTS.md ← <!-- Parent: ../AGENTS.md -->
|
|
229
|
+
│ ├── components/
|
|
230
|
+
│ │ └── AGENTS.md ← <!-- Parent: ../AGENTS.md -->
|
|
231
|
+
│ └── services/
|
|
232
|
+
│ └── AGENTS.md ← <!-- Parent: ../AGENTS.md -->
|
|
233
|
+
└── tests/
|
|
234
|
+
└── AGENTS.md ← <!-- Parent: ../AGENTS.md -->
|
|
235
|
+
\`\`\`
|
|
236
|
+
|
|
237
|
+
Features:
|
|
238
|
+
- Parent references for navigation
|
|
239
|
+
- Auto-detected purpose and conventions
|
|
240
|
+
- Preserved manual notes on regeneration
|
|
241
|
+
- Entry point identification
|
|
242
|
+
- Child module linking
|
|
243
243
|
`.trim();
|
|
244
244
|
}
|
|
245
245
|
//# sourceMappingURL=DeepInit.js.map
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* InteractiveCheckpoint — Phase 전환 시 의사결정 게이트
|
|
3
|
+
*
|
|
4
|
+
* /vibe.run 워크플로우에서 주요 지점에 체크포인트를 삽입하여
|
|
5
|
+
* 사용자가 방향을 확인/수정할 수 있도록 함
|
|
6
|
+
*/
|
|
7
|
+
export type CheckpointType = 'requirements_confirm' | 'architecture_choice' | 'implementation_scope' | 'verification_result' | 'fix_strategy';
|
|
8
|
+
export interface CheckpointOption {
|
|
9
|
+
/** Option key (e.g., 'a', 'b', 'c') */
|
|
10
|
+
key: string;
|
|
11
|
+
/** Option label */
|
|
12
|
+
label: string;
|
|
13
|
+
/** Detailed description */
|
|
14
|
+
description: string;
|
|
15
|
+
}
|
|
16
|
+
export interface Checkpoint {
|
|
17
|
+
/** Checkpoint type */
|
|
18
|
+
type: CheckpointType;
|
|
19
|
+
/** Title displayed to user */
|
|
20
|
+
title: string;
|
|
21
|
+
/** Context/summary shown to user */
|
|
22
|
+
summary: string;
|
|
23
|
+
/** Available options */
|
|
24
|
+
options: CheckpointOption[];
|
|
25
|
+
/** Default option key (if user doesn't choose) */
|
|
26
|
+
defaultOption: string;
|
|
27
|
+
/** Metadata */
|
|
28
|
+
metadata: Record<string, unknown>;
|
|
29
|
+
}
|
|
30
|
+
export interface CheckpointResult {
|
|
31
|
+
/** Which checkpoint was resolved */
|
|
32
|
+
type: CheckpointType;
|
|
33
|
+
/** Selected option key */
|
|
34
|
+
selectedOption: string;
|
|
35
|
+
/** Timestamp */
|
|
36
|
+
timestamp: string;
|
|
37
|
+
/** Whether this was auto-resolved (at high automation levels) */
|
|
38
|
+
autoResolved: boolean;
|
|
39
|
+
}
|
|
40
|
+
export interface CheckpointHistory {
|
|
41
|
+
feature: string;
|
|
42
|
+
results: CheckpointResult[];
|
|
43
|
+
}
|
|
44
|
+
/** Create a requirements confirmation checkpoint */
|
|
45
|
+
export declare function createRequirementsCheckpoint(requirements: string[], featureName: string): Checkpoint;
|
|
46
|
+
/** Create an architecture choice checkpoint with 3 approaches */
|
|
47
|
+
export declare function createArchitectureCheckpoint(options: Array<{
|
|
48
|
+
approach: string;
|
|
49
|
+
pros: string[];
|
|
50
|
+
cons: string[];
|
|
51
|
+
effort: string;
|
|
52
|
+
}>): Checkpoint;
|
|
53
|
+
/** Create an implementation scope checkpoint */
|
|
54
|
+
export declare function createScopeCheckpoint(files: Array<{
|
|
55
|
+
path: string;
|
|
56
|
+
action: 'create' | 'modify' | 'delete';
|
|
57
|
+
}>, estimatedLines: number): Checkpoint;
|
|
58
|
+
/** Create a verification result checkpoint */
|
|
59
|
+
export declare function createVerificationCheckpoint(achievementRate: number, failedRequirements: string[], iteration: number): Checkpoint;
|
|
60
|
+
/** Create a fix strategy checkpoint */
|
|
61
|
+
export declare function createFixStrategyCheckpoint(issues: Array<{
|
|
62
|
+
severity: 'critical' | 'warning' | 'info';
|
|
63
|
+
description: string;
|
|
64
|
+
}>): Checkpoint;
|
|
65
|
+
/** Format a checkpoint as readable prompt text */
|
|
66
|
+
export declare function formatCheckpoint(checkpoint: Checkpoint): string;
|
|
67
|
+
/** Resolve a checkpoint with user's choice */
|
|
68
|
+
export declare function resolveCheckpoint(checkpoint: Checkpoint, selectedKey: string): CheckpointResult;
|
|
69
|
+
/** Auto-resolve a checkpoint using the default option */
|
|
70
|
+
export declare function autoResolveCheckpoint(checkpoint: Checkpoint): CheckpointResult;
|
|
71
|
+
/** Create a new checkpoint history for a feature */
|
|
72
|
+
export declare function createHistory(feature: string): CheckpointHistory;
|
|
73
|
+
/** Append a result to history (immutable — returns new history) */
|
|
74
|
+
export declare function addToHistory(history: CheckpointHistory, result: CheckpointResult): CheckpointHistory;
|
|
75
|
+
//# sourceMappingURL=InteractiveCheckpoint.d.ts.map
|