waitsec 0.5.2 → 0.5.4

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.
@@ -2,7 +2,7 @@
2
2
  "name": "waitsec",
3
3
  "displayName": "waitsec",
4
4
  "description": "Practical guardrails for AI coding agents. Hold on, think first, code less.",
5
- "version": "0.5.2",
5
+ "version": "0.5.4",
6
6
  "author": {
7
7
  "name": "fastroware"
8
8
  },
package/README.md CHANGED
@@ -31,11 +31,11 @@ Most AI coding assistants do not fail because they lack knowledge. They fail bec
31
31
 
32
32
  ## The 5 Core Guardrails
33
33
 
34
- 1. **`ask-first`** If the prompt is missing essential decisions (schemas, storage locations, permissions), the AI must pause and ask 1 to 3 direct questions instead of guessing.
35
- 2. **`anti-overengineering`** Rejects unneeded design patterns, DTOs, and speculative abstractions. Keeps code lean while strictly enforcing authentication, authorization, and input validation.
36
- 3. **`small-diff`** Modifications stay strictly scoped to what solves the prompt. No cleaning up surrounding files, no global formatting passes, and no unnecessary dependency changes.
37
- 4. **`debug-first`** When something breaks, the AI must read the complete error message and stack trace. Never guess fixes or hide errors behind empty try/catch blocks.
38
- 5. **`verify-first`** Never declare a task complete without proof. Run tests, verify builds, test edge cases, and ensure no regressions occurred before reporting done.
34
+ 1. **`ask-first`**: If the prompt is missing essential decisions (schemas, storage locations, permissions), the AI must pause and ask 1 to 3 direct questions instead of guessing.
35
+ 2. **`anti-overengineering`**: Rejects unneeded design patterns, DTOs, and speculative abstractions. Keeps code lean while strictly enforcing authentication, authorization, and input validation.
36
+ 3. **`small-diff`**: Modifications stay strictly scoped to what solves the prompt. No cleaning up surrounding files, no global formatting passes, and no unnecessary dependency changes.
37
+ 4. **`debug-first`**: When something breaks, the AI must read the complete error message and stack trace. Never guess fixes or hide errors behind empty try/catch blocks.
38
+ 5. **`verify-first`**: Never declare a task complete without proof. Run tests, verify builds, test edge cases, and ensure no regressions occurred before reporting done.
39
39
 
40
40
  ---
41
41
 
@@ -91,23 +91,38 @@ vendor/bin/waitsec
91
91
  ```
92
92
 
93
93
  ### 7. Agent Skills Directory (skills.sh)
94
- Listed on [skills.sh/fastroware/waitsec](https://skills.sh/fastroware/waitsec). Install via the universal skills CLI:
94
+ Listed on [skills.sh/fastroware/waitsec](https://skills.sh/fastroware/waitsec).
95
+
96
+ The skills CLI does not pre-select anything for a GitHub repo, so you must choose at least one skill. To install every skill without any prompt:
97
+
98
+ ```bash
99
+ npx skills add fastroware/waitsec -y
100
+ ```
101
+
102
+ To install only the core guardrails:
95
103
 
96
104
  ```bash
97
- npx skills add fastroware/waitsec
105
+ npx skills add fastroware/waitsec --skill waitsec
98
106
  ```
99
107
 
100
- Or install specifically the core guardrails module:
108
+ To pick a specific set:
101
109
 
102
110
  ```bash
