start-vibing 1.1.1

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.
Files changed (47) hide show
  1. package/README.md +149 -0
  2. package/dist/cli.js +199 -0
  3. package/package.json +42 -0
  4. package/template/.claude/CLAUDE.md +168 -0
  5. package/template/.claude/README.md +208 -0
  6. package/template/.claude/agents/analyzer.md +139 -0
  7. package/template/.claude/agents/commit-manager.md +231 -0
  8. package/template/.claude/agents/documenter.md +160 -0
  9. package/template/.claude/agents/domain-updater.md +200 -0
  10. package/template/.claude/agents/final-validator.md +182 -0
  11. package/template/.claude/agents/orchestrator.md +136 -0
  12. package/template/.claude/agents/quality-checker.md +264 -0
  13. package/template/.claude/agents/research.md +262 -0
  14. package/template/.claude/agents/security-auditor.md +199 -0
  15. package/template/.claude/agents/tester.md +572 -0
  16. package/template/.claude/agents/ui-ux-reviewer.md +180 -0
  17. package/template/.claude/commands/feature.md +102 -0
  18. package/template/.claude/commands/fix.md +80 -0
  19. package/template/.claude/commands/research.md +107 -0
  20. package/template/.claude/commands/validate.md +72 -0
  21. package/template/.claude/config/README.md +30 -0
  22. package/template/.claude/config/domain-mapping.json +26 -0
  23. package/template/.claude/config/project-config.json +53 -0
  24. package/template/.claude/config/quality-gates.json +46 -0
  25. package/template/.claude/config/security-rules.json +45 -0
  26. package/template/.claude/config/testing-config.json +168 -0
  27. package/template/.claude/hooks/SETUP.md +181 -0
  28. package/template/.claude/hooks/post-tool-use.py +155 -0
  29. package/template/.claude/hooks/pre-tool-use.py +159 -0
  30. package/template/.claude/hooks/security-check.js +202 -0
  31. package/template/.claude/hooks/stop-validation.py +155 -0
  32. package/template/.claude/hooks/user-prompt-submit.py +277 -0
  33. package/template/.claude/hooks/validate-commit.py +200 -0
  34. package/template/.claude/hooks/workflow-manager.py +350 -0
  35. package/template/.claude/settings.json +269 -0
  36. package/template/.claude/skills/codebase-knowledge/SKILL.md +145 -0
  37. package/template/.claude/skills/codebase-knowledge/TEMPLATE.md +35 -0
  38. package/template/.claude/skills/codebase-knowledge/domains/claude-system.md +321 -0
  39. package/template/.claude/skills/docs-tracker/SKILL.md +239 -0
  40. package/template/.claude/skills/final-check/SKILL.md +284 -0
  41. package/template/.claude/skills/quality-gate/SKILL.md +278 -0
  42. package/template/.claude/skills/research-cache/SKILL.md +207 -0
  43. package/template/.claude/skills/security-scan/SKILL.md +206 -0
  44. package/template/.claude/skills/test-coverage/SKILL.md +441 -0
  45. package/template/.claude/skills/ui-ux-audit/SKILL.md +254 -0
  46. package/template/.claude/workflow-state.schema.json +200 -0
  47. package/template/CLAUDE.md +96 -0
