start-vibing 2.0.26 → 2.0.28

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "start-vibing",
3
- "version": "2.0.26",
3
+ "version": "2.0.28",
4
4
  "description": "Setup Claude Code agents, skills, and hooks in your project. Smart copy that preserves your custom domains and configurations.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -113,6 +113,80 @@ Project-specific settings are in `.claude/config/`:
113
113
 
114
114
  ---
115
115
 
116
+ ## HTTP Requests (MANDATORY)
117
+
118
+ All HTTP requests MUST use **axios** with proper configuration.
119
+
120
+ ### Base Setup
121
+
122
+ ```typescript
123
+ // lib/api/axios.ts - Create a configured axios instance
124
+ import axios from 'axios';
125
+
126
+ export const api = axios.create({
127
+ baseURL: process.env.NEXT_PUBLIC_API_URL || '/api',
128
+ withCredentials: true, // ALWAYS for auth cookies/sessions
129
+ headers: {
130
+ 'Content-Type': 'application/json',
131
+ },
132
+ });
133
+
134
+ // Request interceptor for auth tokens
135
+ api.interceptors.request.use((config) => {
136
+ const token = localStorage.getItem('token');
137
+ if (token) {
138
+ config.headers.Authorization = `Bearer ${token}`;
139
+ }
140
+ return config;
141
+ });
142
+
143
+ // Response interceptor for error handling
144
+ api.interceptors.response.use(
145
+ (response) => response,
146
+ (error) => {
147
+ if (error.response?.status === 401) {
148
+ // Handle unauthorized
149
+ }
150
+ return Promise.reject(error);
151
+ }
152
+ );
153
+ ```
154
+
155
+ ### Usage Rules
156
+
157
+ | Rule | Description |
158
+ |------|-------------|
159
+ | ALWAYS use `api` instance | Never raw `axios.get()` or `fetch()` |
160
+ | ALWAYS `withCredentials: true` | Required for cookies/sessions |
161
+ | Extend for specific APIs | Create `api.auth`, `api.payments`, etc. |
162
+ | Type responses | `api.get<UserResponse>('/users')` |
163
+ | Handle errors centrally | Use interceptors, not try/catch everywhere |
164
+
165
+ ### When to Create API Wrapper
166
+
167
+ ```typescript
168
+ // If you call the same endpoint multiple times, create a wrapper:
169
+ // lib/api/users.ts
170
+ export const usersApi = {
171
+ getAll: () => api.get<User[]>('/users'),
172
+ getById: (id: string) => api.get<User>(`/users/${id}`),
173
+ create: (data: CreateUser) => api.post<User>('/users', data),
174
+ update: (id: string, data: UpdateUser) => api.patch<User>(`/users/${id}`, data),
175
+ delete: (id: string) => api.delete(`/users/${id}`),
176
+ };
177
+ ```
178
+
179
+ ### FORBIDDEN
180
+
181
+ | Don't | Do Instead |
182
+ |-------|------------|
183
+ | `fetch('/api/...')` | `api.get('/...')` |
184
+ | `axios.get(...)` | `api.get(...)` |
185
+ | `withCredentials: false` | Always `true` |
186
+ | Inline error handling | Use interceptors |
187
+
188
+ ---
189
+
116
190
  ## VETO Power Agents
117
191
 
118
192
  These agents CAN and MUST stop the flow if rules are violated:
@@ -1168,14 +1168,26 @@ ${error.message}
1168
1168
  ${error.action}
1169
1169
 
1170
1170
  --------------------------------------------------------------------------------
1171
- REQUIRED ACTION: Launch the following subagent to fix this issue
1171
+ STEP 1: Fix the issue using this subagent
1172
1172
  --------------------------------------------------------------------------------
1173
1173
 
1174
1174
  Task(subagent_type="${subagentInfo.agent}", prompt="${subagentInfo.prompt}")
1175
1175
 
1176
1176
  --------------------------------------------------------------------------------
1177
- AFTER FIXING: You MUST try to complete the task again to trigger re-validation.
1178
- The stop hook will check for remaining issues. Repeat until ALL CHECKS PASSED.
1177
+ STEP 2: After fixing, run the validator MANUALLY to verify
1178
+ --------------------------------------------------------------------------------
1179
+
1180
+ Bash(command="npx tsx .claude/hooks/stop-validator.ts", description="Run stop validator manually")
1181
+
1182
+ This will show if the fix worked or if there are more issues to resolve.
1183
+ DO NOT try to complete the task until the validator returns "ALL CHECKS PASSED".
1184
+
1185
+ --------------------------------------------------------------------------------
1186
+ STEP 3: Repeat Steps 1-2 until ALL CHECKS PASSED
1187
+ --------------------------------------------------------------------------------
1188
+
1189
+ Only after seeing "ALL CHECKS PASSED" from the manual validator run,
1190
+ you may proceed to complete the task.
1179
1191
  ================================================================================
1180
1192
  `;
1181
1193