103
- # Individual guardrails
104
- npx skills add fastroware/waitsec/skills/waitsec # All 5 core guardrails
105
- npx skills add fastroware/waitsec/skills/waitsec-ui # Upcoming — UI optimizer & anti-slop copy
106
- npx skills add fastroware/waitsec/skills/waitsec-pagemaker # Upcoming — Page architect (landing, blog, contact)
107
- npx skills add fastroware/waitsec/skills/waitsec-code # Upcoming — Clean code & dependency hygiene
108
- npx skills add fastroware/waitsec/skills/waitsec-quality # Upcoming — Security audits & test discipline
111
+ npx skills add fastroware/waitsec --skill waitsec waitsec-pagemaker
109
112
  ```
110
113
 
114
+ Available skills:
115
+
116
+ | Skill | Purpose |
117
+ | :--- | :--- |
118
+ | `waitsec` | Core 5 guardrails: ask-first, anti-overengineering, small-diff, debug-first, verify-first |
119
+ | `waitsec-pagemaker` | Page architect: project recon, design preferences, SEO/GEO, Schema.org, auth and UX rules |
120
+ | `waitsec-code` | Clean code, anti-comment noise, dependency hygiene |
121
+ | `waitsec-ui` | Anti-slop UI, responsive discipline, UI copy cleanup |
122
+ | `waitsec-quality` | Security auditing, test discipline, migration safety |
123
+
124
+ Tip: the CLI preselects all skills only when you install from a skills.sh pack URL. For a one-command install that selects everything by default, create a pack on [skills.sh](https://skills.sh) (sign in with Vercel, import this repository) and share the pack URL `https://skills.sh/p/<pack-id>`.
125
+
111
126
  ---
112
127
 
113
128
  ## Structure
