@su-record/vibe 2.12.4 → 2.12.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +2 -1
- package/dist/cli/commands/init.d.ts +8 -0
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +24 -1
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/postinstall/claude-agents.d.ts +11 -1
- package/dist/cli/postinstall/claude-agents.d.ts.map +1 -1
- package/dist/cli/postinstall/claude-agents.js +22 -2
- package/dist/cli/postinstall/claude-agents.js.map +1 -1
- package/dist/cli/postinstall/constants.d.ts +18 -0
- package/dist/cli/postinstall/constants.d.ts.map +1 -1
- package/dist/cli/postinstall/constants.js +50 -0
- package/dist/cli/postinstall/constants.js.map +1 -1
- package/dist/cli/postinstall/index.d.ts +1 -1
- package/dist/cli/postinstall/index.d.ts.map +1 -1
- package/dist/cli/postinstall/index.js +1 -1
- package/dist/cli/postinstall/index.js.map +1 -1
- package/dist/cli/postinstall/main.d.ts.map +1 -1
- package/dist/cli/postinstall/main.js +4 -3
- package/dist/cli/postinstall/main.js.map +1 -1
- package/dist/cli/postinstall.d.ts +1 -1
- package/dist/cli/postinstall.d.ts.map +1 -1
- package/dist/cli/postinstall.js +1 -1
- package/dist/cli/postinstall.js.map +1 -1
- package/dist/infra/lib/ContextCompressor.d.ts +11 -2
- package/dist/infra/lib/ContextCompressor.d.ts.map +1 -1
- package/dist/infra/lib/ContextCompressor.js +26 -41
- package/dist/infra/lib/ContextCompressor.js.map +1 -1
- package/dist/infra/lib/ContextCompressor.test.d.ts +2 -0
- package/dist/infra/lib/ContextCompressor.test.d.ts.map +1 -0
- package/dist/infra/lib/ContextCompressor.test.js +25 -0
- package/dist/infra/lib/ContextCompressor.test.js.map +1 -0
- package/dist/infra/lib/embedding/VectorStore.d.ts +9 -2
- package/dist/infra/lib/embedding/VectorStore.d.ts.map +1 -1
- package/dist/infra/lib/embedding/VectorStore.js +42 -19
- package/dist/infra/lib/embedding/VectorStore.js.map +1 -1
- package/dist/infra/lib/memory/MemoryStorage.d.ts +12 -0
- package/dist/infra/lib/memory/MemoryStorage.d.ts.map +1 -1
- package/dist/infra/lib/memory/MemoryStorage.js +57 -0
- package/dist/infra/lib/memory/MemoryStorage.js.map +1 -1
- package/dist/infra/lib/memory/ReflectionStore.d.ts.map +1 -1
- package/dist/infra/lib/memory/ReflectionStore.js +8 -27
- package/dist/infra/lib/memory/ReflectionStore.js.map +1 -1
- package/dist/infra/orchestrator/LLMCluster.d.ts +4 -0
- package/dist/infra/orchestrator/LLMCluster.d.ts.map +1 -1
- package/dist/infra/orchestrator/LLMCluster.js +35 -8
- package/dist/infra/orchestrator/LLMCluster.js.map +1 -1
- package/hooks/hooks.json +2 -9
- package/hooks/scripts/auto-commit.js +3 -10
- package/hooks/scripts/auto-format.js +11 -6
- package/hooks/scripts/code-check.js +17 -20
- package/hooks/scripts/session-start.js +28 -15
- package/hooks/scripts/utils.js +33 -9
- package/package.json +1 -1
- package/skills/arch-guard/SKILL.md +2 -2
- package/skills/characterization-test/SKILL.md +2 -2
- package/skills/exec-plan/SKILL.md +2 -2
- package/skills/spec/SKILL.md +6 -312
- package/skills/spec/references/askuser-examples.md +57 -0
- package/skills/spec/references/example-session.md +87 -0
- package/skills/spec/references/templates.md +189 -0
- package/skills/vibe.run/SKILL.md +2 -2
- package/vibe/templates/claudemd-template.md +1 -1
package/skills/spec/SKILL.md
CHANGED
|
@@ -278,22 +278,7 @@ After initial conversation, use the structured `askUser` tool for:
|
|
|
278
278
|
| **Critical** (auth, security, session) | `askUser` tool |
|
|
279
279
|
| Optional (performance, integration) | Natural conversation |
|
|
280
280
|
|
|
281
|
-
**Usage
|
|
282
|
-
|
|
283
|
-
```typescript
|
|
284
|
-
import { askUser, askUserQuick } from '@su-record/vibe/tools';
|
|
285
|
-
|
|
286
|
-
// Quick helper for common scenarios
|
|
287
|
-
const result = await askUserQuick.login('my-login-feature');
|
|
288
|
-
console.log(result.content[0].text);
|
|
289
|
-
|
|
290
|
-
// Custom categories
|
|
291
|
-
const result = await askUser({
|
|
292
|
-
featureName: 'user-dashboard',
|
|
293
|
-
categories: ['authentication', 'security', 'session', 'data_model'],
|
|
294
|
-
context: 'Building a user dashboard with role-based access',
|
|
295
|
-
});
|
|
296
|
-
```
|
|
281
|
+
**Usage**: read `references/askuser-examples.md` in this skill directory for `askUser`/`askUserQuick` invocation code, example output format, and `parseUserResponse` response parsing.
|
|
297
282
|
|
|
298
283
|
**Available categories:**
|
|
299
284
|
- `authentication`: Auth methods, MFA
|
|
@@ -303,41 +288,6 @@ const result = await askUser({
|
|
|
303
288
|
- `performance`: Response time targets
|
|
304
289
|
- `integration`: External service integration
|
|
305
290
|
|
|
306
|
-
**Example output:**
|
|
307
|
-
|
|
308
|
-
```
|
|
309
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
310
|
-
📋 Requirements Confirmation
|
|
311
|
-
Feature: login
|
|
312
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
313
|
-
|
|
314
|
-
## 🔐 Authentication
|
|
315
|
-
|
|
316
|
-
### 🔐 Q-AUTHENTICATION-001
|
|
317
|
-
|
|
318
|
-
**Which authentication methods should be supported?**
|
|
319
|
-
(Multiple selection allowed)
|
|
320
|
-
|
|
321
|
-
1. **Email/Password** ✓
|
|
322
|
-
2. **Google Social Login**
|
|
323
|
-
3. **Apple Social Login**
|
|
324
|
-
...
|
|
325
|
-
|
|
326
|
-
**Required**
|
|
327
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
328
|
-
Total 6 questions (Required: 4)
|
|
329
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
330
|
-
```
|
|
331
|
-
|
|
332
|
-
**Response parsing:**
|
|
333
|
-
|
|
334
|
-
```typescript
|
|
335
|
-
import { parseUserResponse } from '@su-record/vibe/tools';
|
|
336
|
-
|
|
337
|
-
// User responds: "1, 2, 4" (selected option numbers)
|
|
338
|
-
const response = parseUserResponse(question, "1, 2, 4");
|
|
339
|
-
// { questionId: "Q-AUTH-001", value: ["email_password", "social_google", "passkey"], timestamp: "..." }
|
|
340
|
-
```
|
|
341
291
|
|
|
342
292
|
**ultrawork mode:**
|
|
343
293
|
- askUser is **skipped** in ultrawork mode
|
|
@@ -614,136 +564,11 @@ This makes the next `/vibe.spec` (or future `/vibe.research`) invocation on the
|
|
|
614
564
|
|
|
615
565
|
**🚨 CRITICAL: Each SPEC phase file MUST have a matching Feature file**
|
|
616
566
|
|
|
617
|
-
**Master SPEC (
|
|
618
|
-
|
|
619
|
-
```markdown
|
|
620
|
-
# SPEC: {feature-name} (Master)
|
|
621
|
-
|
|
622
|
-
## Overview
|
|
623
|
-
- Total phases: N
|
|
624
|
-
- Dependencies: [list]
|
|
625
|
-
|
|
626
|
-
## Sub-SPECs
|
|
627
|
-
|
|
628
|
-
| Order | SPEC File | Feature File | Status |
|
|
629
|
-
|-------|-----------|--------------|--------|
|
|
630
|
-
| 1 | phase-1-setup.md | phase-1-setup.feature | ⬜ |
|
|
631
|
-
| 2 | phase-2-core.md | phase-2-core.feature | ⬜ |
|
|
632
|
-
|
|
633
|
-
## Shared Context
|
|
634
|
-
- Tech Stack: [all phases]
|
|
635
|
-
- Constraints: [all phases]
|
|
636
|
-
```
|
|
637
|
-
|
|
638
|
-
**Master Feature (`_index.feature`):**
|
|
639
|
-
|
|
640
|
-
```markdown
|
|
641
|
-
# Feature: {feature-name} (Master)
|
|
642
|
-
|
|
643
|
-
**Master SPEC**: `.vibe/specs/{feature-name}/_index.md`
|
|
644
|
-
|
|
645
|
-
## Sub-Features
|
|
646
|
-
|
|
647
|
-
| Order | Feature File | SPEC File | Status |
|
|
648
|
-
|-------|--------------|-----------|--------|
|
|
649
|
-
| 1 | phase-1-setup.feature | phase-1-setup.md | ⬜ |
|
|
650
|
-
| 2 | phase-2-core.feature | phase-2-core.md | ⬜ |
|
|
651
|
-
|
|
652
|
-
## Overall User Story
|
|
653
|
-
**As a** {user}
|
|
654
|
-
**I want** {complete feature}
|
|
655
|
-
**So that** {value}
|
|
656
|
-
```
|
|
567
|
+
**Master SPEC / Master Feature**: copy the `Master SPEC (_index.md)` and `Master Feature (_index.feature)` templates from `references/templates.md`.
|
|
657
568
|
|
|
658
569
|
**Small scope (default):**
|
|
659
570
|
|
|
660
|
-
Create `.vibe/specs/{feature-name}.md
|
|
661
|
-
|
|
662
|
-
```markdown
|
|
663
|
-
---
|
|
664
|
-
status: pending
|
|
665
|
-
currentPhase: 0
|
|
666
|
-
totalPhases: 3
|
|
667
|
-
createdAt: {ISO-timestamp}
|
|
668
|
-
lastUpdated: {ISO-timestamp}
|
|
669
|
-
---
|
|
670
|
-
|
|
671
|
-
# SPEC: {feature-name}
|
|
672
|
-
|
|
673
|
-
## Persona
|
|
674
|
-
<role>
|
|
675
|
-
Define AI role and expertise for implementation
|
|
676
|
-
- Senior developer on the project
|
|
677
|
-
- Follow existing code patterns
|
|
678
|
-
- Write testable code
|
|
679
|
-
</role>
|
|
680
|
-
|
|
681
|
-
## Context
|
|
682
|
-
<context>
|
|
683
|
-
### Background
|
|
684
|
-
- Why this feature is needed
|
|
685
|
-
- Who will use it
|
|
686
|
-
|
|
687
|
-
### Tech Stack
|
|
688
|
-
- Backend: {technology}
|
|
689
|
-
- Frontend: {technology}
|
|
690
|
-
- Database: {technology}
|
|
691
|
-
|
|
692
|
-
### Related Code
|
|
693
|
-
- `src/xxx/`: Existing implementation to reference
|
|
694
|
-
- `src/yyy/`: Files to modify
|
|
695
|
-
|
|
696
|
-
### Design Reference
|
|
697
|
-
- {Reference app/service}
|
|
698
|
-
</context>
|
|
699
|
-
|
|
700
|
-
## Task
|
|
701
|
-
<task>
|
|
702
|
-
### Phase 1: {phase-name}
|
|
703
|
-
1. [ ] {specific task}
|
|
704
|
-
- File: `path/to/file`
|
|
705
|
-
- Verify: `command`
|
|
706
|
-
2. [ ] {specific task}
|
|
707
|
-
|
|
708
|
-
### Phase 2: {phase-name}
|
|
709
|
-
1. [ ] {specific task}
|
|
710
|
-
2. [ ] {specific task}
|
|
711
|
-
|
|
712
|
-
### Phase 3: Testing and Verification
|
|
713
|
-
1. [ ] Unit Tests
|
|
714
|
-
2. [ ] Integration Tests
|
|
715
|
-
</task>
|
|
716
|
-
|
|
717
|
-
## Constraints
|
|
718
|
-
<constraints>
|
|
719
|
-
- Follow existing code patterns
|
|
720
|
-
- Localize error messages
|
|
721
|
-
- Separate configuration via environment variables
|
|
722
|
-
- {other constraints}
|
|
723
|
-
</constraints>
|
|
724
|
-
|
|
725
|
-
## Output Format
|
|
726
|
-
<output_format>
|
|
727
|
-
### Files to Create
|
|
728
|
-
- `path/to/new/file.ts`
|
|
729
|
-
- `path/to/new/file.test.ts`
|
|
730
|
-
|
|
731
|
-
### Files to Modify
|
|
732
|
-
- `path/to/existing/file.ts`
|
|
733
|
-
|
|
734
|
-
### Verification Commands
|
|
735
|
-
- `npm test`
|
|
736
|
-
- `npm run build`
|
|
737
|
-
</output_format>
|
|
738
|
-
|
|
739
|
-
## Acceptance Criteria
|
|
740
|
-
<acceptance>
|
|
741
|
-
- [ ] {verifiable criterion 1}
|
|
742
|
-
- [ ] {verifiable criterion 2}
|
|
743
|
-
- [ ] All tests pass
|
|
744
|
-
- [ ] Build succeeds
|
|
745
|
-
</acceptance>
|
|
746
|
-
```
|
|
571
|
+
Create `.vibe/specs/{feature-name}.md` with the **Single SPEC template** in `references/templates.md` — PTCF structure (Persona / Context / Task / Constraints / Output Format / Acceptance Criteria) + status frontmatter (status/currentPhase/totalPhases/createdAt/lastUpdated).
|
|
747
572
|
|
|
748
573
|
### 5. Create Feature File (BDD) - Required
|
|
749
574
|
|
|
@@ -763,35 +588,7 @@ Create `.vibe/features/{feature-name}.feature`:
|
|
|
763
588
|
2. Include Happy Path (normal case) + Edge Case (exception case)
|
|
764
589
|
3. Follow Given-When-Then format
|
|
765
590
|
|
|
766
|
-
|
|
767
|
-
# Feature: {feature-name}
|
|
768
|
-
|
|
769
|
-
**SPEC**: `.vibe/specs/{feature-name}.md`
|
|
770
|
-
|
|
771
|
-
## User Story
|
|
772
|
-
**As a** {user}
|
|
773
|
-
**I want** {feature}
|
|
774
|
-
**So that** {value}
|
|
775
|
-
|
|
776
|
-
## Scenarios
|
|
777
|
-
|
|
778
|
-
### Scenario 1: {Happy Path}
|
|
779
|
-
\`\`\`gherkin
|
|
780
|
-
Scenario: {title}
|
|
781
|
-
Given {precondition}
|
|
782
|
-
When {action}
|
|
783
|
-
Then {result}
|
|
784
|
-
\`\`\`
|
|
785
|
-
**Verification**: SPEC AC #1
|
|
786
|
-
|
|
787
|
-
### Scenario 2: {Edge Case}
|
|
788
|
-
...
|
|
789
|
-
|
|
790
|
-
## Coverage
|
|
791
|
-
| Scenario | SPEC AC | Status |
|
|
792
|
-
|----------|---------|--------|
|
|
793
|
-
| 1 | AC-1 | ⬜ |
|
|
794
|
-
```
|
|
591
|
+
Use the **Single Feature template** in `references/templates.md` — User Story + gherkin Given-When-Then scenarios + Coverage table mapping each scenario to a SPEC AC.
|
|
795
592
|
|
|
796
593
|
#### 5.2 Split Files (Large Scope)
|
|
797
594
|
|
|
@@ -805,29 +602,7 @@ When SPEC is split into phases, Feature files MUST also be split:
|
|
|
805
602
|
└── ...
|
|
806
603
|
```
|
|
807
604
|
|
|
808
|
-
**Phase Feature file structure
|
|
809
|
-
|
|
810
|
-
```markdown
|
|
811
|
-
# Feature: {feature-name} - Phase {N}: {phase-name}
|
|
812
|
-
|
|
813
|
-
**SPEC**: `.vibe/specs/{feature-name}/phase-{N}-{name}.md`
|
|
814
|
-
**Master Feature**: `.vibe/features/{feature-name}/_index.feature`
|
|
815
|
-
|
|
816
|
-
## User Story (Phase Scope)
|
|
817
|
-
**As a** {user}
|
|
818
|
-
**I want** {phase-specific feature}
|
|
819
|
-
**So that** {phase-specific value}
|
|
820
|
-
|
|
821
|
-
## Scenarios
|
|
822
|
-
|
|
823
|
-
### Scenario 1: {Phase Happy Path}
|
|
824
|
-
...
|
|
825
|
-
|
|
826
|
-
## Coverage
|
|
827
|
-
| Scenario | SPEC AC | Status |
|
|
828
|
-
|----------|---------|--------|
|
|
829
|
-
| 1 | Phase {N} AC-1 | ⬜ |
|
|
830
|
-
```
|
|
605
|
+
**Phase Feature file structure**: use the **Phase Feature template** in `references/templates.md`.
|
|
831
606
|
|
|
832
607
|
### 6. Ambiguity Scan - Required
|
|
833
608
|
|
|
@@ -1066,88 +841,7 @@ Option 2 (recommended for large context):
|
|
|
1066
841
|
|
|
1067
842
|
## Example
|
|
1068
843
|
|
|
1069
|
-
|
|
1070
|
-
User: /vibe.spec "brick-game"
|
|
1071
|
-
|
|
1072
|
-
Claude:
|
|
1073
|
-
You're making a brick game! What style are you thinking of?
|
|
1074
|
-
|
|
1075
|
-
1. Classic Breakout style
|
|
1076
|
-
2. Arkanoid (with power-up items)
|
|
1077
|
-
3. Custom style with special gameplay
|
|
1078
|
-
|
|
1079
|
-
Feel free to describe in your own words.
|
|
1080
|
-
|
|
1081
|
-
User: 1
|
|
1082
|
-
|
|
1083
|
-
Claude: What platform will it run on?
|
|
1084
|
-
|
|
1085
|
-
1. Web (browser)
|
|
1086
|
-
2. Mobile (iOS/Android)
|
|
1087
|
-
3. Desktop
|
|
1088
|
-
|
|
1089
|
-
User: 1
|
|
1090
|
-
|
|
1091
|
-
Claude:
|
|
1092
|
-
Here are tech stack suggestions for web game development:
|
|
1093
|
-
|
|
1094
|
-
1. **Phaser.js** (Recommended) - Game framework with built-in physics engine
|
|
1095
|
-
2. **Canvas + JavaScript** - Lightweight with fine control
|
|
1096
|
-
3. **PixiJS + Matter.js** - High-performance rendering
|
|
1097
|
-
|
|
1098
|
-
User: 1
|
|
1099
|
-
|
|
1100
|
-
Claude: What design style?
|
|
1101
|
-
|
|
1102
|
-
1. Retro pixel (Atari Breakout)
|
|
1103
|
-
2. Neon graphics (Arkanoid)
|
|
1104
|
-
3. Modern 3D effects
|
|
1105
|
-
|
|
1106
|
-
User: 2
|
|
1107
|
-
|
|
1108
|
-
[Conversation continues...]
|
|
1109
|
-
|
|
1110
|
-
Claude: SPEC draft created. Running ambiguity scan.
|
|
1111
|
-
|
|
1112
|
-
## 🔍 Ambiguity Scan Results
|
|
1113
|
-
|
|
1114
|
-
### Functional Scope
|
|
1115
|
-
- ⚠️ Game over condition not defined (ball drop vs lives system)
|
|
1116
|
-
- ⚠️ Stage clear condition unclear
|
|
1117
|
-
|
|
1118
|
-
### Edge Cases
|
|
1119
|
-
- ⚠️ Ball reflection angle when hitting paddle edge
|
|
1120
|
-
- ⚠️ Multiple brick collision handling
|
|
1121
|
-
|
|
1122
|
-
Please clarify the above items.
|
|
1123
|
-
|
|
1124
|
-
User: 3 lives, clear when all bricks destroyed, edge reflects at 45 degrees
|
|
1125
|
-
|
|
1126
|
-
Claude: Thank you. SPEC has been refined.
|
|
1127
|
-
|
|
1128
|
-
🔍 Re-check result: 0 ambiguities
|
|
1129
|
-
📊 Quality score: 92/100 (A)
|
|
1130
|
-
|
|
1131
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1132
|
-
🔍 SPEC REVIEW (Antigravity)
|
|
1133
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1134
|
-
|
|
1135
|
-
📤 Sending SPEC...
|
|
1136
|
-
📝 Antigravity feedback:
|
|
1137
|
-
1. [Edge] Ball speed increase logic undefined
|
|
1138
|
-
2. [Security] Need score manipulation prevention
|
|
1139
|
-
|
|
1140
|
-
✅ 2 improvements auto-applied
|
|
1141
|
-
🔍 Re-verifying... ✅ Passed
|
|
1142
|
-
|
|
1143
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1144
|
-
✅ SPEC Complete!
|
|
1145
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1146
|
-
|
|
1147
|
-
📄 .vibe/specs/brick-game.md (PTCF structure)
|
|
1148
|
-
📄 .vibe/features/brick-game.feature
|
|
1149
|
-
📊 Quality score: 100/100 ← Loop converged (no remaining gaps)
|
|
1150
|
-
```
|
|
844
|
+
Full interview → ambiguity scan → quality gate → review walkthrough: read `references/example-session.md` in this skill directory (load only when you need a concrete end-to-end example).
|
|
1151
845
|
|
|
1152
846
|
## Core Tools (Semantic Analysis & Memory)
|
|
1153
847
|
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# askUser Tool — Usage Examples
|
|
2
|
+
|
|
3
|
+
> Referenced by `spec` SKILL.md Step 2.1 (Critical Requirements Confirmation).
|
|
4
|
+
> Read this file when invoking the `askUser` tool for the first time in a session.
|
|
5
|
+
|
|
6
|
+
## Usage
|
|
7
|
+
|
|
8
|
+
```typescript
|
|
9
|
+
import { askUser, askUserQuick } from '@su-record/vibe/tools';
|
|
10
|
+
|
|
11
|
+
// Quick helper for common scenarios
|
|
12
|
+
const result = await askUserQuick.login('my-login-feature');
|
|
13
|
+
console.log(result.content[0].text);
|
|
14
|
+
|
|
15
|
+
// Custom categories
|
|
16
|
+
const result = await askUser({
|
|
17
|
+
featureName: 'user-dashboard',
|
|
18
|
+
categories: ['authentication', 'security', 'session', 'data_model'],
|
|
19
|
+
context: 'Building a user dashboard with role-based access',
|
|
20
|
+
});
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Example output
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
27
|
+
📋 Requirements Confirmation
|
|
28
|
+
Feature: login
|
|
29
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
30
|
+
|
|
31
|
+
## 🔐 Authentication
|
|
32
|
+
|
|
33
|
+
### 🔐 Q-AUTHENTICATION-001
|
|
34
|
+
|
|
35
|
+
**Which authentication methods should be supported?**
|
|
36
|
+
(Multiple selection allowed)
|
|
37
|
+
|
|
38
|
+
1. **Email/Password** ✓
|
|
39
|
+
2. **Google Social Login**
|
|
40
|
+
3. **Apple Social Login**
|
|
41
|
+
...
|
|
42
|
+
|
|
43
|
+
**Required**
|
|
44
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
45
|
+
Total 6 questions (Required: 4)
|
|
46
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Response parsing
|
|
50
|
+
|
|
51
|
+
```typescript
|
|
52
|
+
import { parseUserResponse } from '@su-record/vibe/tools';
|
|
53
|
+
|
|
54
|
+
// User responds: "1, 2, 4" (selected option numbers)
|
|
55
|
+
const response = parseUserResponse(question, "1, 2, 4");
|
|
56
|
+
// { questionId: "Q-AUTH-001", value: ["email_password", "social_google", "passkey"], timestamp: "..." }
|
|
57
|
+
```
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Example Session — /vibe.spec walkthrough
|
|
2
|
+
|
|
3
|
+
> Referenced by `spec` SKILL.md. Read only if you need a concrete end-to-end
|
|
4
|
+
> example of the interview → ambiguity scan → quality gate → review flow.
|
|
5
|
+
|
|
6
|
+
```
|
|
7
|
+
User: /vibe.spec "brick-game"
|
|
8
|
+
|
|
9
|
+
Claude:
|
|
10
|
+
You're making a brick game! What style are you thinking of?
|
|
11
|
+
|
|
12
|
+
1. Classic Breakout style
|
|
13
|
+
2. Arkanoid (with power-up items)
|
|
14
|
+
3. Custom style with special gameplay
|
|
15
|
+
|
|
16
|
+
Feel free to describe in your own words.
|
|
17
|
+
|
|
18
|
+
User: 1
|
|
19
|
+
|
|
20
|
+
Claude: What platform will it run on?
|
|
21
|
+
|
|
22
|
+
1. Web (browser)
|
|
23
|
+
2. Mobile (iOS/Android)
|
|
24
|
+
3. Desktop
|
|
25
|
+
|
|
26
|
+
User: 1
|
|
27
|
+
|
|
28
|
+
Claude:
|
|
29
|
+
Here are tech stack suggestions for web game development:
|
|
30
|
+
|
|
31
|
+
1. **Phaser.js** (Recommended) - Game framework with built-in physics engine
|
|
32
|
+
2. **Canvas + JavaScript** - Lightweight with fine control
|
|
33
|
+
3. **PixiJS + Matter.js** - High-performance rendering
|
|
34
|
+
|
|
35
|
+
User: 1
|
|
36
|
+
|
|
37
|
+
Claude: What design style?
|
|
38
|
+
|
|
39
|
+
1. Retro pixel (Atari Breakout)
|
|
40
|
+
2. Neon graphics (Arkanoid)
|
|
41
|
+
3. Modern 3D effects
|
|
42
|
+
|
|
43
|
+
User: 2
|
|
44
|
+
|
|
45
|
+
[Conversation continues...]
|
|
46
|
+
|
|
47
|
+
Claude: SPEC draft created. Running ambiguity scan.
|
|
48
|
+
|
|
49
|
+
## 🔍 Ambiguity Scan Results
|
|
50
|
+
|
|
51
|
+
### Functional Scope
|
|
52
|
+
- ⚠️ Game over condition not defined (ball drop vs lives system)
|
|
53
|
+
- ⚠️ Stage clear condition unclear
|
|
54
|
+
|
|
55
|
+
### Edge Cases
|
|
56
|
+
- ⚠️ Ball reflection angle when hitting paddle edge
|
|
57
|
+
- ⚠️ Multiple brick collision handling
|
|
58
|
+
|
|
59
|
+
Please clarify the above items.
|
|
60
|
+
|
|
61
|
+
User: 3 lives, clear when all bricks destroyed, edge reflects at 45 degrees
|
|
62
|
+
|
|
63
|
+
Claude: Thank you. SPEC has been refined.
|
|
64
|
+
|
|
65
|
+
🔍 Re-check result: 0 ambiguities
|
|
66
|
+
📊 Quality score: 92/100 (A)
|
|
67
|
+
|
|
68
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
69
|
+
🔍 SPEC REVIEW (Antigravity)
|
|
70
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
71
|
+
|
|
72
|
+
📤 Sending SPEC...
|
|
73
|
+
📝 Antigravity feedback:
|
|
74
|
+
1. [Edge] Ball speed increase logic undefined
|
|
75
|
+
2. [Security] Need score manipulation prevention
|
|
76
|
+
|
|
77
|
+
✅ 2 improvements auto-applied
|
|
78
|
+
🔍 Re-verifying... ✅ Passed
|
|
79
|
+
|
|
80
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
81
|
+
✅ SPEC Complete!
|
|
82
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
83
|
+
|
|
84
|
+
📄 .vibe/specs/brick-game.md (PTCF structure)
|
|
85
|
+
📄 .vibe/features/brick-game.feature
|
|
86
|
+
📊 Quality score: 100/100 ← Loop converged (no remaining gaps)
|
|
87
|
+
```
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
# SPEC / Feature Document Templates
|
|
2
|
+
|
|
3
|
+
> Referenced by `spec` SKILL.md Step 4 (Write SPEC Document) and Step 5 (Create Feature File).
|
|
4
|
+
> Read this file when you reach those steps — copy the matching template verbatim and fill the placeholders.
|
|
5
|
+
|
|
6
|
+
## Master SPEC (`_index.md`) — Large Scope
|
|
7
|
+
|
|
8
|
+
```markdown
|
|
9
|
+
# SPEC: {feature-name} (Master)
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
- Total phases: N
|
|
13
|
+
- Dependencies: [list]
|
|
14
|
+
|
|
15
|
+
## Sub-SPECs
|
|
16
|
+
|
|
17
|
+
| Order | SPEC File | Feature File | Status |
|
|
18
|
+
|-------|-----------|--------------|--------|
|
|
19
|
+
| 1 | phase-1-setup.md | phase-1-setup.feature | ⬜ |
|
|
20
|
+
| 2 | phase-2-core.md | phase-2-core.feature | ⬜ |
|
|
21
|
+
|
|
22
|
+
## Shared Context
|
|
23
|
+
- Tech Stack: [all phases]
|
|
24
|
+
- Constraints: [all phases]
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Master Feature (`_index.feature`) — Large Scope
|
|
28
|
+
|
|
29
|
+
```markdown
|
|
30
|
+
# Feature: {feature-name} (Master)
|
|
31
|
+
|
|
32
|
+
**Master SPEC**: `.vibe/specs/{feature-name}/_index.md`
|
|
33
|
+
|
|
34
|
+
## Sub-Features
|
|
35
|
+
|
|
36
|
+
| Order | Feature File | SPEC File | Status |
|
|
37
|
+
|-------|--------------|-----------|--------|
|
|
38
|
+
| 1 | phase-1-setup.feature | phase-1-setup.md | ⬜ |
|
|
39
|
+
| 2 | phase-2-core.feature | phase-2-core.md | ⬜ |
|
|
40
|
+
|
|
41
|
+
## Overall User Story
|
|
42
|
+
**As a** {user}
|
|
43
|
+
**I want** {complete feature}
|
|
44
|
+
**So that** {value}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Single SPEC (`.vibe/specs/{feature-name}.md`) — Small Scope
|
|
48
|
+
|
|
49
|
+
```markdown
|
|
50
|
+
---
|
|
51
|
+
status: pending
|
|
52
|
+
currentPhase: 0
|
|
53
|
+
totalPhases: 3
|
|
54
|
+
createdAt: {ISO-timestamp}
|
|
55
|
+
lastUpdated: {ISO-timestamp}
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
# SPEC: {feature-name}
|
|
59
|
+
|
|
60
|
+
## Persona
|
|
61
|
+
<role>
|
|
62
|
+
Define AI role and expertise for implementation
|
|
63
|
+
- Senior developer on the project
|
|
64
|
+
- Follow existing code patterns
|
|
65
|
+
- Write testable code
|
|
66
|
+
</role>
|
|
67
|
+
|
|
68
|
+
## Context
|
|
69
|
+
<context>
|
|
70
|
+
### Background
|
|
71
|
+
- Why this feature is needed
|
|
72
|
+
- Who will use it
|
|
73
|
+
|
|
74
|
+
### Tech Stack
|
|
75
|
+
- Backend: {technology}
|
|
76
|
+
- Frontend: {technology}
|
|
77
|
+
- Database: {technology}
|
|
78
|
+
|
|
79
|
+
### Related Code
|
|
80
|
+
- `src/xxx/`: Existing implementation to reference
|
|
81
|
+
- `src/yyy/`: Files to modify
|
|
82
|
+
|
|
83
|
+
### Design Reference
|
|
84
|
+
- {Reference app/service}
|
|
85
|
+
</context>
|
|
86
|
+
|
|
87
|
+
## Task
|
|
88
|
+
<task>
|
|
89
|
+
### Phase 1: {phase-name}
|
|
90
|
+
1. [ ] {specific task}
|
|
91
|
+
- File: `path/to/file`
|
|
92
|
+
- Verify: `command`
|
|
93
|
+
2. [ ] {specific task}
|
|
94
|
+
|
|
95
|
+
### Phase 2: {phase-name}
|
|
96
|
+
1. [ ] {specific task}
|
|
97
|
+
2. [ ] {specific task}
|
|
98
|
+
|
|
99
|
+
### Phase 3: Testing and Verification
|
|
100
|
+
1. [ ] Unit Tests
|
|
101
|
+
2. [ ] Integration Tests
|
|
102
|
+
</task>
|
|
103
|
+
|
|
104
|
+
## Constraints
|
|
105
|
+
<constraints>
|
|
106
|
+
- Follow existing code patterns
|
|
107
|
+
- Localize error messages
|
|
108
|
+
- Separate configuration via environment variables
|
|
109
|
+
- {other constraints}
|
|
110
|
+
</constraints>
|
|
111
|
+
|
|
112
|
+
## Output Format
|
|
113
|
+
<output_format>
|
|
114
|
+
### Files to Create
|
|
115
|
+
- `path/to/new/file.ts`
|
|
116
|
+
- `path/to/new/file.test.ts`
|
|
117
|
+
|
|
118
|
+
### Files to Modify
|
|
119
|
+
- `path/to/existing/file.ts`
|
|
120
|
+
|
|
121
|
+
### Verification Commands
|
|
122
|
+
- `npm test`
|
|
123
|
+
- `npm run build`
|
|
124
|
+
</output_format>
|
|
125
|
+
|
|
126
|
+
## Acceptance Criteria
|
|
127
|
+
<acceptance>
|
|
128
|
+
- [ ] {verifiable criterion 1}
|
|
129
|
+
- [ ] {verifiable criterion 2}
|
|
130
|
+
- [ ] All tests pass
|
|
131
|
+
- [ ] Build succeeds
|
|
132
|
+
</acceptance>
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Single Feature (`.vibe/features/{feature-name}.feature`) — Small Scope
|
|
136
|
+
|
|
137
|
+
```markdown
|
|
138
|
+
# Feature: {feature-name}
|
|
139
|
+
|
|
140
|
+
**SPEC**: `.vibe/specs/{feature-name}.md`
|
|
141
|
+
|
|
142
|
+
## User Story
|
|
143
|
+
**As a** {user}
|
|
144
|
+
**I want** {feature}
|
|
145
|
+
**So that** {value}
|
|
146
|
+
|
|
147
|
+
## Scenarios
|
|
148
|
+
|
|
149
|
+
### Scenario 1: {Happy Path}
|
|
150
|
+
\`\`\`gherkin
|
|
151
|
+
Scenario: {title}
|
|
152
|
+
Given {precondition}
|
|
153
|
+
When {action}
|
|
154
|
+
Then {result}
|
|
155
|
+
\`\`\`
|
|
156
|
+
**Verification**: SPEC AC #1
|
|
157
|
+
|
|
158
|
+
### Scenario 2: {Edge Case}
|
|
159
|
+
...
|
|
160
|
+
|
|
161
|
+
## Coverage
|
|
162
|
+
| Scenario | SPEC AC | Status |
|
|
163
|
+
|----------|---------|--------|
|
|
164
|
+
| 1 | AC-1 | ⬜ |
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## Phase Feature (`.vibe/features/{feature-name}/phase-{N}-{name}.feature`) — Large Scope
|
|
168
|
+
|
|
169
|
+
```markdown
|
|
170
|
+
# Feature: {feature-name} - Phase {N}: {phase-name}
|
|
171
|
+
|
|
172
|
+
**SPEC**: `.vibe/specs/{feature-name}/phase-{N}-{name}.md`
|
|
173
|
+
**Master Feature**: `.vibe/features/{feature-name}/_index.feature`
|
|
174
|
+
|
|
175
|
+
## User Story (Phase Scope)
|
|
176
|
+
**As a** {user}
|
|
177
|
+
**I want** {phase-specific feature}
|
|
178
|
+
**So that** {phase-specific value}
|
|
179
|
+
|
|
180
|
+
## Scenarios
|
|
181
|
+
|
|
182
|
+
### Scenario 1: {Phase Happy Path}
|
|
183
|
+
...
|
|
184
|
+
|
|
185
|
+
## Coverage
|
|
186
|
+
| Scenario | SPEC AC | Status |
|
|
187
|
+
|----------|---------|--------|
|
|
188
|
+
| 1 | Phase {N} AC-1 | ⬜ |
|
|
189
|
+
```
|
package/skills/vibe.run/SKILL.md
CHANGED
|
@@ -994,8 +994,8 @@ If implementation requires files outside scope:
|
|
|
994
994
|
| Context Level | Action |
|
|
995
995
|
|---------------|--------|
|
|
996
996
|
| < 50% | Normal execution |
|
|
997
|
-
| 50-
|
|
998
|
-
|
|
|
997
|
+
| 50-85% | Save checkpoint, trim exploration results |
|
|
998
|
+
| 85%+ | Save checkpoint → `/new` → resume from checkpoint (`/new` discards KV prefix cache; defer it as long as safe) |
|
|
999
999
|
| Phase boundary | Always save checkpoint regardless of context level |
|
|
1000
1000
|
|
|
1001
1001
|
### 1-2. SPEC-First Gate (Level 3: Spec = Source of Truth)
|
|
@@ -64,7 +64,7 @@ Convergence Principle: loop until P1 = 0. Changed files only.
|
|
|
64
64
|
|
|
65
65
|
## Context Management
|
|
66
66
|
|
|
67
|
-
At
|
|
67
|
+
At 85%+ context: `save_memory` → `/new` → `/vibe.utils --continue` (raised from 70% — `/new` discards the entire KV prefix cache, so compacting less often preserves cache reuse)
|
|
68
68
|
|
|
69
69
|
## Git Commit Rules
|
|
70
70
|
|