@@ -0,0 +1,207 @@
1
+ ---
2
+ name: research-cache
3
+ description: Caches research findings to avoid redundant web searches. Stores best practices by topic with sources and dates. Use before researching to check existing knowledge.
4
+ allowed-tools: Read, Write, Glob, Grep
5
+ ---
6
+
7
+ # Research Cache - Best Practices Storage
8
+
9
+ ## Purpose
10
+
11
+ This skill caches research findings to avoid redundant web searches and maintain institutional knowledge about best practices.
12
+
13
+ ---
14
+
15
+ ## Structure
16
+
17
+ ```
18
+ .claude/skills/research-cache/
19
+ ├── SKILL.md # This file
20
+ ├── TEMPLATE.md # Template for research findings
21
+ └── cache/ # Cached research by topic
22
+ ├── react-server-components.md
23
+ ├── typescript-strict.md
24
+ └── [topic].md
25
+ ```
26
+
27
+ ---
28
+
29
+ ## How It Works
30
+
31
+ ### Before Research
32
+
33
+ 1. **Check cache first** - Look for existing research on the topic
34
+ 2. **Verify freshness** - Research older than 6 months may need updating
35
+ 3. **Reuse findings** - If recent research exists, use it directly
36
+
37
+ ### After Research
38
+
39
+ 1. **Create cache file** - Document findings in `cache/[topic].md`
40
+ 2. **Follow template** - Use consistent structure
41
+ 3. **Include sources** - Always cite URLs and dates
42
+ 4. **Tag relevance** - Mark which parts of stack it applies to
43
+
44
+ ---
45
+
46
+ ## Cache File Template
47
+
48
+ ```markdown
49
+ # Research: [Topic Name]
50
+
51
+ ## Metadata
52
+ - **Date:** YYYY-MM-DD
53
+ - **Researcher:** [agent/session]
54
+ - **Freshness:** [fresh|stale|outdated]
55
+ - **Stack:** [bun|typescript|mongodb|react|all]
56
+
57
+ ## Problem Statement
58
+ [What problem were we trying to solve?]
59
+
60
+ ## Search Queries
61
+ 1. "[query 1]"
62
+ 2. "[query 2]"
63
+ 3. "[query 3]"
64
+
65
+ ## Key Findings
66
+
67
+ ### Finding 1: [Title]
68
+ **Source:** [URL]
69
+ **Date:** [publication date]
70
+ **Relevance:** [high|medium|low]
71
+
72
+ [Summary of finding]
73
+
74
+ **Code Example:**
75
+ ```[language]
76
+ [code]
77
+ ```
78
+
79
+ **Applies When:**
80
+ - [condition 1]
81
+ - [condition 2]
82
+
83
+ ### Finding 2: [Title]
84
+ ...
85
+
86
+ ## Recommendations
87
+
88
+ ### DO
89
+ 1. [Best practice 1]
90
+ 2. [Best practice 2]
91
+
92
+ ### AVOID
93
+ 1. [Anti-pattern 1]
94
+ 2. [Anti-pattern 2]
95
+
96
+ ### CONSIDER
97
+ 1. [Alternative approach 1]
98
+ 2. [Alternative approach 2]
99
+
100
+ ## Implementation Notes
101
+
102
+ ### For This Project
103
+ - [Specific note for your project]
104
+ - [Integration point]
105
+
106
+ ### Gotchas
107
+ - [Warning 1]
108
+ - [Warning 2]
109
+
110
+ ## Sources
111
+
112
+ | Title | URL | Date | Relevance |
113
+ |-------|-----|------|-----------|
114
+ | [Source 1] | [url] | [date] | [high/med/low] |
115
+ | [Source 2] | [url] | [date] | [high/med/low] |
116
+
117
+ ## Related Topics
118
+ - [[related-topic-1]]
119
+ - [[related-topic-2]]
120
+ ```
121
+
122
+ ---
123
+
124
+ ## Usage Patterns
125
+
126
+ ### Quick Lookup
127
+
128
+ ```bash
129
+ # Check if research exists
130
+ ls .claude/skills/research-cache/cache/
131
+
132
+ # Read specific research
133
+ cat .claude/skills/research-cache/cache/[topic].md
134
+ ```
135
+
136
+ ### Search Cached Research
137
+
138
+ ```bash
139
+ # Find all research mentioning a term
140
+ grep -r "websocket" .claude/skills/research-cache/cache/
141
+ ```
142
+
143
+ ### Check Freshness
144
+
145
+ ```bash
146
+ # Find research older than 6 months
147
+ find .claude/skills/research-cache/cache/ -mtime +180
148
+ ```
149
+
150
+ ---
151
+
152
+ ## Integration with Research Agent
153
+
154
+ The **research agent** uses this skill to:
155
+
156
+ 1. **Check existing research** before web searching
157
+ 2. **Store new findings** after web research
158
+ 3. **Update stale research** when patterns change
159
+ 4. **Cross-reference** findings across topics
160
+
161
+ ---
162
+
163
+ ## Freshness Guidelines
164
+
165
+ | Age | Status | Action |
166
+ |-----|--------|--------|
167
+ | < 3 months | Fresh | Use directly |
168
+ | 3-6 months | Aging | Verify still valid |
169
+ | 6-12 months | Stale | Update recommended |
170
+ | > 12 months | Outdated | Full re-research needed |
171
+
172
+ ---
173
+
174
+ ## Topic Naming Convention
175
+
176
+ Use kebab-case descriptive names:
177
+
178
+ ```
179
+ react-server-components.md # Technology + feature
180
+ typescript-strict-mode.md # Language + specific setting
181
+ mongodb-indexes.md # Database + concept
182
+ bun-docker-deploy.md # Runtime + deployment context
183
+ error-handling-patterns.md # Generic pattern
184
+ ```
185
+
186
+ ---
187
+
188
+ ## Rules
189
+
190
+ ### MANDATORY
191
+
192
+ 1. **Always check cache first** - Don't duplicate research
193
+ 2. **Always include sources** - No unsourced recommendations
194
+ 3. **Always date entries** - Freshness matters
195
+ 4. **Always follow template** - Consistency helps retrieval
196
+
197
+ ### FORBIDDEN
198
+
199
+ 1. **Cache without sources** - All findings need citations
200
+ 2. **Ignore freshness** - Old research may be wrong
201
+ 3. **Duplicate topics** - One file per topic, update existing
202
+
203
+ ---
204
+
205
+ ## Version
206
+
207
+ - **v1.0.0** - Initial implementation
@@ -0,0 +1,206 @@
1
+ ---
2
+ name: security-scan
3
+ description: Audits code security against OWASP Top 10. Validates user ID from session, detects sensitive data leaks, verifies Zod validation. HAS VETO POWER - blocks insecure code.
4
+ allowed-tools: Read, Grep, Glob, Bash
5
+ ---
6
+
7
+ # Security Scan - Security Audit System
8
+
9
+ ## VETO POWER
10
+
11
+ > **WARNING:** This skill HAS VETO POWER.
12
+ > If critical vulnerability detected, MUST:
13
+ >
14
+ > 1. STOP implementation
15
+ > 2. REPORT vulnerability
16
+ > 3. REQUIRE fix before proceeding
17
+
18
+ ---
19
+
20
+ ## Purpose
21
+
22
+ This skill audits code security:
23
+
24
+ - **Validates** user ID comes from session (NEVER from request)
25
+ - **Detects** sensitive data being sent to frontend
26
+ - **Verifies** Zod validation on all routes
27
+ - **Audits** against OWASP Top 10
28
+ - **Blocks** commits with critical vulnerabilities
29
+
30
+ ---
31
+
32
+ ## Critical Security Rules
33
+
34
+ ### 1. USER ID ALWAYS FROM SESSION
35
+
36
+ > **NEVER** trust user ID from frontend.
37
+ > **ALWAYS** extract from `ctx.session.userId` or `ctx.user._id`.
38
+
39
+ ```typescript
40
+ // WRONG - VULNERABLE (IMMEDIATE VETO)
41
+ async function getData({ userId }: { userId: string }) {
42
+ return db.find({ userId }); // userId can be manipulated!
43
+ }
44
+
45
+ // CORRECT
46
+ async function getData({ ctx }: { ctx: Context }) {
47
+ const userId = ctx.user._id; // Always from session
48
+ return db.find({ userId });
49
+ }
50
+ ```
51
+
52
+ ### 2. SENSITIVE DATA NEVER TO FRONTEND
53
+
54
+ > **NEVER** send to frontend:
55
+ >
56
+ > - Passwords (even hashed)
57
+ > - API tokens
58
+ > - Secret keys
59
+ > - Other users' data
60
+ > - Stack traces in production
61
+
62
+ ```typescript
63
+ // WRONG - DATA LEAK (IMMEDIATE VETO)
64
+ return {
65
+ user: await UserModel.findById(id), // Includes passwordHash!
66
+ };
67
+
68
+ // CORRECT
69
+ return {
70
+ user: user.toPublic(), // Sanitization method
71
+ };
72
+ ```
73
+
74
+ ### 3. ZOD VALIDATION REQUIRED
75
+
76
+ > **EVERY** tRPC route MUST have `.input(z.object({...}))`.
77
+ > Unvalidated inputs are attack vectors.
78
+
79
+ ```typescript
80
+ // WRONG - NO VALIDATION (IMMEDIATE VETO)
81
+ .mutation(async ({ input }) => {
82
+ await db.create(input); // input can have anything!
83
+ })
84
+
85
+ // CORRECT
86
+ .input(createSchema) // Zod schema
87
+ .mutation(async ({ input }) => {
88
+ await db.create(input); // input is validated
89
+ })
90
+ ```
91
+
92
+ ---
93
+
94
+ ## OWASP Top 10 Checklist
95
+
96
+ ### A01: Broken Access Control
97
+
98
+ - [ ] All protected routes use `protectedProcedure`?
99
+ - [ ] User ID from session, not input?
100
+ - [ ] Resources filtered by user/tenant?
101
+
102
+ ### A02: Cryptographic Failures
103
+
104
+ - [ ] Passwords hashed with bcrypt (salt >= 10)?
105
+ - [ ] Tokens generated with crypto.randomBytes?
106
+ - [ ] Cookies with HttpOnly, Secure, SameSite?
107
+ - [ ] No secrets in code (use env vars)?
108
+
109
+ ### A03: Injection
110
+
111
+ - [ ] Queries use Mongoose (prevents NoSQL injection)?
112
+ - [ ] Inputs validated with Zod?
113
+ - [ ] No string concatenation in queries?
114
+
115
+ ### A07: Authentication Failures
116
+
117
+ - [ ] Passwords with minimum requirements?
118
+ - [ ] Brute force protection?
119
+ - [ ] Sessions invalidated on logout?
120
+ - [ ] Tokens with expiration?
121
+
122
+ ---
123
+
124
+ ## Detection Patterns
125
+
126
+ ### Detect User ID from Input (VETO)
127
+
128
+ ```bash
129
+ grep -r "input\.userId\|input\.user_id\|{ userId }" server/ --include="*.ts"
130
+ ```
131
+
132
+ ### Detect Password Return (VETO)
133
+
134
+ ```bash
135
+ grep -r "passwordHash\|password:" server/ --include="*.ts"
136
+ ```
137
+
138
+ ### Detect Route Without Validation (VETO)
139
+
140
+ ```bash
141
+ grep -A5 "Procedure\." server/ --include="*.ts" | grep -v ".input("
142
+ ```
143
+
144
+ ---
145
+
146
+ ## Output Format
147
+
148
+ ### Approved
149
+
150
+ ```markdown
151
+ ## SECURITY SCAN - APPROVED
152
+
153
+ ### Scope
154
+
155
+ - **Files:** X
156
+ - **Routes:** Y
157
+
158
+ ### Checks
159
+
160
+ - [x] User ID always from session
161
+ - [x] No sensitive data in response
162
+ - [x] All routes with Zod validation
163
+ - [x] OWASP Top 10 OK
164
+
165
+ **STATUS: APPROVED**
166
+ ```
167
+
168
+ ### Vetoed
169
+
170
+ ```markdown
171
+ ## SECURITY SCAN - VETOED
172
+
173
+ ### CRITICAL VULNERABILITY
174
+
175
+ **Type:** User ID from Input
176
+ **File:** `server/routers/example.ts:45`
177
+ **Risk:** Any user can access other users' data
178
+
179
+ **Fix:** Use `ctx.user._id` instead of `input.userId`
180
+
181
+ **STATUS: VETOED** - Fix before proceeding
182
+ ```
183
+
184
+ ---
185
+
186
+ ## VETO Rules
187
+
188
+ ### IMMEDIATE VETO
189
+
190
+ 1. User ID from input/request body
191
+ 2. Password returned in response
192
+ 3. API tokens exposed
193
+ 4. Protected route without `protectedProcedure`
194
+ 5. Query without user/tenant filter
195
+
196
+ ### VETO BEFORE MERGE
197
+
198
+ 1. Route without Zod validation
199
+ 2. Unsanitized sensitive data
200
+ 3. bun audit (or npm audit) with critical vulnerabilities
201
+
202
+ ---
203
+
204
+ ## Version
205
+
206
+ - **v2.0.0** - Generic template