@@ -115,7 +130,7 @@ npx skills add fastroware/waitsec/skills/waitsec-quality # Upcoming — Secur
115
130
  ```text
116
131
  waitsec/
117
132
  ├── skills/
118
- │ ├── waitsec/ # ACTIVE Core 5-phase guardrails
133
+ │ ├── waitsec/ # ACTIVE: Core 5-phase guardrails
119
134
  │ │ ├── SKILL.md # Hub: pipeline overview + links to detail files
120
135
  │ │ └── references/ # Deep-dive guardrails & UI copy rules
121
136
  │ │ ├── ask-first.md # Phase 1: Clarify requirements before coding
@@ -125,14 +140,20 @@ waitsec/
125
140
  │ │ ├── verify-first.md # Phase 5: Proof before declaring done
126
141
  │ │ └── write-info-analyzer.md # Simple rules for UI text and clean labels
127
142
  │ │
128
- │ ├── waitsec-ui/ # UPCOMING Anti-slop CSS, UI copy restraint, responsive
143
+ │ ├── waitsec-ui/ # ACTIVE: Anti-slop CSS, UI copy restraint, responsive
129
144
  │ │ └── SKILL.md
130
- │ ├── waitsec-pagemaker/ # UPCOMING Page architect (landing, blog, articles, contact)
131
- │ │ ├── SKILL.md
145
+ │ ├── waitsec-pagemaker/ # ACTIVE: Page architect (landing, blog, articles, auth, contact)
146
+ │ │ ├── SKILL.md # Recon, design preferences, SEO/GEO, Schema.org, UX
132
147
  │ │ └── references/ # Blueprints per archetype
133
- │ ├── waitsec-code/ # UPCOMING — Clean code, anti-comment pollution
148
+ ├── landing-page.md
149
+ │ │ ├── blog-index.md
150
+ │ │ ├── article-single.md
151
+ │ │ ├── about-me.md
152
+ │ │ ├── contact-page.md
153
+ │ │ └── auth-pages.md # Login, register, password reset, lockout states
154
+ │ ├── waitsec-code/ # ACTIVE: Clean code, anti-comment pollution
134
155
  │ │ └── SKILL.md
135
- │ └── waitsec-quality/ # UPCOMING Security auditing, testing discipline
156
+ │ └── waitsec-quality/ # ACTIVE: Security auditing, testing discipline
136
157
  │ └── SKILL.md
137
158
 
138
159
  ├── rules/
@@ -150,9 +171,7 @@ waitsec/
150
171
  ## Roadmap: Core & Extensions
151
172
 
152
173
  - **Core (Active)**: The 5 foundational guardrails (`ask-first`, `anti-overengineering`, `small-diff`, `debug-first`, `verify-first`).
153
- - **Quality (Upcoming)**: Specialized deep-dives for `security`, `testing`, `performance`, and `accessibility`.
154
- - **Code (Upcoming)**: Anti-slop comments, naming conventions, and dependency discipline.
155
- - **UI (Upcoming)**: Anti-slop interface rules, responsive standards, and clean typography.
174
+ - **Extensions (Active)**: `waitsec-pagemaker` for page building, `waitsec-code` for code hygiene, `waitsec-ui` for UI restraint, and `waitsec-quality` for security and testing discipline.
156
175
 
157
176
  ---
158
177
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waitsec",
3
- "version": "0.5.2",
3
+ "version": "0.5.4",
4
4
  "description": "Practical guardrails for AI coding agents. Hold on, think first, code less.",
5
5
  "main": "rules/waitsec.md",
6
6
  "bin": {
package/plugin.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "waitsec",
3
3
  "description": "Practical guardrails for AI coding agents. Hold on, think first, code less.",
4
- "version": "0.5.2"
4
+ "version": "0.5.4"
5
5
  }
@@ -18,7 +18,7 @@ Treat this section as the prompt you must satisfy every time you generate a page
18
18
  1. **Recon before markup.** Run Part 0, then state the detected stack, template engine, styling system, load method, version, and icon library in one short block.
19
19
  2. **Follow the project.** Use the framework, template syntax, and styling system that already exist. Never add a second CSS system. Ask before switching a native CSS project to a framework.
20
20
  3. **Install with the right method.** Tailwind with an existing build step installs through npm. Tailwind in a static project uses the CDN unless the user asks for a local install. Bootstrap and other requested frameworks install locally.
21
- 4. **Every generated page includes JSON-LD.** Add a valid Schema.org block in `<head>`, with the type matched to the page (see Part 8). No page ships without structured data.
21
+ 4. **Every generated page includes JSON-LD.** Add a valid Schema.org block in `<head>`, with the type matched to the page (see Part 8). No page ships without structured data. Auth and error pages use a minimal `WebPage` node and are set to `noindex`.
22
22
  5. **Icons only from a library.** Use the project's existing icon library, or Lucide from CDN as the default. Never use an emoji as an icon. Never hand-write inline SVG markup. Never use an image as a UI icon.
23
23
  6. **No em dash and no en dash.** Use colons, commas, periods, parentheses, or plain hyphens in every word of the output.
24
24
  7. **No emoji anywhere.** Not in headings, body copy, buttons, badges, alt text, or metadata.
@@ -26,6 +26,7 @@ Treat this section as the prompt you must satisfy every time you generate a page
26
26
  9. **The navbar must be responsive.** A working menu button on mobile, a solid sticky background, 4 to 5 primary links, and a visible active and focus state.
27
27
  10. **Meet the SEO and GEO bar.** One H1, a unique title and meta description, a canonical URL, Open Graph tags, and answer-first content that machines can quote.
28
28
  11. **Finish with the Pre-Flight Checklist.** Do not report the page as done until every box is checked.
29
+ 12. **Translate vague style words.** When the user says minimalist, modern, clean, premium, bold, or similar, convert the word into concrete tokens using Part 10, reuse the project tokens first, and state the translation before generating. Never treat a style word as a license for gradients, glass, or heavy shadows.
29
30
 
30
31
  ---
31
32
 
@@ -40,6 +41,7 @@ Activate this skill whenever:
40
41
  - Structuring multi-section web views or routes (`/`, `/about`, `/contact`, `/blog`, `/blog/[slug]`).
41
42
  - Writing layout containers, responsive grids, navigation bars, and design themes.
42
43
  - Adding SEO metadata, Open Graph tags, or Schema.org structured data to a page.
44
+ - Building authentication screens (login, register, password reset) or account lockout and rate-limit pages.
43
45
 
44
46
  ---
45
47
 
@@ -498,6 +500,7 @@ Structured data helps search engines and answer engines understand what the page
498
500
  | Single article or post | `Article` or `BlogPosting`, `BreadcrumbList`, `Person` as author, `Organization` as publisher |
499
501
  | About or portfolio | `ProfilePage`, `Person`, `Organization` |
500
502
  | Contact page | `ContactPage`, `Organization`, `ContactPoint` |
503
+ | Auth page (login, register, reset, locked) | minimal `WebPage`, with the page set to `noindex, nofollow` |
501
504
  | FAQ section | `FAQPage` |
502
505
  | Any page with breadcrumbs | `BreadcrumbList` |
503
506
 
@@ -575,7 +578,22 @@ Each page blueprint in `references/` includes the exact JSON-LD block for that p
575
578
 
576
579
  ## Part 9: Page Archetypes & Blueprint Routing
577
580
 
578
- When the user asks for a specific type of page, read its dedicated reference guide. Each reference includes the page anatomy, the 5-point pitfalls, the SEO and GEO notes, and the exact JSON-LD block for that page type.
581
+ ### Routing Rules
582
+
583
+ Each reference includes the page anatomy, the 5-point pitfalls, the SEO and GEO notes, and the exact JSON-LD block for that page type. Choose the reference like this:
584
+
585
+ 1. **The user names or clearly describes an archetype** (for example "about me", "contact page", "login"): read that reference first, then build.
586
+ 2. **The request is vague or random** (for example "make a page", "build something nice"): infer the closest archetype from the user's intent and the project, then read that reference. If two archetypes are plausible and the choice changes the structure, ask one short question.
587
+ 3. **The request is outside the listed archetypes** (for example pricing, dashboard, settings, search results, 404, FAQ, changelog): use the general preference below, and adapt the closest blueprint instead of forcing an unrelated one.
588
+ 4. **Always state which blueprint you are following** in the recon summary before you generate.
589
+
590
+ ### General Preference for Unlisted Pages
591
+
592
+ - Keep every rule from Parts 0 to 8: recon, styling, UX, navbar, SEO, GEO, and structured data.
593
+ - Reuse the anatomy of the nearest archetype. A settings page follows the form layout of the contact page, a search results page follows the list layout of the blog index, and a pricing page follows the section rhythm of a landing page.
594
+ - Pick the Schema.org type that matches the content. Use `FAQPage` for an FAQ, `Product` or `SoftwareApplication` for pricing, and a minimal `WebPage` for utility pages such as 404 or search.
595
+ - If no listed type fits, use a minimal `WebPage` node and keep every field accurate.
596
+ - Never stretch a blueprint to fit a page it was not designed for.
579
597
 
580
598
  ### 1. Marketing & Conversion Pages
581
599
  * **Includes:** SaaS homepages, landing pages, product launch screens.
@@ -599,6 +617,116 @@ When the user asks for a specific type of page, read its dedicated reference gui
599
617
  - Contact Page: [`skills/waitsec-pagemaker/references/contact-page.md`](./references/contact-page.md)
600
618
  - About / Portfolio: [`skills/waitsec-pagemaker/references/about-me.md`](./references/about-me.md)
601
619
 
620
+ ### 4. Authentication & Account Access Pages
621
+ * **Includes:** Login, register, forgot password, reset password, remember me, account locked, and login rate-limit screens.
622
+ * **Key Blueprint:** Single-purpose centered form, one primary action, clear error and lockout states, and no user enumeration.
623
+ * **Schema:** Minimal `WebPage` with the page set to `noindex, nofollow`.
624
+ * *Detailed Guide:* [`skills/waitsec-pagemaker/references/auth-pages.md`](./references/auth-pages.md)
625
+
626
+ ---
627
+
628
+ ## Part 10: Design Preference Translation (Minimalist, Modern, and Similar Words)
629
+
630
+ Users often describe the look with one or two vague words: "minimalist", "modern", "clean", "premium", "bold", "playful". Treat these as direction, not as a license to add generic AI decoration. Translate the word into concrete design decisions, then say the translation out loud before generating.
631
+
632
+ ### 1. Rules
633
+
634
+ - A style word is a direction, not a spec. Convert it into decisions about color, spacing, radius, borders, shadow, typography, motion, density, and imagery.
635
+ - The project's existing design tokens win. A style word only fills gaps the project does not already define.
636
+ - "Modern" never means purple gradients, glassmorphism, huge soft shadows, all-pill shapes, or animated everything. Those are AI slop, not modern design.
637
+ - If the word conflicts with the project's design language, tell the user and ask whether to follow the project or deliberately override it.
638
+ - If two words conflict ("minimalist but bold"), resolve them by function: let the layout word drive hierarchy and density, and let the mood word drive color and decoration. State the resolution, and ask only if the conflict changes the structure.
639
+ - If the user points to a reference site or brand, extract concrete tokens from it (type scale, accent color, spacing, radius, density) instead of copying the whole look.
640
+ - State the final token summary in one short block before writing markup. Do not silently guess.
641
+
642
+ ### 2. Translator Table
643
+
644
+ | User says | Usually means | Does NOT mean |
645
+ | :--- | :--- | :--- |
646
+ | Minimalist / Minimal | Few colors (neutrals plus one accent), generous spacing, type-led hierarchy, flat surfaces, thin or no borders | Empty pages with no hierarchy, gray-on-gray text, removing all images |
647
+ | Modern / Contemporary | Clean type, clear grid, consistent radius, subtle borders, restrained motion | Purple gradients, glass everywhere, big shadows, neon glows, pill everything |
648
+ | Clean | Aligned grid, consistent spacing, high-contrast text, few effects | Making everything white, tiny light-gray text, removing all styling |
649
+ | Simple | Fewer sections, one primary action, plain language, minimal form fields | Hiding needed information, removing navigation, blank screens |
650
+ | Premium / Luxury | Generous space, strong type contrast, one refined accent, quality imagery, restrained motion | Gold gradients, fake 3D, heavy glossy shadows, shiny badges |
651
+ | Corporate / Professional | Structured sections, muted palette, clear typography, trust signals | Stock-photo collages, blue gradient hero, generic icon walls |
652
+ | Playful / Fun | One brighter accent, consistent rounded radius, friendly copy, small motion | Emoji, rainbow palettes, bouncy animation on everything, comic fonts |
653
+ | Bold | Large type, strong contrast, big sections, one loud accent | Heavy shadows alone, clashing colors, oversized everything |
654
+ | Elegant | Refined typography, thin rules, calm palette, lots of breathing room | Script fonts, gold shimmer, over-decoration |
655
+ | Dark | Solid dark surfaces, checked contrast, muted borders, one accent | Pure black with low-contrast gray text, neon outlines everywhere |
656
+ | Warm / Friendly | Warm neutrals, softer radius, human copy | Orange overload, gradients everywhere, rounded everything |
657
+
658
+ Local slang works the same way. "Estetik", "kece", "clean banget", "kayak startup", or "kayak Stripe" is still a direction. Map it to a row above, or ask one question with two concrete options.
659
+
660
+ ### 3. Handling Steps
661
+
662
+ 1. Map the word with the translator table.
663
+ 2. Read the project theme: existing colors, fonts, spacing scale, radius, and components. Reuse them.
664
+ 3. If the project already has a strong design language, follow it and say so. Only override when the user confirms.
665
+ 4. Resolve conflicting words by function, then state the resolution.
666
+ 5. For a reference site or brand, extract tokens, not pixels.
667
+ 6. Print the token summary: palette, accent, type scale, spacing, radius, border and shadow policy, motion.
668
+ 7. Build, then check the result against the summary.
669
+
670
+ ### 4. Default Tokens (When Nothing Is Specified)
671
+
672
+ - **Color:** a neutral scale plus exactly one accent. Body text at least 4.5:1 contrast.
673
+ - **Spacing:** a 4px and 8px scale, with consistent gaps between sections.
674
+ - **Radius:** `rounded-lg` for cards, `rounded-md` for buttons and inputs. Pills only for small tags.
675
+ - **Borders:** 1px neutral borders for structure. Shadows only for overlays such as dropdowns and modals.
676
+ - **Type:** one sans-serif family. Body line-height around 1.5, headings around 1.2, with a fluid scale using `clamp()`.
677
+ - **Motion:** 150ms to 200ms, only for state changes such as hover, focus, and open. Respect `prefers-reduced-motion`.
678
+ - **Density:** comfortable on mobile, a little more generous on desktop. Never giant empty gaps by default.
679
+
680
+ ### 5. Pitfalls
681
+
682
+ #### 1. Treating "Modern" as a Slop License
683
+
684
+ * **The Bad Habit:** Reading "modern" and adding a purple gradient hero, glass cards, and floating shadows.
685
+ * **The Problem:** The page looks like every other generated template, and the eye has no clear focus.
686
+ * **Why It Fails:** Users recognize the generic AI look and trust the product less.
687
+ * **Clean Fix:** Translate "modern" into clean type, a clear grid, one accent, and restrained motion. Use no gradient unless the brand already uses one.
688
+ * **The Waitsec Way:** Modern is restraint and clarity, not decoration.
689
+
690
+ #### 2. Over-Rounding and Over-Shadowing for "Premium"
691
+
692
+ * **The Bad Habit:** Making every card `rounded-full` with a large soft shadow to look expensive.
693
+ * **The Problem:** Shapes lose meaning and surfaces turn blurry.
694
+ * **Why It Fails:** Depth cues stop working, and the page reads as cheap rather than premium.
695
+ * **Clean Fix:** Use one consistent radius and crisp borders. Reserve shadow for real overlays, and use space and type contrast for a premium feel.
696
+ * **The Waitsec Way:** Premium comes from space, type, and consistency, not from glow.
697
+
698
+ #### 3. Going Low-Contrast for "Minimalist"
699
+
700
+ * **The Bad Habit:** Choosing light gray text on white and thin faint lines to feel minimal.
701
+ * **The Problem:** Text becomes hard to read and controls become hard to find.
702
+ * **Why It Fails:** Minimalism is often mistaken for low contrast, and real users cannot read the result.
703
+ * **Clean Fix:** Keep strong contrast and a clear hierarchy. Simplify with space, not with faintness.
704
+ * **The Waitsec Way:** Minimal means fewer elements, not weaker ones.
705
+
706
+ #### 4. Copying a Reference Site Blindly
707
+
708
+ * **The Bad Habit:** Recreating another product's exact layout, palette, and motion.
709
+ * **The Problem:** The result looks like a clone, and it may not fit this product's content or brand.
710
+ * **Why It Fails:** It ignores the project's own identity and can raise legal and trust concerns.
711
+ * **Clean Fix:** Extract the principles (spacing, type scale, accent, density) and rebuild them with the project's content and tokens.
712
+ * **The Waitsec Way:** Learn the recipe, do not steal the dish.
713
+
714
+ #### 5. Overriding the Project's Design System
715
+
716
+ * **The Bad Habit:** Ignoring existing tokens and introducing new colors, fonts, and spacing because the user said "make it modern".
717
+ * **The Problem:** The page no longer matches the rest of the product.
718
+ * **Why It Fails:** Inconsistency across screens confuses users and multiplies maintenance work.
719
+ * **Clean Fix:** Reuse the project tokens first. Ask before deviating, and if the user confirms, keep the change minimal and note it.
720
+ * **The Waitsec Way:** The design system is the source of truth. A style word does not outrank it.
721
+
722
+ #### 6. Conflicting Words Resolved Silently
723
+
724
+ * **The Bad Habit:** Getting "minimalist but bold" and quietly picking one, then delivering a page that matches neither.
725
+ * **The Problem:** The user expected both directions to be visible.
726
+ * **Why It Fails:** The mismatch surfaces in review, and the work is redone.
727
+ * **Clean Fix:** Resolve by function and state the resolution. If the conflict changes structure, ask one short question.
728
+ * **The Waitsec Way:** Say how you resolved the brief instead of guessing in silence.
729
+
602
730
  ---
603
731
 
604
732
  ## Pre-Flight Checklist
@@ -620,3 +748,7 @@ Before returning generated page code to the user, verify:
620
748
  - [ ] Does the page have one `<h1>`, a unique title and meta description, a canonical URL, and Open Graph tags?
621
749
  - [ ] Is the main content server-rendered and structured so answer engines can quote it?
622
750
  - [ ] Is the JSON-LD block present, type-appropriate, using absolute URLs and ISO 8601 dates, and validated with no errors?
751
+ - [ ] If the page is an auth page, is it set to `noindex` with a minimal `WebPage` node, does it avoid user enumeration, and does any lockout state explain the reason and offer recovery?
752
+ - [ ] If the requested page is outside the listed archetypes, did I state the closest blueprint I adapted and keep the general preferences?
753
+ - [ ] If the user gave a vague style word, did I translate it into concrete tokens (palette, type, spacing, radius, border and shadow policy, motion) and state the translation?
754
+ - [ ] Did I reuse the project's design tokens before inventing new ones?
@@ -0,0 +1,138 @@
1
+ # Auth Pages Blueprint (waitsec-pagemaker)
2
+
3
+ Use this guide when creating login, register, forgot password, reset password, remember me, or account lockout and rate-limit screens. These pages are private by nature, so the goal is clarity, safety, and a short path back into the product.
4
+
5
+ ---
6
+
7
+ ## Complete Page Anatomy & Responsive Flow
8
+
9
+ ### 1. Login Page
10
+ * **Desktop (1024px+):** Centered card (`max-w-md`) or a 2-column split with the form on the left and a solid brand panel on the right. No busy background.
11
+ * **Mobile (<768px):** Single column. Brand mark on top, then the form. Inputs and the primary button are full width.
12
+ * Fields: email or username, password with a show or hide toggle, a "Remember me" checkbox, the primary "Sign in" button, and a secondary "Forgot password?" link.
13
+ * One primary action only. Social login buttons appear only when a real provider is wired up, and they sit below a labeled divider.
14
+
15
+ ### 2. Register Page
16
+ * Minimal fields: name, email, password, and confirm password (or a single password field with a visible rules checklist).
17
+ * Show password rules as a short checklist and validate as the user types.
18
+ * Terms or privacy checkbox only when it is legally required.
19
+ * Primary "Create account", with a clear link back to login.
20
+
21
+ ### 3. Forgot and Reset Password
22
+ * Forgot: one email field and one primary "Send reset link" button. Always show the same neutral success message, whether or not the email exists.
23
+ * Reset: new password plus confirm. The token is handled server-side, and the page notes that the link expires.
24
+
25
+ ### 4. Remember Me
26
+ * Label states the exact duration, for example "Remember me for 30 days".
27
+ * Unchecked by default on shared or public devices.
28
+ * Never store tokens in `localStorage` or `sessionStorage`. Use secure, httpOnly, sameSite cookies set by the server.
29
+
30
+ ### 5. Account Locked and Rate Limit Blocked
31
+ * Explain what happened in plain words, how long the lock lasts, and the next step.
32
+ * Provide one recovery action: retry when the countdown ends, reset the password, or contact support.
33
+ * Show a live countdown and keep the submit button disabled until it ends.
34
+ * Render this as its own clear state, not a generic error page.
35
+
36
+ ---
37
+
38
+ ## Interaction and Security Rules (Non-Negotiable)
39
+
40
+ - Never reveal whether an account exists. Use the same message for an unknown email and a wrong password.
41
+ - Enforce the rate limit on the server. The UI only reflects the remaining wait time.
42
+ - Use correct autocomplete attributes: `autocomplete="email"`, `autocomplete="current-password"` for login, and `autocomplete="new-password"` for register and reset.
43
+ - Keep password fields accessible with visible labels and a show or hide toggle.
44
+ - Errors appear as a summary at the top of the form and, where useful, inline under the field.
45
+ - Use `aria-live="polite"` for the lockout countdown and for async error messages.
46
+ - Give every control at least a 44px by 44px target on mobile.
47
+ - Set input font size to at least 16px on mobile so iOS does not zoom on focus.
48
+ - Center the card with `min-h` and normal document flow, never a fixed `h-screen` that traps the form when the keyboard opens.
49
+
50
+ ---
51
+
52
+ ## Detailed Pitfalls & The 5-Point Rule
53
+
54
+ ### 1. User Enumeration
55
+
56
+ * **The Bad Habit:** The login form says "Email not found" for an unknown address and "Wrong password" for a known one.
57
+ * **The Problem:** The different responses let an attacker test which emails have accounts.
58
+ * **Why It Fails:** It turns the login page into an account discovery tool and invites credential stuffing against real users.
59
+ * **Clean Fix:** Return one generic message such as "Email or password is incorrect" for both cases, and keep the response time consistent.
60
+ * **The Waitsec Way:** Treat account existence as private data. Say less to stay safe.
61
+
62
+ ### 2. Lockout With No Explanation or Recovery
63
+
64
+ * **The Bad Habit:** After too many attempts the form silently stops working or returns a blank error.
65
+ * **The Problem:** The user assumes the site is broken and keeps retrying, which extends the lock.
66
+ * **Why It Fails:** Frustration grows, support load rises, and legitimate users are locked out with no path back.
67
+ * **Clean Fix:** Show a clear locked state with the reason, a live countdown, and one recovery action.
68
+ * **The Waitsec Way:** A block must explain itself and offer a way out.
69
+
70
+ ### 3. Insecure Remember Me
71
+
72
+ * **The Bad Habit:** Storing a long-lived token in `localStorage` so the checkbox "just works".
73
+ * **The Problem:** Any script on the page can read the token, and a stolen token keeps the session alive.
74
+ * **Why It Fails:** It turns a small XSS into a permanent account takeover.
75
+ * **Clean Fix:** Use secure, httpOnly, sameSite cookies set by the server, with a sensible expiry, and rotate the token on use.
76
+ * **The Waitsec Way:** Convenience must never weaken the session.
77
+
78
+ ### 4. Password Fields That Fail on Mobile
79
+
80
+ * **The Bad Habit:** A password input with no show or hide toggle, tiny text, and no correct autocomplete hint.
81
+ * **The Problem:** Users mistype, cannot verify, and the browser fills the wrong field or the wrong kind of value.
82
+ * **Why It Fails:** Failed logins pile up, and some users abandon the form entirely.
83
+ * **Clean Fix:** Add a show or hide toggle, use at least 16px text, and set the correct `autocomplete` attribute for each field.
84
+ * **The Waitsec Way:** Remove friction from the most repeated action in the product.
85
+
86
+ ### 5. Fixed h-screen Form Trap
87
+
88
+ * **The Bad Habit:** Centering the card inside `h-screen flex items-center`.
89
+ * **The Problem:** When the mobile keyboard opens, the viewport shrinks and the input scrolls out of view.
90
+ * **Why It Fails:** Users cannot see what they type or reach the submit button.
91
+ * **Clean Fix:** Use `min-h-screen` with normal flow and enough bottom padding so the form scrolls above the keyboard.
92
+ * **The Waitsec Way:** Let the page scroll. Never lock the height of a form on mobile.
93
+
94
+ ### 6. No Loading or Disabled State
95
+
96
+ * **The Bad Habit:** The submit button stays active while the request runs.
97
+ * **The Problem:** Users click several times and send duplicate login or register requests.
98
+ * **Why It Fails:** It triggers avoidable rate limits and adds confusing error states.
99
+ * **Clean Fix:** Disable the button on submit, show a spinner or "Signing in..." label, and re-enable it on failure.
100
+ * **The Waitsec Way:** Every submit needs feedback and a single-flight guard.
101
+
102
+ ---
103
+
104
+ ## SEO, GEO & Structured Data (Auth Pages)
105
+
106
+ - Auth pages should not rank. Set `<meta name="robots" content="noindex, nofollow">`.
107
+ - Keep a simple title ("Sign in" or "Create account") plus the brand, and skip promotional copy.
108
+ - Exclude auth pages from the sitemap and avoid linking to them as content.
109
+ - Because this is a private page, use a minimal `WebPage` node. Do not add rich result types that a login page cannot support.
110
+
111
+ ```html
112
+ <script type="application/ld+json">
113
+ {
114
+ "@context": "https://schema.org",
115
+ "@type": "WebPage",
116
+ "name": "Sign in",
117
+ "url": "https://example.com/login",
118
+ "isPartOf": {
119
+ "@type": "WebSite",
120
+ "url": "https://example.com"
121
+ }
122
+ }
123
+ </script>
124
+ ```
125
+
126
+ ---
127
+
128
+ ## Pre-Flight Checklist for Auth Pages
129
+
130
+ - [ ] Is `<meta name="robots" content="noindex, nofollow">` present, and the page excluded from the sitemap?
131
+ - [ ] Does the page avoid revealing whether an account exists, with the same message and timing for all failures?
132
+ - [ ] Do password fields have a show or hide toggle and the correct `autocomplete` attribute?
133
+ - [ ] Does "Remember me" state its duration and default to off on shared devices?
134
+ - [ ] Are session tokens kept out of `localStorage` and placed in secure httpOnly cookies?
135
+ - [ ] Does the locked or rate-limited state explain the reason, show a countdown, and offer one recovery action?
136
+ - [ ] Is the submit button disabled during the request to prevent double submits?
137
+ - [ ] Does the form use `min-h-screen` with normal scrolling instead of a fixed `h-screen`?
138
+ - [ ] Is a minimal `WebPage` JSON-LD block present and valid?