waitsec 0.4.5 → 0.5.2
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/.cursor-plugin/plugin.json +1 -1
- package/README.md +18 -12
- package/bin/cli.mjs +15 -10
- package/package.json +1 -1
- package/plugin.json +1 -1
- package/skills/{waitsec-core → waitsec}/SKILL.md +20 -18
- package/skills/{waitsec-core → waitsec/references}/anti-overengineering.md +27 -15
- package/skills/waitsec/references/ask-first.md +112 -0
- package/skills/waitsec/references/debug-first.md +66 -0
- package/skills/waitsec/references/small-diff.md +63 -0
- package/skills/waitsec/references/verify-first.md +79 -0
- package/skills/waitsec/references/write-info-analyzer.md +117 -0
- package/skills/waitsec-code/SKILL.md +87 -12
- package/skills/waitsec-pagemaker/SKILL.md +622 -0
- package/skills/waitsec-pagemaker/references/about-me.md +161 -0
- package/skills/waitsec-pagemaker/references/article-single.md +168 -0
- package/skills/waitsec-pagemaker/references/blog-index.md +167 -0
- package/skills/waitsec-pagemaker/references/contact-page.md +162 -0
- package/skills/waitsec-pagemaker/references/landing-page.md +220 -0
- package/skills/waitsec-quality/SKILL.md +93 -14
- package/skills/waitsec-ui/SKILL.md +74 -16
- package/skills/waitsec-core/ask-first.md +0 -67
- package/skills/waitsec-core/debug-first.md +0 -54
- package/skills/waitsec-core/small-diff.md +0 -51
- package/skills/waitsec-core/verify-first.md +0 -67
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
# Landing Page Blueprint (waitsec-pagemaker)
|
|
2
|
+
|
|
3
|
+
Use this guide when creating a marketing page, product launch screen, or SaaS homepage. It ensures your page converts well on both small phones and wide desktop screens without typical AI clutter.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Complete Page Anatomy & Responsive Flow
|
|
8
|
+
|
|
9
|
+
### 1. Header & Navigation Bar
|
|
10
|
+
* **Desktop (1024px+):** Horizontal layout. Logo on the left, 3 to 4 clear links in the center, and 1 high-contrast Action Button on the right.
|
|
11
|
+
* **Mobile (<768px):** Clean bar with Logo on the left and a 44px by 44px hamburger menu icon or a single direct CTA button on the right. Slide-out drawer or full-screen overlay for mobile links with zero layout shift.
|
|
12
|
+
|
|
13
|
+
### 2. Hero Section
|
|
14
|
+
* **Desktop:** Clean centered layout or 2-column split (headline and CTA on the left, interactive product preview or screenshot on the right).
|
|
15
|
+
* **Mobile:** Stacks vertically. Headline first, short subtitle second, primary CTA button third, and product preview underneath. Never push the CTA below the fold on phones.
|
|
16
|
+
|
|
17
|
+
### 3. Problem & Solution Contrast
|
|
18
|
+
* **Desktop:** 2-column comparison card (Current Painful Way on the left vs Your Product Solution on the right).
|
|
19
|
+
* **Mobile:** Stacks into two vertical cards. Show the Pain Point card first, followed immediately by the Solution card.
|
|
20
|
+
|
|
21
|
+
### 4. Core Features Grid
|
|
22
|
+
* **Desktop:** 3-column grid (`lg:grid-cols-3 gap-8`). Equal card heights with consistent padding.
|
|
23
|
+
* **Tablet:** 2-column grid (`md:grid-cols-2 gap-6`).
|
|
24
|
+
* **Mobile:** 1-column stack (`grid-cols-1 gap-4`). Each card takes full width so text is easy to read.
|
|
25
|
+
|
|
26
|
+
### 5. Social Proof & Verifiable Metrics
|
|
27
|
+
* **Desktop:** Clean horizontal row of partner logos, GitHub star count, or verified customer quotes.
|
|
28
|
+
* **Mobile:** 2-column logo grid or vertically stacked quote cards. Never use auto-sliding carousels that users cannot pause with a thumb.
|
|
29
|
+
|
|
30
|
+
### 6. Pricing Tiers
|
|
31
|
+
* **Desktop:** 3-column side-by-side cards. The recommended plan is slightly highlighted with a subtle border.
|
|
32
|
+
* **Mobile:** Stacks vertically. Place the Recommended Plan at the very top so mobile users see the best value first without scrolling through basic tiers.
|
|
33
|
+
|
|
34
|
+
### 7. Frequently Asked Questions (FAQ) & Footer
|
|
35
|
+
* **Desktop & Mobile:** Simple vertical accordions (`<details>` and `<summary>`). Clicking opens the answer in place without jumping the page.
|
|
36
|
+
* **Footer:** Clean multi-column layout on desktop, neatly stacked links on mobile with copyright, privacy, and social icons.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Detailed Pitfalls & The 5-Point Rule
|
|
41
|
+
|
|
42
|
+
### 1. The Multi-CTA Confusion Trap
|
|
43
|
+
|
|
44
|
+
* **The Bad Habit:** Putting three different buttons in the hero section: "Start Free Trial", "Book a Demo", and "Read Whitepaper", all with bright background colors.
|
|
45
|
+
* **The Problem:** The visitor has no idea which button is the primary action. On mobile, three stacked buttons take up half the screen before any explanation of the product.
|
|
46
|
+
* **Why It Fails:** When people are given too many competing choices, they freeze and click nothing. Conversion rates drop sharply.
|
|
47
|
+
* **Clean Fix:** Choose exactly 1 primary action button with your main brand color. If you need a second link, make it a plain text link or an outline button:
|
|
48
|
+
```html
|
|
49
|
+
<div class="flex flex-col sm:flex-row items-center gap-3">
|
|
50
|
+
<a href="/signup" class="w-full sm:w-auto px-6 py-3 bg-neutral-900 text-white font-medium rounded-lg text-center">
|
|
51
|
+
Start Free Trial
|
|
52
|
+
</a>
|
|
53
|
+
<a href="#demo" class="w-full sm:w-auto px-6 py-3 text-neutral-600 hover:text-neutral-900 font-medium text-center">
|
|
54
|
+
View Live Demo →
|
|
55
|
+
</a>
|
|
56
|
+
</div>
|
|
57
|
+
```
|
|
58
|
+
* **The Waitsec Way:** Every marketing page has one main job. Make the single most important action obvious in less than 3 seconds.
|
|
59
|
+
|
|
60
|
+
### 2. The Stretched Desktop Comparison Table
|
|
61
|
+
|
|
62
|
+
* **The Bad Habit:** Building a wide 4-column comparison table comparing features against competitors, and letting it shrink directly into a mobile phone view.
|
|
63
|
+
* **The Problem:** The columns squish down to 60px wide, table headers overlap, and checkmark icons clip outside cell borders.
|
|
64
|
+
* **Why It Fails:** Users cannot read which feature belongs to which plan. Trying to pinch-to-zoom on a phone breaks page navigation.
|
|
65
|
+
* **Clean Fix:** On desktop, use a clean responsive table. On mobile screens below 768px, hide the wide table and show stacked feature cards for each plan instead:
|
|
66
|
+
```html
|
|
67
|
+
<!-- Desktop Table View -->
|
|
68
|
+
<div class="hidden md:block overflow-x-auto">
|
|
69
|
+
<table class="w-full text-left border-collapse">...</table>
|
|
70
|
+
</div>
|
|
71
|
+
|
|
72
|
+
<!-- Mobile Stacked Card View -->
|
|
73
|
+
<div class="block md:hidden space-y-4">
|
|
74
|
+
<div class="p-5 border border-neutral-200 rounded-xl">...</div>
|
|
75
|
+
</div>
|
|
76
|
+
```
|
|
77
|
+
* **The Waitsec Way:** Never force desktop tables into narrow phone viewports. Transform tables into vertical cards when the screen gets tight.
|
|
78
|
+
|
|
79
|
+
### 3. Copy-Paste Feature Cards
|
|
80
|
+
|
|
81
|
+
* **The Bad Habit:** Generating 6 identical cards, each with the exact same layout: a tiny blue icon, a vague headline like "Blazing Fast", and two lines of generic text.
|
|
82
|
+
* **The Problem:** The features section looks like a placeholder template. High-value features and minor features look completely identical.
|
|
83
|
+
* **Why It Fails:** Visitors scan pages quickly. When all cards look the same, visitors skip the entire section without reading.
|
|
84
|
+
* **Clean Fix:** Give primary features more visual weight. Use a bento-grid style: 1 large card with an actual UI preview for your flagship feature, and smaller cards for supporting features:
|
|
85
|
+
```html
|
|
86
|
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
|
|
87
|
+
<!-- Flagship Feature (spans 2 columns on desktop) -->
|
|
88
|
+
<div class="md:col-span-2 p-6 bg-neutral-50 rounded-2xl border border-neutral-200">
|
|
89
|
+
<h3 class="text-xl font-semibold">Real-Time Sync Engine</h3>
|
|
90
|
+
<p class="text-neutral-600 mt-2">Syncs data across tabs in under 50ms.</p>
|
|
91
|
+
<!-- Real preview box -->
|
|
92
|
+
<div class="mt-4 bg-white p-4 rounded-xl border border-neutral-200 font-mono text-xs">...</div>
|
|
93
|
+
</div>
|
|
94
|
+
|
|
95
|
+
<!-- Secondary Feature -->
|
|
96
|
+
<div class="p-6 bg-neutral-50 rounded-2xl border border-neutral-200">
|
|
97
|
+
<h3 class="text-lg font-semibold">Offline Ready</h3>
|
|
98
|
+
<p class="text-neutral-600 mt-2">Queues changes until your connection returns.</p>
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
```
|
|
102
|
+
* **The Waitsec Way:** Design follows content importance. Give your biggest product advantage the biggest visual real estate.
|
|
103
|
+
|
|
104
|
+
### 4. The 4-Column Pricing Overflow on Mobile
|
|
105
|
+
|
|
106
|
+
* **The Bad Habit:** Putting 3 or 4 pricing plans in a rigid grid that stays horizontal on small screens, causing the page to stretch sideways.
|
|
107
|
+
* **The Problem:** The mobile screen wobbles left and right, and the primary "Buy Now" buttons get clipped out of view.
|
|
108
|
+
* **Why It Fails:** Buying should be effortless. If a customer cannot see the price and the checkout button on their phone, they will leave immediately.
|
|
109
|
+
* **Clean Fix:** Stack pricing tiers vertically on mobile (`grid-cols-1`), switch to 2 columns on tablet (`md:grid-cols-2`), and 3 columns on desktop (`lg:grid-cols-3`). Always pin the Recommended plan at the top of the mobile stack:
|
|
110
|
+
```html
|
|
111
|
+
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 max-w-5xl mx-auto">
|
|
112
|
+
<!-- Highlighted Plan: ordered first on mobile with order-1 -->
|
|
113
|
+
<div class="order-1 lg:order-2 p-6 border-2 border-neutral-900 rounded-2xl bg-white shadow-sm">
|
|
114
|
+
<span class="text-xs font-bold uppercase tracking-wider text-neutral-500">Most Popular</span>
|
|
115
|
+
<h3 class="text-2xl font-bold mt-1">Pro Team</h3>
|
|
116
|
+
<div class="text-4xl font-extrabold mt-3">$29<span class="text-sm font-normal text-neutral-500">/mo</span></div>
|
|
117
|
+
<a href="/checkout" class="block w-full py-3 mt-6 text-center bg-neutral-900 text-white font-medium rounded-lg">Get Started</a>
|
|
118
|
+
</div>
|
|
119
|
+
|
|
120
|
+
<!-- Basic Plan -->
|
|
121
|
+
<div class="order-2 lg:order-1 p-6 border border-neutral-200 rounded-2xl bg-white">...</div>
|
|
122
|
+
|
|
123
|
+
<!-- Enterprise Plan -->
|
|
124
|
+
<div class="order-3 lg:order-3 p-6 border border-neutral-200 rounded-2xl bg-white">...</div>
|
|
125
|
+
</div>
|
|
126
|
+
```
|
|
127
|
+
* **The Waitsec Way:** Make the purchase path obvious and thumb-friendly. Zero horizontal scrolling on checkout sections.
|
|
128
|
+
|
|
129
|
+
### 5. The Jittery Full-Height Hero on Mobile
|
|
130
|
+
|
|
131
|
+
* **The Bad Habit:** Forcing the hero section to `height: 100vh` on mobile phones.
|
|
132
|
+
* **The Problem:** As the user scrolls down, the mobile browser URL bar shrinks or disappears. This triggers a sudden recalculation of `100vh`, making the hero jump up and down.
|
|
133
|
+
* **Why It Fails:** Visual jumping disorients users and makes the website feel cheap and buggy.
|
|
134
|
+
* **Clean Fix:** Use natural vertical padding (`py-16` or `py-20`), or use dynamic viewport units (`min-h-[100dvh]`):
|
|
135
|
+
```html
|
|
136
|
+
<section class="min-h-[85vh] flex items-center justify-center py-16 px-4">
|
|
137
|
+
<div class="max-w-4xl mx-auto text-center">
|
|
138
|
+
<h1 class="text-3xl sm:text-5xl font-bold tracking-tight text-neutral-900">...</h1>
|
|
139
|
+
</div>
|
|
140
|
+
</section>
|
|
141
|
+
```
|
|
142
|
+
* **The Waitsec Way:** Respect the physical mechanics of phone browsers. Let content breathe naturally instead of locking screen height.
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## SEO, GEO & Structured Data (Landing Page)
|
|
147
|
+
|
|
148
|
+
State what the product is and who it is for within the first two sentences of the hero. Answer engines quote those lines, so make them complete and direct.
|
|
149
|
+
|
|
150
|
+
- Title: product name plus one clear benefit, about 50 to 60 characters.
|
|
151
|
+
- Meta description: what the product does and who it is for, about 140 to 160 characters.
|
|
152
|
+
- One `<h1>` that carries the core value proposition in plain words.
|
|
153
|
+
- Server-render the hero headline, subheadline, and primary CTA.
|
|
154
|
+
- Add an FAQ block with question-shaped `<h3>` headings. Start each answer with a direct one-sentence response.
|
|
155
|
+
- Keep the Open Graph image at 1200x630 and use an absolute URL.
|
|
156
|
+
|
|
157
|
+
### JSON-LD for a Landing Page
|
|
158
|
+
|
|
159
|
+
```html
|
|
160
|
+
<script type="application/ld+json">
|
|
161
|
+
{
|
|
162
|
+
"@context": "https://schema.org",
|
|
163
|
+
"@graph": [
|
|
164
|
+
{
|
|
165
|
+
"@type": "Organization",
|
|
166
|
+
"@id": "https://example.com/#organization",
|
|
167
|
+
"name": "Example Inc",
|
|
168
|
+
"url": "https://example.com",
|
|
169
|
+
"logo": "https://example.com/images/logo.png"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"@type": "WebSite",
|
|
173
|
+
"@id": "https://example.com/#website",
|
|
174
|
+
"url": "https://example.com",
|
|
175
|
+
"name": "Example",
|
|
176
|
+
"publisher": { "@id": "https://example.com/#organization" }
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"@type": "SoftwareApplication",
|
|
180
|
+
"name": "Example App",
|
|
181
|
+
"applicationCategory": "BusinessApplication",
|
|
182
|
+
"operatingSystem": "Web",
|
|
183
|
+
"url": "https://example.com",
|
|
184
|
+
"offers": {
|
|
185
|
+
"@type": "Offer",
|
|
186
|
+
"price": "0",
|
|
187
|
+
"priceCurrency": "USD"
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"@type": "FAQPage",
|
|
192
|
+
"mainEntity": [
|
|
193
|
+
{
|
|
194
|
+
"@type": "Question",
|
|
195
|
+
"name": "Is there a free plan?",
|
|
196
|
+
"acceptedAnswer": {
|
|
197
|
+
"@type": "Answer",
|
|
198
|
+
"text": "Yes. The free plan covers one project with no time limit."
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
]
|
|
202
|
+
}
|
|
203
|
+
]
|
|
204
|
+
}
|
|
205
|
+
</script>
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
Include the `FAQPage` block only when the FAQ is actually visible on the page. Use `Product` instead of `SoftwareApplication` for a physical or ecommerce product.
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## Pre-Flight Checklist for Landing Pages
|
|
213
|
+
|
|
214
|
+
- [ ] Does the hero section have exactly 1 high-contrast primary CTA button?
|
|
215
|
+
- [ ] Do all pricing and comparison tables stack into vertical cards on screens narrower than 768px?
|
|
216
|
+
- [ ] Are feature cards structured with varied visual weight (bento style) rather than copy-paste clones?
|
|
217
|
+
- [ ] Is there zero horizontal page wobble when testing at 320px width?
|
|
218
|
+
- [ ] Are all headlines scaled down comfortably on mobile to avoid breaking words into multiple lines?
|
|
219
|
+
- [ ] Is there one H1, a unique title, a meta description, and an absolute Open Graph image?
|
|
220
|
+
- [ ] Is the JSON-LD valid, type-appropriate, and free of validator errors?
|
|
@@ -5,7 +5,7 @@ description: "Quality and safety guardrails for AI coding agents. Enforces deep
|
|
|
5
5
|
|
|
6
6
|
# waitsec-quality: Systemic Quality & Safety Guardrails
|
|
7
7
|
|
|
8
|
-
You operate under the **waitsec-quality** engineering discipline. This skill extends `waitsec
|
|
8
|
+
You operate under the **waitsec-quality** engineering discipline. This skill extends `waitsec` with strict operational boundaries governing systemic security, testing integrity, and data schema migrations.
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -21,22 +21,101 @@ Activate this skill whenever:
|
|
|
21
21
|
|
|
22
22
|
---
|
|
23
23
|
|
|
24
|
-
##
|
|
24
|
+
## Part 1: Security & Access Boundaries
|
|
25
25
|
|
|
26
|
-
### 1.
|
|
27
|
-
- **Ownership & IDOR:** Validate tenant and user ownership on every database read, update, and delete operation. Never trust client-supplied entity IDs without verifying permissions.
|
|
28
|
-
- **Sensitive Data Exposure:** Never return raw password hashes, internal server stack traces, or private keys in API responses. Use explicit serialization filters.
|
|
29
|
-
- **Mass Assignment:** Whitelist fillable attributes explicitly on ORM models or request validators. Reject raw wildcard inserts.
|
|
26
|
+
### 1. Trusting Client-Supplied IDs (IDOR)
|
|
30
27
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
* **The Bad Habit:** Fetching a record straight from a request ID, like `Order::find($id)`, without checking who owns it.
|
|
29
|
+
* **The Problem:** Any logged-in user can change the ID in the URL and read or edit someone else's record.
|
|
30
|
+
* **Why It Fails:** This is a direct data breach. One guessed number exposes private orders, messages, or invoices.
|
|
31
|
+
* **Clean Fix:** Scope every read, update, and delete to the authenticated user or tenant:
|
|
32
|
+
```php
|
|
33
|
+
// Bad
|
|
34
|
+
$order = Order::find($id);
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
// Good
|
|
37
|
+
$order = auth()->user()->orders()->findOrFail($id);
|
|
38
|
+
```
|
|
39
|
+
* **The Waitsec Way:** Never trust an ID that came from the client. Verify ownership on every data access.
|
|
40
|
+
|
|
41
|
+
### 2. Leaking Sensitive Data in Responses
|
|
42
|
+
|
|
43
|
+
* **The Bad Habit:** Returning the whole model, including password hashes, internal flags, or stack traces.
|
|
44
|
+
* **The Problem:** The API response exposes fields the user should never see.
|
|
45
|
+
* **Why It Fails:** Leaked hashes and internal details hand attackers the first step of a break-in.
|
|
46
|
+
* **Clean Fix:** Return explicit, whitelisted fields only. Use serialization filters or resource classes.
|
|
47
|
+
* **The Waitsec Way:** Send the minimum the client needs. Everything else stays server-side.
|
|
48
|
+
|
|
49
|
+
### 3. Mass Assignment
|
|
50
|
+
|
|
51
|
+
* **The Bad Habit:** Passing the whole request payload into `create()` or `update()`.
|
|
52
|
+
* **The Problem:** A crafted request can set fields the form never exposed, such as `isAdmin` or `price`.
|
|
53
|
+
* **Why It Fails:** Attackers change roles and prices with a single extra parameter, and the database accepts it.
|
|
54
|
+
* **Clean Fix:** Whitelist fillable attributes and pass only validated data:
|
|
55
|
+
```php
|
|
56
|
+
// Forbidden
|
|
57
|
+
User::create($request->all());
|
|
58
|
+
|
|
59
|
+
// Required
|
|
60
|
+
User::create($request->validated());
|
|
61
|
+
```
|
|
62
|
+
* **The Waitsec Way:** Accept only the fields you meant to accept. Never forward raw input to the database.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Part 2: Testing Discipline
|
|
67
|
+
|
|
68
|
+
### 4. Trivial Assertions
|
|
69
|
+
|
|
70
|
+
* **The Bad Habit:** Writing tests that assert `true`, assert the response is not null, or call an endpoint without checking the result.
|
|
71
|
+
* **The Problem:** The suite is green while the feature is broken.
|
|
72
|
+
* **Why It Fails:** A passing test that proves nothing gives false confidence. Bugs reach production behind a fake safety net.
|
|
73
|
+
* **Clean Fix:** Assert a concrete outcome: the row was created, the balance changed, the status code is 403, or the field equals the expected value.
|
|
74
|
+
* **The Waitsec Way:** A test must prove a behavior. If it cannot fail, it is not a test.
|
|
75
|
+
|
|
76
|
+
### 5. Mocking the System Under Test
|
|
77
|
+
|
|
78
|
+
* **The Bad Habit:** Mocking the very class or query the test is supposed to verify.
|
|
79
|
+
* **The Problem:** The test only confirms that the mock returned what the mock was told to return.
|
|
80
|
+
* **Why It Fails:** Real bugs live in the code that got mocked away. The suite passes and the feature still fails.
|
|
81
|
+
* **Clean Fix:** Test real business logic and database behavior where feasible. Mock only true external boundaries.
|
|
82
|
+
* **The Waitsec Way:** Test the real thing. Put mocks at the edges, never over the subject.
|
|
83
|
+
|
|
84
|
+
### 6. Fixing Without a Reproduction Test
|
|
85
|
+
|
|
86
|
+
* **The Bad Habit:** Fixing a reported bug immediately and moving on, with no test that captures the failure.
|
|
87
|
+
* **The Problem:** Nothing stops the same bug from returning in the next refactor.
|
|
88
|
+
* **Why It Fails:** Without a failing reproduction first, you cannot even prove the fix addresses the reported case.
|
|
89
|
+
* **Clean Fix:** Write a failing test that reproduces the bug, then fix until it passes, then keep the test.
|
|
90
|
+
* **The Waitsec Way:** A bug fix ships with proof. The reproduction test is that proof.
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Part 3: Data & Migration Integrity
|
|
95
|
+
|
|
96
|
+
### 7. One-Way Migrations
|
|
97
|
+
|
|
98
|
+
* **The Bad Habit:** Writing an `up()` migration with no working `down()` rollback.
|
|
99
|
+
* **The Problem:** A bad deploy cannot be reversed cleanly.
|
|
100
|
+
* **Why It Fails:** When the migration corrupts or blocks data, the team is stuck with a manual, risky recovery under pressure.
|
|
101
|
+
* **Clean Fix:** Every migration gets a tested rollback that restores the previous schema state.
|
|
102
|
+
* **The Waitsec Way:** A migration is a two-way door. If you cannot safely go back, you cannot safely go forward.
|
|
103
|
+
|
|
104
|
+
### 8. Destructive Schema Shortcuts
|
|
105
|
+
|
|
106
|
+
* **The Bad Habit:** Dropping a column or table in one migration to "clean up".
|
|
107
|
+
* **The Problem:** Live data disappears the moment the migration runs, with no recovery path.
|
|
108
|
+
* **Why It Fails:** Production data loss is permanent and often unrecoverable. One migration erases history.
|
|
109
|
+
* **Clean Fix:** Deprecate in steps: stop writing, keep reading, back up, wait, then drop in a later release.
|
|
110
|
+
* **The Waitsec Way:** Remove data only when you are certain nothing needs it. Prefer deprecation over destruction.
|
|
111
|
+
|
|
112
|
+
### 9. Application-Only Constraints
|
|
113
|
+
|
|
114
|
+
* **The Bad Habit:** Enforcing uniqueness or relationships only in application code.
|
|
115
|
+
* **The Problem:** Race conditions and direct database writes slip past the checks.
|
|
116
|
+
* **Why It Fails:** Duplicate or orphaned rows appear even though the app "always checks". Data integrity decays over time.
|
|
117
|
+
* **Clean Fix:** Enforce foreign keys, unique indexes, and not-null rules at the database engine level.
|
|
118
|
+
* **The Waitsec Way:** The database is the last line of defense. Let it enforce the invariants.
|
|
40
119
|
|
|
41
120
|
---
|
|
42
121
|
|
|
@@ -20,22 +20,80 @@ Activate this skill whenever:
|
|
|
20
20
|
|
|
21
21
|
---
|
|
22
22
|
|
|
23
|
-
##
|
|
24
|
-
|
|
25
|
-
### 1.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
23
|
+
## Part 1: Visual Restraint
|
|
24
|
+
|
|
25
|
+
### 1. Generic AI Aesthetics
|
|
26
|
+
|
|
27
|
+
* **The Bad Habit:** Reaching for purple-to-indigo gradients, layered drop shadows, and slow hover animations on every surface.
|
|
28
|
+
* **The Problem:** The interface looks like every other generated template, and depth cues appear on elements that have no reason to float or move.
|
|
29
|
+
* **Why It Fails:** Users recognize the generic look instantly and trust the product less. Decorative motion also distracts from the actual task.
|
|
30
|
+
* **Clean Fix:** Use solid neutral surfaces and pick one deliberate accent color for the primary action. Add shadow or motion only when it signals real elevation or state.
|
|
31
|
+
* **The Waitsec Way:** Restraint reads as confidence. If an effect does not help the user, remove it.
|
|
32
|
+
|
|
33
|
+
### 2. Decoration That Does Not Earn Its Place
|
|
34
|
+
|
|
35
|
+
* **The Bad Habit:** Adding borders, shadows, glows, and background patterns to fill empty space.
|
|
36
|
+
* **The Problem:** The page is visually busy and the important element no longer stands out.
|
|
37
|
+
* **Why It Fails:** When everything is decorated, nothing has hierarchy. Users do not know where to look first.
|
|
38
|
+
* **Clean Fix:** Remove an effect and check whether usability drops. If it does not, leave it removed.
|
|
39
|
+
* **The Waitsec Way:** Every visual choice must carry meaning. Decoration is not a substitute for hierarchy.
|
|
40
|
+
|
|
41
|
+
### 3. Arbitrary Values Instead of Design Tokens
|
|
42
|
+
|
|
43
|
+
* **The Bad Habit:** Typing random hex colors, odd spacing numbers, and one-off font sizes into components.
|
|
44
|
+
* **The Problem:** The same "gray" appears in five slightly different shades, and spacing drifts from screen to screen.
|
|
45
|
+
* **Why It Fails:** The interface feels inconsistent, and future changes require hunting every stray value.
|
|
46
|
+
* **Clean Fix:** Use the existing design tokens, spacing scale, and theme colors. Add a token only when the system genuinely lacks one.
|
|
47
|
+
* **The Waitsec Way:** Follow the system in place. Consistency comes from reuse, not from fresh choices.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Part 2: Responsive Discipline
|
|
52
|
+
|
|
53
|
+
### 4. Fixed Widths and Horizontal Overflow
|
|
54
|
+
|
|
55
|
+
* **The Bad Habit:** Setting fixed pixel widths on main containers, tables, or code blocks.
|
|
56
|
+
* **The Problem:** On a narrow phone the page wobbles sideways and content disappears past the edge of the screen.
|
|
57
|
+
* **Why It Fails:** Horizontal scrolling on a vertical page breaks reading and navigation. Users lose their place and leave.
|
|
58
|
+
* **Clean Fix:** Use fluid widths with a max width (`w-full max-w-5xl mx-auto px-4`) and wrap tables or code blocks in `overflow-x-auto`.
|
|
59
|
+
* **The Waitsec Way:** The layout must fit the screen it is on. Zero horizontal page scrolling on mobile.
|
|
60
|
+
|
|
61
|
+
### 5. Desktop Assumed as the Default
|
|
62
|
+
|
|
63
|
+
* **The Bad Habit:** Building the wide desktop layout first and patching mobile with a media query at the very end.
|
|
64
|
+
* **The Problem:** The mobile view inherits desktop rules and glitches: oversized type, cramped cards, and broken spacing.
|
|
65
|
+
* **Why It Fails:** A last-minute patch fixes only the bug you happened to notice. Real visitors hit all the rest.
|
|
66
|
+
* **Clean Fix:** Start with the mobile layout, then add widths and columns as the screen grows.
|
|
67
|
+
* **The Waitsec Way:** Mobile is the base, not an afterthought. Design from the small screen up.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Part 3: Anti-Slop UI Copy (Implementation Silence)
|
|
72
|
+
|
|
73
|
+
### 6. Implementation Leaks in Copy
|
|
74
|
+
|
|
75
|
+
* **The Bad Habit:** Writing user-facing text about the code, such as "Data loaded via asynchronous API" or "Infinite scroll, 40 items per request".
|
|
76
|
+
* **The Problem:** The interface explains its own technical internals to the user.
|
|
77
|
+
* **Why It Fails:** Users want to finish a task, not read architecture notes. The text adds noise and reveals nothing useful.
|
|
78
|
+
* **Clean Fix:** Delete implementation talk. Keep only what helps the user understand the data or complete an action.
|
|
79
|
+
* **The Waitsec Way:** The UI serves the user, not the developer. Hide the mechanism, show the meaning.
|
|
80
|
+
* *Deep Dive & Triage:* Read [`skills/waitsec/references/write-info-analyzer.md`](../waitsec/references/write-info-analyzer.md).
|
|
81
|
+
|
|
82
|
+
### 7. Redundant Instructional Copy
|
|
83
|
+
|
|
84
|
+
* **The Bad Habit:** Adding "Click here to submit" under a clear "Submit" button.
|
|
85
|
+
* **The Problem:** The screen repeats what the control already says.
|
|
86
|
+
* **Why It Fails:** Extra text slows scanning without adding information. It makes a clean interface feel cluttered and unsure.
|
|
87
|
+
* **Clean Fix:** Let the label and visual design carry the instruction. Delete the helper sentence.
|
|
88
|
+
* **The Waitsec Way:** If the interface is already clear, stay quiet. Clear does not mean more text.
|
|
89
|
+
|
|
90
|
+
### 8. Labels That Do Not Help a Decision
|
|
91
|
+
|
|
92
|
+
* **The Bad Habit:** Labeling every icon, card, and number with explanatory text "so the screen does not look empty".
|
|
93
|
+
* **The Problem:** The page fills with words that do not help the user choose or act.
|
|
94
|
+
* **Why It Fails:** Visual noise makes the real information harder to find, and users skim past everything.
|
|
95
|
+
* **Clean Fix:** Keep text only when it changes a decision or explains the data. Remove labels that merely restate what is already visible.
|
|
96
|
+
* **The Waitsec Way:** Show information that helps. Delete decoration made of words.
|
|
39
97
|
|
|
40
98
|
---
|
|
41
99
|
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ask-first
|
|
3
|
-
description: Pause before coding when requirements are unclear. Ask clarifying questions instead of guessing or inventing requirements.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Ask First: Confirm Before You Code
|
|
7
|
-
|
|
8
|
-
Most AI coding disasters happen not because the AI cannot code, but because it codes before knowing what the user actually needs.
|
|
9
|
-
|
|
10
|
-
When requirements are ambiguous, do not invent answers. Stop, pause, and clarify.
|
|
11
|
-
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
## Anti-Patterns (The Tells)
|
|
15
|
-
|
|
16
|
-
### 1. Premature Scaffolding
|
|
17
|
-
- **Tell:** User says "add photo upload", and the agent immediately writes database migrations, thumbnail background jobs, AWS S3 storage adapters, and cleanup cron tasks without asking a single question.
|
|
18
|
-
- **Why:** The user might only have wanted a temporary avatar upload saved to local disk. Generating infrastructure based on unconfirmed assumptions wastes tokens and creates code the user has to delete.
|
|
19
|
-
- **Fix:** Stop before writing code. Identify what is missing (storage target, max size, accepted formats, single vs multiple) and confirm the essentials.
|
|
20
|
-
|
|
21
|
-
### 2. Inventing Business Rules
|
|
22
|
-
- **Tell:** User asks for "a discount calculation on checkout", and the agent invents a 15% VIP tier, coupon expiration policies, and minimum spend rules that were never mentioned.
|
|
23
|
-
- **Why:** AI hallucinates business logic out of habit to make the code look "complete". Invented rules confuse the product requirements.
|
|
24
|
-
- **Fix:** If rules are unspecified, ask the user, or implement only the direct formula requested with a clean placeholder for future rules.
|
|
25
|
-
|
|
26
|
-
### 3. Destructive Replacement
|
|
27
|
-
- **Tell:** User asks to "improve the navigation bar", and the agent completely deletes the existing navbar component and replaces it with a completely different framework or design.
|
|
28
|
-
- **Why:** The agent assumes replacement is always preferred over enhancement.
|
|
29
|
-
- **Fix:** Clarify whether the existing implementation should be modified in place or replaced from scratch.
|
|
30
|
-
|
|
31
|
-
### 4. Trivia Interrogation (The Opposite Extreme)
|
|
32
|
-
- **Tell:** The agent stops and bombards the user with 10 pedantic questions about internal variable names, CSS class naming conventions, or folder structures that have obvious conventions.
|
|
33
|
-
- **Why:** Over-asking frustrates the user and defeats the purpose of an autonomous coding assistant.
|
|
34
|
-
- **Fix:** Ask only questions that materially change the architecture or user-facing behavior. Use sensible defaults for everything else.
|
|
35
|
-
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
## Decision Matrix: When to Ask vs When to Default
|
|
39
|
-
|
|
40
|
-
| Situation | Action | Rationale |
|
|
41
|
-
| :--- | :--- | :--- |
|
|
42
|
-
| Missing storage location, file size limit, or format | **ASK** | Materially changes packages, disk, and schema. |
|
|
43
|
-
| Missing permission/role requirements for a sensitive action | **ASK** | Critical security and authorization impact. |
|
|
44
|
-
| Multiple valid architectures (e.g. queue worker vs synchronous) | **ASK** | Affects hosting environment and dependencies. |
|
|
45
|
-
| Choosing variable names or internal helper method names | **DEFAULT** | Follow existing codebase conventions silently. |
|
|
46
|
-
| Choosing standard HTTP status codes (200, 201, 404, 422) | **DEFAULT** | Follow standard REST / web specifications. |
|
|
47
|
-
| Choosing standard validation error messages | **DEFAULT** | Use clear, standard phrasing. |
|
|
48
|
-
|
|
49
|
-
---
|
|
50
|
-
|
|
51
|
-
## How to Ask Effectively
|
|
52
|
-
|
|
53
|
-
When asking questions:
|
|
54
|
-
1. **Limit to 1 to 3 questions maximum.** Never send a wall of text.
|
|
55
|
-
2. **Provide concrete choices (A / B).** Give clear recommendations (e.g. *"Option A: Local storage (simpler for now) vs Option B: S3 bucket"*).
|
|
56
|
-
3. **State the trade-off briefly.** Explain in one sentence why the choice matters.
|
|
57
|
-
4. **Wait for the answer.** Do not generate speculative files while waiting.
|
|
58
|
-
|
|
59
|
-
---
|
|
60
|
-
|
|
61
|
-
## Checklist
|
|
62
|
-
|
|
63
|
-
Before writing code for any new feature, verify:
|
|
64
|
-
- [ ] Are all critical requirements and constraints known?
|
|
65
|
-
- [ ] Did I avoid inventing product or business logic out of thin air?
|
|
66
|
-
- [ ] If questions are needed, are they capped at 1-3 with clear options?
|
|
67
|
-
- [ ] Did I avoid asking trivial questions about things the codebase already answers?
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: debug-first
|
|
3
|
-
description: Inspect error logs, stack traces, and root causes before guessing or modifying code.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Debug First: Inspect Evidence Before Touching Code
|
|
7
|
-
|
|
8
|
-
Never guess the cause of an error when real technical evidence is available. Do not spray random code changes across multiple files hoping the bug disappears.
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## Anti-Patterns (The Tells)
|
|
13
|
-
|
|
14
|
-
### 1. The Shotgun Guess
|
|
15
|
-
- **Tell:** A test fails or a crash occurs, and the agent immediately edits three different files, tweaking logic in random places without identifying why execution failed.
|
|
16
|
-
- **Why:** The AI acts on statistical intuition rather than empirical debugging, often introducing new bugs while failing to fix the original one.
|
|
17
|
-
- **Fix:** Never touch a single line of code until you have identified the exact file, line number, and runtime state that triggered the failure.
|
|
18
|
-
|
|
19
|
-
### 2. Silent Error Swallowing
|
|
20
|
-
- **Tell:** When an exception is thrown, the agent wraps the crashing block in a generic `try/catch` and leaves the catch block empty, or returns an empty fallback (`return null;`) just to stop the crash from bubbling up.
|
|
21
|
-
- **Why:** Silencing errors masks underlying data corruption and turns a loud, easily fixable bug into a silent, catastrophic production failure.
|
|
22
|
-
- **Fix:** Fix the root cause so the operation succeeds safely. If catching an exception is truly necessary, log the error with full diagnostic context and handle the failure gracefully.
|
|
23
|
-
|
|
24
|
-
### 3. Surface Symptom Patching
|
|
25
|
-
- **Tell:** Seeing `TypeError: Cannot read property 'id' of undefined`, the agent adds optional chaining (`user?.id`) or a null check (`if (!user) return;`), without checking *why* `user` was undefined in the first place.
|
|
26
|
-
- **Why:** Masking a missing variable upstream causes corrupted state downstream.
|
|
27
|
-
- **Fix:** Trace the data flow backwards. Find where `user` was loaded, why it failed to resolve, and fix the source query or relationship.
|
|
28
|
-
|
|
29
|
-
### 4. Hallucinating Missing Dependencies
|
|
30
|
-
- **Tell:** An import fails or a class is not found (often due to a typo or incorrect namespace), and the agent immediately attempts to run `npm install <random-package>` or `composer require`.
|
|
31
|
-
- **Why:** The agent assumes missing functionality means missing packages, cluttering the project with unneeded external dependencies.
|
|
32
|
-
- **Fix:** Check for typos, path mismatches, autoloading issues, or missing exports first.
|
|
33
|
-
|
|
34
|
-
---
|
|
35
|
-
|
|
36
|
-
## The 5-Step Root Cause Sequence
|
|
37
|
-
|
|
38
|
-
Follow this disciplined sequence whenever debugging:
|
|
39
|
-
|
|
40
|
-
1. **Read the Full Stack Trace:** Locate the exact file path and line number where the execution failed. Do not stop at the first line of the error message.
|
|
41
|
-
2. **Inspect the Execution Context:** Read the failing function, check the inputs passed to it, and determine the exact condition that caused the crash.
|
|
42
|
-
3. **Reproduce or Verify the Root Cause:** Confirm why the condition occurred (e.g. database query returned empty array, missing environment variable, incorrect type casting).
|
|
43
|
-
4. **Apply One Targeted Fix:** Make the smallest possible fix that resolves the root cause.
|
|
44
|
-
5. **Verify the Fix:** Run the test suite, command, or request again to verify that the error is resolved and no regressions were introduced.
|
|
45
|
-
|
|
46
|
-
---
|
|
47
|
-
|
|
48
|
-
## Checklist
|
|
49
|
-
|
|
50
|
-
Before declaring a bug fixed:
|
|
51
|
-
- [ ] Did I locate the exact line and file of the failure from the stack trace?
|
|
52
|
-
- [ ] Did I fix the root cause rather than merely masking the symptom?
|
|
53
|
-
- [ ] Did I avoid wrapping the code in silent, empty try/catch blocks?
|
|
54
|
-
- [ ] Did I verify the fix by re-running the failing test or reproduction command?
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: small-diff
|
|
3
|
-
description: Keep edits surgical and proportional. Only modify the exact lines and files necessary to fulfill the prompt.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Small Diff: Surgical and Proportional Changes
|
|
7
|
-
|
|
8
|
-
Do not turn a one-line bug fix into a 15-file git diff. Keep your changes laser-focused on the exact problem requested.
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## Anti-Patterns (The Tells)
|
|
13
|
-
|
|
14
|
-
### 1. Collateral Reformatting
|
|
15
|
-
- **Tell:** Fixing a bug on line 42, but running an aggressive formatter that reformats 300 lines of whitespace, indentation, quote styles, or trailing commas across the entire file.
|
|
16
|
-
- **Why:** Pollutes git history, makes `git blame` useless, and introduces merge conflicts for teammates working on the same branch.
|
|
17
|
-
- **Fix:** Format only the lines you touched. Leave existing indentation and formatting untouched.
|
|
18
|
-
|
|
19
|
-
### 2. Gratuitous Renaming & Style Imposition
|
|
20
|
-
- **Tell:** Changing working code to suit personal style preferences (e.g. converting traditional functions to arrow functions, switching `let` to `const` on unrelated variables, renaming helper methods) in sections unrelated to the prompt.
|
|
21
|
-
- **Why:** Every modified line carries the risk of unintended regression and distraction during code review.
|
|
22
|
-
- **Fix:** Keep your hands off working code outside the prompt scope. Respect the prevailing style of the file.
|
|
23
|
-
|
|
24
|
-
### 3. File Scope Creep
|
|
25
|
-
- **Tell:** Asked to change the label of a button, the agent touches the button component, the router, the global theme CSS, and updates `package.json` dependencies.
|
|
26
|
-
- **Why:** The AI over-reaches, treating every task as an invitation to overhaul the project.
|
|
27
|
-
- **Fix:** Modify only the files strictly required to implement the request. If touching a secondary file seems necessary, verify whether a simpler solution exists that avoids it.
|
|
28
|
-
|
|
29
|
-
### 4. Wholesale File Rewriting
|
|
30
|
-
- **Tell:** Replacing a 400-line file with a newly generated version when only 5 lines needed an update, accidentally stripping out edge-case logic or comments that existed in the original.
|
|
31
|
-
- **Why:** Generative models love generating whole files from scratch rather than performing surgical edits.
|
|
32
|
-
- **Fix:** Use targeted diffs or line-level edits. Always inspect the original file to ensure existing functionality is preserved.
|
|
33
|
-
|
|
34
|
-
---
|
|
35
|
-
|
|
36
|
-
## The Scope Guardrail
|
|
37
|
-
|
|
38
|
-
Before saving any file change, ask:
|
|
39
|
-
1. **Is this edit strictly required to solve the prompt?** If no, delete the edit.
|
|
40
|
-
2. **Does this edit touch unrelated functions, styles, or configuration?** If yes, revert it.
|
|
41
|
-
3. **Does the git diff contain unnecessary whitespace or formatting churn?** If yes, clean up the diff.
|
|
42
|
-
|
|
43
|
-
---
|
|
44
|
-
|
|
45
|
-
## Checklist
|
|
46
|
-
|
|
47
|
-
Before submitting code changes:
|
|
48
|
-
- [ ] Are all modified files directly related to the user's prompt?
|
|
49
|
-
- [ ] Did I avoid global reformatting or unnecessary whitespace churn?
|
|
50
|
-
- [ ] Did I preserve the project's existing quote styles, indentations, and naming conventions?
|
|
51
|
-
- [ ] Did I leave working, unrelated code completely untouched?
|