@friedbotstudio/create-baseline 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -3
- package/obj/template/.claude/commands/grant-push.md +19 -0
- package/obj/template/.claude/commands/init-project.md +26 -4
- package/obj/template/.claude/hooks/consent_gate_grant.mjs +107 -0
- package/obj/template/.claude/hooks/git_commit_guard.mjs +224 -0
- package/obj/template/.claude/hooks/harness_continuation.sh +101 -34
- package/obj/template/.claude/hooks/lib/common.mjs +283 -0
- package/obj/template/.claude/hooks/lib/common.sh +1 -1
- package/obj/template/.claude/hooks/memory_session_start.sh +20 -6
- package/obj/template/.claude/hooks/memory_stop.sh +161 -2
- package/obj/template/.claude/hooks/spec_approval_guard.sh +1 -1
- package/obj/template/.claude/hooks/swarm_approval_guard.sh +1 -1
- package/obj/template/.claude/hooks/tests/fixtures/ac008_byte_equal_reference.txt +7 -7
- package/obj/template/.claude/hooks/tests/fixtures/memory_stop_landmark_baseline.txt +21 -0
- package/obj/template/.claude/hooks/tests/fixtures/regenerate-ac008.sh +47 -0
- package/obj/template/.claude/hooks/tests/memory_session_start_test.sh +7 -3
- package/obj/template/.claude/hooks/tests/memory_stop_intent_test.sh +329 -0
- package/obj/template/.claude/hooks/tests/regenerate_ac008_test.sh +99 -0
- package/obj/template/.claude/memory/README.md +8 -3
- package/obj/template/.claude/memory/backlog.md +12 -0
- package/obj/template/.claude/project.json +6 -1
- package/obj/template/.claude/settings.json +3 -4
- package/obj/template/.claude/skills/audit-baseline/audit.sh +39 -21
- package/obj/template/.claude/skills/audit-baseline/tests/fixtures/_pending_opener_only.md +3 -0
- package/obj/template/.claude/skills/audit-baseline/tests/fixtures/preamble_full_empty_body.md +4 -0
- package/obj/template/.claude/skills/audit-baseline/tests/fixtures/preamble_full_with_entries.md +9 -0
- package/obj/template/.claude/skills/audit-baseline/tests/fixtures/preamble_no_opener.md +3 -0
- package/obj/template/.claude/skills/audit-baseline/tests/fixtures/preamble_opener_only.md +3 -0
- package/obj/template/.claude/skills/audit-baseline/tests/preamble_check_test.sh +147 -0
- package/obj/template/.claude/skills/chore/SKILL.md +5 -3
- package/obj/template/.claude/skills/commit/SKILL.md +5 -4
- package/obj/template/.claude/skills/copywriting/LICENSE +21 -0
- package/obj/template/.claude/skills/copywriting/NOTICE +23 -0
- package/obj/template/.claude/skills/copywriting/SKILL.md +1 -1
- package/obj/template/.claude/skills/design-ui/SKILL.md +23 -5
- package/obj/template/.claude/skills/design-ui/references/design-vs-development.md +26 -5
- package/obj/template/.claude/skills/design-ui/references/orchestration.md +1 -0
- package/obj/template/.claude/skills/design-ui/references/state-machine.md +5 -3
- package/obj/template/.claude/skills/documentation/LICENSE +202 -0
- package/obj/template/.claude/skills/documentation/NOTICE +22 -0
- package/obj/template/.claude/skills/google-analytics/SKILL.md +129 -0
- package/obj/template/.claude/skills/google-analytics/references/audiences.md +389 -0
- package/obj/template/.claude/skills/google-analytics/references/bigquery.md +470 -0
- package/obj/template/.claude/skills/google-analytics/references/custom-dimensions.md +355 -0
- package/obj/template/.claude/skills/google-analytics/references/custom-events.md +383 -0
- package/obj/template/.claude/skills/google-analytics/references/data-management.md +416 -0
- package/obj/template/.claude/skills/google-analytics/references/debugview.md +364 -0
- package/obj/template/.claude/skills/google-analytics/references/events-fundamentals.md +398 -0
- package/obj/template/.claude/skills/google-analytics/references/gtag.md +502 -0
- package/obj/template/.claude/skills/google-analytics/references/gtm-integration.md +483 -0
- package/obj/template/.claude/skills/google-analytics/references/measurement-protocol.md +519 -0
- package/obj/template/.claude/skills/google-analytics/references/privacy.md +441 -0
- package/obj/template/.claude/skills/google-analytics/references/recommended-events.md +464 -0
- package/obj/template/.claude/skills/google-analytics/references/reporting.md +397 -0
- package/obj/template/.claude/skills/google-analytics/references/setup.md +344 -0
- package/obj/template/.claude/skills/google-analytics/references/user-tracking.md +417 -0
- package/obj/template/.claude/skills/harness/SKILL.md +3 -1
- package/obj/template/.claude/skills/humanizer/LICENSE +21 -0
- package/obj/template/.claude/skills/humanizer/NOTICE +21 -0
- package/obj/template/.claude/skills/impeccable/LICENSE +202 -0
- package/obj/template/.claude/skills/impeccable/NOTICE +24 -0
- package/obj/template/.claude/skills/memory-flush/SKILL.md +20 -4
- package/obj/template/.claude/skills/memory-flush/sweep.py +74 -6
- package/obj/template/.claude/skills/memory-flush/tests/run.sh +300 -1
- package/obj/template/.claude/skills/optimize-seo/SKILL.md +313 -0
- package/obj/template/.claude/skills/optimize-seo/scripts/pagespeed.mjs +197 -0
- package/obj/template/.claude/skills/pagespeed-insights/LICENSE.md +37 -0
- package/obj/template/.claude/skills/pagespeed-insights/SKILL.md +446 -0
- package/obj/template/.claude/skills/pagespeed-insights/reference.md +50 -0
- package/obj/template/.claude/skills/tdd/SKILL.md +2 -1
- package/obj/template/.claude/skills/tdd/drift_check.py +180 -0
- package/obj/template/.claude/skills/tdd/tests/drift_check_test.sh +190 -0
- package/obj/template/.claude/skills/tdd/tests/run.sh +21 -0
- package/obj/template/.claude/skills/technical-tutorials/LICENSE +21 -0
- package/obj/template/.claude/skills/technical-tutorials/NOTICE +23 -0
- package/obj/template/.claude/skills/technical-tutorials/SKILL.md +1 -1
- package/obj/template/.claude/skills/triage/SKILL.md +8 -3
- package/obj/template/CLAUDE.md +37 -26
- package/obj/template/docs/init/seed.md +38 -23
- package/obj/template/manifest.json +80 -33
- package/package.json +1 -1
- package/src/CLAUDE.template.md +37 -26
- package/src/memory/backlog.template.md +12 -0
- package/src/project.template.json +6 -1
- package/src/seed.template.md +38 -23
- package/src/settings.template.json +3 -4
- package/obj/template/.claude/hooks/consent_gate_grant.sh +0 -89
- package/obj/template/.claude/hooks/git_commit_guard.sh +0 -93
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
# GA4 User ID and Cross-Device Tracking
|
|
2
|
+
|
|
3
|
+
Complete guide to User ID implementation, user properties, and cross-device tracking in GA4.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
User ID enables cross-device tracking for authenticated users. User properties allow tracking custom user attributes across all events. Together, they provide a unified view of user behaviour across devices and sessions.
|
|
8
|
+
|
|
9
|
+
## User ID Implementation
|
|
10
|
+
|
|
11
|
+
### What is User ID
|
|
12
|
+
|
|
13
|
+
- Persistent identifier for authenticated users
|
|
14
|
+
- Enables cross-device tracking
|
|
15
|
+
- Requires explicit user authentication
|
|
16
|
+
- Must not contain PII (hash if needed)
|
|
17
|
+
- Set when user logs in, cleared on logout
|
|
18
|
+
|
|
19
|
+
### Implementation Methods
|
|
20
|
+
|
|
21
|
+
#### Method 1: gtag.js
|
|
22
|
+
|
|
23
|
+
**On Login:**
|
|
24
|
+
```javascript
|
|
25
|
+
// Set User ID when user logs in
|
|
26
|
+
gtag('config', 'G-XXXXXXXXXX', {
|
|
27
|
+
'user_id': 'USER_12345'
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
// Or use gtag('set')
|
|
31
|
+
gtag('set', 'user_id', 'USER_12345');
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**On Logout:**
|
|
35
|
+
```javascript
|
|
36
|
+
// Clear User ID - MUST use null, never empty string
|
|
37
|
+
gtag('set', 'user_id', null);
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
#### Method 2: GTM Data Layer
|
|
41
|
+
|
|
42
|
+
**Push to Data Layer:**
|
|
43
|
+
```javascript
|
|
44
|
+
// On login
|
|
45
|
+
dataLayer.push({
|
|
46
|
+
'user_id': 'USER_12345'
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
// On logout
|
|
50
|
+
dataLayer.push({
|
|
51
|
+
'user_id': null
|
|
52
|
+
});
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**GTM Configuration:**
|
|
56
|
+
1. Create Data Layer Variable: `user_id`
|
|
57
|
+
2. In GA4 Configuration tag, add parameter:
|
|
58
|
+
- Parameter: `user_id`
|
|
59
|
+
- Value: `{{DL - User ID}}`
|
|
60
|
+
|
|
61
|
+
#### Method 3: Measurement Protocol
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"client_id": "client_123",
|
|
66
|
+
"user_id": "USER_12345",
|
|
67
|
+
"events": [
|
|
68
|
+
{
|
|
69
|
+
"name": "login",
|
|
70
|
+
"params": {
|
|
71
|
+
"method": "email"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### User ID Best Practices
|
|
79
|
+
|
|
80
|
+
| Do | Don't |
|
|
81
|
+
|----|-------|
|
|
82
|
+
| Use internal user IDs | Use email addresses |
|
|
83
|
+
| Hash sensitive IDs | Use phone numbers |
|
|
84
|
+
| Set on login | Use PII directly |
|
|
85
|
+
| Clear on logout | Use empty string to clear |
|
|
86
|
+
| Document ID format | Expose ID format publicly |
|
|
87
|
+
|
|
88
|
+
### User ID Format Examples
|
|
89
|
+
|
|
90
|
+
**Good:**
|
|
91
|
+
- `USER_12345` (internal ID)
|
|
92
|
+
- `abc123def456` (hashed value)
|
|
93
|
+
- `u_a1b2c3d4` (prefixed ID)
|
|
94
|
+
|
|
95
|
+
**Bad:**
|
|
96
|
+
- `john@example.com` (email - PII)
|
|
97
|
+
- `+1-555-123-4567` (phone - PII)
|
|
98
|
+
- `John Smith` (name - PII)
|
|
99
|
+
|
|
100
|
+
## Reporting Identity
|
|
101
|
+
|
|
102
|
+
Configure how GA4 identifies users across sessions.
|
|
103
|
+
|
|
104
|
+
### Path
|
|
105
|
+
|
|
106
|
+
Admin -> Data Settings -> Reporting Identity
|
|
107
|
+
|
|
108
|
+
### Options
|
|
109
|
+
|
|
110
|
+
| Option | Description | Best For |
|
|
111
|
+
|--------|-------------|----------|
|
|
112
|
+
| Blended | User ID + Device ID + Google Signals | Most comprehensive |
|
|
113
|
+
| Observed | User ID + Device ID only | More privacy-focused |
|
|
114
|
+
| Device-based | Device ID only | Most restrictive |
|
|
115
|
+
|
|
116
|
+
### Blended (Recommended)
|
|
117
|
+
|
|
118
|
+
- Uses User ID when available
|
|
119
|
+
- Falls back to Device ID + Google Signals
|
|
120
|
+
- Most complete user view
|
|
121
|
+
- Enables cross-device insights
|
|
122
|
+
|
|
123
|
+
### Observed
|
|
124
|
+
|
|
125
|
+
- Uses User ID and Device ID only
|
|
126
|
+
- No Google Signals data
|
|
127
|
+
- More privacy-focused
|
|
128
|
+
- Fewer users identified
|
|
129
|
+
|
|
130
|
+
### Device-based
|
|
131
|
+
|
|
132
|
+
- Uses only client_id (device)
|
|
133
|
+
- No cross-device tracking
|
|
134
|
+
- Maximum privacy
|
|
135
|
+
- Limited user insights
|
|
136
|
+
|
|
137
|
+
## User Properties
|
|
138
|
+
|
|
139
|
+
### What are User Properties
|
|
140
|
+
|
|
141
|
+
- Custom attributes set at user level
|
|
142
|
+
- Persist across all events from that user
|
|
143
|
+
- Different from event parameters
|
|
144
|
+
- Must be registered as custom dimensions to report
|
|
145
|
+
|
|
146
|
+
### Limits
|
|
147
|
+
|
|
148
|
+
| Limit | Value |
|
|
149
|
+
|-------|-------|
|
|
150
|
+
| User properties per property | 25 |
|
|
151
|
+
| Property name length | 24 characters |
|
|
152
|
+
| Property value length | 36 characters |
|
|
153
|
+
|
|
154
|
+
### Setting User Properties
|
|
155
|
+
|
|
156
|
+
**gtag.js:**
|
|
157
|
+
```javascript
|
|
158
|
+
gtag('set', 'user_properties', {
|
|
159
|
+
'user_tier': 'premium',
|
|
160
|
+
'account_age_days': 365,
|
|
161
|
+
'preferred_category': 'electronics'
|
|
162
|
+
});
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
**GTM Data Layer:**
|
|
166
|
+
```javascript
|
|
167
|
+
dataLayer.push({
|
|
168
|
+
'user_properties': {
|
|
169
|
+
'user_tier': 'premium',
|
|
170
|
+
'account_age_days': 365
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
**Measurement Protocol:**
|
|
176
|
+
```json
|
|
177
|
+
{
|
|
178
|
+
"client_id": "client_123",
|
|
179
|
+
"user_properties": {
|
|
180
|
+
"user_tier": {
|
|
181
|
+
"value": "premium"
|
|
182
|
+
},
|
|
183
|
+
"account_age_days": {
|
|
184
|
+
"value": 365
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"events": [...]
|
|
188
|
+
}
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### Common User Properties
|
|
192
|
+
|
|
193
|
+
| Property | Values | Use Case |
|
|
194
|
+
|----------|--------|----------|
|
|
195
|
+
| user_tier | free, premium, enterprise | Segment by subscription |
|
|
196
|
+
| signup_date | YYYY-MM-DD | Cohort analysis |
|
|
197
|
+
| subscription_status | active, trial, cancelled | Revenue analysis |
|
|
198
|
+
| customer_ltv | Numeric bucket | Value segmentation |
|
|
199
|
+
| industry | Technology, Finance, etc. | B2B analysis |
|
|
200
|
+
| company_size | 1-10, 11-50, 51-200, etc. | Enterprise targeting |
|
|
201
|
+
| interests | Category string | Personalisation |
|
|
202
|
+
|
|
203
|
+
### PII Considerations
|
|
204
|
+
|
|
205
|
+
**Avoid:**
|
|
206
|
+
- email
|
|
207
|
+
- name
|
|
208
|
+
- phone_number
|
|
209
|
+
- address
|
|
210
|
+
- credit_card
|
|
211
|
+
|
|
212
|
+
**Use Instead:**
|
|
213
|
+
- email_domain
|
|
214
|
+
- first_name_initial
|
|
215
|
+
- user_segment
|
|
216
|
+
- location_region
|
|
217
|
+
|
|
218
|
+
## Cross-Device Tracking
|
|
219
|
+
|
|
220
|
+
### How It Works
|
|
221
|
+
|
|
222
|
+
1. User visits on mobile (logged in) -> user_id set
|
|
223
|
+
2. User visits on desktop (logged in) -> same user_id
|
|
224
|
+
3. GA4 stitches sessions together
|
|
225
|
+
4. Reports show unified user journey
|
|
226
|
+
|
|
227
|
+
### Requirements
|
|
228
|
+
|
|
229
|
+
- User ID implemented and set on login
|
|
230
|
+
- Google Signals enabled (for Blended identity)
|
|
231
|
+
- Users signed into Google accounts
|
|
232
|
+
- User opt-in to personalisation
|
|
233
|
+
|
|
234
|
+
### Enabling Google Signals
|
|
235
|
+
|
|
236
|
+
1. Admin -> Data Settings -> Data Collection
|
|
237
|
+
2. Enable Google Signals
|
|
238
|
+
3. Accept terms
|
|
239
|
+
4. Wait 24 hours for data
|
|
240
|
+
|
|
241
|
+
### Cross-Domain Tracking
|
|
242
|
+
|
|
243
|
+
For User ID across domains:
|
|
244
|
+
|
|
245
|
+
**gtag.js Configuration:**
|
|
246
|
+
```javascript
|
|
247
|
+
gtag('config', 'G-XXXXXXXXXX', {
|
|
248
|
+
'linker': {
|
|
249
|
+
'domains': ['example.com', 'shop.example.com', 'blog.example.com']
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
**What This Does:**
|
|
255
|
+
- Passes client_id between domains via URL parameter
|
|
256
|
+
- Preserves user_id if set
|
|
257
|
+
- Maintains session continuity
|
|
258
|
+
- Uses `_gl` URL parameter
|
|
259
|
+
|
|
260
|
+
**GTM Setup:**
|
|
261
|
+
1. In GA4 Configuration tag
|
|
262
|
+
2. Expand Configuration Settings
|
|
263
|
+
3. Add Fields to Set:
|
|
264
|
+
- Field Name: linker
|
|
265
|
+
- Value: `{"domains": ["example.com", "shop.example.com"]}`
|
|
266
|
+
|
|
267
|
+
### Testing Cross-Domain
|
|
268
|
+
|
|
269
|
+
1. Visit domain1.com
|
|
270
|
+
2. Click link to domain2.com
|
|
271
|
+
3. Verify `_gl` parameter in URL
|
|
272
|
+
4. Check DebugView shows same user
|
|
273
|
+
5. Confirm session continues
|
|
274
|
+
|
|
275
|
+
## User-Scoped Custom Dimensions
|
|
276
|
+
|
|
277
|
+
Register user properties for reporting:
|
|
278
|
+
|
|
279
|
+
### Registration
|
|
280
|
+
|
|
281
|
+
1. Admin -> Data Display -> Custom Definitions
|
|
282
|
+
2. Click "Create custom dimension"
|
|
283
|
+
3. Configure:
|
|
284
|
+
- Dimension name: "User Tier"
|
|
285
|
+
- Scope: User
|
|
286
|
+
- User property: `user_tier`
|
|
287
|
+
4. Save
|
|
288
|
+
|
|
289
|
+
### Using in Reports
|
|
290
|
+
|
|
291
|
+
- Add as dimension in Explorations
|
|
292
|
+
- Filter/segment by dimension
|
|
293
|
+
- Analyse user cohorts
|
|
294
|
+
- Compare user segments
|
|
295
|
+
|
|
296
|
+
## User Data Deletion
|
|
297
|
+
|
|
298
|
+
### GDPR/CCPA Compliance
|
|
299
|
+
|
|
300
|
+
**Path:** Admin -> Data Settings -> Data Deletion Requests
|
|
301
|
+
|
|
302
|
+
### Process
|
|
303
|
+
|
|
304
|
+
1. Click "Create deletion request"
|
|
305
|
+
2. Select parameter: User ID
|
|
306
|
+
3. Enter User ID value to delete
|
|
307
|
+
4. Choose scope: All data or date range
|
|
308
|
+
5. Submit request
|
|
309
|
+
|
|
310
|
+
### Processing
|
|
311
|
+
|
|
312
|
+
- Takes up to 72 hours
|
|
313
|
+
- Deletes ALL events for that User ID
|
|
314
|
+
- Cannot be undone
|
|
315
|
+
- Confirmation email sent
|
|
316
|
+
|
|
317
|
+
### Use Cases
|
|
318
|
+
|
|
319
|
+
- GDPR right to erasure requests
|
|
320
|
+
- CCPA deletion requests
|
|
321
|
+
- User account deletion
|
|
322
|
+
- Data cleanup
|
|
323
|
+
|
|
324
|
+
## Testing User ID
|
|
325
|
+
|
|
326
|
+
### Verification Workflow
|
|
327
|
+
|
|
328
|
+
1. **Implement User ID**
|
|
329
|
+
2. **Enable DebugView**
|
|
330
|
+
3. **Test Login:**
|
|
331
|
+
- Before login: Events have only client_id
|
|
332
|
+
- After login: Verify user_id in event details
|
|
333
|
+
4. **Test Logout:**
|
|
334
|
+
- After logout: Verify user_id cleared/null
|
|
335
|
+
5. **Test Cross-Device:**
|
|
336
|
+
- Login on Device 1
|
|
337
|
+
- Login on Device 2 with same account
|
|
338
|
+
- Verify same user_id
|
|
339
|
+
|
|
340
|
+
### DebugView Verification
|
|
341
|
+
|
|
342
|
+
1. Open Admin -> DebugView
|
|
343
|
+
2. Click any event
|
|
344
|
+
3. Expand event details
|
|
345
|
+
4. Check "User ID" field populated
|
|
346
|
+
|
|
347
|
+
### Reports Verification
|
|
348
|
+
|
|
349
|
+
- Wait 24-48 hours
|
|
350
|
+
- Check user count vs sessions
|
|
351
|
+
- Lower user count = User ID working (same user, multiple sessions)
|
|
352
|
+
|
|
353
|
+
## Common Issues
|
|
354
|
+
|
|
355
|
+
### User ID Not Appearing
|
|
356
|
+
|
|
357
|
+
**Causes:**
|
|
358
|
+
- Set after gtag config
|
|
359
|
+
- Cleared immediately
|
|
360
|
+
- Wrong parameter name
|
|
361
|
+
|
|
362
|
+
**Solutions:**
|
|
363
|
+
1. Set user_id in config call
|
|
364
|
+
2. Verify login flow
|
|
365
|
+
3. Check parameter is 'user_id' exactly
|
|
366
|
+
|
|
367
|
+
### Cross-Device Not Working
|
|
368
|
+
|
|
369
|
+
**Causes:**
|
|
370
|
+
- Different User IDs
|
|
371
|
+
- User ID not set on all devices
|
|
372
|
+
- Reporting Identity not configured
|
|
373
|
+
|
|
374
|
+
**Solutions:**
|
|
375
|
+
1. Verify same User ID across devices
|
|
376
|
+
2. Ensure login sets User ID
|
|
377
|
+
3. Check Reporting Identity = Blended
|
|
378
|
+
|
|
379
|
+
### User Properties Not in Reports
|
|
380
|
+
|
|
381
|
+
**Cause:** Not registered as custom dimensions
|
|
382
|
+
|
|
383
|
+
**Solution:**
|
|
384
|
+
1. Register as user-scoped custom dimension
|
|
385
|
+
2. Wait 24-48 hours
|
|
386
|
+
3. Use in Explorations
|
|
387
|
+
|
|
388
|
+
## Quick Reference
|
|
389
|
+
|
|
390
|
+
### Set User ID
|
|
391
|
+
|
|
392
|
+
```javascript
|
|
393
|
+
gtag('config', 'G-XXXXXXXXXX', {
|
|
394
|
+
'user_id': 'USER_123'
|
|
395
|
+
});
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
### Set User Properties
|
|
399
|
+
|
|
400
|
+
```javascript
|
|
401
|
+
gtag('set', 'user_properties', {
|
|
402
|
+
'user_tier': 'premium'
|
|
403
|
+
});
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
### Clear User ID
|
|
407
|
+
|
|
408
|
+
```javascript
|
|
409
|
+
gtag('set', 'user_id', null);
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
### Limits
|
|
413
|
+
|
|
414
|
+
- 25 user properties per property
|
|
415
|
+
- User property name: 24 characters max
|
|
416
|
+
- User property value: 36 characters max
|
|
417
|
+
- User ID: Must not contain PII
|
|
@@ -105,12 +105,14 @@ The phases the harness loops through, in order:
|
|
|
105
105
|
|
|
106
106
|
```
|
|
107
107
|
intake → scout → research → spec → /approve-spec → tdd → simplify →
|
|
108
|
-
security → integrate → document → archive →
|
|
108
|
+
security → integrate → document → archive → memory-flush →
|
|
109
|
+
/grant-commit → commit
|
|
109
110
|
```
|
|
110
111
|
|
|
111
112
|
- Phases listed in `workflow.json → exceptions` are skipped.
|
|
112
113
|
- Non-git projects auto-except `grant-commit` and `commit`; the workflow ends after `/archive`.
|
|
113
114
|
- The four-pillar framing (Intake analysis · Track alignment · Implementation · Tying open ends) is documentary; the actual execution model is one phase per loop iteration, with the loop continuing through every non-gated boundary until it exits cleanly.
|
|
115
|
+
- Inside `/tdd`'s seeded worker chain, the harness inlines a **drift-check-tick** task between the last `design-ui-tick` (or `verify-tick` when no design rows) and `tdd-finalize`. It invokes `python3 .claude/skills/tdd/drift_check.py --slug <slug>` against the approved spec and the branch diff. Exit 0 (zero unresolved) → continue to `tdd-finalize`; exit 1 (≥ 1 unresolved) → EXIT LOOP with YIELD (`reason: "drift analysis: <N> unresolved items"`). Drift failures stop-and-surface (NO auto-loop) — the user fixes the impl gap or amends the spec + re-`/approve-spec`s. The drift report lands at `.claude/state/drift/<slug>.md`. `chore`-track workflows (no spec on disk) exit 0 with "no spec; skipped" and proceed to `tdd-finalize`.
|
|
114
116
|
|
|
115
117
|
### Swarm vs solo at Phase 6
|
|
116
118
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) blader (https://github.com/blader/humanizer)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
humanizer
|
|
2
|
+
=========
|
|
3
|
+
|
|
4
|
+
This skill is vendored from the `humanizer` skill published by @blader and is
|
|
5
|
+
redistributed here under the terms of the MIT License (see LICENSE in this
|
|
6
|
+
directory).
|
|
7
|
+
|
|
8
|
+
Upstream:
|
|
9
|
+
Repository: https://github.com/blader/humanizer
|
|
10
|
+
Author: @blader
|
|
11
|
+
|
|
12
|
+
Vendored into: .claude/skills/humanizer/
|
|
13
|
+
Vendored on: 2026-05-15 (this commit) — prior install date unknown; LICENSE
|
|
14
|
+
+ NOTICE added retroactively as part of the licensing-attribution
|
|
15
|
+
drift fix in the branch-aware-git-policy workflow.
|
|
16
|
+
|
|
17
|
+
Local changes:
|
|
18
|
+
- Frontmatter `owner: baseline` added so the audit-baseline drift check
|
|
19
|
+
tracks this file as a shipped baseline artifact. The MIT license permits
|
|
20
|
+
this redistribution; attribution is preserved in the SKILL.md frontmatter
|
|
21
|
+
`description` block, which retains the upstream credit line.
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|